GET displayModeOverride for a specific object? [RhinoCommon python]

I am trying to create a shortcut that does three things: match Layer, match displayMode, and match mapping. I am able to get the first one done. However, for the last two, I don’t have any clues to get them done. Is there any sample code that I can take a look?

Thank you.

For display override, I was able to find the SetDisplayModeOverride(DisplayModeDescription) method in ObjectAttributes Class, but I couldn’t find the method to GET DisplayModeOverride.

was able to modify the texturemapping by doing:
scriptcontext.doc.Objects.ModifyTextureMapping(GUID, channel, TextureMapping)

But I still couldn’t find a way to GET displayModeOverride for a specific object.

@vincentfs, does that help ?


Right now I am using this one as a makeshift. It only returns True/False, so I have to assume the object with displayModeOverride always use certain mode (say, render mode). It won’t match objects with override modes other than render mode.

Hi @vincentfs, ok i understand.

@stevebaer, is there a RhinoCommon method to get the display mode an object uses when it is overriding the viewport display mode ?


1 Like

Use Rhino.DocObjects.ObjectAttributes.HasDisplayModeOverride.

@dale, thanks but that seems to tell only that the viewport display mode has been overridden with True or False as pointed out above. I do not see a way to query an object for the display mode, which has been assigned to the object.