I have a function which adds a label to certain nodes in my script. This 
changes their height and causes them to shift out of position, so I would like 
to automatically reposition them to align with the other nodes.

The problem I'm having is that querying node.screenHeight() before adding the 
label and then again after in the same function, or even calling to a different 
function, returns the same result. 

I'm guessing it may be a case where the values update during 'idle' time so 
they won't update while the function is still processing. This seems to be 
confirmed by the fact that when I manually run the part of the code querying 
the new height after the function has run, it returns the correct updated 
value. 

I have a few hacky ideas to work around it, potentially using a callback to 
call a function after the labels have been added or something. 

I've run into this before and am not sure if it is a bug or working as 
intended. Wondering if anyone has any thoughts on this.



_______________________________________________
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