0.6.2
Added support for undoable animation.
with cmdx.DagModifier() as mod:
node = mod.create_node("transform", name="animatedNode")
# Set some keys
with cmdx.DagModifier() as mod:
mod.set_attr(node["tx"], {1: 0.0, 5: 2.0, 10: 0.0 })
# Set some more keys
with cmdx.DagModifier() as mod:
mod.set_attr(node["tx"], {20: 0.0, 25: 2.0, 30: 0.0 })
cmds.undo() # Keys 2 bye-bye
cmds.undo() # Keys 1 bye-bye
cmds.undo() # Node bye-bye
Notice that it both creates the (correct!) animation curve node (linear for translation, angular for rotation, for example), depending on the plug type, or edits it if one already exists.
And more:
- Support for tangents and AnimCurve
AnimCurve.key(interpolation)
was renamedtangents
- Support for
plug.connection(plugs=("name1", "name2")
to match by name - Add
Tm.setRotatePivot
andsetRotatePivotTranslate
- Add
Tm.setScalePivot
andsetScaleivotTranslate
- Add cmdx.time() and cmdx.frame() conversion functions, like math.degrees() and math.radians()
- Support matching array-plugs by name
- Repair cmdx.lookAt()
See #71 for details.