You need to put it as a string when you have arguments in the function; So
it doesn't execute when Nuke starts, but only when the user click on the
menu.

nuke.menu("Nodes").addCommand("User/FiletypeConverter",
'dh_pycode.fileconverter(my_args)', '‘)

No need to put it as a string when there is no args I believe.

Cheers,
J

2016-10-22 13:58 GMT+01:00 Bruno-Pierre Jobin <bpjo...@gmail.com>:

> Don't you have to pass dh_pycode.fileconverter as a string?
>
> nuke.menu("Nodes").addCommand("User/FiletypeConverter",
> 'dh_pycode.fileconverter', '‘)
>
> --
> Bruno-Pierre Jobin
>
> > On Oct 22, 2016, at 7:08 AM, Daniel Hartlehnert <dah...@gmx.de> wrote:
> >
> > nuke.menu("Nodes").addCommand("User/FiletypeConverter",
> dh_pycode.fileconverter, '‘)
> _______________________________________________
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to