IAction#
Fully qualified name: omni::kit::actions::core::IAction
-
class IAction : public carb::IObject#
Pure virtual action interface.
Subclassed by omni::kit::actions::core::Action
Public Types
-
using ExecuteFunctionType = carb::variant::Variant (*)(const carb::variant::Variant&, const carb::dictionary::Item*)#
Function prototype to execute an action.
- Param args:
Variable positional argument (optional). Maybe a VariantArray with multiple args.
- Param kwargs:
Variable keyword arguments (optional).
- Return:
An arbitrary variant object (could be empty).
Public Functions
- virtual carb::variant::Variant execute( ) = 0#
Called when something wants to execute this action.
- Parameters:
args – Variable positional argument (optional). Maybe a VariantArray with multiple args.
kwargs – Variable keyword arguments (optional).
- Returns:
An arbitrary variant object (could be empty).
-
virtual void invalidate() = 0#
Invalidate this action so that executing it will not do anything.
This can be called if it is no longer safe to execute the action, and by default is called when deregistering an action (optional).
-
virtual bool isPythonAction() const = 0#
Is this an instance of the derived PythonAction class?
- Returns:
True if this an instance of the derived PythonAction class, false otherwise.
-
virtual const char *getExtensionId() const = 0#
Get the id of the source extension which registered this action.
- Returns:
Id of the source extension which registered this action.
-
virtual const char *getActionId() const = 0#
Get the id of this action, unique to the extension that registered it.
- Returns:
Id of this action, unique to the extension that registered it.
-
virtual const char *getDisplayName() const = 0#
Get the display name of this action.
- Returns:
Display name of this action.
-
virtual const char *getDescription() const = 0#
Get the description of this action.
- Returns:
Description of this action.
-
virtual const char *getIconUrl() const = 0#
Get the URL of the icon used to represent this action.
- Returns:
URL of the icon used to represent this action.
-
virtual const char *getTag() const = 0#
Get the tag that this action is grouped with.
- Returns:
Tag that this action is grouped with.
-
using ExecuteFunctionType = carb::variant::Variant (*)(const carb::variant::Variant&, const carb::dictionary::Item*)#