omni.flux.bookmark_tree.model.usd#
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.bookmark_tree.model.usd.UsdBookmarkCollectionModel(context_name: str = '')#
- add_item_to_collection(
- prim_path: str,
- collection_path: str,
- use_undo_group: bool = True,
Add an item to an existing collection.
- Parameters:
prim_path – The prim path of the item to add.
collection_path – The prim path of the collection to add the item to.
use_undo_group – Whether an undo group should be used or not.
- clear_collection(
- collection_path: str,
- use_undo_group: bool = True,
Clear a bookmark collection of all its content.
- Parameters:
collection_path – The prim path of the collection to clear.
use_undo_group – Whether an undo group should be used or not.
- create_collection(
- collection_name: str,
- parent: BookmarkCollectionItem | None,
- use_undo_group: bool = True,
Create a bookmark collection. Will also create the bookmark prim if it doesn’t already exist.
- Parameters:
collection_name – The name of the collection to create. This is not guaranteed to be the final collection name as all names must be unique and the command enforces that condition.
parent – The parent collection item. The collection will be added as a child of the parent upon creation.
use_undo_group – Whether an undo group should be used or not.
- delete_collection(
- collection_path: str,
- parent: BookmarkCollectionItem | None,
- use_undo_group: bool = True,
Delete a bookmark collection and all its content. Will also recursively delete any child collection.
- Parameters:
collection_path – The prim path of the collection to delete.
parent – The parent collection item. The collection will be removed from the children of the parent.
use_undo_group – Whether an undo group should be used or not.
- enable_listeners(value)#
Enable USD listeners and refresh the model.
- Parameters:
value – Whether the listeners should be enabled or disabled
- get_active_items() List#
Get the list of items currently selected in the viewport.
- refresh()#
Refresh the model on the next frame asynchronously.
- remove_item_from_collection(
- prim_path: str,
- collection_path: str,
- use_undo_group: bool = True,
Remove an item to an existing collection.
- Parameters:
prim_path – The prim path of the item to remove.
collection_path – The prim path of the collection to remove the item from.
use_undo_group – Whether an undo group should be used or not.
- rename_collection(
- old_collection_path: str,
- new_collection_name: str,
- parent: BookmarkCollectionItem | None,
- use_undo_group: bool = True,
Rename a bookmark collection. Will also update parent collections.
- Parameters:
old_collection_path – The prim path of the collection to rename.
new_collection_name – The new name the collection should use
parent – The parent collection item. This must be set in order for the parent collection to have the updated path of the collection in its includes.
use_undo_group – Whether an undo group should be used or not.
- set_active_items(items)#
Set the list of items selected in the viewport.
This will only select bookmark item elements in the viewport (no collections)
- property stage#
Get the model’s stage. Used by the USD Listener.
- class omni.flux.bookmark_tree.model.usd.UsdBookmarkCollectionWidgetExtension#
Create Final Configuration