Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 2.09 KB

animation.md

File metadata and controls

34 lines (22 loc) · 2.09 KB

Animation - USD Driving Maya Attribute Values and Vice Versa

Attribute Storage in Maya

Transforms

AL_USD Maya has it's own Transform Node defined here which allows USD to drive Maya Transforms and vice versa. This inherits from Maya's MPxTransform node and passes every attribute change to USD, then delegates to the base class functionality to behave like a normal transform. This allows us to drive Maya Transforms from USD, and vice-versa (there is a "pushToPrim" boolean attribute which will make maya the "driver" of the Transform Attribute.

Implementing your own nodes

While transforms are special, you can implement your own nodes using the same "Maya wrapping USD" technique

Attribute Storage in USD

Another approach (which is not possible with Transforms due to restrictions on how their attributes are stored) is to use the setInternalValueInContext/setInternalValueInContext API from MpXNode This allows us to not store any data in Maya, and delegate the ownership and serialisation to USD. This technique is illustrated in Layers.h (although not for the purpose of animation) @todo: example where driving animation....

Baking Attribute Values

When implenting a translator of any kind, you can of course choose other ways of communicating data between USD and Maya - or not - for example, you are free to bake any USD data into a maya fcurve and maintain no live connection.

Other topics

USD Driven Transform

This is a set of Array Values on the Proxy Shape Node that allow you to drive multiple transform nodes in maya, batching up the updates to improve performance. @todo: deprecate unless it's useful to someone?

HostDrivenTransform Node

see here @todo needs documentation