Finally got a chance to take a look at this. It seems like you might have to run with some .writeKnobs/.readKnobs hand-offs between the group contents and the script root. Here's a rough example (only partially tested):

import nukescripts
innerNodes = [node for node in nuke.allNodes(group=groupNode) if node.Class() not in ("Input", "Output", "Viewer")]
nukescripts.clear_selection_recursive()
for node in innerNodes:
newNode = nuke.createNode(node.Class(), node.writeKnobs(), inpanel=False)
   newNode.setSelected(False)


-Nathan

-----Original Message----- From: Josh Imbruglia
Sent: Thursday, March 10, 2011 1:39 AM
To: Nuke Python discussion
Subject: [Nuke-python] Expanding groups at terminal

Hi everybody!

I'm trying to write a script to manipulate roto files that have been
exported from silhouette into a '.nk' file.  I'm working with Nuke
6.1, so all of my shapes are placed within group nodes.  In my script,
I recursively expand each group node in the scene.  This expansion
works fine when testing in the gui; however, when I run my script at
the command line, I get the following error:

innerNodes = node.expand()
RuntimeError: Can't expand groups in terminal mode.

Does anybody know a workaround for this problem?

Thanks!
-Josh
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to