MVectorArray in python is a SWIG object wrapping the C++ type. I am not
sure of a way to pass a pointer to the C++ MVectorArray and 'wrap' it in
Python. But that would be the lowest overhead if it were possible since you
wouldn't need to copy.
The hacky workaround is to serialize it to something like
/dev/shm/myvector.json and let python deserialize it. That incurs the cost
of having to encode/decode, but avoids the huge literal string call (I am
not sure of the cost differences here).

I'm probably missing some other option to solve this.

On Tue, Mar 19, 2019 at 6:26 AM <pety2001p...@gmail.com> wrote:

> hi, how i can read or how i can access to MVectorArray of C++ code by
> python code?
> right now, i convert C++ MVectorArray to String and run it by
> executePythonCommand() func
>
> ( MGlobal::executePythonCommand(c++MVectorArrayToString); )
>
> but,i Want a faster way...
>
> i think, convert C++ MVectorArray to String, is not good way!(in big
> arrays)
>
> --
> 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/58b6b569-f8cf-418c-828b-7c6c1577c61c%40googlegroups.com
> .
> 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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3wkRG066ZP6upNyR3cxEm79Sn1Xaakn-3Nwi59Bcra2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to