i m not sure if there is any nuke user onboard but who ever has knowledge of this please tell me
like we can send command or import script to mayapy test.py
not the topic of the thread but curious is nuke.root()[‘last_frame’].value() be the last frame of the script or the write node , if not how do i get the last frame specified in the write node ?
The root node holds script-wide values. You have to specify the name of the node if you want node-specific values. Nuke doesn’t know what “the write node” is, since you can have multiple write nodes in a scene. Also what do you mean by the last frame in the write node? Are you referring to the frame range limit? Because you only specify the range to render at render time.
For a specific node:
writenode = nuke.toNode(my_write_node)
# Gets the frame range limit
first = writenode['first'].value()
last = writenode['last'].value()
For all write nodes:
writes = {}
for node in nuke.allNodes():
if node.Class() == 'Write':
first = node['first'].value()
last = node['last'].value()
writes[node.name()] = (first, last)