How to add own display settings in Rhino 6?


In Rhino 5 I added a new display setting to my C++ PlugIn. Unfortunately the same code in Rhino 6 seems to have no effect. Here the code snippet:

// I have a new UUID CS_DisplayVariantUUID created before this...
   DisplayAttrsMgrListDesc *pAttrMgrDescCyberstrakDisplay = CRhinoDisplayAttrsMgr::FindDisplayAttrsDesc(CS_DisplayVariantUUID);

   if (!pAttrMgrDescCyberstrakDisplay)
      pAttrMgrDescCyberstrakDisplay = CRhinoDisplayAttrsMgr::AppendNewEntry(true, true, true);
   // try to modify background color
   pAttrMgrDescCyberstrakDisplay->m_pAttrs->m_eFillMode        = FBFM_SOLID_COLOR;
   pAttrMgrDescCyberstrakDisplay->m_pAttrs->m_SolidColor       = ON_Color(70, 60, 80);
   // update attribute manager
   bool bSuccess = CRhinoDisplayAttrsMgr::UpdateAttributes(*pAttrMgrDescCyberstrakDisplay);

I receive bSuccess = true , but the display mode does not appear in the Rhino View Menu like in Rhino 5. While I was able to find my own display mode in the Rhino 5 registry, I do not see it for Rhino 6.

Does it work differently in Rhino 6 ?

Thanks and best regards


You probably need to save the profile still. Check out the realtime renderer integration sample code here:

Most specifically line 162:

Thanks, adding this line made it!
I still wonder, why it did work in Rhino 5…

Btw, where is the ProfileContext stored in Rhino 6? I did a search in the registry, where I found it in rhino 5 but it did not show up.



This is no longer in the registry, but an XML file under %APPDATA%\McNeel\ somewhere.

Hi Nathan,
another question: Is there a call to find out, which of the advanced display settings is currently the active one?
E.g. instead of

DisplayAttrsMgrListDesc *pMyAttrMgrDesc = CRhinoDisplayAttrsMgr::FindDisplayAttrsDesc(MyDisplayModeUUID);

a call like

DisplayAttrsMgrListDesc *pCurrAttrMgrDesc = CRhinoDisplayAttrsMgr::FindCurrentDisplayAttrsDesc();

Many thanks

Ask the active view (CRhinoView) for its DisplayAttributes. The CDisplayPipelineAttributes instance gives you the UUID to query with.

Yes, it works.
Thanks you again for the quick response.