Selaa lähdekoodia

2021-07-02

channelSelect. Added additional 'pattern_exclude' knob to always exclude aovs like *variance, P, N etc.
channelSelect. Added unpremult option and additional grading possibilities.
channelSelect. Internal shuffle nodes are now labelled with the resolved channel name.
Denoise with noice. Fixed issue with large number of aovs.
Gimmicks. Added BalanceGrade and CalibrateMacbeth.
Martin Sächsinger 3 vuotta sitten
vanhempi
commit
b8c1f54491

+ 20
- 1
README.md Näytä tiedosto

@@ -54,6 +54,23 @@
54 54
 
55 55
 ##### Changelog:
56 56
 
57
+
58
+
59
+`2021-07-02`
60
+
61
+`channelSelect. Added additional 'pattern_exclude' knob to always exclude aovs like *variance, P, N etc.`
62
+
63
+`channelSelect. Added unpremult option and additional grading possibilities.`
64
+
65
+`channelSelect. Internal shuffle nodes are now labelled with the resolved channel name.`
66
+
67
+`Denoise with noice. Fixed issue with large number of aovs.`
68
+
69
+`Gimmicks. Added BalanceGrade and CalibrateMacbeth.`
70
+
71
+
72
+`__________`
73
+
57 74
 `2021-06-18`
58 75
 
59 76
 `sceneControl. Fixed issue if element is not set.`
@@ -78,4 +95,6 @@
78 95
 
79 96
 `Denoise with noice. Initial version.`
80 97
 
81
-`ocio config, image formats, fps and favorites are set from KEnv project_config.py.`
98
+`ocio config, image formats, fps and favorites are set from KEnv project_config.py.`
99
+
100
+

BIN
doc/channelSelect.jpg Näytä tiedosto


+ 114
- 0
gimmicks/Gimmicks/_gen/BalanceGrade.gimmick Näytä tiedosto

