How to change FOV in 3dsmax perspective window through Maxscript?

I need to access the FOV property of the perspective viewport. This is not the same as the FOV property associated with target and free cameras.

To access the FOV property not programmatically, right-click on the name of the viewport (at the top left of each viewport), go to the settings and in the "Perspective user view" section you can change the FOV.

+4
source share
1 answer

In 3ds Max 2008 and above, you can use

viewport.setFOV 50.0 

Change the field of view of the active viewport.

Check out “Accessing Active Viewport Info, Type, and Transforms” in MaxScript Help

So:

 Utility FieldOfView "Field of View" ( slider fov "Field of View" pos:[17,43] width:128 height:44 range:[25,100,viewport.GetFOV()] type:#float on fov changed val do ( viewport.setFOV val ) ) 

Creates the usual small Utility that will customize the field of view of the currently active viewport.

tk: @MSITStore: C: \ Program% 20Files \ Autodesk \ 3ds% 20Max% 202009 \ help \ maxscript.chm :: / Accessing_Active_Viewport_Info_Type_and_Transforms.htm

+8
source

All Articles