Animate transition from one perspective to another

When I set the a new view plane, the viewport switches directly to that new view, which can be disorienting to the user. I was thinking it would be nice to do some kind of animation flyby to get to the new view. Is there a simple way to do this?

Thanks,
Sam

I don’t know of a “simple” way of doing this. But it is certainly do-able.

The NamedView command has an Animation option that you can use when restoring. RhinoCommon’s NamedViewTable allows you to restore views in animated mode. Search the online help file for RestoreAnimated.

Beyond this, you’ll need to cook something up yourself.

Thanks Dale,

I’m trying to understand the RestoreAnimated command. The first item that gets passed to it is an integer, I’m assuming this is the index of a view? The second item is a view. I’m not sure if these somehow fit into what I was imagining this command would do: Restore a view to a previously saved view.

I can’t imagine the below is remotely correct for doing what I want to do, but just trying to start somewhere…

Dim PerspectiveViewIndex = Rhino.RhinoDoc.ActiveDoc.NamedViews.FindByName(“Top”)
Dim Result = doc.NamedViews.RestoreAnimated(PerspectiveViewIndex, Rhino.RhinoDoc.ActiveDoc.Views.ActiveView, False, 10000, 1)

Also, while trying to dig up some info, I came across this post that said restore was not working. I’m hoping this isn’t a problem for the restore animated command.

Can you please point me in the right direction?

Thanks,
Sam

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsRestoreNamedView.cs

That is sleek! Exactly what I was looking for!

Thanks,
Sam