@@ -0,0 +1,114 @@
1
+set cut_paste_input [stack 0]
2
+version 12.2 v5
3
+push $cut_paste_input
4
+Group {
5
+ name BalanceGrade3
6
+ tile_color 0x6c9de1ff
7
+ selected true
8
+ xpos -641
9
+ ypos 75
10
+ addUserKnob {20 BalanceGrade}
11
+ addUserKnob {26 ColorMatrix_label l "@b;ColorMatrix" T " "}
12
+ addUserKnob {41 matrix T ColorMatrix.matrix}
13
+ addUserKnob {22 reset_mtx l Reset T "nuke.thisNode()\['matrix'].setValue(\[1,0,0,0,1,0,0,0,1])" +STARTLINE}
14
+ addUserKnob {26 ""}
15
+ addUserKnob {26 match_label l "@b;Match" T ""}
16
+ addUserKnob {18 matchsrc l "src color"}
17
+ matchsrc 0.18
18
+ addUserKnob {6 matchsrc_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
19
+ addUserKnob {18 matchdst l "dst color"}
20
+ matchdst 0.18
21
+ addUserKnob {6 matchdst_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
22
+ addUserKnob {18 blackpoint t "this value will be subtracted from the offset"}
23
+ blackpoint {0 0 0}
24
+ addUserKnob {6 blackpoint_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
25
+ addUserKnob {22 set_blackpoint l "Set Blackpoint" t "Set blackpoint based on selected region in the viewer. If preserve luminance is checked, the rgb will be balanced but the overall luminance will not be changed." T "node = nuke.thisNode()\nblackpoint_preserve_luminance = node\['blackpoint_preserve_luminance'].getValue()\nnuke.root().begin()\n\n# Get viewer and connected node to calculate format resolution\nviewer = nuke.activeViewer().node()\nif viewer.input(0):\n    viewed_node = viewer.input(0)\n    if not nuke.selectedNodes():\n        viewed_node.setSelected(1)\nelse:\n    viewed_node = nuke.activeViewer().node()\n\n# Get selected sample area\nbboxinfo = nuke.activeViewer().node()\['colour_sample_bbox'].value()\naspect = float(viewed_node.width() * viewed_node.pixelAspect()) / float(viewed_node.height())\ncornerA = \[(bboxinfo\[0]*0.5+0.5) * viewed_node.width(), (((bboxinfo\[1] * 0.5) + (0.5/aspect)) * aspect) * viewed_node.height()]\ncornerB = \[(bboxinfo\[2]*0.5+0.5) * viewed_node.width(), (((bboxinfo\[3] * 0.5) + (0.5/aspect)) * aspect) * viewed_node.height()]\narea = \[cornerB\[0] - cornerA\[0], cornerB\[1] - cornerA\[1]]\ncenter = \[cornerA\[0] + (area\[0]/2), cornerA\[1] + (area\[1] / 2)]\n\n# Reset blackpoint and add knob\nnode\['blackpoint'].setValue(\[0, 0, 0])\nadd_value = node\['add'].getValue()\nnode\['add'].setValue(\[0, 0, 0])\n\n# Sample input colors within box\ncolor_sample = \[node.sample('rgba.red', center\[0], center\[1], area\[0], area\[1]), node.sample('rgba.green', center\[0], center\[1], area\[0], area\[1]), node.sample('rgba.blue', center\[0], center\[1], area\[0], area\[1])]\n\nif blackpoint_preserve_luminance:\n    # calculate average luminance with rec709 weighting\n    average_luminance = color_sample\[0]*0.2126 + color_sample\[1]*0.7152 + color_sample\[2]*0.0722\n    color_sample = \[v - average_luminance for v in color_sample]\n\n# Set blackpoint to sampled value\nnode\['blackpoint'].setValue(color_sample)\nnode\['add'].setValue(add_value)\n" +STARTLINE}
26
+ addUserKnob {6 blackpoint_preserve_luminance l "preserve luminance" t "Try not to shift luminance of the blackpoint when sampling, only shift the color to be neutral." -STARTLINE}
27
+ blackpoint_preserve_luminance true
28
+ addUserKnob {22 reset_match l Reset T "n = nuke.thisNode()\nn\['blackpoint'].setValue(\[0, 0, 0])\nn\['add'].setValue(\[0, 0, 0])\nn\['matchsrc'].setValue(0.18)\nn\['matchdst'].setValue(0.18)" +STARTLINE}
29
+ addUserKnob {26 grade_label l "@b; Grade" T " "}
30
+ addUserKnob {7 exposure t "Adjust exposure in stops" R -4 4}
31
+ addUserKnob {6 exposure_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
32
+ addUserKnob {18 multiply R 0 4}
33
+ multiply {1 1 1}
34
+ addUserKnob {6 multiply_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
35
+ addUserKnob {18 add R -0.25 0.25}
36
+ add {0 0 0}
37
+ addUserKnob {6 add_panelDropped l "panel dropped state" -STARTLINE +HIDDEN}
38
+ addUserKnob {22 reset_grade l Reset T "n = nuke.thisNode()\nn\['exposure'].setValue(0)\nn\['multiply'].setValue(\[1, 1, 1])\nn\['add'].setValue(\[0, 0, 0])" +STARTLINE}
39
+ addUserKnob {26 ""}
40
+ addUserKnob {6 invert t "Invert the color transform." +STARTLINE}
41
+ addUserKnob {41 export_cc l "Export CC" T OCIOCDLTransform.export_cc}
42
+ addUserKnob {22 export_spimtx l "Export spimtx" t "Export spimtx format describing the balancegrade.\n\nSupports saturation, primaries multiply, offset." T "from __future__ import print_function\nfrom __future__ import with_statement\nimport nuke\n\ndef mtx_mult(a, b):\n    # multiply two 3x3 matrices and return the result\n    a = \[a\[0:3], a\[3:6], a\[6:9]]\n    b = \[b\[0:3], b\[3:6], b\[6:9]]\n    c = \[\[sum(a * b for a, b in zip(a_row, b_col)) for b_col in zip(*b)] for a_row in a]\n    return c\[0] + c\[1] + c\[2]\n\ndef export_spimtx(output_path=None):\n    # export an spimtx file given the color transformations specified on the balancegrade node.\n    node = nuke.thisNode()\n    nuke.root().begin()\n    spimtx_calibration_only = node\['spimtx_calibration_only'].getValue()\n\n    if not output_path:\n        output_path = nuke.getFilename('output_path')\n    if not output_path:\n        print('Error: no output path specified. Exiting...')\n        return\n\n    with node:\n        cdltransform = nuke.toNode('OCIOCDLTransform')\n    \n    mtx = node\['matrix'].getValue()\n\n    if spimtx_calibration_only:\n        dst_mtx = mtx\n        offset = \[0, 0, 0]\n        slope = \[1, 1, 1]\n    else:\n        offset = cdltransform\['offset'].getValue()\n        slope = cdltransform\['slope'].getValue()\n        mult_mtx = \[slope\[0], 0, 0, 0, slope\[1], 0, 0, 0, slope\[2]]\n        dst_mtx = mtx_mult(mult_mtx, mtx)\n\n    output_spimtx_string = '\{0\} \{1\} \{2\} \{3\} \{4\} \{5\} \{6\} \{7\} \{8\} \{9\} \{10\} \{11\}'.format(\n        dst_mtx\[0],\n        dst_mtx\[1],\n        dst_mtx\[2],\n        int(round(offset\[0] * 65535)),\n        dst_mtx\[3],\n        dst_mtx\[4],\n        dst_mtx\[5],\n        int(round(offset\[1] * 65535)),\n        dst_mtx\[6],\n        dst_mtx\[7],\n        dst_mtx\[8],\n        int(round(offset\[2] * 65535))\n        )\n\n    # Create spimtx file\n    spimtx_file = open(output_path, 'w+')\n    spimtx_file.write(output_spimtx_string)\n    spimtx_file.close()\n\n\nif __name__=='__main__':\n    export_spimtx()" +STARTLINE}
43
+ addUserKnob {6 spimtx_calibration_only l "calibration only" t "only export the colormatrix calibration to the spimtx file. \n\notherwise export the entire balancegrade to the spimtx file." -STARTLINE}
44
+}
45
+ Input {
46
+  inputs 0
47
+  name Input
48
+  xpos -370
49
+  ypos -562
50
+ }
51
+ Dot {
52
+  name Dot1
53
+  label " "
54
+  note_font "Helvetica Bold"
55
+  note_font_size 24
56
+  note_font_color 0xa5a5a501
57
+  xpos -336
58
+  ypos -486
59
+ }
60
+set N55320800 [stack 0]
61
+ OCIOCDLTransform {
62
+  slope {{parent.OCIOCDLTransform.slope} {parent.OCIOCDLTransform.slope} {parent.OCIOCDLTransform.slope}}
63
+  offset {{parent.OCIOCDLTransform.offset} {parent.OCIOCDLTransform.offset} {parent.OCIOCDLTransform.offset}}
64
+  direction inverse
65
+  working_space scene_linear
66
+  name OCIOCDLTransform_inverse
67
+  xpos -260
68
+  ypos -442
69
+ }
70
+ ColorMatrix {
71
+  matrix {
72
+      {{parent.ColorMatrix.matrix} {parent.ColorMatrix.matrix} {parent.ColorMatrix.matrix}}
73
+      {{parent.ColorMatrix.matrix} {parent.ColorMatrix.matrix} {parent.ColorMatrix.matrix}}
74
+      {{parent.ColorMatrix.matrix} {parent.ColorMatrix.matrix} {parent.ColorMatrix.matrix}}
75
+    }
76
+  invert true
77
+  name ColorMatrix_invert
78
+  xpos -260
79
+  ypos -370
80
+ }
81
+push $N55320800
82
+ ColorMatrix {
83
+  matrix {
84
+      {1 0 0}
85
+      {0 1 0}
86
+      {0 0 1}
87
+    }
88
+  name ColorMatrix
89
+  xpos -370
90
+  ypos -442
91
+ }
92
+ OCIOCDLTransform {
93
+  slope {{"matchdst/matchsrc*pow(2, exposure)*multiply"} {"matchdst/matchsrc*pow(2, exposure)*multiply"} {"matchdst/matchsrc*pow(2, exposure)*multiply"}}
94
+  offset {{"parent.add - parent.blackpoint"} {"parent.add - parent.blackpoint"} {"parent.add - parent.blackpoint"}}
95
+  working_space scene_linear
96
+  name OCIOCDLTransform
97
+  xpos -370
98
+  ypos -370
99
+ }
100
+ Switch {
101
+  inputs 2
102
+  which {{parent.invert}}
103
+  name Switch_inverse
104
+  xpos -370
105
+  ypos -274
106
+ }
107
+ Output {
108
+  name Output
109
+  xpos -370
110
+  ypos -202
111
+ }
112
+end_group
113
+# Creation Time=Mon Jun 28 09:30:30 2021
114
+# Creator=Martin

+ 4398
- 0
gimmicks/Gimmicks/_gen/CalibrateMacbeth.gimmick
File diff suppressed because it is too large
Näytä tiedosto


+ 6
- 0
pythonplugins/_default_configs/projectDefaults.py Näytä tiedosto

@@ -41,6 +41,12 @@ class ProjectDefaults(KellerNukePlugin):
41 41
         # set viewer
42 42
         # viewer is set via config.ocio: active_views: [P3D65 Rec.709 Limited, sRGB, DCDM, DCDM P3D60 Limited..]
43 43
 
44
+        # Write
45
+        nuke.knobDefault("Write.channels", "rgba")
46
+        nuke.knobDefault("Write.dpx.channels", "rgb")
47
+        nuke.knobDefault("Write.create_directories", "1")
48
+        nuke.knobDefault("Write.exr.noprefix", "1")
49
+        nuke.knobDefault("Write.exr.metadata", "all metadata")
44 50
 
45 51
     def unconfigurePlugin(self):
46 52
         pass

+ 172
- 42
pythonpluginsUI/ChannelSelect/ChannelSelect.py Näytä tiedosto

@@ -6,7 +6,9 @@ import nuke
6 6
 __version__ = '1.0'
7 7
 
8 8
 MODES = ['MergeBackIntoStream','SelectOnly', 'ContactSheet']
9
-PATTERNDEFAULT = "*direct* !*indirect* !*default"
9
+#PATTERNDEFAULT = "*direct* !*indirect* !*default"
10
+PATTERNDEFAULT = ""
11
+PATTERNIGNORE = "*variance *denoise* *matte* P N Z rgba albedo"
10 12
 INIT_DONE = False
11 13
 
12 14
 class ChannelSelect(KellerNukePlugin):
@@ -16,10 +18,12 @@ class ChannelSelect(KellerNukePlugin):
16 18
         m = self.menu.addMenu('Workgroup','Toolbar_Workgroup.png')
17 19
         m.addCommand('ChannelSelect', 'import ChannelSelect; ChannelSelect.createChannelSelect()',  icon=':qrc/images/ToolbarChannel.png')
18 20
         nuke.addKnobChanged(onKnobChanged)
21
+        nuke.addOnCreate(onCreate, nodeClass=('Group'))
19 22
 
20 23
     def unconfigurePlugin(self):
21 24
         self.menu.removeItem('ChannelSelect')
22 25
         nuke.removeKnobChanged(onKnobChanged)
26
+        nuke.removeOnCreate(onCreate)
23 27
         pass
24 28
 
25 29
 
@@ -32,7 +36,7 @@ def onKnobChanged():
32 36
 
33 37
     k = nuke.thisKnob()
34 38
     # do a refresh on these knobs
35
-    refresh_resolved = ['pattern','update']
39
+    refresh_resolved = ['pattern', 'pattern_exclude', 'update']
36 40
 
37 41
     if k.name() in refresh_resolved:
38 42
         print('ChannelSelect: Info. Event refresh triggered.')
@@ -40,7 +44,8 @@ def onKnobChanged():
40 44
         n = nuke.thisNode()
41 45
 
42 46
         pattern = n['pattern'].value()
43
-        resolved = resolvePattern(n, pattern)
47
+        pattern_exclude = n['pattern_exclude'].value()
48
+        resolved = resolvePattern(n, pattern, pattern_exclude)
44 49
         if resolved:
45 50
             resString = '\n'.join(resolved)
46 51
 
@@ -51,6 +56,15 @@ def onKnobChanged():
51 56
         pass
52 57
 
53 58
 
59
+def onCreate():
60
+    print('ChannelSelect: Info. On Create refresh triggered.')
61
+    n = nuke.thisNode()
62
+    # % (r * 255, g * 255, b * 255, 1), 16): change r g and b to your liking
63
+    hexColour = int('%02x%02x%02x%02x' % (0 * 255, 0 * 255, 0 * 255, 1), 16)
64
+    n['tile_color'].setValue(hexColour)
65
+
66
+
67
+
54 68
 def createChannelSelect():
55 69
     # get selected Node (for connecting our node below)
56 70
     try:
@@ -73,11 +87,11 @@ def createChannelSelect():
73 87
         n.setXYpos(s.xpos(), s.ypos() + 100)
74 88
 
75 89
     # tab ChannelSelect
76
-    k = nuke.Tab_Knob('select', 'Select')
90
+    k = nuke.Tab_Knob('select', 'select')
77 91
     n.addKnob(k)
78 92
 
79 93
     # Pattern
80
-    k = nuke.EvalString_Knob('pattern', 'Pattern')
94
+    k = nuke.EvalString_Knob('pattern', 'pattern')
81 95
     n.addKnob(k)
82 96
     n.knob('pattern').setTooltip('*diffuse* *SSS*\nwith exclude (! or ^):\n*direct* !*indirect*')
83 97
     n.knob('pattern').setValue(PATTERNDEFAULT)
@@ -87,39 +101,89 @@ def createChannelSelect():
87 101
     n.addKnob(k)
88 102
     n.knob('update').setTooltip('Creates Nodes in Group based on Search Pattern')
89 103
 
104
+    # Pattern
105
+    k = nuke.EvalString_Knob('pattern_exclude', 'exclude')
106
+    n.addKnob(k)
107
+    n.knob('pattern_exclude').setTooltip('always exclude this pattern')
108
+    n.knob('pattern_exclude').setValue(PATTERNIGNORE)
109
+
90 110
     # Resolved Channels
91
-    k = nuke.Multiline_Eval_String_Knob('resolved', 'Resolved')
111
+    k = nuke.Multiline_Eval_String_Knob('resolved', 'preview')
92 112
     n.addKnob(k)
93
-    n.knob('resolved').setTooltip('These AOVs are found based on your search Pattern above')
113
+    n.knob('resolved').setTooltip('These AOVs are found based on your search Pattern above. Press Set to use these aovs.')
114
+
115
+    # Divide and Conquer
116
+    k = nuke.Text_Knob('divider', '')
117
+    n.addKnob(k)
118
+
119
+    # unpremult
120
+    k = nuke.Boolean_Knob('unpremult', 'unpremult')
121
+    n.addKnob(k)
122
+    n.knob('unpremult').setValue(True)
123
+    n.knob('unpremult').setFlag(nuke.STARTLINE)
124
+
125
+    # Divide and Conquer
126
+    k = nuke.Text_Knob('divider', '')
127
+    n.addKnob(k)
128
+
129
+    # Saturation
130
+    k = nuke.Double_Knob('saturation', 'saturation')
131
+    n.addKnob(k)
132
+    n.knob('saturation').setRange(0,1)
133
+    n.knob('saturation').setValue(1)
94 134
 
95 135
     # Divide and Conquer
96 136
     k = nuke.Text_Knob('divider', '')
97 137
     n.addKnob(k)
98 138
 
99 139
     # Exposure
100
-    k = nuke.Double_Knob('exposure', 'Exposure')
140
+    k = nuke.Double_Knob('exposure', 'exposure')
101 141
     n.addKnob(k)
102 142
     n.knob('exposure').setRange(-2,2)
103 143
 
144
+    # Divide and Conquer
145
+    k = nuke.Text_Knob('divider', '')
146
+    n.addKnob(k)
147
+
148
+    # Blackpoint
149
+    k = nuke.Color_Knob('blackpoint', 'blackpoint')
150
+    n.addKnob(k)
151
+    n.knob('blackpoint').setRange(-1,1)
152
+    n.knob('blackpoint').setValue([0, 0, 0])
153
+
154
+    # Whitepoint
155
+    k = nuke.Color_Knob('whitepoint', 'whitepoint')
156
+    n.addKnob(k)
157
+    n.knob('whitepoint').setRange(0,4)
158
+    n.knob('whitepoint').setValue(1)
159
+    n.knob('whitepoint').setValue([1, 1, 1])
160
+
161
+    # Lift
162
+    k = nuke.Color_Knob('black', 'lift')
163
+    n.addKnob(k)
164
+    n.knob('black').setRange(-1,1)
165
+    n.knob('black').setValue([0, 0, 0])
166
+
104 167
     # Multiply
105
-    k = nuke.Color_Knob('multiply', 'Multiply')
168
+    k = nuke.Color_Knob('multiply', 'multiply')
106 169
     n.addKnob(k)
107 170
     n.knob('multiply').setValue([1, 1, 1])
171
+    n.knob('multiply').setRange(0, 4)
108 172
 
109 173
     # Gamma
110
-    k = nuke.Double_Knob('gamma', 'Gamma')
174
+    k = nuke.Double_Knob('gamma', 'gamma')
111 175
     n.addKnob(k)
112 176
     n.knob('gamma').setValue(1)
113 177
     n.knob('gamma').setRange(0.2, 2)
114 178
 
115 179
     # Compensate Mult
116
-    k = nuke.Boolean_Knob('compensate', 'Compensate Mult')
180
+    k = nuke.Boolean_Knob('compensate', 'compensate mult')
117 181
     n.addKnob(k)
118 182
     n.knob('compensate').setValue(True)
119 183
     n.knob('compensate').setFlag(nuke.STARTLINE)
120 184
 
121 185
     # Reset Values
122
-    k = nuke.PyScript_Knob('reset', 'Reset', 'ChannelSelect.resetValues(nuke.thisNode())')
186
+    k = nuke.PyScript_Knob('reset', 'reset', 'ChannelSelect.resetValues(nuke.thisNode())')
123 187
     n.addKnob(k)
124 188
     n.knob('reset').setTooltip('Reset Color Correct values')
125 189
     n.knob('reset').setFlag(nuke.STARTLINE)
@@ -129,7 +193,7 @@ def createChannelSelect():
129 193
     n.addKnob(k)
130 194
 
131 195
     # Mode
132
-    k = nuke.Enumeration_Knob('mode', 'Mode', MODES)
196
+    k = nuke.Enumeration_Knob('mode', 'mode', MODES)
133 197
     n.addKnob(k)
134 198
     k.setTooltip('MergeBackIntoStream: Shuffles the resolved aovs, applies the grading options and merges the result back to main comp stream\n\nSelectOnly: Just shuffles the resolved aovs and adds them together.\n\nLayerContactSheet: Displays the LayerContactSheet with layer names. Note. You need to Press Set in order for this to work. An empty Pattern is possible')
135 199
     n.knob('mode').clearFlag(nuke.STARTLINE)
@@ -137,6 +201,7 @@ def createChannelSelect():
137 201
     # refresh again
138 202
     n.knob('pattern').setValue('*key*')
139 203
     n.knob('pattern').setValue(PATTERNDEFAULT)
204
+    tmp = n.knob('resolved').getValue()
140 205
 
141 206
     global INIT_DONE
142 207
     INIT_DONE = True
@@ -145,12 +210,16 @@ def createChannelSelect():
145 210
 
146 211
 def resetValues(n):
147 212
     n['exposure'].setValue(0)
213
+    n['blackpoint'].setValue(0)
214
+    n['whitepoint'].setValue(1)
215
+    n['saturation'].setValue(1)
216
+    n['black'].setValue(0)
148 217
     n['multiply'].setValue([1, 1, 1])
149 218
     n['gamma'].setValue(1)
150 219
     n['compensate'].setValue(True)
151 220
 
152 221
 
153
-def resolvePattern(n, pattern):
222
+def resolvePattern(n, pattern, pattern_exclude):
154 223
     if pattern == "":
155 224
         return None
156 225
 
@@ -160,14 +229,22 @@ def resolvePattern(n, pattern):
160 229
 
161 230
     matchChannels = []
162 231
     ignoreChannels = []
232
+    ignoreChannels2 = []
233
+
234
+    # pattern
163 235
     for p in pattern.split(' '):
164 236
         matchChannels += (fnmatch.filter(layers, p))
165 237
         # excludes
166 238
         if p[0] == '!' or p[0] == '^':
167 239
             ignoreChannels += (fnmatch.filter(layers, p[1:]))
168 240
 
169
-    matchChannels = list(set(matchChannels) - set(ignoreChannels))
241
+    # pattern exclude
242
+    for p in pattern_exclude.split(' '):
243
+        ignoreChannels2 += (fnmatch.filter(layers, p))
244
+
245
+    matchChannels = list(set(matchChannels) - set(ignoreChannels) - set(ignoreChannels2))
170 246
     matchChannels.sort()
247
+
171 248
     return matchChannels
172 249
 
173 250
 
@@ -177,7 +254,8 @@ def updatePattern(n):
177 254
 
178 255
     # n = node
179 256
     pattern = n['pattern'].value()
180
-    resolved = resolvePattern(n, pattern)
257
+    pattern_exclude = n['pattern_exclude'].value()
258
+    resolved = resolvePattern(n, pattern,pattern_exclude)
181 259
 
182 260
     # create nodes
183 261
     # input and output of Group
@@ -186,7 +264,8 @@ def updatePattern(n):
186 264
 
187 265
     # delete old nodes
188 266
     g = nuke.toNode(n.name())
189
-    oldNodes = [i for i in g.nodes() if '__' in i['name'].value()]
267
+    #oldNodes = [i for i in g.nodes() if '__' in i['name'].value()]
268
+    oldNodes = [i for i in g.nodes() if '__' in i['label'].value()]
190 269
 
191 270
     for node in oldNodes:
192 271
         nuke.delete(node)
@@ -194,71 +273,92 @@ def updatePattern(n):
194 273
     # dot input
195 274
     dot_input = nuke.nodes.Dot(xpos=input.xpos() , ypos=input.ypos()+100)
196 275
     dot_input['name'].setValue('dot_input__')
197
-    dot_input['label'].setValue('[value name]')
276
+    dot_input['label'].setValue('dot_input__')
198 277
     #dot_input['note_font_size'].setValue(25)
199 278
     # connect to the input1 node
200 279
 
201 280
     # dot input 2
202 281
     dot_input2 = nuke.nodes.Dot(xpos=dot_input.xpos()+1500 , ypos=dot_input.ypos())
203 282
     dot_input2['name'].setValue('dot_input2__')
204
-    dot_input2['label'].setValue('[value name]')
283
+    dot_input2['label'].setValue('dot_input2__')
205 284
     #dot_input2['note_font_size'].setValue(25)
206 285
     # connect to the input1 node
207 286
 
287
+    # unpremult
288
+    unpremult = nuke.nodes.Unpremult(xpos=dot_input.xpos()+700 , ypos=dot_input.ypos() )
289
+    #unpremult['name'].setValue('unpremult_node__')
290
+    unpremult['label'].setValue('unpremult__')
291
+
208 292
     # dot resolved
209 293
     dot_resolved = nuke.nodes.Dot(xpos=dot_input.xpos() , ypos=dot_input.ypos() + V_OFFSET)
210 294
     dot_resolved['name'].setValue('dot_resolved__')
211
-    dot_resolved['label'].setValue('[value name]')
295
+    dot_resolved['label'].setValue('dot_resolved__')
212 296
     #dot_resolved['note_font_size'].setValue(25)
213 297
 
214 298
     # dot resolved2
215 299
     dot_resolved2 = nuke.nodes.Dot(xpos=dot_resolved.xpos() - 100, ypos=dot_resolved.ypos())
216 300
     dot_resolved2['name'].setValue('dot_resolved2__')
217
-    dot_resolved2['label'].setValue('[value name]')
301
+    dot_resolved2['label'].setValue('dot_resolved2__')
218 302
     #dot_resolved2['note_font_size'].setValue(25)
219 303
 
220 304
     # dot resolved3
221 305
     dot_resolved3 = nuke.nodes.Dot(xpos=dot_resolved2.xpos(), ypos=dot_resolved.ypos() + V_OFFSET)
222 306
     dot_resolved3['name'].setValue('dot_resolved3__')
223
-    dot_resolved3['label'].setValue('[value name]')
307
+    dot_resolved3['label'].setValue('dot_resolved3__')
224 308
     #dot_resolved3['note_font_size'].setValue(25)
225 309
 
226 310
     # merge from
227 311
     merge_from = nuke.nodes.Merge2(xpos=dot_input.xpos()+500 , ypos=dot_input.ypos() )
312
+    merge_from['operation'].setValue("merge_from__")
228 313
     merge_from['name'].setValue('merge_from__')
229
-    merge_from['operation'].setValue("from")
314
+    merge_from['label'].setValue('merge_from__')
230 315
 
231 316
     # exposure
232 317
     exposure = nuke.nodes.EXPTool(xpos=dot_resolved.xpos() , ypos=dot_resolved.ypos() + V_OFFSET)
233 318
     exposure['name'].setValue('exposure__')
319
+    exposure['label'].setValue('exposure__')
234 320
 
235 321
     # grade
236 322
     grade = nuke.nodes.Grade(xpos=exposure.xpos() , ypos=exposure.ypos() + V_OFFSET)
237 323
     grade['name'].setValue('grade__')
324
+    grade['label'].setValue('grade__')
325
+
326
+    # saturation
327
+    saturation = nuke.nodes.Saturation(xpos=grade.xpos() , ypos=exposure.ypos() + V_OFFSET)
328
+    saturation['name'].setValue('saturation__')
329
+    saturation['label'].setValue('saturation__')
238 330
 
239 331
     # merge plus
240
-    merge_plus = nuke.nodes.Merge2(xpos=grade.xpos() , ypos=grade.ypos() + V_OFFSET)
332
+    merge_plus = nuke.nodes.Merge2(xpos=saturation.xpos() , ypos=saturation.ypos() + V_OFFSET)
241 333
     merge_plus['operation'].setValue("plus")
242 334
     merge_plus['name'].setValue('merge_plus__')
335
+    merge_plus['label'].setValue('merge_plus__')
243 336
 
244 337
     # dot input From
245 338
     dot_input_from = nuke.nodes.Dot(xpos=merge_from.xpos() , ypos=merge_plus.ypos())
246 339
     dot_input_from['name'].setValue('dot_input_from__')
247
-    dot_input_from['label'].setValue('[value name]')
340
+    dot_input_from['label'].setValue('dot_input_from__')
248 341
     #dot_input_from['note_font_size'].setValue(25)
249 342
 
250 343
     # contact_sheet_all
251 344
     contact_sheet_all = nuke.nodes.LayerContactSheet(xpos=merge_plus.xpos() +250 , ypos=merge_plus.ypos() + 200)
252 345
     contact_sheet_all['name'].setValue('contact_sheet__')
346
+    contact_sheet_all['label'].setValue('contact_sheet__')
253 347
 
254 348
     # switch
255 349
     switch = nuke.nodes.Switch(xpos=merge_plus.xpos() , ypos=merge_plus.ypos() + V_OFFSET)
256 350
     switch['name'].setValue('switch__')
351
+    switch['label'].setValue('switch__')
352
+
353
+    # premult
354
+    premult = nuke.nodes.Premult(xpos=switch.xpos()+50 , ypos=switch.ypos() )
355
+    #premult['name'].setValue('premult_node__')
356
+    premult['label'].setValue('premult_node__')
257 357
 
258 358
     # dot output
259 359
     dot_output = nuke.nodes.Dot(xpos=dot_input.xpos() , ypos=dot_input.ypos() + V_OFFSET)
260 360
     dot_output['name'].setValue('dot_output__')
261
-    dot_output['label'].setValue('[value name]')
361
+    dot_output['label'].setValue('dot_output__')
262 362
     #dot_output['note_font_size'].setValue(25)
263 363
 
264 364
     # create new nodes
@@ -276,6 +376,8 @@ def updatePattern(n):
276 376
                 shuffle['in2'].setValue('rgba')
277 377
                 shuffle['out'].setValue('rgb')
278 378
                 shuffle['name'].setValue('shuffle__' + str(i))
379
+                # set label of aov
380
+                shuffle['label'].setValue(resolved[i - 1] + '__')
279 381
                 # connect to the dot dot_input
280 382
                 shuffle.setInput(0, dot_input)
281 383
 
@@ -284,6 +386,7 @@ def updatePattern(n):
284 386
                     merge_resolved = nuke.nodes.Merge2(xpos=dot_input.xpos(), ypos=dot_output.ypos() + 50)
285 387
                     merge_resolved['operation'].setValue("plus")
286 388
                     merge_resolved['name'].setValue("merge_resolved__")
389
+                    merge_resolved['label'].setValue("merge_resolved__")
287 390
 
288 391
                 # connect plus
289 392
                 # skip Mask Input
@@ -297,7 +400,8 @@ def updatePattern(n):
297 400
                 j += 1
298 401
 
299 402
             # connect to the input1 node
300
-            dot_resolved.setInput(0, merge_resolved)
403
+            unpremult.setInput(0,merge_resolved)
404
+            dot_resolved.setInput(0, unpremult)
301 405
 
302 406
     else:
303 407
         # shuffle
@@ -307,6 +411,7 @@ def updatePattern(n):
307 411
         shuffle['in2'].setValue('none')
308 412
         shuffle['out'].setValue('rgb')
309 413
         shuffle['name'].setValue('shuffle_empty__')
414
+        shuffle['label'].setValue('shuffle_empty__')
310 415
 
311 416
         shuffle.setInput(0, dot_input)
312 417
 
@@ -317,23 +422,24 @@ def updatePattern(n):
317 422
         # connect to the input1 node
318 423
         dot_resolved.setInput(0, shuffle)
319 424
 
320
-
321 425
     # connect the nodes
322 426
     dot_input.setInput(0, input)
323 427
     dot_input2.setInput(0, dot_input)
324 428
     dot_input_from.setInput(0, merge_from)
325 429
     dot_resolved2.setInput(0, dot_resolved)
326 430
     dot_resolved3.setInput(0, dot_resolved2)
327
-    merge_plus.setInput(1, grade)
431
+    merge_plus.setInput(1, saturation)
328 432
     merge_plus.setInput(0, dot_input_from)
329 433
     grade.setInput(0, exposure)
434
+    saturation.setInput(0, grade)
330 435
     exposure.setInput(0, dot_resolved)
331 436
     merge_from.setInput(0, dot_input2)
332 437
     merge_from.setInput(1, dot_resolved)
333 438
     contact_sheet_all.setInput(0, dot_input2)
334
-    switch.setInput(0, merge_plus)
439
+    switch.setInput(0, premult)
335 440
     switch.setInput(1, contact_sheet_all)
336 441
     switch.setInput(2, dot_resolved3)
442
+    premult.setInput(0,merge_plus)
337 443
     dot_output.setInput(0,switch)
338 444
     output.setInput(0, dot_output)
339 445
 
@@ -343,15 +449,36 @@ def updatePattern(n):
343 449
     exposure['red'].setExpression('parent.exposure')
344 450
     exposure['green'].setExpression('parent.exposure')
345 451
     exposure['blue'].setExpression('parent.exposure')
346
-    # init
452
+    unpremult['disable'].setExpression('parent.unpremult == 1 ? 0 :1')
453
+    premult['disable'].setExpression('parent.unpremult == 1 ? 0 :1')
454
+
347 455
     grade['multiply'].setValue([1,1,1,1])
348 456
     grade['multiply'].setExpression('parent.multiply.r',0)
349 457
     grade['multiply'].setExpression('parent.multiply.g',1)
350 458
     grade['multiply'].setExpression('parent.multiply.b',2)
351
-    grade['multiply'].setValue(1, 3)
352
-    # enable Compensate Mult by default
459
+
460
+    grade['blackpoint'].setValue([0,0,0,0])
461
+    grade['blackpoint'].setExpression('parent.blackpoint.r',0)
462
+    grade['blackpoint'].setExpression('parent.blackpoint.g',1)
463
+    grade['blackpoint'].setExpression('parent.blackpoint.b',2)
464
+
465
+    grade['whitepoint'].setValue([1,1,1,1])
466
+    grade['whitepoint'].setExpression('parent.whitepoint.r',0)
467
+    grade['whitepoint'].setExpression('parent.whitepoint.g',1)
468
+    grade['whitepoint'].setExpression('parent.whitepoint.b',2)
469
+
470
+    grade['black'].setValue([0,0,0,0])
471
+    grade['black'].setExpression('parent.black.r',0)
472
+    grade['black'].setExpression('parent.black.g',1)
473
+    grade['black'].setExpression('parent.black.b',2)
474
+
475
+    grade['white'].setValue([1, 1, 1, 1])
353 476
     grade['white'].setExpression('parent.compensate == 1 ? 1/((parent.multiply.r+parent.multiply.g+parent.multiply.b)/3) : 1')
477
+    #grade['white'].setExpression(['parent.compensate == 1 ? 1/((parent.multiply.r+parent.multiply.g+parent.multiply.b)/3) : 1,parent.compensate == 1 ? 1/((parent.multiply.r+parent.multiply.g+parent.multiply.b)/3) : 1,parent.compensate == 1 ? 1/((parent.multiply.r+parent.multiply.g+parent.multiply.b)/3) : 1,1'])
354 478
     grade['gamma'].setExpression('parent.gamma')
479
+
480
+    saturation['saturation'].setExpression('parent.saturation')
481
+
355 482
     contact_sheet_all['width'].setExpression('parent.width')
356 483
     contact_sheet_all['height'].setExpression('parent.height')
357 484
     contact_sheet_all['showLayerNames'].setValue(1)
@@ -360,21 +487,24 @@ def updatePattern(n):
360 487
     switch['which'].setExpression('parent.mode == 0 ? 0 :(parent.mode == 1 ? 2 : 1)')
361 488
 
362 489
     # arrange the nodes
363
-    weird_dot_offset = 0
364
-    dot_input.setXYpos(input.xpos()+weird_dot_offset, input.ypos() + 100)
490
+    dot_input.setXYpos(input.xpos(), input.ypos() + 100)
365 491
     if merge_resolved:
366 492
         merge_resolved.setXYpos(input.xpos(), input.ypos() + 350)
367
-    dot_resolved.setXYpos(input.xpos()+weird_dot_offset, input.ypos() + 500)
368
-    dot_resolved2.setXYpos(dot_resolved.xpos()-250+weird_dot_offset, dot_resolved.ypos())
369
-    dot_resolved3.setXYpos(dot_resolved2.xpos()+weird_dot_offset, dot_resolved2.ypos() + 500)
493
+        unpremult.setXYpos(merge_resolved.xpos(), merge_resolved.ypos() + 75)
494
+
495
+    dot_resolved.setXYpos(input.xpos(), input.ypos() + 500)
496
+    dot_resolved2.setXYpos(dot_resolved.xpos()-250, dot_resolved.ypos())
497
+    dot_resolved3.setXYpos(dot_resolved2.xpos(), dot_resolved2.ypos() + 500)
370 498
     exposure.setXYpos(dot_resolved.xpos(), dot_resolved.ypos()+150)
371 499
     grade.setXYpos(exposure.xpos(), exposure.ypos() + 150)
372
-    merge_plus.setXYpos(grade.xpos(), grade.ypos() + 150)
373
-    switch.setXYpos(merge_plus.xpos(), merge_plus.ypos() + 150)
374
-    dot_output.setXYpos(switch.xpos()+weird_dot_offset, switch.ypos() + 150)
500
+    saturation.setXYpos(grade.xpos(), grade.ypos() + 150)
501
+    merge_plus.setXYpos(saturation.xpos(), saturation.ypos() + 150)
502
+    premult.setXYpos(merge_plus.xpos(), merge_plus.ypos() + 75)
503
+    switch.setXYpos(premult.xpos(), premult.ypos() + 150)
504
+    dot_output.setXYpos(switch.xpos(), switch.ypos() + 150)
375 505
     output.setXYpos(dot_output.xpos(), dot_output.ypos() + 150)
376 506
     merge_from.setXYpos(dot_input2.xpos(), dot_resolved.ypos())
377
-    dot_input_from.setXYpos(merge_from.xpos()+weird_dot_offset, merge_plus.ypos())
507
+    dot_input_from.setXYpos(merge_from.xpos(), merge_plus.ypos())
378 508
 
379 509
     n['label'].setValue('[value pattern]')
380 510
     return None

+ 3
- 2
pythonpluginsUI/denoice/denoice.py Näytä tiedosto

@@ -42,7 +42,7 @@ class denoice(KellerNukePlugin):
42 42
 # GLOBALS
43 43
 #
44 44
 #######################################################################################
45
-DISABLE_AOVS = ['default', 'variance', 'Matte', 'matte', 'Crypto', 'crypto', 'denoise_albedo']
45
+DISABLE_AOVS = ['albedo', 'default', 'variance', 'Matte', 'matte', 'Crypto', 'crypto', 'denoise_albedo', 'P', 'N', 'Z']
46 46
 # Muster
47 47
 MSTRSERVER = "192.168.0.251"
48 48
 SUBMISSION_USER ="admin"
@@ -230,7 +230,8 @@ class denoicePanel(nukescripts.PythonPanel):
230 230
         self.addKnob(self.div5)
231 231
 
232 232
         # window
233
-        height = len(self.layerKnobs) * 20
233
+        #height = len(self.layerKnobs) * 20
234
+        height = 1200
234 235
         width = 800
235 236
         #if height > 1200:
236 237
         #    width = 700

+ 1
- 1
pythonpluginsUI/layoutNodes/layoutNodes.py Näytä tiedosto

@@ -23,7 +23,7 @@ def doLayoutNodes():
23 23
             dist = sel[len(sel) - 1].xpos() - sel[len(sel) - 2].xpos()
24 24
             #print "LayoutNodes: Offset %s Pixels" % dist
25 25
         offset = dist
26
-        fac = 1.15
26
+        fac = 1.05
27 27
         i = 0
28 28
         for node in sel:
29 29
             if i == 0:

+ 12
- 12
pythonpluginsUI/nukeffmpeg/Preview_QT.nk Näytä tiedosto

@@ -3,11 +3,11 @@ version 12.2 v5
3 3
 push $cut_paste_input
4 4
 Group {
5 5
  name Preview_QT
6
- tile_color 0xbfbf00ff
6
+ tile_color 1
7 7
  label "h264 intra\n\[value nodeLabel]"
8 8
  selected true
9
- xpos 151
10
- ypos 68
9
+ xpos -5
10
+ ypos -51
11 11
  addUserKnob {20 ffmpeg}
12 12
  addUserKnob {35 presets M {"Prores 422" "knobs this \{ffmpeg_args \"-c:v prores_ks -profile:v 2 -qscale:v 7 -pix_fmt yuv444p10le -r 24 -vf colormatrix=bt601:bt709 -vendor ap10 -metadata:s encoder=\\\"Apple ProRes 422\\\"\" framerate 24 label \"Prores 422\\n\[value nodeLabel]\"\}" "Prores 422 HQ" "knobs this \{ffmpeg_args \"-c:v prores_ks -profile:v 3 -qscale:v 7 -pix_fmt yuv444p10le -r 24 -vf colormatrix=bt601:bt709 -vendor ap10 -metadata:s encoder=\\\"Apple ProRes 422 HQ\\\"\" framerate 24 label \"Prores 422 HQ\\n\[value nodeLabel]\"\}" "Prores 4444" "knobs this \{ffmpeg_args \"-c:v prores_ks -profile:v 4 -qscale:v 5 -pix_fmt yuv444p10le -r 24 -vf colormatrix=bt601:bt709 -vendor ap10 -metadata:s encoder=\\\"Apple ProRes 4444\\\"\\\"\" framerate 24 label \"Prores 4444\\n\[value nodeLabel]\"\}" "DNxHD 36" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p -b:v 36M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 36\\n\[value nodeLabel]\"\}" "DNxHD 115" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p -b:v 115M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 115\\n\[value nodeLabel]\"\}" "DNxHD 175" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p -b:v 175M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 175\\n\[value nodeLabel]\"\}" "DNxHD 175 10bit" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p10 -b:v 175M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 175 10bit\\n\[value nodeLabel]\"\}" "DNxHD 220 10bit" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhd -pix_fmt yuv422p10 -b:v 220M -vf \\\"scale=1920:1080,fps=24000/1001,colormatrix=bt601:bt709\\\"\" framerate 23.976 label \"DNxHD 220 10bit\\n\[value nodeLabel]\"\}" "DNxHR HQ" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -vf \\\"colormatrix=bt601:bt709\\\"\" framerate 24 label \"DNxHR HQ\\n\[value nodeLabel]\"\}" "DNxHR HQX" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhr_hqx -pix_fmt yuv422p10le -vf \\\"colormatrix=bt601:bt709\\\"\" framerate 24 label \"DNxHR HQX\\n\[value nodeLabel]\"\}" "DNxHR 444" "knobs this \{ffmpeg_args \"-c:v dnxhd -profile:v dnxhr_444 -pix_fmt yuv444p10le -vf \\\"colormatrix=bt601:bt709\\\"\" framerate 24 label \"DNxHR 444\\n\[value nodeLabel]\"\}" "h264 standard" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high -crf 15 -preset slow -tune film -pix_fmt yuv420p -g 4 -bf 2 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 standard\\n\[value nodeLabel]\"\}" "h264 intra" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high -crf 12 -preset slow -tune film -pix_fmt yuv420p -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 intra\\n\[value nodeLabel]\"\}" "h264 intra 444" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high444 -crf 12 -preset slow -tune film -pix_fmt yuv444p -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 intra 444\\n\[value nodeLabel]\"\}" "h264 intra 444 10bit" "knobs this \{ffmpeg_args \"-c:v libx264 -profile:v high444 -crf 12 -preset slow -tune film -pix_fmt yuv444p10le -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h264 intra 444 10bit\\n\[value nodeLabel]\"\}" "h265 standard 10bit" "knobs this \{ffmpeg_args \"-c:v libx265 -profile:v main10 -crf 15 -preset slow -tune psnr -pix_fmt yuv420p10le -g 2 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h265 standard 10bit\\n\[value nodeLabel]\"\}" "h265 intra 422 10bit" "knobs this \{ffmpeg_args \"-c:v libx265 -profile:v main422-10-intra -crf 12 -preset slow -tune psnr -pix_fmt yuv422p10le -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h265 intra 10bit\\n\[value nodeLabel]\"\}" "h265 intra 444 10bit" "knobs this \{ffmpeg_args \"-c:v libx265 -profile:v main444-10-intra -crf 12 -preset slow -tune psnr -pix_fmt yuv444p10le -g 1 -bf 0 -vf colormatrix=bt601:bt709\" framerate 24 label \"h265 intra 444 10bit\\n\[value nodeLabel]\"\}"}}
13 13
  addUserKnob {1 ffmpeg_args l "ffmpeg args"}
@@ -15,8 +15,8 @@ Group {
15 15
  addUserKnob {26 ""}
16 16
  addUserKnob {1 info t "Additional non-mandatory File Info"}
17 17
  addUserKnob {2 file t "output file"}
18
- file "\$env(PROJECT_ROOT_3D)/550_previewQTs/HOT_comp_001_010.comp_v001/HOT_comp_001_010.comp_v001.mov"
19
- addUserKnob {22 setfilepath l "Set Filepath" t "Creates a valid filename.\nUses the main task of SceneControl and points to the PreviewQT Dir." T "n = nuke.thisNode()\ninfo = n\['info'].value()\nffmpeg_args = n\['ffmpeg_args'].value()\n\nif 'dnxhd' in ffmpeg_args:\n    extension = 'mov'\nif 'libx264' in ffmpeg_args:\n    extension = 'mp4'\nif 'libx265' in ffmpeg_args:\n    extension = 'mp4'\nif 'prores' in ffmpeg_args:\n    extension = 'mov'\n\noutputpath = sceneControl.kenvQuery('PREVIEW_QT_FILE', minor_version=None, info=info, ext=extension)\n\nn.knobs()\[\"file\"].setValue(outputpath)\n\n# create label for displaying the generated output\n# autoLabel = \"n.name() + '\\\\n' +n\['file'].value().split('/')\[-1] +  '\\\\n' + n\['label'].value()\"\n# n\['autolabel'].setValue(autoLabel)" +STARTLINE}
18
+ file //calculon/o/_projekte/HOTZ/550_previewQTs/010/010/HOT_comp_010_010.comp_v001/HOT_comp_010_010.comp_v001.mp4
19
+ addUserKnob {22 setfilepath l "Set Filepath" t "Creates a valid filename.\nUses the main task of SceneControl and points to the PreviewQT Dir." T "n = nuke.thisNode()\ninfo = n\['info'].value()\nffmpeg_args = n\['ffmpeg_args'].value()\n\nif 'dnxhd' in ffmpeg_args:\n    extension = 'mov'\nif 'libx264' in ffmpeg_args:\n    extension = 'mp4'\nif 'libx265' in ffmpeg_args:\n    extension = 'mp4'\nif 'prores' in ffmpeg_args:\n    extension = 'mov'\n\noutputpath = sceneControl.kenvQuery('PREVIEW_QT_FILE', minor_version=None, info=info, ext=extension, USE_ENV_PROJECTROOT=False)\n\nn.knobs()\[\"file\"].setValue(outputpath)\n\n# create label for displaying the generated output\n# autoLabel = \"n.name() + '\\\\n' +n\['file'].value().split('/')\[-1] +  '\\\\n' + n\['label'].value()\"\n# n\['autolabel'].setValue(autoLabel)" +STARTLINE}
20 20
  addUserKnob {26 ""}
21 21
  addUserKnob {1 burnNameText l burn-in}
22 22
  burnNameText "\[python \{nuke.thisNode().knobs()\['file'].value().split('/')\[-1].replace('.mp4','').replace('.mov','')\}]"
@@ -41,7 +41,7 @@ Group {
41 41
  addUserKnob {7 framerate R 23 30}
42 42
  framerate {{"\[python \{nuke.root().knobs()\['fps'].value()\}]"}}
43 43
  addUserKnob {1 framerange -STARTLINE}
44
- framerange 1001-1109
44
+ framerange 1001-1024
45 45
  addUserKnob {22 set_framerange l "Set to Input" -STARTLINE T "n = nuke.thisNode()\nfr = n.frameRange()\nn\['framerange'].setValue(\"\{0\}-\{1\}\".format(fr.first(), fr.last()))"}
46 46
  addUserKnob {22 set_sc_framerange l "Set Framerange" t "Set framerange from SceneControl." -STARTLINE T "c = nuke.exists(\"sceneCtrl\")\nif c:\n    sc = nuke.toNode('sceneCtrl')\n    \n    n = nuke.thisNode()\n    n\['framerange'].setValue(\"\{0\}-\{1\}\".format(int(sc.knobs()\['fStart'].getValue()), int(sc.knobs()\['fEnd'].getValue())))\nelse:\n    print('No SceneControl found.')\n"}
47 47
  addUserKnob {22 render l Render t "Saves your scene and renders.\nSee the progress in the Nuke Console Window." T "import ffmpeg_render\nffmpeg_render.prep()" +STARTLINE}
@@ -59,13 +59,13 @@ Group {
59 59
   xpos -6
60 60
   ypos -16
61 61
  }
62
-set N7f514400 [stack 0]
62
+set N4966fc00 [stack 0]
63 63
  Text2 {
64 64
   font_size_toolbar 100
65 65
   font_width_toolbar 100
66 66
   font_height_toolbar 100
67 67
   message "\[value parent.burnNameText]"
68
-  old_message {{72 79 84 95 99 111 109 112 95 48 48 49 95 48 49 48 46 99 111 109 112 95 118 48 48 49}
68
+  old_message {{72 79 84 95 99 111 109 112 95 48 49 48 95 48 49 48 46 99 111 109 112 95 118 48 48 49}
69 69
     }
70 70
   old_expression_markers {{0 25}
71 71
     }
@@ -88,7 +88,7 @@ set N7f514400 [stack 0]
88 88
   xpos -163
89 89
   ypos -19
90 90
  }
91
-push $N7f514400
91
+push $N4966fc00
92 92
  Switch {
93 93
   inputs 2
94 94
   which {{"\[value parent.burnName]"}}
@@ -101,13 +101,13 @@ push $N7f514400
101 101
   xpos -6
102 102
   ypos 79
103 103
  }
104
-set N434f7400 [stack 0]
104
+set N4966f000 [stack 0]
105 105
  Text2 {
106 106
   font_size_toolbar 100
107 107
   font_width_toolbar 100
108 108
   font_height_toolbar 100
109 109
   message "\[format %04s \[frame]]"
110
-  old_message {{48 48 48 49}
110
+  old_message {{49 48 50 52}
111 111
     }
112 112
   old_expression_markers {{0 3}
113 113
     }
@@ -135,7 +135,7 @@ set N434f7400 [stack 0]
135 135
   xpos -164
136 136
   ypos 76
137 137
  }
138
-push $N434f7400
138
+push $N4966f000
139 139
  Switch {
140 140
   inputs 2
141 141
   which {{"\[value parent.burnFrame]"}}

Loading…
Peruuta
Tallenna