How to cast void pointer to MVectorArray type?

15 views
Skip to first unread message

invinci...@gmail.com

unread,
Jun 2, 2016, 12:26:08 AM6/2/16
to Python Programming for Autodesk Maya
Hello guys,I try to write plugin script in Python, I read this example : apiSimpleShapeUI.cpp, and I got a problem.

In this function
void apiSimpleShapeUI::drawVertices( const MDrawRequest & request,M3dView & view ) const
{
...
MDrawData data = request.drawData();


MVectorArray * geom = (MVectorArray*)data.geometry();

...
}

I dont know how to use data.geometry() to cast to MVectorArray type.

My python script is:
geom = data.geometry()
but the type of geom is swigPyObject, not MVectorArray.

How can I do that? thanks a lot.
Reply all
Reply to author
Forward
0 new messages