State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:269203|
Problem summary
Nuke won't terminal / batch render if the Viewer is using a custom guide
Customer reported version
nuke.9.0v8
Customer reported platform
windows7
Steps to reproduce
1) Copy the attached custom_guides.py to your .nuke directory
2) Open Nuke
3) Create a CheckerBoard node
4) Attach a Write node and set the file knob to null.null
5) In the Viewer, set the masking_ratio knob to 1:2.39 and save the script
6) Render the script from a terminal/command window using the below command:
<NukePath>/NukeVersion -F 1 -x <path/to/script.nk>
Viewer1.masking_ratio: Bad value for masking_ratio : 7
2)Create an onCreate callback which manually adds the masking ratios to the Viewer nodes
def OnViewerCreate():
node = nuke.thisNode()
knob = node['masking_ratio']
allvalues = knob.values() + ['2.39\t2.39:1'] ### Add custom masking ratio and ratio name
knob.setValues(allvalues)
knob.setValue('2.39') ### Set to desired masking ratio
### The above line will set the masking ratio for all viewers the that masking ratio when creating Viewer nodes, disable it if undesired
nuke.addOnCreate(OnViewerCreate, nodeClass="Viewer")
import custom_guides
custom_guides.viewer_masks.append(custom_guides.guides.MaskGuide("2.39:1", 2.39))
Adding the above code to your init.py should set your masking_ratio the desired ratio.
We're sorry to hear that
Please tell us why