PDA

View Full Version : Cycle viewports script care of BOBO


PokeChop
03-18-2005, 03:07 PM
Bobo wrote this script so I could assign my spacebar to cycle through the viewports. I have been using it for awhile now and really like it. Thought I would include it in the scripts section for everyone, if you would like to try it also. You can also change the "viewNames = #" line to cycle other views too, like right or bottom. So the spacebar cycles the:

P = Perspective
L = Left
T = Top
B = Back


macroScript CycleView category:"Forum Help"
(
viewNames = #(#view_persp_user, #view_left, #view_top, #view_back)
theType = findItem viewNames (viewport.getType())
theType += 1
if theType > viewNames.count do theType = 1
viewport.setType viewNames[theType]
)


*Copy.
*Paste into a new Script Editor.
*Evaluate (Ctrl+E)
*Assign whatever shortcut you want to CycleView in the "Forum Help" category.
*Press the shortcut to cycle the current view.

SamSed
03-18-2005, 04:07 PM
i love it , thanks for sharing :thumbsup:

Bobo
03-18-2005, 07:04 PM
Just a note:

Here are all possible values for viewport types as seen in the MAXScript Reference:

#view_top -- Top

#view_bottom -- Bottom

#view_right -- Right

#view_left -- Left

#view_front -- Front

#view_back -- Back

#view_persp_user -- Perspective

#view_iso_user -- User

#view_camera -- Camera

#view_spot -- Light

#view_shape -- Shape

#view_grid -- Grid

You can place any combination of them into the array to switch to other views using the script.

PokeChop
03-19-2005, 03:46 AM
You still rock Bobo. Thank you very much for your help!

CGTalk Moderation
03-19-2005, 03:46 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.