Scene Messages

Action Messages

  • GEOMETRY_COPY_TRANSFORM - Copies the transformation matrix of the first given target into a buffer. If targetIds is empty, copies the transformation matrix of the first selected target. This transformation matrix is the one that is applied by the GEOMETRY_PASTE_TRANSFORM message. The transformation matrix that is copied is the amount the target has moved from its original position (where the target was when it was first imported from file). The transform is in the object space of the target. You can preview the target's original position using the GEOMETRY_RESET_TRANSFORM message. This message is broadcastable. This message will trigger the following response messages: GEOMETRY_TRANSFORM_COPIED. This default maximum wait time for this message is 10.

    Parameters:

    • targetIds (tuple) - The nodes whose transformation matrix will be copied.

  • GEOMETRY_FLIP_NORMALS - Sets the draw normals state. This message is undoable and broadcastable.

    Parameters:

    • targetIds (tuple) - The nodes whose normals will be reversed.

    • value (unicode) - 'None' (regular), 'Reverse', 'Automatic' (brightest) or 'Toggle'. 'Toggle' switches between 'None' and 'Reverse'.

  • GEOMETRY_SET_PRELOAD_MODE - Sets the option to preload all geometry when the scene is opened. This message will trigger the following response messages: GEOMETRY_PRELOAD_MODE_CHANGED. This default maximum wait time for this message is 10.

    Parameters:

    • requestPreload (bool) - True to load all the geometry when the scene is opened, False to load the geometry into the scene as needed.

  • GEOMETRY_SHOW_NORMALS - Shows the direction of the normals for all of the objects in the scene.

    Parameters:

    • showNormals (bool) - True to show the direction of the normals, False otherwise.

  • GEOMETRY_SHOW_OCCLUSION - Shows the occlusion effect for all of the objects in the scene.

    Parameters:

    • showOcclusion (bool) - True to show the occlusion effect, False otherwise.

  • GEOMETRY_UP_AXIS_SWITCH - Flips the up-axis

    Parameters:

    • targetIds (tuple) - Models whose axes switch.

  • STAGE_OPEN - Opens a specified scene file as a stage (for comparison). This message is undoable and broadcastable. This message will trigger the following response messages: MODEL_IMPORT_DISPLAYED_ALL. This default maximum wait time for this message is 10.

    Parameters:

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

  • STAGE_SET_ACTIVE - Makes a specied stage active in a specified viewport. This message is undoable and broadcastable. This message will trigger the following response messages: STAGE_ACTIVE_LIST. This default maximum wait time for this message is 10.

    Parameters:

    • viewportIdTostageId (dict) - 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.)

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

Information Messages

  • GEOMETRY_NORMALS_SHOWN - Indicates that the display of the normals has been enabled or disabled.

    Parameters:

    • normalsShown (bool) - True or False.

  • GEOMETRY_OCCLUSION_SHOWN - Indicates that the display of the occlusion has been enabled or disabled.

    Parameters:

    • occlusionShown (bool) - True or False.

  • GEOMETRY_PIVOT_CHANGED - Indicates that the pivot of a set of nodes has changed, usually as a result of the nodes moving. This pivot is used for rotation. The values given are the new pivot location in world space.

    Parameters:

    • targetIds (tuple) - The IDs of nodes that this pivot applies to.

    • x (float) - The pivot's x position in world space.

    • y (float) - The pivot's y position in world space.

    • z (float) - The pivot's z position in world space.

  • GEOMETRY_VISIBILITY_CHANGED - Indicates that the visibility of some geometry in the scene was modified.

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

    Parameters:

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

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

Response Messages

  • GEOMETRY_PRELOAD_MODE_CHANGED - Indicates that the option to preload all geometry when the scene is opened has changed.

    Parameters:

    • preloadRequested (bool) - True to preload, False otherwise.

  • GEOMETRY_UP_AXIS_SWITCHED - Indicates that the up-axis has been flipped. This message will trigger the following response messages: GEOMETRY_UP_AXIS_SWITCHED. This default maximum wait time for this message is 10.

    Parameters:

    • targetIds (tuple) - The IDs of objects that were affected.

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

    Parameters:

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