You could also, in that function check if there is one node of
that class already in the tree. If its the first one, you can
make it in panel. Else, make it inpanel=false


On Tue, Feb 28, 2012, at 09:25, Diogo Girondi wrote:

You welcome!



Well... you can always replace a menu entry for your own that
runs a custom node creation function.



Like:



toolbar = nuke.menu( 'Nuke' )

menu = toolbar.findItem( 'Time' )
def frameHold():
    frame = nuke.frame()
    nuke.createNode( 'FrameHold', 'first_frame
{0:d}'.format(frame), inpanel=False )
menu.addCommand( 'FrameHold', 'frameHold()' )


diogo
On Tue, Feb 28, 2012 at 8:07 AM, John RA Benson
<[1][email protected]> wrote:

Ok, that did the trick, but it won't help if the node is created
via the interface. So is there a way I can make "inpanel=False"
as a default for a specific node Class (basically, the class
being the gizmo I'm using this on)?
thanks!
JRAB
On 02/28/2012 11:38 AM, Diogo Girondi wrote:

  Don't know if it's related but I've noticed something similar
  on the the Mac release. If I close (command+w) a script with a
  few node panels still open the panels take some time to vanish
  after the new root is created.



Case you don't need the panels opening as workaround you could
simply use inpanel=False to prevent them from opening.



nuke.createNode('Blur', inpanel=False)





diogo
On Tue, Feb 28, 2012 at 7:12 AM, jrab
<[2][email protected]> wrote:

Anyone? Is this just me? Did I miss something simple? Pasting the
code above into the script editor in an empty script and creating
2 blur nodes will demonstrate.
I thought it might have to do with context, but tossing in a
nuke.root().begin() didn't make a difference either. Stumped.
jrab

  _______________________________________________
  Nuke-python mailing list
  [3][email protected],
  [4]http://forums.thefoundry.co.uk/
  [5]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nu
  ke-python





  _______________________________________________ Nuke-python
  mailing list [6][email protected],
  [7]http://forums.thefoundry.co.uk/
  [8]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nu
  ke-python

  _______________________________________________ Nuke-python
  mailing list [9][email protected],
  [10]http://forums.thefoundry.co.uk/
  [11]http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/n
  uke-python

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

References

1. mailto:[email protected]
2. mailto:[email protected]
3. mailto:[email protected]
4. http://forums.thefoundry.co.uk/
5. http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
6. mailto:[email protected]
7. http://forums.thefoundry.co.uk/
8. http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
9. mailto:[email protected]
  10. http://forums.thefoundry.co.uk/
  11. http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python


-- 
  Hugo Léveillé
  TD Compositing, Vision Globale
  [email protected]

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

Reply via email to