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
 
54
 
55
 
55
 
56
 ##### Changelog:
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
 `2021-07-12`
65
 `2021-07-12`
59
 
66
 

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

160
         # filepatn in
160
         # filepatn in
161
         self.inputpath = nuke.File_Knob("input", "Input")
161
         self.inputpath = nuke.File_Knob("input", "Input")
162
         self.addKnob(self.inputpath)
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
         self.inputpath.setValue(nuke.selectedNode().knobs()['file'].value().replace('%04d','####'))
164
         self.inputpath.setValue(nuke.selectedNode().knobs()['file'].value().replace('%04d','####'))
165
 
165
 
166
         # filepath out
166
         # filepath out
284
                 self.musterPool.setVisible(True)
284
                 self.musterPool.setVisible(True)
285
                 self.musterFolder.setVisible(True)
285
                 self.musterFolder.setVisible(True)
286
 
286
 
287
-
288
         if knob.name() == "OK":
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
     def executeNoiceLocally(self):
302
     def executeNoiceLocally(self):

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

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

Loading…
Cancel
Save