algorithmic modeling for Rhino
I was wondering if it was possible to change the transparency of the ghosted view via script/macro. The way you can do through rhino is using the menu DocumentProperties / view / display mode / ghosted / transparency. Do you reckon there is any way to do it while working on a python script with a rhino command?
Thanks in advance
While there's some SDK access to display mode properties via Rhino.Display.DisplayModeDescription, the ghosted transparency display does not appear to be something you can modify. I could be wrong though - you might have better luck asking around the discourse forum since this isn't strictly Rhino-related.
As Andrew mentions transparency in display modes doesn't seem something you can modify at least directly. I had a quick look at the SDK but I couldn't find an easy solution. Discourse is definitely the place to look.
I modified an old C# script I was using to change the display width of curves in my viewport. Please refer to this for at least the logic of trying something similar with other attributes.
import Rhino.Display as rd
# creat some empty arrays
display_modes = 
display_modes_names = 
#retrieve the list of Display modes on the document
display_modes = rd.DisplayModeDescription.GetDisplayModes()
#find out their names
for i in range(len(display_modes)):
#pick the display style that you want
for j in range(len(display_modes)):
if display_modes_names[j] == y:
disp_index = j
selected_mode = display_modes[disp_index]
if x == True:
selected_mode.DisplayAttributes.CurveThickness = z
print("Changed the display option settings for visual style : " + y)
selected_mode.DisplayAttributes.CurveThickness = 0
print(y+ " Display style reset to default settings")