What code or command for translucency option on ghosted mode?

Hi,
@Helvetosaur

I have a button that runs the .py file from Mitch (referencing it from a D drive location)

what code needs to be added to offer a choice of translucency ?
At the moment…
I select object, I hit my button, code runs…
I choose ghosted ,
I wish to choose an amount of translucency, I bit more see through.

I need the next step to offer that.

How should I code the button after the reference line of :- ?

-_RunPythonScript "D:\RHINO 3D WORK AND ASSOC FILES\Plug-ins and Scripts\Helvetosaur setObjectDisplayMode makes a chosen object translucent all view and antidote\SetObjDisplayModeAllViewports.py

here is the .py file
SetObjDisplayModeAllViewports.py (1.8 KB)

and should anyone wish for this, here is the antidote ! for RMB
RemObjDisplayModeAllViewports.py (775 Bytes)

Maybe its best done with the code entirely in the button for what I ask ?

Steve

All this does is set the selected objects’ display mode to Ghosted, so you need to change the transparency setting in that mode (nothing to do with the script). Default is 35% IIRC, also not transparent enough for my taste, I have mine set to 60%.

Hi,
I was hoping some code could save a visit to the properties menu :grin:

could ever a code help skip that visit , or is it too complex to do so ?

Steve

Why?

speed. neatness,. one click not a few, etc . efficiency, and other such things when all controls are at ones fingertips.

Steve

Yes, but if someone gives you some code to run, it’s a black box/magic to you, so you will never know what it is doing. At least if you ‘manually’ go into Options for the various display modes and actually look at what the settings are, maybe you will understand it better and be able to repeat it later if necessary.

Why not just create a new ghosted display mode - say “Ghosted 50%” and save it. Then use it instead of the builtin ghosted? Like you and Mitch I frequently find more transparency useful so I created just such a mode and it works great.

Of course this would require an adventure into changing the line in Mitch’s script that sets the display mode, but I’m sure that you can master it.

2 Likes

Hi,
I still think it would be great to ahve access to the translucency during the command, and be able to apply 60% to one object, 40% to another etc.

However I will make clones of the display mode Ghosted and have ghosted60, ghosted40, ghosted80 and so on and select these instead.

That will mean a button per % mode, am I right ?

Steve

Yep.

Sorry I didn’t reply sooner. I’ve been away.