0.4.9
- Added
cmdx.exists
to quickly query existence #44 - Added
cmdx.connect
convenience function #44 - Updated
cmdx.DagModifier
improved debugging #44 - Fixed
cmdx.Compound
now supports nested compound attributes, see #5. Go nuts. Thanks for @benblo for this fix. #38
Exists
if cmdx.exists(someNode):
say_hello()
if someNode.childCount() > 1:
print("This joint has multiple children, yo")
Debugging
This one is useful for debugging.
with cmdx.DagModifier() as mod:
tm = mod.create_node("transform")
mod.doIt()
mod.connect(tm["translateX"], tm["message"])
Before
# I had issues with `create_node` and `connect`
After
# I had issues with `connect`
Since we've already successfully done the prior with an explicit call to doIt
. This helps when there's tons of things being done, but most of which have already been doIt
.
Connect
cmdx.connect(a["plug1"], b["plug1"])
As a convenience function for..
with cmdx.DagModifier() as mod:
mod.connect(a["plug1"], b["plug2"])
To help with readability when most of the commands don't need/use a modifier, but just this one connect
does.