Hi Michael (or anyone else listening),

I have a follow-up question, since I can't seem to figure this out myself…

How do you get the position for a *parent* node that's connected to, say, the B 
input?


Thanks,
Rich


On Dec 9, 2012, at 3:19 PM, michael vorberg <[email protected]> wrote:

> very simple:
> 
> n = nuke.selectedNode()
> print(n.xpos())
> print(n.ypos())
> 
> 
> 
> 
> Am 09.12.2012 21:14, schrieb Richard Bobo:
>> Hi,
>> 
>> I'm putting together a function that creates an automatic EXR passes comp, 
>> which uses the "autoComp" example as a starting point: 
>> http://docs.thefoundry.co.uk/nuke/63/pythondevguide/channels.html?highlight=exr
>> 
>> I'm all done with the function - it does exactly what I want it to… However, 
>> I'd like to "prettify" the resulting schematic layout with regular 
>> alignments and spacing. I know that I can add arguments for each node that 
>> I'm creating that sets absolute "xpos" and "ypos" locations. However, I'd 
>> really like for the values to be *relative* to the selected Read node, which 
>> is the root for creating the comp.
>> 
>> I'm guessing that I could do something like this:
>> 
>> 1) Manually arrange the nodes to my liking…
>> 2) Copy/Paste those nodes into a text editor to display each node's absolute 
>> x & y position…
>> 3) In my Python code, do something to find the selected Read node's x & y 
>> position and then do some math to offset each created node, based on my 
>> manual positioning values and the selected Read node's starting point.
>> 
>> Does anyone know how to get the selected Read node's position? And, does 
>> this sound like a good way to go about it - or is there a better way…?
>> 
>> Thanks for any help,
>> 
>> Rich
>> 
>> 
>> Rich Bobo
>> Senior VFX Compositor
>> Armstrong-White
>> http://armstrong-white.com/
>> 
>> Email:  [email protected]
>> Mobile:  (248) 840-2665
>> Web:  http://richbobo.com/
>> 
>> "Few will have the greatness to bend history itself, but each one of us can 
>> work to change a small portion of events, and in the total of all those acts 
>> will be written the history of this generation."
>> - Robert F. Kennedy
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
> 
> _______________________________________________
> Nuke-users mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

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

Reply via email to