Restore Title View

Hi, I think it would be good to add a 'RestoreTitleView. command.
It would restore the current viewport title view, if found in the NamedViews list (or even generic Top, Font, etc.)

Currently after modifying the original view angle we constantly need to restore it to evaluate the scene from the correct angle. That command would come handy as button/alias to quickly get back to original view without hard-coding the view names is macros, buttons etc.

It is scriptable now but seems like an essential need in core Rhino.

thanks,

–jarek

Hi @stevebaer - I wrote a script that does the above and making it a part of the toolset plugin we are using.
This is another example where the compiler problem getting in the way of workflow - we’d like to use the script often while being in-command. The ‘new’ compiler (not that new anymore, and the problem is getting old) does not allow the plugin commands to run inside running commands. This used to work with old compilers (Monkey). Could you guys finally fix it?
A lot of scripted tools that are compiled are much less usable because of it. This one is a very good example.
@DavidRutten, @dale - anyone help please ?

thanks,

–jarek

Hi Jarek - just so you don’t feel completely abandoned - there is at least some discussion ‘on the side’ on this…

-Pascal

Hi Pascal, thanks, and yes, I do feel quite abandoned on this one…(if you are talking about the compiler fix, not the command idea). It effectively discourages me from publishing any new scripted plugin tools.

As for the topic command : If anyone is interested, here is a script that for now takes care of the original idea of RestoreTitleView. Save on your HD and drag-and-drop. Then RestoreTitleView alias will be added.

Over here I have it set as Ctrl+Q shortcut as RestoreTitleView to quickly get back to saved view and then have Ctrl+Shift+Q as _UndoView to get back to where I was if needed. Can’t believe I did not come up with it earlier it is so handy…and that Rhino does not have it built-in by now. It also somehow addresses the issue many novice Rhino users struggle with where the title of the view is not the actual view that is saved…

RestoreTitleView.rvb (908 Bytes)

I looked around on YT to find the bug report on this one but I couldn’t find it. I must be looking in the wrong place because this has come up so many times before.
Just to make sure it’s there, I’ve made a new issue: RH-38817.

Hi Jarek,

I use your little tool all days and it’s a great helper. Thank you very much.

Do you have seen - the last Rhino update break it, an error message popup with a run time error. If you find some time it could be nice if you could update the code please.

Best-
Micha

image

hi Micha,

Which Rhino 6 SR are you using? I haven’t updated recently so I did not see any errors.
So it will simply not run at all, always the same error ?

–jarek

I updated yesterday - first time after a long time and it’s Version 6 SR21
(6.21.19351.9141, 17.12.2019)

OK, thanks - I am still on 18 in v6 (paused updates for time-sensitive work to avoid surprises like these :wink: ) I will install on another computer and take a look/let you know.

cheers,

–jarek

1 Like

Hi Micha, I just updated to SR22 and tested the script - all seems to be working fine…
Maybe the location of your script file changed?
Please try to save the rvb file on your HD and drag-and-drop it to Rhino vport before trying to run the RestoreTitleView command. It only works if the file is in the same location as the original drag-and-drop.
What it does is adding an alias to the last loaded script file.

any luck ?

–jarek

1 Like

Hi Jarek,

sounds good. :slight_smile:

Where can I find the new script? At post #4 above?

-Micha

yup, that’s what I was testing it with.

Great, works without any problem. Thank you very much for the tool and the quick fix. :slight_smile:

Glad to hear it works again on your end. It’s such a simple yet super useful tool, I use it constantly. Still not a part of Rhino…
I made it a part of the Sparrow plugin, too so I have it configured under Alt+MMB-click now…

-j

1 Like

I tried to fix an issue and updated. Bad news - it’s broken again. Now at Rhino 6.22.20028.13281 28.01.2020.

(If I remember me right it was broken before I updated. Can it be?)

Hi Micha, did you try the same thing to fix? (save the script on your HD and drag-and-drop into Rhino?)

1 Like

You are right, it works. I don’t know why Rhino forget to use this version, since it is saved at the hard disk and not changed.

Sorry for asking again. :wink:

Hi @Jarek,

your script is great, I use it all days. Do you know why the title shows the “*” always after a restore? Do you know a solution?

-Micha

Hi @Micha,

I have noticed that as well and I don’t know why this is happening. Looks like when the view is restored by RhinoScript method, the asterisk stays there even if the exact same view was restored.
I also have same problem with NamedViews that use 2PointPerspective projection - even when restored from NamedViews panel, they keep the asterisk on.

@Dale, @andy - maybe you can take a look at this.
Rhino.RestoreNamedView method in RhinoScript is what is being used to restore views that keep showing the asterisk.
And here is a test file - over here when I restore the 2pointperspective views (Z1,Z2) from the NamedView panel, the title still shows as “modified”/asterisk:
RestoreView_TEST.3dm (1.9 MB)

thanks,

–jarek