Cmdx

Latest version: v0.6.4

Safety actively analyzes 621498 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

5.0

0.6.4

Nodes and Plugs now look much nicer and tell you much more about them, thanks to 78!

py
>>> decompose = cmdx.createNode("decomposeMatrix", name="decompose")

str() still outputs the name of the node
>>> str(decompose)
'decompose'

>>> transform = cmdx.createNode("transform")

repr() on the other hand shows you whether it's a DagNode or Node
>>> transform
cmdx.DagNode("transform1")

>>> transform["tx"] = 5
>>> transform["worldMatrix"][0] >> decompose["inputMatrix"]

Plugs show you both the type and value
>>> decompose["outputTranslate"]

0.6.3

Up to par with Ragdoll Dynamics.

- See https://github.com/mottosso/cmdx/pull/73 for lots of details

0.6.2

Added support for undoable animation.

py
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 renamed `tangents`
- Support for `plug.connection(plugs=("name1", "name2")` to match by name
- Add `Tm.setRotatePivot` and `setRotatePivotTranslate`
- Add` Tm.setScalePivot` and `setScaleivotTranslate`
- 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.

0.6.1

Been a while since a release was made, even though commits have been rolling in. Here's just a taste.

- Added `cmdx.clone()`
- Added indices to printed plugs, e.g. `worldMatrix[0]`
- Added pretty-printed `cmdx.Matrix4`
- Added pretty-printed `cmdx.TransformationMatrix`
- Added `plug.asTime()` to return a `MTime` type
- Fool-proof load of cmdx as a plug-in (for undo/redo)
- Added `cmdx.exists(strict=True)`
- Return native Quaternion types for asQuaternion() and inverse()
- Make Divider attributes non-keyable per default
- Append to existing animation cuves if they exist
- Add minTime(), maxTime(), animationStartTime(), animationEndTime()
- Add Vector.isEquivalent
- Add Quaternion.asEulerRotation
- Add Quaternion.inverse
- Add TransformationMatrix.setRotatePivot
- Print rotation of TransformationMatrix in degrees rather than radians

See https://github.com/mottosso/cmdx/compare/0.6.0...0.6.1 for a full list!

0.6.0

Strong undo/redo support and a lot less reasons to crash Maya.

- See https://github.com/mottosso/cmdx/pull/56 for details

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.