Without taking the math in account for now. Are you required to do this with the API? :)
Because maya.cmds.xform does take into account pivots, etc. For example this works for your setup: m = cmds.xform("pCube2", query=True, matrix=True, worldSpace=True) cmds.xform("pCube3", matrix=m, worldSpace=True) (What's with the new Google Groups look/layout? How can I get the code formatting in here?) Regarding the actual matrix math. Do note that the xform command documentation <https://help.autodesk.com/cloudhelp/2020/ENU/Maya-Tech-Docs/CommandsPython/xform.html>at the top states the order of transformation that Maya applies. It's quite involved but could help you reproduce it exactly. > -- 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/d50a8632-3c7c-4ed4-ae88-2cf10dec034bn%40googlegroups.com.