PDA

View Full Version : viewport focus


drunkirishmic
03-05-2003, 03:22 AM
is there a way to focus on a viewport just by rolling over it like in maya and xsi?

drunkirishmic
03-05-2003, 05:42 AM
nvm, found it

here is the script in case anyone needs it, thank to bobo

macroScript MouseViewTracker category:"Bobo_s Tools"
(
rollout timer_rollout "MouseViewTrack"
(
timer mouse_clock interval:100 active:true
button close_it "CLOSE MVTracker"
on close_it pressed do destroyDialog timer_rollout
on mouse_clock tick do
(
local mpos = mouse.screenPos
local mid_x = 500
local mid_y = 500
if viewport.getLayout() == #layout_4 then
(
if mpos.x < mid_x and mpos.y < mid_y then viewport.activeViewport = 1
if mpos.x < mid_x and mpos.y > mid_y then viewport.activeViewport = 3
if mpos.x > mid_x and mpos.y < mid_y then viewport.activeViewport = 2
if mpos.x > mid_x and mpos.y > mid_y then viewport.activeViewport = 4
)
)
)
try(destroyDialog timer_rollout)catch()
createDialog timer_rollout 140 30 0 150
)

CGTalk Moderation
01-14-2006, 01:00 PM
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.