Wish: Automatic temporary switch of the display mode

It’s extremely inconvenient to constantly switch between display modes for a few seconds just to be able to see what’s going on in with the objects during commands like rotate, rotate 3d, scale, move, orient, etc… I propose to enable customizable option for all the major commands that modify the objects. Ideally, this should be enabled or disabled per each command individually, so that the user could turn off this option for select tools and enable it for 1-2 other tools.

Then, the user could choose which display mode will be secondary and automatically enabled while the command is running. Once the command ends, Rhino reverts to the previously used display mode.

I will give you a very good example with the ! _Rotate3D command. Here I want to rotate a pipe around a line (using the Gumball to do so is unreliable, especially on non-circular objects with random center of rotation). Once I start the command, my view is completely blocked due to the inability of Rhino to show me the line through the render mesh of the pipe.

Here comes the solution proposed here. Once the Command line asks me to pick a rotation axis, Rhino should switch to the secondary display model chosen by me (in this case, it’s “Ghosted V2” which could be downloaded from the link below). That gives me the ability to see through the geometry of the pipe and snap to the white line to use as a rotation axis.

Now that the rotation is completed, Rhino switches to the previous shaded view.

Or maybe a macro could be made to switch to a specific display mode during the execution of that command and others? I made it work up until it switches to the desired display mode, but I’m not certain how to tell Rhino to revert to the previous display mode after the rotation is ended.
! _Rotate3D Pause SetDisplayMode Mode=GhostedV2

This one does not work properly:
! _Rotate3D Pause SetDisplayMode Mode=GhostedV2 Multipause SetDisplayMode Mode=UseLast

Ghosted V2.ini (13.2 KB)

Hi Bobi, are you familiar with a heavy file size ( over a gig.) and let’s say you’re in shaded mode. You make a move or rotation with a 3D connexcion space mouse and the whole thing goes to wireframe while in that rotation move and then it reverts back to shaded when the move is complete? Is this similar to your idea ?
Maybe when points are active the display should go to wireframe automatically.
I bet Pascal would have come up with some script.
Keep the ideas coming. Hope someone is listening.-Mark

1 Like

My idea is to switch to a custom display mode only during the execution of specific commands, then revert to the previous display mode. As I showed in my screen-shots above, this lets me see the line that was hidden behind the pipe, while the geometry is still visible, because it’s semi-transparent. :slight_smile: A wireframe display mode would not let me see the pipe meanwhile.

Rhino has an option to display the objects as wireframe boxes while manipulating the camera, but this is way too drastic for my linking. I simply want to be able to see through the geometry for a brief moment while I click reference points for the axis.

Unfortunately, I can’t find any command to revert to the previous display mode in the Rhino documentation:

P.S. You are probably right that Pascal would make a proper macro super quickly. It’s pity that he is no longer here to help…

hi Bobi,

Maybe you will find this helpful - an one-shot toggle of Xray wires for any currently used display mode. You can put this macro on any key shortcut and run as needed, including inside the commands:

SetRedrawOff -_RunScript (Call Rhino.ViewDisplayModeProperty(Rhino.ViewDisplayModeEx(), "XrayAllObjects", Not Rhino.ViewDisplayModeProperty(Rhino.ViewDisplayModeEx(), "XrayAllObjects")) ) SetRedrawOn

It will toggle the “see thru” wires feature for the current display mode.
Maybe you will have some luck to experiment with including this into a specific commands macros like you did above to avoid extra clicks, I did not get a chance to play with that idea yet.

hth,

–jarek

1 Like

Looking more closely into this, here are two more options:

XrayToggler.rvb (866 Bytes)
Use the above script in your macros to “encapsulate” the commands you want to automatically turn on/off the Xray per display mode. To install, save the file on your HD, then drag-and-drop into Rhino. Now the XrayToggler command will be available.

The way it works is you would need to create aliases with macros for the commands you want this behavior, like this:
Alias “r3” could be:XrayToggler "_Rotate3D"
Alias “mv” could be: XrayToggler "_Move _V"
etc. (use " " for any macros with mutliple words)

Another option, closer to your original request:
DMToggler.rvb (822 Bytes)
(install instructions same as above).

With this one your encapsulating macros for commands need to contain the display mode name you wish to switch to during the command, and then revert back to the original display mode:
Alias “r3” could be: DMToggler Wireframe "_Rotate3D"
Alias “mv” could be: DMToggler Wireframe "_Move _V"

I did not test this extensively but with a few quick attempts it seemed to be OK over here.

–jarek

2 Likes

I just tried that, but it actually affects my current display mode and turns it into an X-Ray mode permanently for the next commands (unless I run the macro again to revert the original shading).

The idea is to be able to temporarily switch to a custom display mode (not X-Ray) during select programs, then revert to the previous display mode upon completion of the command.

The bad thing about X-Ray is that it renders the geometry in the same shaded colour, which makes the entire scene look very flat and hard to distinguish the volumetric details such like holes and channels. It looks like a complete mess.

Here is a direct comparison between X-Ray and Ghosted V2. You will notice that the holes and other details become nearly invisible in X-Ray, while Ghosted V2 keeps these features visible and with a gentle highlight to distinguish them from the main model.

The idea with this one is to have a key/alias shortcut to toggle the “see thru all wires” (or Xray) setting in current display mode. Its not really using Xray mode, rather the current mode see/no see all wires. And yes, you need to run it once to activate, and again to deactivate. If this is not cutting it for you, maybe try the display mode script from the 2nd post.

The second script works when I put “Ghosted V2” in command in the Aliases option. However, this only works with aliases, which may be helpful to those who actively use them.

I use a 3d mouse and my goal is to be able to trigger “Ghosted V2” automatically when I run commands from their toolbar icons. Is it possible to include that into the icon’s command itself, without the need to type an alias from the keyboard?

P.S. How to uninstall DMToggler from my Rhino 7?

Yes, you can Ctrl+Shift click the Icon to edit its macros, so for Rotate3D, you would replace !_Rotate3D there with DMToggler "Ghosted V2" "_Rotate3D"

Go to Rhino Options > Scripting, then find and delete it from the list of scripts to load when Rhino statrs. Also, just find it in the Aliases list in Options and delete DMToggler there as well.

1 Like

I tried that, but it brings the following warning message:

Edit: I restarted Rhino, downloaded the script again, installed it, restarted Rhino and now it works properly. :slight_smile: Great job! Exactly what I was looking for. Thanks!