View Full Version : ScriptJob attributeChange: which attribute triggered it?

12 December 2011, 10:34 PM
Hello, I'm building the pipeline for my company and right now i have to give the user the possibilities to update their rigged assets in the scene.
A rig is a group node with some extra attributes, like version.
So everytime a user gets a new asset, I want do something like this:

cmds.scriptJob(attributeChange = [node +'.version', self._updateReference] )

The only problem is since i don't seem to be able to pass arguments to scriptJob (which makes sense, since the local vars that created the scriptJob are long gone), I can't know which asset is getting the setAttr...

How can i know which node triggered the setAttr?

thank you very much

12 December 2011, 11:23 PM
ok never mind, it works with a global function and this :

cmds.scriptJob(kws = True, attributeChange = [node +'.version', 'csAssetUpdateReference(\"'+node+'\")'] )

CGTalk Moderation
12 December 2011, 11:23 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.