User Tools

Site Tools


DzViewportMgr

Manager class for all visible and non-visible 3D view ports.

More...

Inherits :

Enumerations

Methods

DAZ Script
voidactivateNextTool ()
voidactivatePrevTool ()
voidapplyStyleColors ()
DzViewToolfindTool ( String className )
DzUserDrawStylefindUserDrawStyle ( String name )
DzViewToolgetActiveTool ()
DzViewportgetActiveViewport ()
DzViewportgetCustomViewport ( Number which )
DzViewportgetDefaultViewport ( Number which )
BooleangetInvertMouseWheel ()
LayoutgetLayout ()
ViewMouseBtnAcceleratorgetMouseBtnAccelerator ( ViewOperation operation )
ViewMouseBtnAcceleratorgetMouseBtnAccelerator ( String str )
ViewMouseBtnAcceleratorgetMouseBtnAccelerator ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers )
ViewMouseBtnAcceleratorgetMouseBtnAccelerator ( Number mouseBtn, Boolean ctrl, Boolean alt, Boolean shift )
StringgetMouseBtnAcceleratorString ( ViewMouseBtnAccelerator accel )
StringgetMouseBtnAcceleratorString ( ViewOperation operation )
ViewMouseModifiergetMouseModifier ( String str )
ViewMouseModifiergetMouseModifier ( Qt::KeyboardModifiers modifiers )
ViewMouseModifiergetMouseModifier ( Boolean ctrl, Boolean alt, Boolean shift )
StringgetMouseModifierString ( ViewMouseModifier accel )
NumbergetNodeClickMode ()
NumbergetNumCustomViewports ()
NumbergetNumDefaultViewports ()
NumbergetNumTools ()
NumbergetNumUserDrawStyles ()
NumbergetNumViewCameras ()
NumbergetNumViewports ()
NumbergetNumViews ()
NumbergetNumVisibleCustomViewports ()
NumbergetNumVisibleDefaultViewports ()
NumbergetNumVisibleViewports ()
ViewOperationgetOperation ( ViewMouseBtnAccelerator accel )
BooleangetPropagateBackgroundColor ()
NumbergetRegionClickMode ()
DzViewToolgetTool ( Number i )
BooleangetUsePerPixelLighting ()
DzUserDrawStylegetUserDrawStyle ( Number which )
DzViewgetView ( Number which )
DzCameragetViewCamera ( DzCamera::CameraType type )
DzCameragetViewCamera ( Number which )
DzViewportgetViewport ( Number which )
voidrepaintActive3DViewport ()
voidresetViewCameras ()
voidsetActiveTool ( Number which )
voidsetActiveTool ( DzViewTool tool )
voidsetActiveViewport ( DzViewport activeView )
voidsetInvertMouseWheel ( Boolean onOff )
voidsetLayout ( Layout val )
voidsetMouseBtnAccelerator ( ViewOperation operation, ViewMouseBtnAccelerator accel )
voidsetNodeClickMode ( Number mode )
voidsetPropagateBackgroundColor ( Boolean onOff )
voidsetRegionClickMode ( Number mode )
voidsetUsePerPixelLighting ( Boolean yesNo )
voidsetViewRatios ( Number hSingle, Number h1, Number h2, Number vSingle, Number v1, Number v2 )
BooleanvalidateMouseBtnAccelerator ( ViewMouseBtnAccelerator accel )
BooleanvalidateMouseWheelAccelerator ( ViewMouseModifier accel )

Signals

Detailed Description

There is only one of these widgets in the application. This widget is created and owned by DzMainWindow, and can be accessed by requesting a pointer to it from DzMainWindow via DzMainWindow::getViewportMgr().

Enumerations


: Layout

The possible layout styles.

  • NO_PANES - No visible view ports
  • SINGLE_PANE - A single visible viewport
  • LEFT_RIGHT - 2 visible view ports split the view area into right and left
  • TOP_BOTTOM - 2 visible view ports split the view area into top and bottom
  • LEFT2_RIGHT - 3 visible view ports 2 on the left side and 1 on the right
  • LEFT3_RIGHT - 4 visible view ports 3 on the left side and 1 on the right
  • LEFT_RIGHT2 - 3 visible view ports 2 on the right side and 1 on the left
  • LEFT_RIGHT3 - 4 visible view ports 3 on the right side and 1 on the left
  • TOP2_BOTTOM - 3 visible view ports 2 on the top side and 1 on the bottom
  • TOP3_BOTTOM - 4 visible view ports 3 on the top side and 1 on the bottom
  • TOP_BOTTOM2 - 3 visible view ports 2 on the bottom side and 1 on the top
  • TOP_BOTTOM3 - 4 visible view ports 3 on the bottom side and 1 on the top
  • FOUR_PANE - 4 visible view ports one in each corner
  • NUM_LAYOUTS - Total number of layouts

