Right. I’m wondering if you’ve tried your commands *without* them, since TCL
doesn’t use parentheses the same way most scripting languages do. Now, I’m not
advocating this approach as a replacement for callbacks, but the general
concept of what you’re doing should work. I think you’re just running into some
syntactical issues.
Maybe try throwing this in there instead, if only just for fun:
python –exec {import runRender; runRender.runRender(); nuke.scriptClose()}
-Nathan
From: Groh, Lars
Sent: Thursday, October 18, 2012 8:31 AM
To: Nuke Python discussion
Subject: AW: AW: [Nuke-python] WG: Problem Calling Python script inside
of.nk-File / TCL
Hey Natahn,
these were the lines, that I copied directly at the end of the .nk file:
python ("import runRender")
python ("runRender.runRender()")
python ("nuke.scriptClose()")
so Im using parentheses...but maybe not in the right way!?!?
Lars
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nathan
Rusch
Gesendet: Donnerstag, 18. Oktober 2012 17:21
An: Nuke Python discussion
Betreff: Re: AW: [Nuke-python] WG: Problem Calling Python script inside of
.nk-File / TCL
Out of curiosity, did you try your TCL calls without parentheses?
-Nathan
On Oct 18, 2012, at 12:48 AM, "Groh, Lars" <[email protected]> wrote:
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: [email protected]
[mailto:[email protected]] Im Auftrag von Frank
Rueter
Gesendet: Mittwoch, 17. Oktober 2012 10:18
An: [email protected]
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: '[email protected]'
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: [email protected]
…………………………………………..
ederstuttgart
eder GmbH
Liebigstrasse 22
73760 Ostfildern (Scharnhausen)
Germany
www.eder.de
Geschäftsführer: Andreas Eder, Michael Eder, Robert Laub
Sitz und Handelsregistereintrag: Stuttgart HRB 210788
_______________________________________________Nuke-python mailing
[email protected],
http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python