Hi Adam,
to add to what the others already said.
there are two methods to create nodes inside nuke.
1.nuke.nodes.Node(**kwargs)
2.nuke.createNode('Node')
the second method will respect your knobDefaults and also attempt to
place and connect the node being created in the DAG as though it would
be done by a user.
the first method wont respect your knobDefaults, but you can pass any
knob information as kwargs. the node wont be placed in relation to your
other nodes and wont be connected if a node is still selected.
Though all of this can be done with setting the input and the postion on
creation or afterwards through python
x = nuke.selectedNode()
blur1 = nuke.createNode('Blur', 'size 10 filter triangle')
blur2 =
nuke.nodes.Blur(size=10,filter='triangle',xpos=x.xpos()+100,ypos=x.ypos()+20)
blur2.setInput(0,x)
In the preferences under the script editor pane you can "echo" all nuke
internal python in the script editors output. That often helps to
understand which modules are used.
So it all depends what you are after.
The for getting Values there are 3 methods .getValue() .value() and
.evaluate()
.evaluate() will evaluate expressions on file knobs or %V or %04d into
left 1002 (just as an example) only available on file knobs ?
.getValue() will return the index for a combobox
.value() will return the "content" of the combobox
Hope this helps
Cheers
Johannes
Am 1/12/16 um 12:29 PM schrieb adam jones:
hey all
I have half of this read from write working.
the line of code I am having trouble with is
/nuke.createNode("OCIOColorSpace").knob('in_colorspace').setValue('sRGB')
this bit works but I can't set a secong knob value/
/
/
I wish to also set the/out_colorspace /value but can't work out how to
do it,
also I am doing a getValue() from a write node but a file dialog comes
up which needs clicking of "open" for the read node how do I get
around this.
I am trying my best to learn this from my own trial and error but just
can't find any thing to help me with it.
and is there a way to get more explicit echoing of actions performed
in nuke?
awesome cheers
regards
-adam
____ ESET 12854 (20160112) ____
The message was checked by ESET Mail Security.
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
____ ESET 12854 (20160112) ____
The message was checked by ESET Mail Security.
--
STUDIO RAKETE GmbH
Johannes Hezer, Compositing TD & Stereoscopic SV
Schomburgstr. 120
D - 22767 Hamburg
j.he...@studiorakete.de
Tel:+49 (0)40 - 380 375 69 - 0
Fax:+49 (0)40 - 380 375 69 - 99
------------------------------------------------------
Pflichtangaben laut Handelsgesetzbuch und GmbH-Gesetz:
STUDIO RAKETE GmbH
Schomburgstr. 120 D - 22767 Hamburg
www.studiorakete.de / i...@studiorakete.de
Geschaeftsfuehrer: Jana Bohl
Die Gesellschaft ist eingetragen im Handelregister des
Amtsgerichts Hamburg unter der Nummer HR B 95660
USt.-ID Nr.: DE 245787817
____ ESET 12856 (20160112) ____
The message was checked by ESET Mail Security.
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users