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 
Sent: Monday, October 21, 2013 11:06 AM
To: Nuke Python discussion 
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 
Sent: Friday, October 18, 2013 8:55 AM
To: 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

 
--------------------------------------------------------------------------------
_______________________________________________
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
_______________________________________________
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