Scripting Sequoia UI Actions

Prerequisites

  • The following objects are implemented by the module Thinkbox.Sequoia.Actions
  • Before calling methods or accessing properties of these objects, you must ensure the module is imported:
import Thinkbox.Sequoia.Actions 1.0

Accessing Properties And Methods Of Action Objects

  • All objects listed below derive from the QAction class.
  • They expose all properties and public functions of QAction instances, but the following ones are the most useful within the context of Sequoia:

Properties

enabled : bool

iconText : QString

text : QString

toolTip : QString

visible : bool

  • To see all properties of an action in the Log, you can use the Reflection.methods() function:

Example:

console.log (Reflection.methods( CreatePointLoaderAction ));
  • In the following example, we will print the QAction properties and their values to the Sequoia Log in a more friendly layout:

Example:

import Thinkbox.Sequoia.Actions 1.0
var props = [ 'autoRepeat', 'checkable', 'checked', 'enabled', 'font', 'icon', 'iconText', 'iconVisibleInMenu', 'menuRole', 'priority', 'shortcut', 'shortcutContext', 'softKeyRole', 'statusTip', 'text', 'toolTip', 'visible', 'whatsThis' ];
var i = 0;
for ( i = 0; i < props.length; i++)
{
  var result = eval ('CreatePointLoaderAction.' + props[i] );
  console.log( props[i] + " --> "+ result );
}

Log Output:

STS: QML: autoRepeat --> true
STS: QML: checkable --> false
STS: QML: checked --> false
STS: QML: enabled --> true
STS: QML: font --> QFont(Source Sans Pro,10,-1,5,50,0,0,0,0,0)
STS: QML: icon --> QVariant(QIcon)
STS: QML: iconText --> New POINT LOADER
STS: QML: iconVisibleInMenu --> true
STS: QML: menuRole --> 1
STS: QML: priority --> 128
STS: QML: shortcut -->
STS: QML: shortcutContext --> 1
STS: QML: softKeyRole --> undefined
STS: QML: statusTip -->
STS: QML: text --> New &POINT LOADER...
STS: QML: toolTip --> Create A New POINT LOADER At World Origin And Browse For A Point File To Load...
STS: QML: visible --> true
STS: QML: whatsThis -->

Public Slots

  • The most important function exposed by a QAction .trigger()
  • It lets you trigger the Action and perform its function.

Example:

import Thinkbox.Sequoia.Actions 1.0
CreateViewportPanelAction.trigger();
  • The above will trigger the action and create a new Viewport panel.
  • This is equivalent to selecting the New VIEWPORT Panel Action from the Panels menu.

Node Creation Actions

CreatePointLoaderAction

  • Creates a new Point Loader object.
  • Corresponds to the Create a New Point Loader Object action available in the Create Objects toolbar / Create menu.

CreateRegionOfInterestAction

  • Creates a new Point Region Of Interest object.
  • Corresponds to the Create a New Point Region Of Interest Object action available in the Create Objects toolbar / Create menu.

CreateMeshingAction

  • Creates a new Mesher object.
  • Corresponds to the Create a New Mesher Object action available in the Create Objects toolbar / Create menu.

CreateUCSAction

  • Creates a new User Coordinate System object.
  • Corresponds to the Create a New User Coordinate System Object action available in the Create Objects toolbar / Create menu.

CreateMeshLoaderAction

  • Creates a new Mesh Loader object.
  • Corresponds to the Create a New Mesh Loader Object action available in the Create Objects toolbar / Create menu.

CreatePointSurfaceAction

  • Creates a new Surface Points object.
  • Corresponds to the Create a New Point Loader Object action available in the Create Objects toolbar / Create menu.

CreateTextureProjectionAction

  • Creates a new Image Projection object.
  • Corresponds to the Create a New Image Projection Object action available in the Create Objects toolbar / Create menu.

CreateMarkerAction

  • Creates a new Marker object.
  • Corresponds to the Create a New Marker Object action available in the Create Objects toolbar / Create menu.

CreateCameraAction

  • Creates a new Camera object.
  • Corresponds to the Create a New Camera Object action available in the Create Objects toolbar / Create menu.

Animation Settings Actions

CreateTransformTurnTableAction

  • Creates a new Turntable Animation node.
  • Corresponds to the Create a New Turntable Animation action available in the Animation Settings toolbar.

AddTransformKeyframeAction

  • Creates a new Keyframe in the Animation node if one is connected.
  • Also creates a new Keyframes Animation node if none is connected to the selected object(s),
  • Corresponds to the Create an Animation Keyframe action available in the Animation Settings toolbar.

Gizmo Mode Selection Actions

ObjectSelectionAction

  • Opens a modal selection dialog listing all object in the Active Document.
  • Obsolete, superseeded by the Document Explorer panel.
  • Not exposed in the UI.

