Ok, another question.
I have some nodes that I am just adding hotkeys to in my menu.py.
replacing the default menu item using lambda:
like this example from the official nuke python docs.
nuke.menu( 'Nodes' ).addCommand( '3D/Axis', lambda: nuke.createNode(
'Axis2' ), 'a')
However, if I create this node using the new assigned hotkey, it either
places the new created node to the right side of the selected node, oand
with other nodes diagonally down and to the right. If I create the node,
manually, through the tab search or selecting it in node menu, it
creates the node directly under the node I had selected, as I would expect.
Also, related. I have a node that I am redefining, related to my
topnode.tile_color question earlier. I am using a line like this
nuke.menu("Nodes").addCommand("3D/Axis", "newaxis()", "+a")
This is even odder behavior. If I use the hotkey it creates the node
diagonally down to the side of the selected node, like the others. But,
if I create the node manually, it spawns the node in the top Left corner
of my node graph viewer, no matter how zoomed in or out my node graph is.
There is nothing in my code as far as I can tell that should be
affecting position. How do I get it to place my new node directly under
the selected node when using a hotkey. or why does it create it
differently when I try to assign a new hotkey? I have done some
searching and I could try to assign the x and y pos based off the
selected node, but I dont get why it is spawning in a different position
in the first place. A bug perhaps?
Thanks,
Adam
_______________________________________________
Nuke-users mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users