You should be able to use: myClass = 'Blur' n = getattr(nuke.nodes, myClass)()
You may want to add creation-time exception handling in the case of bad node classes, but the getattr call will always return a NodeConstructor object, even the if 'myClass' isn’t a valid class. And yes, this works for Gizmos as well. -Nathan From: ae.branton Sent: Friday, July 27, 2012 9:57 AM To: [email protected] Subject: [Nuke-python] Re: return if value is a string, boolean,or otherwise? Thats much close, but still seems to break my chain =( theres no way to nuke.nodes.(variable) ? -------------------------------------------------------------------------------- _______________________________________________ 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
