Anyone know a way to connect attributes of different units without Maya helpfully creating a unitConversion?
I have code that creates a rotation attribute and wants to move all connections from a rotate attribute to it. This works fine, except for expression attributes set to unitConversion “none”: Maya adds a unitConversion and breaks the expression (since the unitConversion magic only happens when editing with the “expression” command, connectAttr doesn’t know about it). I don’t want Maya to do helpful clever things, I just want it to make the connection I’m telling it to.
It would also be useful when autogenerating complex node networks. I have node networks that are 40% unitConversion nodes, and I’d rather sacrifice intermediate results being in degrees for a lighter, easier to debug network.
I can’t find a way to do this with PyMel or MDGModifier. The file format does it (.ma files just do a connectAttr), but I think that’s load-time magic. Anyone have any ideas?