Change all curves color in Renderd DisplayMode


I’m trying to change in RhinoCommon the curve’s color only in Rendered Display mode, like that:

so I tried this unsuccessfully:

        var displayModes = Rhino.Display.DisplayModeDescription.GetDisplayModes();
        if (displayModes == null) return;
        foreach (var dp in displayModes)
            if (dp.EnglishName != "Rendered") continue;
            dp.DisplayAttributes.CurveColor = Color.Black;
            var result = Rhino.Display.DisplayModeDescription.UpdateDisplayMode(dp);

And also that:

        var renderedDp  =Rhino.Display.DisplayModeDescription.GetDisplayMode(Rhino.Display.DisplayModeDescription.RenderedShadowsId);
        renderedDp.DisplayAttributes.CurveColor = Color.Black;
        var res = Rhino.Display.DisplayModeDescription.UpdateDisplayMode(renderedDp);

Do you know a way to change it?, it seems like the problem is there is no way using RhinoCommon to change “Curve Color Usage” from “Use object’s color” to “Use single color for all curves”, or at least I’m not able to find it.

Thanks and Best Regards

Hi @henrydm,

In C++, this property is CDisplayPipelineAttributes::m_bSingleCurveColor, which is not exposed in RhinoCommon. I’ve make a YouTrack item to get this added.

– Dale

Thanks @dale!