Just check the 'raw' knobs on both the Read and Write nodes and skip the rest.
-Nathan From: radvfx Sent: Monday, April 22, 2013 12:15 PM To: nuke-python@support.thefoundry.co.uk Subject: [Nuke-python] Re: Get colorspace of read problem I'm trying to write a conversion script that does not assume input or output colorspace values. I just want to keep the values the same. So, I would like to set colorspace to what the Read node sets it to be by default. I have no trouble setting a colorspace value... out=nuke.node.Write() out[ 'colorspace' ].setValue( cSpace ) BUT... I have a real problem setting 'cSpace' from the read node. colorspace is a knob on a Read node. r=nuke.selectedNode() print r I get... file foo.exr cacheLocal auto format "4096 4096 0 0 4096 4096 1 " proxy "" proxy_format "2048 2048 0 0 2048 2048 1 SQ2K" first 1 before hold last 1 after hold frame_mode expression frame "" origfirst 1 origlast 1 origset true on_error error version 0 colorspace linear ## [<---!] premultiplied false raw false auto_alpha false offset_negative_display_window true disable_mmap false noprefix false sequence "" edit_num 0 timecode "" edge_code "" So, the knob is there. BUT... If I try to set the cSpace variable... read=nuke.nodes.Read() read[ 'file' ].setValue( "foo.exr" ) cSpace = read.colorspace().name() OR... cSpace = read.colorspace().value() OR... cSpace = read.colorspace() print cSpace I get this error... Traceback (most recent call last): File"", line 2, in AttributeError: 'Node' object has no attribute 'colorspace. ------------- So, why can you get a successful query on whether the node exists, but you can set a value for it? First time I've seen this. Thanks. - Jim -------------------------------------------------------------------------------- _______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python