—–

: NodeClickMode

TODO: Add description.

  • Node - TODO: Add description.
  • SkeletonThenNode - TODO: Add description.
  • Skeleton - TODO: Add description.

—–

: QDMode

The possible Quick Draw modes

  • QDOff - No Quick draw enabled.
  • QDWire - Wireframe Quick draw enabled.
  • QDSmooth - Smooth-Shade Quick draw enabled.

—–

: RegionClickMode

TODO: Add description.

  • Nested - TODO: Add description.
  • Flat - TODO: Add description.

—–

: ViewMouseBtnAccelerator

TODO: Add description.

  • NoAccel - TODO: Add description.
  • LeftClick - TODO: Add description.
  • RightClick - TODO: Add description.
  • MidClick - TODO: Add description.
  • AltLeftClick - TODO: Add description.
  • AltRightClick - TODO: Add description.
  • AltMidClick - TODO: Add description.
  • CtrlLeftClick - TODO: Add description.
  • CtrlRightClick - TODO: Add description.
  • CtrlMidClick - TODO: Add description.
  • ShiftLeftClick - TODO: Add description.
  • ShiftRightClick - TODO: Add description.
  • ShiftMidClick - TODO: Add description.
  • CtrlAltLeftClick - TODO: Add description.
  • CtrlAltRightClick - TODO: Add description.
  • CtrlAltMidClick - TODO: Add description.
  • CtrlShiftLeftClick - TODO: Add description.
  • CtrlShiftRightClick - TODO: Add description.
  • CtrlShiftMidClick - TODO: Add description.
  • AltShiftLeftClick - TODO: Add description.
  • AltShiftRightClick - TODO: Add description.
  • AltShiftMidClick - TODO: Add description.
  • CtrlAltShiftLeftClick - TODO: Add description.
  • CtrlAltShiftRightClick - TODO: Add description.
  • CtrlAltShiftMidClick - TODO: Add description.

—–

: ViewMouseModifier

TODO: Add description.

  • NoModifier - TODO: Add description.
  • Alt - TODO: Add description.
  • Shift - TODO: Add description.
  • Ctrl - TODO: Add description.
  • CtrlAlt - TODO: Add description.
  • CtrlShift - TODO: Add description.
  • CtrlAltShift - TODO: Add description.
  • ShiftAlt - TODO: Add description.

—–

: ViewOperation

TODO: Add description.

  • NoOperation - TODO: Add description.
  • OrbitCamera - TODO: Add description.
  • RotateCamera - TODO: Add description.
  • PanCamera - TODO: Add description.
  • DollyCamera - TODO: Add description.
  • BankCamera - TODO: Add description.
  • ZoomDCamera - TODO: Add description.
  • ZoomFCamera - TODO: Add description.

Methods


void : activateNextTool()

Sets the next tool in the list after the currently active tool to be the currently active tool.


void : activatePrevTool()

Sets the tool in the list before the currently active tool to be the currently active tool.


void : applyStyleColors()

Causes the color of each viewport to be set to their respective values, if the color is defined in the current style.


DzViewTool : findTool( String className )

Return Value:

  • The tool with the given class name - NULL if none exists.

DzUserDrawStyle : findUserDrawStyle( String name )

Return Value:

  • A new instance of the draw style with the given description, otherwise null

DzViewTool : getActiveTool()

Return Value:

  • The active view tool.

DzViewport : getActiveViewport()

Return Value:

  • The currently active viewport

DzViewport : getCustomViewport( Number which )

Return Value:

  • The custom viewport at the given index.

Since:

  • 4.7.1.104

DzViewport : getDefaultViewport( Number which )

Return Value:

  • The default viewport at the given index.

Since:

  • 4.7.1.104

Boolean : getInvertMouseWheel()

Return Value:

  • true if mouse wheel response in the view ports is currently inverted.

Layout : getLayout()

Return Value:

  • Current view layout.

ViewMouseBtnAccelerator : getMouseBtnAccelerator( ViewOperation operation )

TODO: Add description.


