Why deselect? just throwing this out there - typically, when bringing in a little string of nodes, toolset, etc, the first thing you want to do is move them into place in your script. often they can come in tangled up or spaced wrong or in a different orientation than an artist likes.
I mean, if I invoke a command that will knowingly create some nodes, I think I'd actually expect them to be selected and ready to be moved around the DAG. might be worth asking the artists you're coding for what they'd prefer On Tue, Nov 13, 2012 at 11:32 AM, brandon harris <brandon.har...@reelfx.com>wrote: > It seems I will need to adjust my wrappers to use nuke.createNodes and > then just deselect them. > > I try to use nuke.nodes since it's more pythonic and I don't need to > deselect after creating the node. > > Brandon L. Harris > ________________________________________ > From: nuke-python-boun...@support.thefoundry.co.uk [ > nuke-python-boun...@support.thefoundry.co.uk] on behalf of Hugo Léveillé [ > hu...@fastmail.net] > Sent: Monday, November 12, 2012 4:27 PM > To: Nuke Python discussion > Subject: Re: [Nuke-python] RE: Very Newbish Question > > Is there any reason why not to use nuke.createNode() ? As it will do > what you want (put the node where you expect it) If you really need > nuke.nodes, you could grab the position of the selected node and then > use .setXYposition() > > x = nuke.selectedNode().xpos() > y = nuke.selectedNode().ypos() > grade = nuke.nodes.Grade() > grade.setXYpos(x,y+50) > > > > On Mon, Nov 12, 2012, at 17:13, brandon harris wrote: > > Also, this is using nuke.nodes to create my nodes. I have wrapper > > utilities to create the nodes and I don't use nuke.createNode. > > > > Brandon L. Harris > > ________________________________________ > > From: nuke-python-boun...@support.thefoundry.co.uk > > [nuke-python-boun...@support.thefoundry.co.uk] on behalf of brandon > > harris [brandon.har...@reelfx.com] > > Sent: Monday, November 12, 2012 4:07 PM > > To: nuke-python@support.thefoundry.co.uk > > Subject: [Nuke-python] Very Newbish Question > > > > I can't seem to find any information to help me work this problem out. I > > have tools to generate nodes for artists, but I always just generate the > > nodes at 0, 0 which can be a little flow breaking since the artist has to > > zoom out and pan over to get them. In really large scripts this can be > > especially annoying. > > > > Is there a way to find coordinates that exist in the artists current node > > graph position? I can pull in pan, but setting the nodes x and y to > > those values doesn't work. Anyway to accomplish this? > > > > 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 > > > -- > Hugo Léveillé > TD Compositing, Vision Globale > hu...@fastmail.net > > _______________________________________________ > 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