Hey Frank, thanks for the advice...callbacks are working fine...I wrapped everything into one function within a module that is being imported on startup by the init.py and use the onScriptLoad call back within the root node...works fine...strange though, that my first attempt used to work and doesnt any more...
thanks! Von: nuke-python-boun...@support.thefoundry.co.uk [mailto:nuke-python-boun...@support.thefoundry.co.uk] Im Auftrag von Frank Rueter Gesendet: Mittwoch, 17. Oktober 2012 10:18 An: nuke-python@support.thefoundry.co.uk Betreff: Re: [Nuke-python] WG: Problem Calling Python script inside of .nk-File / TCL you might wanna read up on callbacks. In particular the onCreate callback which you could run on Root (which happens when the Nuke UI opens). http://docs.thefoundry.co.uk/nuke/70/pythondevguide/callbacks.html?highlight=oncreate On 10/17/12 9:05 PM, Groh, Lars wrote: Hi, I sent this message yesterday...but I forgot to subscribe to the mailing list...so I am not sure if there were any replies... Lars Von: Groh, Lars Gesendet: Dienstag, 16. Oktober 2012 18:10 An: 'nuke-python@support.thefoundry.co.uk<mailto:nuke-python@support.thefoundry.co.uk>' Betreff: Problem Calling Python script inside of .nk-File / TCL Hey Everyone, I am trying to call a python script on startup of nuke. So I placed these lines at the end of the respective .nk-file: TCL-Code: ---- python ("import runRender") python ("runRender.runRender()") python ("nuke.scriptClose()") ----- where runRender.py is python file that resides in the Pythonpath of nuke... I tested these lines directly in the script editor (only using the python comands of course) and everything worked fine. It did even work like this before...but not anymore...as I dont get any error messages, I dont know whats wrong. Instead I tried to call the python file by using the TCL-exec comand like this: exec //server/myNukeScripts/runRender.py Here I get an error message saying that the file cant be found..but it exists and the path is correct. Any ideas? Regards, CGI Pipeline TD .................................................. Tel.: +49 (0) 7158 5011-71 E-Mail: lars.g...@eder.de<mailto:lars.g...@eder.de> .................................................. ederstuttgart eder GmbH Liebigstrasse 22 73760 Ostfildern (Scharnhausen) Germany www.eder.de<http://www.eder.de/> Geschäftsführer: Andreas Eder, Michael Eder, Robert Laub Sitz und Handelsregistereintrag: Stuttgart HRB 210788 _______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk<mailto:Nuke-python@support.thefoundry.co.uk>, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python