python script button

Hi Guys,

I’m just finding my way around python scripting and cant get this simple problem solved. any help would be great.

I have made a group, and I am adding some custom control knobs and buttons to later create a distributed gizmo – pretty simple stuff.

I have made a user python script button (on the group) to create a couple of nodes (write nodes).

eg.
proxywriter = nuke.createNode("Write") proxywriter.knob("name").setValue("ProxyWriter")
etc. etc. etc

when i run the script from the script editor it works fine, but when i run it from a custom python button, it creates the node within the group – NOT in the main node graph.

how do i specify that the nodes are made in the main node graph, not the group the buttons are attached to?

Thanks in advance
Matt

No Responses to “python script button”

Post a Comment