omni.flux.validator.manager.widget#

  • 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

  • https://www.apache.org/licenses/LICENSE-2.0

  • 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

  • https://www.apache.org/licenses/LICENSE-2.0

  • 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.validator.manager.widget.tree.delegate.Delegate#

Delegate of the tree

build_branch(model, item, column_id, level, expanded)#

Create a branch widget that opens or closes subtree

build_header(column_id)#

Build the header

build_widget(model, item, column_id, level, expanded)#

Create a widget per item

on_plugin_done(
message_set_fn: Callable[[str], Any],
data,
attr_messages: List[str],
_result: bool,
_message: str,
*_args,
)#

When a plugin finished his process, we can set the message into a string field

Parameters:
  • message_set_fn – the callback that will set the message

  • data – data of the plugin

  • attr_messages – attributes to get the message from

  • _result – the bool result of the plugin

  • _message – the message of the plugin that we want to show

  • *_args – anything from the plugin

subscribe_on_run_selected_clicked(
function: Callable[[BaseItem, ValidatorRunMode], Any],
)#

Subscribe to the on_item_expanded event.

Parameters:

function – the callback to execute when the event is triggered

Returns:

An object that will automatically unsubscribe when destroyed.

  • 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

  • https://www.apache.org/licenses/LICENSE-2.0

  • 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.validator.manager.widget.tree.model.BaseItem(
plugin: Schema,
)#

Item of the model

property plugin#

The plugin that the item hold

property title#

Label to show on the UI

class omni.flux.validator.manager.widget.tree.model.CheckerItem(
plugin: Schema,
)#

Item of the model

class omni.flux.validator.manager.widget.tree.model.ContextItem(
plugin: Schema,
parent: CheckerItem | None = None,
)#

Item of the model

property ui_items#

The UI item to show for this item

class omni.flux.validator.manager.widget.tree.model.CustomProgressValueModel(value: float, message: str, result: bool)#

An example of custom float model that can be used for progress bar

get_value_as_bool(
self: omni.ui._ui.AbstractValueModel,
) bool#

Return the bool representation of the value.

get_value_as_float(
self: omni.ui._ui.AbstractValueModel,
) float#

Return the float representation of the value.

get_value_as_string(
self: omni.ui._ui.AbstractValueModel,
) str#

Return the string representation of the value.

set_value(value, message, result)#

Reimplemented set

class omni.flux.validator.manager.widget.tree.model.Model#

Basic list model

get_item_children(
item: CheckerItem | None,
)#

Returns all the children when the widget asks it.

get_item_value_model(item, column_id)#

Return value model. It’s the object that tracks the specific value. In our case we use ui.SimpleStringModel.

get_item_value_model_count(
item: CheckerItem,
)#

The number of columns

set_items(
items: List[CheckerItem],
)#

Set the items to show

class omni.flux.validator.manager.widget.tree.model.ResultorItem(
plugin: Schema,
)#

Item of the model

property ui_items#

The UI item to show for this item

class omni.flux.validator.manager.widget.tree.model.SelectorItem(
plugin: Schema,
parent: CheckerItem,
)#

Item of the model

property ui_items#

The UI item to show for this item

class omni.flux.validator.manager.widget.tree.model.UIItem(
plugin: Schema | Schema,
parent: SelectorItem | CheckerItem | ResultorItem,
)#

Item of the model

property plugin#

The plugin that the item hold