PathsModel

class omni.kit.window.extensions.exts_properties_paths.PathsModel

Bases: AbstractItemModel

A model for managing and interacting with filesystem paths within a user interface.

This model is designed to work with a UI framework to display and manipulate paths related to extensions and their respective types, such as collections, user directories, cache directories, and direct paths. It supports operations like adding new paths, removing existing ones, cleaning cache directories, and updating git repositories. The model holds a list of path items and provides methods to perform actions on these items.

Methods

__init__()

Initializes the model for managing paths in the application.

add_empty()

Adds an empty path item to the model.

clean_cache(item)

Cleans the cache for a specified item.

destroy()

Clears all the children from the model.

get_item_children(item)

Returns all the children for the given item.

get_item_value_model(item, column_id)

Retrieves the value model for a given item and column.

get_item_value_model_count(item)

Returns the number of columns in the model.

remove_item(item)

Removes a specified item from the model.

save()

Saves the current paths to the extension manager.

update_git(item)

Updates the GIT path for a specified item.

__init__()

Initializes the model for managing paths in the application.

add_empty()

Adds an empty path item to the model.

clean_cache(item)

Cleans the cache for a specified item.

Parameters

item – The item whose cache to clean.

destroy()

Clears all the children from the model.

get_item_children(item)

Returns all the children for the given item.

Parameters

item – The item to retrieve children for.

get_item_value_model(item, column_id)

Retrieves the value model for a given item and column.

Parameters
  • item – The item to retrieve the value model for.

  • column_id – The column ID for which to retrieve the value model.

get_item_value_model_count(item)

Returns the number of columns in the model.

Parameters

item – The item for which to count the value models.

remove_item(item)

Removes a specified item from the model.

Parameters

item – The item to be removed.

save()

Saves the current paths to the extension manager.

update_git(item)

Updates the GIT path for a specified item.

Parameters

item – The item whose GIT path to update.