ScriptSpot

Forum topic · General Scripting

How to setup all the transform and zoom parameters of a viewport

By rodimus111 · 2011-06-21

Description

I want to create a restore point active view for later reuse. I use the following:

x=viewport.getTM()
viewport.setTM x

And it works for perspective view, but in orthographic view, zooms don't changes.

Ive been testing the viewport.GetScreenScaleFactor(). It reacts to the zoom changes in orthographic view, but I can't set that. I also tested the FOV, but again, nothing happends when it is set in ortho.

What Im missing?

Comments (2)

no way...

Anubis · 2011-06-21

the help is quite clear on that:


viewport.setTM
"setTM only operates on Perspective viewports"

viewport.SetFOV
"Works only with perspective and camera views"

rodimus111 · 2011-06-21

Yes. I thought.

I had hoped that there otherwise there is a way of doing the same thing.

Thanks anyway