Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Displaying MPxSurfaceShape into Viewport 2.0?

Displaying MPxSurfaceShape into Viewport 2.0?

Anonymous
Not applicable
508 Views
2 Replies
Message 1 of 3

Displaying MPxSurfaceShape into Viewport 2.0?

Anonymous
Not applicable

Hi,

I have a custom MPxSurfaceShape (in C++) that displays a simple opengl sphere inthe Draw method. This displays well in the legacy Maya viewport, but not in the Viewport 2.0. I can't find any simple example on internet on how to do it. Would someone have a piece of code for me ?

I tried to look at the apiMeshShape example from Autodesk, but is far too complex for what I need.

 

Thanks. 

0 Likes
509 Views
2 Replies
Replies (2)
Message 2 of 3

cheng_xi_li
Autodesk Support
Autodesk Support

Hi, You need to implement one of the scene overrides to display your mesh in VP2.

 

You can check this document on our website.

 

For the apiMeshShape, I suggest you to look at the geometryOverride and SubSceneOverride to learn how to draw meshes in VP2.

0 Likes
Message 3 of 3

Anonymous
Not applicable
OK, thanks for the info. I ended up in reusing apiMeshShape code.
0 Likes