Hi, I know this can be done using cmds.setAttr(type="matrix"), but I am trying to set the values of a matrix plug using OpenMaya, but I got stuck at the end line. Of the code below
matList = [18, 24, 7, 0, 54, 17, 1, 0, 22, 34, 8, 0, 11, 78, 6, 1] mScr = OpenMaya.MScriptUtil() MMat = OpenMaya.MMatrix() mScr.createMatrixFromList(matList, MMat) cmds.joint(n="myJoint") mslist = OpenMaya.MSelectionList() mslist.add("myJoint") mobj = OpenMaya.MObject() mslist.getDependNode(0, mobj) mfndepnode = OpenMaya.MFnDependencyNode(mobj) mfndepnode = OpenMaya.MFnDependencyNode(mobj) matPlug = mfndepnode.findPlug("worldMatrix") # What I though could workd is passing th matrix plug to a MFnMatrixData, to set the value, but this line below fails mfn = OpenMaya.MFnMatrixData(matPlug.asMObject()) #...so where to go from here Any ideas? thank you -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/2becb0f4-5f61-4ccf-b6bd-d9ba5967e4ae%40googlegroups.com.