| 16 August 2010
If you want to add a QuickTime movie to the DAG pythonically, here's a trick for making sure you get the correct format and frame range.
(setValue on the file knob after a node has been created does not work as expected)
1 2 |
filepath = myMov.mov nuke.createNode("Read", "file {"+filePath+"}") |
Comments (3)
Ivan Busquets
said:
|
... Hi Antony, In case it helps in future coding, try the fromUserText() method on the file knob instead of setValue(). That should take care of the format and frame range. Ex. n = nuke.createNode('Read') n['file'].fromUserText('/path/to/your/file.mov') |
Jep Hill
said:
|
... Great tip Ivan — this holds true for RED files as well... Here's a little function that handles it: def movieRead(nodeName,filePath): mov=nuke.nodes.Read(name=nodeName) mov['file'].fromUserText(filePath) Cheers, Jep |
Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.
