What Frank said.

You can also check the code for your saved gizmo for xpos and ypos knobs on the 
main Gizmo { bit of the code. 

Depending on how you save these gizmos, these knobs (xpos, ypos) remain in 
there and are respected once you create/add the node. 

As for your second problem what you can do is to grab the xpos and ypos knob 
values after the first node is created and then set the values of these knobs 
with a offset for the remaining nodes. 

But honestly at this point in time, depending on what you're trying to do its 
just simpler to use ToolSets  or use python to paste the contents of a .nk file 
with its root settings stripped. 

Sorry for the first incomplete message. 


Cheers,
Diogo

On 09/11/2011, at 21:08, Frank Rueter <[email protected]> wrote:

> how are you creating those gizmos and how are you calling them in you r 
> menu/py?
> Sounds like the DAG offset is related to one of the above. I've only ever 
> seen this problem with "gizmos" that were actually groups (possibly with a 
> DAG position bakes in) and/or if you are using nuke.nodes.<NodeClass>() in 
> your menu.py instead of nuke.createNode()
> 
> 
> 
> On Nov 9, 2011, at 8:39 PM, thoma wrote:
> 
>> I'm having a recurring problem where I want to access the, lets say, 
>> 'active' DAG position - basically where i last clicked. In practice I want 
>> to click on the DAG and when i create a gizmo via a custom menu or create 
>> nodes via a python script they are positioned at said location. This works 
>> unfailingly with the built-in nodes in nuke but all of my custom gizmos are 
>> created far away from the last clicked position (usually with a constant 
>> offset) How do I access this info via python and how do I make my gizmos 
>> behave like the built-in nodes on creation when it comes to position in the 
>> DAG?
>> 
>> Thanks all,
>> Thomas
>> _______________________________________________
>> 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
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to