Ofer,
monitoring all the attrs that, say, represent the controls of a
character(s) in a shot.. can be allot of attrs to monitor.
its totally possible with scriptJob, and i do have a functional way to
propagate and clean up mass numbers of jobs.. with a ton of logic.
this, historically, been a problem with many of the things we have
wanted to do with characters in big shots in maya.
the scriptJob system has arguably always fallen a little short on
this. and maybe is simply not what it was intended for.
according to the scriptJob docs, one is supposed to be able to monitor
all the child attrs of a compound attr for change, in which case one
could have a single scriptJob monitoring a single compound attr, the
children of which, have incoming connections from all the many attrs
you might want to test for change... but this is totally busted. it
does not work since about maya 7.0.. if it ever really worked at
all... im using 2011 now, and it still crashes maya no matter how you
try to set it up.
also, for reasons i wont go into, we want to know exactly why the attr
changed. did it change from user interaction with manipulators? did it
change from setAttr command, did it change due to keyframes being
moved on an incoming animlayer? did it change via scrubbing the
channelbox virtual slider? etc. scriptJob is woefully inadequate for
this level of detail.
that's why (back in the day) we wrote a node that lets you add attrs
to it, connect the output of the attr you want to monitor to the input
of the attr on this plugin node, then define a string attr associated
with this monittr attr that lets you filter.. not only for change, but
why it changed..
ie,'MNodeMessage.kAttributeSet','MNodeMessage.kAttributeEval',MNodeMessage.kAttributeAdded...
etc.
but the only way i could (back then) figure out how to do this, was if
i created a plugin node in order to attatch the callbacks to attrs
created on this node.
its been awhile, and this limitation was perceived at a time before
python in maya.. and access to the API through scripts.
so. live and learn.. i would love to be able to attatch this family of
MNodeMessage callbacks to any old node.. and i will be trying to
figure that out right now!
-thanks
On Dec 23, 3:17 am, Ofer Koren <
kor...@gmail.com> wrote:
> The MNodeMessage class allows you to install callbacks
> <
http://download.autodesk.com/us/maya/2011help/API/class_m_node_messag...>via
> the API much like scriptJob. You can do this via the Python API so you don't
> need a plugin here at all.
> Any specific reason not to use scriptJob?
>
> -
Oferwww.mrbroken.com
>