Hello Dilen, Not sure if I'm getting this right, but it seems like you are looking for the maths similar to a parentConstraint. Am I right? Maybe with that, and Marcus's suggestion you can get it done without doing any maths your self. Otherwise, you'll have to concatenate the inverse matrix of one and the inlusive matrix of the other to make the trick. Hope this makes sense, Cheers! Eduardo
On Wed, Sep 3, 2014 at 7:15 AM, Marcus Ottosson <[email protected]> wrote: > If you can narrow down an example of what you're trying to accomplish, I > might be able to provide an example for you. > > > On 3 September 2014 12:02, Marcus Ottosson <[email protected]> wrote: > >> That's precisely where you would use nodes instead of scripting. :) >> >> The node will update in real-time, like any other node. I'm using it in >> most of my rigs for just that purpose. >> >> >> On 3 September 2014 11:56, Dilen Shah <[email protected]> wrote: >> >>> well thats one way of doing it, but I am using python API and I want >>> functionality like if i move node 1 node 2 should move in realtime with it. >>> >>> Any ideas for that? >>> >>> thanks >>> >>> D. >>> >>> >>> On Wednesday, September 3, 2014 10:22:37 AM UTC+2, Marcus Ottosson wrote: >>> >>>> Hi Dilen, >>>> >>>> There is the “multMatrix” node which may help, it should be able to do >>>> what you’re looking for and output a new matrix for you. I’m using it in >>>> much the same way, its also helpful when cancelling one matrix with >>>> another. >>>> >>>> cmds.createNode('multMatrix') >>>> >>>> >>>> >>>> >>>> On 3 September 2014 09:59, Dilen Shah <[email protected]> wrote: >>>> >>>>> Hey guys, >>>>> >>>>> I have 2 nodes in my scene. >>>>> >>>>> I am using MMessage and creating a callback function, this function >>>>> needs to take the worldmatrix of both nodes and apply one matrix to >>>>> another >>>>> so that the second node is the same exact position as the first node. >>>>> >>>>> Can anyone explain how i can achieve it as they have groups as their >>>>> parents so multiply the parentworldmatrix and their worldmatrix would be >>>>> necessary can anyone help me with the math, or any link to resources would >>>>> be appreciated. >>>>> >>>>> Thanks in advance. >>>>> >>>>> Dilen. >>>>> >>>>> -- >>>>> 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/db8272fd-d1a2-4656-be91- >>>>> f073a32ca35e%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/python_inside_maya/db8272fd-d1a2-4656-be91-f073a32ca35e%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> *Marcus Ottosson* >>>> [email protected] >>>> >>> -- >>> 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/ee6bebf4-80ae-46b5-9299-440d1cf83c1c%40googlegroups.com >>> <https://groups.google.com/d/msgid/python_inside_maya/ee6bebf4-80ae-46b5-9299-440d1cf83c1c%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> *Marcus Ottosson* >> [email protected] >> > > > > -- > *Marcus Ottosson* > [email protected] > > -- > 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/CAFRtmOA9UcLRLoQABsEkCTx%2BAXEP%3DRpO2DnXSH0tha27Osmg2w%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA9UcLRLoQABsEkCTx%2BAXEP%3DRpO2DnXSH0tha27Osmg2w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Eduardo Graña www.eduardograna.com.ar -- 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/CACt6GrnUL3B1%3DDvcRPxjkNHH9Kb%2Btj9k-SVBKEnvjJchEQhaYQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
