Light Messages

Action Messages

  • LIGHT_ADD_NODES - Internal message. Associates the specified target nodes with the specified light node. If no target nodes have been specified, then the selected nodes will be added to the specified light node. A light node cannot be associated with another light node. This message is undoable and broadcastable. This message will trigger the following response messages: LIGHT_CHANGED. This default maximum wait time for this message is 10.

    Parameters:

    • light (unicode) - The name of the light.

    • target1, ..., targetN (tuple) - All objects that should be lit by this light.

  • LIGHT_CREATE - Creates a light. This message will trigger the following response messages: LIGHT_CREATED. This default maximum wait time for this message is 10.

    Parameters:

    • light (unicode) - The name of the light to be created.

    • type (int) - The type of the light to be created, specified by Light.kPoint - 'point', Light.kSpot - 'spot', Light.kDirectional - 'directional'.

  • LIGHT_INTERACTIVE_POSITION_END - Indicates the end of interactive environment light positioning.

  • LIGHT_INTERACTIVE_POSITION_START - Indicates the beginning of interactive environment light positioning.

  • LIGHT_REMOVE_NODES - Internal message. Removes the association between the specified target nodes and the specified light node. If no target nodes have been specified, then the selected nodes will be removed from the specified light node. This message is undoable and broadcastable. This message will trigger the following response messages: LIGHT_CHANGED. This default maximum wait time for this message is 10.

    Parameters:

    • light (unicode) - The name of the light.

    • target1, ..., targetN (tuple) - All objects that should be removed from this light.

  • LIGHT_RESET_POSITION - Resets the position of the environment light in the scene to the default position for the current environment. This message is undoable and broadcastable.

  • LIGHT_SET_POSITION - Modifies the position of light in the current environment. (Note, currently all shadow generators will be positioned at the same location). This message is undoable and broadcastable.

    Parameters:

    • xyz (tuple) - A 3-tuple representing the world space position of light.

  • LIGHT_SHOW_GRIPS - Shows the light grips.

    Parameters:

    • showGrips (bool) - True to display light grips, False to hide them.

Information Messages

  • HILIGHT_POSITION_DRAG_ENDED - Indicates the end of interactive environment light positioning using the hilight.

  • HILIGHT_POSITION_DRAG_STARTED - Indicates the beginning of interactive environment light positioning using the hilight to determine the position of the light.

  • LIGHT_DIRECTION_CHANGED - Indicates that the environment light direction has changed.

    Parameters:

    • azimuth (float) - The new light azimuth.

    • elevation (float) - The new light elevation.

  • LIGHT_POSITION_CHANGED - Indicates that the environment light position has changed.

    Parameters:

    • position (tuple) - The new light position.

  • LIGHT_POSITION_DRAG_ENDED - Indicates the end of interactive environment light positioning.

  • LIGHT_POSITION_DRAG_STARTED - Indicates the beginning of interactive environment light positioning using the mouse to determine light azimuth and elevation values.

Response Messages

  • LIGHT_CHANGED - Indicates that a light has been changed.

    Parameters:

    • light (unicode) - The name of the light that was changed.

  • LIGHT_CREATED - Indicates that a light has been created.

    Parameters:

    • light (unicode) - The name of the newly created light.