I need a command macro for a key to toggle wireframe/shaded viewport (rhino option>keyboard>command macro).
Please help me someone.
By default, Rhino has
Ctrl+Alt+X => X-Ray
Ctrl+Alt+S => Shaded
Ctrl+Alt+R => Rendered
Ctrl+Alt+W => Wireframe
Look in Options => Keyboard (see below)
Yes, I know it, but it takes too much time to press all these combinations. I want to set a toggle macro for (let
s say) F1 key. Once I press F1 the current viewport is shaded, next time its wireframe and so on… I don`t know how to make “_SetDisplayMode” toggle.
The easy way out of course would still be F1, F2, F3, F4.
Otherwise you could need to write a script, that either reads out the current type of view and changes based on that, or the script should store a number so it know’s at what part of your rotation it is.
I need a shaded/wireframe toggle macro that act as for example F7 to show/hide the grid (the macro is “noecho -_Grid _ShowGrid _ShowGridAxes _Enter”).
Is there a simple “macros like” way to do it?
I recently made a script for exactly this, it is in this thread
Mitch comes to the rescue. Again
Mitch, you’re my hero!)) Thank you again for your help! I assigned you script to F1 and everything works great! By the way - is it possible to assign your script to the key not listed in the rhino options/keyboard list? Let`s say to key X or Z?
Unfortunately, you cannot use single letter key shortcuts - mainly because Rhino thinks you’re typing a command at the command line - so, aside from the function keys and all their possible combinations with ctrl or shift or both, you can have ctrl+single letter combinations - but of course many of these are already used by the standard windows shortcuts. Ctrl + numbers are also available.
You can also program an alias, but that will require an Enter to execute.
Lastly, and not least, beware that a scripted solution, unlike the macroed view commands, has the disadvantage of not being able to be used while you’re inside another command. The script will interrupt any currently running command. Mostly this is not a hindrance, but for display based stuff, it might be.
Well) Finally I found the possibility to use single letter key shortcuts - via t-splines hotkeys. I needed shaded/wireframe toggle macro mainly for t-spline modelling, so I have set your script to a key Z and it’s very fast and comfortable now.
Well I though that someone could make a useful plug-in for Rhino that would assign any macro/script to any letter key with ready-made presets including some useful scripts like yours at user`s choice. Rhino is really lack of possibility to set up single letter hotkeys. I wish I could toggle top/perspective views with a single letter key shortcuts (not like now by clicking million times on these red car icons)…
you could always use mac rhino which has this ability (notice the Join shortcut here)
it’s like the wild west with mac and keyboard shortcuts… anything goes… control, option, shift, command- in any combination with any other key (ie- ⌃⌥⇧⌘Z)… or single key…
that said, i changed it back to ⌘J after this screenshot…
rhino (with its command field) isn’t really the best application for using single key shortcuts… it’s better if you use a modifier key or a one letter alias then the spacebar… once you get used to hitting the spacebar to trigger a macro, it’s maybe a thousandth of a second slower than a single key…
ctrl+tab to cycle trough persp, top, etc.
To my regret I never experienced MAC so I have nothing to say, worked all my life on Windows-family OS. I like the way how T-Splines has realized it - as a stand-alone plug-in which could be easily turned on/off. In Off statement Rhino uses its own keyboard shortcuts/command line/aliases, in On statement I can use my own hotkeys assigned to any macros/scripts etc.
Thanks, Peter, I know that combination, but most of time I toggle between Top and Perspective View. Of course, if I have a bigger display (main is 19` only) or even 2 monitors system that wouldn’t be a problem. I could split the screen or assign every viewport to corresponding full screen monitor… but I can’t so I’m just trying to save time and efforts with all old stuff I have
Hi, Mitch! Is it possible to somehow modify your script to toggle between 2 commands?
'_SetView _World Top
'SetView World Top
’SetView World Perspective
I use the Viewport tabs to great effect when changing between them.
These change the viewport you are using where as the Red Car Icons change the view the viewport is using.
srry… that was more of a late-nite bad joke thing… (switch OS to use one key shortcuts – it was funny to me then and still sort of funny now but i get it that i have a weird sense of humor )
the stuff i said about one key shortcuts in rhino still stands though… it’s as if you’re fighting the UI in order to use them.