Yep, worked a treat Hugo.
Thanks.

Any idea how you’d get it to add subfolders in this also?


Check out some of my work...
www.vimeo.com/darrencoombes/reel2015 
<http://www.vimeo.com/darrencoombes/reel2015>

Mob:  +61 418 631 079 <tel:+61%20418%20631%20079>
Instagram: @7secondstoblack
Instagram: @durwood0781
Skype:  darren.coombes81
Twitter:  @durwood81

> On 30 Mar 2016, at 10:16 am, Hugo Léveillé <[email protected]> wrote:
> 
> Here is a quick example. Add this to your menu.py and change with your 
> desired folder location containing your .nk files
>  
> import os
> 
> import nuke
> 
>  
> 
> def build_templates(templates_location):
> 
>     menu = nuke.menu("Nuke").addMenu("Nuke Templates")
> 
>     for script in os.listdir(templates_location):
> 
>         name = os.path.splitext(script)[0]
> 
>         menu.addCommand(name, 'nuke.nodePaste("%s/%s")' % (templates_location 
> , script))
> 
>  
> 
> build_templates("/Users/hugoleveille/.nuke/templates/")
> 
>  
>  
>  
> --
>   Hugo Léveillé
>   Head of 2D, MELS
>   [email protected]
>  
>  
>  
> On Tue, Mar 29, 2016, at 18:22, Darren Coombes wrote:
>> Yeah, I've got heaps of tool sets. Just trying something different, so it 
>> could be step up on more of a per project basis kind of thing.
>>  
>>  
>> Check out some of my work...
>>  
>> www.vimeo.com/darrencoombes/reel2015 
>> <http://www.vimeo.com/darrencoombes/reel2015>
>>  
>>  
>>  
>>  
>>  
>> Mob:  +61 418 631 079 <tel:+61%20418%20631%20079>
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>> Instagram: @7secondstoblack
>> Instagram: @durwood0781
>> Skype:  darren.coombes81
>> Twitter:  @durwood81
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>> On 30 Mar 2016, at 8:15 AM, Hugo Léveillé <[email protected] 
>> <mailto:[email protected]>> wrote:
>>> Why don't you use the toolsets? That's exactly what it does
>>>  
>>> Sent from my iPhone
>>>  
>>> On Mar 29, 2016, at 5:11 PM, Darren Coombes <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>>> How would I make a menu item that links to a designated folder full of 
>>>> nuke scripts i made as templates?
>>>> I have made the menu item as…
>>>>  
>>>> nuke.menu("Nuke").addCommand("Nuke Templates/Testing”)
>>>>  
>>>> which makes the menu item, but how would i tell it to list the nuke 
>>>> scripts inside that folder?
>>>>  
>>>> Thanks.
>>>> Darren.
>>>> 
>>>> Check out some of my work...
>>>>  
>>>> www.vimeo.com/darrencoombes/reel2015 
>>>> <http://www.vimeo.com/darrencoombes/reel2015>
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>> Mob:  +61 418 631 079 <tel:+61%20418%20631%20079>
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>> Instagram: @7secondstoblack
>>>> Instagram: @durwood0781
>>>> Skype:  darren.coombes81
>>>> Twitter:  @durwood81
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>>  
>>>> _______________________________________________
>>>> Nuke-users 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-users 
>>>> <http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users>
>>> _______________________________________________
>>> Nuke-users 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-users 
>>> <http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users>
>> _______________________________________________
>> Nuke-users 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-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

_______________________________________________
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