In the end this is what I used which works a treat.

menubar = nuke.menu("Nuke")
m = menubar.addMenu('Utilities')
m.addCommand('read from write','nuke.tcl("SmartRead")', 'alt+a')

On 8 Jun 2014, at 15:38, Howard Jones <[email protected]> wrote:

> Thanks Frank. Haven't seen Fredericks but there's 2 solutions there which is 
> one better than I hoped and nothing to rewrite. Bonus!
> 
> Cheers
> 
> Howard
> 
> On 8 Jun 2014, at 06:38 am, Frank Rueter|OHUfx <[email protected]> wrote:
> 
>> or this will do it without re-writing anything:
>> menu = nuke.menu('Nodes')
>> item = menu.findItem('Image/Read')
>> item.setScript('nuke.tcl("SmartRead")')
>> 
>> 
>> On 7/06/14 3:41 pm, Frank Rueter|OHUfx wrote:
>>> does Frederik's script work for you?
>>> http://www.nukepedia.com/python/misc/readfromwrite
>>> 
>>> On 7/06/14 3:30 pm, Frank Rueter|OHUfx wrote:
>>>> yeah, yeah, I get the hint :-D
>>>> try nuke.tcl() in the meantime
>>>> 
>>>> On 6/06/14 11:54 pm, Howard Jones wrote:
>>>>> Hi
>>>>> 
>>>>> I’ve just realised I’ve never doen this before but…
>>>>> 
>>>>> How do I load a TCL script through menu.py?
>>>>> 
>>>>> Basically I want to add a shortcut to load Frank’s SmartRead tool which 
>>>>> after umpteen years I still haven’t made a python version.
>>>>> So can I load this through menu.py? (Too many years of typing 'x' then 
>>>>> ‘SmartRead'.)
>>>>> 
>>>>> Many thanks
>>>>> Howard
>>>>> 
>>>>> _______________________________________________
>>>>> Nuke-users mailing list
>>>>> [email protected], http://forums.thefoundry.co.uk/
>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>>> 
>>>> -- 
>>>> <mime-attachment.png>      vfx compositing | workflow customisation and 
>>>> consulting
>>>> 
>>>> _______________________________________________
>>>> Nuke-users mailing list
>>>> [email protected], http://forums.thefoundry.co.uk/
>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>>> 
>>> -- 
>>> <mime-attachment.png>       vfx compositing | workflow customisation and 
>>> consulting
>>> 
>>> _______________________________________________
>>> Nuke-users mailing list
>>> [email protected], http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>> 
>> -- 
>> <ohufxLogo_50x50.png>        vfx compositing | workflow customisation and 
>> consulting
>> _______________________________________________
>> Nuke-users mailing list
>> [email protected], http://forums.thefoundry.co.uk/
>> 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