FWIW - I've been using
nukescripts.node_delete(popupOnError=True)
Howard
>________________________________
> From: jrab <[email protected]>
>To: [email protected]
>Sent: Friday, 24 February 2012, 10:18
>Subject: [Nuke-python] Property Panel being left open after node delete
>
>
>Hey there -
>I've got a really weird thing that seems like a bug but I wanted to see if
>anyone here has any ideas. I'm trying to make sure that only one instance of a
>node is created in a script. If the user has 2 of these gizmos, things can get
>screwed up. So:
>
>
>Code:
>
>def ensureOnlyOne():
> n = nuke.thisNode()
> nuke.tprint('NODENEAME: %s' % n.name())
> if len(nuke.allNodes(filter='Blur', group=nuke.root()))>1:
> nuke.tprint('DELETING: %s' % n.name())
> nuke.delete(n)
>
>nuke.addOnCreate(ensureOnlyOne, nodeClass='Blur')
>
>
>That should work, right? Create a Blur, then create the next one and it should
>delete itself. It does work, except it leaves the properties panel open of
>the deleted node - but the new node doesn't exist any more! Putting something
>like:
>nuke.tprint('ARE YOU STILL ALIVE? %s' % n.name())
>after the delete will of course fail because n doesn't exist (the delete
>worked), but it still pooped out a properties panel that didn't go away. Why
>isn't the panel getting destroyed when the node gets destroyed?
>
>This is driving me nuts. Any suggestions out there?
>
>thanks
>JRAB
>_______________________________________________
>Nuke-python mailing list
>[email protected], http://forums.thefoundry.co.uk/
>http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
>_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python