To clarify some more, the Obsolete_Knob named 'transfer' actually exists on a
base Write node before any FileWriter plugin is loaded, so it ends up masking
the one the dpxWriter creates for the purposes of .knob() and __getitem__
lookups.
However, this oddity is also masking an issue similar to what Julik mentioned.
Because setting the 'file_type' knob is what triggers the creation of the
format-specific knobs, and because all of the knob value kwargs are applied all
at once at creation, there is never a chance for the Write to actually create
the format-specific knobs. If this issue with the 'transfer' knob wasn’t
present, you would likely get a LookupError indicating that the 'transfer' knob
could not be found (you can see what I mean if you try to set the 'datatype'
knob via a kwarg to nuke.nodes.Write).
As he mentioned, you should set up any format-specific knobs separately after
the node has been created if you’re using nuke.nodes.Write. Alternatively,
using nuke.createNode *will* allow you to pass these knob values in at creation
time.
-Nathan
From: Miquel Campos
Sent: Monday, January 28, 2013 10:10 AM
To: Nuke user discussion
Subject: Re: [Nuke-users] Scripting question
Thank you Nathan I will try it :)
Miquel Campos
SHED
Character & Pipeline TD
2013/1/28 Nathan Rusch <[email protected]>
This is due to an issue with the dpxWriter’s knobs. Specifically, the
'transfer' knob that is returned by the node’s .knob() method or __getitem__
lookup is actually an Obsolete_Knob, so it just eats any value you try to set
on it (logged with The Foundry as bug 28372).
In order to grab the real 'transfer' knob, you have to look it up in the
knobs() dict:
w = nuke.nodes.Write(file_type='dpx', colorspace='sRGB')
w.knobs()['transfer'].setValue('log')
-Nathan
From: Julik Tarkhanov
Sent: Monday, January 28, 2013 7:35 AM
To: Nuke user discussion
Subject: Re: [Nuke-users] Scripting question
I think it's because you are passing a dict of node knob values and they are
applied in an undefined order, so once you change the "format" or such
the transfer gets overridden (even though you've set it to something
previously). Your best bet would be to set them one by one to make sure that
they do not override each other (set the file type first, and then the rest
would by my guess).
On 28 jan. 2013, at 16:02, Bolaf at SHED <[email protected]> wrote:
Once the script is rolled, the resulting WRITE Node still is at transfer:
"auto detect"... ignoring the transfer="log" in my lines.
--
Julik Tarkhanov | HecticElectric | Keizersgracht 736 1017 EX
Amsterdam | The Netherlands | tel. +31 20 330 8250
cel. +31 61 145 06 36 | http://hecticelectric.nl
------------------------------------------------------------------------------
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
--------------------------------------------------------------------------------
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users