GizmoModeSelectAction

  • Toggles the Select Tool.
  • Corresponds to the Select Tool action available in the Transform Tools toolbar.

GizmoModeTranslateActions

  • Toggles the Move Tool.
  • Corresponds to the Move Tool action available in the Transform Tools toolbar.

GizmoModeRotateAction

  • Toggles the Rotate Tool.
  • Corresponds to the Rotate Tool action available in the Transform Tools toolbar.

GizmoModeScaleAction

  • Toggles the Scale Tool.
  • Corresponds to the Scale Tool action available in the Transform Tools toolbar.

GizmoModeMeasureAction

  • Toggles the Measure Tool.
  • Corresponds to the Measure Tool action available in the Transform Tools toolbar.

Gizmo Space Mode

GizmoWorldSpaceModeAction

  • Toggles the World Space Transform Mode option.
  • Corresponds to the World Space Transform Mode action available in the Transform Tools toolbar.

GizmoObjectSpaceModeAction

  • Toggles the Object Space Transform Mode option.
  • Corresponds to the Object Space Transform Mode action available in the Transform Tools toolbar.

GizmoCameraSpaceModeAction

  • Toggles the Camera Space Transform Mode option.
  • Corresponds to the Camera Space Transform Mode action available in the Transform Tools toolbar.

View Tools

ZoomToExtentsAction

  • Zooms the Active View to the extents of all objects.
  • Corresponds to the Zoom Extents action available in the View Controls toolbar.

SetGlobalCameraAction

  • Toggles the Global View for the Active View, locking it to any other Views set to Global View.
  • Corresponds to the Global View action available in the View Controls toolbar.

SetPerspectiveCameraAction

  • Toggles Perspective / Orthographic projection of the Active View.
  • Corresponds to the Global View action available in the View Controls toolbar.

SetCameraDistanceClippingAction

  • Toggles Distance Clipping in the Active View.
  • Corresponds to the Distance Clipping action available in the View Controls toolbar.

Viewport Control Actions

ViewportCameraMoveForward

  • Moves the view forward along the -Z axis.
  • Only available as Keyboard shortcut.

ViewportCameraMoveBackward

  • Moves the view backward along the Z axis.
  • Only available as Keyboard shortcut.

ViewportCameraMoveRight

  • Moves the view to the right along the X axis.
  • Only available as Keyboard shortcut.

ViewportCameraMoveLeft

  • Moves the view to the left along the -X axis.
  • Only available as Keyboard shortcut.

ViewportCameraMoveForwardGround

  • Moves the view forward parallel to the ground plane.
  • Only available as Keyboard shortcut.

ViewportCameraMoveBackwardGround

  • Moves the view backward parallel to the ground plane.
  • Only available as Keyboard shortcut.

ViewportCameraMoveRightGround

  • Moves the view to the right parallel to the ground plane.
  • Only available as Keyboard shortcut.

ViewportCameraMoveLeftGround

  • Moves the view to the left parallel to the ground plane.
  • Only available as Keyboard shortcut.

ViewportCameraHome

  • Resets the Active View to the Home view, respecting the extents of the Home Grid.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

ViewportCameraFront

  • Switches the Active View to Front ortho projection.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

ViewportCameraBack

  • Switches the Active View to Back ortho projection.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

ViewportCameraLeft

  • Switches the Active View to Left ortho projection.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

ViewportCameraRight

  • Switches the Active View to Right ortho projection.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

ViewportCameraTop

  • Switches the Active View to Top ortho projection.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

ViewportCameraBottom

  • Switches the Active View to Bottom ortho projection.
  • Available as Keyboard shortcut
  • Available from the View options menu.
  • Available from the Bookmarks panel’s options menu.

Bookmark Controls

CameraNewBookmarkAction

  • Creates a new Bookmark from the Active View.
  • Corresponds to the large New Bookmark icon in the Bookmarks panel.

Display HUD Actions

SetTripodVisibilityAction

  • Toggles the Axis Tripod display in the Active View.

SetGridVisibilityAction

  • Toggles the Home Grid display in the Active View.

SetFPSVisibilityAction

  • Toggles the Frame Rate display in the Active View.

SetCameraFocusVisiblityAction

  • Toggles the View Focus crosshair display in the Active View.

Display Actions

SetPRTTextureAction

  • Toggles the Image Projections display on Points in the Active View.

SetMeshTextureAction

  • Toggles the Image Projections display on Meshes in the Active View.

SetPRTLightAction

  • Toggles the Lighting of Points in the Active View.

SetMeshLightAction

  • Toggles the Lighting of Meshes in the Active View.

SetRigLightAction

  • Toggles the 2-Lights Rig Illumination in the Active View.

