Hi, 1/ use a python function to create your gizmo, your function will do what you wrote in the second part of your email. create the gizmo, get his name and assign it to the value of input process.
2/ my first though is that Nuke creates your gizmo when reading the menu.py. but when Nuke loads the template.nk it might overwrite your gizmo with a fresh new script, eg the template this is probably why it works in the script editor, but not on nuke launch. you could edit the template.nk, or put a template.nk file somewhere around you custom *py files to get what you want. you could also dig into callbacks. Hope that helps. Regards. Aurélyen Daudet - Enseignement Nuke & Compositing adau...@artfx.fr - http://www.artfx.fr - http://blog.artfx.fr On Fri, Apr 26, 2013 at 5:45 PM, Alex Harding <alex...@moving-picture.com>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 > > _______________________________________________ > 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 > >
<<signature_artfx.png>>
_______________________________________________ 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