You could also use PyMEL--it wraps the MVector class for easy access. I believe it's pymel.datatypes.Vector. I prefer not to use PyMEL, myself (mainly because it's my understanding that a lot of big companies have legacy systems that don't support it, so you need to be well-versed in strict Maya and Python rather than relying on the admittedly less work PyMEL layer--also, using PyMEL broke my code when I switched to 2013 from 2012 because of a bug in the UI wrapper).
On Wed, Nov 5, 2014 at 10:36 AM, Joe Weidenbach <[email protected]> wrote: > Brad's right, though, it's easy to roll your own as well. I wrote a > vector class midway through my thesis for calculations, only to dive into > the API a week later and discover MVectors. > > On Wed, Nov 5, 2014 at 10:34 AM, Joe Weidenbach <[email protected]> wrote: > >> The easiest way I've found is to tie into the API--maya has a great >> vector class (OpenMaya.MVector) that handles cross products and dot >> products. >> >> On Wed, Nov 5, 2014 at 8:30 AM, Brad Friedman <[email protected]> wrote: >> >>> Cross Product!!! It's called a cross product. You need to execute two >>> of them. Don't know the python to execute. But the math is common and >>> easily implemented if for some reason, it can't be found in the existing >>> library. Go read up. >>> >>> >>> On Nov 2, 2014, at 12:42 PM, sam williams <[email protected]> wrote: >>> >>> <vectorRotationDiagram.jpg> >>> like this...;) >>> >>> On Sun, Nov 2, 2014 at 3:52 PM, Marcus Ottosson <[email protected]> >>> wrote: >>> >>>> It's a mailing list, you can email the image, along with your message. >>>> >>>> On 2 November 2014 14:22, <[email protected]> wrote: >>>> >>>>> hi Marcus, >>>>> >>>>> ive got an image here im trying to upload, but theres no where to post >>>>> an image. Do you know how ha >>>>> >>>>> sam >>>>> >>>>> -- >>>>> 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/cc53602b-b2d7-4b80-aec6-cfb219123c7e%40googlegroups.com >>>>> . >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> *Marcus Ottosson* >>>> [email protected] >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "Python Programming for Autodesk Maya" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/python_inside_maya/z1z0PXZe12M/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBAtru4sjvXeL84PQDonXTV1qy4daXX%3DK8Abj%2BVYQ6Eow%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBAtru4sjvXeL84PQDonXTV1qy4daXX%3DK8Abj%2BVYQ6Eow%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/CAOUxB22sPo86U5CV3pt7CSDwcOypLE%2BdWKXzS7w-PYt8qKBO%2BQ%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CAOUxB22sPo86U5CV3pt7CSDwcOypLE%2BdWKXzS7w-PYt8qKBO%2BQ%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/129CA0F3-5EE7-4190-ACA3-1BD33AE78CC8%40fie.us >>> <https://groups.google.com/d/msgid/python_inside_maya/129CA0F3-5EE7-4190-ACA3-1BD33AE78CC8%40fie.us?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/CAM33%3Da5DSXqtFNcTxGMA5EobqB39S%3DOgRVGG%2B%2Bv8vmjHa0X1hg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
