Application Messages

  • APPLICATION_CLOSE_SCENE - Closes the current scene and calls SHUTDOWN if a Shutdown was initiated.

  • APPLICATION_COMPACT_SCENE_SAVED - Indicates that the current scene was successfully compact saved.

    Parameters:

    • Filename - The full pathname of the newly saved scene.

    • companionDir - The full pathname of the newly saved scenes companion dir, need not be the same as the current companion dir.

  • APPLICATION_EXPORT_SCENE - Exports the scene to the given file. Currently, FBX is the only export file-format supported.

    Parameters:

    • filename - The filename to be used for export.

    • features - A tuple of the ids of features to be exported.

    • options - To combine options, add the numbers associated with each. 1 - Output file up-axis is +Y; 2 - Export hidden objects; 4 - Export all LODs; 8 - Export as ascii; 16 - Export patches; 32 - Export empty groups; 64 - Export spline data; 128 - Export alternatives; 256 - Export maya compatible; 512 - Merge combined To single node; 1024 - Export include all material textures; 2048 - Use node labels as IDs; 4096 - Export include only selected; 8192 - Export preserve all patch data; 16384 - Export empty meshes;

  • APPLICATION_IMPORT_SCENE - Loads the specified scene from file into the current document. If feature IDs are specified in the feature list, then only those features will be imported from the file. To import materials, one would specify MaterialIO.id in the features. To import models only, one would use ModelIO.id, ModelImportIO.id, ShadowIO.id, ObjectsPropertiesIO.id. If both models and materials are required, the combined list would be specified, together with MaterialAssignmentIO.id. Additionally, you can independently specify SelectionSetIO.id, AlternativeIO.id and ShotIO.id to get those features imported. An empty feature list is replaced by a default list that is equivalent to importing models with materials and their corresponding assignments.

    Parameters:

    • filename - The name of the scene file to be imported.

    • features - A tuple of those feature IDs to be imported from the scene file.

  • APPLICATION_IMPORT_SCENE_FAILED - Indicates that a scene file failed to import. A failure is usually due to a scene file that was not found, or a syntax error within the scene file.

    Parameters:

    • filename - The name of the scene file to be imported.

    • features - A tuple of those feature IDs to be imported from the scene file.

  • APPLICATION_INTERACTION_MODE_CHANGED - Indicates that the interaction mode of the application changed. Listen to this message to know the current interaction mode of the application.

    Parameters:

    • interactionMode - The current interaction mode of the application.

  • APPLICATION_LOAD_SCENE - Loads the specified scene from file.

    Parameters:

    • filename - The name of the file to be loaded.

  • APPLICATION_LOAD_SCENE_FROM_INSTALLED - Loads the specified scene from /support/SampleScenes/ in program installation directory.

    Parameters:

    • filename - The name of the file to be loaded, without directory.

  • APPLICATION_LOAD_SCENE_IMPORTS_COMPLETE - Indicates that all of the files to be imported as part of a load scene have been imported.

  • APPLICATION_LOAD_SCENE_SAFE - Loads the specified scene from file after asking if the user wants to save previous scene or not.

    Parameters:

    • filename - The name of the file to be loaded.

  • APPLICATION_MODE_CHANGED - Indicates that the application mode has changed. This message is a response to the APPLICATION_SET_MODE message.

  • APPLICATION_NEW_SCENE - Creates a new scene. NOTE ** This should never be called explicitly. APPLICATION_REQUEST_NEW_SCENE should be called instead, as it will ensure proper scene teardown

  • APPLICATION_PATH - Indicates the path to the application. Response to APPLICATION_REQUEST_PATH.

    Parameters:

    • pathID - The application path identifier.

    • path - The path to the application.

  • APPLICATION_PROCESS_DROP - Opens the scene or models that were dropped on the application window, if possible.

    Parameters:

    • filenames - The names of the dropped files.

    • position - The drop point as a 3D point in the scene, or None.

  • APPLICATION_REMOVE_FILE - Removes the specified file. There is no undo available for this operation, and the file is not moved to a Recycle Bin.

    Parameters:

    • filename - The name of the file to remove (full or relative path).

  • APPLICATION_REQUEST_PATH - Requests a path to the application.

    Parameters:

    • pathID - The application path identifier. Valid pathIDs are: 'Materials', 'WorkingDirectory'.

  • APPLICATION_REQUEST_QUIT - Prompts the user to save before quitting if a scene is open.

  • APPLICATION_SAVE_FILE - Saves text to the specified file. No processing of the text string will be done, it will just save the data as given. This file is of no particular type or significance. This is just a utility function.

    Parameters:

    • filename - The name of the file (full or relative path).

    • text - The actual text to write.

    • mode - Append to the existing file (a) or create/(over)write a new one (w).

  • APPLICATION_SAVE_PREFERENCES - Saves the current user preferences.

  • APPLICATION_SAVE_SCENE - Writes the currently open scene to the given filename in .xml format.

    Parameters:

    • filename - The filename for saving the current document.

  • APPLICATION_SAVE_SCENE_FAILED - Indicates that the current scene was not successfully saved.

    Parameters:

    • filename - The full pathname of the scene.

    • reason - The reason that the scene was not successfully saved.

  • APPLICATION_SAVE_SCENE_WITH_TEXTURES - Writes the currently open scene to the given filename in .xml format, and copies all textures to the companion directory.

    Parameters:

    • filename - The filename for saving the current document.

  • APPLICATION_SCENE_IMPORTED - Indicates that a scene was successfully imported.

    Parameters:

    • filename - The name of the scene file that was imported.

    • features - A tuple of those feature IDs that were imported from the scene file.

  • APPLICATION_SCENE_SAVED - Indicates that the current scene was successfully saved.

    Parameters:

    • Filename - The full pathname of the newly saved scene.

  • APPLICATION_SET_INTERACTION_MODE - Send this message when any action occurs that may affect the interaction mode of the application. Typical actions that may affect the interaction mode are pressing modifier keys, selecting an application mode, or pressing mouse buttons.

    Parameters:

    • interactionMode - The interaction mode affected. (See "Class InteractionMode" in the Showcase API Reference documentation.)

    • active - True to indicate that the mode is active, False to indicate that it is inactive.

  • APPLICATION_SET_MODE - Switches the application mode.

    Parameters:

    • mode - The application mode: 'Authoring' or 'Viewing'. (See "Class ApplicationModeName" in the Showcase API Reference documentation.)

  • APPLICATION_SET_UNITS - Set new global units. The new units will be saved to user prefs.

    Parameters:

    • units - A name of new units.

    • precision - A string representing a precision factor

  • APPLICATION_UNITS_CHANGED - Information message that the units have changed.

    Parameters:

    • units - A name of new units.

    • precision - A string representing a precision factor

  • APPLICATION_UPDATE_PREFERENCES - Updates user preferences. All preference interpreters should update data to the latest state if they have not done so before.

  • APPLICATION_VIEW_POSITION_AND_SIZE_CHANGED - Indicates that the view (main window) size and location have changed.

    Parameters:

    • horizontal - The position of the screen on the horizontal axis.

    • vertical - The position of the screen on the vertical axis.

    • width - The display size in the horizontal direction.

    • height - The display size in the vertical direction.

    • state - The state of the window: 'Normal', 'FullScreen', 'Iconized' or 'Maximized'.

  • AT_DELAY - Executes the message specified as the second argument once the internal clock reaches a particular time computed from the time this was created and the delay (in seconds) specified.

    Parameters:

    • delay - The delay before which this message should not be issued.

    • messageID - The message to issue when the time is right.

    • messageData - The data for the message, whatever it may be.

  • AT_TIME - Executes the message specified as the second+third argument once the internal clock reaches a specified time.

    Parameters:

    • time - The internal clock time before which this message should not be issued.

    • messageID - The message to issue when the time is right.

    • messageData - The data for the message, whatever it may be.

  • CLIENT_SET_SWAA_LEVEL - Sets the software anti-alias quality level to the specified value.

    Parameters:

    • clientSWAAlevel - The display quality level: 0-9.

  • DELAY_UNTIL_MESSAGE - Executes the message specified as the second argument once the message specified as the first argument is processed. Only one message is sent when the specified message arrives.

    Parameters:

    • MessageID - The message that you are waiting for.

    • messageID - The message to issue when the message you are waiting for arrives.

    • messageData - The data for the message.

  • DIALOG_INTERPRETER_ADD - A client sends this message when it wants to receive and handle messages.

    Parameters:

    • client - The message receiver.

  • DIALOG_INTERPRETER_REMOVE - A client sends this message when it no longer wants to receive and handle messages. The client should have sent a DIALOG_INTERPRETER_ADD message earlier.

    Parameters:

    • client - The message receiver.

  • DISPLAY_BACKGROUND_COLOR_CHANGED - Information message sent when the background color changes.

    Parameters:

    • red - Red channel value between 0 and 1.

    • green - Green channel value between 0 and 1.

    • blue - Blue channel value between 0 and 1.

  • DISPLAY_NEAR_CLIP_CHANGED - Indicates that the near clip plane distance has been modified. This distance is the near clip *IF* the camera is inside the environment. Outside the environment, the display clip will be set to fit the entire model in the view.

    Parameters:

    • nearDistance - The modified near clip plane distance.

  • DISPLAY_ONE_TO_ONE - Enables or disables the 1:1 mode.

    Parameters:

    • enable - True to enable, False to disable.

  • DISPLAY_ONE_TO_ONE_REQUEST_PARAMETERS - Used by the host to trigger other messages which any listening clients then use to synchronize themselves with the host's 1:1 state.

  • DISPLAY_PROJECTION_MODE_CHANGED - Indicates that the projection mode changed. (Response message to DISPLAY_SET_PROJECTION_MODE.)

    Parameters:

    • mode - The current projection mode.

  • DISPLAY_SET_NEAR_CLIP - Sets the distance from the camera to the near clip plane. This is the distance the near clip is set to *IF* the camera is inside the environment. Outside the environment, the display clip will be set to fit the entire model in the view.

    Parameters:

    • nearDistance - The near clipping plane distance.

  • DISPLAY_SET_ONE_TO_ONE_DISTANCE - Sets how far the ortho camera should be from the ortho plane to display objects in real world scale.

    Parameters:

    • distance - Distance from the ortho camera eye to the ortho plane (0).

  • DISPLAY_SET_STYLE - Switch the style or NPR effect that will be used for rendering.

    Parameters:

    • styleName - String name of style. One of OFF, TOONCOLOR, SHADEDTEXTURES, REALISTICEDGES, TECH, GRAPHITE, COLORPENCIL, WATERCOLOR, PASTEL, FLATCOLOR, SCANNEDSTROKE, STROKEANDPENCIL.

  • DISPLAY_SET_VERTICAL_FOV - Adjusts the field of view to the specified value (in degrees). If reposition is set to true, the camera's location is also adjusted to keep objects at the COI distance a constant size in the view.

    Parameters:

    • fov - The new vertical field-of-view in degrees.

    • reposition - True if the camera is to be repositioned, False otherwise.

  • DISPLAY_STYLE_CHANGED - Indicates that the style or NPR effect used for rendering has changed.

    Parameters:

    • previousStyleName - String name of the previous style.

    • styleName - String name of the new style.

  • DISPLAY_UPDATE_CALIBRATIONS - Creates/updates the set of 1:1 display calibrations and the current calibration index.

    Parameters:

    • calibrations - Calibrations preferences. (See "CalibrationDataList" object in the Showcase API Reference documentation.)

  • DISPLAY_VERTICAL_FOV_CHANGED - Indicates that the vertical FOV has been adjusted, so that UI elements can update themselves.

    Parameters:

    • fov - The new vertical field-of-view in degrees.

  • DISPLAY_VIEWPORT_SPLIT_CHANGED - Indicates that the display viewport values have changed. Indicates the current screen sub-divisions and which of the sub-divisions is being displayed.

    Parameters:

    • enabled - True indicates the viewport split is enabled, False indicates the split is disabled.

    • columns - The number of columns in the split display.

    • rows - The number of rows in the split display.

    • columnIndex - The column coordinate of the cell of the current display. Column 0 refers to the left-most column.

    • rowIndex - The row coordinate of the cell of the current display. Row 0 refers to the top-most row.

    • horizontalOverlap - The pixel overlap of each cell with its neighbors in the horizontal direction.

    • verticalOverlap - The pixel overlap of each cell with its neighbors in the vertical direction.

  • DOCUMENT_CLOSED - Indicates that a document was closed.

  • DOCUMENT_INFO - Indicates the document's filename and status specifying if the document was modified since last saved.

    Parameters:

    • documentFilename - The path to the document.

    • needsSaving - True if the file was modified since last saved.

  • DOCUMENT_LOADED - Indicates that a new document was loaded into the application. In the case of archived files (e.g., .zip) it would be the name of the archive, not the name of the extracted scene files that is specified.

    Parameters:

    • Filename - The full pathname of the newly loaded document.

  • DOCUMENT_LOAD_FAILED - Indicates that a document failed to load into the application.

    Parameters:

    • document - The document object that failed to load.

  • DOCUMENT_REQUEST_INFO - Requests a document file name.

  • DOCUMENT_SET_UNITS - Set scene units. The new units will be saved with the scene.

    Parameters:

    • units - A name of the units.

    • precision - A string representing a precision factor

  • DOCUMENT_UNITS_CHANGED - Information message that the scene units have changed.

    Parameters:

    • units - A name of new units.

    • precision - A string representing a precision factor

  • DRAW_MODE_CHANGED - Indicates that the draw mode has changed.

    Parameters:

    • style - The draw style: 'WIREFRAME' or 'SHADED'.

  • HEADS_UP_DISPLAY_MODE_CHANGED - Indicates that the heads-up display mode changed.

    Parameters:

    • visibleInfo - Are informational messages visible in the HUD.

    • visibleFramerate - Is framerate visible in the HUD.

    • visibleSpeed - Is speed indication visible in the HUD.

    • visibleSession - Is network session information visible in the HUD.

  • JAVASCRIPT_ENABLE - Enables or disables javascript message generation.

    Parameters:

    • state - True to enable, False to disable.

  • MANIPULATOR_CHANGE_ENABLE_STATUS - Enables or disables the manipulator with the given name.

    Parameters:

    • manipulatorName - The name of the manipulator: 'MoveManipulator', 'PlanarTextureManipulator', 'TriPlanarTextureManipulator', 'CylindricalTextureManipulator','TurntableManipulator', 'AutoCamManipulator'.

    • enable - True to enable the manipulator, False to disable it.

  • MANIPULATOR_CHANGE_MODE - Changes the mode of a manipulator.

    Parameters:

    • manipulatorName - The name of the manipulator whose mode you are changing: 'MoveManipulator', 'PlanarTextureManipulator', 'TriPlanarTextureManipulator', 'CylindricalTextureManipulator'. Note that 'TurntableManipulator' and 'AutoCamManipulator' have no modes.

    • modeName - The name of the mode to give to the manipulator: 'pivot', 'transform', 'texture'. Valid modes for 'MoveManipulator' are 'pivot' and 'transform'. Valid modes for 'PlanarTextureManipulator', 'TriPlanarTextureManipulator' and 'CylindricalTextureManipulator' are 'texture' and 'pivot'.

  • MANIPULATOR_ENABLE_STATUS_CHANGED - Indicates that the enable status of a manipulator has changed.

    Parameters:

    • manipulatorName - The name of the manipulator whose enable status has changed.

    • enableStatus - The new enable status of the manipulator.

  • MANIPULATOR_MODE_CHANGED - Indicates that the mode of a manipulator has changed.

    Parameters:

    • manipulatorName - The name of the manipulator whose mode has changed.

    • modeName - The new mode of the manipulator.

  • MANIPULATOR_POSITION_CHANGED - Indicates that the position of a manipulator has changed.

    Parameters:

    • manipulatorName - The name of the manipulator whose position has changed.

  • MATERIAL_SELECTION_STYLE_CHANGED - Indicates that the material for selection drawing style or color has changed.

    Parameters:

    • drawStyle - The new selection draw style: 'AnimatedGrid', 'WhiteWireframe', 'BlueWireframe', 'BlackWireframe'.

  • MATERIAL_UPDATE_SEARCH - Sends the updated search terms back to the material library selector.

    Parameters:

    • newTerms - The new search terms.

  • QUIT - Initiates a shutdown and queues APPLICATION_CLOSE_SCENE.

  • REDO - Redoes the last redoable message.

  • REFRESH - Causes the message dispatcher to break out of the message dispatch loop and thus forces a scene graph update and frame draw.

  • REMOVE_DELAYED_MESSAGE - Removes all delayed messages with the specified message identifier (added with DELAY_UNTIL_MESSAGE) from the message queue.

    Parameters:

    • MessageID - The message identifier of the message(s) to be removed.

  • RT_UI_SET_MODE - Shows or hides the Ray Tracing Control interface.

    Parameters:

    • visible - True to show the interface, False to hide it.

  • SAVE_SCREENSHOT - Saves the screenshot at the present resolution to the specified file. Note that if the width and height dimensions of the view are not a power of two then they will be rounded up to the nearest power of two value.

    Parameters:

    • filename - The file where the screenshot will be saved.

    • AAlevel - The level of software anti-aliasing to apply: 0 to 9.

    • selectionHighlighting - True to include selection highlighting in the saved image, False to save the image with no highlighting.

  • SAVE_SCREENSHOT_AT_RESOLUTION - Saves the screenshot at the specified resolution to the specified file. Note that the width and height dimensions should be a power of two. If they are not then they will be rounded up to the nearest power of two value.

    Parameters:

    • filename - The name of the destination image file.

    • width - The width of the image.

    • height - The height of the image.

    • what - 1 - 3d scene only; 2 - environment only; 3 - 3d scene and environment; 5 - 3d scene and overlay; 6 - environment and overlay; 7 - 3d scene, environment and overlay; 8 - 3d scene, environment and 3d GUI.

    • AAlevel - The level of software anti-aliasing to apply: 0 to 9.

    • selectionHighlighting - True to include selection highlighting in the saved image, False to save the image with no highlighting.

  • SAVE_SCREENSHOT_PARAMETERS - Save a screenshot to a given filename using a set of parameters.

    Parameters:

    • filename - The name of the destination image file.

    • parameters - Parameters: width, height, what, AAlevel, selectionHighlighting, densityUnit, density.

  • SAVE_VIEWPORT - Save a screenshot to a given filename using a set of parameters.

    Parameters:

    • filename - The name of the destination image file.

    • parameters - Parameters: width, height, what, AAlevel, selectionHighlighting, densityUnit, density.

  • SCREENSHOT_PREPARE - We may need to do some preparations before screenshot.

  • SCREENSHOT_SAVED - Indicates that your screenshot save is completed.

    Parameters:

    • filename - The file where the screenshot was saved.

  • SCREENSNAP_SET_RESOLUTION - Sets the X and Y value of the screensnap resolution.

    Parameters:

    • width - The screensnap width in pixels.

    • height - The screensnap height in pixels.

  • SHUTDOWN - Stops running the event/message queue once it is processed. No further event processing takes place. Any interpreters receiving this message can assume that no further messages will be received.

  • STAGE_ACTIVE_LIST - Contains a mapping between the active viewports and their displayed stages.

    Parameters:

    • viewportIdTostageId - A dictionary with the ID of the viewport as the key and the ID of the displayed stage as the value.

  • STAGE_OPEN - Opens a specified scene file as a stage (for comparison).

    Parameters:

    • filename - Scene file name that should be opened as a new stage.

  • STAGE_OPENED - Indicates that a scene file has been succesfully opened as a stage.

    Parameters:

    • stageId - The identifier for the stage that was opened.

    • filename - Scene file name that was opened as the new stage.

  • STAGE_REQUEST_ACTIVE_LIST - Requests the stages currently displaying in the active viewports.

  • STAGE_SET_ACTIVE - Makes a specied stage active in a specified viewport.

    Parameters:

    • viewportIdTostageId - A dictionary with the ID of the viewport as the key and the ID of the stage that will become active in that view as the value. (To get the viewport ID, create a custom script that listens to the VIEWPORT_LAYOUT message. To get the stage ID, listen to STAGE_ messages.)

  • UNDO - Undoes the last undoable message.

  • UPDATE_DELAYED - Internal message. Triggers delayed messages.