GET displayModeOverride for a specific object? [RhinoCommon python]


(Vincent Shen) #1

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.


(Vincent Shen) #2

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.


(Vincent Shen) #3

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.


#4

@vincentfs, does that help ?

c.


(Vincent Shen) #5

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.


#6

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 ?

c.


(Dale Fugier) #7

Use Rhino.DocObjects.ObjectAttributes.HasDisplayModeOverride.


#8

@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.

c.