UsdPropertiesWidgetBuilder#
- class omni.kit.property.usd.UsdPropertiesWidgetBuilder#
Bases:
objectBuilds the properties widget for the asset entry.
This class builds the properties widget for the asset entry.
Methods
bool_array_builder(stage, attr_name, ...[, ...])The array is split into components and each one has their own checkBox
bool_builder(stage, attr_name, type_name, ...)Builds the bool builder for the asset entry.
build(stage, attr_name, metadata, ...[, ...])Builds the properties widget for the asset entry.
build_path_field(model, stage, attr_name, ...)Builds a path field.
build_prim_path_field(model, ...)Builds the prim path field for the asset entry.
can_accept_file_drop(payload, model_weak[, ...])Checks if the file drop is allowed.
can_accept_prim_path_drop(payload, ...[, ...])Checks if the payload can be accepted as a prim path drop.
convert_asset_path(path)Converts an asset path.
create_attribute_context_menu(widget, model)Creates an attribute context menu for the attribute.
create_bool_per_channel(stage, attr_name, ...)Creates a bool per channel.
create_color_or_drag_per_channel(stage, ...)Creates a color or drag per channel.
create_color_or_multidrag(stage, attr_name, ...)Creates a color or multidrag.
create_control_state(model[, value_widget, ...])Creates a control state.
create_drag_or_slider(drag_widget, ...)Creates a drag or slider widget.
Creates a drag per channel with labels and control.
Creates a float drag per channel with labels and control.
Creates a int drag per channel with labels and control.
create_label(attr_name[, metadata, ...])Creates a label for the attribute.
create_mixed_text_overlay([widget_model, ...])Creates a mixed text overlay.
Creates a multi drag with labels.
create_multi_float_drag_with_labels(model, ...)Creates a multi float drag with labels.
create_multi_int_drag_with_labels(model, ...)Creates a multi int drag with labels.
create_text_label(attr_name[, metadata, ...])Creates a text label for the attribute.
fallback_builder(stage, attr_name, ...[, ...])Builds the fallback builder for the asset entry.
floating_point_builder(stage, attr_name, ...)Builds the floating point builder for the asset entry.
generate_tooltip_string(attr_name, metadata)Generates a tooltip string for the attribute.
get_attr_value_range(metadata)Gets the attribute value range.
get_attr_value_range_kwargs(metadata)Gets the attribute value range kwargs.
get_attr_value_soft_range(metadata[, model, ...])Gets the attribute value soft range.
get_attr_value_soft_range_kwargs(metadata[, ...])Gets the attribute value soft range kwargs.
get_display_name(attr_name, metadata)Gets the display name.
get_type_name(metadata)Gets the type name.
gf_matrix_builder(stage, attr_name, ...[, ...])Builds the gf matrix builder for the asset entry.
Initializes the builder table.
integer_builder(stage, attr_name, type_name, ...)Builds the integer builder for the asset entry.
is_model_readonly(model)Checks if the model is readonly.
matrix_builder(matrix_model, column_count, ...)Builds the matrix builder for the asset entry.
relationship_builder(stage, attr_name, ...)Builds the relationship builder for the asset entry.
Resets the builder coverage table.
sdf_asset_path_array_builder(stage, ...[, ...])Builds the sdf asset path array builder for the asset entry.
sdf_asset_path_builder(stage, attr_name, ...)Builds the sdf asset path builder for the asset entry.
shutdown()Shuts down the builder.
startup()Starts up the builder.
string_builder(stage, attr_name, type_name, ...)Builds the string builder for the asset entry.
tftoken_builder(stage, attr_name, type_name, ...)Builds the tftoken builder for the asset entry.
time_code_builder(stage, attr_name, ...[, ...])Creates a time code builder.
validate_url(model, layer, on_complete)Validates model string as URL and calls on_complete with either None for no URL, omni.client.Result.OK or omni.client.Result.ERROR.
vec2_builder(stage, attr_name, type_name, ...)The entire vector is built as one multi-drag field
vec2_per_channel_builder(stage, attr_name, ...)The vector is split into components and each one has their own drag field and status control
vec3_builder(stage, attr_name, type_name, ...)The entire vector is built as one multi-drag field
vec3_per_channel_builder(stage, attr_name, ...)The vector is split into components and each one has their own drag field and status control
vec4_builder(stage, attr_name, type_name, ...)The entire vector is built as one multi-drag field
vec4_per_channel_builder(stage, attr_name, ...)The vector is split into components and each one has their own drag field and status control
Attributes
tf_booltf_bool_arraytf_doubletf_floattf_gf_mtx2dtf_gf_mtx3dtf_gf_mtx4dtf_gf_vec2dtf_gf_vec2ftf_gf_vec2htf_gf_vec2itf_gf_vec3dtf_gf_vec3ftf_gf_vec3htf_gf_vec3itf_gf_vec4dtf_gf_vec4ftf_gf_vec4htf_gf_vec4itf_halftf_inttf_int64tf_sdf_asset_array_pathtf_sdf_asset_pathtf_sdf_time_codetf_stringtf_tf_tokentf_uchartf_uinttf_uint64- __init__()#
- classmethod bool_array_builder(
- stage: Stage,
- attr_name: str,
- type_name: ValueTypeName,
- metadata: dict,
- prim_paths: List[Path],
- additional_label_kwargs: dict | None = None,
- additional_widget_kwargs: dict | None = None,
The array is split into components and each one has their own checkBox
This method builds the bool array builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The bool array builder model.
- classmethod bool_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the bool builder for the asset entry.
This method builds the bool builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The bool model.
- classmethod build(
- stage,
- attr_name,
- metadata,
- property_type,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the properties widget for the asset entry.
This method builds the properties widget for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
metadata – The metadata.
property_type – The property type.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The properties widget model.
- classmethod build_path_field(
- model,
- stage,
- attr_name,
- widget_kwargs,
- frame,
- extra_widgets,
Builds a path field.
This method builds a path field.
- Parameters:
model – The model.
stage – The stage.
attr_name – The attribute name.
widget_kwargs – The widget kwargs.
frame – The frame.
extra_widgets – The extra widgets.
- Returns:
The path field widget and overlay widget.
- classmethod build_prim_path_field(
- model,
- list_item_model,
- stage,
- attr_name,
- widget_kwargs,
- frame,
- extra_widgets,
Builds the prim path field for the asset entry.
This method builds the prim path field for the asset entry and adds it to the extra widgets.
- Parameters:
model – The model.
list_item_model – The list item model.
stage – The stage.
attr_name – The attribute name.
widget_kwargs – The widget kwargs.
frame – The frame.
extra_widgets – The extra widgets.
- static can_accept_file_drop(
- payload: str,
- model_weak,
- allow_multi_files=False,
Checks if the file drop is allowed.
This method checks if the file drop is allowed.
- Parameters:
payload – The payload.
model_weak – The model weak.
allow_multi_files – Whether to allow multiple files.
- Returns:
True if the file drop is allowed, False otherwise.
- static can_accept_prim_path_drop(
- payload: str,
- model_weak,
- stage,
- allow_multi_files=False,
Checks if the payload can be accepted as a prim path drop.
This method checks if the payload can be accepted as a prim path drop.
- Parameters:
payload – The payload.
model_weak – The model weak.
stage – The stage.
allow_multi_files – Whether to allow multi files.
- Returns:
True if the payload can be accepted as a prim path drop, False otherwise.
- Return type:
bool
- static convert_asset_path(path: str) str#
Converts an asset path.
This method converts an asset path.
- Parameters:
path – The path.
- Returns:
The converted asset path.
- widget,
- model,
- comp_index=-1,
Creates an attribute context menu for the attribute.
This method creates an attribute context menu for the attribute.
- Parameters:
widget – The widget.
model – The model.
comp_index – The component index.
- Returns:
The attribute context menu.
- classmethod create_bool_per_channel(
- stage,
- attr_name,
- prim_paths,
- comp_count,
- type_name,
- tf_type,
- metadata,
- label,
- additional_widget_kwargs=None,
Creates a bool per channel.
This method creates a bool per channel.
- Parameters:
stage – The stage.
attr_name – The attribute name.
prim_paths – The prim paths.
comp_count – The component count.
type_name – The type name.
tf_type – The tf type.
metadata – The metadata.
label – The label.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The bool per channel widget.
- classmethod create_color_or_drag_per_channel(
- stage,
- attr_name,
- prim_paths,
- comp_count,
- type_name,
- tf_type,
- metadata,
- label,
- additional_widget_kwargs=None,
Creates a color or drag per channel.
This method creates a color or drag per channel.
- Parameters:
stage – The stage.
attr_name – The attribute name.
prim_paths – The prim paths.
comp_count – The component count.
type_name – The type name.
tf_type – The tf type.
metadata – The metadata.
label – The label.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The color or drag per channel widget.
- classmethod create_color_or_multidrag(
- stage,
- attr_name,
- prim_paths,
- comp_count,
- type_name,
- tf_type,
- metadata,
- label,
- additional_widget_kwargs=None,
Creates a color or multidrag.
This method creates a color or multidrag.
- Parameters:
stage – The stage.
attr_name – The attribute name.
prim_paths – The prim paths.
comp_count – The component count.
type_name – The type name.
tf_type – The tf type.
metadata – The metadata.
label – The label.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The color or multidrag widget.
- classmethod create_control_state(
- model,
- value_widget=None,
- mixed_overlay=None,
- extra_widgets=None,
- **kwargs,
Creates a control state.
This method creates a control state.
- Parameters:
model – The model.
value_widget – The value widget.
mixed_overlay – The mixed overlay.
extra_widgets – The extra widgets.
kwargs – The keyword arguments.
- static create_drag_or_slider(
- drag_widget,
- slider_widget,
- **kwargs,
Creates a drag or slider widget.
This method creates a drag or slider widget.
- Parameters:
drag_widget – The drag widget.
slider_widget – The slider widget.
kwargs – The keyword arguments.
- Returns:
The drag or slider widget.
- classmethod create_drag_per_channel_with_labels_and_control(
- drag_field_widget,
- slider_field_widget,
- models,
- metadata,
- labels,
- **kwargs,
Creates a drag per channel with labels and control.
This method creates a drag per channel with labels and control.
- Parameters:
drag_field_widget – The drag field widget.
slider_field_widget – The slider field widget.
models – The models.
metadata – The metadata.
labels – The labels.
kwargs – The keyword arguments.
- Returns:
HStack widget.
- classmethod create_float_drag_per_channel_with_labels_and_control(
- models,
- metadata,
- labels,
- **kwargs,
Creates a float drag per channel with labels and control.
This method creates a float drag per channel with labels and control.
- Parameters:
models – The models.
metadata – The metadata.
labels – The labels.
kwargs – The keyword arguments.
- Returns:
HStack widget.
- classmethod create_int_drag_per_channel_with_labels_and_control(
- models,
- metadata,
- labels,
- **kwargs,
Creates a int drag per channel with labels and control.
This method creates a int drag per channel with labels and control.
- Parameters:
models – The models.
metadata – The metadata.
labels – The labels.
kwargs – The keyword arguments.
- Returns:
HStack widget.
- classmethod create_label(
- attr_name,
- metadata=None,
- additional_label_kwargs=None,
Creates a label for the attribute.
This method creates a label for the attribute.
- Parameters:
attr_name – The attribute name.
metadata – The metadata.
additional_label_kwargs – The additional label kwargs.
- Returns:
The label widget.
- static create_mixed_text_overlay(
- widget_model=None,
- model=None,
- comp=-1,
- content_clipping: bool = False,
Creates a mixed text overlay.
This method creates a mixed text overlay.
- Parameters:
widget_model – The widget model.
model – The model.
comp – The component.
content_clipping – The content clipping.
- Returns:
The mixed text overlay widget.
- classmethod create_multi_drag_with_labels(
- drag_field_widget,
- model,
- labels,
- comp_count,
- **kwargs,
Creates a multi drag with labels.
This method creates a multi drag with labels.
- Parameters:
drag_field_widget – The drag field widget.
model – The model.
labels – The labels.
comp_count – The component count.
kwargs – The keyword arguments.
- Returns:
The multi drag with widget and overlay widget.
- classmethod create_multi_float_drag_with_labels(
- model,
- labels,
- comp_count,
- **kwargs,
Creates a multi float drag with labels.
This method creates a multi float drag with labels.
- Parameters:
model – The model.
labels – The labels.
comp_count – The component count.
kwargs – The keyword arguments.
- Returns:
The multi float drag with widget and overlay widget.
- classmethod create_multi_int_drag_with_labels(
- model,
- labels,
- comp_count,
- **kwargs,
Creates a multi int drag with labels.
This method creates a multi int drag with labels.
- Parameters:
model – The model.
labels – The labels.
comp_count – The component count.
kwargs – The keyword arguments.
- Returns:
The multi int drag with widget and overlay widget.
- classmethod create_text_label(
- attr_name,
- metadata=None,
- additional_label_kwargs=None,
Creates a text label for the attribute.
This method creates a text label for the attribute.
- Parameters:
attr_name – The attribute name.
metadata – The metadata.
additional_label_kwargs – The additional label kwargs.
- Returns:
The text label widget.
- classmethod fallback_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the fallback builder for the asset entry.
This method builds the fallback builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The fallback builder model.
- classmethod floating_point_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the floating point builder for the asset entry.
This method builds the floating point builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The floating point builder model.
- classmethod generate_tooltip_string(
- attr_name,
- metadata,
Generates a tooltip string for the attribute.
This method generates a tooltip string for the attribute.
- Parameters:
attr_name – The attribute name.
metadata – The metadata.
- Returns:
The tooltip string.
- static get_attr_value_range(metadata)#
Gets the attribute value range.
This method gets the attribute value range.
- Parameters:
metadata – The metadata.
- Returns:
The attribute value range.
- classmethod get_attr_value_range_kwargs(metadata)#
Gets the attribute value range kwargs.
This method gets the attribute value range kwargs.
- Parameters:
metadata – The metadata.
- Returns:
The attribute value range kwargs.
- static get_attr_value_soft_range(
- metadata,
- model=None,
- use_override=True,
Gets the attribute value soft range.
This method gets the attribute value soft range.
- Parameters:
metadata – The metadata.
model – The model.
use_override – Whether to use the override.
- Returns:
The attribute value soft range.
- classmethod get_attr_value_soft_range_kwargs(
- metadata,
- model=None,
Gets the attribute value soft range kwargs.
This method gets the attribute value soft range kwargs.
- Parameters:
metadata – The metadata.
model – The model.
- Returns:
The attribute value soft range kwargs.
- static get_display_name(attr_name, metadata)#
Gets the display name.
This method gets the display name.
- Parameters:
attr_name – The attribute name.
metadata – The metadata.
- Returns:
The display name.
- static get_type_name(metadata)#
Gets the type name.
This method gets the type name.
- Parameters:
metadata – The metadata.
- Returns:
The type name.
- classmethod gf_matrix_builder(
- stage: Stage,
- attr_name: str,
- type_name: ValueTypeName,
- metadata: dict,
- prim_paths: List[Path],
- additional_label_kwargs: dict | None = None,
- additional_widget_kwargs: dict | None = None,
Builds the gf matrix builder for the asset entry.
This method builds the gf matrix builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The gf matrix builder model.
- classmethod init_builder_table()#
Initializes the builder table.
This method initializes the builder table.
- classmethod integer_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the integer builder for the asset entry.
This method builds the integer builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The integer model.
- static is_model_readonly(model)#
Checks if the model is readonly.
This method checks if the model is readonly.
- Parameters:
model – The model.
- Returns:
True if the model is readonly, False otherwise.
- classmethod matrix_builder(
- matrix_model: MatrixBaseAttributeModel,
- column_count: int,
- stage: Stage,
- attr_name: str,
- metadata: dict,
- prim_paths: List[Path],
- additional_label_kwargs: dict | None = None,
- additional_widget_kwargs: dict | None = None,
Builds the matrix builder for the asset entry.
This method builds the matrix builder for the asset entry.
- Parameters:
matrix_model – The matrix model.
column_count – The column count.
stage – The stage.
attr_name – The attribute name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The matrix builder model.
- classmethod relationship_builder(
- stage,
- attr_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the relationship builder for the asset entry.
This method builds the relationship builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The relationship builder model.
- classmethod reset_builder_coverage_table()#
Resets the builder coverage table.
This method resets the builder coverage table.
- classmethod sdf_asset_path_array_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the sdf asset path array builder for the asset entry.
This method builds the sdf asset path array builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The sdf asset path array builder model.
- classmethod sdf_asset_path_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the sdf asset path builder for the asset entry.
This method builds the sdf asset path builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The sdf asset path builder model.
- classmethod shutdown()#
Shuts down the builder.
This method shuts down the builder.
- classmethod startup()#
Starts up the builder.
This method starts up the builder.
- classmethod string_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the string builder for the asset entry.
This method builds the string builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The string builder model.
- classmethod tftoken_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Builds the tftoken builder for the asset entry.
This method builds the tftoken builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The tftoken builder model.
- classmethod time_code_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
Creates a time code builder.
This method creates a time code builder.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The time code builder model.
- async classmethod validate_url(
- model,
- layer,
- on_complete,
Validates model string as URL and calls on_complete with either None for no URL, omni.client.Result.OK or omni.client.Result.ERROR.
- Parameters:
model (ui.SimpleStringModel) – model to read string from
layer (Sdf.Layer) – Layer handle.
on_complete (callable) – Function to call when completed.
- classmethod vec2_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
The entire vector is built as one multi-drag field
This method builds the vec2 builder for the asset entry.
- Parameters:
stage – The stage.
attr_name – The attribute name.
type_name – The type name.
metadata – The metadata.
prim_paths – The prim paths.
additional_label_kwargs – The additional label kwargs.
additional_widget_kwargs – The additional widget kwargs.
- Returns:
The vec2 builder model.
- classmethod vec2_per_channel_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
The vector is split into components and each one has their own drag field and status control
- classmethod vec3_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
The entire vector is built as one multi-drag field
- classmethod vec3_per_channel_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
The vector is split into components and each one has their own drag field and status control
- classmethod vec4_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
The entire vector is built as one multi-drag field
- classmethod vec4_per_channel_builder(
- stage,
- attr_name,
- type_name,
- metadata,
- prim_paths: List[Path],
- additional_label_kwargs=None,
- additional_widget_kwargs=None,
The vector is split into components and each one has their own drag field and status control