At the outset of my plugin execution (or later when my commands are being executed) I need to set the display mode of all the viewport to Ghosted. In the C++ SDK there’s an example exactly for that which looks briefly like:
CRhinoView* view = RhinoApp().ActiveView();
CRhinoViewport& vp = view->ActiveViewport();
const CDisplayPipelineAttributes* pStdAttrs = CRhinoDisplayAttrsMgr::StdGhostedAttrs();
vp.SetDisplayMode( pStdAttrs->Id() );
view->Redraw();
I’m working in C# with the .NET SDK so I wrote that as:
MRhinoView view = RhUtil.RhinoApp().ActiveView();
MRhinoViewport vp = view.ActiveViewport();
Guid pStdAttrs = MRhinoDisplayAttrsMgr.StdGhostedAttrs().PipelineId();
vp.DisplayPipeline().SetDisplayMode(ref pStdAttrs);
view.Redraw();
and stepping through it, all seems normal, no nulls.
But it has no effect: all viewports remain in their startup/default Wireframe display mode.
Any ideas?
(Supplementary question: how do I get a list of ALL viewports, not just the Active or Main one?)
Thank you
Peter Schwenn
AMTC Stevensville MD