ScriptSpot

Script

Views Rotation + Auto Zoom Extents

By Nik · Credited author: Nikolay Litvinov · 2013-03-05

Version
2.17
Version requirement
9+
Date updated
2021-07-05
Votes
7
Description

Assign these scripts to buttons of NumPad. Left=Num4, Right=Num6, Front=Num5, Top=Num8, Bottom=Num2.
Удобно назначить эти скрипты на кнопки NumPad таким образом, что Left=Num4, Right=Num6, Front=Num5, Top=Num8, Bottom=Num2


Now is not necessary to press the Zoom Extents Selected, when switching of view.
Теперь не надо нажимать Zoom Extents Selected когда переключаешь вид.

Additional Info

Install: Drop *.ms to viewport and Restart 3dsMax. Перетащить *.ms во вьюпорт и Перезагрузить 3dsMax. v2.15.3: Fixed bug of align view under modifiers v2.15.3: Fixed bug of align view to face under modifiers v2.15.1: Added icons for XYZ aligne view v2.15: Fixed bug of align view by object pivot v2.14: Fixed bug of align view to edge v2.13: Fixed bug of align view to face under Edit_Poly modifier v2.1: Fixed bug of align view to face v2.0: Added rotate viewport to vertical/horizont by subobjects. Added rotate object (include shapes) to vertical/horizont viewport by subobjects. v1.5: Fixed Bugs and added hide ref for Perspective/Orthographic v1.4: Added Unhide-Hide References. v1.2: Combined Perspective and Orthographic Views in 1 button of switch. v1.1: Optimized code. v2.1: Исправлена ошибка выравнивания въюпорта к полигону. v2.0: Добавлено вращение въюпорта к вертикали/горизонтали от подобъектов. Добавлено вращение объекта (включая шейпы) к вертикали/горизонтали въюпорта от подобъектов. v1.5: Исправлены ошибки и добавлено скрытие референсов v1.4: Добавлено скрытие, открытие референсов. v1.2: Объединены виды Perspective и Orthographic в одну кнопку переключения. v1.1: Оптимизирован код. Unhide-Hide References If the scene has references, each type can be given an appropriate name F-Front L-Left, T-Top, B-Back, and then the script in the transition in each species will hide all references that are not related to this type and show the corresponding Если в сцене есть референсы, то каждому из видов можно дать соответствующее имя F-Front, L-Left, T-Top, B-Back, и после этого скрипт при переходе в каждый вид будет скрывать все референсы, не относящиеся к этому виду и показывать соответствующий
Attachments

Tags: align, Rotate, viewport, object, views, selected, switch, View, zoom, Extents

Comments (8)

locb · 2021-07-02

Убрал лишнее нажатие кнопки при работе, спасибо!

icon

old man · 2019-11-29

very useful thanks a lot could you please add an icon for (z - x - y) - view aliner we can Placement it into toolbar easily.

Added icons. I just use hotkeys.

Nik · 2019-12-06

.

update

old man · 2021-04-20

please update it with the latest version of (win 10) it has a problem. zoom view to select polygon and align to camera view does not work.

barigazy · 2014-07-30

U can use "with redraw off" context to avoid "jumpy" viewport.
Also avoid ViewCube struct operation. I wrote this a while ago.

try(destroyDialog ::zoomviewRoll)catch()
rollout zoomviewRoll ""
(
button btn_x "x" pos:[0,0] width:14 height:14 border:off
button btn_f "f" pos:[0,14] width:14 height:14 border:off
button btn_k "b" pos:[0,28] width:14 height:14 border:off
button btn_l "l" pos:[0,42] width:14 height:14 border:off
button btn_r "r" pos:[0,56] width:14 height:14 border:off
button btn_t "t" pos:[0,70] width:14 height:14 border:off
button btn_b "b" pos:[0,84] width:14 height:14 border:off
button btn_p "p" pos:[0,98] width:14 height:14 border:off
button btn_o "o" pos:[0,112] width:14 height:14 border:off

on btn_x pressed do destroyDialog zoomviewRoll
on btn_f pressed do with redraw off (viewport.setType #view_front ; max zoomext sel)
on btn_k pressed do with redraw off (viewport.setType #view_back ; max zoomext sel)
on btn_l pressed do with redraw off (viewport.setType #view_left ; max zoomext sel)
on btn_r pressed do with redraw off (viewport.setType #view_right ; max zoomext sel)
on btn_t pressed do with redraw off (viewport.setType #view_top ; max zoomext sel)
on btn_b pressed do with redraw off (viewport.setType #view_bottom ; max zoomext sel)
on btn_p pressed do with redraw off (viewport.setType #view_persp_user ; max zoomext sel)
on btn_o pressed do with redraw off (viewport.setType #view_iso_user ; max zoomext sel)
)
createDialog zoomviewRoll 14 126 5 140 style:#()

Aa is the same, but the script easier?

Nik · 2014-07-31

thanx, i try.

barigazy · 2014-07-31

At first you probably not notice where is the tool. :)

Thanx

Nik · 2014-09-04

But I use my script without rollout dialog on NumPad buttons