CallExpressionModel
- class omni.kit.property.material.scripts.widgets.usdshade.models.expression.CallExpressionModel(stage: Stage, attribute_paths: List[Path], self_refresh: bool, metadata: dict, change_on_edit_end=True, **kwargs)
Bases:
UsdAttributeModel
A model representing MDL expressions as string values for display purposes.
This class extends UsdAttributeModel to show the value of expressions used to initialize MDL values in a string field. It is designed to work within the USD ecosystem, leveraging its stages and attribute paths to manage the properties of MDL materials.
- Parameters
stage (
Usd.Stage
) – The USD stage where the attribute paths are located.attribute_paths (List[
Sdf.Path
]) – A list of paths to the USD attributes that this model will represent.self_refresh (bool) – A flag indicating whether the model should refresh itself when the USD stage changes.
metadata (dict) – A dictionary containing metadata for the attribute, which may include keys specific to MDL and SDR.
change_on_edit_end (bool) – A flag that determines if changes should be committed only when an edit operation ends.
- Keyword Arguments
displayGroup (str) – Optional. The name of the display group for organizing attributes in the UI.
displayName (str) – Optional. The human-readable name for the attribute.
options (List[str]) – Optional. A list of options for the attribute.
helpText (str) – Optional. A help text associated with the attribute.
Methods
__init__
(stage, attribute_paths, ...[, ...])Initializes a new instance of the CallExpressionModel.
Attributes
- __init__(stage: Stage, attribute_paths: List[Path], self_refresh: bool, metadata: dict, change_on_edit_end=True, **kwargs)
Initializes a new instance of the CallExpressionModel.