So I am trying to make some stuff work from a python script, and I'd like to use callbacks, which as we know need a global function to work. So far I have this (with "mxs" being the maxscript commands imported to my python script):
mxs.callbacks.addScript(mxs.pyhelper.namify("selectionSetChanged"), "addChangeHandlersToSelected()", id = mxs.pyhelper.namify("objectWatcher"))
and it works in adding the callback, but it does NOT find the function "addChangeHandlersToSelected" because that is a python function of my class. How do I declare this as a global function that is found in 3ds Max by the callback?
I could probably write all of it as a big string and just execute that, but I want to be a bit more professional...
Cheers
By br0t · 2013-02-25
Anubis · 2013-02-25