Unsetting the input isn’t enough if the selected node is in the middle of a
tree. An easy solution is to just call extractSelected immediately after
creation.
n = nuke.createNode('myClass')
nuke.extractSelected()
n.setSelected(False) # If you want
-Nathan
From: Hugo Léveillé
Sent: Friday, July 27, 2012 9:30 AM
To: PYTHON (nuke) discussion
Subject: Re: [Nuke-python] Re: return if value is a string, boolean, or
otherwise?
You could use the nuke.createNode method while disconnecting the node afterward
myClass = "Blur"
n = nuke.createNode(myClass)
n.setInput(0,None)
would that do the trick ?
On Fri, Jul 27, 2012, at 11:42, ae.branton wrote:
Youre killing it. This is the last thing i need, ive built the rest, and used
your help to grab the things i couldnt quite syntax properly. Got to call on
you one last time... and i know its going to be like a bracket or something im
missing lol.
I want to create a node thats not connected to anything. I know you can do so
with.
nuke.nodes.Blur(inpanel = False)
but i have a name for it, ie:
selClass = nuke.thisNode()['selClass'].value()
tempNode = nuke.createNode(selClass, inpanel = False)
tempNode
however if i try and do that by going:
selClass = nuke.thisNode()['selClass'].value()
tempNode = nuke.nodes.selClass(inpanel = False)
tempNode
it fails.
Wondering if theres a way to use what i have already but something to slide
into the bracket that will create the node individual from everything else, or
if theres a way to use nuke.nodes.(mydefinehere)
Thanks so much!
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--
Hugo Léveillé
TD Compositing, Vision Globale
[email protected]
--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python