Browse Source

2021-07-22

sceneControl: our_write. Added Element to filepath if configured in sceneControl.
Denoise with Noise: Added alert if denoise output is the same as input.
Martin Sächsinger 3 years ago
parent
commit
bfacb120ff
3 changed files with 28 additions and 10 deletions
  1. 7
    0
      README.md
  2. 13
    8
      pythonpluginsUI/denoice/denoice.py
  3. 8
    2
      pythonpluginsUI/sceneControl/sceneControl.py

+ 7
- 0
README.md View File

@@ -54,6 +54,13 @@
54 54
 
55 55
 
56 56
 ##### Changelog:
57
+`2021-07-22`
58
+
59
+`sceneControl: our_write. Added Element to filepath if configured in sceneControl.`
60
+
61
+`Denoise with Noise: Added alert if denoise output is the same as input.`
62
+
63
+
57 64
 
58 65
 `2021-07-12`
59 66
 

+ 13
- 8
pythonpluginsUI/denoice/denoice.py View File

@@ -160,7 +160,7 @@ class denoicePanel(nukescripts.PythonPanel):
160 160
         # filepatn in
161 161
         self.inputpath = nuke.File_Knob("input", "Input")
162 162
         self.addKnob(self.inputpath)
163
-        self.inputpath.setTooltip('Needs to be in #### syntax. Not in %04d')
163
+        self.inputpath.setTooltip('Needs to be in #### syntax. Not in %04d or 1001 (single frame syntax')
164 164
         self.inputpath.setValue(nuke.selectedNode().knobs()['file'].value().replace('%04d','####'))
165 165
 
166 166
         # filepath out
@@ -284,14 +284,19 @@ class denoicePanel(nukescripts.PythonPanel):
284 284
                 self.musterPool.setVisible(True)
285 285
                 self.musterFolder.setVisible(True)
286 286
 
287
-
288 287
         if knob.name() == "OK":
289
-            if self.renderChoice.value() == "local_machine":
290
-                print('Denoising locally......')
291
-                self.executeNoiceLocally()
292
-            if self.renderChoice.value() == "muster":
293
-                print('Denoising on Muster......')
294
-                self.sendToMuster()
288
+            # todo: fix with regexp
289
+            if self.inputpath.value() == self.outputpath.value():
290
+                print("Please use a output file different from the input file! Exiting.")
291
+                nuke.message("Please use a output file different from the input file! Exiting.")
292
+            else:
293
+                # go
294
+                if self.renderChoice.value() == "local_machine":
295
+                    print('Denoising locally......')
296
+                    self.executeNoiceLocally()
297
+                if self.renderChoice.value() == "muster":
298
+                    print('Denoising on Muster......')
299
+                    self.sendToMuster()
295 300
 
296 301
 
297 302
     def executeNoiceLocally(self):

+ 8
- 2
pythonpluginsUI/sceneControl/sceneControl.py View File

@@ -1089,6 +1089,12 @@ def createCustomWrite(n):
1089 1089
     else:
1090 1090
         # already existing
1091 1091
         return
1092
+
1093
+    # check element
1094
+    import sceneControl
1095
+    sceneControl = sceneControl.getSceneControl()
1096
+    element = sceneControl.knobs()['element'].value()
1097
+
1092 1098
     # create tab
1093 1099
     print('Our_Write: Info. Creating KellerTab')
1094 1100
     k = nuke.Tab_Knob('keller', 'Keller')
@@ -1117,7 +1123,8 @@ def createCustomWrite(n):
1117 1123
     k = nuke.String_Knob('element', 'Element')
1118 1124
     k.setTooltip('Optional Specifier. For example [BG]_denoise. [FG]_denoise.')
1119 1125
     n.addKnob(k)
1120
-    n.knob('element').setValue('')
1126
+    # if element is in sceneControl
1127
+    n.knob('element').setValue(element)
1121 1128
 
1122 1129
     # info
1123 1130
     k = nuke.String_Knob('info', 'Info')
@@ -1131,7 +1138,6 @@ def createCustomWrite(n):
1131 1138
     n.addKnob(k)
1132 1139
     n.knob('set').setFlag(nuke.STARTLINE)
1133 1140
 
1134
-
1135 1141
     # _______________________________________________________________
1136 1142
     k = nuke.Text_Knob('divider1', '')
1137 1143
     n.addKnob(k)

Loading…
Cancel
Save