I might be missing something obvious but I don’t understand why you don’t use 
the ‘python script button’ in the ‘Manage user knobs’

It does all the hard work for you. 
You just paste you python script in the script box and give a name to your 
button and voila!

 






> On 2/11/2016, at 07:37, Brent Veal <naslund.fan...@gmail.com> wrote:
> 
> goknob.setValue("import script; script.func()")
> 
> would that work?
> 
> On Tue, Nov 1, 2016 at 11:21 AM, Daniel Hartlehnert <dah...@gmx.de 
> <mailto:dah...@gmx.de>> wrote:
> Ok, so now that i now how to add this knob :)
> 
> I have  about 300 lines of Python code i would like to be executed when this 
> knob is pressed. I now know how to assign the code to the knob thanks to the 
> double quotes, but isn’t there a more elegant solution?
> Like having this code as a .py file and then calling it from the knob? But if 
> the script knob only takes a string, how would i do that?
> 
> Daniel_______________________________________________
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk 
> <mailto:Nuke-users@support.thefoundry.co.uk>, 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
> 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