Still stuck on this, making some good progress here: - https://forums.autodesk.com/t5/maya-programming/worldmatrix-to-translate-rotate/m-p/9757538#M12414
But still not quite there yet. On Thu, 10 Sep 2020 at 00:43, MaksZ <for...@gmail.com> wrote: > In cmds there is also a neat command > > cmds.matchTransform(object_to_adjust, object_to_match) # flags pos, rot, > scl, piv - pivots > > But I want to second Marcus' question. I stuck with the same thing. Really > curious what the solution might be. > > On Wednesday, September 9, 2020 at 3:07:57 AM UTC-7 Roy Nieterau wrote: > >> 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/05c18bfa-a326-4626-a757-2a19700efbc7n%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/05c18bfa-a326-4626-a757-2a19700efbc7n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAFRtmOCq397jRDdjj4ZT1AgXBFCAj8xNiuji0dvX3kQEoc2XiA%40mail.gmail.com.