Views + zoom

6 votes
Version: 
2.1
Date Updated: 
03/16/2016
Author Name: 
Nikolay Litvinov

v2.1 Fixed bug of align view to face

"Video 1"

"Video 2"

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.

Tip: Assign these scripts to buttons of NumPad. Very convenient. Советую назначить эти скрипты на кнопки NumPad. Очень удобно.

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, и после этого скрипт при переходе в каждый вид будет скрывать все референсы, не относящиеся к этому виду и показывать соответствующий

Version Requirement: 
9+
AttachmentSize
views_zoom.mzp1.31 KB
views_zoom_v2.1.mzp2.96 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Nik's picture

Thanx

But I use my script without rollout dialog on NumPad buttons

barigazy's picture

...

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

barigazy

Nik's picture

Aa is the same, but the script easier?

thanx, i try.

barigazy's picture

...

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:#()

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.