If you want to create a node when nuke starts up you can just save it as
a template.nk.
You can also use a onCreate() callback on Root, in which case you shld
check if the node already exists in the DAG as this will be called when
you load scripts as well.
Afaik you the node has to be present in the DAG for the IP button to
work. Alternatively you can use the viewerInput knob which can use
external gizmos or even have a play with customising the mask/guides
knobs (I haven't used them myself though).
On 27/04/13 03:45, Alex Harding wrote:
Hi,
Is it possible to have a gizmo automatically assigned to the IP button
that isn't visible in the DAG?
If not, is it possible to have nuke create a gizmo on load? I tried
entering the following into the menu.py
### Warning
toolbar = nuke.menu("Nodes")
toolbar.addCommand("Harding/Warning",'nuke.createNode("warning")')
m = nuke.nodes.warning()
viewer = nuke.activeViewer().node()
viewer['input_process'].setValue(True)
viewer['input_process_node'].setValue(m.name())
However the m = nuke.nodes.warning() doesn't work in the menu.py.
All this code does work when you run it in the script editor however.
Cheers,
AH
*MPC NYC*
*Alex Harding | 2D Lead*
434 Broadway, 9th Floor, New York City, 10013*
T* 212.915.3110
*
*
www.moving-picture.com <http://www.moving-picture.com/>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python