Hello
,
I have a custom display conduit I use for previewing objects in special ways where I have more stylistic control over how to display each Rhino Object type.
This is all working great but because there is already the default Rhino display conduit active in the viewport scene, I do get some overlap particularly on selection events where Rhino shows the default “yellow selection” and my conduit, for simplicity of this question, wants to show “purple”.
Obviously I could change the selection color in the Rhino Document Properties but again, I’m doing more nuanced graphics to my conduit then just changing the color.
So, my question is, since I know I’m in a different viewport, how can I disable or completely override the “default” Rhino display conduit?
Here you can see the “Violet” color applied to an object on selection but the default Rhino yellow selection is ALSO showing at the same time. I want to only show the Violet and handle all the conduit attributes myself.
Here’s an example of my PreviewAttributes for my conduit:
class Display():
conduit = None # Instantiate the conduit variable
conduits = {}
class PreviewAttributes:
def __init__(self):
self.ObjectColor = Color.Black
self.ColorSource = Rhino.DocObjects.ObjectColorSource.ColorFromObject
self.WireDensity = 1
self.LayerIndex = -1
self.CurveThickness = 10
self.PointStyle = Rhino.Display.PointStyle.ControlPoint
self.PointPixels = 3
self.TextColor = Color.White
@staticmethod
def Selected():
attr = Display.PreviewAttributes()
attr.CurveColor = Color.Violet # Default is Color.Yellow and I want to only see this version of selected and not the default Rhino selected yellow in addition
attr.ObjectColor = Color.Violet
attr.ColorSource = Rhino.DocObjects.ObjectColorSource.ColorFromObject
attr.TextColor = Color.Black
return attr
Thank you for your help!!