ViewMouseBtnAccelerator : getMouseBtnAccelerator( String str )

TODO: Add description.


ViewMouseBtnAccelerator : getMouseBtnAccelerator( Qt::MouseButton button, Qt::KeyboardModifiers modifiers )

TODO: Add description.


ViewMouseBtnAccelerator : getMouseBtnAccelerator( Number mouseBtn, Boolean ctrl, Boolean alt, Boolean shift )

TODO: Add description.


String : getMouseBtnAcceleratorString( ViewMouseBtnAccelerator accel )

TODO: Add description.


String : getMouseBtnAcceleratorString( ViewOperation operation )

TODO: Add description.


ViewMouseModifier : getMouseModifier( String str )

TODO: Add description.


ViewMouseModifier : getMouseModifier( Qt::KeyboardModifiers modifiers )

TODO: Add description.


ViewMouseModifier : getMouseModifier( Boolean ctrl, Boolean alt, Boolean shift )

TODO: Add description.


String : getMouseModifierString( ViewMouseModifier accel )

TODO: Add description.


Number : getNodeClickMode()

Return Value:

  • the node click mode for pick tools

Number : getNumCustomViewports()

Return Value:

  • The number of custom viewports.

Since:

  • 4.7.1.104

Number : getNumDefaultViewports()

Return Value:

  • The number of default (non-custom) viewports.

Since:

  • 4.7.1.104

Number : getNumTools()

Return Value:


Number : getNumUserDrawStyles()

Return Value:

  • The number of user selectable draw styles

Number : getNumViewCameras()

Return Value:


Number : getNumViewports()

Return Value:

  • The number of view ports in the application. Currently, this will always be 4, but it is safest to call this function to get the number of available view ports.

Return Value:

  • The total number of viewports.

Number : getNumViews()

Return Value:

  • The number of available view classes

Number : getNumVisibleCustomViewports()

Return Value:

  • The number of custom viewports currently showing.

Since:

  • 4.7.1.104

Number : getNumVisibleDefaultViewports()

Return Value:

  • The number of default viewports currently showing.

Since:

  • 4.7.1.104

Number : getNumVisibleViewports()

Return Value:

  • The total number of viewports currently showing.

ViewOperation : getOperation( ViewMouseBtnAccelerator accel )

TODO: Add description.


Boolean : getPropagateBackgroundColor()

Return Value:

  • Whether or not to propagate a background color change to all viewports.

Number : getRegionClickMode()

Return Value:

  • the region click mode for pick tools

DzViewTool : getTool( Number i )

Return Value:

  • The view tool at the given index.

Boolean : getUsePerPixelLighting()

TODO: Add description.


DzUserDrawStyle : getUserDrawStyle( Number which )

Return Value:

  • A new instance of the draw style at the given index

DzView : getView( Number which )

Return Value:

  • A new instance of the view class at the given index.

DzCamera : getViewCamera( DzCamera::CameraType type )

Return Value:

  • The View (non-animatable) camera of the given type.

DzCamera : getViewCamera( Number which )

Return Value:

  • The View (non-animatable) camera at the given index.

DzViewport : getViewport( Number which )

Return Value:

  • The viewport at the given index.

Note:


void : repaintActive3DViewport()

A convenience method that forces a repaint of the currently active 3D viewport.


void : resetViewCameras()

Resets all the view cameras to their defaults.


void : setActiveTool( Number which )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


void : setActiveTool( DzViewTool tool )

Sets the currently active 3D tool.


void : setActiveViewport( DzViewport activeView )

Set the active DzViewport. The given DzViewport must already be attached as an interface to this Scene.


void : setInvertMouseWheel( Boolean onOff )

TODO: Add description.


void : setLayout( Layout val )

Set the current layout. If we are in single pane mode, the new layout will take effect after single pane mode is switched off.


void : setMouseBtnAccelerator( ViewOperation operation, ViewMouseBtnAccelerator accel )

TODO: Add description.


void : setNodeClickMode( Number mode )

Set the click mode for node selection tools


void : setPropagateBackgroundColor( Boolean onOff )

Set whether or not a background color change of a single viewport should be propagated to the other viewports.


void : setRegionClickMode( Number mode )

Set the click mode for region selection tools


void : setUsePerPixelLighting( Boolean yesNo )

TODO: Add description.


void : setViewRatios( Number hSingle, Number h1, Number h2, Number vSingle, Number v1, Number v2 )