SetHeadLightAction

  • Toggles the Head Light Illumination in the Active View.

SetWireFrameModeAction

  • Toggles the Wireframe display of Meshes in the Active View.

SetFlatShadingModeAction

  • Toggles the Flat Shading display of Meshes in the Active View.

File Menu Actions

FileNewDocumentAction

  • Creates a new Document.
  • Corresponds to the File > New Document menu item.

FileOpenDocumentAction

  • Opens the Open File dialog and loads the selected SQ Document.
  • Corresponds to the File > Open Document menu item.

FileCloseDocumentAction

FileSaveDocumentAction

  • Saves the Active Document.
  • Corresponds to the File > Save Document menu item.

FileSaveDocumentAsAction

  • Opens the Save As dialog for the Active Document.
  • Corresponds to the File > Save Document As... menu item.

FileCloneDocumentAction

  • Clones the Active Document.
  • Corresponds to the File > Clone Document menu item.

FileSaveViewportToImageAction

  • Saves the viewport’s image to disk as seen in the viewport.
  • Corresponds to the File > Save Viewport Image As > Planar Image... menu item.

FileSaveViewportToCubicImageAction

  • Saves the viewport’s to disk as a set of 6 cubic images.
  • Corresponds to the File > Save Viewport Image As > Cubic Image Maps... menu item.

FileSaveViewportToPanoramicImageAction

  • Saves the viewport’s to disk as a panoramic image.
  • Corresponds to the File > Save Viewport Image As > Panoramic Image... menu item.

FileSaveViewportToSphericalImageAction

  • Saves the viewport’s to disk as a spherica image.
  • Corresponds to the File > Save Viewport Image As > Spherical Image... menu item.

FileSaveViewportAnimationAction

  • Opens the dialog for saving the viewport animation as an image sequence.
  • Corresponds to the File > Save Viewport Image As > Image Sequence Animation... menu item.

FileExitAction

  • Exits the current Sequoia session.
  • If documents have been modified, prompts will appear for each one that requires saving.
  • Corresponds to the File > Exit Sequoia menu item.

Export Menu Actions

ExportMeshWorldSpaceAction

  • Corresponds to the File > Export Scene Data > Export Mesh In World Space... menu item.

ExportMeshObjectSpaceAction

  • Corresponds to the File > Export Scene Data > Export Mesh In Object Space... menu item.

ExportPointsWorldSpaceAction

  • Corresponds to the File > Export Scene Data > Export Points In World Space... menu item.

ExportPointsObjectSpaceAction

  • Corresponds to the File > Export Scene Data > Export Points In Object Space... menu item.

Edit Menu Actions

EditUndoAction

  • Corresponds to the Edit > Undo Last Step menu item.

EditRedoAction

  • Corresponds to the Edit > Redo Last Step menu item.

EditDeleteAction

  • Corresponds to the Edit > Delete Selected menu item.

Panel Menu Actions

CreateViewportPanelAction

  • Corresponds to the Panels > VIEWPORT - Create New Panel menu item.

CreateImageViewerPanelAction

  • Corresponds to the Panels > IMAGE VIEW - Create New Panel menu item.

CreateDocumentExplorerPanelAction

  • Corresponds to the Panels > DOCUMENT EXPLORER - Create New Panel menu item.

CreateAttributesPanelAction

  • Corresponds to the Panels > OBJECT PROPERTIES - Create New Panel menu item.

CreateTransformPanelAction

  • Corresponds to the Panels > TRANSFORM - Create New Panel menu item.

CreateProjectionLayersPanelAction

  • Corresponds to the Panels > PROJECTION LAYERS - Create New Panel menu item.

CreateViewBookmarkPanelAction

  • Corresponds to the Panels > BOOKMARKS - Create New Panel menu item.

CreateTimePanelAction

  • Corresponds to the Panels > TIMELINE - Create New Panel menu item.

DisplayPendingTasksPanelAction

  • Corresponds to the Panels > TASK MANAGER - Display Global Panel menu item.

DisplayViewportSettingsAction

  • Corresponds to the Panels > VIEWPORT SETTINGS PANEL - Display Global Panel menu item.

DisplayLogPanelAction

  • Corresponds to the Panels > LOG Window - Display Global Panel menu item.

Batch Menu Actions

BatchConvertParticleFiles

  • Corresponds to the Batch > CONVERT POINT Files... menu item.

BatchImportParticleFiles

  • Corresponds to the Batch > IMPORT POINT Files... menu item.

BatchExportParticleFiles

  • Corresponds to the Batch > EXPORT POINT Files... menu item.

BatchExportMeshFiles

  • Corresponds to the Batch > CONVERT MESH Files... menu item.

BatchImportMeshFiles

  • Corresponds to the Batch > IMPORT MESH Files... menu item.

