Thanks, Ben! I did finally discover this - with the help from our staff 
programmer…

This chunk of code is part of a function that gets initiated via a shortcut 
key. This is the part that gets the node, of course. It seems to work...

grp = nuke.thisGroup()
        with grp:
                node = nuke.selectedNode()


Rich


> On Sep 22, 2015, at 10:46 PM, Ben Dickson <[email protected]> wrote:
> 
> If you run nuke.selectedNode() from within a menu command, it works as you'd 
> expect (i.e returning the "active" selected node, which might be inside a 
> group or not)
> 
> Whereas it acts differently if you run it from the script editor, where 
> nuke.selectedNode() will always return the selected node in the root level DAG
> 
> On 23/09/15 07:37, Rich Bobo wrote:
>> Hi,
>> 
>> OK, I’ve tried, butI can’t figure this out…
>> 
>> I am inside a Group and looking at its DAG. I have a node selected. How
>> do I get that node object?
>> 
>> How do I get the scope for the current Group’s DAG…??  (8^\
>> 
>> Thanks for any help!
>> 
>> Rich
>> 
>> 
>> 
>> Rich Bobo
>> Senior VFX Compositor
>> Armstrong White
>> Email: [email protected] <mailto:[email protected]> 
>> <mailto:[email protected] <mailto:[email protected]>>
>> http://armstrong-white.com/ <http://armstrong-white.com/>
>> 
>> Email: [email protected] <mailto:[email protected]> <mailto:[email protected] 
>> <mailto:[email protected]>>
>> Mobile:  (248) 840-2665
>> Web: http://richbobo.com/ <http://richbobo.com/>
>> 
>> 
>> 
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected] 
>> <mailto:[email protected]>, 
>> http://forums.thefoundry.co.uk/ <http://forums.thefoundry.co.uk/>
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python 
>> <http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python>
>> 
> 
> -- 
> ben dickson
> 2D TD | [email protected] <mailto:[email protected]>
> rising sun pictures | www.rsp.com.au <http://www.rsp.com.au/>
> _______________________________________________
> Nuke-python mailing list
> [email protected] 
> <mailto:[email protected]>, 
> http://forums.thefoundry.co.uk/ <http://forums.thefoundry.co.uk/>
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python 
> <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