CreateUsdAttributeOnPathCommand#
- class omni.usd.commands.CreateUsdAttributeOnPathCommand(
 - attr_path: Path | str,
 - attr_type: ValueTypeName,
 - custom: bool = True,
 - variability: Variability = Sdf.VariabilityVarying,
 - attr_value: Any | None = None,
 - usd_context_name: str = '',
 Bases:
CommandCreates a USD Attribute with attribute path.
Methods
__init__(attr_path, attr_type[, custom, ...])Constructor.
do()undo()- __init__(
 - attr_path: Path | str,
 - attr_type: ValueTypeName,
 - custom: bool = True,
 - variability: Variability = Sdf.VariabilityVarying,
 - attr_value: Any | None = None,
 - usd_context_name: str = '',
 Constructor.
- Parameters:
 attr_path (Union[Sdf.Path, str]) – Path to the new attribute to be created. The prim of this path must already exist.
attr_type (Sdf.ValueTypeName) – New attribute’s type.
custom (bool, optional) – If the attribute is custom. Default is True.
variability (Sdf.Variability, optional) – whether the attribute may vary over time and value coordinates, and if its value comes through authoring or from its owner. Default is Sdf.VariabilityVarying.
attr_value (Any, optional) – New attribute’s value. Leave it as None to use default value.
usd_context_name (str) – Name of the usd context to execute the command on. Default is None, which uses the default UsdContext.