CreateWorkflowWizardAction

  • Corresponds to the Batch > New WORKFLOW WIZARD... menu item.

Scripts Menu Actions

UserScriptMenuAction

  • Corresponds to the Scripts > REFRESH User Scripts menu item.

LaunchScriptAction

  • Corresponds to the Scripts > LAUNCH SCRIPT From File... menu item.

Deadline Menu Actions

DeadlineExportPoints

  • Corresponds to the Deadline > Export Selected POINTS On DEADLINE menu item.

DeadlineExportMesh

  • Corresponds to the Deadline > Export Selected MESH On DEADLINE menu item.

DeadlineExportHacksawMesh

  • Corresponds to the Deadline > Export Selected HACKSAW MESH On DEADLINE menu item.

DeadlineStatusRefresh

  • Corresponds to the Deadline > REFRESH DEADLINE menu item.

DeadlineExportAction

  • Opens the Deadline Exporter and sets the export mode based on the current selection.
  • Not exposed in the UI.

Options Menu Actions

SetStandardControlsAction

  • Sets the viewport navigation controls to the standard mode.
  • Corresponds to the Options > STANDARD Controls menu item.

SetAlternativeControlsAction

  • Sets the viewport navigation controls to the ALT mode.
  • Corresponds to the Options > ALTERNATIVE Controls menu item.

SetAllowDynamicCameraFocusAction

  • Toggles the use of the Dynamic View Focus (hit-testing under the mouse pointer during orbit and zoom).
  • Corresponds to the Options > DYNAMIC VIEW FOCUS Toggle menu item.

SetOrthoAllowCameraOrbitAction

  • Toggles the orbit lock of orthographic views (Front, Left, Top etc.)
  • Corresponds to the Options > PREVENT VIEW ORBIT In Orthographic Viewports menu item.

OptionsDataCacheAction

  • Opens the Data Cache configutation dialog.
  • Corresponds to the Options > DATA CACHE Options... menu item.

AdjustAnalyticsCaptureAction

  • Opens the Analytics Capture dialog.
  • Corresponds to the Options > ANALYTICS Capture Settings... menu item.

AdjustKeyboardBindingsAction

  • Opens the Keyboard Bindings dialog.
  • Corresponds to the Options > KEYBOARD Bindings... menu item.

AdjustConstantsAction

  • Opens the Configuration dialog.
  • Corresponds to the Options > CONFIGURATION... menu item.

SetGameControlsAction

  • Not exposed to the UI.

RefreshSequoiaConstantsAction

  • Obsolete, not exposed to the UI.

Display Menu Actions

SetShowParticlesAction

  • Toggles the display of particles.

SetShowMeshAction

  • Toggles the display of meshes.

SetShowCameraNodeAction

  • Toggles the display of cameras.

SetShowCameraBookmarkAction

  • Toggles the display of bookmark gizmos.

SetShowTextureNodeAction

  • Toggles the display of Image Projection objects.

SetShowMarkersAction

  • Toggles the display of Marker objects.

UpdateNodeAction

  • Updates the selected object.

Measure Menu Actions

SetSimplifiedMeasureDisplayAction

  • Sets the Measure gizmo to simplified display.

SetFullMeasureDisplayAction

  • Sets the Measure gizmo to full display.

DisplayAllLinesAction

  • Toggles the display of additional lines.

DisplayStartPointLabelAction

  • Toggles the display of the start point label.

DisplayEndPointLabelAction

  • Toggles the display of the end point label.

DisplayStartHeightLabelAction

  • Toggles the display of the start height label.

DisplayEndHeightLabelAction

  • Toggles the display of the end height label.

DisplayDeltaXLabelAction

  • Toggles the display of the delta X label.

DisplayDeltaYLabelAction

  • Toggles the display of the delta Y label.

DisplayDeltaZLabelAction

  • Toggles the display of the delta Z label.

DisplayDistanceLabelAction

  • Toggles the display of the distance label.

DisplayGroundDistanceLabelAction

  • Toggles the display of the ground projected distance label.

DisplayDistanceStartAngleLabelAction

  • Toggles the display of the start angle label.

DisplayDistanceEndAngleLabelAction

  • Toggles the display of the end angle label.

DisplayGroundDistanceStartAngleLabelAction

  • Toggles the display of the ground distance start angle label.

DisplayGroundDistanceEndAngleLabelAction

  • Toggles the display of the ground distance end angle label.

Layout Menu Actions

LayoutSaveAction

  • Opens the save layout dialog and saves the current layout .

LayoutLoadAction

  • Opens the load layout dialog and loads a layout from disk.

LayoutRestoreAction

  • Restores the default layout.

LayoutAutoSaveToggleAction

  • Toggles the saving of the last used layout when closing the application.