in method 'MFnTransform_getScale', argument 2 of type 'double [3]' //
According to SWIG documentation (which Autodesk used for its Python bindings), one should use tuples to do it (but it has to be implemented on the API side)
Here is what I tried:
# TypeError: in method 'MFnTransform_getScale', argument 2 of type 'double [3]' //
This is why god created API 2.0…
from maya.api import OpenMaya as om
sl = om.MSelectionList()
sl.add('joint1')
node = sl.getDependNode(0)
joint = om.MFnTransform(node)
print(joint.scale())
And why I created cmdx
...
import cmdx
joint = cmdx.encode("joint1")
joint["scale"] = [1, 2, 3]
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCZtXtL8yiTgS_X5oj_3gvGuzsExhe_YtKjf4k6rNEvS5g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCg5naTCfapu%3D9Re5%3DZrAt3feZMLc%3DY9RVe_m7dSpKsbg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCZP9TMoroJcVY1wTygHz4NpvFn4HD0TqY_7z6GHJGMdpw%40mail.gmail.com.