Sets the ratios that are used to layout the view ports inside the view area. Each value is a percentage of the available area that will be allocated to the given view port(s). The values passed in are clamped to valid ranges before applying them. The values should be specified in decimal notation - i.e. 0.0 is 0%, 0.5 is 50%, and 1.0 is 100%. The minimum percentage of the area allocated to any viewport on any axis is 20% (0.2). Therefore, any values that are below this value will be increased to this value, and any values that would result in a remainder less than this value will be decreased.

For example, when the view ports are laid out one right, and on left, there is one vertical division, so the vSingle value will be used. If the value of vSingle is 0.6 and the width of the view area is 1000 pixels, then the left view will be (0.6 * 1000) = 600 pixels wide, and the right view will be the remainder (1000 - 600) = 400 pixels wide.

In a more complex example, the viewports are laid out three on top, and one on bottom. There is one horizontal division, so the hSingle value is used, and two vertical divisions, so the v1 and v2 values are used. The value of hSingle is 0.35, the value of v1 is 0.3, the value of v2 is 0.5, and the view area is 1000 x 1000 pixels. Then, the top views will be (0.35 * 1000) = 350 pixels high, and the bottom view will be (1000 - 350) = 650 pixels high. The top-left view will be (0.3 * 1000) = 300 pixels wide, the top-center view will be (0.5 * 1000) = 500 pixels wide, and the top-right view will be (1000 - 300 - 500) = 200 pixels wide.

Parameter(s):

  • hSingle - The percentage of the height taken by the top view port(s) when the area has a single horizontal division
  • h1 - The percentage of the height taken by the top view port when the area has two horizontal divisions
  • h2 - The percentage of the height taken by the center view port when the area has two horizontal divisions
  • vSingle - The percentage of the width taken by the left view port(s) when the area has a single vertical division
  • v1 - The percentage of the width taken by the left view port when the area has two vertical divisions
  • v2 - The percentage of the width taken by the center view port when the area has two vertical divisions

Boolean : validateMouseBtnAccelerator( ViewMouseBtnAccelerator accel )

TODO: Add description.


Boolean : validateMouseWheelAccelerator( ViewMouseModifier accel )

TODO: Add description.

Signals


void : accelChanged( ViewOperation operation, ViewMouseBtnAccelerator accel )

TODO: Add description.


void : acceleratorsChanged()

TODO: Add description.


void : acitve3DViewCurrentDimensionsChanged()

TODO: Add description.


void : activeToolDrawnDataChanged()

TODO: Add description.


void : activeToolSwitched()

Signature:“activeToolSwitched()”

Emitted when the active tool changes


void : activeViewResized()

Signature:“activeViewResized()”

Emitted when the active view changes size


void : activeViewSwitched()

Signature:“activeViewSwitched()”

Emitted when the active view changes


void : contextMenuAboutToShow( DzMenu menu, Dz3DViewport view, Point pos )

Signature:“contextMenuAboutToShow(DzMenu*,Dz3DViewport*,QPoint)”

Emitted when the active viewport is about to display a context menu. Other objects can connect to this signal to add custom items to the menu that is displayed to the user.


void : drawElementsListChanged()

TODO: Add description.


void : graftDrawingChanged()

TODO: Add description.


void : invertMouseWheelChanged( Boolean onOff )

TODO: Add description.


void : manipFinished()

Signature:“quickDrawFinished()”

Emitted when a quick draw operation is finished


void : manipStarted()

Signature:“quickDrawStarted()”

Emitted when a quick draw operation is started


void : manipulationBindingChanged( Boolean onOff )

TODO: Add description.


void : nodeClickModeChanged( Number mode )

TODO: Add description.


void : propagateBackgroundColorChanged( Boolean onOff )

TODO: Add description.


void : quickDrawModeChanged( QDMode mode )

Signature:“quickDrawModeChanged(QDMode)”

Emitted when the quick draw mode changes


void : redrawsLocked( Boolean onOff )

Signature:“redrawsLocked(bool)”

Emitted when the redraw lock state changes


void : regionClickModeChanged( Number mode )

TODO: Add description.


void : subDManipulationChanged( Boolean onOff )

TODO: Add description.


void : toolListChanged()

Signature:“toolListChanged()”

Emitted when the tool list changes


void : viewLayoutChanged()

Signature:“viewLayoutChanged()”

Emitted when the layout of the view ports changes


void : viewportCameraListChanged()

Signature:“viewportCameraListChanged()”

Emitted when the global list of available cameras changes