Or if you just want the tile_color of the top node, you could of course do:

n = nuke.selectedNode()

tile_color = nuke.tcl("value [topnode %s].tile_color" % n.name())

Hope that helps


On Fri, Apr 20, 2012 at 6:41 PM, Ivan Busquets <[email protected]>wrote:

> You can use nuke.tcl() within python to execute a tcl command.
>
> So, in your case, something like this should work:
>
>   n = nuke.selectedNode()
>
> topnode_name = nuke.tcl("full_name [topnode %s]" % n.name())
>
> topnode = nuke.toNode(topnode_name)
>
>
>
> On Fri, Apr 20, 2012 at 6:30 PM, Adam Hazard <[email protected]> wrote:
>
>> Hopefully a quick question,
>>
>> If I currently have a node selected somewhere in a tree, and I want to
>> access the topnodes tile color using python, how would I do so? Using
>> [[topnode].tile_color] doesn't seem to work as it is tcl? Looking around it
>> seems you need to check dependecies of all the nodes or something, but I
>> haven't been able to get anything to work.  Is there no way to convert the
>> tcl function to work in python?
>>
>> Thanks in advance for any help,
>> Adam
>> ______________________________**_________________
>> Nuke-users mailing list
>> [email protected].**co.uk<[email protected]>,
>> http://forums.thefoundry.co.**uk/ <http://forums.thefoundry.co.uk/>
>> http://support.thefoundry.co.**uk/cgi-bin/mailman/listinfo/**nuke-users<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