omni.flux.stage_manager.factory#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.stage_manager.factory.enums.StageManagerDataTypes(value)#
An enumeration.
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.stage_manager.factory.extension.StageManagerFactoryExtension#
Create Final Configuration
- omni.flux.stage_manager.factory.extension.get_instance() StageManagerFactory#
- Returns:
The Stage Manager Factory instance
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.base.StageManagerPluginBase#
An abstract base class for stage manager plugins.
Show JSON schema
{ "title": "StageManagerPluginBase", "description": "An abstract base class for stage manager plugins.", "type": "object", "properties": {} }
- Config:
arbitrary_types_allowed: bool = True
- dict(*args, **kwargs)#
- name: ClassVar[str] = FieldInfo(annotation=NoneType, required=True, description='The name of the plugin')#
- pydantic model omni.flux.stage_manager.factory.plugins.base.StageManagerUIPluginBase#
An abstract base class for stage manager plugins that should build UI.
Show JSON schema
{ "title": "StageManagerUIPluginBase", "description": "An abstract base class for stage manager plugins that should build UI.", "type": "object", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" } }, "required": [ "display_name", "tooltip" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field display_name: str [Required]#
The string to display when displaying the plugin in the UI
- field enabled: bool = True#
Whether the plugin should be enabled or not
- field tooltip: str [Required]#
The tooltip to display when hovering over the plugin in the UI
- abstract build_ui(*args, **kwargs)#
The method used to build the UI for the plugin.
- name: ClassVar[str] = 'StageManagerUIPluginBase'#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.column_plugin.ColumnWidth#
Show JSON schema
{ "title": "ColumnWidth", "type": "object", "properties": { "unit": { "$ref": "#/$defs/LengthUnit", "description": "The unit of the column width" }, "value": { "description": "The value of the column width", "title": "Value", "type": "number" } }, "$defs": { "LengthUnit": { "enum": [ "Fraction", "Percent", "Pixel" ], "title": "LengthUnit", "type": "string" } }, "required": [ "unit", "value" ] }
- field unit: LengthUnit [Required]#
The unit of the column width
- field value: float [Required]#
The value of the column width
- class omni.flux.stage_manager.factory.plugins.column_plugin.LengthUnit(value)#
An enumeration.
- pydantic model omni.flux.stage_manager.factory.plugins.column_plugin.StageManagerColumnPlugin#
A plugin that allows the grouping of multiple widgets in a column
Show JSON schema
{ "title": "StageManagerColumnPlugin", "description": "A plugin that allows the grouping of multiple widgets in a column", "type": "object", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The name to display in the column header", "title": "Display Name", "type": "string" }, "tooltip": { "default": "", "description": "The tooltip to display when hovering over the column header", "title": "Tooltip", "type": "string" }, "widgets": { "description": "Widgets to be displayed in the column", "items": { "$ref": "#/$defs/StageManagerWidgetPlugin" }, "title": "Widgets", "type": "array" }, "width": { "$ref": "#/$defs/ColumnWidth", "default": { "unit": "Fraction", "value": 1.0 }, "description": "Width of the column" }, "centered_title": { "default": false, "description": "Whether the title should be centered or left-aligned", "title": "Centered Title", "type": "boolean" } }, "$defs": { "ColumnWidth": { "properties": { "unit": { "$ref": "#/$defs/LengthUnit", "description": "The unit of the column width" }, "value": { "description": "The value of the column width", "title": "Value", "type": "number" } }, "required": [ "unit", "value" ], "title": "ColumnWidth", "type": "object" }, "LengthUnit": { "enum": [ "Fraction", "Percent", "Pixel" ], "title": "LengthUnit", "type": "string" }, "StageManagerWidgetPlugin": { "description": "A plugin that provides a widget for the TreeView", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" } }, "required": [ "display_name", "tooltip" ], "title": "StageManagerWidgetPlugin", "type": "object" } }, "required": [ "display_name", "widgets" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field centered_title: bool = False#
Whether the title should be centered or left-aligned
- field display_name: str [Required]#
The name to display in the column header
- field tooltip: str = ''#
The tooltip to display when hovering over the column header
- field widgets: list[StageManagerWidgetPlugin] [Required]#
Widgets to be displayed in the column
- field width: ColumnWidth = ColumnWidth(unit=<LengthUnit.FRACTION: 'Fraction'>, value=1.0)#
Width of the column
- build_header()#
Build the UI for the given column header.
- abstract build_ui(
- model: _StageManagerTreeModel,
- item: _StageManagerTreeItem,
- level: int,
- expanded: bool,
Build the UI for the given column. This function will be used within a delegate and should therefore only build the UI for a single element.
- name: ClassVar[str] = 'StageManagerColumnPlugin'#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.context_plugin.StageManagerContextPlugin#
A plugin that allows setting up a context for the other Stage Manager plugins to use afterward.
There should only ever be one context plugin active at any time.
Show JSON schema
{ "title": "StageManagerContextPlugin", "type": "object", "properties": { "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "data_type": { "$ref": "#/$defs/StageManagerDataTypes", "default": "None", "description": "The data type that this plugin provides." }, "listeners": { "default": null, "title": "Listeners" } }, "$defs": { "StageManagerDataTypes": { "enum": [ "None", "USD", "File" ], "title": "StageManagerDataTypes", "type": "string" } }, "required": [ "display_name" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- Validators:
- field data_type: StageManagerDataTypes = StageManagerDataTypes.NONE#
The data type that this plugin provides.
- field display_name: str [Required]#
The string to display when displaying the plugin in the UI
- field listeners: list[StageManagerListenerPlugin] [Required]#
The listeners that should be used to notify the plugins when data changes
- Validated by:
- cleanup()#
Cleanup the context. This will remove all listeners’ subscriptions.
- abstract get_items() list[StageManagerItem]#
Get the items that should be used by the other plugins. This will be called whenever the interaction plugin needs updated data.
- Returns:
A list of items to be used by the other plugins.
- setup()#
Set up the context. This will be called once by the core.
- subscribe_listener_event_occurred(
- event_type: type,
- function: Callable[[Any], None],
Subscribe to any listener that utilizes a matching event type.
- Parameters:
event_type – The event type to listen to
function – The callback to execute when an event of the given type is executed
- Raises
ValueError: If no listener is compatible with the given event type
- Returns:
A list of Event Subscriptions that will unsubscribe automatically on deletion
- name: ClassVar[str] = 'StageManagerContextPlugin'#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.filter_plugin.StageManagerFilterPlugin#
A plugin that allows filtering a list of items based on parameters controlled within the plugin
Show JSON schema
{ "title": "StageManagerFilterPlugin", "description": "A plugin that allows filtering a list of items based on parameters controlled within the plugin", "type": "object", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" }, "display": { "default": true, "description": "Whether the filter plugin should be displayed in the UI", "title": "Display", "type": "boolean" } }, "required": [ "display_name", "tooltip" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field display: bool = True#
Whether the filter plugin should be displayed in the UI
- abstract filter_predicate(
- item: StageManagerItem,
- Parameters:
item – The Stage Manager item to filter.
- Returns:
Whether the item should be kept or not.
- model_post_init(context: Any, /) None#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- refresh_filter_items()#
An external call to refresh the filter items.
- subscribe_filter_items_changed(
- callback: Callable[[], None],
Return the object that will automatically unsubscribe when destroyed.
- name: ClassVar[str] = 'StageManagerFilterPlugin'#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.interaction_plugin.StageManagerInteractionPlugin#
A plugin that encompasses other plugins in the Stage Manager. The Interaction Plugin builds the TreeWidget and uses the filter, column & widget plugins to build the contents.
Show JSON schema
{ "title": "StageManagerInteractionPlugin", "type": "object", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" }, "compatible_data_type": { "$ref": "#/$defs/StageManagerDataTypes", "default": "None", "description": "The data type that this plugin supports." }, "select_all_children": { "default": false, "description": "Whether the tree should select all children items when selecting a parent item or not", "title": "Select All Children", "type": "boolean" }, "scroll_to_selection": { "default": true, "description": "Whether the tree should scroll to the first item in the selection when selection changes", "title": "Scroll To Selection", "type": "boolean" }, "validate_action_selection": { "default": true, "description": "Whether the tree selection should be validated & updated to include the item being right-clicked on or not", "title": "Validate Action Selection", "type": "boolean" }, "tree": { "default": null, "title": "Tree" }, "compatible_trees": { "default": [], "description": "The list of tree plugins compatible with this interaction plugin", "items": { "type": "string" }, "title": "Compatible Trees", "type": "array" }, "compatible_filters": { "default": [], "description": "The list of filter plugins compatible with this interaction plugin", "items": { "type": "string" }, "title": "Compatible Filters", "type": "array" }, "compatible_widgets": { "default": [], "description": "The list of widget plugins compatible with this interaction plugin", "items": { "type": "string" }, "title": "Compatible Widgets", "type": "array" }, "additional_filters": { "default": [], "description": "The list of filter plugins that will be added to an 'Additional Filters' menu", "items": { "$ref": "#/$defs/StageManagerFilterPlugin" }, "title": "Additional Filters", "type": "array" }, "columns": { "default": [], "description": "Columns to display in the TreeWidget", "items": { "$ref": "#/$defs/StageManagerColumnPlugin" }, "title": "Columns", "type": "array" }, "filters": { "default": [], "description": "User controllable filters to apply to the context data on tree model refresh. Defined in schema. Will be displayed in UI and will be executed on data that has passed context filter validation.", "items": { "$ref": "#/$defs/StageManagerFilterPlugin" }, "title": "Filters", "type": "array" }, "context_filters": { "default": [], "description": "Filters to execute when the context data is updated. Defined in schema. Will never be displayed in UI.", "items": { "$ref": "#/$defs/StageManagerFilterPlugin" }, "title": "Context Filters", "type": "array" }, "percent_available_core_usage": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "description": "The percentage of the available CPU cores to use to filter the context items. If the value is unset, the default python maximum will be used.", "title": "Percent Available Core Usage" }, "internal_context_filters": { "default": [], "description": "Context filters defined solely by the interaction plugin. The definition should not be part of the schema. Will never be displayed in UI and will be executed with the context filters.", "items": { "$ref": "#/$defs/StageManagerFilterPlugin" }, "title": "Internal Context Filters", "type": "array" }, "include_invalid_parents": { "default": true, "description": "Whether the tree should include invalid context item parents or whether the tree should be sparse", "title": "Include Invalid Parents", "type": "boolean" }, "row_height": { "default": 28, "description": "The height of the Tree rows in pixels.", "title": "Row Height", "type": "integer" }, "header_height": { "default": 28, "description": "The height of the header in pixels. Will be used to offset the alternating row background", "title": "Header Height", "type": "integer" }, "alternate_row_colors": { "default": true, "description": "Whether the tree's rows should alternate in color", "title": "Alternate Row Colors", "type": "boolean" }, "debounce_frames": { "default": 5, "description": "The number of frames that should be used to debounce the item update requests", "title": "Debounce Frames", "type": "integer" } }, "$defs": { "ColumnWidth": { "properties": { "unit": { "$ref": "#/$defs/LengthUnit", "description": "The unit of the column width" }, "value": { "description": "The value of the column width", "title": "Value", "type": "number" } }, "required": [ "unit", "value" ], "title": "ColumnWidth", "type": "object" }, "LengthUnit": { "enum": [ "Fraction", "Percent", "Pixel" ], "title": "LengthUnit", "type": "string" }, "StageManagerColumnPlugin": { "description": "A plugin that allows the grouping of multiple widgets in a column", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The name to display in the column header", "title": "Display Name", "type": "string" }, "tooltip": { "default": "", "description": "The tooltip to display when hovering over the column header", "title": "Tooltip", "type": "string" }, "widgets": { "description": "Widgets to be displayed in the column", "items": { "$ref": "#/$defs/StageManagerWidgetPlugin" }, "title": "Widgets", "type": "array" }, "width": { "$ref": "#/$defs/ColumnWidth", "default": { "unit": "Fraction", "value": 1.0 }, "description": "Width of the column" }, "centered_title": { "default": false, "description": "Whether the title should be centered or left-aligned", "title": "Centered Title", "type": "boolean" } }, "required": [ "display_name", "widgets" ], "title": "StageManagerColumnPlugin", "type": "object" }, "StageManagerDataTypes": { "enum": [ "None", "USD", "File" ], "title": "StageManagerDataTypes", "type": "string" }, "StageManagerFilterPlugin": { "description": "A plugin that allows filtering a list of items based on parameters controlled within the plugin", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" }, "display": { "default": true, "description": "Whether the filter plugin should be displayed in the UI", "title": "Display", "type": "boolean" } }, "required": [ "display_name", "tooltip" ], "title": "StageManagerFilterPlugin", "type": "object" }, "StageManagerWidgetPlugin": { "description": "A plugin that provides a widget for the TreeView", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" } }, "required": [ "display_name", "tooltip" ], "title": "StageManagerWidgetPlugin", "type": "object" } }, "required": [ "display_name", "tooltip" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
columns (list[omni.flux.stage_manager.factory.plugins.column_plugin.StageManagerColumnPlugin])compatible_data_type (omni.flux.stage_manager.factory.enums.StageManagerDataTypes)filters (list[omni.flux.stage_manager.factory.plugins.filter_plugin.StageManagerFilterPlugin])tree (omni.flux.stage_manager.factory.plugins.tree_plugin.StageManagerTreePlugin)
- Validators:
- field additional_filters: list[StageManagerFilterPlugin] = []#
The list of filter plugins that will be added to an ‘Additional Filters’ menu
- Validated by:
- field alternate_row_colors: bool = True#
Whether the tree’s rows should alternate in color
- Validated by:
- field columns: list[StageManagerColumnPlugin] = []#
Columns to display in the TreeWidget
- Validated by:
- field compatible_data_type: StageManagerDataTypes = StageManagerDataTypes.NONE#
The data type that this plugin supports.
- Validated by:
- field compatible_filters: list[str] = []#
The list of filter plugins compatible with this interaction plugin
- Validated by:
- field compatible_trees: list[str] = []#
The list of tree plugins compatible with this interaction plugin
- Validated by:
- field compatible_widgets: list[str] = []#
The list of widget plugins compatible with this interaction plugin
- Validated by:
- field context_filters: list[StageManagerFilterPlugin] = []#
Filters to execute when the context data is updated. Defined in schema. Will never be displayed in UI.
- Validated by:
- field debounce_frames: int = 5#
The number of frames that should be used to debounce the item update requests
- Validated by:
- field filters: list[StageManagerFilterPlugin] = []#
User controllable filters to apply to the context data on tree model refresh. Defined in schema. Will be displayed in UI and will be executed on data that has passed context filter validation.
- Validated by:
- field header_height: int = 28#
The height of the header in pixels. Will be used to offset the alternating row background
- Validated by:
- field include_invalid_parents: bool = True#
Whether the tree should include invalid context item parents or whether the tree should be sparse
- Validated by:
- field internal_context_filters: list[StageManagerFilterPlugin] = []#
Context filters defined solely by the interaction plugin. The definition should not be part of the schema. Will never be displayed in UI and will be executed with the context filters.
- Validated by:
- field percent_available_core_usage: float | None = None#
The percentage of the available CPU cores to use to filter the context items. If the value is unset, the default python maximum will be used.
- field row_height: int = 28#
The height of the Tree rows in pixels.
- Validated by:
- field scroll_to_selection: bool = True#
Whether the tree should scroll to the first item in the selection when selection changes
- Validated by:
- field select_all_children: bool = False#
Whether the tree should select all children items when selecting a parent item or not
- Validated by:
- field tree: StageManagerTreePlugin [Required]#
The tree plugin defining the model and delegate
- Validated by:
- field validate_action_selection: bool = True#
Whether the tree selection should be validated & updated to include the item being right-clicked on or not
- Validated by:
- build_ui()#
The method used to build the UI for the plugin.
- Raises:
ValueError – If the plugin was not initialized before building the UI.
- validator check_plugin_compatibility » all fields#
- validator check_positive_frame_count » debounce_frames#
- validator check_unique_filters » context_filters, filters, internal_context_filters#
- validator check_valid_percent_available_core_usage » percent_available_core_usage#
- destroy()#
- model_post_init(context: Any, /) None#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- set_active(value: bool)#
Whether the interaction plugin is active or not. Only 1 interaction plugin should be active at a time. Active status should be managed by the widget
- Parameters:
value – whether the interaction plugin is active or not
- setup(
- value: StageManagerContextPlugin,
Set up the interaction plugin with the given context.
- Parameters:
value – the context the interaction plugin should use
- subscribe_context_items_changed(
- callback: Callable[[], None],
Execute the callback when context items are updated.
- Parameters:
callback – The callback to execute
- Returns:
Return an object that will automatically unsubscribe when destroyed.
- property is_active: bool#
Whether the interaction plugin is active or not. Only 1 interaction plugin should be active at a time. Active status should be managed by the widget
- name: ClassVar[str] = 'StageManagerInteractionPlugin'#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.listener_plugin.StageManagerListenerPlugin
A plugin that allows listening to a source and notify any plugin listening
Show JSON schema
{ "title": "StageManagerListenerPlugin", "type": "object", "properties": { "event_type": { "default": null, "title": "Event Type" }, "compatible_data_type": { "$ref": "#/$defs/StageManagerDataTypes", "default": "None", "description": "The data type that this listener supports." } }, "$defs": { "StageManagerDataTypes": { "enum": [ "None", "USD", "File" ], "title": "StageManagerDataTypes", "type": "string" } } }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
compatible_data_type (omni.flux.stage_manager.factory.enums.StageManagerDataTypes)event_type (type)
- field compatible_data_type: StageManagerDataTypes = StageManagerDataTypes.NONE
The data type that this listener supports.
- field event_type: type [Required]
The type of event that this listener subscribes to
- abstract cleanup()
Cleanup the listeners’ subscriptions.
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- abstract setup()
A method called during the context initialization to initialize the listener
- subscribe_event_occurred(
- callback: Callable[[T], None],
Return the object that will automatically unsubscribe when destroyed.
- name: ClassVar[str] = 'StageManagerListenerPlugin'
- pydantic model omni.flux.stage_manager.factory.plugins.listener_plugin.StageManagerListenerPlugin
A plugin that allows listening to a source and notify any plugin listening
Show JSON schema
{ "title": "StageManagerListenerPlugin", "type": "object", "properties": { "event_type": { "default": null, "title": "Event Type" }, "compatible_data_type": { "$ref": "#/$defs/StageManagerDataTypes", "default": "None", "description": "The data type that this listener supports." } }, "$defs": { "StageManagerDataTypes": { "enum": [ "None", "USD", "File" ], "title": "StageManagerDataTypes", "type": "string" } } }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
compatible_data_type (omni.flux.stage_manager.factory.enums.StageManagerDataTypes)event_type (type)
- field compatible_data_type: StageManagerDataTypes = StageManagerDataTypes.NONE
The data type that this listener supports.
- field event_type: type [Required]
The type of event that this listener subscribes to
- abstract cleanup()
Cleanup the listeners’ subscriptions.
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- abstract setup()
A method called during the context initialization to initialize the listener
- subscribe_event_occurred(
- callback: Callable[[T], None],
Return the object that will automatically unsubscribe when destroyed.
- name: ClassVar[str] = 'StageManagerListenerPlugin'
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class omni.flux.stage_manager.factory.plugins.tree_plugin.StageManagerTreeDelegate(
- header_height: int = 24,
- row_height: int = 24,
A TreeView delegate used to define the look of every element in the tree
- call_item_clicked(
- button: int,
- should_validate: bool,
- model: StageManagerTreeModel,
- item: StageManagerTreeItem,
Trigger the _item_clicked event
- Parameters:
button – The mouse button that triggered the event
should_validate – Whether the TreeView selection should be validated or not
model – The tree model
item – The tree item that was clicked
- class omni.flux.stage_manager.factory.plugins.tree_plugin.StageManagerTreeItem(
- display_name: str,
- data: Any,
- tooltip: str = '',
- display_name_ancestor: str | None = None,
A TreeView item used in TreeView models
- Parameters:
display_name – The string to display in the TreeView
data – The data associated with the item
tooltip – The tooltip to display when hovering over the item
display_name_ancestor – A string to prepend to the display name with
- add_child(
- item: StageManagerTreeItem,
Add a child item
- Parameters:
item – The child item to add
- build_widget()#
Method that can be used to build the widgets to build a widget displaying the items
- property can_have_children: bool#
Whether the item can have children or not
- Returns:
By default, items that have children will return True, and items without children will return False
- property data: Any#
Custom data held in the item. Can be used by the widgets
- property display_name: str#
The display name for the item. Can be used by the widgets
- property display_name_ancestor: str#
The display name of the item’s ancestor. Can be used for sorting
- property icon: str | None#
The icon style name associated with the item. Can be used by the widgets
- property label_width: int#
The width of the label
- property parent: StageManagerTreeItem#
The parent item for which this item is a child
- property pending_edit: bool#
Whether the item is pending edit
- property show_nickname: bool#
Whether the nickname is shown or not
- property tooltip: str#
The tooltip displayed when hovering the item. Can be used by the widgets
- class omni.flux.stage_manager.factory.plugins.tree_plugin.StageManagerTreeModel#
A TreeView model used to define the structure of the tree
- add_context_predicates(
- value: list[Callable[[_StageManagerItem], bool]],
Extend the context filter predicates that can be used by the model if required
- add_user_filter_predicates(
- value: list[Callable[[_StageManagerItem], bool]],
Extend the filter predicates to apply to the items during filtering
- clear_context_predicates()#
Clear the context filter predicates that can be used by the model if required
- clear_user_filter_predicates()#
Clear the filter predicates to apply to the items during filtering
- property column_count: int#
Get the number of columns to build
- find_items(
- predicate: Callable[[StageManagerTreeItem], bool],
Find all items matching a predicate.
- Parameters:
predicate – Function that returns True for items that should be included
- Returns:
List of items matching the predicate
- async find_items_async(
- predicate: Callable[[StageManagerTreeItem], bool],
Find all items matching a predicate without blocking the UI.
Runs the search in a background thread and returns the results asynchronously.
- Parameters:
predicate – Function that returns True for items that should be included
- Returns:
List of items matching the predicate
- async get_context_items() list[_StageManagerItem]#
Get items set by the context plugin.
Items are filtered before they are returned
- get_item_children(
- item: StageManagerTreeItem | None,
Returns all the children of any given item.
- get_item_value_model_count(
- self: omni.ui._ui.AbstractItemModel,
- item: omni.ui._ui.AbstractItem = None,
Returns the number of columns this model item contains.
- get_show_nickname_override(
- item: StageManagerTreeItem,
Get the show nickname override for an item
- property items_dict: dict[int, StageManagerTreeItem]#
Get a dictionary of item hashes and items
- notify_item_changed(
- item: StageManagerTreeItem | None = None,
Notify the TreeView that an item has changed and needs to be rebuilt.
- Parameters:
item – The item that changed, or None to rebuild all visible widgets
- async refresh()#
Method called when the self._items attribute should be refreshed
- set_context_items(
- items: Iterable[_StageManagerItem],
Set items fetched in the context plugin
- set_max_workers(max_workers: int | None)#
Set the maximum number of workers to use when filtering context items
- set_show_nickname_override(
- item: StageManagerTreeItem,
Set the show nickname override for an item
- property show_nickname: bool#
Whether the nickname is shown or not
- sort_items(items, sort_children: bool = True)#
Sort the tree items in alphabetical order
- toggle_nickname()#
Toggle the show nickname state
- pydantic model omni.flux.stage_manager.factory.plugins.tree_plugin.StageManagerTreePlugin#
A plugin that provides a TreeView model and delegate
Show JSON schema
{ "title": "StageManagerTreePlugin", "type": "object", "properties": { "model": { "default": null, "title": "Model" }, "delegate": { "default": null, "title": "Delegate" } } }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field delegate: StageManagerTreeDelegate [Required]#
The tree delegate
- field model: StageManagerTreeModel [Required]#
The tree model
- name: ClassVar[str] = 'StageManagerTreePlugin'#
SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- pydantic model omni.flux.stage_manager.factory.plugins.widget_plugin.StageManagerWidgetPlugin#
A plugin that provides a widget for the TreeView
Show JSON schema
{ "title": "StageManagerWidgetPlugin", "description": "A plugin that provides a widget for the TreeView", "type": "object", "properties": { "enabled": { "default": true, "description": "Whether the plugin should be enabled or not", "title": "Enabled", "type": "boolean" }, "display_name": { "description": "The string to display when displaying the plugin in the UI", "title": "Display Name", "type": "string" }, "tooltip": { "description": "The tooltip to display when hovering over the plugin in the UI", "title": "Tooltip", "type": "string" } }, "required": [ "display_name", "tooltip" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- build_overview_ui(
- model: _StageManagerTreeModel,
Default implementation creates a spacer matching the icon size for alignment.
- abstract build_ui(
- model: _StageManagerTreeModel,
- item: _StageManagerTreeItem,
- level: int,
- expanded: bool,
The method used to build the UI for the plugin.
- model_post_init(context: Any, /) None#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Parameters:
self – The BaseModel instance.
context – The context.
- subscribe_item_clicked(
- callback: Callable[[int, bool, _StageManagerTreeModel, _StageManagerTreeItem], None],
Subscribe to the event that is triggered when a widget is clicked.
- Parameters:
callback – A function that will be called when the widget is clicked.
- Returns:
An object that will automatically unsubscribe when destroyed.
- name: ClassVar[str] = 'StageManagerWidgetPlugin'#