There should be an old script of mine on Nukepedia that does this called "split 
layers". 




Cheers,

Diogo

On Mon, Oct 21, 2013 at 7:09 PM, Brandon Harris <brandon.har...@reelfx.com>
wrote:

> node = node_class(**kwargs)
> node.xpos()
> print 'Width!', node.screenWidth()
> 0.0
> Not working for me.  Nuke7.0v8x64 Linux Fedora 17.
> cheers,
> Brandon L. Harris
> ________________________________
> From: nuke-python-boun...@support.thefoundry.co.uk 
> [nuke-python-boun...@support.thefoundry.co.uk] on behalf of Nathan Rusch 
> [nathan_ru...@hotmail.com]
> Sent: Monday, October 21, 2013 2:10 PM
> To: Nuke Python discussion
> Subject: Re: [Nuke-python] Refreshing nuke nodes during a script
> n = nuke.nodes.Read()
> print n.screenWidth(), n.screenHeight()
> # Result:
> 0 0
> n = nuke.nodes.Read()
> n.xpos()
> print n.screenWidth(), n.screenHeight()
> # Result:
> 80 66
> Are you not seeing this same behavior?
> -Nathan
> From: Brandon Harris<mailto:brandon.har...@reelfx.com>
> Sent: Monday, October 21, 2013 11:06 AM
> To: Nuke Python discussion<mailto:nuke-python@support.thefoundry.co.uk>
> Subject: RE: [Nuke-python] Refreshing nuke nodes during a script
> A question.  What if the node is newly created and for some reason has a 
> screenWidth of 0.
> So I'm going
> read = nuke.nodes.Read()
> print read.screenWidth()
> # 0
> Calling the node's xpos() ypos() functions don't seem to impact this.
> cheers,
> Brandon L. Harris
> ________________________________
> From: nuke-python-boun...@support.thefoundry.co.uk 
> [nuke-python-boun...@support.thefoundry.co.uk] on behalf of Nathan Rusch 
> [nathan_ru...@hotmail.com]
> Sent: Friday, October 18, 2013 11:23 AM
> To: Nuke Python discussion
> Subject: Re: [Nuke-python] Refreshing nuke nodes during a script
> Calling .xpos() or .ypos() on each node after making changes that affect its 
> screen width or height will ensure the query methods return properly updated 
> results. This is a workaround to a known bug, logged as #15737.
> -Nathan
> From: Brandon Harris<mailto:brandon.har...@reelfx.com>
> Sent: Friday, October 18, 2013 8:55 AM
> To: 
> nuke-python@support.thefoundry.co.uk<mailto:nuke-python@support.thefoundry.co.uk>
> Subject: [Nuke-python] Refreshing nuke nodes during a script
> I have a tool that is creating and organizing nodes.  I'm taking the channels 
> from an exr and shuffling them out.  The issue I have is that I want to turn 
> on the postage stamp on the shuffle node and this changes the size of the 
> node, but not until after my creation script has finished running.
> This makes my alignment functions not work properly.  Anyway to force nuke to 
> process and redraw that node before the script ends?
> cheers,
> Brandon L. Harris
> [www.freebirdsmovie.com]<http://www.freebirdsmovie.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
> [www.freebirdsmovie.com]<http://www.freebirdsmovie.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
> [www.freebirdsmovie.com]<http://www.freebirdsmovie.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

Reply via email to