#include <asset_command.h>
CommandAssetInterface extends the AssetInterface to deal with command assets.
◆ MAXON_INTERFACE()
◆ Create()
◆ Execute()
Executes the command asset.
- See also
- ASSETMETADATA::AssetCommandExecuteDelegate.
- Parameters
-
[in] | commandAsset | The command asset. |
[in] | withOptions | If command has options (COMMAND_ASSET_STATE::HAS_OPTION), set to true to show the options dialog before executing the command asset. |
- Returns
- OK on success.
◆ QueryState()
◆ GetLegacyId()
◆ GetCommandScopes()
Gets the command asset scopes, e.g. ASSETMETADATA::CommandScopeMesh.
- Parameters
-
[in] | commandAsset | The command asset. |
- Returns
- Array with command scope IDs.
◆ AddCommandScope()
Adds the scope into the scopeArray.
- Parameters
-
[in] | scope | The command asset scope ID. |
[in,out] | scopeArray | Array with scope IDs to ad the scope to. |
- Returns
- true if the scope has been successfully added (it didn't exists in scopeArray), false if the scope already exists in the scopeArray.
◆ EraseCommandScope()
Removes the scope out of the scopeArray.
- Parameters
-
[in] | scope | The command asset scope ID. |
[in,out] | scopeArray | Array with scope IDs to erase the scope from. |
- Returns
- true if the scope has been successfully removed (it existed in scopeArray), false if the scope wasn't removed because scopeArray doesn't contain it.
◆ StoreCommandScopes()
Stores the scopeArray into the commandAsset metadata in the built-in database in a persistent way.
- Parameters
-
[in] | commandAsset | The command asset. |
[in] | scopeArray | Array with scope IDs to be stored. |
- Returns
- OK on success.
◆ ContainsCommandScope()
Checks whether commandAsset has the scope assigned.
- Parameters
-
[in] | commandAsset | The command asset. |
[in] | scope | The Scope ID to check. |
- Returns
- true if commandAsset contains the scope, otherwise false.
◆ GetCommandScopeNames()
Gets an array with all the names the @formatP of the scopes contained inChecks whether commandAsset has the scope assigned.
- Parameters
-
[in] | commandAsset | The command asset. |
- Returns
- Array with scope names.
◆ GetCommandScopeName()
Gets the name of a command scope.
- Parameters
-
[in] | scope | The command asset scope. |
- Returns
- The scope name.
◆ GetCommandType()
Gets the command asset type, e.g. ASSETMETADATA::CommandTypeCommand
- Parameters
-
[in] | commandAsset | The command asset. |
- Returns
- The command asset type.
◆ GetCommandTypeName()
Gets the name of a command type.
- Parameters
-
[in] | commandType | The command asset type. |
[in] | repository | The asset repository. |
- Returns
- The command type name.
◆ AssetIsObjectCommandType()
static MAXON_METHOD Bool AssetIsObjectCommandType |
( |
const AssetDescription & |
commandAsset | ) |
|
|
static |
Checks if commandAsset is of type Object, e.g. ASSETMETADATA::CommandTypeObjectEffector.
- Parameters
-
[in] | commandAsset | The command asset. |
- Returns
- true if commandAsset is of type Object, otherwise false.
◆ IsObjectCommandType()
Checks if commandType is of type Object, e.g. ASSETMETADATA::CommandTypeObjectEffector.
- Parameters
-
[in] | commandType | The command type. |
- Returns
- true if commandType is of type Object, otherwise false.
◆ RegisterLegacyCommandScopes()
Registers an array of scopes for a legacy commandId.
- Parameters
-
[in] | commandId | The legacy command ID. |
[in] | scopes | The array with the scopes to assign to legacy command ID. |
- Returns
- OK on success.
◆ GetRegisteredLegacyCommandScopes()
Gets the scopes registered to the legacy commandId.
- Parameters
-
[in] | commandId | The legacy command ID. |
- Returns
- The array with the scopes assigned to legacy command ID
◆ RegisterLegacyCommandType()
Registers a command type for a legacy commandId, e.g. ASSETMETADATA::CommandTypeObjectField.
- Parameters
-
[in] | commandId | The legacy command ID. |
[in] | type | The command type to assign to commandId. |
- Returns
- OK on success.
◆ GetRegisteredLegacyCommandType()
Gets the type registered to the legacy commandId, e.g. ASSETMETADATA::CommandTypeObjectField.
- Parameters
-
[in] | commandId | The legacy command ID. |
- Returns
- The command type assigned to commandId.
◆ LEGACY_ID_UNDEF
constexpr Int LEGACY_ID_UNDEF |
|
staticconstexpr |