Interface: IAutoCamMax

NEW in 3ds Max 2017: This Core Interface exposes the new viewpor navigation Pivot Ball gizmo which allows the orbiting about a hit point under the mouse cursor, or about a locked point in space.

Properties:

None

Methods:

<void>IAutoCamMax.ShowPivotBall <HWND>hwnd <&point2>center <&point3>mouse <boolean>useMousePoint
       center is In and Out parameter
       mouse is In and Out parameter

Shows the viewport navigation Pivot Ball in the specified viewport.

The first ‘hwnd’ argument specifies the viewport by its Windows handle – see viewport.getHWND() for details.

The second ‘center’ by-reference argument supplies the 2D screen position of the Pivot Ball.

The third ‘mouse’ by-reference argument will contain the 3D mouse position of the Pivot Ball.

When the fourth ‘useMousePoint’ Boolean argument is set to False, the Pivot Ball will use the 2D center position. When set to True, the 3D mouse point will be used.

<void>IAutoCamMax.HidePivotBall <HWND>hwnd

Hides the viewport navigation Pivot Ball in the specified viewport.

The ‘hwnd’ argument specifies the viewport by its Windows handle – see viewport.getHWND() for details.

<void>IAutoCamMax.SetHoldPivotBallPosition <boolean>hold

Locks the viewport navigation Pivot Ball to its current 3D world position to provide a static point of interest for viewport orbit operations.

When the argument is True, the Pivot Ball will be locked to its position and will not change the position if viewport navigation operations are performed.

When the argument is False, the Pivot Ball will be unlocked and will update dynamically (default behavior).

Actions:

None

Example
centerPoint = [0.5,0.5] --use the center of the viewport
mousePoint = [0,0,0]
--Show the Pivot Ball at the center of the active viewport:
IAutoCamMax.ShowPivotBall (viewport.getHWnd()) &centerPoint &mousePoint false
redrawViews()   --redraw the views to see the Pivot Ball
p = point pos:mousePoint --create a Point helper at the Pivot Ball position
 
IAutoCamMax.SetHoldPivotBallPosition true --lock the Pivot Ball at its current position
 
IAutoCamMax.HidePivotBall (viewport.getHWnd()) --	hide the Pivot Ball of the active viewport