[Closed] script mouse pan zoom?
how do I control pan and zoom. will mouse scripting do it ?
I would need to
1 save the state of the mouse
2 switch to pan mod using “max pan”
3 put the mouse pointer in the scene
4 simulate a left mouse button down
5 Move the mouse a certain amount causing a paning of the scene
6 simulate a left mouse up
7 put the mouse back where it was
8 return it to its previous state
or is there a easier way to do it?
thanks
dazza111 (3dsmax6)
Take a look at “Accessing Active Viewport Info, Type, and Transforms”
<boolean>viewport.pan <float> <float>
<boolean>viewport.zoom <float>
<boolean>viewport.zoomPerspective <float>
<boolean>viewport.rotate <quat> [center:<Point3>]
Available in 3ds Max 2008 and higher.
[color=white][/color]Don’t see why you would like to simulate anything with the mouse though.
[color=white][/color]
if the viewport has a camera (viewport.getcamera()), just move the camera. If it doesn’t, use viewport.setTM() to manipulate the viewport’s transformation matrix directly.