PDA

View Full Version : Control the perspective viewport?


slebed
12-27-2007, 04:23 AM
Is it possible to control the perspective viewport through maxscript, in the sense of position where the viewport is looking at, and its orientation?

Thanks

scorpion007
12-27-2007, 04:36 AM
You can manipulate the viewport's transform using viewport.GetTM() and SetTM().

You can make use of the existing matrix functions to change the rotations, etc.

Look up the viewport methods in the reference.

slebed
12-27-2007, 05:14 AM
Yeah thanks! I foolishly posted this and then opened up the maxscript reference and saw it there. Granted it was just added in this release.

Thanks again.

scorpion007
12-27-2007, 05:43 AM
Which release are you using? I think it's been there since at least Max 6-7 or so, maybe earlier.

Bobo
12-27-2007, 10:30 AM
Which release are you using? I think it's been there since at least Max 6-7 or so, maybe earlier.

I might be wrong, but the get/setTM() methods have been there since day one.
Max 2008 added ways for controlling portions of the matrix via separate pan, zoom and orbit-related methods.

slebed
12-27-2007, 06:15 PM
Right again guys. I was going over the page and saw the added stuff for 2008, like <boolean>viewport.rotate <quat> [center:<Point3>]

I hadn't realised the rest had already been there.

CGTalk Moderation
12-27-2007, 06:15 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.