SetUsdShadeInfoAttributeCommand
- class omni.kit.property.material.scripts.commands.set_info_attribute_command.SetUsdShadeInfoAttributeCommand(prop_path: str, value: Any, prev: Any, timecode=None, type_to_create_if_not_exist: Optional[ValueTypeNames] = None, target_layer: Optional[Layer] = None, usd_context_name: Union[str, UsdContext, Stage] = '', is_custom: bool = False, variability: Variability = Sdf.VariabilityVarying)
Bases:
ChangePropertyCommand
Change property value for UsdShade info.* attributes.
In addition to what is done by ChangePropertyCommand, this command processes the UsdShade network and does the following: 1. Remove any properties that no longer exist or whose types have changed. 2. Remove any connections to/from this node that are no longer valid due to property removal or type change.
- Parameters
prop_path (str) – The property path.
value (Any) – The new value to set.
prev (Any) – The previous value.
timecode (Optional[Usd.TimeCode]) – The timecode at which the change should happen.
type_to_create_if_not_exist (Optional[
Sdf.ValueTypeNames
]) – The type to create if it does not exist.target_layer (Optional[
Sdf.Layer
]) – The target layer for the change.usd_context_name (Union[str,
omni.usd.UsdContext`, :obj:`Usd.Stage
]) – The USD context name or stage.is_custom (bool) – Specifies if the attribute is custom.
variability (Optional[
Sdf.Variability
]) – The variability of the attribute.
Methods
__init__
(prop_path, value, prev[, timecode, ...])Initialize the command to set USD Shade info attribute values.
undo
()Revert the changes made by the command.
Attributes
- __init__(prop_path: str, value: Any, prev: Any, timecode=None, type_to_create_if_not_exist: Optional[ValueTypeNames] = None, target_layer: Optional[Layer] = None, usd_context_name: Union[str, UsdContext, Stage] = '', is_custom: bool = False, variability: Variability = Sdf.VariabilityVarying)
Initialize the command to set USD Shade info attribute values.
- undo()
Revert the changes made by the command.