SBAction#

See also

Running actions

SAMSON SDK: SBGAction

class samson.SBAction(*args, **kwargs)#

Bases: pybind11_object

This class is the base class for actions.

Overloaded function.

  1. __init__(self: samson.SBAction, UUID: samson.SBUUID) -> None

  2. __init__(self: samson.SBAction, text: str, UUID: samson.SBUUID) -> None

run(self: samson.SBAction, nodeIndexer: samson.SBNodeIndexer) None#

This is a specialized function that runs this action on nodes in the nodeIndexer.

By default, when an action is triggered (via the SBAction.trigger function or by triggering it via UI) it is applied to the whole document or to the current selection depending on the action’s implementation. If an action implements this function, then it makes it possible to apply it to nodes in the nodeIndexer without the need to select them first.

Note: this function is implemented only in a subset of actions.

Parameters:

nodeIndexer (SBNodeIndexer) – An indexer of nodes to which the action should be applied

trigger(self: samson.SBAction) None#

Triggers the action

property UUID#

Returns the action’s UUID

property favoriteFlag#

The favorite flag

property highlightingFlag#

The highlighting flag

property isDiscoverable#

Returns True if can be discovered by the user

property isLocked#

Returns True if the action is locked

property name#

Returns the action’s class name

property text#

Returns the action’s text