mottosso / cmdx

Fast and persistent subset of maya.cmds
https://mottosso.com/cmdx
BSD 2-Clause "Simplified" License
193 stars 36 forks source link

Add convenience aliases for common types and attributes #11

Closed mottosso closed 4 years ago

mottosso commented 4 years ago

See changelist. Motivation being that sometimes it isn't clear whether you're referring to an attribute or type.

node["attr1"] = cmdx.Vector(1, 2, 3)  # This must be a type, not a new attribute
node["myAttr"] = cmdx.Matrix()  # Add an attribute, or set value with Matrix type?

Now there's this.

node["myNewAttr"] = cmdx.MatrixAttribute()

In fact there is no matrix value type, because the name Matrix is occupied by the attribute type. So I've also added..

node["myNewAttr"] = cmdx.Matrix4()
node["myNewAttr"] = cmdx.Mat4()