Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / ScriptJob with attributeChange: which node triggered it?
  RSS 2.0 ATOM  

ScriptJob with attributeChange: which node triggered it?
Rate this thread
 
62469
 
Permlink of this thread  
avatar
  • Total Posts: 22
  • Joined: 27 February 2008 10:31 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



Replies: 0
avatar

ok never mind it works with this

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



Replies: 0