State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:368676|
Problem summary
Within Nuke, setting Write node codecs on new nodes by dropdown name, does not work for all codecs.
For example, copy/pasting the following Write node into the Node Graph with a codec set to 'Apple ProRes 4444 XQ', will actually set it to 'Avid DNxHD Codec':
Write {
file_type mov
codec "Apple ProRes 4444 XQ"
name "Write1"
selected true
xpos -84
ypos -440
}
Write {
file_type mov
codec "Apple ProRes 4444"
name "Write1"
selected true
xpos -84
ypos -440
}
Write {
file_type mov
codec "BMP"
name "Write1"
selected true
xpos -84
ypos -440
}
2. Correct codec is added ( Windows 7 & CentOS6.9 Only, exception on Mac10.13 )
3. Exception is thrown on creation, defaults codec
Within the Meta_Codec knob of the Write node, the codecs are listed within an Enumeration knob.
For example, If you would like to set 'Apple ProRes 4444 XQ' as the codec, you need to reference index '7':
Write {
file_type mov
codec 7
name "Write1"
selected true
xpos -84
ypos -440
}
When copying a Write node, it will display the naming scheme Nuke uses for the 'mov' codecs.
For example, 'Apple ProRes 4444 XQ' is actually 'ap4x' when copied.
Using this value will provide the correct codec:
Write {
file_type mov
meta_codec ap4x
name Write1
selected true
xpos -241
ypos -39
}
Adding the following 'addOnUserCreate' callback to your menu.py , will automatically set new Write nodes to 'mov' with the correct codec:
def setCodec():
node = nuke.thisNode()
node.knob('file_type').setValue('mov')
node.showControlPanel() # Update node with 'mov' knobs displayed
node.knob('meta_codec').setValue(7) # Apple ProRes 4444 XQ
nuke.addOnUserCreate(setCodec, nodeClass="Write")
We're sorry to hear that
Please tell us why