Behavior Messages

Action Messages

  • BEHAVIOR_ADD_NODES - Adds specified nodes to the specified behavior. If no nodes have been specified, then the selected nodes will be added to the specified behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to add to.

    • target1, ..., targetN (tuple) - The IDs of objects to add to the behavior.

  • BEHAVIOR_ADD_TIMEDOBJECTS - Adds specified objects to the specified behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to add to.

    • target1, ..., targetN (tuple) - The IDs of objects to add to the behavior.

  • BEHAVIOR_CREATE - Creates a default copy of a library behavior and adds it to the list of scene behaviors. This message is undoable and broadcastable.

    Parameters:

    • behaviorType (unicode) - The type of behavior to create. Currently, only TurnTableBehavior is supported. If you add your own behavior, use the name of the module.

    • behaviorName (unicode) - The name of the behavior to create.

  • BEHAVIOR_DELETE - Deletes a behavior. This message is undoable and broadcastable. This message will trigger the following response messages: BEHAVIOR_DELETED. This default maximum wait time for this message is 10.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to delete.

  • BEHAVIOR_DUPLICATE - Duplicates a behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to duplicate.

  • BEHAVIOR_ENABLE - Starts or stops the given behavior.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to start/stop.

    • enable (bool) - True to start the behavior, False to stop it.

  • BEHAVIOR_METHOD_EXECUTE - Executes a method on the specified behavior. The behavior method, depending on the behavior in question, is one or all of the following: PlayFromStart, Pause, Continue, StopAndResetToStart, StopAndResetToEnd, ContinueForward, ContinueBackward. This message is undoable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

    • behaviorMethod (unicode) - The method to execute on the specified behavior.

  • BEHAVIOR_METHOD_EXECUTE_ALL - Executes a method on all behaviors. This message is broadcastable.

    Parameters:

    • behaviorMethod (unicode) - See BEHAVIOR_METHOD_EXECUTE.

  • BEHAVIOR_METHOD_EXECUTE_BYLABEL - Allows a BEHAVIOR_METHOD_EXECUTE message to be sent by specifying labels instead of names. Since labels need not be unique, and since wildcards are allowed (but comparisons are case-sensitive), more than one behavior may match. If so, then a BEHAVIOR_METHOD_EXECUTE message will be sent for each matching behavior. This message is undoable.

    Parameters:

    • label (unicode) - Behavior label.

    • behaviorMethod (unicode) - See BEHAVIOR_METHOD_EXECUTE.

  • BEHAVIOR_METHOD_EXECUTE_EX - Executes a method on the passed bahavior with parameters passes as a tuple. The method returns a tuple which is returned in the executed message. This message is undoable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

    • behaviorMethod (unicode) - The method to execute on the specified behavior.

    • parameterTuple (tuple) - The tuple for parameters.

  • BEHAVIOR_PARAMETER_CHANGE - Changes the specified parameter value for a behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to change the parameter on.

    • parameterName (unicode) - The name of the parameter to change.

    • parameterValue (tuple) - The new value of the parameter.

  • BEHAVIOR_RENAME - Renames the specified behavior. This message will trigger the following response messages: BEHAVIOR_CHANGED. This default maximum wait time for this message is 10.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to rename.

    • newLabel (unicode) - The new label for the behavior.

  • BEHAVIOR_REMOVE_NODES - Removes specified nodes from the specified behavior. If no nodes have been specified, then the selected nodes will be removed from that behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to delete from.

    • target1, ..., targetN (tuple) - The IDs of objects to remove from the behavior.

  • BEHAVIOR_REMOVE_TIMEDOBJECTS - Removes specified objects from the specified behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to delete from.

    • target1, ..., targetN (tuple) - The IDs of objects to remove from the behavior.

  • BEHAVIOR_SAVE_THUMBNAIL - Saves a thumbnail image for a behavior.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

  • BEHAVIOR_SELECT_ASSIGNED - Selects nodes that are assigned to this behavior. This message is undoable and broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

    • visibleOnly (bool) - True to select visible nodes only, False to select all nodes.

  • BEHAVIOR_SHOW_PROPERTIES - Shows the properties window for the specified behavior.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

  • BEHAVIOR_START - Starts playing a given behavior. This message is broadcastable. This message will trigger the following response messages: BEHAVIOR_STARTED. This default maximum wait time for this message is 10.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to start.

    • frameTime (float) - The start time of the behavior.

  • BEHAVIOR_STOP - Stops playing a given behavior. This message is broadcastable.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to stop.

    • frameTime (float) - The stop time of the behavior.

  • BEHAVIOR_STOP_ALL - Stops all behaviors currently active. This message is broadcastable.

  • BEHAVIOR_UI_CONTROLS - Displays the controls window for the specified behavior or its associated behavior group.

    Parameters:

    • name (unicode) - The name of the behavior to show controls for.

    • showGroup (bool) - True to open the group that this behavior belongs to.

  • BEHAVIOR_UI_PROPERTIES - Shows the properties window for the specified behavior.

    Parameters:

    • name (unicode) - The name of the behavior to edit.

  • BEHAVIOR_UI_REQUEST_CREATION - Requests the creation of a new behavior. Displays a popup menu requesting the type of behavior to create.

  • BEHAVIOR_UI_SET_MODE - Shows or hides the Behaviors user interface.

    Parameters:

    • visible (bool) - True to show, False to hide.

  • BEHAVIOR_UI_UPDATE - Refreshes the Behaviors user interface.

  • BEHAVIORS_LINK - Links a list of behaviors together so they will play in sync. This message is undoable and broadcastable.

    Parameters:

    • behaviors (set) - List of behavior names to link.

  • BEHAVIORS_UNLINK - Unlinks (removes) a list of behaviors (or single behavior) from a behavior grouping. This message is undoable and broadcastable.

    Parameters:

    • behaviors (set) - List of behavior names to unlink.

