Back at this and, unlike an attribute query, turns out the `inclusiveMatrix` doesn't support being passed a `MDGContext`. That's a bummer, didn't realise I was so dependent on that.
The workaround has been working well. As it happens, it also enabled me to consolidate calls to matrices of each shape for a transform into a single call, saving on performance, which is particularly important in this case, as the calls I'm making are made each frame, in the range of 20-1,000 nodes, at all times on the timeline; not unlike a scene export. On Fri, 7 Dec 2018 at 08:04, Marcus Ottosson <[email protected]> wrote: > > Can you use fn.dagPath().inclusiveMatrix() ? > > Yes! That looks very promising (for completeness, it was `getPath()` > rather than `dagPath()`). I worked around it this time around, by getting > the parent of any shape, and fetching it's matrix instead. Not as neat, so > will experiment with your suggestion as well. > > Thank you! > > On Tue, 4 Dec 2018 at 21:25, Michael Boon <[email protected]> wrote: > >> Can you use fn.dagPath().inclusiveMatrix() ? >> >> On Wednesday, 5 December 2018 02:02:25 UTC+11, Marcus Ottosson wrote: >>> >>> Mm, I'm looking to get a matrix out of Maya 2015 and above, so a patch >>> would unfortunately not help me in this case. Do you know of another way of >>> getting hold of that matrix? >>> >>> On Tue, 4 Dec 2018 at 14:50, Tim Fowler <[email protected]> wrote: >>> >>>> Hmm...looks like I tried that on an unreleased version of Maya (and a >>>> Debug version too). Just tried again in Maya 2018 and got the same error >>>> as you. I'll take a quick look and see if I can figure out what fixed it, >>>> but I should warn you that API fixes can sometimes be tricky to get into >>>> Updates since those typically have to remain binary compatible. >>>> >>>> -Tim >>>> >>>> On Tue, Dec 4, 2018 at 9:26 AM Marcus Ottosson <[email protected]> >>>> wrote: >>>> >>>>> Wuw! What version of Maya is that, and what OS? I'm on Windows, Maya >>>>> 2018. Hadn't considered it might be a version or OS thing, will have a >>>>> look >>>>> at that. >>>>> >>>>> On Tue, 4 Dec 2018 at 14:14, Tim Fowler <[email protected]> wrote: >>>>> >>>>>> Not sure what you're hitting. That last line gives me... >>>>>> >>>>>> om.MFnMatrixData(plug.asMObject()).matrix() >>>>>> # Result: maya.api.OpenMaya.MMatrix(((1, 0, 0, 0), (0, 1, 0, 0), (0, >>>>>> 0, 1, 0), (0, 0, 0, 1))) # >>>>>> >>>>> >>>>> -- >>>> 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 [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/python_inside_maya/CALKD2WpxdzsLdBWBnhSS_cMoxMZ33v4FRQ9P%2BPjiUaB%3Dwi7xtA%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/python_inside_maya/CALKD2WpxdzsLdBWBnhSS_cMoxMZ33v4FRQ9P%2BPjiUaB%3Dwi7xtA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/python_inside_maya/1100aff0-f149-4c2d-93e0-2c99af1e5912%40googlegroups.com >> <https://groups.google.com/d/msgid/python_inside_maya/1100aff0-f149-4c2d-93e0-2c99af1e5912%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAPYQQqoVN0NAVTjXcNOVfZCxrjQogtfjm7Qg_xOuHEWg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
