Wish: RMB double click on viewport name to reload saved view

Hi,

for rendering I need to load the initial view of the current named viewport often after I manipulated objects and materials. It are quite a lot clicks through menus to load the current view again. Couldn’t a quick access be implement, for example per right mouse button double click on the viewport name?

Best-
Micha

Hmm. is that a thing? RMB double-click? Here is a Python that may help, for now:

import scriptcontext as sc


def RestoreNamedView():
    
    vp = sc.doc.Views.ActiveView.ActiveViewport
    name = vp.Name

    for n in range(sc.doc.NamedViews.Count):
        if sc.doc.NamedViews[n].Name == name:
            sc.doc.NamedViews.Restore(n,vp)
            sc.doc.Views.Redraw()
            break
    
if __name__ == '__main__':RestoreNamedView()

https://mcneel.myjetbrains.com/youtrack/issue/RH-55975

-Pascal

if you have named the views with numbers you can reload them just typing the number and enter.
I often use 1, 2 or 3 in the perspective view to do this.

Right click the viewport title - there’s a menu option right at the top. Isn’t this quick enough?

1 Like

Duh. There it is…

-Pascal

@andy Here I want to recall “Galleryperspektive”, but don’t see a quick click option.

@pascal A button script could be a nice first aid for the workflow. But it doesn’t run here. Is something wrong here:

! _-RunPythonScript (

import scriptcontext as sc

def RestoreNamedView():

vp = sc.doc.Views.ActiveView.ActiveViewport
name = vp.Name

for n in range(sc.doc.NamedViews.Count):
    if sc.doc.NamedViews[n].Name == name:
        sc.doc.NamedViews.Restore(n,vp)
        sc.doc.Views.Redraw()
        break

if name == ‘main’:RestoreNamedView()
)

For the feature wish - a single LMB click on the viewport name could do the job too, it’s not used yet. Maybe it’s better the RMB double click.

Also interesting could be to change the blue-grey name color to an other color like orange if the viewport doesn’t show the saved perspective anymore. So, the render users could see, if the perspective is not 100% right anymore.

Yes it is, unfortunately: single-click maximize (which I use all the time).

Philip

@Philip Here a double click is needed to maximize the viewport - did you customize it for double click?

Yes, that’s the default way to maximize. I don’t like double clicking, so I changed it here:

Philip

@Micha, maybe this will come handy - a script that restores the title view. I use is all the time, and have it on a handy keyboard shortcut. It could be done as an alias as well so you can run it while in-command:

(ignore the intro to my post - the complaint has been resolved now)

EDIT: I missed @Pascal’s script post - I guess then you have a solution there already.

–jarek

@Philip I see you use the Mac version. So, the restore function could use the opposite of this setting. :wink:

@Jarek Thank you very much for the tool, it works great and I set it to Ctrl+Q too now. :slight_smile:

I’m not so sure that would be a good idea… :sunglasses:

Philip

Hi Micha,

In Rhino 7, this looks like this:
image

Also in Rhino 7, there now is an * next to the name of the view when that no longer is the same as the Named View.

Apart from all that, a quick way to restore Named Views (apart from using simple names such as r1, v1 or even just 1, 2, 3 as Diego does) is to have the Named Views panel open and just double-click the name.
-wim

2 Likes