Information Messages

  • BEHAVIOR_CREATED - Indicates that a library behavior has been successfully created.

    Parameters:

    • behaviorType (unicode) - The type of behavior that was created.

    • behaviorName (unicode) - The name of the behavior that was created.

    • details (unicode) - Further details on the created behavior. Vary depending on the type.

  • BEHAVIOR_DUPLICATED - Indicates that a behavior was duplicated.

    Parameters:

    • behaviorName (unicode) - The name of the newly duplicated behavior.

  • BEHAVIOR_METHOD_EXECUTED - Indicates that a method on the specified behavior was executed.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

    • behaviorMethod (unicode) - The method that was executed on the specified behavior.

  • BEHAVIOR_METHOD_EXECUTED_EX - Indicates that a method on the specified behavior was executed.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

    • behaviorMethod (unicode) - The method that was executed on the specified behavior.

    • returnTuple (tuple) - The tuple for return values.

  • BEHAVIOR_STOPPED - Indicates that a behavior stopped successfully.

    Parameters:

    • behaviorName (unicode) - The name of the behavior that stopped.

    • frameTime (float) - The stop time of the behavior.

  • BEHAVIOR_THUMBNAIL_SAVED - Indicates that a BEHAVIOR_SAVE_THUMBNAIL action message has finished saving a behavior thumbnail.

    Parameters:

    • behaviorName (unicode) - The name of the behavior.

  • BEHAVIORS_LINKED - Indicates that a list of behaviors have been linked together.

    Parameters:

    • behaviors (set) - List of linked behavior names.

  • BEHAVIORS_UNLINKED - Indicates that a list of behaviors (or single behavior) have been unlinked.

    Parameters:

    • behaviors (set) - List of unlinked behavior names.

Response Messages

  • BEHAVIOR_CHANGED - Indicates that a parameter has changed on the behavior.

    Parameters:

    • behaviorName (unicode) - The name of the behavior that changed.

    • parameterName (unicode) - The name of the parameter that changed.

  • BEHAVIOR_DELETED - Indicates that a behavior was deleted.

    Parameters:

    • behaviorName (unicode) - The name of the behavior that was deleted.

  • BEHAVIOR_STARTED - Indicates that a behavior started successfully.

    Parameters:

    • behaviorName (unicode) - The name of the behavior to start.

    • frameTime (float) - The start time of the behavior.