Hi all
I'm starting out in python so this is very simple one. I'm trying to write a
simple proc that will create a Card or a Card3D depending on user input. I can
get it to work with nuke.createNode but if the current selection is eg a read
node the card gets connected to it which I don't want.
I know I can create an unconnected node with eg nuke.nodes.Card2() but I want
to pass user input as the class and I can't figure out the syntax.
Can anyone help? Thanks in advance.
##query user for Card or Card3D
type=nuke.getInput('Card or Card3D','Card')
if (type=='card') | (type=='Card'):
cardClass='Card2'
elif (type=='card3D') | (type=='Card3D'):
cardClass='Card3D'
#card=nuke.createNode(cardClass)
card=nuke.nodes...
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python