Ok, then have a look at the signature of addOnScriptLoad;
addOnScriptLoad(call, args=(), kwargs={}, nodeClass='Root')
You need to pass it a callable, then (optional) any positional
arguments to that callable as a tuple, then (optional) any keyword
arguments as a dictionary...
Ex.
def ttt(message
I was trying to pass it something to the function, like:
nuke.addOnScriptSave(yourOwnFunction("start"))
but it does work the way that you mention
nuke.addOnScriptSave(yourOwnFunction)
On Thu, Jul 21, 2011 at 2:16 PM, Ivan Busquets wrote:
> What are you passing as an argument to addOnScriptLoa
What are you passing as an argument to addOnScriptLoad?
>From the error message, you're not passing it a callable. You need to
pass it the function object (callable) itself, not a string, or the
result of your function.
Ex.
def yourOwnFunction():
blah
blah
blah
nuke.addOnScriptLoad(yourOw
I've tried this in the menu.py, but it has an error. I've even plugged
in a dummy Python script that only prints a simple message, so I don't
think that it's my code. Maybe I'm still overlooking something, but I
get the following error:
Traceback (most recent call last):
File "", line 2, in
F
something like this in your init/menu.py:
nuke.addOnScriptLoad(pythonScriptFunction)
-deke
On Tue, Jul 19, 2011 at 13:01, Dan Rosen wrote:
> I'd like to set the Project Settings > Python field for onScriptLoad
> at load time via menu.py or init.py. I understand that I can stick
> this into a t