We have 2 options to draw the icon/geometry in VP2.0. The first one is using MUIDrawManager object, and another one is MRenderOverride. If you are developing a plugin using Maya node, both MUiDrawManager and MrenderOverride objects are available at any point in the implementation. One issue is that if you are trying to draw the geometry/icon in a callback like postRenderMsgCallback(), VP2.0 would already have finished the drawing at that time, and the MUIDrawManager object won’t be available. In this scenario, you can use the second option i.e, using MRenderOverride.
If you have already developed a plugin, instead of doing replacing the drawing code and rebuilding your plugin, there are a few other options to draw in VP2.0. These are not Maya objects, but it still may be a better solution than rewriting your plugin:
1. Use Dx11 API. ( Windows Only SDK)
2. Use Qt C++ API ( Platform Independent SDK)
In case of selection in VP2.0, Autodesk Maya moved to hardware selection in Maya 2016 Extension 2. Please check this link for porting selection from VP1 to VP2. If you still wants to use the VP1 selection, that is still possible. You can use MAYA_VP2_USE_VP1_SELECTION=1 environment variable (make sure that you are in VP1 mode or VP2 non-core profile mode).
You can follow this conversation by subscribing to the comment feed for this post.