Usd Optimize Python API#
Core#
- class usd_optimize.core.UsdOptimizeCore#
Singleton object that manages loading of Usd Optimize plugins and execution of operations.
- deregisterOperation(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
- executeConfig(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: object,
- arg1: object,
Execute a JSON configuration containing a sequence of operations.
The config is a list of dicts, where each dict has an “operation” key identifying the operation to run, plus any operation-specific argument keys. An entry with “operation”: “executionContext” can be used to override context settings for subsequent operations.
Operations are executed in order. Execution stops on the first failure.
- Parameters:
context – The ExecutionContext to run the operations in.
config – A list of dicts, each describing an operation and its arguments.
- Returns:
A list of (success, error, output) tuples, one per executed operation (excluding executionContext entries).
- executeOperation(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
- arg1: object,
- arg2: object,
- static getInstance() usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore#
- getOperationArguments(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the arguments of the given operation as JSON list, or an empty list if the operation doesn’t exist.
- getOperationAuthor(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the author of the given operation, or an empty string if the operation doesn’t exist.
- getOperationDescription(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the description of the given operation, or an empty string if the operation doesn’t exist.
- getOperationDisplayGroup(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the display group of the given operation, or an empty string if the operation doesn’t exist.
- getOperationDisplayName(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the display name of the given operation, or an empty string if the operation doesn’t exist.
- getOperationDocumentation(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the full documentation for this operation. If this is not overridden by the plugin, it will return the same string as getOperationDescription().
- getOperationSupportsAnalysis(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns if the given operation supports analysis, or False if the operation doesn’t exist.
- getOperationVersion(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns the version of the given operation, or (-1, -1, -1) if the operation doesn’t exist.
- getOperationVisible(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Returns if the given operation is visible, or False if the operation doesn’t exist.
- getOperations( ) List[str]#
- isInitialized( ) bool#
- loadPlugin(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
- loadPlugins( ) None#
- loadPluginsFromPath(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
- mapConfig(
- self: usd_optimize.impl.core._usd_optimize_impl_core.UsdOptimizeCore,
- arg0: str,
Map a JSON configuration to update renamed operations and arguments.
Takes a JSON string containing a Usd Optimize config (a JSON array of operation dicts) and returns a JSON string with operation and argument names updated to their current equivalents.
- Parameters:
config – A JSON string representing the array of operation dicts.
- Returns:
A JSON string with the mapped configuration.
- class usd_optimize.core.UsdOptimizePluginVersion#
Semantic version for plugins
- Parameters:
major (int) – The major version number
minor (int) – The minor version number
rev (int) – The revision number