Viewport 2.0 custom node rendering when selected

54 views
Skip to first unread message

Nils

unread,
Feb 5, 2015, 9:02:30 AM2/5/15
to python_in...@googlegroups.com
Hey guys,

I'm converting an old custom node to render with viewport 2.0 but don't know how do figure out if the node is active (selected) or not. In the legacy render in the draw function your could do this:

draw( M3dView & view, const MDagPath & path,
 M3dView
::DisplayStyle dispStyle,
 M3dView
::DisplayStatus status )
{
...
    switch (status)
  {
      case M3dView::kActive:
          // rendering for when node i active
      default:
          // Default rendering
   }
...
}

There doesn't seem to be a way of getting the "status" in MHWRender::MPxDrawOverride.addUIDrawables().
Sorry this is c++ code but the question applies to maya python api too.

thanks
Reply all
Reply to author
Forward
0 new messages