i think you first have to create the node and set the file type
to sgi before you can access the datatype knob. so knobDefault fails...
nuke.knobDefault('Write.file_type','sgi')
nuke.knobDefault('Write.datatype','1')
but something like this should work, so you could add that to a callback:
writeSGI=nuke.createNode('Write')
writeSGI['file'].setValue('test.sgi')
writeSGI['file_type'].setValue('sgi')
writeSGI['datatype'].setValue('1')
writeSGI['bigEndian'].setValue(True)
writeSGI['compression'].setValue('none')
or:
writeSGI=nuke.nodes.Write(file='test.sgi', file_type='sgi')
writeSGI['datatype'].setValue('1')
writeSGI['bigEndian'].setValue(True)
writeSGI['compression'].setValue('none')
chris
On 5/14/12 at 6:06 PM, [email protected] (Oliver
Armstrong) wrote:
Hi Everyone,
I am trying to set a default value for write nodes. I need sgi
files to be
created at 16bit by default.
[image: Inline image 2]
Does anyone know the python code for menu.py to get this to happen...?
Thanks
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users