Bug display pipeline

Hi,
I’m trying to change the object’s display color in a Displayconduit, but only the curves are colored, every surfaces remains unchanged:

Protected Overrides Sub PreDrawObject(e As DrawObjectEventArgs)

                Dim CurrentObjAnalysisColor As Color = Color.Pink

                e.Display.DisplayPipelineAttributes.ObjectColor = CurrentObjAnalysisColor
                e.Display.DisplayPipelineAttributes.CurveColor = CurrentObjAnalysisColor

                MyBase.PreDrawObject(e)
            End Sub

I’ve patched a dirty fallBack but it does not feel right to do this just to change a display color:

 Protected Overrides Sub PreDrawObject(e As DrawObjectEventArgs)

                Dim CurrentObjAnalysisColor As Color = Color.Pink

                'Color for selected objects
                If e.RhinoObject.IsSelected(False) Then CurrentObjAnalysisColor = Rhino.ApplicationSettings.AppearanceSettings.SelectedObjectColor

                'Apply analysis colors  if the object is not selected
                Dim Material As New DisplayMaterial(CurrentObjAnalysisColor)
                If e.RhinoObject.Geometry.ObjectType = DocObjects.ObjectType.Brep Then
                    e.DrawObject = False
                    e.Display.DrawBrepWires(TryCast(e.RhinoObject.Geometry, Brep), CurrentObjAnalysisColor)
                    e.Display.DrawBrepShaded(TryCast(e.RhinoObject.Geometry, Brep), Material)
                ElseIf e.RhinoObject.Geometry.ObjectType = DocObjects.ObjectType.Mesh Then
                    e.DrawObject = False
                    e.Display.DrawMeshShaded(TryCast(e.RhinoObject.Geometry, Mesh), Material)
                Else
                    If e.RhinoObject.Geometry.HasBrepForm Then
                        Dim b As Brep = Brep.TryConvertBrep(e.RhinoObject.Geometry)
                        e.DrawObject = False
                        e.Display.DrawBrepWires(b, CurrentObjAnalysisColor)
                        e.Display.DrawBrepShaded(b, Material)
                    End If
                End If
                e.Display.DisplayPipelineAttributes.ObjectColor = CurrentObjAnalysisColor
                e.Display.DisplayPipelineAttributes.CurveColor = CurrentObjAnalysisColor

                MyBase.PreDrawObject(e)
            End Sub

Is this a bug in rhino, or am I missing something?
Best regards

Hi @Matthieu_from_NAVINN,

I don’t have a quick answer to give you. So I’ve logged an issue so we can look into this.

https://mcneel.myjetbrains.com/youtrack/issue/RH-55177

– Dale

Ok, thanks @dale.
My current code can do the job, so I was just reporting to give feedback anyway.
Have a nice day