diff --git a/1_0_0_48.md b/1_0_0_48.md new file mode 100644 index 0000000000000000000000000000000000000000..b5b6ed528ed9e5c3c6e86ecaa4d6d7f907695b23 --- /dev/null +++ b/1_0_0_48.md @@ -0,0 +1,56 @@ + + +1.00.48 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.00.48 + +  + +# 1.00.48 + +Release Date: Feb 2021 + +## New Features + +News tab – shows the latest information about Omniverse +Show Nucleus Web on the collaboration tab +Improved keyboard navigation and accessibility +Update info for installed apps and connectors automatically when the library tab is opened +Improved the drag area for the main window +Remove failed installers from the installation queue automatically +Added a button to clear the search input +Added a button to open logs location +Allow users to copy notification text +Hide Launcher when started with the system +Change the bell color to red if notifications contain errors +Added a header for error notifications +Added a link to show open-source licenses used in the launcher +Create a user session in System Monitor after Nucleus is installed +Show loading indicators and errors on the startup window + +## Improvements + +Fixed installation controls were not clickable +Ignore OS errors during the installation cancel +Fixed problems with loading internal launcher settings +Fixed problems with initialization during the authentication +Fixed a bug where users went back in collaboration tab and saw ‘null’ instead of a data path +Fixed a bug where users got redirected to a broken Nucleus page when clicked on a notification +Fixed left spacing in component details on the exchange tab +Fixed issues with invalid usernames specified during the installation of the collaboration service +Fixed users were not prompted to select data paths or install Cache +Fixed previous Cache versions were not deleted automatically after updates +Fixed the launch button on the library tab displaying “Up to date” when update is available +Fixed “Cancel” button was visible when installing components +Fixed text overflow in the installation progress + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_0_42.md b/1_0_42.md new file mode 100644 index 0000000000000000000000000000000000000000..dd48b5067f0076e2f8e0f28a3dfba8a7191ae816 --- /dev/null +++ b/1_0_42.md @@ -0,0 +1,28 @@ + + +1.0.42 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.0.42 + +  + +# 1.0.42 + +Release Date: Jan 2021 + +Added News section to display content from Omniverse News in the launcher +Fixed collecting hardware info on Linux when lshw returns an array +Add a login session in System Monitor when Nucleus is installed +Moved all licenses to PACKAGE-LICENSES folder, added a LICENSES link to the about dialog +Fixed user was not prompted to select data paths or install Cache + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_0_50.md b/1_0_50.md new file mode 100644 index 0000000000000000000000000000000000000000..fd16ee1b9d28fcf5862c4f86adf6cfcc276651eb --- /dev/null +++ b/1_0_50.md @@ -0,0 +1,31 @@ + + +1.0.50 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.0.50 + +  + +# 1.0.50 + +Release Date: March 2021 + +## Fixed + +Catch unexpected Starfleet responses and return the error that tells users to log in. +Fixed licenses link not working on Linux. + +## Removed + +Remove debug noise in logs from the auto-updater. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_1_2.md b/1_1_2.md new file mode 100644 index 0000000000000000000000000000000000000000..81e5c38a37840a11cef40900c6037ce41227a9e5 --- /dev/null +++ b/1_1_2.md @@ -0,0 +1,65 @@ + + +1.1.2 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.1.2 + +  + +# 1.1.2 + +Release Date: March 2021 + +## Spotlight Features + +New “Learn Tab” available in launcher lets you get quick and immediate “in-launcher” access to our video learning portal. From Introductory content for the beginner to highly focused deep dives for the experienced, Omniverse Learning Videos are now just a click away. + +## New Capabilities + +Show available updates for components on the exchange tab. +Show component versions in the list view on the exchange tab. +Added omniverse-launcher://exit command to close the launcher. +Register a custom protocol handler on Linux automatically. +HTTP API to get the current authentication info. +HTTP API to get a list of installed components and their settings. +Added Learn tab. +Added new options to group and sort content on the exchange tab. +Added the list view for components on the exchange tab. +Use omniverse-launcher:// custom protocol to accept commands from other apps. +Added the telemetry service for events from external applications. + +## Fixed/Altered + +Changed the aspect ratio of images used in component cards to be 16:9. +Fixed focusing the search bar automatically when nothing was typed in the input. +Fixed reinstalling components that were marked as installed after a restart. +Changed the gap between cards on the Exchange tab using the grid view. +Fixed refreshing News and Learn pages when users click on the header tabs. +Fixed News and Learn links to load webpages without headers and footers. +Fixed the scrollbar on the Exchange tab not working correctly when dragged with a mouse. +Fixed clicking area for the notification bell. +Fixed Nucleus showing up in the library. +Fixed “Uninstall” button position in component settings dialog. +Fixed the search input losing focus after typing. +Fixed losing the search filters after selecting a card on the exchange tab. +Changed how content is structured and searched on the exchange tab – moved Apps and Connectors categories to the left menu. +Improved the load speed and performance on the exchange tab. +Show placeholder in the installation queue if no downloads are queued. +Load messages displayed in the footer from the server. +Match the font size used for links in the settings dialog. +Updated links on Collaboration tab. +Fixed extracting files from zip archives with a read-only flag on Windows. +Fixed error that crashed browser page and didn’t let users log in. +Fixed showing invalid error messages in the exchange tab when Starfleet returns unexpected response body. +Fixed expiration of the authentication token. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_2_8.md b/1_2_8.md new file mode 100644 index 0000000000000000000000000000000000000000..698bbfa574ef39a8fde9b4bf615470b9fe26ecb2 --- /dev/null +++ b/1_2_8.md @@ -0,0 +1,92 @@ + + +1.2.8 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.2.8 + +  + +# 1.2.8 + +Release Date: Aug 2021 + +## Spotlight Features + +Previous Versions +Users can now install previous version of Omniverse via a new and improved interface. + +Easy Links +When opening files for the first time from a linked location, launcher now confirms the app to load with. + +Users can also set the default app manually in settings. + +## Added + +Allow to customize system requirements for installable components. +Display a notification when applications are successfully uninstalled. +Added a smooth transition animation for the library tab. +Added thin packaging support - allows splitting large components into smaller packages that can be reused. +Added “Exit” button to the user menu. +Support installing previous versions of applications and connectors. +Added new dialog to select the default application used to open Omniverse links. +Support markdown for component description. +Show an error message on startup if Launcher can’t read the library database file. + +## Changed + +Scale side menu on the exchange tab based on the screen size. +Updated Starfleet integration to use name instead of preferred_username. +Renamed Download Launcher button to Download Enterprise Launcher +Display “News” tab inside of Launcher. +Use thumbnail images on the exchange tab to optimize page load time. +Disable Launch button for three seconds after click to prevent launching apps multiple times. +Display an error when iframes can’t load the external web page. +Update privacy settings on a new login. +Renamed “Collaboration” tab to “Nucleus”. +Updated “News” and “Learn” links to hide the website header. +Support tables and headers for component description via Markdown and HTML. +Changed the inactive tab color on the library tab. +Made Launcher errors more readable. +“News” and “Learn” tabs open a web browser now instead of showing these pages in iframes. + +## Fixed + +Fixed issues where users could install or update the same app more than once. +Fixed resizing of the main window at the top. +Fixed issues with scrolling the exchange tab when the featured section is available. +Fixed showing the main window on system startup (Launcher will be hidden in the system tray). +Ignore system errors when Launcher removes installed components. +Fixed an issue when users could not change their current account without a reboot. +Fixed race condition when users rapidly click on the installer pause button multiple times. +Fixed an issue with installers not queueing up in the correct order. +Fixed missing vendor prefix for desktop files on Linux to register a custom protocol handler. +Fixed issues with floating carousel images for featured components. +Preserve unknown fields in privacy.toml file. +Invalidate cached HTTP responses on a startup. +Fixed issues with cached URLs for loading applications and their versions. +Fixed installing previous versions of applications that don’t support side-by-side installations. +Fixed thin package installer did not create intermediate folders for installed packages. +Refresh auth tokens when external apps query /auth endpoint. +Fixed displaying loading state on the Nucleus tab if Nucleus installer fails. +Fixed issue with components not been marked as installed. +Fixed sorting of exchange components in the left menu. +Fixed displaying hidden components on the library tab after installation. +Allow Launcher to start without downloading the GDPR agreement if it’s accepted already. +Fixed running applications that require the finalize script after install. +Fixed running applications that require the finalize script after install. + +## Removed + +Launcher Cleanup tool disabled from running during uninstall/reinstall in Windows. +Removed OS and Video Driver from system requirements. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_3_3.md b/1_3_3.md new file mode 100644 index 0000000000000000000000000000000000000000..cb1aa044672afa4e2af2ac419b194bc33f5dc0d6 --- /dev/null +++ b/1_3_3.md @@ -0,0 +1,42 @@ + + +1.3.3 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.3.3 + +  + +# 1.3.3 + +Release Date: Oct 2021 + +## Added + +Added the OS version to com.nvidia.omniverse.launcher.session telemetry event. +Added the locale to com.nvidia.omniverse.launcher.session telemetry event. +Added “Developer” and “Publisher” fields to component details. +Show “Welcome to Omniverse” page on the first launch. +Support installing the Enterprise Launcher to a shared location on Linux. + +## Fixed + +Fixed an issue where “Add Connector” button was pointing to the wrong location on the Exchange tab. +Fixed an issue where the default Omniverse app was not reset after its last version is uninstalled. +Fixed an issue where the startup component didn’t react on the background authentication. +Fixed an issue where installers that were initiated from the library tab ignored the current queue and started a download immediately. +Fixed Japanese translations. +Fixed an issue that caused a delay for queuing new installers. +Fixed an issue where components were added to the library before they were registered by scripts. +Fixed an issue where component platforms were determined incorrectly if thin packaging is used. +Fixed an issue where installers used incorrect path with the latest component version instead of the specified version. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_3_4.md b/1_3_4.md new file mode 100644 index 0000000000000000000000000000000000000000..62759af2dcddb012d394f5f7d27c8eaffa9435ff --- /dev/null +++ b/1_3_4.md @@ -0,0 +1,34 @@ + + +1.3.4 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.3.4 + +  + +# 1.3.4 + +Release Date: Oct 2021 + +## Added + +Show the installation date for apps displayed on the library tab. +Added “Collect debug info” button to the settings dialog to prepare a tarball with logs and configuration files. +Show “External link” button for third-party components on the detailed page. + +## Fixed + +Fixed an issue where links on the “Learn” tab didn’t work after watching a video. +Fixed showing the latest component version instead of the currently installed version on the library tab. +Fixed an issue with dangling installers in the queue. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_4_0.md b/1_4_0.md new file mode 100644 index 0000000000000000000000000000000000000000..750412e0060a03f8d9da13e52ad7939153280a39 --- /dev/null +++ b/1_4_0.md @@ -0,0 +1,37 @@ + + +1.4.0 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.4.0 + +  + +# 1.4.0 + +Release Date: Nov 2022 + +## Changed + +Added retries for downloading EULA and GDPR agreements. + +## Fixed + +Fixed an issue with scrolling the left menu on the exchange tab. +Fixed an issue where Launcher dialogs were displayed behind the exchange view after navigation. +Fixed an issue where thin packages could not install correctly if the file system had dangling symlinks. +Remove all unused packages on the startup. +Fixed an issue where failed updates changed the latest registered app version in the library. +Fixed an issue where scheduling two installers could not finish the download if authentication needs to be refreshed. +Fixed an issue with collecting hardware info on Windows 11. +Fixed sending multiple simultaneous session events. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_5_1.md b/1_5_1.md new file mode 100644 index 0000000000000000000000000000000000000000..c1c1ddb701718ae95fce31cf6647fcdcbc5f2997 --- /dev/null +++ b/1_5_1.md @@ -0,0 +1,39 @@ + + +1.5.1 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.5.1 + +  + +# 1.5.1 + +Release Date: Jan 2022 + +## Added + +Launcher can now pull notifications from the server. This can be used to send important messages to users instead of displaying them in the toolbar. + +## Changed + +Changed colors for messages displayed in the bottom toolbar (white for regular text and blue for links instead of yellow). + +## Fixed + +Escape desktop entry path on Linux for opening custom protocol links. +Fixed an issue where News and Learn tabs were refreshed when Launcher lost or regained focus. +Increased the default window size to fit the cache path in the Launcher settings. +Raise an error when users try to install components that are already installed. +Raise an error when users try to launch components that are not installed. +Fixed an issue where some packages couldn’t be moved to the right location by offline installer. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_5_3.md b/1_5_3.md new file mode 100644 index 0000000000000000000000000000000000000000..5cd384f200f9f519a4fd1fb5cdbc24406ac4be3e --- /dev/null +++ b/1_5_3.md @@ -0,0 +1,34 @@ + + +1.5.3 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.5.3 + +  + +# 1.5.3 + +Release Date: March 2022 + +## Added + +Added a check argument for omniverse-launcher://install command that manages throwing an error in case the same component is already installed. +Support external links for third-party content. + +## Fixed + +Fixed an issue where downloaded zip archives were not removed when the installer is cancelled. +Improved Italian localization. +Fixed an issue where licenses were required for third-party content. +Fixed an issue where problematic components could crash the application. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_5_4.md b/1_5_4.md new file mode 100644 index 0000000000000000000000000000000000000000..1341545dfb1252e693f88ce7d5c7482202a667dd --- /dev/null +++ b/1_5_4.md @@ -0,0 +1,30 @@ + + +1.5.4 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.5.4 + +  + +# 1.5.4 + +Release Date: April 2022 + +## Fixed + +Fixed an issue where users couldn’t change configured paths in Launcher. +Fixed Italian translations. +Fixed an issue where Launcher couldn’t be started if System Monitor is installed but missing on disk. +Fixed an issue where connector updates were started immediately instead of being queued on the library tab. +Fixed an issue where components couldn’t be found by full names and tags on the Exchange tab. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_5_5.md b/1_5_5.md new file mode 100644 index 0000000000000000000000000000000000000000..d8d828a5773efe481b2c7c971519b11d9abe45bc --- /dev/null +++ b/1_5_5.md @@ -0,0 +1,30 @@ + + +1.5.5 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.5.5 + +  + +# 1.5.5 + +Release Date: June 2022 + +## Fixed + +Fixed an issue related to refreshing the session when installing new apps after desktop comes out of sleep mode. +Fixed an issue where connectors displayed in the library were enlarged. +Fixed an issue related to a blank error when Launcher is started without internet connection. +Fixed an issue where “Data collection and use” did not reset the language on dialog cancel. +Fixed an issue where trailing slashes were omitted when Launcher opened omniverse:// links. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_5_7.md b/1_5_7.md new file mode 100644 index 0000000000000000000000000000000000000000..709c54cfff540018a3e395945ef112bed8cb1e84 --- /dev/null +++ b/1_5_7.md @@ -0,0 +1,35 @@ + + +1.5.7 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.5.7 + +  + +# 1.5.7 + +Release Date: May 2023 + +## Added + +Added new controls for changing the current language on the login screen. +Added the Extensions content type in the Exchange. + +## Fixed + +Fixed an issue where the close icon closed Launcher instead of hiding it to the system tray. +Removed the crash reporter logging when using custom protocol commands. +Fixed an issue that caused a crash when Launcher failed to collect hardware info. +Fixed an issue where connectors were sometimes duplicated after the installation. +Fixed an issue where “Add connector” button on the Library tab opened a blank page. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_6_1.md b/1_6_1.md new file mode 100644 index 0000000000000000000000000000000000000000..d14378224f23491dc7952b0825837caa7f2ad6bd --- /dev/null +++ b/1_6_1.md @@ -0,0 +1,47 @@ + + +1.6.10 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.6.10 + +  + +# 1.6.10 + +Release Date: Sept 2022 + +## Added + +Integrated Navigator filesystem directly into the Nucleus tab. +Added “Show in folder” option for downloaded files in Navigator. +Extension installation. +/open command for opening files with installed applications. +Added links for Nucleus Cache in the library. +Display an icon for external packages on the Exchange tab. +Added new UI for Omniverse Drive 2. +Added Ukrainian language translations to locale. + +## Fixed + +Updated dependencies to address minor potential security vulnerabilities. +Improved error reporting when files are used by other processes. +Fixed an issue where pressing Enter closed modal dialogs. +Fixed selecting all notifications when users click on the notification bell. +Fixed “Invalid time value” error displayed for some OS locales on startup. +Fixed an issue where Launcher displayed dates in different formats on the Library tab. +Fixed scrolling the language selection in the settings displayed during the first installation. +Fixed triggering Google Translate dialog on the login result page. +Fixed displaying user settings and notifications behind Nucleus installation dialog. +Fixed an issue where Launcher couldn’t download new updates after the first downloaded patch. +Fixed translations. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_7_1.md b/1_7_1.md new file mode 100644 index 0000000000000000000000000000000000000000..bcccdc47397d840f2ce1c6de23145affee5ddd78 --- /dev/null +++ b/1_7_1.md @@ -0,0 +1,28 @@ + + +1.7.1 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.7.1 + +  + +# 1.7.1 + +Release Date: Dec 2022 + +## Added + +Renamed Enterprise Launcher to IT Managed Launcher. +Added new UI elements on Exchange cards to filter releases by release channel. A release is classified as Alpha, Beta, Release, or Enterprise, depending on its maturity and stability. If an Alpha or Beta release is selected, a banner appears on the main image to emphasize the relative risk of that release. Alpha or Beta releases may not be feature complete or fully stable. Versions classified as Release (also known as GA or General Availability) are feature complete and stable. Release versions that are supported for Enterprise customers appear in the Enterprise list. +Added /settings HTTP API for GET requests for the Launcher settings. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_8_11.md b/1_8_11.md new file mode 100644 index 0000000000000000000000000000000000000000..4c6f66f94b8b2ec257c4a76f3edcf149072780e9 --- /dev/null +++ b/1_8_11.md @@ -0,0 +1,38 @@ + + +1.8.11 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.8.11 + +  + +# 1.8.11 + +Release Date: July 2023 + +## Changed + +Updated Nucleus tab with Navigator 3.3.2. +Display “Install” button for new versions in the setting menu on the Library tab. +Extend omniverse-launcher://launch command to support custom launch scripts. + +## Fixed + +Fixed an issue where users were unable to exit from Launcher via UI when not authenticated. +Fixed incorrect links displayed in GDPR/EULA error. +Add retries for pulling component versions during installations. +Fixed an issue where Launcher raised an error during installation if installed package printed too many messages. +Amend Italian and Korean translation strings. +Fixed the beta banner displayed with the carousel. +Fixed an issue where Launcher didn’t remember command line arguments specified for AppImage. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_8_2.md b/1_8_2.md new file mode 100644 index 0000000000000000000000000000000000000000..e57e808a5c551277db6a86851e3e3de51ba921d3 --- /dev/null +++ b/1_8_2.md @@ -0,0 +1,27 @@ + + +1.8.2 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.8.2 + +  + +# 1.8.2 + +Release Date: Dec 2022 + +## Added + +Added new UI elements on Exchange cards to filter releases by release channel. A release is classified as Alpha, Beta, Release, or Enterprise, depending on its maturity and stability. If an Alpha or Beta release is selected, a banner appears on the main image to emphasize the relative risk of that release. Alpha or Beta releases may not be feature complete or fully stable. Versions classified as Release (also known as GA or General Availability) are feature complete and stable. Release versions that are supported for Enterprise customers appear in the Enterprise list. +Added release classification labels and Beta banner (when applicable) to the Library tab. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_8_7.md b/1_8_7.md new file mode 100644 index 0000000000000000000000000000000000000000..13c5d4aa334afc7da210dc0e18b2cd6eee4cde1d --- /dev/null +++ b/1_8_7.md @@ -0,0 +1,32 @@ + + +1.8.7 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.8.7 + +  + +# 1.8.7 + +Release Date: May 2023 + +## Added + +Show Nucleus update version on the Nucleus tab. +Added a Data Opt-In checkbox allowing users to opt-in and opt-out of data collection. +Display Cache version in the library. + +## Fixed + +Updated Nucleus tab with Navigator 3.3. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_9_10.md b/1_9_10.md new file mode 100644 index 0000000000000000000000000000000000000000..ccf7802ca21acb363e7ee30a66f69b8795b61805 --- /dev/null +++ b/1_9_10.md @@ -0,0 +1,56 @@ + + +1.9.10 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.9.10 + +  + +# 1.9.10 + +Release Date: Jan 2024 + +## Added + +Anonymize telemetry events when users opt out of data collection. +Support feature targeting by OS, Launcher version, build or user profile. +Update Nucleus Navigator to 3.3.4. +Support silent launch for custom protocol commands. + +## Changed + +Enabled “Newest” sorting for the Exchange tab by default. + +## Fixed + +Fixed an issue where Launcher did not bring its main window to the front when Launcher opened a second instance. +Fixed an issue where Launcher closed the application when its main window was closed from the taskbar. +Fixed an issue where Launcher installation might hang before running installation scripts. +Fixed an issue where Hub settings represented incorrect information in the UI. +Fixed an issue where Navigator did not refresh its server list after Nucleus installation. +Fixed an issue where Nucleus installation was displayed on top of other UI elements. +Fixed an issue where closing the main window in IT Managed Launcher closed the entire application. +Fixed a crash in IT Managed Launcher when a user opens a Nucleus tab without internet connection. +Users are now redirected to the library page when Nucleus is uninstalled in IT Managed Launcher. +Fixed an issue with the version drop-down arrow displayed incorrectly. +Validated email input on the login screen. +Fixed an issue where the email field was not updated in privacy.toml after users sign in. +Fixed an incorrect error translation for Czech language. +Fixed an issue where the dialog close icon was not clickable when the scroll bar was displayed. +Fixed an issue where the uninstall notification did not include the component version. +Fixed an issue where Launcher could not register the first Nucleus account. + +## Security + +Fix for CVE-2023-45133. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_9_11.md b/1_9_11.md new file mode 100644 index 0000000000000000000000000000000000000000..730d7e8083afe639bc7373bec540186087108965 --- /dev/null +++ b/1_9_11.md @@ -0,0 +1,38 @@ + + +1.9.11 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.9.11 + +  + +# 1.9.11 + +Release Date: April 2024 + +# Fixed + +Fixed an issue where Launcher was minimized to the system tray instead of exiting when users clicked on Exit option in user settings menu. +Fixed a race condition that could cause settings reset. [OM-118568] +Fixed gallery positioning for content packs. [OM-118695] +Fixed beta banner positioning on the Exchange tab. [OM-119105] +Fixed an issue on the Hub page settings that caused showing “infinity” in disk chart for Linux. [HUB-965] +Fixed cache size max validations on Hub page settings tab. [OM-119136] +Fixed cache size decimal points validations on Hub page settings tab. [OM-119335] +Fixed Hub Total Disk Space chart to not allow available disk space to become negative. [HUB-966] +Fixed an issue on the Hub page settings that caused showing “infinity” in disk chart for Linux. [HUB-965] +Fixed an issue on the Hub page settings that cause cache size not to be displayed. [HUB-960] +Fixed an issue on the Hub page settings preventing editing Cleanup Threshold. [OM-119137] +Fixed Hub page settings chart drive/mount detection size based on cache path. [HUB-970] +Replace Omniverse Beta license agreement text with NVIDIA License and add license agreement link in the About dialog. [OM-120991] + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/1_9_8.md b/1_9_8.md new file mode 100644 index 0000000000000000000000000000000000000000..6e8840608b8fa473d33d438324577495065628d9 --- /dev/null +++ b/1_9_8.md @@ -0,0 +1,82 @@ + + +1.9.8 — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes » +1.9.8 + +  + +# 1.9.8 + +Release Date: Nov 2023 + +## Added + +Featured Collections section added to the Exchange tab. +Collection Side Nav expanded by default in Exchange tab. +Pass proxy settings to launched applications with OMNI_PROXY_SERVER environment variable. +Add custom UI for Omniverse Hub app. +Add window titles for News and Learn tabs. +Block user navigation on the Nucleus tab if Navigator tasks are active. +Support displaying server notifications until a specific date. +Support sending server notifications for specific platforms or Launcher versions. +Add splash notifications displayed as a modal dialog. + +## Changed + +Update Nucleus Navigator to 3.3.3. +Updated the UI for collection menu on the Exchange tab. +Updated the suggestion for installing the default Omniverse application. +Updated IT Managed Web Launcher Documentation tab to be a link to online omniverse documentation. +Changed the default page to Library for IT Managed Launcher. +Updated the look for featured collections. +Updated the look for the side menu on the Exchange tab (only display categories). + +## Fixed + +Display an error when user tries to delete version that is not installed. +Fixed an issue that displayed an Update button for installed connectors and apps in IT Managed Launcher. +Fixed an issue where “New” badges were displayed incorrectly for IT Managed Launcher. +Fixed displaying duplicate connectors after installing with IT Managed Launcher. +Fixed displaying a spinner for connectors page in IT Managed Launcher. +Fixed displaying applications and connectors on the Library tab after calling omniverse-launcher://uninstall command. +Fixed an issue when uninstall notification was not shown if triggered by omniverse-launcher://uninstall command. +Fixed an issue where filtering content by collections that do not exist could crash the application. +Fixed an issue where tags were not displayed for components on the Exchange tab. +Fixed displaying regular notifications instead of errors if installer returned an empty error message. +Fixed displaying Cache installation suggestion in IT Managed Launcher. +Fixed an issue with webview links not opening in a browser window. +Fixed an issue where IT Managed Launcher didn’t work without internet connection. +Fixed an issue where custom protocol commands args were persisted to Linux .desktop files. +Fixed an issue where Collaboration packages were not displayed on the Enterprise portal. +Disable bringing IT Managed Launcher in front of other apps when custom protocol commands are used. +Fixed issues with focusing input elements inside modal dialogs. +Fixed an issue where login result page opened Launcher or brought it in front of other applications. +Fixed opening Nucleus settings from the menu on the Nucleus tab. +Fixed incorrect coloring for the beta banner. +Fixed an issue where buttons and pagination controls could be scrolled in the version dialog. +Fixed an issue where autostart registry keys were kept after uninstall. +Fixed the color for the name displayed in the channel dropdown. +Fixed an issue where Launcher API wasn’t hosted on 127.0.0.1. +Fixed an issue where users could not close modal dialogs. +Fixed an issue where the beta overlay was displayed compressed sometimes. +Fixed an issue where UI and Navigator logs were not being saved to a log file. +Fixed an issue blocking custom protocol commands on Ubuntu. +Use 127.0.0.1 address for registering new account during Nucleus installation. + +## Security + +Fix for CVE-2023-5217 +Fix for CVE-2023-4863 +Fix for CVE-2023-44270 + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/Ar.md b/Ar.md new file mode 100644 index 0000000000000000000000000000000000000000..f0c5ac16f3b337cfa854abd8093568ff442a3874 --- /dev/null +++ b/Ar.md @@ -0,0 +1,446 @@ + + +Ar module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Ar module + +  + +# Ar module + +Summary: The Ar (Asset Resolution) library is responsible for querying, reading, and writing asset data. + +Classes: + +DefaultResolver +Default asset resolution implementation used when no plugin implementation is provided. + +DefaultResolverContext +Resolver context object that specifies a search path to use during asset resolution. + +Notice + +ResolvedPath +Represents a resolved asset path. + +Resolver +Interface for the asset resolution system. + +ResolverContext +An asset resolver context allows clients to provide additional data to the resolver for use during resolution. + +ResolverContextBinder +Helper object for managing the binding and unbinding of ArResolverContext objects with the asset resolver. + +ResolverScopedCache +Helper object for managing asset resolver cache scopes. + +Timestamp +Represents a timestamp for an asset. + +class pxr.Ar.DefaultResolver +Default asset resolution implementation used when no plugin +implementation is provided. +In order to resolve assets specified by relative paths, this resolver +implements a simple”search path”scheme. The resolver will anchor the +relative path to a series of directories and return the first absolute +path where the asset exists. +The first directory will always be the current working directory. The +resolver will then examine the directories specified via the following +mechanisms (in order): + +The currently-bound ArDefaultResolverContext for the calling +thread +ArDefaultResolver::SetDefaultSearchPath +The environment variable PXR_AR_DEFAULT_SEARCH_PATH. This is +expected to be a list of directories delimited by the platform’s +standard path separator. + +ArDefaultResolver supports creating an ArDefaultResolverContext via +ArResolver::CreateContextFromString by passing a list of directories +delimited by the platform’s standard path separator. +Methods: + +SetDefaultSearchPath +classmethod SetDefaultSearchPath(searchPath) -> None + +static SetDefaultSearchPath() +classmethod SetDefaultSearchPath(searchPath) -> None +Set the default search path that will be used during asset resolution. +This must be called before the first call to ArGetResolver. The +specified paths will be searched in addition to, and before paths +specified via the environment variable PXR_AR_DEFAULT_SEARCH_PATH + +Parameters +searchPath (list[str]) – + +class pxr.Ar.DefaultResolverContext +Resolver context object that specifies a search path to use during +asset resolution. This object is intended for use with the default +ArDefaultResolver asset resolution implementation; see documentation +for that class for more details on the search path resolution +algorithm. +Example usage: +ArDefaultResolverContext ctx({"/Local/Models", "/Installed/Models"}); +{ + // Bind the context object: + ArResolverContextBinder binder(ctx); + + // While the context is bound, all calls to ArResolver::Resolve + // (assuming ArDefaultResolver is the underlying implementation being + // used) will include the specified paths during resolution. + std::string resolvedPath = resolver.Resolve("ModelName/File.txt") +} + +// Once the context is no longer bound (due to the ArResolverContextBinder +// going out of scope), its search path no longer factors into asset +// resolution. + +Methods: + +GetSearchPath() +Return this context's search path. + +GetSearchPath() → list[str] +Return this context’s search path. + +class pxr.Ar.Notice +Classes: + +ResolverChanged + +ResolverNotice + +class ResolverChanged +Methods: + +AffectsContext + +AffectsContext() + +class ResolverNotice + +class pxr.Ar.ResolvedPath +Represents a resolved asset path. +Methods: + +GetPathString() +Return the resolved path held by this object as a string. + +GetPathString() → str +Return the resolved path held by this object as a string. + +class pxr.Ar.Resolver +Interface for the asset resolution system. An asset resolver is +responsible for resolving asset information (including the asset’s +physical path) from a logical path. +See ar_implementing_resolver for information on how to customize asset +resolution behavior by implementing a subclass of ArResolver. Clients +may use ArGetResolver to access the configured asset resolver. +Methods: + +CanWriteAssetToPath(resolvedPath, whyNot) +Returns true if an asset may be written to the given resolvedPath , false otherwise. + +CreateContextFromString(contextStr) +Return an ArResolverContext created from the primary ArResolver implementation using the given contextStr . + +CreateContextFromStrings(contextStrs) +Return an ArResolverContext created by combining the ArResolverContext objects created from the given contextStrs . + +CreateDefaultContext() +Return an ArResolverContext that may be bound to this resolver to resolve assets when no other context is explicitly specified. + +CreateDefaultContextForAsset(assetPath) +Return an ArResolverContext that may be bound to this resolver to resolve the asset located at assetPath or referenced by that asset when no other context is explicitly specified. + +CreateIdentifier(assetPath, anchorAssetPath) +Returns an identifier for the asset specified by assetPath . + +CreateIdentifierForNewAsset(assetPath, ...) +Returns an identifier for a new asset specified by assetPath . + +GetAssetInfo(assetPath, resolvedPath) +Returns an ArAssetInfo populated with additional metadata (if any) about the asset at the given assetPath . + +GetCurrentContext() +Returns the asset resolver context currently bound in this thread. + +GetExtension(assetPath) +Returns the file extension for the given assetPath . + +GetModificationTimestamp(assetPath, resolvedPath) +Returns an ArTimestamp representing the last time the asset at assetPath was modified. + +IsContextDependentPath(assetPath) +Returns true if assetPath is a context-dependent path, false otherwise. + +RefreshContext(context) +Refresh any caches associated with the given context. + +Resolve(assetPath) +Returns the resolved path for the asset identified by the given assetPath if it exists. + +ResolveForNewAsset(assetPath) +Returns the resolved path for the given assetPath that may be used to create a new asset. + +CanWriteAssetToPath(resolvedPath, whyNot) → bool +Returns true if an asset may be written to the given resolvedPath +, false otherwise. +If this function returns false and whyNot is not nullptr , it +may be filled with an explanation. + +Parameters + +resolvedPath (ResolvedPath) – +whyNot (str) – + +CreateContextFromString(contextStr) → ResolverContext +Return an ArResolverContext created from the primary ArResolver +implementation using the given contextStr . + +Parameters +contextStr (str) – + +CreateContextFromString(uriScheme, contextStr) -> ResolverContext +Return an ArResolverContext created from the ArResolver registered for +the given uriScheme using the given contextStr . +An empty uriScheme indicates the primary resolver and is +equivalent to CreateContextFromString(string). +If no resolver is registered for uriScheme , returns an empty +ArResolverContext. + +Parameters + +uriScheme (str) – +contextStr (str) – + +CreateContextFromStrings(contextStrs) → ResolverContext +Return an ArResolverContext created by combining the ArResolverContext +objects created from the given contextStrs . +contextStrs is a list of pairs of strings. The first element in +the pair is the URI scheme for the ArResolver that will be used to +create the ArResolverContext from the second element in the pair. An +empty URI scheme indicates the primary resolver. +For example: +ArResolverContext ctx = ArGetResolver().CreateContextFromStrings( + { {"", "context str 1"}, + {"my_scheme", "context str 2"} }); + +This will use the primary resolver to create an ArResolverContext +using the string”context str 1”and use the resolver registered for +the”my_scheme”URI scheme to create an ArResolverContext using”context +str 2”. These contexts will be combined into a single +ArResolverContext and returned. +If no resolver is registered for a URI scheme in an entry in +contextStrs , that entry will be ignored. + +Parameters +contextStrs (list[tuple[str, str]]) – + +CreateDefaultContext() → ResolverContext +Return an ArResolverContext that may be bound to this resolver to +resolve assets when no other context is explicitly specified. +The returned ArResolverContext will contain the default context +returned by the primary resolver and all URI resolvers. + +CreateDefaultContextForAsset(assetPath) → ResolverContext +Return an ArResolverContext that may be bound to this resolver to +resolve the asset located at assetPath or referenced by that asset +when no other context is explicitly specified. +The returned ArResolverContext will contain the default context for +assetPath returned by the primary resolver and all URI resolvers. + +Parameters +assetPath (str) – + +CreateIdentifier(assetPath, anchorAssetPath) → str +Returns an identifier for the asset specified by assetPath . +If anchorAssetPath is not empty, it is the resolved asset path +that assetPath should be anchored to if it is a relative path. + +Parameters + +assetPath (str) – +anchorAssetPath (ResolvedPath) – + +CreateIdentifierForNewAsset(assetPath, anchorAssetPath) → str +Returns an identifier for a new asset specified by assetPath . +If anchorAssetPath is not empty, it is the resolved asset path +that assetPath should be anchored to if it is a relative path. + +Parameters + +assetPath (str) – +anchorAssetPath (ResolvedPath) – + +GetAssetInfo(assetPath, resolvedPath) → ArAssetInfo +Returns an ArAssetInfo populated with additional metadata (if any) +about the asset at the given assetPath . +resolvedPath is the resolved path computed for the given +assetPath . + +Parameters + +assetPath (str) – +resolvedPath (ResolvedPath) – + +GetCurrentContext() → ResolverContext +Returns the asset resolver context currently bound in this thread. +ArResolver::BindContext, ArResolver::UnbindContext + +GetExtension(assetPath) → str +Returns the file extension for the given assetPath . +The returned extension does not include a”.”at the beginning. + +Parameters +assetPath (str) – + +GetModificationTimestamp(assetPath, resolvedPath) → Timestamp +Returns an ArTimestamp representing the last time the asset at +assetPath was modified. +resolvedPath is the resolved path computed for the given +assetPath . If a timestamp cannot be retrieved, return an invalid +ArTimestamp. + +Parameters + +assetPath (str) – +resolvedPath (ResolvedPath) – + +IsContextDependentPath(assetPath) → bool +Returns true if assetPath is a context-dependent path, false +otherwise. +A context-dependent path may result in different resolved paths +depending on what asset resolver context is bound when Resolve is +called. Assets located at the same context-dependent path may not be +the same since those assets may have been loaded from different +resolved paths. In this case, the assets’resolved paths must be +consulted to determine if they are the same. + +Parameters +assetPath (str) – + +RefreshContext(context) → None +Refresh any caches associated with the given context. +If doing so would invalidate asset paths that had previously been +resolved, an ArNotice::ResolverChanged notice will be sent to inform +clients of this. + +Parameters +context (ResolverContext) – + +Resolve(assetPath) → ResolvedPath +Returns the resolved path for the asset identified by the given +assetPath if it exists. +If the asset does not exist, returns an empty ArResolvedPath. + +Parameters +assetPath (str) – + +ResolveForNewAsset(assetPath) → ResolvedPath +Returns the resolved path for the given assetPath that may be used +to create a new asset. +If such a path cannot be computed for assetPath , returns an empty +ArResolvedPath. +Note that an asset might or might not already exist at the returned +resolved path. + +Parameters +assetPath (str) – + +class pxr.Ar.ResolverContext +An asset resolver context allows clients to provide additional data to +the resolver for use during resolution. Clients may provide this data +via context objects of their own (subject to restrictions below). An +ArResolverContext is simply a wrapper around these objects that allows +it to be treated as a single type. Note that an ArResolverContext may +not hold multiple context objects with the same type. +A client-defined context object must provide the following: + +Default and copy constructors +operator< +operator== +An overload for size_t hash_value(const T&) + +Note that the user may define a free function: +std::string ArGetDebugString(const Context & ctx); (Where Context is +the type of the user’s path resolver context.) +This is optional; a default generic implementation has been +predefined. This function should return a string representation of the +context to be utilized for debugging purposes(such as in TF_DEBUG +statements). +The ArIsContextObject template must also be specialized for this +object to declare that it can be used as a context object. This is to +avoid accidental use of an unexpected object as a context object. The +AR_DECLARE_RESOLVER_CONTEXT macro can be used to do this as a +convenience. +AR_DECLARE_RESOLVER_CONTEXT +ArResolver::BindContext +ArResolver::UnbindContext +ArResolverContextBinder +Methods: + +Get() +Returns pointer to the context object of the given type held in this resolver context. + +GetDebugString() +Returns a debug string representing the contained context objects. + +IsEmpty() +Returns whether this resolver context is empty. + +Get() → ContextObj +Returns pointer to the context object of the given type held in this +resolver context. +Returns None if this resolver context is not holding an object of the +requested type. + +GetDebugString() → str +Returns a debug string representing the contained context objects. + +IsEmpty() → bool +Returns whether this resolver context is empty. + +class pxr.Ar.ResolverContextBinder +Helper object for managing the binding and unbinding of +ArResolverContext objects with the asset resolver. +Asset Resolver Context Operations + +class pxr.Ar.ResolverScopedCache +Helper object for managing asset resolver cache scopes. +A scoped resolution cache indicates to the resolver that results of +calls to Resolve should be cached for a certain scope. This is +important for performance and also for consistency it ensures that +repeated calls to Resolve with the same parameters will return the +same result. +Scoped Resolution Cache + +class pxr.Ar.Timestamp +Represents a timestamp for an asset. Timestamps are represented by +Unix time, the number of seconds elapsed since 00:00:00 UTC 1/1/1970. +Methods: + +GetTime() +Return the time represented by this timestamp as a double. + +IsValid() +Return true if this timestamp is valid, false otherwise. + +GetTime() → float +Return the time represented by this timestamp as a double. +If this timestamp is invalid, issue a coding error and return a quiet +NaN value. + +IsValid() → bool +Return true if this timestamp is valid, false otherwise. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/CameraUtil.md b/CameraUtil.md new file mode 100644 index 0000000000000000000000000000000000000000..f4e31d654552d2b1f7cc121a515885ab806ebd6d --- /dev/null +++ b/CameraUtil.md @@ -0,0 +1,156 @@ + + +CameraUtil module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +CameraUtil module + +  + +# CameraUtil module + +Summary: Camera Utilities + +Camera utilities. +Classes: + +ConformWindowPolicy + +Framing +Framing information. + +ScreenWindowParameters +Given a camera object, compute parameters suitable for setting up RenderMan. + +class pxr.CameraUtil.ConformWindowPolicy +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (CameraUtil.MatchVertically, CameraUtil.MatchHorizontally, CameraUtil.Fit, CameraUtil.Crop, CameraUtil.DontConform) + +class pxr.CameraUtil.Framing +Framing information. That is information determining how the filmback +plane of a camera maps to the pixels of the rendered image +(displayWindow together with pixelAspectRatio and window policy) and +what pixels of the image will be filled by the renderer (dataWindow). +The concepts of displayWindow and dataWindow are similar to the ones +in OpenEXR, including that the x- and y-axis of the coordinate system +point left and down, respectively. +In fact, these windows mean the same here and in OpenEXR if the +displayWindow has the same aspect ratio (when accounting for the +pixelAspectRatio) as the filmback plane of the camera has (that is the +ratio of the horizontalAperture to verticalAperture of, e.g., Usd’s +Camera or GfCamera). +In particular, overscan can be achieved by making the dataWindow +larger than the displayWindow. +If the aspect ratios differ, a window policy is applied to the +displayWindow to determine how the pixels correspond to the filmback +plane. One such window policy is to take the largest rect that fits +(centered) into the displayWindow and has the camera’s aspect ratio. +For example, if the displayWindow and dataWindow are the same and both +have an aspect ratio smaller than the camera, the image is created by +enlarging the camera frustum slightly in the bottom and top direction. +When using the AOVs, the render buffer size is determined +independently from the framing info. However, the dataWindow is +supposed to be contained in the render buffer rect (in particular, the +dataWindow cannot contain pixels withs negative coordinates - this +restriction does not apply if, e.g., hdPrman circumvents AOVs and +writes directly to EXR). In other words, unlike in OpenEXR, the rect +of pixels for which we allocate storage can differ from the rect the +renderer fills with data (dataWindow). +For example, an application can set the render buffer size to match +the widget size but use a dataWindow and displayWindow that only fills +the render buffer horizontally to have slates at the top and bottom. +Methods: + +ApplyToProjectionMatrix(projectionMatrix, ...) +Given the projectionMatrix computed from a camera, applies the framing. + +IsValid() +Is display and data window non-empty. + +Attributes: + +dataWindow + +displayWindow + +pixelAspectRatio + +ApplyToProjectionMatrix(projectionMatrix, windowPolicy) → Matrix4d +Given the projectionMatrix computed from a camera, applies the +framing. +To obtain a correct result, a rasterizer needs to use the resulting +projection matrix and set the viewport to the data window. + +Parameters + +projectionMatrix (Matrix4d) – +windowPolicy (ConformWindowPolicy) – + +IsValid() → bool +Is display and data window non-empty. + +property dataWindow + +property displayWindow + +property pixelAspectRatio + +class pxr.CameraUtil.ScreenWindowParameters +Given a camera object, compute parameters suitable for setting up +RenderMan. +Attributes: + +fieldOfView +float + +screenWindow +Vec4d + +zFacingViewMatrix +Matrix4d + +property fieldOfView +float +The field of view. +More precisely, the full angle perspective field of view (in degrees) +between screen space coordinates (-1,0) and (1,0). Give these +parameters to RiProjection as parameter after”perspective”. + +Type +type + +property screenWindow +Vec4d +The vector (left, right, bottom, top) defining the rectangle in the +image plane. +Give these parameters to RiScreenWindow. + +Type +type + +property zFacingViewMatrix +Matrix4d +Returns the inverse of the transform for a camera that is y-Up and +z-facing (vs the OpenGL camera that is (-z)-facing). +Write this transform with RiConcatTransform before RiWorldBegin. + +Type +type + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Garch.md b/Garch.md new file mode 100644 index 0000000000000000000000000000000000000000..1761a3a30ba89b01f2e2489d52da23375b77398e --- /dev/null +++ b/Garch.md @@ -0,0 +1,43 @@ + + +Garch module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Garch module + +  + +# Garch module + +Summary: GL Architecture + +garch +Classes: + +GLPlatformDebugContext +Platform specific context (e.g. + +class pxr.Garch.GLPlatformDebugContext +Platform specific context (e.g. X11/GLX) which supports debug output. +Methods: + +makeCurrent() + +Attributes: + +expired +True if this object has expired, False otherwise. + +makeCurrent() → None + +property expired +True if this object has expired, False otherwise. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/GeomUtil.md b/GeomUtil.md new file mode 100644 index 0000000000000000000000000000000000000000..133a3dd49e194973c6440d0c733ea412ffe2a817 --- /dev/null +++ b/GeomUtil.md @@ -0,0 +1,455 @@ + + +GeomUtil module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +GeomUtil module + +  + +# GeomUtil module + +Summary: The GeomUtil module contains utilities to help image common geometry. + +Utilities to help image common geometry. +Classes: + +CapsuleMeshGenerator +This class provides an implementation for generating topology and point positions on a capsule. + +ConeMeshGenerator +This class provides an implementation for generating topology and point positions on a cone of a given radius and height. + +CuboidMeshGenerator +This class provides an implementation for generating topology and point positions on a rectangular cuboid given the dimensions along the X, Y and Z axes. + +CylinderMeshGenerator +This class provides an implementation for generating topology and point positions on a cylinder with a given radius and height. + +SphereMeshGenerator +This class provides an implementation for generating topology and point positions on a sphere with a given radius. + +class pxr.GeomUtil.CapsuleMeshGenerator +This class provides an implementation for generating topology and +point positions on a capsule. +The simplest form takes a radius and height and is a cylinder capped +by two hemispheres that is centered at the origin. The generated +capsule is made up of circular cross-sections in the XY plane. Each +cross-section has numRadial segments. Successive cross-sections for +each of the hemispheres are generated at numCapAxial locations along +the Z and -Z axes respectively. The height is aligned with the Z axis +and represents the height of just the cylindrical portion. +An optional transform may be provided to GeneratePoints to orient the +capsule as necessary (e.g., whose height is along the Y axis). +An additional overload of GeneratePoints is provided to specify +different radii and heights for the bottom and top caps, as well as +the sweep angle for the capsule about the +Z axis. When the sweep is +less than 360 degrees, the generated geometry is not closed. +Usage: +const size_t numRadial = 4, numCapAxial = 4; +const size_t numPoints = + GeomUtilCapsuleMeshGenerator::ComputeNumPoints(numRadial, numCapAxial); +const float radius = 1, height = 2; + +MyPointContainer points(numPoints); + +GeomUtilCapsuleMeshGenerator::GeneratePoints( + points.begin(), numRadial, numCapAxial, radius, height); + +Methods: + +ComputeNumPoints +classmethod ComputeNumPoints(numRadial, numCapAxial, closedSweep) -> int + +GeneratePoints +classmethod GeneratePoints(iter, numRadial, numCapAxial, radius, height, framePtr) -> None + +GenerateTopology +classmethod GenerateTopology(numRadial, numCapAxial, closedSweep) -> MeshTopology + +Attributes: + +minNumCapAxial + +minNumRadial + +static ComputeNumPoints() +classmethod ComputeNumPoints(numRadial, numCapAxial, closedSweep) -> int + +Parameters + +numRadial (int) – +numCapAxial (int) – +closedSweep (bool) – + +static GeneratePoints() +classmethod GeneratePoints(iter, numRadial, numCapAxial, radius, height, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +numCapAxial (int) – +radius (ScalarType) – +height (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, numRadial, numCapAxial, bottomRadius, topRadius, height, bottomCapHeight, topCapHeight, sweepDegrees, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +numCapAxial (int) – +bottomRadius (ScalarType) – +topRadius (ScalarType) – +height (ScalarType) – +bottomCapHeight (ScalarType) – +topCapHeight (ScalarType) – +sweepDegrees (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, arg2) -> None + +Parameters + +iter (PointIterType) – +arg2 – + +static GenerateTopology() +classmethod GenerateTopology(numRadial, numCapAxial, closedSweep) -> MeshTopology + +Parameters + +numRadial (int) – +numCapAxial (int) – +closedSweep (bool) – + +minNumCapAxial = 1 + +minNumRadial = 3 + +class pxr.GeomUtil.ConeMeshGenerator +This class provides an implementation for generating topology and +point positions on a cone of a given radius and height. +The cone is made up of circular cross-sections in the XY plane and is +centered at the origin. Each cross-section has numRadial segments. The +height is aligned with the Z axis, with the base of the object at Z = +-h/2 and apex at Z = h/2. +An optional transform may be provided to GeneratePoints to orient the +cone as necessary (e.g., whose height is along the Y axis). +An additional overload of GeneratePoints is provided to specify the +sweep angle for the cone about the +Z axis. When the sweep is less +than 360 degrees, the generated geometry is not closed. +Usage: +const size_t numRadial = 8; +const size_t numPoints = + GeomUtilConeMeshGenerator::ComputeNumPoints(numRadial); +const float radius = 1, height = 2; + +MyPointContainer points(numPoints); + +GeomUtilConeMeshGenerator::GeneratePoints( + points.begin(), numRadial, radius, height); + +Methods: + +ComputeNumPoints +classmethod ComputeNumPoints(numRadial, closedSweep) -> int + +GeneratePoints +classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None + +GenerateTopology +classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology + +Attributes: + +minNumRadial + +static ComputeNumPoints() +classmethod ComputeNumPoints(numRadial, closedSweep) -> int + +Parameters + +numRadial (int) – +closedSweep (bool) – + +static GeneratePoints() +classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +radius (ScalarType) – +height (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, numRadial, radius, height, sweepDegrees, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +radius (ScalarType) – +height (ScalarType) – +sweepDegrees (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, arg2) -> None + +Parameters + +iter (PointIterType) – +arg2 – + +static GenerateTopology() +classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology + +Parameters + +numRadial (int) – +closedSweep (bool) – + +minNumRadial = 3 + +class pxr.GeomUtil.CuboidMeshGenerator +This class provides an implementation for generating topology and +point positions on a rectangular cuboid given the dimensions along the +X, Y and Z axes. +The generated cuboid is centered at the origin. +An optional transform may be provided to GeneratePoints to orient the +cuboid as necessary. +Usage: +const size_t numPoints = + GeomUtilCuboidMeshGenerator::ComputeNumPoints(); +const float l = 5, b = 4, h = 3; + +MyPointContainer points(numPoints); + +GeomUtilCuboidMeshGenerator::GeneratePoints( + points.begin(), l, b, h); + +Methods: + +ComputeNumPoints +classmethod ComputeNumPoints() -> int + +GeneratePoints +classmethod GeneratePoints(iter, xLength, yLength, zLength, framePtr) -> None + +GenerateTopology +classmethod GenerateTopology() -> MeshTopology + +static ComputeNumPoints() +classmethod ComputeNumPoints() -> int + +static GeneratePoints() +classmethod GeneratePoints(iter, xLength, yLength, zLength, framePtr) -> None + +Parameters + +iter (PointIterType) – +xLength (ScalarType) – +yLength (ScalarType) – +zLength (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, arg2) -> None + +Parameters + +iter (PointIterType) – +arg2 – + +static GenerateTopology() +classmethod GenerateTopology() -> MeshTopology + +class pxr.GeomUtil.CylinderMeshGenerator +This class provides an implementation for generating topology and +point positions on a cylinder with a given radius and height. +The cylinder is made up of circular cross-sections in the XY plane and +is centered at the origin. Each cross-section has numRadial segments. +The height is aligned with the Z axis, with the base at Z = -h/2. +An optional transform may be provided to GeneratePoints to orient the +cone as necessary (e.g., whose height is along the Y axis). +An additional overload of GeneratePoints is provided to specify +different radii for the bottom and top discs of the cylinder and a +sweep angle for cylinder about the +Z axis. When the sweep is less +than 360 degrees, the generated geometry is not closed. +Setting one radius to 0 in order to get a cone is inefficient and +could result in artifacts. Clients should use +GeomUtilConeMeshGenerator instead. Usage: +const size_t numRadial = 8; +const size_t numPoints = + GeomUtilCylinderMeshGenerator::ComputeNumPoints(numRadial); +const float radius = 1, height = 2; + +MyPointContainer points(numPoints); + +GeomUtilCylinderMeshGenerator::GeneratePoints( + points.begin(), numRadial, radius, height); + +Methods: + +ComputeNumPoints +classmethod ComputeNumPoints(numRadial, closedSweep) -> int + +GeneratePoints +classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None + +GenerateTopology +classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology + +Attributes: + +minNumRadial + +static ComputeNumPoints() +classmethod ComputeNumPoints(numRadial, closedSweep) -> int + +Parameters + +numRadial (int) – +closedSweep (bool) – + +static GeneratePoints() +classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +radius (ScalarType) – +height (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, numRadial, bottomRadius, topRadius, height, sweepDegrees, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +bottomRadius (ScalarType) – +topRadius (ScalarType) – +height (ScalarType) – +sweepDegrees (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, arg2) -> None + +Parameters + +iter (PointIterType) – +arg2 – + +static GenerateTopology() +classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology + +Parameters + +numRadial (int) – +closedSweep (bool) – + +minNumRadial = 3 + +class pxr.GeomUtil.SphereMeshGenerator +This class provides an implementation for generating topology and +point positions on a sphere with a given radius. +The sphere is made up of circular cross-sections in the XY plane and +is centered at the origin. Each cross-section has numRadial segments. +Successive cross-sections are generated at numAxial locations along +the Z axis, with the bottom of the sphere at Z = -r and top at Z = r. +An optional transform may be provided to GeneratePoints to orient the +sphere as necessary (e.g., cross-sections in the YZ plane). +An additional overload of GeneratePoints is provided to specify a +sweep angle for the sphere about the +Z axis. When the sweep is less +than 360 degrees, the generated geometry is not closed. +Usage: +const size_t numRadial = 4, numAxial = 4; +const size_t numPoints = + GeomUtilSphereMeshGenerator::ComputeNumPoints(numRadial, numAxial); +const float radius = 5; + +MyPointContainer points(numPoints); + +GeomUtilSphereMeshGenerator::GeneratePoints( + points.begin(), numRadial, numAxial, radius); + +Methods: + +ComputeNumPoints +classmethod ComputeNumPoints(numRadial, numAxial, closedSweep) -> int + +GeneratePoints +classmethod GeneratePoints(iter, numRadial, numAxial, radius, framePtr) -> None + +GenerateTopology +classmethod GenerateTopology(numRadial, numAxial, closedSweep) -> MeshTopology + +Attributes: + +minNumAxial + +minNumRadial + +static ComputeNumPoints() +classmethod ComputeNumPoints(numRadial, numAxial, closedSweep) -> int + +Parameters + +numRadial (int) – +numAxial (int) – +closedSweep (bool) – + +static GeneratePoints() +classmethod GeneratePoints(iter, numRadial, numAxial, radius, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +numAxial (int) – +radius (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, numRadial, numAxial, radius, sweepDegrees, framePtr) -> None + +Parameters + +iter (PointIterType) – +numRadial (int) – +numAxial (int) – +radius (ScalarType) – +sweepDegrees (ScalarType) – +framePtr (Matrix4d) – + +GeneratePoints(iter, arg2) -> None + +Parameters + +iter (PointIterType) – +arg2 – + +static GenerateTopology() +classmethod GenerateTopology(numRadial, numAxial, closedSweep) -> MeshTopology + +Parameters + +numRadial (int) – +numAxial (int) – +closedSweep (bool) – + +minNumAxial = 2 + +minNumRadial = 3 + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Gf.md b/Gf.md new file mode 100644 index 0000000000000000000000000000000000000000..c36c1465ab0cc5944ac404aea2eab7ab5903d44b --- /dev/null +++ b/Gf.md @@ -0,0 +1,7034 @@ + + +Gf module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Gf module + +  + +# Gf module + +Summary: The Gf (Graphics Foundations) library contains classes and functions for working with basic mathematical aspects of graphics. + +Graphics Foundation +This package defines classes for fundamental graphics types and operations. +Classes: + +BBox3d +Arbitrarily oriented 3D bounding box + +Camera + +DualQuatd + +DualQuatf + +DualQuath + +Frustum +Basic view frustum + +Interval +Basic mathematical interval class + +Line +Line class + +LineSeg +Line segment class + +Matrix2d + +Matrix2f + +Matrix3d + +Matrix3f + +Matrix4d + +Matrix4f + +MultiInterval + +Plane + +Quatd + +Quaternion +Quaternion class + +Quatf + +Quath + +Range1d + +Range1f + +Range2d + +Range2f + +Range3d + +Range3f + +Ray + +Rect2i + +Rotation +3-space rotation + +Size2 +A 2D size class + +Size3 +A 3D size class + +Transform + +Vec2d + +Vec2f + +Vec2h + +Vec2i + +Vec3d + +Vec3f + +Vec3h + +Vec3i + +Vec4d + +Vec4f + +Vec4h + +Vec4i + +class pxr.Gf.BBox3d +Arbitrarily oriented 3D bounding box +Methods: + +Combine +classmethod Combine(b1, b2) -> BBox3d + +ComputeAlignedBox() +Returns the axis-aligned range (as a GfRange3d ) that results from applying the transformation matrix to the axis-aligned box and aligning the result. + +ComputeAlignedRange() +Returns the axis-aligned range (as a GfRange3d ) that results from applying the transformation matrix to the wxis-aligned box and aligning the result. + +ComputeCentroid() +Returns the centroid of the bounding box. + +GetBox() +Returns the range of the axis-aligned untransformed box. + +GetInverseMatrix() +Returns the inverse of the transformation matrix. + +GetMatrix() +Returns the transformation matrix. + +GetRange() +Returns the range of the axis-aligned untransformed box. + +GetVolume() +Returns the volume of the box (0 for an empty box). + +HasZeroAreaPrimitives() +Returns the current state of the zero-area primitives flag". + +Set(box, matrix) +Sets the axis-aligned box and transformation matrix. + +SetHasZeroAreaPrimitives(hasThem) +Sets the zero-area primitives flag to the given value. + +SetMatrix(matrix) +Sets the transformation matrix only. + +SetRange(box) +Sets the range of the axis-aligned box only. + +Transform(matrix) +Transforms the bounding box by the given matrix, which is assumed to be a global transformation to apply to the box. + +Attributes: + +box + +hasZeroAreaPrimitives + +matrix + +static Combine() +classmethod Combine(b1, b2) -> BBox3d +Combines two bboxes, returning a new bbox that contains both. +This uses the coordinate space of one of the two original boxes as the +space of the result; it uses the one that produces whe smaller of the +two resulting boxes. + +Parameters + +b1 (BBox3d) – +b2 (BBox3d) – + +ComputeAlignedBox() → Range3d +Returns the axis-aligned range (as a GfRange3d ) that results from +applying the transformation matrix to the axis-aligned box and +aligning the result. +This synonym for ComputeAlignedRange exists for compatibility +purposes. + +ComputeAlignedRange() → Range3d +Returns the axis-aligned range (as a GfRange3d ) that results from +applying the transformation matrix to the wxis-aligned box and +aligning the result. + +ComputeCentroid() → Vec3d +Returns the centroid of the bounding box. +The centroid is computed as the transformed centroid of the range. + +GetBox() → Range3d +Returns the range of the axis-aligned untransformed box. +This synonym of GetRange exists for compatibility purposes. + +GetInverseMatrix() → Matrix4d +Returns the inverse of the transformation matrix. +This will be the identity matrix if the transformation matrix is not +invertible. + +GetMatrix() → Matrix4d +Returns the transformation matrix. + +GetRange() → Range3d +Returns the range of the axis-aligned untransformed box. + +GetVolume() → float +Returns the volume of the box (0 for an empty box). + +HasZeroAreaPrimitives() → bool +Returns the current state of the zero-area primitives flag”. + +Set(box, matrix) → None +Sets the axis-aligned box and transformation matrix. + +Parameters + +box (Range3d) – +matrix (Matrix4d) – + +SetHasZeroAreaPrimitives(hasThem) → None +Sets the zero-area primitives flag to the given value. + +Parameters +hasThem (bool) – + +SetMatrix(matrix) → None +Sets the transformation matrix only. +The axis-aligned box is not modified. + +Parameters +matrix (Matrix4d) – + +SetRange(box) → None +Sets the range of the axis-aligned box only. +The transformation matrix is not modified. + +Parameters +box (Range3d) – + +Transform(matrix) → None +Transforms the bounding box by the given matrix, which is assumed to +be a global transformation to apply to the box. +Therefore, this just post-multiplies the box’s matrix by matrix . + +Parameters +matrix (Matrix4d) – + +property box + +property hasZeroAreaPrimitives + +property matrix + +class pxr.Gf.Camera +Classes: + +FOVDirection +Direction used for Field of View or orthographic size. + +Projection +Projection type. + +Methods: + +GetFieldOfView(direction) +Returns the horizontal or vertical field of view in degrees. + +SetFromViewAndProjectionMatrix(viewMatrix, ...) +Sets the camera from a view and projection matrix. + +SetOrthographicFromAspectRatioAndSize(...) +Sets the frustum to be orthographic such that it has the given aspectRatio and such that the orthographic width, respectively, orthographic height (in cm) is equal to orthographicSize (depending on direction). + +SetPerspectiveFromAspectRatioAndFieldOfView(...) +Sets the frustum to be projective with the given aspectRatio and horizontal, respectively, vertical field of view fieldOfView (similar to gluPerspective when direction = FOVVertical). + +Attributes: + +APERTURE_UNIT + +DEFAULT_HORIZONTAL_APERTURE + +DEFAULT_VERTICAL_APERTURE + +FOCAL_LENGTH_UNIT + +FOVHorizontal + +FOVVertical + +Orthographic + +Perspective + +aspectRatio +float + +clippingPlanes +list[Vec4f] + +clippingRange +Range1f + +fStop +float + +focalLength +float + +focusDistance +float + +frustum +Frustum + +horizontalAperture +float + +horizontalApertureOffset +float + +horizontalFieldOfView + +projection +Projection + +transform +Matrix4d + +verticalAperture +float + +verticalApertureOffset +float + +verticalFieldOfView + +class FOVDirection +Direction used for Field of View or orthographic size. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Gf.Camera.FOVHorizontal, Gf.Camera.FOVVertical) + +class Projection +Projection type. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Gf.Camera.Perspective, Gf.Camera.Orthographic) + +GetFieldOfView(direction) → float +Returns the horizontal or vertical field of view in degrees. + +Parameters +direction (FOVDirection) – + +SetFromViewAndProjectionMatrix(viewMatrix, projMatix, focalLength) → None +Sets the camera from a view and projection matrix. +Note that the projection matrix does only determine the ratio of +aperture to focal length, so there is a choice which defaults to 50mm +(or more accurately, 50 tenths of a world unit). + +Parameters + +viewMatrix (Matrix4d) – +projMatix (Matrix4d) – +focalLength (float) – + +SetOrthographicFromAspectRatioAndSize(aspectRatio, orthographicSize, direction) → None +Sets the frustum to be orthographic such that it has the given +aspectRatio and such that the orthographic width, respectively, +orthographic height (in cm) is equal to orthographicSize +(depending on direction). + +Parameters + +aspectRatio (float) – +orthographicSize (float) – +direction (FOVDirection) – + +SetPerspectiveFromAspectRatioAndFieldOfView(aspectRatio, fieldOfView, direction, horizontalAperture) → None +Sets the frustum to be projective with the given aspectRatio and +horizontal, respectively, vertical field of view fieldOfView +(similar to gluPerspective when direction = FOVVertical). +Do not pass values for horionztalAperture unless you care about +DepthOfField. + +Parameters + +aspectRatio (float) – +fieldOfView (float) – +direction (FOVDirection) – +horizontalAperture (float) – + +APERTURE_UNIT = 0.1 + +DEFAULT_HORIZONTAL_APERTURE = 20.955 + +DEFAULT_VERTICAL_APERTURE = 15.290799999999999 + +FOCAL_LENGTH_UNIT = 0.1 + +FOVHorizontal = Gf.Camera.FOVHorizontal + +FOVVertical = Gf.Camera.FOVVertical + +Orthographic = Gf.Camera.Orthographic + +Perspective = Gf.Camera.Perspective + +property aspectRatio +float +Returns the projector aperture aspect ratio. + +Type +type + +property clippingPlanes +list[Vec4f] +Returns additional clipping planes. + +type : None +Sets additional arbitrarily oriented clipping planes. +A vector (a,b,c,d) encodes a clipping plane that clips off points +(x,y,z) with a * x + b * y + c * z + d * 1<0 +where (x,y,z) are the coordinates in the camera’s space. + +Type +type + +property clippingRange +Range1f +Returns the clipping range in world units. + +type : None +Sets the clipping range in world units. + +Type +type + +property fStop +float +Returns the lens aperture. + +type : None +Sets the lens aperture, unitless. + +Type +type + +property focalLength +float +Returns the focal length in tenths of a world unit (e.g., mm if the +world unit is assumed to be cm). + +type : None +These are the values actually stored in the class and they correspond +to measurements of an actual physical camera (in mm). +Together with the clipping range, they determine the camera frustum. +Sets the focal length in tenths of a world unit (e.g., mm if the world +unit is assumed to be cm). + +Type +type + +property focusDistance +float +Returns the focus distance in world units. + +type : None +Sets the focus distance in world units. + +Type +type + +property frustum +Frustum +Returns the computed, world-space camera frustum. +The frustum will always be that of a Y-up, -Z-looking camera. + +Type +type + +property horizontalAperture +float +Returns the width of the projector aperture in tenths of a world unit +(e.g., mm if the world unit is assumed to be cm). + +type : None +Sets the width of the projector aperture in tenths of a world unit +(e.g., mm if the world unit is assumed to be cm). + +Type +type + +property horizontalApertureOffset +float +Returns the horizontal offset of the projector aperture in tenths of a +world unit (e.g., mm if the world unit is assumed to be cm). +In particular, an offset is necessary when writing out a stereo camera +with finite convergence distance as two cameras. + +type : None +Sets the horizontal offset of the projector aperture in tenths of a +world unit (e.g., mm if the world unit is assumed to be cm). + +Type +type + +property horizontalFieldOfView + +property projection +Projection +Returns the projection type. + +type : None +Sets the projection type. + +Type +type + +property transform +Matrix4d +Returns the transform of the filmback in world space. +This is exactly the transform specified via SetTransform() . + +type : None +Sets the transform of the filmback in world space to val . + +Type +type + +property verticalAperture +float +Returns the height of the projector aperture in tenths of a world unit +(e.g., mm if the world unit is assumed to be cm). + +type : None +Sets the height of the projector aperture in tenths of a world unit +(e.g., mm if the world unit is assumed to be cm). + +Type +type + +property verticalApertureOffset +float +Returns the vertical offset of the projector aperture in tenths of a +world unit (e.g., mm if the world unit is assumed to be cm). + +type : None +Sets the vertical offset of the projector aperture in tenths of a +world unit (e.g., mm if the world unit is assumed to be cm). + +Type +type + +property verticalFieldOfView + +class pxr.Gf.DualQuatd +Methods: + +GetConjugate() +Returns the conjugate of this dual quaternion. + +GetDual() +Returns the dual part of the dual quaternion. + +GetIdentity +classmethod GetIdentity() -> DualQuatd + +GetInverse() +Returns the inverse of this dual quaternion. + +GetLength() +Returns geometric length of this dual quaternion. + +GetNormalized(eps) +Returns a normalized (unit-length) version of this dual quaternion. + +GetReal() +Returns the real part of the dual quaternion. + +GetTranslation() +Get the translation component of this dual quaternion. + +GetZero +classmethod GetZero() -> DualQuatd + +Normalize(eps) +Normalizes this dual quaternion in place. + +SetDual(dual) +Sets the dual part of the dual quaternion. + +SetReal(real) +Sets the real part of the dual quaternion. + +SetTranslation(translation) +Set the translation component of this dual quaternion. + +Transform(vec) +Transforms the row vector vec by the dual quaternion. + +Attributes: + +dual + +real + +GetConjugate() → DualQuatd +Returns the conjugate of this dual quaternion. + +GetDual() → Quatd +Returns the dual part of the dual quaternion. + +static GetIdentity() +classmethod GetIdentity() -> DualQuatd +Returns the identity dual quaternion, which has a real part of +(1,0,0,0) and a dual part of (0,0,0,0). + +GetInverse() → DualQuatd +Returns the inverse of this dual quaternion. + +GetLength() → tuple[float, float] +Returns geometric length of this dual quaternion. + +GetNormalized(eps) → DualQuatd +Returns a normalized (unit-length) version of this dual quaternion. +If the length of this dual quaternion is smaller than eps , this +returns the identity dual quaternion. + +Parameters +eps (float) – + +GetReal() → Quatd +Returns the real part of the dual quaternion. + +GetTranslation() → Vec3d +Get the translation component of this dual quaternion. + +static GetZero() +classmethod GetZero() -> DualQuatd +Returns the zero dual quaternion, which has a real part of (0,0,0,0) +and a dual part of (0,0,0,0). + +Normalize(eps) → tuple[float, float] +Normalizes this dual quaternion in place. +Normalizes this dual quaternion in place to unit length, returning the +length before normalization. If the length of this dual quaternion is +smaller than eps , this sets the dual quaternion to identity. + +Parameters +eps (float) – + +SetDual(dual) → None +Sets the dual part of the dual quaternion. + +Parameters +dual (Quatd) – + +SetReal(real) → None +Sets the real part of the dual quaternion. + +Parameters +real (Quatd) – + +SetTranslation(translation) → None +Set the translation component of this dual quaternion. + +Parameters +translation (Vec3d) – + +Transform(vec) → Vec3d +Transforms the row vector vec by the dual quaternion. + +Parameters +vec (Vec3d) – + +property dual + +property real + +class pxr.Gf.DualQuatf +Methods: + +GetConjugate() +Returns the conjugate of this dual quaternion. + +GetDual() +Returns the dual part of the dual quaternion. + +GetIdentity +classmethod GetIdentity() -> DualQuatf + +GetInverse() +Returns the inverse of this dual quaternion. + +GetLength() +Returns geometric length of this dual quaternion. + +GetNormalized(eps) +Returns a normalized (unit-length) version of this dual quaternion. + +GetReal() +Returns the real part of the dual quaternion. + +GetTranslation() +Get the translation component of this dual quaternion. + +GetZero +classmethod GetZero() -> DualQuatf + +Normalize(eps) +Normalizes this dual quaternion in place. + +SetDual(dual) +Sets the dual part of the dual quaternion. + +SetReal(real) +Sets the real part of the dual quaternion. + +SetTranslation(translation) +Set the translation component of this dual quaternion. + +Transform(vec) +Transforms the row vector vec by the dual quaternion. + +Attributes: + +dual + +real + +GetConjugate() → DualQuatf +Returns the conjugate of this dual quaternion. + +GetDual() → Quatf +Returns the dual part of the dual quaternion. + +static GetIdentity() +classmethod GetIdentity() -> DualQuatf +Returns the identity dual quaternion, which has a real part of +(1,0,0,0) and a dual part of (0,0,0,0). + +GetInverse() → DualQuatf +Returns the inverse of this dual quaternion. + +GetLength() → tuple[float, float] +Returns geometric length of this dual quaternion. + +GetNormalized(eps) → DualQuatf +Returns a normalized (unit-length) version of this dual quaternion. +If the length of this dual quaternion is smaller than eps , this +returns the identity dual quaternion. + +Parameters +eps (float) – + +GetReal() → Quatf +Returns the real part of the dual quaternion. + +GetTranslation() → Vec3f +Get the translation component of this dual quaternion. + +static GetZero() +classmethod GetZero() -> DualQuatf +Returns the zero dual quaternion, which has a real part of (0,0,0,0) +and a dual part of (0,0,0,0). + +Normalize(eps) → tuple[float, float] +Normalizes this dual quaternion in place. +Normalizes this dual quaternion in place to unit length, returning the +length before normalization. If the length of this dual quaternion is +smaller than eps , this sets the dual quaternion to identity. + +Parameters +eps (float) – + +SetDual(dual) → None +Sets the dual part of the dual quaternion. + +Parameters +dual (Quatf) – + +SetReal(real) → None +Sets the real part of the dual quaternion. + +Parameters +real (Quatf) – + +SetTranslation(translation) → None +Set the translation component of this dual quaternion. + +Parameters +translation (Vec3f) – + +Transform(vec) → Vec3f +Transforms the row vector vec by the dual quaternion. + +Parameters +vec (Vec3f) – + +property dual + +property real + +class pxr.Gf.DualQuath +Methods: + +GetConjugate() +Returns the conjugate of this dual quaternion. + +GetDual() +Returns the dual part of the dual quaternion. + +GetIdentity +classmethod GetIdentity() -> DualQuath + +GetInverse() +Returns the inverse of this dual quaternion. + +GetLength() +Returns geometric length of this dual quaternion. + +GetNormalized(eps) +Returns a normalized (unit-length) version of this dual quaternion. + +GetReal() +Returns the real part of the dual quaternion. + +GetTranslation() +Get the translation component of this dual quaternion. + +GetZero +classmethod GetZero() -> DualQuath + +Normalize(eps) +Normalizes this dual quaternion in place. + +SetDual(dual) +Sets the dual part of the dual quaternion. + +SetReal(real) +Sets the real part of the dual quaternion. + +SetTranslation(translation) +Set the translation component of this dual quaternion. + +Transform(vec) +Transforms the row vector vec by the dual quaternion. + +Attributes: + +dual + +real + +GetConjugate() → DualQuath +Returns the conjugate of this dual quaternion. + +GetDual() → Quath +Returns the dual part of the dual quaternion. + +static GetIdentity() +classmethod GetIdentity() -> DualQuath +Returns the identity dual quaternion, which has a real part of +(1,0,0,0) and a dual part of (0,0,0,0). + +GetInverse() → DualQuath +Returns the inverse of this dual quaternion. + +GetLength() → tuple[GfHalf, GfHalf] +Returns geometric length of this dual quaternion. + +GetNormalized(eps) → DualQuath +Returns a normalized (unit-length) version of this dual quaternion. +If the length of this dual quaternion is smaller than eps , this +returns the identity dual quaternion. + +Parameters +eps (GfHalf) – + +GetReal() → Quath +Returns the real part of the dual quaternion. + +GetTranslation() → Vec3h +Get the translation component of this dual quaternion. + +static GetZero() +classmethod GetZero() -> DualQuath +Returns the zero dual quaternion, which has a real part of (0,0,0,0) +and a dual part of (0,0,0,0). + +Normalize(eps) → tuple[GfHalf, GfHalf] +Normalizes this dual quaternion in place. +Normalizes this dual quaternion in place to unit length, returning the +length before normalization. If the length of this dual quaternion is +smaller than eps , this sets the dual quaternion to identity. + +Parameters +eps (GfHalf) – + +SetDual(dual) → None +Sets the dual part of the dual quaternion. + +Parameters +dual (Quath) – + +SetReal(real) → None +Sets the real part of the dual quaternion. + +Parameters +real (Quath) – + +SetTranslation(translation) → None +Set the translation component of this dual quaternion. + +Parameters +translation (Vec3h) – + +Transform(vec) → Vec3h +Transforms the row vector vec by the dual quaternion. + +Parameters +vec (Vec3h) – + +property dual + +property real + +class pxr.Gf.Frustum +Basic view frustum +Classes: + +ProjectionType +This enum is used to determine the type of projection represented by a frustum. + +Methods: + +ComputeAspectRatio() +Returns the aspect ratio of the frustum, defined as the width of the window divided by the height. + +ComputeCorners() +Returns the world-space corners of the frustum as a vector of 8 points, ordered as: + +ComputeCornersAtDistance(d) +Returns the world-space corners of the intersection of the frustum with a plane parallel to the near/far plane at distance d from the apex, ordered as: + +ComputeLookAtPoint() +Computes and returns the world-space look-at point from the eye point (position), view direction (rotation), and view distance. + +ComputeNarrowedFrustum(windowPos, size) +Returns a frustum that is a narrowed-down version of this frustum. + +ComputePickRay(windowPos) +Builds and returns a GfRay that can be used for picking at the given normalized (-1 to +1 in both dimensions) window position. + +ComputeProjectionMatrix() +Returns a GL-style projection matrix corresponding to the frustum's projection. + +ComputeUpVector() +Returns the normalized world-space up vector, which is computed by rotating the y axis by the frustum's rotation. + +ComputeViewDirection() +Returns the normalized world-space view direction vector, which is computed by rotating the -z axis by the frustum's rotation. + +ComputeViewFrame(side, up, view) +Computes the view frame defined by this frustum. + +ComputeViewInverse() +Returns a matrix that represents the inverse viewing transformation for this frustum. + +ComputeViewMatrix() +Returns a matrix that represents the viewing transformation for this frustum. + +FitToSphere(center, radius, slack) +Modifies the frustum to tightly enclose a sphere with the given center and radius, using the current view direction. + +GetFOV +Returns the horizontal fov of the frustum. + +GetNearFar() +Returns the near/far interval. + +GetOrthographic(left, right, bottom, top, ...) +Returns the current frustum in the format used by SetOrthographic() . + +GetPerspective +Returns the current perspective frustum values suitable for use by SetPerspective. + +GetPosition() +Returns the position of the frustum in world space. + +GetProjectionType() +Returns the projection type. + +GetReferencePlaneDepth +classmethod GetReferencePlaneDepth() -> float + +GetRotation() +Returns the orientation of the frustum in world space as a rotation to apply to the -z axis. + +GetViewDistance() +Returns the view distance. + +GetWindow() +Returns the window rectangle in the reference plane. + +Intersects(bbox) +Returns true if the given axis-aligned bbox is inside or intersecting the frustum. + +IntersectsViewVolume +classmethod IntersectsViewVolume(bbox, vpMat) -> bool + +SetNearFar(nearFar) +Sets the near/far interval. + +SetOrthographic(left, right, bottom, top, ...) +Sets up the frustum in a manner similar to glOrtho() . + +SetPerspective(fieldOfViewHeight, ...) +Sets up the frustum in a manner similar to gluPerspective() . + +SetPosition(position) +Sets the position of the frustum in world space. + +SetPositionAndRotationFromMatrix(camToWorldXf) +Sets the position and rotation of the frustum from a camera matrix (always from a y-Up camera). + +SetProjectionType(projectionType) +Sets the projection type. + +SetRotation(rotation) +Sets the orientation of the frustum in world space as a rotation to apply to the default frame: looking along the -z axis with the +y axis as"up". + +SetViewDistance(viewDistance) +Sets the view distance. + +SetWindow(window) +Sets the window rectangle in the reference plane that defines the left, right, top, and bottom planes of the frustum. + +Transform(matrix) +Transforms the frustum by the given matrix. + +Attributes: + +Orthographic + +Perspective + +nearFar + +position + +projectionType + +rotation + +viewDistance + +window + +class ProjectionType +This enum is used to determine the type of projection represented by a +frustum. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Gf.Frustum.Orthographic, Gf.Frustum.Perspective) + +ComputeAspectRatio() → float +Returns the aspect ratio of the frustum, defined as the width of the +window divided by the height. +If the height is zero or negative, this returns 0. + +ComputeCorners() → list[Vec3d] +Returns the world-space corners of the frustum as a vector of 8 +points, ordered as: + +Left bottom near +Right bottom near +Left top near +Right top near +Left bottom far +Right bottom far +Left top far +Right top far + +ComputeCornersAtDistance(d) → list[Vec3d] +Returns the world-space corners of the intersection of the frustum +with a plane parallel to the near/far plane at distance d from the +apex, ordered as: + +Left bottom +Right bottom +Left top +Right top In particular, it gives the partial result of +ComputeCorners when given near or far distance. + +Parameters +d (float) – + +ComputeLookAtPoint() → Vec3d +Computes and returns the world-space look-at point from the eye point +(position), view direction (rotation), and view distance. + +ComputeNarrowedFrustum(windowPos, size) → Frustum +Returns a frustum that is a narrowed-down version of this frustum. +The new frustum has the same near and far planes, but the other planes +are adjusted to be centered on windowPos with the new width and +height obtained from the existing width and height by multiplying by +size [0] and size [1], respectively. Finally, the new frustum +is clipped against this frustum so that it is completely contained in +the existing frustum. +windowPos is given in normalized coords (-1 to +1 in both +dimensions). size is given as a scalar (0 to 1 in both +dimensions). +If the windowPos or size given is outside these ranges, it may +result in returning a collapsed frustum. +This method is useful for computing a volume to use for interactive +picking. + +Parameters + +windowPos (Vec2d) – +size (Vec2d) – + +ComputeNarrowedFrustum(worldPoint, size) -> Frustum +Returns a frustum that is a narrowed-down version of this frustum. +The new frustum has the same near and far planes, but the other planes +are adjusted to be centered on worldPoint with the new width and +height obtained from the existing width and height by multiplying by +size [0] and size [1], respectively. Finally, the new frustum +is clipped against this frustum so that it is completely contained in +the existing frustum. +worldPoint is given in world space coordinates. size is given +as a scalar (0 to 1 in both dimensions). +If the size given is outside this range, it may result in +returning a collapsed frustum. +If the worldPoint is at or behind the eye of the frustum, it will +return a frustum equal to this frustum. +This method is useful for computing a volume to use for interactive +picking. + +Parameters + +worldPoint (Vec3d) – +size (Vec2d) – + +ComputePickRay(windowPos) → Ray +Builds and returns a GfRay that can be used for picking at the +given normalized (-1 to +1 in both dimensions) window position. +Contrasted with ComputeRay() , that method returns a ray whose origin +is the eyepoint, while this method returns a ray whose origin is on +the near plane. + +Parameters +windowPos (Vec2d) – + +ComputePickRay(worldSpacePos) -> Ray +Builds and returns a GfRay that can be used for picking that +connects the viewpoint to the given 3d point in worldspace. + +Parameters +worldSpacePos (Vec3d) – + +ComputeProjectionMatrix() → Matrix4d +Returns a GL-style projection matrix corresponding to the frustum’s +projection. + +ComputeUpVector() → Vec3d +Returns the normalized world-space up vector, which is computed by +rotating the y axis by the frustum’s rotation. + +ComputeViewDirection() → Vec3d +Returns the normalized world-space view direction vector, which is +computed by rotating the -z axis by the frustum’s rotation. + +ComputeViewFrame(side, up, view) → None +Computes the view frame defined by this frustum. +The frame consists of the view direction, up vector and side vector, +as shown in this diagram. +up +^ ^ +| / +| / view +|/ ++- - - - > side + +Parameters + +side (Vec3d) – +up (Vec3d) – +view (Vec3d) – + +ComputeViewInverse() → Matrix4d +Returns a matrix that represents the inverse viewing transformation +for this frustum. +That is, it returns the matrix that converts points from eye (frustum) +space to world space. + +ComputeViewMatrix() → Matrix4d +Returns a matrix that represents the viewing transformation for this +frustum. +That is, it returns the matrix that converts points from world space +to eye (frustum) space. + +FitToSphere(center, radius, slack) → None +Modifies the frustum to tightly enclose a sphere with the given center +and radius, using the current view direction. +The planes of the frustum are adjusted as necessary. The given amount +of slack is added to the sphere’s radius is used around the sphere to +avoid boundary problems. + +Parameters + +center (Vec3d) – +radius (float) – +slack (float) – + +GetFOV() +Returns the horizontal fov of the frustum. The fov of the +frustum is not necessarily the same value as displayed in +the viewer. The displayed fov is a function of the focal +length or FOV avar. The frustum’s fov may be different due +to things like lens breathing. +If the frustum is not of type GfFrustum::Perspective, the +returned FOV will be 0.0. + +GetNearFar() → Range1d +Returns the near/far interval. + +GetOrthographic(left, right, bottom, top, nearPlane, farPlane) → bool +Returns the current frustum in the format used by +SetOrthographic() . +If the current frustum is not an orthographic projection, this returns +false and leaves the parameters untouched. + +Parameters + +left (float) – +right (float) – +bottom (float) – +top (float) – +nearPlane (float) – +farPlane (float) – + +GetPerspective() +Returns the current perspective frustum values suitable +for use by SetPerspective. If the current frustum is a +perspective projection, the return value is a tuple of +fieldOfView, aspectRatio, nearDistance, farDistance). +If the current frustum is not perspective, the return +value is None. + +GetPosition() → Vec3d +Returns the position of the frustum in world space. + +GetProjectionType() → Frustum.ProjectionType +Returns the projection type. + +static GetReferencePlaneDepth() +classmethod GetReferencePlaneDepth() -> float +Returns the depth of the reference plane. + +GetRotation() → Rotation +Returns the orientation of the frustum in world space as a rotation to +apply to the -z axis. + +GetViewDistance() → float +Returns the view distance. + +GetWindow() → Range2d +Returns the window rectangle in the reference plane. + +Intersects(bbox) → bool +Returns true if the given axis-aligned bbox is inside or intersecting +the frustum. +Otherwise, it returns false. Useful when doing picking or frustum +culling. + +Parameters +bbox (BBox3d) – + +Intersects(point) -> bool +Returns true if the given point is inside or intersecting the frustum. +Otherwise, it returns false. + +Parameters +point (Vec3d) – + +Intersects(p0, p1) -> bool +Returns true if the line segment formed by the given points is +inside or intersecting the frustum. +Otherwise, it returns false. + +Parameters + +p0 (Vec3d) – +p1 (Vec3d) – + +Intersects(p0, p1, p2) -> bool +Returns true if the triangle formed by the given points is inside +or intersecting the frustum. +Otherwise, it returns false. + +Parameters + +p0 (Vec3d) – +p1 (Vec3d) – +p2 (Vec3d) – + +static IntersectsViewVolume() +classmethod IntersectsViewVolume(bbox, vpMat) -> bool +Returns true if the bbox volume intersects the view volume given +by the view-projection matrix, erring on the side of false positives +for efficiency. +This method is intended for cases where a GfFrustum is not available +or when the view-projection matrix yields a view volume that is not +expressable as a GfFrustum. +Because it errs on the side of false positives, it is suitable for +early-out tests such as draw or intersection culling. + +Parameters + +bbox (BBox3d) – +vpMat (Matrix4d) – + +SetNearFar(nearFar) → None +Sets the near/far interval. + +Parameters +nearFar (Range1d) – + +SetOrthographic(left, right, bottom, top, nearPlane, farPlane) → None +Sets up the frustum in a manner similar to glOrtho() . +Sets the projection to GfFrustum::Orthographic and sets the window +and near/far specifications based on the given values. + +Parameters + +left (float) – +right (float) – +bottom (float) – +top (float) – +nearPlane (float) – +farPlane (float) – + +SetPerspective(fieldOfViewHeight, aspectRatio, nearDistance, farDistance) → None +Sets up the frustum in a manner similar to gluPerspective() . +It sets the projection type to GfFrustum::Perspective and sets the +window specification so that the resulting symmetric frustum encloses +an angle of fieldOfViewHeight degrees in the vertical direction, +with aspectRatio used to figure the angle in the horizontal +direction. The near and far distances are specified as well. The +window coordinates are computed as: +top = tan(fieldOfViewHeight / 2) +bottom = -top +right = top \* aspectRatio +left = -right +near = nearDistance +far = farDistance + +Parameters + +fieldOfViewHeight (float) – +aspectRatio (float) – +nearDistance (float) – +farDistance (float) – + +SetPerspective(fieldOfView, isFovVertical, aspectRatio, nearDistance, farDistance) -> None +Sets up the frustum in a manner similar to gluPerspective(). +It sets the projection type to GfFrustum::Perspective and sets the +window specification so that: +If isFovVertical is true, the resulting symmetric frustum encloses +an angle of fieldOfView degrees in the vertical direction, with +aspectRatio used to figure the angle in the horizontal direction. +If isFovVertical is false, the resulting symmetric frustum encloses +an angle of fieldOfView degrees in the horizontal direction, with +aspectRatio used to figure the angle in the vertical direction. +The near and far distances are specified as well. The window +coordinates are computed as follows: + +if isFovVertical: +top = tan(fieldOfView / 2) +right = top * aspectRatio +if NOT isFovVertical: +right = tan(fieldOfView / 2) +top = right / aspectRation +bottom = -top +left = -right +near = nearDistance +far = farDistance + +Parameters + +fieldOfView (float) – +isFovVertical (bool) – +aspectRatio (float) – +nearDistance (float) – +farDistance (float) – + +SetPosition(position) → None +Sets the position of the frustum in world space. + +Parameters +position (Vec3d) – + +SetPositionAndRotationFromMatrix(camToWorldXf) → None +Sets the position and rotation of the frustum from a camera matrix +(always from a y-Up camera). +The resulting frustum’s transform will always represent a right-handed +and orthonormal coordinate sytem (scale, shear, and projection are +removed from the given camToWorldXf ). + +Parameters +camToWorldXf (Matrix4d) – + +SetProjectionType(projectionType) → None +Sets the projection type. + +Parameters +projectionType (Frustum.ProjectionType) – + +SetRotation(rotation) → None +Sets the orientation of the frustum in world space as a rotation to +apply to the default frame: looking along the -z axis with the +y axis +as”up”. + +Parameters +rotation (Rotation) – + +SetViewDistance(viewDistance) → None +Sets the view distance. + +Parameters +viewDistance (float) – + +SetWindow(window) → None +Sets the window rectangle in the reference plane that defines the +left, right, top, and bottom planes of the frustum. + +Parameters +window (Range2d) – + +Transform(matrix) → Frustum +Transforms the frustum by the given matrix. +The transformation matrix is applied as follows: the position and the +direction vector are transformed with the given matrix. Then the +length of the new direction vector is used to rescale the near and far +plane and the view distance. Finally, the points that define the +reference plane are transformed by the matrix. This method assures +that the frustum will not be sheared or perspective-projected. +Note that this definition means that the transformed frustum does not +preserve scales very well. Do not use this function to transform a +frustum that is to be used for precise operations such as intersection +testing. + +Parameters +matrix (Matrix4d) – + +Orthographic = Gf.Frustum.Orthographic + +Perspective = Gf.Frustum.Perspective + +property nearFar + +property position + +property projectionType + +property rotation + +property viewDistance + +property window + +class pxr.Gf.Interval +Basic mathematical interval class +Methods: + +Contains +Returns true if x is inside the interval. + +GetFullInterval +classmethod GetFullInterval() -> Interval + +GetMax +Get the maximum value. + +GetMin +Get the minimum value. + +GetSize +The width of the interval + +In +Returns true if x is inside the interval. + +Intersects(i) +Return true iff the given interval i intersects this interval. + +IsEmpty +True if the interval is empty. + +IsFinite() +Returns true if both the maximum and minimum value are finite. + +IsMaxClosed() +Maximum boundary condition. + +IsMaxFinite() +Returns true if the maximum value is finite. + +IsMaxOpen() +Maximum boundary condition. + +IsMinClosed() +Minimum boundary condition. + +IsMinFinite() +Returns true if the minimum value is finite. + +IsMinOpen() +Minimum boundary condition. + +SetMax +Set the maximum value. + +SetMin +Set the minimum value. + +Attributes: + +finite + +isEmpty +True if the interval is empty. + +max +The maximum value. + +maxClosed + +maxFinite + +maxOpen + +min +The minimum value. + +minClosed + +minFinite + +minOpen + +size +The width of the interval. + +Contains() +Returns true if x is inside the interval. +Returns true if x is inside the interval. + +static GetFullInterval() +classmethod GetFullInterval() -> Interval +Returns the full interval (-inf, inf). + +GetMax() +Get the maximum value. + +GetMin() +Get the minimum value. + +GetSize() +The width of the interval + +In() +Returns true if x is inside the interval. + +Intersects(i) → bool +Return true iff the given interval i intersects this interval. + +Parameters +i (Interval) – + +IsEmpty() +True if the interval is empty. + +IsFinite() → bool +Returns true if both the maximum and minimum value are finite. + +IsMaxClosed() → bool +Maximum boundary condition. + +IsMaxFinite() → bool +Returns true if the maximum value is finite. + +IsMaxOpen() → bool +Maximum boundary condition. + +IsMinClosed() → bool +Minimum boundary condition. + +IsMinFinite() → bool +Returns true if the minimum value is finite. + +IsMinOpen() → bool +Minimum boundary condition. + +SetMax() +Set the maximum value. +Set the maximum value and boundary condition. + +SetMin() +Set the minimum value. +Set the minimum value and boundary condition. + +property finite + +property isEmpty +True if the interval is empty. + +property max +The maximum value. + +property maxClosed + +property maxFinite + +property maxOpen + +property min +The minimum value. + +property minClosed + +property minFinite + +property minOpen + +property size +The width of the interval. + +class pxr.Gf.Line +Line class +Methods: + +FindClosestPoint(point, t) +Returns the point on the line that is closest to point . + +GetDirection() +Return the normalized direction of the line. + +GetPoint(t) +Return the point on the line at ```` ( p0 + t * dir). + +Set(p0, dir) + +param p0 + +Attributes: + +direction + +FindClosestPoint(point, t) → Vec3d +Returns the point on the line that is closest to point . +If t is not None , it will be set to the parametric distance +along the line of the returned point. + +Parameters + +point (Vec3d) – +t (float) – + +GetDirection() → Vec3d +Return the normalized direction of the line. + +GetPoint(t) → Vec3d +Return the point on the line at ```` ( p0 + t * dir). +Remember dir has been normalized so t represents a unit distance. + +Parameters +t (float) – + +Set(p0, dir) → float + +Parameters + +p0 (Vec3d) – +dir (Vec3d) – + +property direction + +class pxr.Gf.LineSeg +Line segment class +Methods: + +FindClosestPoint(point, t) +Returns the point on the line that is closest to point . + +GetDirection() +Return the normalized direction of the line. + +GetLength() +Return the length of the line. + +GetPoint(t) +Return the point on the segment specified by the parameter t. + +Attributes: + +direction + +length + +FindClosestPoint(point, t) → Vec3d +Returns the point on the line that is closest to point . +If t is not None , it will be set to the parametric distance +along the line of the closest point. + +Parameters + +point (Vec3d) – +t (float) – + +GetDirection() → Vec3d +Return the normalized direction of the line. + +GetLength() → float +Return the length of the line. + +GetPoint(t) → Vec3d +Return the point on the segment specified by the parameter t. +p = p0 + t * (p1 - p0) + +Parameters +t (float) – + +property direction + +property length + +class pxr.Gf.Matrix2d +Methods: + +GetColumn(i) +Gets a column of the matrix as a Vec2. + +GetDeterminant() +Returns the determinant of the matrix. + +GetInverse(det, eps) +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the matrix is singular. + +GetRow(i) +Gets a row of the matrix as a Vec2. + +GetTranspose() +Returns the transpose of the matrix. + +Set(m00, m01, m10, m11) +Sets the matrix from 4 independent double values, specified in row-major order. + +SetColumn(i, v) +Sets a column of the matrix from a Vec2. + +SetDiagonal(s) +Sets the matrix to s times the identity matrix. + +SetIdentity() +Sets the matrix to the identity matrix. + +SetRow(i, v) +Sets a row of the matrix from a Vec2. + +SetZero() +Sets the matrix to zero. + +Attributes: + +dimension + +GetColumn(i) → Vec2d +Gets a column of the matrix as a Vec2. + +Parameters +i (int) – + +GetDeterminant() → float +Returns the determinant of the matrix. + +GetInverse(det, eps) → Matrix2d +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the +matrix is singular. +(FLT_MAX is the largest value a float can have, as defined by the +system.) The matrix is considered singular if the determinant is less +than or equal to the optional parameter eps. If det is non-null, +\*det is set to the determinant. + +Parameters + +det (float) – +eps (float) – + +GetRow(i) → Vec2d +Gets a row of the matrix as a Vec2. + +Parameters +i (int) – + +GetTranspose() → Matrix2d +Returns the transpose of the matrix. + +Set(m00, m01, m10, m11) → Matrix2d +Sets the matrix from 4 independent double values, specified in +row-major order. +For example, parameter m10 specifies the value in row 1 and column +0. + +Parameters + +m00 (float) – +m01 (float) – +m10 (float) – +m11 (float) – + +Set(m) -> Matrix2d +Sets the matrix from a 2x2 array of double values, specified in +row-major order. + +Parameters +m (float) – + +SetColumn(i, v) → None +Sets a column of the matrix from a Vec2. + +Parameters + +i (int) – +v (Vec2d) – + +SetDiagonal(s) → Matrix2d +Sets the matrix to s times the identity matrix. + +Parameters +s (float) – + +SetDiagonal(arg1) -> Matrix2d +Sets the matrix to have diagonal ( v[0], v[1] ). + +Parameters +arg1 (Vec2d) – + +SetIdentity() → Matrix2d +Sets the matrix to the identity matrix. + +SetRow(i, v) → None +Sets a row of the matrix from a Vec2. + +Parameters + +i (int) – +v (Vec2d) – + +SetZero() → Matrix2d +Sets the matrix to zero. + +dimension = (2, 2) + +class pxr.Gf.Matrix2f +Methods: + +GetColumn(i) +Gets a column of the matrix as a Vec2. + +GetDeterminant() +Returns the determinant of the matrix. + +GetInverse(det, eps) +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the matrix is singular. + +GetRow(i) +Gets a row of the matrix as a Vec2. + +GetTranspose() +Returns the transpose of the matrix. + +Set(m00, m01, m10, m11) +Sets the matrix from 4 independent float values, specified in row- major order. + +SetColumn(i, v) +Sets a column of the matrix from a Vec2. + +SetDiagonal(s) +Sets the matrix to s times the identity matrix. + +SetIdentity() +Sets the matrix to the identity matrix. + +SetRow(i, v) +Sets a row of the matrix from a Vec2. + +SetZero() +Sets the matrix to zero. + +Attributes: + +dimension + +GetColumn(i) → Vec2f +Gets a column of the matrix as a Vec2. + +Parameters +i (int) – + +GetDeterminant() → float +Returns the determinant of the matrix. + +GetInverse(det, eps) → Matrix2f +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the +matrix is singular. +(FLT_MAX is the largest value a float can have, as defined by the +system.) The matrix is considered singular if the determinant is less +than or equal to the optional parameter eps. If det is non-null, +\*det is set to the determinant. + +Parameters + +det (float) – +eps (float) – + +GetRow(i) → Vec2f +Gets a row of the matrix as a Vec2. + +Parameters +i (int) – + +GetTranspose() → Matrix2f +Returns the transpose of the matrix. + +Set(m00, m01, m10, m11) → Matrix2f +Sets the matrix from 4 independent float values, specified in row- +major order. +For example, parameter m10 specifies the value in row 1 and column +0. + +Parameters + +m00 (float) – +m01 (float) – +m10 (float) – +m11 (float) – + +Set(m) -> Matrix2f +Sets the matrix from a 2x2 array of float values, specified in +row-major order. + +Parameters +m (float) – + +SetColumn(i, v) → None +Sets a column of the matrix from a Vec2. + +Parameters + +i (int) – +v (Vec2f) – + +SetDiagonal(s) → Matrix2f +Sets the matrix to s times the identity matrix. + +Parameters +s (float) – + +SetDiagonal(arg1) -> Matrix2f +Sets the matrix to have diagonal ( v[0], v[1] ). + +Parameters +arg1 (Vec2f) – + +SetIdentity() → Matrix2f +Sets the matrix to the identity matrix. + +SetRow(i, v) → None +Sets a row of the matrix from a Vec2. + +Parameters + +i (int) – +v (Vec2f) – + +SetZero() → Matrix2f +Sets the matrix to zero. + +dimension = (2, 2) + +class pxr.Gf.Matrix3d +Methods: + +ExtractRotation() +Returns the rotation corresponding to this matrix. + +GetColumn(i) +Gets a column of the matrix as a Vec3. + +GetDeterminant() +Returns the determinant of the matrix. + +GetHandedness() +Returns the sign of the determinant of the matrix, i.e. + +GetInverse(det, eps) +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the matrix is singular. + +GetOrthonormalized(issueWarning) +Returns an orthonormalized copy of the matrix. + +GetRow(i) +Gets a row of the matrix as a Vec3. + +GetTranspose() +Returns the transpose of the matrix. + +IsLeftHanded() +Returns true if the vectors in matrix form a left-handed coordinate system. + +IsRightHanded() +Returns true if the vectors in the matrix form a right-handed coordinate system. + +Orthonormalize(issueWarning) +Makes the matrix orthonormal in place. + +Set(m00, m01, m02, m10, m11, m12, m20, m21, m22) +Sets the matrix from 9 independent double values, specified in row-major order. + +SetColumn(i, v) +Sets a column of the matrix from a Vec3. + +SetDiagonal(s) +Sets the matrix to s times the identity matrix. + +SetIdentity() +Sets the matrix to the identity matrix. + +SetRotate(rot) +Sets the matrix to specify a rotation equivalent to rot. + +SetRow(i, v) +Sets a row of the matrix from a Vec3. + +SetScale(scaleFactors) +Sets the matrix to specify a nonuniform scaling in x, y, and z by the factors in vector scaleFactors. + +SetZero() +Sets the matrix to zero. + +Attributes: + +dimension + +ExtractRotation() → Rotation +Returns the rotation corresponding to this matrix. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +GetColumn(i) → Vec3d +Gets a column of the matrix as a Vec3. + +Parameters +i (int) – + +GetDeterminant() → float +Returns the determinant of the matrix. + +GetHandedness() → float +Returns the sign of the determinant of the matrix, i.e. +1 for a right-handed matrix, -1 for a left-handed matrix, and 0 for a +singular matrix. + +GetInverse(det, eps) → Matrix3d +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the +matrix is singular. +(FLT_MAX is the largest value a float can have, as defined by the +system.) The matrix is considered singular if the determinant is less +than or equal to the optional parameter eps. If det is non-null, +\*det is set to the determinant. + +Parameters + +det (float) – +eps (float) – + +GetOrthonormalized(issueWarning) → Matrix3d +Returns an orthonormalized copy of the matrix. + +Parameters +issueWarning (bool) – + +GetRow(i) → Vec3d +Gets a row of the matrix as a Vec3. + +Parameters +i (int) – + +GetTranspose() → Matrix3d +Returns the transpose of the matrix. + +IsLeftHanded() → bool +Returns true if the vectors in matrix form a left-handed coordinate +system. + +IsRightHanded() → bool +Returns true if the vectors in the matrix form a right-handed +coordinate system. + +Orthonormalize(issueWarning) → bool +Makes the matrix orthonormal in place. +This is an iterative method that is much more stable than the previous +cross/cross method. If the iterative method does not converge, a +warning is issued. +Returns true if the iteration converged, false otherwise. Leaves any +translation part of the matrix unchanged. If issueWarning is true, +this method will issue a warning if the iteration does not converge, +otherwise it will be silent. + +Parameters +issueWarning (bool) – + +Set(m00, m01, m02, m10, m11, m12, m20, m21, m22) → Matrix3d +Sets the matrix from 9 independent double values, specified in +row-major order. +For example, parameter m10 specifies the value in row 1 and column +0. + +Parameters + +m00 (float) – +m01 (float) – +m02 (float) – +m10 (float) – +m11 (float) – +m12 (float) – +m20 (float) – +m21 (float) – +m22 (float) – + +Set(m) -> Matrix3d +Sets the matrix from a 3x3 array of double values, specified in +row-major order. + +Parameters +m (float) – + +SetColumn(i, v) → None +Sets a column of the matrix from a Vec3. + +Parameters + +i (int) – +v (Vec3d) – + +SetDiagonal(s) → Matrix3d +Sets the matrix to s times the identity matrix. + +Parameters +s (float) – + +SetDiagonal(arg1) -> Matrix3d +Sets the matrix to have diagonal ( v[0], v[1], v[2] ). + +Parameters +arg1 (Vec3d) – + +SetIdentity() → Matrix3d +Sets the matrix to the identity matrix. + +SetRotate(rot) → Matrix3d +Sets the matrix to specify a rotation equivalent to rot. + +Parameters +rot (Quatd) – + +SetRotate(rot) -> Matrix3d +Sets the matrix to specify a rotation equivalent to rot. + +Parameters +rot (Rotation) – + +SetRow(i, v) → None +Sets a row of the matrix from a Vec3. + +Parameters + +i (int) – +v (Vec3d) – + +SetScale(scaleFactors) → Matrix3d +Sets the matrix to specify a nonuniform scaling in x, y, and z by the +factors in vector scaleFactors. + +Parameters +scaleFactors (Vec3d) – + +SetScale(scaleFactor) -> Matrix3d +Sets matrix to specify a uniform scaling by scaleFactor. + +Parameters +scaleFactor (float) – + +SetZero() → Matrix3d +Sets the matrix to zero. + +dimension = (3, 3) + +class pxr.Gf.Matrix3f +Methods: + +ExtractRotation() +Returns the rotation corresponding to this matrix. + +GetColumn(i) +Gets a column of the matrix as a Vec3. + +GetDeterminant() +Returns the determinant of the matrix. + +GetHandedness() +Returns the sign of the determinant of the matrix, i.e. + +GetInverse(det, eps) +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the matrix is singular. + +GetOrthonormalized(issueWarning) +Returns an orthonormalized copy of the matrix. + +GetRow(i) +Gets a row of the matrix as a Vec3. + +GetTranspose() +Returns the transpose of the matrix. + +IsLeftHanded() +Returns true if the vectors in matrix form a left-handed coordinate system. + +IsRightHanded() +Returns true if the vectors in the matrix form a right-handed coordinate system. + +Orthonormalize(issueWarning) +Makes the matrix orthonormal in place. + +Set(m00, m01, m02, m10, m11, m12, m20, m21, m22) +Sets the matrix from 9 independent float values, specified in row- major order. + +SetColumn(i, v) +Sets a column of the matrix from a Vec3. + +SetDiagonal(s) +Sets the matrix to s times the identity matrix. + +SetIdentity() +Sets the matrix to the identity matrix. + +SetRotate(rot) +Sets the matrix to specify a rotation equivalent to rot. + +SetRow(i, v) +Sets a row of the matrix from a Vec3. + +SetScale(scaleFactors) +Sets the matrix to specify a nonuniform scaling in x, y, and z by the factors in vector scaleFactors. + +SetZero() +Sets the matrix to zero. + +Attributes: + +dimension + +ExtractRotation() → Rotation +Returns the rotation corresponding to this matrix. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +GetColumn(i) → Vec3f +Gets a column of the matrix as a Vec3. + +Parameters +i (int) – + +GetDeterminant() → float +Returns the determinant of the matrix. + +GetHandedness() → float +Returns the sign of the determinant of the matrix, i.e. +1 for a right-handed matrix, -1 for a left-handed matrix, and 0 for a +singular matrix. + +GetInverse(det, eps) → Matrix3f +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the +matrix is singular. +(FLT_MAX is the largest value a float can have, as defined by the +system.) The matrix is considered singular if the determinant is less +than or equal to the optional parameter eps. If det is non-null, +\*det is set to the determinant. + +Parameters + +det (float) – +eps (float) – + +GetOrthonormalized(issueWarning) → Matrix3f +Returns an orthonormalized copy of the matrix. + +Parameters +issueWarning (bool) – + +GetRow(i) → Vec3f +Gets a row of the matrix as a Vec3. + +Parameters +i (int) – + +GetTranspose() → Matrix3f +Returns the transpose of the matrix. + +IsLeftHanded() → bool +Returns true if the vectors in matrix form a left-handed coordinate +system. + +IsRightHanded() → bool +Returns true if the vectors in the matrix form a right-handed +coordinate system. + +Orthonormalize(issueWarning) → bool +Makes the matrix orthonormal in place. +This is an iterative method that is much more stable than the previous +cross/cross method. If the iterative method does not converge, a +warning is issued. +Returns true if the iteration converged, false otherwise. Leaves any +translation part of the matrix unchanged. If issueWarning is true, +this method will issue a warning if the iteration does not converge, +otherwise it will be silent. + +Parameters +issueWarning (bool) – + +Set(m00, m01, m02, m10, m11, m12, m20, m21, m22) → Matrix3f +Sets the matrix from 9 independent float values, specified in row- +major order. +For example, parameter m10 specifies the value in row 1 and column +0. + +Parameters + +m00 (float) – +m01 (float) – +m02 (float) – +m10 (float) – +m11 (float) – +m12 (float) – +m20 (float) – +m21 (float) – +m22 (float) – + +Set(m) -> Matrix3f +Sets the matrix from a 3x3 array of float values, specified in +row-major order. + +Parameters +m (float) – + +SetColumn(i, v) → None +Sets a column of the matrix from a Vec3. + +Parameters + +i (int) – +v (Vec3f) – + +SetDiagonal(s) → Matrix3f +Sets the matrix to s times the identity matrix. + +Parameters +s (float) – + +SetDiagonal(arg1) -> Matrix3f +Sets the matrix to have diagonal ( v[0], v[1], v[2] ). + +Parameters +arg1 (Vec3f) – + +SetIdentity() → Matrix3f +Sets the matrix to the identity matrix. + +SetRotate(rot) → Matrix3f +Sets the matrix to specify a rotation equivalent to rot. + +Parameters +rot (Quatf) – + +SetRotate(rot) -> Matrix3f +Sets the matrix to specify a rotation equivalent to rot. + +Parameters +rot (Rotation) – + +SetRow(i, v) → None +Sets a row of the matrix from a Vec3. + +Parameters + +i (int) – +v (Vec3f) – + +SetScale(scaleFactors) → Matrix3f +Sets the matrix to specify a nonuniform scaling in x, y, and z by the +factors in vector scaleFactors. + +Parameters +scaleFactors (Vec3f) – + +SetScale(scaleFactor) -> Matrix3f +Sets matrix to specify a uniform scaling by scaleFactor. + +Parameters +scaleFactor (float) – + +SetZero() → Matrix3f +Sets the matrix to zero. + +dimension = (3, 3) + +class pxr.Gf.Matrix4d +Methods: + +ExtractRotation() +Returns the rotation corresponding to this matrix. + +ExtractRotationMatrix() +Returns the rotation corresponding to this matrix. + +ExtractRotationQuat() +Return the rotation corresponding to this matrix as a quaternion. + +ExtractTranslation() +Returns the translation part of the matrix, defined as the first three elements of the last row. + +Factor(r, s, u, t, p, eps) +Factors the matrix into 5 components: + +GetColumn(i) +Gets a column of the matrix as a Vec4. + +GetDeterminant() +Returns the determinant of the matrix. + +GetDeterminant3() +Returns the determinant of the upper 3x3 matrix. + +GetHandedness() +Returns the sign of the determinant of the upper 3x3 matrix, i.e. + +GetInverse(det, eps) +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the matrix is singular. + +GetOrthonormalized(issueWarning) +Returns an orthonormalized copy of the matrix. + +GetRow(i) +Gets a row of the matrix as a Vec4. + +GetRow3(i) +Gets a row of the matrix as a Vec3. + +GetTranspose() +Returns the transpose of the matrix. + +HasOrthogonalRows3() +Returns true, if the row vectors of the upper 3x3 matrix form an orthogonal basis. + +IsLeftHanded() +Returns true if the vectors in the upper 3x3 matrix form a left-handed coordinate system. + +IsRightHanded() +Returns true if the vectors in the upper 3x3 matrix form a right- handed coordinate system. + +Orthonormalize(issueWarning) +Makes the matrix orthonormal in place. + +RemoveScaleShear() +Returns the matrix with any scaling or shearing removed, leaving only the rotation and translation. + +Set(m00, m01, m02, m03, m10, m11, m12, m13, ...) +Sets the matrix from 16 independent double values, specified in row-major order. + +SetColumn(i, v) +Sets a column of the matrix from a Vec4. + +SetDiagonal(s) +Sets the matrix to s times the identity matrix. + +SetIdentity() +Sets the matrix to the identity matrix. + +SetLookAt(eyePoint, centerPoint, upDirection) +Sets the matrix to specify a viewing matrix from parameters similar to those used by gluLookAt(3G) . + +SetRotate(rot) +Sets the matrix to specify a rotation equivalent to rot, and clears the translation. + +SetRotateOnly(rot) +Sets the matrix to specify a rotation equivalent to rot, without clearing the translation. + +SetRow(i, v) +Sets a row of the matrix from a Vec4. + +SetRow3(i, v) +Sets a row of the matrix from a Vec3. + +SetScale(scaleFactors) +Sets the matrix to specify a nonuniform scaling in x, y, and z by the factors in vector scaleFactors. + +SetTransform(rotate, translate) +Sets matrix to specify a rotation by rotate and a translation by translate. + +SetTranslate(trans) +Sets matrix to specify a translation by the vector trans, and clears the rotation. + +SetTranslateOnly(t) +Sets matrix to specify a translation by the vector trans, without clearing the rotation. + +SetZero() +Sets the matrix to zero. + +Transform(vec) +Transforms the row vector vec by the matrix, returning the result. + +TransformAffine(vec) +Transforms the row vector vec by the matrix, returning the result. + +TransformDir(vec) +Transforms row vector vec by the matrix, returning the result. + +Attributes: + +dimension + +ExtractRotation() → Rotation +Returns the rotation corresponding to this matrix. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +ExtractRotationMatrix() → Matrix3d +Returns the rotation corresponding to this matrix. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +ExtractRotationQuat() → Quatd +Return the rotation corresponding to this matrix as a quaternion. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +ExtractTranslation() → Vec3d +Returns the translation part of the matrix, defined as the first three +elements of the last row. + +Factor(r, s, u, t, p, eps) → bool +Factors the matrix into 5 components: + +*M* = r \* s \* -r \* u \* t where +t is a translation. +u and r are rotations, and -r is the transpose (inverse) of +r. The u matrix may contain shear information. +s is a scale. Any projection information could be returned in +matrix p, but currently p is never modified. +Returns false if the matrix is singular (as determined by eps). +In that case, any zero scales in s are clamped to eps to allow +computation of u. + +Parameters + +r (Matrix4d) – +s (Vec3d) – +u (Matrix4d) – +t (Vec3d) – +p (Matrix4d) – +eps (float) – + +GetColumn(i) → Vec4d +Gets a column of the matrix as a Vec4. + +Parameters +i (int) – + +GetDeterminant() → float +Returns the determinant of the matrix. + +GetDeterminant3() → float +Returns the determinant of the upper 3x3 matrix. +This method is useful when the matrix describes a linear +transformation such as a rotation or scale because the other values in +the 4x4 matrix are not important. + +GetHandedness() → float +Returns the sign of the determinant of the upper 3x3 matrix, i.e. +1 for a right-handed matrix, -1 for a left-handed matrix, and 0 for a +singular matrix. + +GetInverse(det, eps) → Matrix4d +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the +matrix is singular. +(FLT_MAX is the largest value a float can have, as defined by the +system.) The matrix is considered singular if the determinant is less +than or equal to the optional parameter eps. If det is non-null, +\*det is set to the determinant. + +Parameters + +det (float) – +eps (float) – + +GetOrthonormalized(issueWarning) → Matrix4d +Returns an orthonormalized copy of the matrix. + +Parameters +issueWarning (bool) – + +GetRow(i) → Vec4d +Gets a row of the matrix as a Vec4. + +Parameters +i (int) – + +GetRow3(i) → Vec3d +Gets a row of the matrix as a Vec3. + +Parameters +i (int) – + +GetTranspose() → Matrix4d +Returns the transpose of the matrix. + +HasOrthogonalRows3() → bool +Returns true, if the row vectors of the upper 3x3 matrix form an +orthogonal basis. +Note they do not have to be unit length for this test to return true. + +IsLeftHanded() → bool +Returns true if the vectors in the upper 3x3 matrix form a left-handed +coordinate system. + +IsRightHanded() → bool +Returns true if the vectors in the upper 3x3 matrix form a right- +handed coordinate system. + +Orthonormalize(issueWarning) → bool +Makes the matrix orthonormal in place. +This is an iterative method that is much more stable than the previous +cross/cross method. If the iterative method does not converge, a +warning is issued. +Returns true if the iteration converged, false otherwise. Leaves any +translation part of the matrix unchanged. If issueWarning is true, +this method will issue a warning if the iteration does not converge, +otherwise it will be silent. + +Parameters +issueWarning (bool) – + +RemoveScaleShear() → Matrix4d +Returns the matrix with any scaling or shearing removed, leaving only +the rotation and translation. +If the matrix cannot be decomposed, returns the original matrix. + +Set(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) → Matrix4d +Sets the matrix from 16 independent double values, specified in +row-major order. +For example, parameter m10 specifies the value in row 1 and column +0. + +Parameters + +m00 (float) – +m01 (float) – +m02 (float) – +m03 (float) – +m10 (float) – +m11 (float) – +m12 (float) – +m13 (float) – +m20 (float) – +m21 (float) – +m22 (float) – +m23 (float) – +m30 (float) – +m31 (float) – +m32 (float) – +m33 (float) – + +Set(m) -> Matrix4d +Sets the matrix from a 4x4 array of double values, specified in +row-major order. + +Parameters +m (float) – + +SetColumn(i, v) → None +Sets a column of the matrix from a Vec4. + +Parameters + +i (int) – +v (Vec4d) – + +SetDiagonal(s) → Matrix4d +Sets the matrix to s times the identity matrix. + +Parameters +s (float) – + +SetDiagonal(arg1) -> Matrix4d +Sets the matrix to have diagonal ( v[0], v[1], v[2], v[3] ). + +Parameters +arg1 (Vec4d) – + +SetIdentity() → Matrix4d +Sets the matrix to the identity matrix. + +SetLookAt(eyePoint, centerPoint, upDirection) → Matrix4d +Sets the matrix to specify a viewing matrix from parameters similar to +those used by gluLookAt(3G) . +eyePoint represents the eye point in world space. centerPoint +represents the world-space center of attention. upDirection is a +vector indicating which way is up. + +Parameters + +eyePoint (Vec3d) – +centerPoint (Vec3d) – +upDirection (Vec3d) – + +SetLookAt(eyePoint, orientation) -> Matrix4d +Sets the matrix to specify a viewing matrix from a world-space +eyePoint and a world-space rotation that rigidly rotates the +orientation from its canonical frame, which is defined to be looking +along the -z axis with the +y axis as the up direction. + +Parameters + +eyePoint (Vec3d) – +orientation (Rotation) – + +SetRotate(rot) → Matrix4d +Sets the matrix to specify a rotation equivalent to rot, and clears +the translation. + +Parameters +rot (Quatd) – + +SetRotate(rot) -> Matrix4d +Sets the matrix to specify a rotation equivalent to rot, and clears +the translation. + +Parameters +rot (Rotation) – + +SetRotate(mx) -> Matrix4d +Sets the matrix to specify a rotation equivalent to mx, and clears +the translation. + +Parameters +mx (Matrix3d) – + +SetRotateOnly(rot) → Matrix4d +Sets the matrix to specify a rotation equivalent to rot, without +clearing the translation. + +Parameters +rot (Quatd) – + +SetRotateOnly(rot) -> Matrix4d +Sets the matrix to specify a rotation equivalent to rot, without +clearing the translation. + +Parameters +rot (Rotation) – + +SetRotateOnly(mx) -> Matrix4d +Sets the matrix to specify a rotation equivalent to mx, without +clearing the translation. + +Parameters +mx (Matrix3d) – + +SetRow(i, v) → None +Sets a row of the matrix from a Vec4. + +Parameters + +i (int) – +v (Vec4d) – + +SetRow3(i, v) → None +Sets a row of the matrix from a Vec3. +The fourth element of the row is ignored. + +Parameters + +i (int) – +v (Vec3d) – + +SetScale(scaleFactors) → Matrix4d +Sets the matrix to specify a nonuniform scaling in x, y, and z by the +factors in vector scaleFactors. + +Parameters +scaleFactors (Vec3d) – + +SetScale(scaleFactor) -> Matrix4d +Sets matrix to specify a uniform scaling by scaleFactor. + +Parameters +scaleFactor (float) – + +SetTransform(rotate, translate) → Matrix4d +Sets matrix to specify a rotation by rotate and a translation by +translate. + +Parameters + +rotate (Rotation) – +translate (Vec3d) – + +SetTransform(rotmx, translate) -> Matrix4d +Sets matrix to specify a rotation by rotmx and a translation by +translate. + +Parameters + +rotmx (Matrix3d) – +translate (Vec3d) – + +SetTranslate(trans) → Matrix4d +Sets matrix to specify a translation by the vector trans, and clears +the rotation. + +Parameters +trans (Vec3d) – + +SetTranslateOnly(t) → Matrix4d +Sets matrix to specify a translation by the vector trans, without +clearing the rotation. + +Parameters +t (Vec3d) – + +SetZero() → Matrix4d +Sets the matrix to zero. + +Transform(vec) → Vec3d +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1. + +Parameters +vec (Vec3d) – + +Transform(vec) -> Vec3f +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1. This is an overloaded method; it differs from the other version +in that it returns a different value type. + +Parameters +vec (Vec3f) – + +TransformAffine(vec) → Vec3d +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1 and ignores the fourth column of the matrix (i.e. assumes it is +(0, 0, 0, 1)). + +Parameters +vec (Vec3d) – + +TransformAffine(vec) -> Vec3f +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1 and ignores the fourth column of the matrix (i.e. assumes it is +(0, 0, 0, 1)). + +Parameters +vec (Vec3f) – + +TransformDir(vec) → Vec3d +Transforms row vector vec by the matrix, returning the result. +This treats the vector as a direction vector, so the translation +information in the matrix is ignored. That is, it treats the vector as +a 4-component vector whose fourth component is 0. + +Parameters +vec (Vec3d) – + +TransformDir(vec) -> Vec3f +Transforms row vector vec by the matrix, returning the result. +This treats the vector as a direction vector, so the translation +information in the matrix is ignored. That is, it treats the vector as +a 4-component vector whose fourth component is 0. This is an +overloaded method; it differs from the other version in that it +returns a different value type. + +Parameters +vec (Vec3f) – + +dimension = (4, 4) + +class pxr.Gf.Matrix4f +Methods: + +ExtractRotation() +Returns the rotation corresponding to this matrix. + +ExtractRotationMatrix() +Returns the rotation corresponding to this matrix. + +ExtractRotationQuat() +Return the rotation corresponding to this matrix as a quaternion. + +ExtractTranslation() +Returns the translation part of the matrix, defined as the first three elements of the last row. + +Factor(r, s, u, t, p, eps) +Factors the matrix into 5 components: + +GetColumn(i) +Gets a column of the matrix as a Vec4. + +GetDeterminant() +Returns the determinant of the matrix. + +GetDeterminant3() +Returns the determinant of the upper 3x3 matrix. + +GetHandedness() +Returns the sign of the determinant of the upper 3x3 matrix, i.e. + +GetInverse(det, eps) +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the matrix is singular. + +GetOrthonormalized(issueWarning) +Returns an orthonormalized copy of the matrix. + +GetRow(i) +Gets a row of the matrix as a Vec4. + +GetRow3(i) +Gets a row of the matrix as a Vec3. + +GetTranspose() +Returns the transpose of the matrix. + +HasOrthogonalRows3() +Returns true, if the row vectors of the upper 3x3 matrix form an orthogonal basis. + +IsLeftHanded() +Returns true if the vectors in the upper 3x3 matrix form a left-handed coordinate system. + +IsRightHanded() +Returns true if the vectors in the upper 3x3 matrix form a right- handed coordinate system. + +Orthonormalize(issueWarning) +Makes the matrix orthonormal in place. + +RemoveScaleShear() +Returns the matrix with any scaling or shearing removed, leaving only the rotation and translation. + +Set(m00, m01, m02, m03, m10, m11, m12, m13, ...) +Sets the matrix from 16 independent float values, specified in row-major order. + +SetColumn(i, v) +Sets a column of the matrix from a Vec4. + +SetDiagonal(s) +Sets the matrix to s times the identity matrix. + +SetIdentity() +Sets the matrix to the identity matrix. + +SetLookAt(eyePoint, centerPoint, upDirection) +Sets the matrix to specify a viewing matrix from parameters similar to those used by gluLookAt(3G) . + +SetRotate(rot) +Sets the matrix to specify a rotation equivalent to rot, and clears the translation. + +SetRotateOnly(rot) +Sets the matrix to specify a rotation equivalent to rot, without clearing the translation. + +SetRow(i, v) +Sets a row of the matrix from a Vec4. + +SetRow3(i, v) +Sets a row of the matrix from a Vec3. + +SetScale(scaleFactors) +Sets the matrix to specify a nonuniform scaling in x, y, and z by the factors in vector scaleFactors. + +SetTransform(rotate, translate) +Sets matrix to specify a rotation by rotate and a translation by translate. + +SetTranslate(trans) +Sets matrix to specify a translation by the vector trans, and clears the rotation. + +SetTranslateOnly(t) +Sets matrix to specify a translation by the vector trans, without clearing the rotation. + +SetZero() +Sets the matrix to zero. + +Transform(vec) +Transforms the row vector vec by the matrix, returning the result. + +TransformAffine(vec) +Transforms the row vector vec by the matrix, returning the result. + +TransformDir(vec) +Transforms row vector vec by the matrix, returning the result. + +Attributes: + +dimension + +ExtractRotation() → Rotation +Returns the rotation corresponding to this matrix. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +ExtractRotationMatrix() → Matrix3f +Returns the rotation corresponding to this matrix. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +ExtractRotationQuat() → Quatf +Return the rotation corresponding to this matrix as a quaternion. +This works well only if the matrix represents a rotation. +For good results, consider calling Orthonormalize() before calling +this method. + +ExtractTranslation() → Vec3f +Returns the translation part of the matrix, defined as the first three +elements of the last row. + +Factor(r, s, u, t, p, eps) → bool +Factors the matrix into 5 components: + +*M* = r \* s \* -r \* u \* t where +t is a translation. +u and r are rotations, and -r is the transpose (inverse) of +r. The u matrix may contain shear information. +s is a scale. Any projection information could be returned in +matrix p, but currently p is never modified. +Returns false if the matrix is singular (as determined by eps). +In that case, any zero scales in s are clamped to eps to allow +computation of u. + +Parameters + +r (Matrix4f) – +s (Vec3f) – +u (Matrix4f) – +t (Vec3f) – +p (Matrix4f) – +eps (float) – + +GetColumn(i) → Vec4f +Gets a column of the matrix as a Vec4. + +Parameters +i (int) – + +GetDeterminant() → float +Returns the determinant of the matrix. + +GetDeterminant3() → float +Returns the determinant of the upper 3x3 matrix. +This method is useful when the matrix describes a linear +transformation such as a rotation or scale because the other values in +the 4x4 matrix are not important. + +GetHandedness() → float +Returns the sign of the determinant of the upper 3x3 matrix, i.e. +1 for a right-handed matrix, -1 for a left-handed matrix, and 0 for a +singular matrix. + +GetInverse(det, eps) → Matrix4f +Returns the inverse of the matrix, or FLT_MAX * SetIdentity() if the +matrix is singular. +(FLT_MAX is the largest value a float can have, as defined by the +system.) The matrix is considered singular if the determinant is less +than or equal to the optional parameter eps. If det is non-null, +\*det is set to the determinant. + +Parameters + +det (float) – +eps (float) – + +GetOrthonormalized(issueWarning) → Matrix4f +Returns an orthonormalized copy of the matrix. + +Parameters +issueWarning (bool) – + +GetRow(i) → Vec4f +Gets a row of the matrix as a Vec4. + +Parameters +i (int) – + +GetRow3(i) → Vec3f +Gets a row of the matrix as a Vec3. + +Parameters +i (int) – + +GetTranspose() → Matrix4f +Returns the transpose of the matrix. + +HasOrthogonalRows3() → bool +Returns true, if the row vectors of the upper 3x3 matrix form an +orthogonal basis. +Note they do not have to be unit length for this test to return true. + +IsLeftHanded() → bool +Returns true if the vectors in the upper 3x3 matrix form a left-handed +coordinate system. + +IsRightHanded() → bool +Returns true if the vectors in the upper 3x3 matrix form a right- +handed coordinate system. + +Orthonormalize(issueWarning) → bool +Makes the matrix orthonormal in place. +This is an iterative method that is much more stable than the previous +cross/cross method. If the iterative method does not converge, a +warning is issued. +Returns true if the iteration converged, false otherwise. Leaves any +translation part of the matrix unchanged. If issueWarning is true, +this method will issue a warning if the iteration does not converge, +otherwise it will be silent. + +Parameters +issueWarning (bool) – + +RemoveScaleShear() → Matrix4f +Returns the matrix with any scaling or shearing removed, leaving only +the rotation and translation. +If the matrix cannot be decomposed, returns the original matrix. + +Set(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) → Matrix4f +Sets the matrix from 16 independent float values, specified in +row-major order. +For example, parameter m10 specifies the value in row1 and column 0. + +Parameters + +m00 (float) – +m01 (float) – +m02 (float) – +m03 (float) – +m10 (float) – +m11 (float) – +m12 (float) – +m13 (float) – +m20 (float) – +m21 (float) – +m22 (float) – +m23 (float) – +m30 (float) – +m31 (float) – +m32 (float) – +m33 (float) – + +Set(m) -> Matrix4f +Sets the matrix from a 4x4 array of float values, specified in +row-major order. + +Parameters +m (float) – + +SetColumn(i, v) → None +Sets a column of the matrix from a Vec4. + +Parameters + +i (int) – +v (Vec4f) – + +SetDiagonal(s) → Matrix4f +Sets the matrix to s times the identity matrix. + +Parameters +s (float) – + +SetDiagonal(arg1) -> Matrix4f +Sets the matrix to have diagonal ( v[0], v[1], v[2], v[3] ). + +Parameters +arg1 (Vec4f) – + +SetIdentity() → Matrix4f +Sets the matrix to the identity matrix. + +SetLookAt(eyePoint, centerPoint, upDirection) → Matrix4f +Sets the matrix to specify a viewing matrix from parameters similar to +those used by gluLookAt(3G) . +eyePoint represents the eye point in world space. centerPoint +represents the world-space center of attention. upDirection is a +vector indicating which way is up. + +Parameters + +eyePoint (Vec3f) – +centerPoint (Vec3f) – +upDirection (Vec3f) – + +SetLookAt(eyePoint, orientation) -> Matrix4f +Sets the matrix to specify a viewing matrix from a world-space +eyePoint and a world-space rotation that rigidly rotates the +orientation from its canonical frame, which is defined to be looking +along the -z axis with the +y axis as the up direction. + +Parameters + +eyePoint (Vec3f) – +orientation (Rotation) – + +SetRotate(rot) → Matrix4f +Sets the matrix to specify a rotation equivalent to rot, and clears +the translation. + +Parameters +rot (Quatf) – + +SetRotate(rot) -> Matrix4f +Sets the matrix to specify a rotation equivalent to rot, and clears +the translation. + +Parameters +rot (Rotation) – + +SetRotate(mx) -> Matrix4f +Sets the matrix to specify a rotation equivalent to mx, and clears +the translation. + +Parameters +mx (Matrix3f) – + +SetRotateOnly(rot) → Matrix4f +Sets the matrix to specify a rotation equivalent to rot, without +clearing the translation. + +Parameters +rot (Quatf) – + +SetRotateOnly(rot) -> Matrix4f +Sets the matrix to specify a rotation equivalent to rot, without +clearing the translation. + +Parameters +rot (Rotation) – + +SetRotateOnly(mx) -> Matrix4f +Sets the matrix to specify a rotation equivalent to mx, without +clearing the translation. + +Parameters +mx (Matrix3f) – + +SetRow(i, v) → None +Sets a row of the matrix from a Vec4. + +Parameters + +i (int) – +v (Vec4f) – + +SetRow3(i, v) → None +Sets a row of the matrix from a Vec3. +The fourth element of the row is ignored. + +Parameters + +i (int) – +v (Vec3f) – + +SetScale(scaleFactors) → Matrix4f +Sets the matrix to specify a nonuniform scaling in x, y, and z by the +factors in vector scaleFactors. + +Parameters +scaleFactors (Vec3f) – + +SetScale(scaleFactor) -> Matrix4f +Sets matrix to specify a uniform scaling by scaleFactor. + +Parameters +scaleFactor (float) – + +SetTransform(rotate, translate) → Matrix4f +Sets matrix to specify a rotation by rotate and a translation by +translate. + +Parameters + +rotate (Rotation) – +translate (Vec3f) – + +SetTransform(rotmx, translate) -> Matrix4f +Sets matrix to specify a rotation by rotmx and a translation by +translate. + +Parameters + +rotmx (Matrix3f) – +translate (Vec3f) – + +SetTranslate(trans) → Matrix4f +Sets matrix to specify a translation by the vector trans, and clears +the rotation. + +Parameters +trans (Vec3f) – + +SetTranslateOnly(t) → Matrix4f +Sets matrix to specify a translation by the vector trans, without +clearing the rotation. + +Parameters +t (Vec3f) – + +SetZero() → Matrix4f +Sets the matrix to zero. + +Transform(vec) → Vec3d +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1. + +Parameters +vec (Vec3d) – + +Transform(vec) -> Vec3f +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1. This is an overloaded method; it differs from the other version +in that it returns a different value type. + +Parameters +vec (Vec3f) – + +TransformAffine(vec) → Vec3d +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1 and ignores the fourth column of the matrix (i.e. assumes it is +(0, 0, 0, 1)). + +Parameters +vec (Vec3d) – + +TransformAffine(vec) -> Vec3f +Transforms the row vector vec by the matrix, returning the result. +This treats the vector as a 4-component vector whose fourth component +is 1 and ignores the fourth column of the matrix (i.e. assumes it is +(0, 0, 0, 1)). + +Parameters +vec (Vec3f) – + +TransformDir(vec) → Vec3d +Transforms row vector vec by the matrix, returning the result. +This treats the vector as a direction vector, so the translation +information in the matrix is ignored. That is, it treats the vector as +a 4-component vector whose fourth component is 0. + +Parameters +vec (Vec3d) – + +TransformDir(vec) -> Vec3f +Transforms row vector vec by the matrix, returning the result. +This treats the vector as a direction vector, so the translation +information in the matrix is ignored. That is, it treats the vector as +a 4-component vector whose fourth component is 0. This is an +overloaded method; it differs from the other version in that it +returns a different value type. + +Parameters +vec (Vec3f) – + +dimension = (4, 4) + +class pxr.Gf.MultiInterval +Methods: + +Add(i) +Add the given interval to the multi-interval. + +ArithmeticAdd(i) +Uses the given interval to extend the multi-interval in the interval arithmetic sense. + +Clear() +Clear the multi-interval. + +Contains +Returns true if x is inside the multi-interval. + +GetBounds() +Returns an interval bounding the entire multi-interval. + +GetComplement() +Return the complement of this set. + +GetFullInterval +classmethod GetFullInterval() -> MultiInterval + +GetSize() +Returns the number of intervals in the set. + +Intersect(i) + +param i + +IsEmpty() +Returns true if the multi-interval is empty. + +Remove(i) +Remove the given interval from this multi-interval. + +Attributes: + +bounds + +isEmpty + +size + +Add(i) → None +Add the given interval to the multi-interval. + +Parameters +i (Interval) – + +Add(s) -> None +Add the given multi-interval to the multi-interval. +Sets this object to the union of the two sets. + +Parameters +s (MultiInterval) – + +ArithmeticAdd(i) → None +Uses the given interval to extend the multi-interval in the interval +arithmetic sense. + +Parameters +i (Interval) – + +Clear() → None +Clear the multi-interval. + +Contains() +Returns true if x is inside the multi-interval. +Returns true if x is inside the multi-interval. +Returns true if x is inside the multi-interval. + +GetBounds() → Interval +Returns an interval bounding the entire multi-interval. +Returns an empty interval if the multi-interval is empty. + +GetComplement() → MultiInterval +Return the complement of this set. + +static GetFullInterval() +classmethod GetFullInterval() -> MultiInterval +Returns the full interval (-inf, inf). + +GetSize() → int +Returns the number of intervals in the set. + +Intersect(i) → None + +Parameters +i (Interval) – + +Intersect(s) -> None + +Parameters +s (MultiInterval) – + +IsEmpty() → bool +Returns true if the multi-interval is empty. + +Remove(i) → None +Remove the given interval from this multi-interval. + +Parameters +i (Interval) – + +Remove(s) -> None +Remove the given multi-interval from this multi-interval. + +Parameters +s (MultiInterval) – + +property bounds + +property isEmpty + +property size + +class pxr.Gf.Plane +Methods: + +GetDistance(p) +Returns the distance of point from the plane. + +GetDistanceFromOrigin() +Returns the distance of the plane from the origin. + +GetEquation() +Give the coefficients of the equation of the plane. + +GetNormal() +Returns the unit-length normal vector of the plane. + +IntersectsPositiveHalfSpace(box) +Returns true if the given aligned bounding box is at least partially on the positive side (the one the normal points into) of the plane. + +Project(p) +Return the projection of p onto the plane. + +Reorient(p) +Flip the plane normal (if necessary) so that p is in the positive halfspace. + +Set(normal, distanceToOrigin) +Sets this to the plane perpendicular to normal and at distance units from the origin. + +Transform(matrix) +Transforms the plane by the given matrix. + +Attributes: + +distanceFromOrigin + +normal + +GetDistance(p) → float +Returns the distance of point from the plane. +This distance will be positive if the point is on the side of the +plane containing the normal. + +Parameters +p (Vec3d) – + +GetDistanceFromOrigin() → float +Returns the distance of the plane from the origin. + +GetEquation() → Vec4d +Give the coefficients of the equation of the plane. +Suitable to OpenGL calls to set the clipping plane. + +GetNormal() → Vec3d +Returns the unit-length normal vector of the plane. + +IntersectsPositiveHalfSpace(box) → bool +Returns true if the given aligned bounding box is at least +partially on the positive side (the one the normal points into) of the +plane. + +Parameters +box (Range3d) – + +IntersectsPositiveHalfSpace(pt) -> bool +Returns true if the given point is on the plane or within its positive +half space. + +Parameters +pt (Vec3d) – + +Project(p) → Vec3d +Return the projection of p onto the plane. + +Parameters +p (Vec3d) – + +Reorient(p) → None +Flip the plane normal (if necessary) so that p is in the positive +halfspace. + +Parameters +p (Vec3d) – + +Set(normal, distanceToOrigin) → None +Sets this to the plane perpendicular to normal and at distance +units from the origin. +The passed-in normal is normalized to unit length first. + +Parameters + +normal (Vec3d) – +distanceToOrigin (float) – + +Set(normal, point) -> None +This constructor sets this to the plane perpendicular to normal +and that passes through point . +The passed-in normal is normalized to unit length first. + +Parameters + +normal (Vec3d) – +point (Vec3d) – + +Set(p0, p1, p2) -> None +This constructor sets this to the plane that contains the three given +points. +The normal is constructed from the cross product of ( p1 - p0 +) ( p2 - p0 ). Results are undefined if the points are +collinear. + +Parameters + +p0 (Vec3d) – +p1 (Vec3d) – +p2 (Vec3d) – + +Set(eqn) -> None +This method sets this to the plane given by the equation eqn [0] +* x + eqn [1] * y + eqn [2] * z + eqn [3] = 0. + +Parameters +eqn (Vec4d) – + +Transform(matrix) → Plane +Transforms the plane by the given matrix. + +Parameters +matrix (Matrix4d) – + +property distanceFromOrigin + +property normal + +class pxr.Gf.Quatd +Methods: + +GetConjugate() +Return this quaternion's conjugate, which is the quaternion with the same real coefficient and negated imaginary coefficients. + +GetIdentity +classmethod GetIdentity() -> Quatd + +GetImaginary() +Return the imaginary coefficient. + +GetInverse() +Return this quaternion's inverse, or reciprocal. + +GetLength() +Return geometric length of this quaternion. + +GetNormalized(eps) +length of this quaternion is smaller than eps , return the identity quaternion. + +GetReal() +Return the real coefficient. + +GetZero +classmethod GetZero() -> Quatd + +Normalize(eps) +Normalizes this quaternion in place to unit length, returning the length before normalization. + +SetImaginary(imaginary) +Set the imaginary coefficients. + +SetReal(real) +Set the real coefficient. + +Transform(point) +Transform the GfVec3d point. + +Attributes: + +imaginary + +real + +GetConjugate() → Quatd +Return this quaternion’s conjugate, which is the quaternion with the +same real coefficient and negated imaginary coefficients. + +static GetIdentity() +classmethod GetIdentity() -> Quatd +Return the identity quaternion, with real coefficient 1 and an +imaginary coefficients all zero. + +GetImaginary() → Vec3d +Return the imaginary coefficient. + +GetInverse() → Quatd +Return this quaternion’s inverse, or reciprocal. +This is the quaternion’s conjugate divided by it’s squared length. + +GetLength() → float +Return geometric length of this quaternion. + +GetNormalized(eps) → Quatd +length of this quaternion is smaller than eps , return the +identity quaternion. + +Parameters +eps (float) – + +GetReal() → float +Return the real coefficient. + +static GetZero() +classmethod GetZero() -> Quatd +Return the zero quaternion, with real coefficient 0 and an imaginary +coefficients all zero. + +Normalize(eps) → float +Normalizes this quaternion in place to unit length, returning the +length before normalization. +If the length of this quaternion is smaller than eps , this sets +the quaternion to identity. + +Parameters +eps (float) – + +SetImaginary(imaginary) → None +Set the imaginary coefficients. + +Parameters +imaginary (Vec3d) – + +SetImaginary(i, j, k) -> None +Set the imaginary coefficients. + +Parameters + +i (float) – +j (float) – +k (float) – + +SetReal(real) → None +Set the real coefficient. + +Parameters +real (float) – + +Transform(point) → Vec3d +Transform the GfVec3d point. +If the quaternion is normalized, the transformation is a rotation. +Given a GfQuatd q, q.Transform(point) is equivalent to: (q * +GfQuatd(0, point) * q.GetInverse()).GetImaginary() +but is more efficient. + +Parameters +point (Vec3d) – + +property imaginary + +property real + +class pxr.Gf.Quaternion +Quaternion class +Methods: + +GetIdentity +classmethod GetIdentity() -> Quaternion + +GetImaginary() +Returns the imaginary part of the quaternion. + +GetInverse() +Returns the inverse of this quaternion. + +GetLength() +Returns geometric length of this quaternion. + +GetNormalized(eps) +Returns a normalized (unit-length) version of this quaternion. + +GetReal() +Returns the real part of the quaternion. + +GetZero +classmethod GetZero() -> Quaternion + +Normalize(eps) +Normalizes this quaternion in place to unit length, returning the length before normalization. + +Attributes: + +imaginary +None + +real +None + +static GetIdentity() +classmethod GetIdentity() -> Quaternion +Returns the identity quaternion, which has a real part of 1 and an +imaginary part of (0,0,0). + +GetImaginary() → Vec3d +Returns the imaginary part of the quaternion. + +GetInverse() → Quaternion +Returns the inverse of this quaternion. + +GetLength() → float +Returns geometric length of this quaternion. + +GetNormalized(eps) → Quaternion +Returns a normalized (unit-length) version of this quaternion. +direction as this. If the length of this quaternion is smaller than +eps , this returns the identity quaternion. + +Parameters +eps (float) – + +GetReal() → float +Returns the real part of the quaternion. + +static GetZero() +classmethod GetZero() -> Quaternion +Returns the zero quaternion, which has a real part of 0 and an +imaginary part of (0,0,0). + +Normalize(eps) → float +Normalizes this quaternion in place to unit length, returning the +length before normalization. +If the length of this quaternion is smaller than eps , this sets +the quaternion to identity. + +Parameters +eps (float) – + +property imaginary +None +Sets the imaginary part of the quaternion. + +Type +type + +property real +None +Sets the real part of the quaternion. + +Type +type + +class pxr.Gf.Quatf +Methods: + +GetConjugate() +Return this quaternion's conjugate, which is the quaternion with the same real coefficient and negated imaginary coefficients. + +GetIdentity +classmethod GetIdentity() -> Quatf + +GetImaginary() +Return the imaginary coefficient. + +GetInverse() +Return this quaternion's inverse, or reciprocal. + +GetLength() +Return geometric length of this quaternion. + +GetNormalized(eps) +length of this quaternion is smaller than eps , return the identity quaternion. + +GetReal() +Return the real coefficient. + +GetZero +classmethod GetZero() -> Quatf + +Normalize(eps) +Normalizes this quaternion in place to unit length, returning the length before normalization. + +SetImaginary(imaginary) +Set the imaginary coefficients. + +SetReal(real) +Set the real coefficient. + +Transform(point) +Transform the GfVec3f point. + +Attributes: + +imaginary + +real + +GetConjugate() → Quatf +Return this quaternion’s conjugate, which is the quaternion with the +same real coefficient and negated imaginary coefficients. + +static GetIdentity() +classmethod GetIdentity() -> Quatf +Return the identity quaternion, with real coefficient 1 and an +imaginary coefficients all zero. + +GetImaginary() → Vec3f +Return the imaginary coefficient. + +GetInverse() → Quatf +Return this quaternion’s inverse, or reciprocal. +This is the quaternion’s conjugate divided by it’s squared length. + +GetLength() → float +Return geometric length of this quaternion. + +GetNormalized(eps) → Quatf +length of this quaternion is smaller than eps , return the +identity quaternion. + +Parameters +eps (float) – + +GetReal() → float +Return the real coefficient. + +static GetZero() +classmethod GetZero() -> Quatf +Return the zero quaternion, with real coefficient 0 and an imaginary +coefficients all zero. + +Normalize(eps) → float +Normalizes this quaternion in place to unit length, returning the +length before normalization. +If the length of this quaternion is smaller than eps , this sets +the quaternion to identity. + +Parameters +eps (float) – + +SetImaginary(imaginary) → None +Set the imaginary coefficients. + +Parameters +imaginary (Vec3f) – + +SetImaginary(i, j, k) -> None +Set the imaginary coefficients. + +Parameters + +i (float) – +j (float) – +k (float) – + +SetReal(real) → None +Set the real coefficient. + +Parameters +real (float) – + +Transform(point) → Vec3f +Transform the GfVec3f point. +If the quaternion is normalized, the transformation is a rotation. +Given a GfQuatf q, q.Transform(point) is equivalent to: (q * +GfQuatf(0, point) * q.GetInverse()).GetImaginary() +but is more efficient. + +Parameters +point (Vec3f) – + +property imaginary + +property real + +class pxr.Gf.Quath +Methods: + +GetConjugate() +Return this quaternion's conjugate, which is the quaternion with the same real coefficient and negated imaginary coefficients. + +GetIdentity +classmethod GetIdentity() -> Quath + +GetImaginary() +Return the imaginary coefficient. + +GetInverse() +Return this quaternion's inverse, or reciprocal. + +GetLength() +Return geometric length of this quaternion. + +GetNormalized(eps) +length of this quaternion is smaller than eps , return the identity quaternion. + +GetReal() +Return the real coefficient. + +GetZero +classmethod GetZero() -> Quath + +Normalize(eps) +Normalizes this quaternion in place to unit length, returning the length before normalization. + +SetImaginary(imaginary) +Set the imaginary coefficients. + +SetReal(real) +Set the real coefficient. + +Transform(point) +Transform the GfVec3h point. + +Attributes: + +imaginary + +real + +GetConjugate() → Quath +Return this quaternion’s conjugate, which is the quaternion with the +same real coefficient and negated imaginary coefficients. + +static GetIdentity() +classmethod GetIdentity() -> Quath +Return the identity quaternion, with real coefficient 1 and an +imaginary coefficients all zero. + +GetImaginary() → Vec3h +Return the imaginary coefficient. + +GetInverse() → Quath +Return this quaternion’s inverse, or reciprocal. +This is the quaternion’s conjugate divided by it’s squared length. + +GetLength() → GfHalf +Return geometric length of this quaternion. + +GetNormalized(eps) → Quath +length of this quaternion is smaller than eps , return the +identity quaternion. + +Parameters +eps (GfHalf) – + +GetReal() → GfHalf +Return the real coefficient. + +static GetZero() +classmethod GetZero() -> Quath +Return the zero quaternion, with real coefficient 0 and an imaginary +coefficients all zero. + +Normalize(eps) → GfHalf +Normalizes this quaternion in place to unit length, returning the +length before normalization. +If the length of this quaternion is smaller than eps , this sets +the quaternion to identity. + +Parameters +eps (GfHalf) – + +SetImaginary(imaginary) → None +Set the imaginary coefficients. + +Parameters +imaginary (Vec3h) – + +SetImaginary(i, j, k) -> None +Set the imaginary coefficients. + +Parameters + +i (GfHalf) – +j (GfHalf) – +k (GfHalf) – + +SetReal(real) → None +Set the real coefficient. + +Parameters +real (GfHalf) – + +Transform(point) → Vec3h +Transform the GfVec3h point. +If the quaternion is normalized, the transformation is a rotation. +Given a GfQuath q, q.Transform(point) is equivalent to: (q * +GfQuath(0, point) * q.GetInverse()).GetImaginary() +but is more efficient. + +Parameters +point (Vec3h) – + +property imaginary + +property real + +class pxr.Gf.Range1d +Methods: + +Contains(point) +Returns true if the point is located inside the range. + +GetDistanceSquared(p) +Compute the squared distance from a point to the range. + +GetIntersection +classmethod GetIntersection(a, b) -> Range1d + +GetMax() +Returns the maximum value of the range. + +GetMidpoint() +Returns the midpoint of the range, that is, 0.5*(min+max). + +GetMin() +Returns the minimum value of the range. + +GetSize() +Returns the size of the range. + +GetUnion +classmethod GetUnion(a, b) -> Range1d + +IntersectWith(b) +Modifies this range to hold its intersection with b and returns the result. + +IsEmpty() +Returns whether the range is empty (max bool +Returns true if the range is located entirely inside the range. +As with all operations of this type, the ranges are assumed to include +their extrema. + +Parameters +range (Range1d) – + +GetDistanceSquared(p) → float +Compute the squared distance from a point to the range. + +Parameters +p (float) – + +static GetIntersection() +classmethod GetIntersection(a, b) -> Range1d +Returns a GfRange1d that describes the intersection of a and +b . + +Parameters + +a (Range1d) – +b (Range1d) – + +GetMax() → float +Returns the maximum value of the range. + +GetMidpoint() → float +Returns the midpoint of the range, that is, 0.5*(min+max). +Note: this returns zero in the case of default-constructed ranges, or +ranges set via SetEmpty() . + +GetMin() → float +Returns the minimum value of the range. + +GetSize() → float +Returns the size of the range. + +static GetUnion() +classmethod GetUnion(a, b) -> Range1d +Returns the smallest GfRange1d which contains both a and b +. + +Parameters + +a (Range1d) – +b (Range1d) – + +IntersectWith(b) → Range1d +Modifies this range to hold its intersection with b and returns +the result. + +Parameters +b (Range1d) – + +IsEmpty() → bool +Returns whether the range is empty (max Range1d +Extend this to include b . + +Parameters +b (float) – + +dimension = 1 + +property max + +property min + +class pxr.Gf.Range1f +Methods: + +Contains(point) +Returns true if the point is located inside the range. + +GetDistanceSquared(p) +Compute the squared distance from a point to the range. + +GetIntersection +classmethod GetIntersection(a, b) -> Range1f + +GetMax() +Returns the maximum value of the range. + +GetMidpoint() +Returns the midpoint of the range, that is, 0.5*(min+max). + +GetMin() +Returns the minimum value of the range. + +GetSize() +Returns the size of the range. + +GetUnion +classmethod GetUnion(a, b) -> Range1f + +IntersectWith(b) +Modifies this range to hold its intersection with b and returns the result. + +IsEmpty() +Returns whether the range is empty (max bool +Returns true if the range is located entirely inside the range. +As with all operations of this type, the ranges are assumed to include +their extrema. + +Parameters +range (Range1f) – + +GetDistanceSquared(p) → float +Compute the squared distance from a point to the range. + +Parameters +p (float) – + +static GetIntersection() +classmethod GetIntersection(a, b) -> Range1f +Returns a GfRange1f that describes the intersection of a and +b . + +Parameters + +a (Range1f) – +b (Range1f) – + +GetMax() → float +Returns the maximum value of the range. + +GetMidpoint() → float +Returns the midpoint of the range, that is, 0.5*(min+max). +Note: this returns zero in the case of default-constructed ranges, or +ranges set via SetEmpty() . + +GetMin() → float +Returns the minimum value of the range. + +GetSize() → float +Returns the size of the range. + +static GetUnion() +classmethod GetUnion(a, b) -> Range1f +Returns the smallest GfRange1f which contains both a and b +. + +Parameters + +a (Range1f) – +b (Range1f) – + +IntersectWith(b) → Range1f +Modifies this range to hold its intersection with b and returns +the result. + +Parameters +b (Range1f) – + +IsEmpty() → bool +Returns whether the range is empty (max Range1f +Extend this to include b . + +Parameters +b (float) – + +dimension = 1 + +property max + +property min + +class pxr.Gf.Range2d +Methods: + +Contains(point) +Returns true if the point is located inside the range. + +GetCorner(i) +Returns the ith corner of the range, in the following order: SW, SE, NW, NE. + +GetDistanceSquared(p) +Compute the squared distance from a point to the range. + +GetIntersection +classmethod GetIntersection(a, b) -> Range2d + +GetMax() +Returns the maximum value of the range. + +GetMidpoint() +Returns the midpoint of the range, that is, 0.5*(min+max). + +GetMin() +Returns the minimum value of the range. + +GetQuadrant(i) +Returns the ith quadrant of the range, in the following order: SW, SE, NW, NE. + +GetSize() +Returns the size of the range. + +GetUnion +classmethod GetUnion(a, b) -> Range2d + +IntersectWith(b) +Modifies this range to hold its intersection with b and returns the result. + +IsEmpty() +Returns whether the range is empty (max bool +Returns true if the range is located entirely inside the range. +As with all operations of this type, the ranges are assumed to include +their extrema. + +Parameters +range (Range2d) – + +GetCorner(i) → Vec2d +Returns the ith corner of the range, in the following order: SW, SE, +NW, NE. + +Parameters +i (int) – + +GetDistanceSquared(p) → float +Compute the squared distance from a point to the range. + +Parameters +p (Vec2d) – + +static GetIntersection() +classmethod GetIntersection(a, b) -> Range2d +Returns a GfRange2d that describes the intersection of a and +b . + +Parameters + +a (Range2d) – +b (Range2d) – + +GetMax() → Vec2d +Returns the maximum value of the range. + +GetMidpoint() → Vec2d +Returns the midpoint of the range, that is, 0.5*(min+max). +Note: this returns zero in the case of default-constructed ranges, or +ranges set via SetEmpty() . + +GetMin() → Vec2d +Returns the minimum value of the range. + +GetQuadrant(i) → Range2d +Returns the ith quadrant of the range, in the following order: SW, SE, +NW, NE. + +Parameters +i (int) – + +GetSize() → Vec2d +Returns the size of the range. + +static GetUnion() +classmethod GetUnion(a, b) -> Range2d +Returns the smallest GfRange2d which contains both a and b +. + +Parameters + +a (Range2d) – +b (Range2d) – + +IntersectWith(b) → Range2d +Modifies this range to hold its intersection with b and returns +the result. + +Parameters +b (Range2d) – + +IsEmpty() → bool +Returns whether the range is empty (max Range2d +Extend this to include b . + +Parameters +b (Vec2d) – + +dimension = 2 + +property max + +property min + +unitSquare = Gf.Range2d(Gf.Vec2d(0.0, 0.0), Gf.Vec2d(1.0, 1.0)) + +class pxr.Gf.Range2f +Methods: + +Contains(point) +Returns true if the point is located inside the range. + +GetCorner(i) +Returns the ith corner of the range, in the following order: SW, SE, NW, NE. + +GetDistanceSquared(p) +Compute the squared distance from a point to the range. + +GetIntersection +classmethod GetIntersection(a, b) -> Range2f + +GetMax() +Returns the maximum value of the range. + +GetMidpoint() +Returns the midpoint of the range, that is, 0.5*(min+max). + +GetMin() +Returns the minimum value of the range. + +GetQuadrant(i) +Returns the ith quadrant of the range, in the following order: SW, SE, NW, NE. + +GetSize() +Returns the size of the range. + +GetUnion +classmethod GetUnion(a, b) -> Range2f + +IntersectWith(b) +Modifies this range to hold its intersection with b and returns the result. + +IsEmpty() +Returns whether the range is empty (max bool +Returns true if the range is located entirely inside the range. +As with all operations of this type, the ranges are assumed to include +their extrema. + +Parameters +range (Range2f) – + +GetCorner(i) → Vec2f +Returns the ith corner of the range, in the following order: SW, SE, +NW, NE. + +Parameters +i (int) – + +GetDistanceSquared(p) → float +Compute the squared distance from a point to the range. + +Parameters +p (Vec2f) – + +static GetIntersection() +classmethod GetIntersection(a, b) -> Range2f +Returns a GfRange2f that describes the intersection of a and +b . + +Parameters + +a (Range2f) – +b (Range2f) – + +GetMax() → Vec2f +Returns the maximum value of the range. + +GetMidpoint() → Vec2f +Returns the midpoint of the range, that is, 0.5*(min+max). +Note: this returns zero in the case of default-constructed ranges, or +ranges set via SetEmpty() . + +GetMin() → Vec2f +Returns the minimum value of the range. + +GetQuadrant(i) → Range2f +Returns the ith quadrant of the range, in the following order: SW, SE, +NW, NE. + +Parameters +i (int) – + +GetSize() → Vec2f +Returns the size of the range. + +static GetUnion() +classmethod GetUnion(a, b) -> Range2f +Returns the smallest GfRange2f which contains both a and b +. + +Parameters + +a (Range2f) – +b (Range2f) – + +IntersectWith(b) → Range2f +Modifies this range to hold its intersection with b and returns +the result. + +Parameters +b (Range2f) – + +IsEmpty() → bool +Returns whether the range is empty (max Range2f +Extend this to include b . + +Parameters +b (Vec2f) – + +dimension = 2 + +property max + +property min + +unitSquare = Gf.Range2f(Gf.Vec2f(0.0, 0.0), Gf.Vec2f(1.0, 1.0)) + +class pxr.Gf.Range3d +Methods: + +Contains(point) +Returns true if the point is located inside the range. + +GetCorner(i) +Returns the ith corner of the range, in the following order: LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF. + +GetDistanceSquared(p) +Compute the squared distance from a point to the range. + +GetIntersection +classmethod GetIntersection(a, b) -> Range3d + +GetMax() +Returns the maximum value of the range. + +GetMidpoint() +Returns the midpoint of the range, that is, 0.5*(min+max). + +GetMin() +Returns the minimum value of the range. + +GetOctant(i) +Returns the ith octant of the range, in the following order: LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF. + +GetSize() +Returns the size of the range. + +GetUnion +classmethod GetUnion(a, b) -> Range3d + +IntersectWith(b) +Modifies this range to hold its intersection with b and returns the result. + +IsEmpty() +Returns whether the range is empty (max bool +Returns true if the range is located entirely inside the range. +As with all operations of this type, the ranges are assumed to include +their extrema. + +Parameters +range (Range3d) – + +GetCorner(i) → Vec3d +Returns the ith corner of the range, in the following order: LDB, RDB, +LUB, RUB, LDF, RDF, LUF, RUF. +Where L/R is left/right, D/U is down/up, and B/F is back/front. + +Parameters +i (int) – + +GetDistanceSquared(p) → float +Compute the squared distance from a point to the range. + +Parameters +p (Vec3d) – + +static GetIntersection() +classmethod GetIntersection(a, b) -> Range3d +Returns a GfRange3d that describes the intersection of a and +b . + +Parameters + +a (Range3d) – +b (Range3d) – + +GetMax() → Vec3d +Returns the maximum value of the range. + +GetMidpoint() → Vec3d +Returns the midpoint of the range, that is, 0.5*(min+max). +Note: this returns zero in the case of default-constructed ranges, or +ranges set via SetEmpty() . + +GetMin() → Vec3d +Returns the minimum value of the range. + +GetOctant(i) → Range3d +Returns the ith octant of the range, in the following order: LDB, RDB, +LUB, RUB, LDF, RDF, LUF, RUF. +Where L/R is left/right, D/U is down/up, and B/F is back/front. + +Parameters +i (int) – + +GetSize() → Vec3d +Returns the size of the range. + +static GetUnion() +classmethod GetUnion(a, b) -> Range3d +Returns the smallest GfRange3d which contains both a and b +. + +Parameters + +a (Range3d) – +b (Range3d) – + +IntersectWith(b) → Range3d +Modifies this range to hold its intersection with b and returns +the result. + +Parameters +b (Range3d) – + +IsEmpty() → bool +Returns whether the range is empty (max Range3d +Extend this to include b . + +Parameters +b (Vec3d) – + +dimension = 3 + +property max + +property min + +unitCube = Gf.Range3d(Gf.Vec3d(0.0, 0.0, 0.0), Gf.Vec3d(1.0, 1.0, 1.0)) + +class pxr.Gf.Range3f +Methods: + +Contains(point) +Returns true if the point is located inside the range. + +GetCorner(i) +Returns the ith corner of the range, in the following order: LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF. + +GetDistanceSquared(p) +Compute the squared distance from a point to the range. + +GetIntersection +classmethod GetIntersection(a, b) -> Range3f + +GetMax() +Returns the maximum value of the range. + +GetMidpoint() +Returns the midpoint of the range, that is, 0.5*(min+max). + +GetMin() +Returns the minimum value of the range. + +GetOctant(i) +Returns the ith octant of the range, in the following order: LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF. + +GetSize() +Returns the size of the range. + +GetUnion +classmethod GetUnion(a, b) -> Range3f + +IntersectWith(b) +Modifies this range to hold its intersection with b and returns the result. + +IsEmpty() +Returns whether the range is empty (max bool +Returns true if the range is located entirely inside the range. +As with all operations of this type, the ranges are assumed to include +their extrema. + +Parameters +range (Range3f) – + +GetCorner(i) → Vec3f +Returns the ith corner of the range, in the following order: LDB, RDB, +LUB, RUB, LDF, RDF, LUF, RUF. +Where L/R is left/right, D/U is down/up, and B/F is back/front. + +Parameters +i (int) – + +GetDistanceSquared(p) → float +Compute the squared distance from a point to the range. + +Parameters +p (Vec3f) – + +static GetIntersection() +classmethod GetIntersection(a, b) -> Range3f +Returns a GfRange3f that describes the intersection of a and +b . + +Parameters + +a (Range3f) – +b (Range3f) – + +GetMax() → Vec3f +Returns the maximum value of the range. + +GetMidpoint() → Vec3f +Returns the midpoint of the range, that is, 0.5*(min+max). +Note: this returns zero in the case of default-constructed ranges, or +ranges set via SetEmpty() . + +GetMin() → Vec3f +Returns the minimum value of the range. + +GetOctant(i) → Range3f +Returns the ith octant of the range, in the following order: LDB, RDB, +LUB, RUB, LDF, RDF, LUF, RUF. +Where L/R is left/right, D/U is down/up, and B/F is back/front. + +Parameters +i (int) – + +GetSize() → Vec3f +Returns the size of the range. + +static GetUnion() +classmethod GetUnion(a, b) -> Range3f +Returns the smallest GfRange3f which contains both a and b +. + +Parameters + +a (Range3f) – +b (Range3f) – + +IntersectWith(b) → Range3f +Modifies this range to hold its intersection with b and returns +the result. + +Parameters +b (Range3f) – + +IsEmpty() → bool +Returns whether the range is empty (max Range3f +Extend this to include b . + +Parameters +b (Vec3f) – + +dimension = 3 + +property max + +property min + +unitCube = Gf.Range3f(Gf.Vec3f(0.0, 0.0, 0.0), Gf.Vec3f(1.0, 1.0, 1.0)) + +class pxr.Gf.Ray +Methods: + +FindClosestPoint(point, rayDistance) +Returns the point on the ray that is closest to point . + +GetPoint(distance) +Returns the point that is distance units from the starting point along the direction vector, expressed in parametic distance. + +Intersect(p0, p1, p2) +float, barycentric = GfVec3d, frontFacing = bool> + +SetEnds(startPoint, endPoint) +Sets the ray by specifying a starting point and an ending point. + +SetPointAndDirection(startPoint, direction) +Sets the ray by specifying a starting point and a direction. + +Transform(matrix) +Transforms the ray by the given matrix. + +Attributes: + +direction +Vec3d + +startPoint +Vec3d + +FindClosestPoint(point, rayDistance) → Vec3d +Returns the point on the ray that is closest to point . +If rayDistance is not None , it will be set to the parametric +distance along the ray of the closest point. + +Parameters + +point (Vec3d) – +rayDistance (float) – + +GetPoint(distance) → Vec3d +Returns the point that is distance units from the starting point +along the direction vector, expressed in parametic distance. + +Parameters +distance (float) – + +Intersect(p0, p1, p2) → tuple +Intersects the ray with the triangle formed by points p0, +p1, and p2. The first item in the tuple is true if the ray +intersects the triangle. dist is the the parametric +distance to the intersection point, the barycentric +coordinates of the intersection point, and the front-facing +flag. The barycentric coordinates are defined with respect +to the three vertices taken in order. The front-facing +flag is True if the intersection hit the side of the +triangle that is formed when the vertices are ordered +counter-clockwise (right-hand rule). +Barycentric coordinates are defined to sum to 1 and satisfy +this relationsip: + +intersectionPoint = (barycentricCoords[0] * p0 +barycentricCoords[1] * p1 + +barycentricCoords[2] * p2); + +Intersect( plane ) -> tuple +Intersects the ray with the Gf.Plane. The first item in +the returned tuple is true if the ray intersects the plane. +dist is the parametric distance to the intersection point +and frontfacing is true if the intersection is on the side +of the plane toward which the plane’s normal points. +———————————————————————- +Intersect( range3d ) -> tuple +Intersects the plane with an axis-aligned box in a +Gf.Range3d. intersects is true if the ray intersects it at +all within bounds. If there is an intersection then enterDist +and exitDist will be the parametric distances to the two +intersection points. +———————————————————————- +Intersect( bbox3d ) -> tuple +Intersects the plane with an oriented box in a Gf.BBox3d. +intersects is true if the ray intersects it at all within +bounds. If there is an intersection then enterDist and +exitDist will be the parametric distances to the two +intersection points. +———————————————————————- +Intersect( center, radius ) -> tuple +Intersects the plane with an sphere. intersects is true if +the ray intersects it at all within the sphere. If there is +an intersection then enterDist and exitDist will be the +parametric distances to the two intersection points. +———————————————————————- +Intersect( origin, axis, radius ) -> tuple +Intersects the plane with an infinite cylinder. intersects +is true if the ray intersects it at all within the +sphere. If there is an intersection then enterDist and +exitDist will be the parametric distances to the two +intersection points. +———————————————————————- +Intersect( origin, axis, radius, height ) -> +tuple +Intersects the plane with an cylinder. intersects +is true if the ray intersects it at all within the +sphere. If there is an intersection then enterDist and +exitDist will be the parametric distances to the two +intersection points. +———————————————————————- + +SetEnds(startPoint, endPoint) → None +Sets the ray by specifying a starting point and an ending point. + +Parameters + +startPoint (Vec3d) – +endPoint (Vec3d) – + +SetPointAndDirection(startPoint, direction) → None +Sets the ray by specifying a starting point and a direction. + +Parameters + +startPoint (Vec3d) – +direction (Vec3d) – + +Transform(matrix) → Ray +Transforms the ray by the given matrix. + +Parameters +matrix (Matrix4d) – + +property direction +Vec3d +Returns the direction vector of the segment. +This is not guaranteed to be unit length. + +Type +type + +property startPoint +Vec3d +Returns the starting point of the segment. + +Type +type + +class pxr.Gf.Rect2i +Methods: + +Contains(p) +Returns true if the specified point in the rectangle. + +GetArea() +Return the area of the rectangle. + +GetCenter() +Returns the center point of the rectangle. + +GetHeight() +Returns the height of the rectangle. + +GetIntersection(that) +Computes the intersection of two rectangles. + +GetMax() +Returns the max corner of the rectangle. + +GetMaxX() +Return the X value of the max corner. + +GetMaxY() +Return the Y value of the max corner. + +GetMin() +Returns the min corner of the rectangle. + +GetMinX() +Return the X value of min corner. + +GetMinY() +Return the Y value of the min corner. + +GetNormalized() +Returns a normalized rectangle, i.e. + +GetSize() +Returns the size of the rectangle as a vector (width,height). + +GetUnion(that) +Computes the union of two rectangles. + +GetWidth() +Returns the width of the rectangle. + +IsEmpty() +Returns true if the rectangle is empty. + +IsNull() +Returns true if the rectangle is a null rectangle. + +IsValid() +Return true if the rectangle is valid (equivalently, not empty). + +SetMax(max) +Sets the max corner of the rectangle. + +SetMaxX(x) +Set the X value of the max corner. + +SetMaxY(y) +Set the Y value of the max corner. + +SetMin(min) +Sets the min corner of the rectangle. + +SetMinX(x) +Set the X value of the min corner. + +SetMinY(y) +Set the Y value of the min corner. + +Translate(displacement) +Move the rectangle by displ . + +Attributes: + +max + +maxX + +maxY + +min + +minX + +minY + +Contains(p) → bool +Returns true if the specified point in the rectangle. + +Parameters +p (Vec2i) – + +GetArea() → int +Return the area of the rectangle. + +GetCenter() → Vec2i +Returns the center point of the rectangle. + +GetHeight() → int +Returns the height of the rectangle. +If the min and max y-coordinates are coincident, the height is one. + +GetIntersection(that) → Rect2i +Computes the intersection of two rectangles. + +Parameters +that (Rect2i) – + +GetMax() → Vec2i +Returns the max corner of the rectangle. + +GetMaxX() → int +Return the X value of the max corner. + +GetMaxY() → int +Return the Y value of the max corner. + +GetMin() → Vec2i +Returns the min corner of the rectangle. + +GetMinX() → int +Return the X value of min corner. + +GetMinY() → int +Return the Y value of the min corner. + +GetNormalized() → Rect2i +Returns a normalized rectangle, i.e. +one that has a non-negative width and height. +GetNormalized() swaps the min and max x-coordinates to ensure a +non-negative width, and similarly for the y-coordinates. + +GetSize() → Vec2i +Returns the size of the rectangle as a vector (width,height). + +GetUnion(that) → Rect2i +Computes the union of two rectangles. + +Parameters +that (Rect2i) – + +GetWidth() → int +Returns the width of the rectangle. +If the min and max x-coordinates are coincident, the width is one. + +IsEmpty() → bool +Returns true if the rectangle is empty. +An empty rectangle has one or both of its min coordinates strictly +greater than the corresponding max coordinate. +An empty rectangle is not valid. + +IsNull() → bool +Returns true if the rectangle is a null rectangle. +A null rectangle has both the width and the height set to 0, that is + GetMaxX() == GetMinX() - 1 + +and + + GetMaxY() == GetMinY() - 1 + +Remember that if ``GetMinX()`` and ``GetMaxX()`` return the same + +value then the rectangle has width 1, and similarly for the height. +A null rectangle is both empty, and not valid. + +IsValid() → bool +Return true if the rectangle is valid (equivalently, not empty). + +SetMax(max) → None +Sets the max corner of the rectangle. + +Parameters +max (Vec2i) – + +SetMaxX(x) → None +Set the X value of the max corner. + +Parameters +x (int) – + +SetMaxY(y) → None +Set the Y value of the max corner. + +Parameters +y (int) – + +SetMin(min) → None +Sets the min corner of the rectangle. + +Parameters +min (Vec2i) – + +SetMinX(x) → None +Set the X value of the min corner. + +Parameters +x (int) – + +SetMinY(y) → None +Set the Y value of the min corner. + +Parameters +y (int) – + +Translate(displacement) → None +Move the rectangle by displ . + +Parameters +displacement (Vec2i) – + +property max + +property maxX + +property maxY + +property min + +property minX + +property minY + +class pxr.Gf.Rotation +3-space rotation +Methods: + +Decompose(axis0, axis1, axis2) +Decompose rotation about 3 orthogonal axes. + +DecomposeRotation +classmethod DecomposeRotation(rot, TwAxis, FBAxis, LRAxis, handedness, thetaTw, thetaFB, thetaLR, thetaSw, useHint, swShift) -> None + +DecomposeRotation3 + +GetAngle() +Returns the rotation angle in degrees. + +GetAxis() +Returns the axis of rotation. + +GetInverse() +Returns the inverse of this rotation. + +GetQuat() +Returns the rotation expressed as a quaternion. + +GetQuaternion() +Returns the rotation expressed as a quaternion. + +MatchClosestEulerRotation +classmethod MatchClosestEulerRotation(targetTw, targetFB, targetLR, targetSw, thetaTw, thetaFB, thetaLR, thetaSw) -> None + +RotateOntoProjected +classmethod RotateOntoProjected(v1, v2, axis) -> Rotation + +SetAxisAngle(axis, angle) +Sets the rotation to be angle degrees about axis . + +SetIdentity() +Sets the rotation to an identity rotation. + +SetQuat(quat) +Sets the rotation from a quaternion. + +SetQuaternion(quat) +Sets the rotation from a quaternion. + +SetRotateInto(rotateFrom, rotateTo) +Sets the rotation to one that brings the rotateFrom vector to align with rotateTo . + +TransformDir(vec) +Transforms row vector vec by the rotation, returning the result. + +Attributes: + +angle + +axis + +Decompose(axis0, axis1, axis2) → Vec3d +Decompose rotation about 3 orthogonal axes. +If the axes are not orthogonal, warnings will be spewed. + +Parameters + +axis0 (Vec3d) – +axis1 (Vec3d) – +axis2 (Vec3d) – + +static DecomposeRotation() +classmethod DecomposeRotation(rot, TwAxis, FBAxis, LRAxis, handedness, thetaTw, thetaFB, thetaLR, thetaSw, useHint, swShift) -> None + +Parameters + +rot (Matrix4d) – +TwAxis (Vec3d) – +FBAxis (Vec3d) – +LRAxis (Vec3d) – +handedness (float) – +thetaTw (float) – +thetaFB (float) – +thetaLR (float) – +thetaSw (float) – +useHint (bool) – +swShift (float) – + +static DecomposeRotation3() + +GetAngle() → float +Returns the rotation angle in degrees. + +GetAxis() → Vec3d +Returns the axis of rotation. + +GetInverse() → Rotation +Returns the inverse of this rotation. + +GetQuat() → Quatd +Returns the rotation expressed as a quaternion. + +GetQuaternion() → Quaternion +Returns the rotation expressed as a quaternion. + +static MatchClosestEulerRotation() +classmethod MatchClosestEulerRotation(targetTw, targetFB, targetLR, targetSw, thetaTw, thetaFB, thetaLR, thetaSw) -> None +Replace the hint angles with the closest rotation of the given +rotation to the hint. +Each angle in the rotation will be within Pi of the corresponding hint +angle and the sum of the differences with the hint will be minimized. +If a given rotation value is null then that angle will be treated as +0.0 and ignored in the calculations. +All angles are in radians. The rotation order is Tw/FB/LR/Sw. + +Parameters + +targetTw (float) – +targetFB (float) – +targetLR (float) – +targetSw (float) – +thetaTw (float) – +thetaFB (float) – +thetaLR (float) – +thetaSw (float) – + +static RotateOntoProjected() +classmethod RotateOntoProjected(v1, v2, axis) -> Rotation + +Parameters + +v1 (Vec3d) – +v2 (Vec3d) – +axis (Vec3d) – + +SetAxisAngle(axis, angle) → Rotation +Sets the rotation to be angle degrees about axis . + +Parameters + +axis (Vec3d) – +angle (float) – + +SetIdentity() → Rotation +Sets the rotation to an identity rotation. +(This is chosen to be 0 degrees around the positive X axis.) + +SetQuat(quat) → Rotation +Sets the rotation from a quaternion. +Note that this method accepts GfQuatf and GfQuath since they +implicitly convert to GfQuatd. + +Parameters +quat (Quatd) – + +SetQuaternion(quat) → Rotation +Sets the rotation from a quaternion. + +Parameters +quat (Quaternion) – + +SetRotateInto(rotateFrom, rotateTo) → Rotation +Sets the rotation to one that brings the rotateFrom vector to +align with rotateTo . +The passed vectors need not be unit length. + +Parameters + +rotateFrom (Vec3d) – +rotateTo (Vec3d) – + +TransformDir(vec) → Vec3f +Transforms row vector vec by the rotation, returning the result. + +Parameters +vec (Vec3f) – + +TransformDir(vec) -> Vec3d +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +vec (Vec3d) – + +property angle + +property axis + +class pxr.Gf.Size2 +A 2D size class +Methods: + +Set(v) +Set to the values in a given array. + +Attributes: + +dimension + +Set(v) → Size2 +Set to the values in a given array. + +Parameters +v (int) – + +Set(v0, v1) -> Size2 +Set to values passed directly. + +Parameters + +v0 (int) – +v1 (int) – + +dimension = 2 + +class pxr.Gf.Size3 +A 3D size class +Methods: + +Set(v) +Set to the values in v . + +Attributes: + +dimension + +Set(v) → Size3 +Set to the values in v . + +Parameters +v (int) – + +Set(v0, v1, v2) -> Size3 +Set to values passed directly. + +Parameters + +v0 (int) – +v1 (int) – +v2 (int) – + +dimension = 3 + +class pxr.Gf.Transform +Methods: + +GetMatrix() +Returns a GfMatrix4d that implements the cumulative transformation. + +GetPivotOrientation() +Returns the pivot orientation component. + +GetPivotPosition() +Returns the pivot position component. + +GetRotation() +Returns the rotation component. + +GetScale() +Returns the scale component. + +GetTranslation() +Returns the translation component. + +Set +Set method used by old 2x code. + +SetIdentity() +Sets the transformation to the identity transformation. + +SetMatrix(m) +Sets the transform components to implement the transformation represented by matrix m , ignoring any projection. + +SetPivotOrientation(pivotOrient) +Sets the pivot orientation component, leaving all others untouched. + +SetPivotPosition(pivPos) +Sets the pivot position component, leaving all others untouched. + +SetRotation(rotation) +Sets the rotation component, leaving all others untouched. + +SetScale(scale) +Sets the scale component, leaving all others untouched. + +SetTranslation(translation) +Sets the translation component, leaving all others untouched. + +Attributes: + +pivotOrientation + +pivotPosition + +rotation + +scale + +translation + +GetMatrix() → Matrix4d +Returns a GfMatrix4d that implements the cumulative +transformation. + +GetPivotOrientation() → Rotation +Returns the pivot orientation component. + +GetPivotPosition() → Vec3d +Returns the pivot position component. + +GetRotation() → Rotation +Returns the rotation component. + +GetScale() → Vec3d +Returns the scale component. + +GetTranslation() → Vec3d +Returns the translation component. + +Set() +Set method used by old 2x code. (Deprecated) + +SetIdentity() → Transform +Sets the transformation to the identity transformation. + +SetMatrix(m) → Transform +Sets the transform components to implement the transformation +represented by matrix m , ignoring any projection. +This tries to leave the current center unchanged. + +Parameters +m (Matrix4d) – + +SetPivotOrientation(pivotOrient) → None +Sets the pivot orientation component, leaving all others untouched. + +Parameters +pivotOrient (Rotation) – + +SetPivotPosition(pivPos) → None +Sets the pivot position component, leaving all others untouched. + +Parameters +pivPos (Vec3d) – + +SetRotation(rotation) → None +Sets the rotation component, leaving all others untouched. + +Parameters +rotation (Rotation) – + +SetScale(scale) → None +Sets the scale component, leaving all others untouched. + +Parameters +scale (Vec3d) – + +SetTranslation(translation) → None +Sets the translation component, leaving all others untouched. + +Parameters +translation (Vec3d) – + +property pivotOrientation + +property pivotPosition + +property rotation + +property scale + +property translation + +class pxr.Gf.Vec2d +Methods: + +Axis +classmethod Axis(i) -> Vec2d + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +XAxis +classmethod XAxis() -> Vec2d + +YAxis +classmethod YAxis() -> Vec2d + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec2d +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 2. + +Parameters +i (int) – + +GetComplement(b) → Vec2d +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec2d) – + +GetDot() + +GetLength() → float +Length. + +GetNormalized(eps) → Vec2d + +Parameters +eps (float) – + +GetProjection(v) → Vec2d +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec2d) – + +Normalize(eps) → float +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (float) – + +static XAxis() +classmethod XAxis() -> Vec2d +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec2d +Create a unit vector along the Y-axis. + +dimension = 2 + +class pxr.Gf.Vec2f +Methods: + +Axis +classmethod Axis(i) -> Vec2f + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +XAxis +classmethod XAxis() -> Vec2f + +YAxis +classmethod YAxis() -> Vec2f + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec2f +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 2. + +Parameters +i (int) – + +GetComplement(b) → Vec2f +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec2f) – + +GetDot() + +GetLength() → float +Length. + +GetNormalized(eps) → Vec2f + +Parameters +eps (float) – + +GetProjection(v) → Vec2f +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec2f) – + +Normalize(eps) → float +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (float) – + +static XAxis() +classmethod XAxis() -> Vec2f +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec2f +Create a unit vector along the Y-axis. + +dimension = 2 + +class pxr.Gf.Vec2h +Methods: + +Axis +classmethod Axis(i) -> Vec2h + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +XAxis +classmethod XAxis() -> Vec2h + +YAxis +classmethod YAxis() -> Vec2h + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec2h +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 2. + +Parameters +i (int) – + +GetComplement(b) → Vec2h +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec2h) – + +GetDot() + +GetLength() → GfHalf +Length. + +GetNormalized(eps) → Vec2h + +Parameters +eps (GfHalf) – + +GetProjection(v) → Vec2h +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec2h) – + +Normalize(eps) → GfHalf +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (GfHalf) – + +static XAxis() +classmethod XAxis() -> Vec2h +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec2h +Create a unit vector along the Y-axis. + +dimension = 2 + +class pxr.Gf.Vec2i +Methods: + +Axis +classmethod Axis(i) -> Vec2i + +GetDot + +XAxis +classmethod XAxis() -> Vec2i + +YAxis +classmethod YAxis() -> Vec2i + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec2i +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 2. + +Parameters +i (int) – + +GetDot() + +static XAxis() +classmethod XAxis() -> Vec2i +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec2i +Create a unit vector along the Y-axis. + +dimension = 2 + +class pxr.Gf.Vec3d +Methods: + +Axis +classmethod Axis(i) -> Vec3d + +BuildOrthonormalFrame(v1, v2, eps) +Sets v1 and v2 to unit vectors such that v1, v2 and *this are mutually orthogonal. + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetCross + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +OrthogonalizeBasis +classmethod OrthogonalizeBasis(tx, ty, tz, normalize, eps) -> bool + +XAxis +classmethod XAxis() -> Vec3d + +YAxis +classmethod YAxis() -> Vec3d + +ZAxis +classmethod ZAxis() -> Vec3d + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec3d +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 3. + +Parameters +i (int) – + +BuildOrthonormalFrame(v1, v2, eps) → None +Sets v1 and v2 to unit vectors such that v1, v2 and *this +are mutually orthogonal. +If the length L of *this is smaller than eps , then v1 and v2 +will have magnitude L/eps. As a result, the function delivers a +continuous result as *this shrinks in length. + +Parameters + +v1 (Vec3d) – +v2 (Vec3d) – +eps (float) – + +GetComplement(b) → Vec3d +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec3d) – + +GetCross() + +GetDot() + +GetLength() → float +Length. + +GetNormalized(eps) → Vec3d + +Parameters +eps (float) – + +GetProjection(v) → Vec3d +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec3d) – + +Normalize(eps) → float +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (float) – + +static OrthogonalizeBasis() +classmethod OrthogonalizeBasis(tx, ty, tz, normalize, eps) -> bool +Orthogonalize and optionally normalize a set of basis vectors. +This uses an iterative method that is very stable even when the +vectors are far from orthogonal (close to colinear). The number of +iterations and thus the computation time does increase as the vectors +become close to colinear, however. Returns a bool specifying whether +the solution converged after a number of iterations. If it did not +converge, the returned vectors will be as close as possible to +orthogonal within the iteration limit. Colinear vectors will be +unaltered, and the method will return false. + +Parameters + +tx (Vec3d) – +ty (Vec3d) – +tz (Vec3d) – +normalize (bool) – +eps (float) – + +static XAxis() +classmethod XAxis() -> Vec3d +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec3d +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec3d +Create a unit vector along the Z-axis. + +dimension = 3 + +class pxr.Gf.Vec3f +Methods: + +Axis +classmethod Axis(i) -> Vec3f + +BuildOrthonormalFrame(v1, v2, eps) +Sets v1 and v2 to unit vectors such that v1, v2 and *this are mutually orthogonal. + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetCross + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +OrthogonalizeBasis +classmethod OrthogonalizeBasis(tx, ty, tz, normalize, eps) -> bool + +XAxis +classmethod XAxis() -> Vec3f + +YAxis +classmethod YAxis() -> Vec3f + +ZAxis +classmethod ZAxis() -> Vec3f + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec3f +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 3. + +Parameters +i (int) – + +BuildOrthonormalFrame(v1, v2, eps) → None +Sets v1 and v2 to unit vectors such that v1, v2 and *this +are mutually orthogonal. +If the length L of *this is smaller than eps , then v1 and v2 +will have magnitude L/eps. As a result, the function delivers a +continuous result as *this shrinks in length. + +Parameters + +v1 (Vec3f) – +v2 (Vec3f) – +eps (float) – + +GetComplement(b) → Vec3f +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec3f) – + +GetCross() + +GetDot() + +GetLength() → float +Length. + +GetNormalized(eps) → Vec3f + +Parameters +eps (float) – + +GetProjection(v) → Vec3f +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec3f) – + +Normalize(eps) → float +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (float) – + +static OrthogonalizeBasis() +classmethod OrthogonalizeBasis(tx, ty, tz, normalize, eps) -> bool +Orthogonalize and optionally normalize a set of basis vectors. +This uses an iterative method that is very stable even when the +vectors are far from orthogonal (close to colinear). The number of +iterations and thus the computation time does increase as the vectors +become close to colinear, however. Returns a bool specifying whether +the solution converged after a number of iterations. If it did not +converge, the returned vectors will be as close as possible to +orthogonal within the iteration limit. Colinear vectors will be +unaltered, and the method will return false. + +Parameters + +tx (Vec3f) – +ty (Vec3f) – +tz (Vec3f) – +normalize (bool) – +eps (float) – + +static XAxis() +classmethod XAxis() -> Vec3f +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec3f +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec3f +Create a unit vector along the Z-axis. + +dimension = 3 + +class pxr.Gf.Vec3h +Methods: + +Axis +classmethod Axis(i) -> Vec3h + +BuildOrthonormalFrame(v1, v2, eps) +Sets v1 and v2 to unit vectors such that v1, v2 and *this are mutually orthogonal. + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetCross + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +OrthogonalizeBasis +classmethod OrthogonalizeBasis(tx, ty, tz, normalize, eps) -> bool + +XAxis +classmethod XAxis() -> Vec3h + +YAxis +classmethod YAxis() -> Vec3h + +ZAxis +classmethod ZAxis() -> Vec3h + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec3h +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 3. + +Parameters +i (int) – + +BuildOrthonormalFrame(v1, v2, eps) → None +Sets v1 and v2 to unit vectors such that v1, v2 and *this +are mutually orthogonal. +If the length L of *this is smaller than eps , then v1 and v2 +will have magnitude L/eps. As a result, the function delivers a +continuous result as *this shrinks in length. + +Parameters + +v1 (Vec3h) – +v2 (Vec3h) – +eps (GfHalf) – + +GetComplement(b) → Vec3h +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec3h) – + +GetCross() + +GetDot() + +GetLength() → GfHalf +Length. + +GetNormalized(eps) → Vec3h + +Parameters +eps (GfHalf) – + +GetProjection(v) → Vec3h +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec3h) – + +Normalize(eps) → GfHalf +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (GfHalf) – + +static OrthogonalizeBasis() +classmethod OrthogonalizeBasis(tx, ty, tz, normalize, eps) -> bool +Orthogonalize and optionally normalize a set of basis vectors. +This uses an iterative method that is very stable even when the +vectors are far from orthogonal (close to colinear). The number of +iterations and thus the computation time does increase as the vectors +become close to colinear, however. Returns a bool specifying whether +the solution converged after a number of iterations. If it did not +converge, the returned vectors will be as close as possible to +orthogonal within the iteration limit. Colinear vectors will be +unaltered, and the method will return false. + +Parameters + +tx (Vec3h) – +ty (Vec3h) – +tz (Vec3h) – +normalize (bool) – +eps (float) – + +static XAxis() +classmethod XAxis() -> Vec3h +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec3h +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec3h +Create a unit vector along the Z-axis. + +dimension = 3 + +class pxr.Gf.Vec3i +Methods: + +Axis +classmethod Axis(i) -> Vec3i + +GetDot + +XAxis +classmethod XAxis() -> Vec3i + +YAxis +classmethod YAxis() -> Vec3i + +ZAxis +classmethod ZAxis() -> Vec3i + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec3i +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 3. + +Parameters +i (int) – + +GetDot() + +static XAxis() +classmethod XAxis() -> Vec3i +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec3i +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec3i +Create a unit vector along the Z-axis. + +dimension = 3 + +class pxr.Gf.Vec4d +Methods: + +Axis +classmethod Axis(i) -> Vec4d + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +WAxis +classmethod WAxis() -> Vec4d + +XAxis +classmethod XAxis() -> Vec4d + +YAxis +classmethod YAxis() -> Vec4d + +ZAxis +classmethod ZAxis() -> Vec4d + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec4d +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 4. + +Parameters +i (int) – + +GetComplement(b) → Vec4d +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec4d) – + +GetDot() + +GetLength() → float +Length. + +GetNormalized(eps) → Vec4d + +Parameters +eps (float) – + +GetProjection(v) → Vec4d +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec4d) – + +Normalize(eps) → float +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (float) – + +static WAxis() +classmethod WAxis() -> Vec4d +Create a unit vector along the W-axis. + +static XAxis() +classmethod XAxis() -> Vec4d +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec4d +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec4d +Create a unit vector along the Z-axis. + +dimension = 4 + +class pxr.Gf.Vec4f +Methods: + +Axis +classmethod Axis(i) -> Vec4f + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +WAxis +classmethod WAxis() -> Vec4f + +XAxis +classmethod XAxis() -> Vec4f + +YAxis +classmethod YAxis() -> Vec4f + +ZAxis +classmethod ZAxis() -> Vec4f + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec4f +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 4. + +Parameters +i (int) – + +GetComplement(b) → Vec4f +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec4f) – + +GetDot() + +GetLength() → float +Length. + +GetNormalized(eps) → Vec4f + +Parameters +eps (float) – + +GetProjection(v) → Vec4f +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec4f) – + +Normalize(eps) → float +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (float) – + +static WAxis() +classmethod WAxis() -> Vec4f +Create a unit vector along the W-axis. + +static XAxis() +classmethod XAxis() -> Vec4f +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec4f +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec4f +Create a unit vector along the Z-axis. + +dimension = 4 + +class pxr.Gf.Vec4h +Methods: + +Axis +classmethod Axis(i) -> Vec4h + +GetComplement(b) +Returns the orthogonal complement of this->GetProjection(b) . + +GetDot + +GetLength() +Length. + +GetNormalized(eps) + +param eps + +GetProjection(v) +Returns the projection of this onto v . + +Normalize(eps) +Normalizes the vector in place to unit length, returning the length before normalization. + +WAxis +classmethod WAxis() -> Vec4h + +XAxis +classmethod XAxis() -> Vec4h + +YAxis +classmethod YAxis() -> Vec4h + +ZAxis +classmethod ZAxis() -> Vec4h + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec4h +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 4. + +Parameters +i (int) – + +GetComplement(b) → Vec4h +Returns the orthogonal complement of this->GetProjection(b) . +That is: +\*this - this->GetProjection(b) + +Parameters +b (Vec4h) – + +GetDot() + +GetLength() → GfHalf +Length. + +GetNormalized(eps) → Vec4h + +Parameters +eps (GfHalf) – + +GetProjection(v) → Vec4h +Returns the projection of this onto v . +That is: +v \* (\*this \* v) + +Parameters +v (Vec4h) – + +Normalize(eps) → GfHalf +Normalizes the vector in place to unit length, returning the length +before normalization. +If the length of the vector is smaller than eps , then the vector +is set to vector/ eps . The original length of the vector is +returned. See also GfNormalize() . + +Parameters +eps (GfHalf) – + +static WAxis() +classmethod WAxis() -> Vec4h +Create a unit vector along the W-axis. + +static XAxis() +classmethod XAxis() -> Vec4h +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec4h +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec4h +Create a unit vector along the Z-axis. + +dimension = 4 + +class pxr.Gf.Vec4i +Methods: + +Axis +classmethod Axis(i) -> Vec4i + +GetDot + +WAxis +classmethod WAxis() -> Vec4i + +XAxis +classmethod XAxis() -> Vec4i + +YAxis +classmethod YAxis() -> Vec4i + +ZAxis +classmethod ZAxis() -> Vec4i + +Attributes: + +dimension + +static Axis() +classmethod Axis(i) -> Vec4i +Create a unit vector along the i-th axis, zero-based. +Return the zero vector if i is greater than or equal to 4. + +Parameters +i (int) – + +GetDot() + +static WAxis() +classmethod WAxis() -> Vec4i +Create a unit vector along the W-axis. + +static XAxis() +classmethod XAxis() -> Vec4i +Create a unit vector along the X-axis. + +static YAxis() +classmethod YAxis() -> Vec4i +Create a unit vector along the Y-axis. + +static ZAxis() +classmethod ZAxis() -> Vec4i +Create a unit vector along the Z-axis. + +dimension = 4 + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Glf.md b/Glf.md new file mode 100644 index 0000000000000000000000000000000000000000..4a22bb0219337f026fd2e645e2fa2f3380aaf622 --- /dev/null +++ b/Glf.md @@ -0,0 +1,477 @@ + + +Glf module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Glf module + +  + +# Glf module + +Summary: The Glf module contains Utility classes for OpenGL output. + +glf +Classes: + +DrawTarget +A class representing a GL render target with mutliple image attachments. + +GLQueryObject +Represents a GL query object in Glf + +SimpleLight + +SimpleMaterial + +Texture +Represents a texture object in Glf. + +class pxr.Glf.DrawTarget +A class representing a GL render target with mutliple image +attachments. +A DrawTarget is essentially a custom render pass into which several +arbitrary variables can be output into. These can later be used as +texture samplers by GLSL shaders. +The DrawTarget maintains a map of named attachments that correspond to +GL_TEXTURE_2D mages. By default, DrawTargets also create a depth +component that is used both as a depth buffer during the draw pass, +and can later be accessed as a regular GL_TEXTURE_2D data. Stencils +are also available (by setting the format to GL_DEPTH_STENCIL and the +internalFormat to GL_DEPTH24_STENCIL8) +Methods: + +AddAttachment(name, format, type, internalFormat) +Add an attachment to the DrawTarget. + +Bind() +Binds the framebuffer. + +Unbind() +Unbinds the framebuffer. + +WriteToFile(name, filename, viewMatrix, ...) +Write the Attachment buffer to an image file (debugging). + +Attributes: + +expired +True if this object has expired, False otherwise. + +AddAttachment(name, format, type, internalFormat) → None +Add an attachment to the DrawTarget. + +Parameters + +name (str) – +format (GLenum) – +type (GLenum) – +internalFormat (GLenum) – + +Bind() → None +Binds the framebuffer. + +Unbind() → None +Unbinds the framebuffer. + +WriteToFile(name, filename, viewMatrix, projectionMatrix) → bool +Write the Attachment buffer to an image file (debugging). + +Parameters + +name (str) – +filename (str) – +viewMatrix (Matrix4d) – +projectionMatrix (Matrix4d) – + +property expired +True if this object has expired, False otherwise. + +class pxr.Glf.GLQueryObject +Represents a GL query object in Glf +Methods: + +Begin(target) +Begin query for the given target target has to be one of GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED, GL_TIMESTAMP. + +BeginPrimitivesGenerated() +equivalent to Begin(GL_PRIMITIVES_GENERATED). + +BeginSamplesPassed() +equivalent to Begin(GL_SAMPLES_PASSED). + +BeginTimeElapsed() +equivalent to Begin(GL_TIME_ELAPSED). + +End() +End query. + +GetResult() +Return the query result (synchronous) stalls CPU until the result becomes available. + +GetResultNoWait() +Return the query result (asynchronous) returns 0 if the result hasn't been available. + +Begin(target) → None +Begin query for the given target target has to be one of +GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, +GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED +GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED, +GL_TIMESTAMP. + +Parameters +target (GLenum) – + +BeginPrimitivesGenerated() → None +equivalent to Begin(GL_PRIMITIVES_GENERATED). +The number of primitives sent to the rasterizer by the scoped drawing +command will be returned. + +BeginSamplesPassed() → None +equivalent to Begin(GL_SAMPLES_PASSED). +The number of samples that pass the depth test for all drawing +commands within the scope of the query will be returned. + +BeginTimeElapsed() → None +equivalent to Begin(GL_TIME_ELAPSED). +The time that it takes for the GPU to execute all of the scoped +commands will be returned in nanoseconds. + +End() → None +End query. + +GetResult() → int +Return the query result (synchronous) stalls CPU until the result +becomes available. + +GetResultNoWait() → int +Return the query result (asynchronous) returns 0 if the result hasn’t +been available. + +class pxr.Glf.SimpleLight +Attributes: + +ambient +None + +attenuation +None + +diffuse +None + +hasShadow +None + +id + +isCameraSpaceLight +None + +isDomeLight +None + +position +None + +shadowBias +None + +shadowBlur +None + +shadowIndexEnd +None + +shadowIndexStart +None + +shadowMatrices +None + +shadowResolution +None + +specular +None + +spotCutoff +None + +spotDirection +None + +spotFalloff +None + +transform +None + +property ambient +None + +type : Vec4f + +Type +type + +property attenuation +None + +type : Vec3f + +Type +type + +property diffuse +None + +type : Vec4f + +Type +type + +property hasShadow +None + +Type +type + +property id + +property isCameraSpaceLight +None + +type : bool + +Type +type + +property isDomeLight +None + +type : bool + +Type +type + +property position +None + +type : Vec4f + +Type +type + +property shadowBias +None + +type : float + +Type +type + +property shadowBlur +None + +type : float + +Type +type + +property shadowIndexEnd +None + +type : int + +Type +type + +property shadowIndexStart +None + +type : int + +Type +type + +property shadowMatrices +None + +type : list[Matrix4d] + +Type +type + +property shadowResolution +None + +type : int + +Type +type + +property specular +None + +type : Vec4f + +Type +type + +property spotCutoff +None + +type : float + +Type +type + +property spotDirection +None + +type : Vec3f + +Type +type + +property spotFalloff +None + +type : float + +Type +type + +property transform +None + +type : Matrix4d + +Type +type + +class pxr.Glf.SimpleMaterial +Attributes: + +ambient +None + +diffuse +None + +emission +None + +shininess +None + +specular +None + +property ambient +None + +type : Vec4f + +Type +type + +property diffuse +None + +type : Vec4f + +Type +type + +property emission +None + +type : Vec4f + +Type +type + +property shininess +None + +type : float + +Type +type + +property specular +None + +type : Vec4f + +Type +type + +class pxr.Glf.Texture +Represents a texture object in Glf. +A texture is typically defined by reading texture image data from an +image file but a texture might also represent an attachment of a draw +target. +Methods: + +GetTextureMemoryAllocated +classmethod GetTextureMemoryAllocated() -> int + +Attributes: + +magFilterSupported +bool + +memoryRequested +None + +memoryUsed +int + +minFilterSupported +bool + +static GetTextureMemoryAllocated() +classmethod GetTextureMemoryAllocated() -> int +static reporting function + +property magFilterSupported +bool + +Type +type + +property memoryRequested +None +Specify the amount of memory the user wishes to allocate to the +texture. + +type : int +Amount of memory the user wishes to allocate to the texture. + +Type +type + +property memoryUsed +int +Amount of memory used to store the texture. + +Type +type + +property minFilterSupported +bool + +Type +type + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Kind.md b/Kind.md new file mode 100644 index 0000000000000000000000000000000000000000..1fedde5bc8127ca7999d8b0945e20d921e679f27 --- /dev/null +++ b/Kind.md @@ -0,0 +1,122 @@ + + +Kind module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Kind module + +  + +# Kind module + +Summary: The Kind library provides a runtime-extensible taxonomy known as “kinds”. Useful for classifying scenegraph objects. + +Python bindings for libKind +Classes: + +Registry +A singleton that holds known kinds and information about them. + +Tokens + +class pxr.Kind.Registry +A singleton that holds known kinds and information about them. See +Kind Overview for a description of why kind exists, what the builtin +registered kinds are, and how to extend the core kinds. + +## KindRegistry Threadsafty + +KindRegistry serves performance-critical clients that operate under +the stl threading model, and therefore itself follows that model in +order to avoid locking during HasKind() and IsA() queries. +To make this robust, KindRegistry exposes no means to mutate the +registry. All extensions must be accomplished via plugInfo.json files, +which are consumed once during the registry initialization (See +Extending the KindRegistry) +Methods: + +GetAllKinds +classmethod GetAllKinds() -> list[str] + +GetBaseKind +classmethod GetBaseKind(kind) -> str + +HasKind +classmethod HasKind(kind) -> bool + +IsA +classmethod IsA(derivedKind, baseKind) -> bool + +Attributes: + +expired +True if this object has expired, False otherwise. + +static GetAllKinds() +classmethod GetAllKinds() -> list[str] +Return an unordered vector of all kinds known to the registry. + +static GetBaseKind() +classmethod GetBaseKind(kind) -> str +Return the base kind of the given kind. +If there is no base, the result will be an empty token. Issues a +coding error if kind is unknown to the registry. + +Parameters +kind (str) – + +static HasKind() +classmethod HasKind(kind) -> bool +Test whether kind is known to the registry. + +Parameters +kind (str) – + +static IsA() +classmethod IsA(derivedKind, baseKind) -> bool +Test whether derivedKind is the same as baseKind or has it as a +base kind (either directly or indirectly). +It is not required that derivedKind or baseKind be known to the +registry: if they are unknown but equal, IsA will return true ; +otherwise if either is unknown, we will simply return false. +Therefore this method will not raise any errors. + +Parameters + +derivedKind (str) – +baseKind (str) – + +property expired +True if this object has expired, False otherwise. + +class pxr.Kind.Tokens +Attributes: + +assembly + +component + +group + +model + +subcomponent + +assembly = 'assembly' + +component = 'component' + +group = 'group' + +model = 'model' + +subcomponent = 'subcomponent' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Ndr.md b/Ndr.md new file mode 100644 index 0000000000000000000000000000000000000000..463aa46560f4a0801b4a52b12c5cd560a2bc1a25 --- /dev/null +++ b/Ndr.md @@ -0,0 +1,849 @@ + + +Ndr module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Ndr module + +  + +# Ndr module + +Summary: The Ndr (Node Definition Registry) provides a node-domain-agmostic framework for registering and querying information about nodes. + +Python bindings for libNdr +Classes: + +DiscoveryPlugin +Interface for discovery plugins. + +DiscoveryPluginContext +A context for discovery. + +DiscoveryPluginList + +DiscoveryUri +Struct for holding a URI and its resolved URI for a file discovered by NdrFsHelpersDiscoverFiles. + +Node +Represents an abstract node. + +NodeDiscoveryResult +Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDiscoveryPlugin . + +NodeList + +Property +Represents a property (input or output) that is part of a NdrNode instance. + +Registry +The registry provides access to node information."Discovery Plugins"are responsible for finding the nodes that should be included in the registry. + +Version + +VersionFilter + +class pxr.Ndr.DiscoveryPlugin +Interface for discovery plugins. +Discovery plugins, like the name implies, find nodes. Where the plugin +searches is up to the plugin that implements this interface. Examples +of discovery plugins could include plugins that look for nodes on the +filesystem, another that finds nodes in a cloud service, and another +that searches a local database. Multiple discovery plugins that search +the filesystem in specific locations/ways could also be created. All +discovery plugins are executed as soon as the registry is +instantiated. +These plugins simply report back to the registry what nodes they found +in a generic way. The registry doesn’t know much about the innards of +the nodes yet, just that the nodes exist. Understanding the nodes is +the responsibility of another set of plugins defined by the +NdrParserPlugin interface. +Discovery plugins report back to the registry via +NdrNodeDiscoveryResult s. These are small, lightweight classes +that contain the information for a single node that was found during +discovery. The discovery result only includes node information that +can be gleaned pre-parse, so the data is fairly limited; to see +exactly what’s included, and what is expected to be populated, see the +documentation for NdrNodeDiscoveryResult . + +## How to Create a Discovery Plugin + +There are three steps to creating a discovery plugin: + +Implement the discovery plugin interface, NdrDiscoveryPlugin +Register your new plugin with the registry. The registration +macro must be called in your plugin’s implementation file: + + NDR_REGISTER_DISCOVERY_PLUGIN(YOUR_DISCOVERY_PLUGIN_CLASS_NAME) + +This macro is available in discoveryPlugin.h. + + - In the same folder as your plugin, create a ``plugInfo.json`` + file. This file must be formatted like so, substituting + ``YOUR_LIBRARY_NAME`` , ``YOUR_CLASS_NAME`` , and + ``YOUR_DISPLAY_NAME`` : + +{ + "Plugins": [{ + "Type": "module", + "Name": "YOUR_LIBRARY_NAME", + "Root": "@PLUG_INFO_ROOT@", + "LibraryPath": "@PLUG_INFO_LIBRARY_PATH@", + "ResourcePath": "@PLUG_INFO_RESOURCE_PATH@", + "Info": { + "Types": { + "YOUR_CLASS_NAME" : { + "bases": ["NdrDiscoveryPlugin"], + "displayName": "YOUR_DISPLAY_NAME" + } + } + } + }] +} + +The NDR ships with one discovery plugin, the +_NdrFilesystemDiscoveryPlugin . Take a look at NDR’s plugInfo.json +file for example values for YOUR_LIBRARY_NAME , +YOUR_CLASS_NAME , and YOUR_DISPLAY_NAME . If multiple +discovery plugins exist in the same folder, you can continue adding +additional plugins under the Types key in the JSON. More detailed +information about the plugInfo.json format can be found in the +documentation for the plug module (in pxr/base). +Methods: + +DiscoverNodes(arg1) +Finds and returns all nodes that the implementing plugin should be aware of. + +GetSearchURIs() +Gets the URIs that this plugin is searching for nodes in. + +Attributes: + +expired +True if this object has expired, False otherwise. + +DiscoverNodes(arg1) → NdrNodeDiscoveryResultVec +Finds and returns all nodes that the implementing plugin should be +aware of. + +Parameters +arg1 (Context) – + +GetSearchURIs() → NdrStringVec +Gets the URIs that this plugin is searching for nodes in. + +property expired +True if this object has expired, False otherwise. + +class pxr.Ndr.DiscoveryPluginContext +A context for discovery. +Discovery plugins can use this to get a limited set of non-local +information without direct coupling between plugins. +Methods: + +GetSourceType(discoveryType) +Returns the source type associated with the discovery type. + +Attributes: + +expired +True if this object has expired, False otherwise. + +GetSourceType(discoveryType) → str +Returns the source type associated with the discovery type. +This may return an empty token if there is no such association. + +Parameters +discoveryType (str) – + +property expired +True if this object has expired, False otherwise. + +class pxr.Ndr.DiscoveryPluginList +Methods: + +append + +extend + +append() + +extend() + +class pxr.Ndr.DiscoveryUri +Struct for holding a URI and its resolved URI for a file discovered by +NdrFsHelpersDiscoverFiles. +Attributes: + +resolvedUri + +uri + +property resolvedUri + +property uri + +class pxr.Ndr.Node +Represents an abstract node. Describes information like the name of +the node, what its inputs and outputs are, and any associated +metadata. +In almost all cases, this class will not be used directly. More +specialized nodes can be created that derive from NdrNode ; those +specialized nodes can add their own domain-specific data and methods. +Methods: + +GetContext() +Gets the context of the node. + +GetFamily() +Gets the name of the family that the node belongs to. + +GetIdentifier() +Return the identifier of the node. + +GetInfoString() +Gets a string with basic information about this node. + +GetInput(inputName) +Get an input property by name. + +GetInputNames() +Get an ordered list of all the input names on this node. + +GetMetadata() +All metadata that came from the parse process. + +GetName() +Gets the name of the node. + +GetOutput(outputName) +Get an output property by name. + +GetOutputNames() +Get an ordered list of all the output names on this node. + +GetResolvedDefinitionURI() +Gets the URI to the resource that provided this node's definition. + +GetResolvedImplementationURI() +Gets the URI to the resource that provides this node's implementation. + +GetSourceCode() +Returns the source code for this node. + +GetSourceType() +Gets the type of source that this node originated from. + +GetVersion() +Return the version of the node. + +IsValid() +Whether or not this node is valid. + +GetContext() → str +Gets the context of the node. +The context is the context that the node declares itself as having +(or, if a particular node does not declare a context, it will be +assigned a default context by the parser). +As a concrete example from the Sdr module, a shader with a +specific source type may perform different duties vs. another shader +with the same source type. For example, one shader with a source type +of SdrArgsParser::SourceType may declare itself as having a +context of’pattern’, while another shader of the same source type may +say it is used for lighting, and thus has a context of’light’. + +GetFamily() → str +Gets the name of the family that the node belongs to. +An empty token will be returned if the node does not belong to a +family. + +GetIdentifier() → NdrIdentifier +Return the identifier of the node. + +GetInfoString() → str +Gets a string with basic information about this node. +Helpful for things like adding this node to a log. + +GetInput(inputName) → Property +Get an input property by name. +nullptr is returned if an input with the given name does not +exist. + +Parameters +inputName (str) – + +GetInputNames() → NdrTokenVec +Get an ordered list of all the input names on this node. + +GetMetadata() → NdrTokenMap +All metadata that came from the parse process. +Specialized nodes may isolate values in the metadata (with possible +manipulations and/or additional parsing) and expose those values in +their API. + +GetName() → str +Gets the name of the node. + +GetOutput(outputName) → Property +Get an output property by name. +nullptr is returned if an output with the given name does not +exist. + +Parameters +outputName (str) – + +GetOutputNames() → NdrTokenVec +Get an ordered list of all the output names on this node. + +GetResolvedDefinitionURI() → str +Gets the URI to the resource that provided this node’s definition. +Could be a path to a file, or some other resource identifier. This URI +should be fully resolved. +NdrNode::GetResolvedImplementationURI() + +GetResolvedImplementationURI() → str +Gets the URI to the resource that provides this node’s implementation. +Could be a path to a file, or some other resource identifier. This URI +should be fully resolved. +NdrNode::GetResolvedDefinitionURI() + +GetSourceCode() → str +Returns the source code for this node. +This will be empty for most nodes. It will be non-empty only for the +nodes that are constructed using NdrRegistry::GetNodeFromSourceCode() +, in which case, the source code has not been parsed (or even +compiled) yet. +An unparsed node with non-empty source-code but no properties is +considered to be invalid. Once the node is parsed and the relevant +properties and metadata are extracted from the source code, the node +becomes valid. +NdrNode::IsValid + +GetSourceType() → str +Gets the type of source that this node originated from. +Note that this is distinct from GetContext() , which is the type +that the node declares itself as having. +As a concrete example from the Sdr module, several shader parsers +exist and operate on different types of shaders. In this scenario, +each distinct type of shader (OSL, Args, etc) is considered a +different source, even though they are all shaders. In addition, the +shaders under each source type may declare themselves as having a +specific context (shaders can serve different roles). See +GetContext() for more information on this. + +GetVersion() → Version +Return the version of the node. + +IsValid() → bool +Whether or not this node is valid. +A node that is valid indicates that the parser plugin was able to +successfully parse the contents of this node. +Note that if a node is not valid, some data like its name, URI, source +code etc. could still be available (data that was obtained during the +discovery process). However, other data that must be gathered from the +parsing process will NOT be available (eg, inputs and outputs). + +class pxr.Ndr.NodeDiscoveryResult +Represents the raw data of a node, and some other bits of metadata, +that were determined via a NdrDiscoveryPlugin . +Attributes: + +blindData + +discoveryType + +family + +identifier + +metadata + +name + +resolvedUri + +sourceCode + +sourceType + +subIdentifier + +uri + +version + +property blindData + +property discoveryType + +property family + +property identifier + +property metadata + +property name + +property resolvedUri + +property sourceCode + +property sourceType + +property subIdentifier + +property uri + +property version + +class pxr.Ndr.NodeList +Methods: + +append + +extend + +append() + +extend() + +class pxr.Ndr.Property +Represents a property (input or output) that is part of a NdrNode +instance. +A property must have a name and type, but may also specify a host of +additional metadata. Instances can also be queried to determine if +another NdrProperty instance can be connected to it. +In almost all cases, this class will not be used directly. More +specialized properties can be created that derive from NdrProperty +; those specialized properties can add their own domain-specific data +and methods. +Methods: + +CanConnectTo(other) +Determines if this property can be connected to the specified property. + +GetArraySize() +Gets this property's array size. + +GetDefaultValue() +Gets this property's default value associated with the type of the property. + +GetInfoString() +Gets a string with basic information about this property. + +GetMetadata() +All of the metadata that came from the parse process. + +GetName() +Gets the name of the property. + +GetType() +Gets the type of the property. + +GetTypeAsSdfType() +Converts the property's type from GetType() into a SdfValueTypeName . + +IsArray() +Whether this property's type is an array type. + +IsConnectable() +Whether this property can be connected to other properties. + +IsDynamicArray() +Whether this property's array type is dynamically-sized. + +IsOutput() +Whether this property is an output. + +CanConnectTo(other) → bool +Determines if this property can be connected to the specified +property. + +Parameters +other (Property) – + +GetArraySize() → int +Gets this property’s array size. +If this property is a fixed-size array type, the array size is +returned. In the case of a dynamically-sized array, this method +returns the array size that the parser reports, and should not be +relied upon to be accurate. A parser may report -1 for the array size, +for example, to indicate a dynamically-sized array. For types that are +not a fixed-size array or dynamic array, this returns 0. + +GetDefaultValue() → VtValue +Gets this property’s default value associated with the type of the +property. +GetType() + +GetInfoString() → str +Gets a string with basic information about this property. +Helpful for things like adding this property to a log. + +GetMetadata() → NdrTokenMap +All of the metadata that came from the parse process. + +GetName() → str +Gets the name of the property. + +GetType() → str +Gets the type of the property. + +GetTypeAsSdfType() → NdrSdfTypeIndicator +Converts the property’s type from GetType() into a +SdfValueTypeName . +Two scenarios can result: an exact mapping from property type to Sdf +type, and an inexact mapping. In the first scenario, the first element +in the pair will be the cleanly-mapped Sdf type, and the second +element, a TfToken, will be empty. In the second scenario, the Sdf +type will be set to Token to indicate an unclean mapping, and the +second element will be set to the original type returned by +GetType() . +GetDefaultValueAsSdfType + +IsArray() → bool +Whether this property’s type is an array type. + +IsConnectable() → bool +Whether this property can be connected to other properties. +If this returns true , connectability to a specific property can +be tested via CanConnectTo() . + +IsDynamicArray() → bool +Whether this property’s array type is dynamically-sized. + +IsOutput() → bool +Whether this property is an output. + +class pxr.Ndr.Registry +The registry provides access to node information.”Discovery +Plugins”are responsible for finding the nodes that should be included +in the registry. +Discovery plugins are found through the plugin system. If additional +discovery plugins need to be specified, a client can pass them to +SetExtraDiscoveryPlugins() . +When the registry is first told about the discovery plugins, the +plugins will be asked to discover nodes. These plugins will generate +NdrNodeDiscoveryResult instances, which only contain basic +metadata. Once the client asks for information that would require the +node’s contents to be parsed (eg, what its inputs and outputs are), +the registry will begin the parsing process on an as-needed basis. See +NdrNodeDiscoveryResult for the information that can be retrieved +without triggering a parse. +Some methods in this module may allow for a”family”to be provided. A +family is simply a generic grouping which is optional. +Methods: + +GetAllNodeSourceTypes() +Get a sorted list of all node source types that may be present on the nodes in the registry. + +GetNodeByIdentifier(identifier, ...) +Get the node with the specified identifier , and an optional sourceTypePriority list specifying the set of node SOURCE types (see NdrNode::GetSourceType() ) that should be searched. + +GetNodeByIdentifierAndType(identifier, ...) +Get the node with the specified identifier and sourceType . + +GetNodeByName(name, sourceTypePriority, filter) +Get the node with the specified name. + +GetNodeByNameAndType(name, sourceType, filter) +A convenience wrapper around GetNodeByName() . + +GetNodeFromAsset(asset, metadata, ...) +Parses the given asset , constructs a NdrNode from it and adds it to the registry. + +GetNodeFromSourceCode(sourceCode, ...) +Parses the given sourceCode string, constructs a NdrNode from it and adds it to the registry. + +GetNodeIdentifiers(family, filter) +Get the identifiers of all the nodes that the registry is aware of. + +GetNodeNames(family) +Get the names of all the nodes that the registry is aware of. + +GetNodesByFamily(family, filter) +Get all nodes from the registry, optionally restricted to the nodes that fall under a specified family and/or the default version. + +GetNodesByIdentifier(identifier) +Get all nodes matching the specified identifier (multiple nodes of the same identifier, but different source types, may exist). + +GetNodesByName(name, filter) +Get all nodes matching the specified name. + +GetSearchURIs() +Get the locations where the registry is searching for nodes. + +SetExtraDiscoveryPlugins(plugins) +Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system. + +SetExtraParserPlugins(pluginTypes) +Allows the client to set any additional parser plugins that would otherwise NOT be found through the plugin system. + +GetAllNodeSourceTypes() → NdrTokenVec +Get a sorted list of all node source types that may be present on the +nodes in the registry. +Source types originate from the discovery process, but there is no +guarantee that the discovered source types will also have a registered +parser plugin. The actual supported source types here depend on the +parsers that are available. Also note that some parser plugins may not +advertise a source type. +See the documentation for NdrParserPlugin and +NdrNode::GetSourceType() for more information. + +GetNodeByIdentifier(identifier, sourceTypePriority) → Node +Get the node with the specified identifier , and an optional +sourceTypePriority list specifying the set of node SOURCE types +(see NdrNode::GetSourceType() ) that should be searched. +If no sourceTypePriority is specified, the first encountered node with +the specified identifier will be returned (first is arbitrary) if +found. +If a sourceTypePriority list is specified, then this will iterate +through each source type and try to find a node matching by +identifier. This is equivalent to calling +NdrRegistry::GetNodeByIdentifierAndType for each source type until a +node is found. +Nodes of the same identifier but different source type can exist in +the registry. If a node’Foo’with source types’abc’and’xyz’exist in the +registry, and you want to make sure the’abc’version is fetched before +the’xyz’version, the priority list would be specified as +[‘abc’,’xyz’]. If the’abc’version did not exist in the registry, then +the’xyz’version would be returned. +Returns nullptr if a node matching the arguments can’t be found. + +Parameters + +identifier (NdrIdentifier) – +sourceTypePriority (NdrTokenVec) – + +GetNodeByIdentifierAndType(identifier, sourceType) → Node +Get the node with the specified identifier and sourceType . +If there is no matching node for the sourceType, nullptr is returned. + +Parameters + +identifier (NdrIdentifier) – +sourceType (str) – + +GetNodeByName(name, sourceTypePriority, filter) → Node +Get the node with the specified name. +An optional priority list specifies the set of node SOURCE types ( +NdrNode::GetSourceType() ) that should be searched and in what order. +Optionally, a filter can be specified to consider just the default +versions of nodes matching name (the default) or all versions of +the nodes. +GetNodeByIdentifier() . + +Parameters + +name (str) – +sourceTypePriority (NdrTokenVec) – +filter (VersionFilter) – + +GetNodeByNameAndType(name, sourceType, filter) → Node +A convenience wrapper around GetNodeByName() . +Instead of providing a priority list, an exact type is specified, and +nullptr is returned if a node with the exact identifier and type +does not exist. +Optionally, a filter can be specified to consider just the default +versions of nodes matching name (the default) or all versions of +the nodes. + +Parameters + +name (str) – +sourceType (str) – +filter (VersionFilter) – + +GetNodeFromAsset(asset, metadata, subIdentifier, sourceType) → Node +Parses the given asset , constructs a NdrNode from it and adds it +to the registry. +Nodes created from an asset using this API can be looked up by the +unique identifier and sourceType of the returned node, or by URI, +which will be set to the unresolved asset path value. +metadata contains additional metadata needed for parsing and +compiling the source code in the file pointed to by asset +correctly. This metadata supplements the metadata available in the +asset and overrides it in cases where there are key collisions. +subidentifier is optional, and it would be used to indicate a +particular definition in the asset file if the asset contains multiple +node definitions. +sourceType is optional, and it is only needed to indicate a +particular type if the asset file is capable of representing a node +definition of multiple source types. +Returns a valid node if the asset is parsed successfully using one of +the registered parser plugins. + +Parameters + +asset (AssetPath) – +metadata (NdrTokenMap) – +subIdentifier (str) – +sourceType (str) – + +GetNodeFromSourceCode(sourceCode, sourceType, metadata) → Node +Parses the given sourceCode string, constructs a NdrNode from it +and adds it to the registry. +The parser to be used is determined by the specified sourceType . +Nodes created from source code using this API can be looked up by the +unique identifier and sourceType of the returned node. +metadata contains additional metadata needed for parsing and +compiling the source code correctly. This metadata supplements the +metadata available in sourceCode and overrides it cases where +there are key collisions. +Returns a valid node if the given source code is parsed successfully +using the parser plugins that is registered for the specified +sourceType . + +Parameters + +sourceCode (str) – +sourceType (str) – +metadata (NdrTokenMap) – + +GetNodeIdentifiers(family, filter) → NdrIdentifierVec +Get the identifiers of all the nodes that the registry is aware of. +This will not run the parsing plugins on the nodes that have been +discovered, so this method is relatively quick. Optionally, +a”family”name can be specified to only get the identifiers of nodes +that belong to that family and a filter can be specified to get just +the default version (the default) or all versions of the node. + +Parameters + +family (str) – +filter (VersionFilter) – + +GetNodeNames(family) → NdrStringVec +Get the names of all the nodes that the registry is aware of. +This will not run the parsing plugins on the nodes that have been +discovered, so this method is relatively quick. Optionally, +a”family”name can be specified to only get the names of nodes that +belong to that family. + +Parameters +family (str) – + +GetNodesByFamily(family, filter) → NdrNodeConstPtrVec +Get all nodes from the registry, optionally restricted to the nodes +that fall under a specified family and/or the default version. +Note that this will parse all nodes that the registry is aware of +(unless a family is specified), so this may take some time to run the +first time it is called. + +Parameters + +family (str) – +filter (VersionFilter) – + +GetNodesByIdentifier(identifier) → NdrNodeConstPtrVec +Get all nodes matching the specified identifier (multiple nodes of the +same identifier, but different source types, may exist). +If no nodes match the identifier, an empty vector is returned. + +Parameters +identifier (NdrIdentifier) – + +GetNodesByName(name, filter) → NdrNodeConstPtrVec +Get all nodes matching the specified name. +Only nodes matching the specified name will be parsed. Optionally, a +filter can be specified to get just the default version (the default) +or all versions of the node. If no nodes match an empty vector is +returned. + +Parameters + +name (str) – +filter (VersionFilter) – + +GetSearchURIs() → NdrStringVec +Get the locations where the registry is searching for nodes. +Depending on which discovery plugins were used, this may include non- +filesystem paths. + +SetExtraDiscoveryPlugins(plugins) → None +Allows the client to set any additional discovery plugins that would +otherwise NOT be found through the plugin system. +Runs the discovery process for the specified plugins immediately. +Note that this method cannot be called after any nodes in the registry +have been parsed (eg, through GetNode*()), otherwise an error will +result. + +Parameters +plugins (DiscoveryPluginRefPtrVec) – + +SetExtraDiscoveryPlugins(pluginTypes) -> None +Allows the client to set any additional discovery plugins that would +otherwise NOT be found through the plugin system. +Runs the discovery process for the specified plugins immediately. +Note that this method cannot be called after any nodes in the registry +have been parsed (eg, through GetNode*()), otherwise an error will +result. + +Parameters +pluginTypes (list[Type]) – + +SetExtraParserPlugins(pluginTypes) → None +Allows the client to set any additional parser plugins that would +otherwise NOT be found through the plugin system. +Note that this method cannot be called after any nodes in the registry +have been parsed (eg, through GetNode*()), otherwise an error will +result. + +Parameters +pluginTypes (list[Type]) – + +class pxr.Ndr.Version +Methods: + +GetAsDefault() +Return an equal version marked as default. + +GetMajor() +Return the major version number or zero for an invalid version. + +GetMinor() +Return the minor version number or zero for an invalid version. + +GetStringSuffix() +Return the version as a identifier suffix. + +IsDefault() +Return true iff this version is marked as default. + +GetAsDefault() → Version +Return an equal version marked as default. +It’s permitted to mark an invalid version as the default. + +GetMajor() → int +Return the major version number or zero for an invalid version. + +GetMinor() → int +Return the minor version number or zero for an invalid version. + +GetStringSuffix() → str +Return the version as a identifier suffix. + +IsDefault() → bool +Return true iff this version is marked as default. + +class pxr.Ndr.VersionFilter +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Ndr.VersionFilterDefaultOnly, Ndr.VersionFilterAllVersions) + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Pcp.md b/Pcp.md new file mode 100644 index 0000000000000000000000000000000000000000..eb4ef43a373c45e0de5ac09658c637b2618fadd9 --- /dev/null +++ b/Pcp.md @@ -0,0 +1,1659 @@ + + +Pcp module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Pcp module + +  + +# Pcp module + +Summary: The PrimCache Population module implements core scenegraph composition semantics - behaviors informally referred to as Layering & Referencing. + +Classes: + +ArcType + +Cache +PcpCache is the context required to make requests of the Pcp composition algorithm and cache the results. + +Dependency +Description of a dependency. + +DependencyType + +DynamicFileFormatDependencyData +Contains the necessary information for storing a prim index's dependency on dynamic file format arguments and determining if a field change affects the prim index. + +ErrorArcCycle +Arcs between PcpNodes that form a cycle. + +ErrorArcPermissionDenied +Arcs that were not made between PcpNodes because of permission restrictions. + +ErrorBase +Base class for all error types. + +ErrorCapacityExceeded +Exceeded the capacity for composition arcs at a single site. + +ErrorInconsistentAttributeType +Attributes that have specs with conflicting definitions. + +ErrorInconsistentAttributeVariability +Attributes that have specs with conflicting variability. + +ErrorInconsistentPropertyType +Properties that have specs with conflicting definitions. + +ErrorInvalidAssetPath +Invalid asset paths used by references or payloads. + +ErrorInvalidAssetPathBase + +ErrorInvalidExternalTargetPath +Invalid target or connection path in some scope that points to an object outside of that scope. + +ErrorInvalidInstanceTargetPath +Invalid target or connection path authored in an inherited class that points to an instance of that class. + +ErrorInvalidPrimPath +Invalid prim paths used by references or payloads. + +ErrorInvalidReferenceOffset +References or payloads that use invalid layer offsets. + +ErrorInvalidSublayerOffset +Sublayers that use invalid layer offsets. + +ErrorInvalidSublayerOwnership +Sibling layers that have the same owner. + +ErrorInvalidSublayerPath +Asset paths that could not be both resolved and loaded. + +ErrorInvalidTargetPath +Invalid target or connection path. + +ErrorMutedAssetPath +Muted asset paths used by references or payloads. + +ErrorOpinionAtRelocationSource +Opinions were found at a relocation source path. + +ErrorPrimPermissionDenied +Layers with illegal opinions about private prims. + +ErrorPropertyPermissionDenied +Layers with illegal opinions about private properties. + +ErrorSublayerCycle +Layers that recursively sublayer themselves. + +ErrorTargetPathBase +Base class for composition errors related to target or connection paths. + +ErrorTargetPermissionDenied +Paths with illegal opinions about private targets. + +ErrorType + +ErrorUnresolvedPrimPath +Asset paths that could not be both resolved and loaded. + +InstanceKey +A PcpInstanceKey identifies instanceable prim indexes that share the same set of opinions. + +LayerStack +Represents a stack of layers that contribute opinions to composition. + +LayerStackIdentifier +Arguments used to identify a layer stack. + +LayerStackSite +A site specifies a path in a layer stack of scene description. + +MapExpression +An expression that yields a PcpMapFunction value. + +MapFunction +A function that maps values from one namespace (and time domain) to another. + +NodeRef +PcpNode represents a node in an expression tree for compositing scene description. + +PrimIndex +PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics. + +PropertyIndex +PcpPropertyIndex is an index of all sites in scene description that contribute opinions to a specific property, under composition semantics. + +Site +A site specifies a path in a layer stack of scene description. + +class pxr.Pcp.ArcType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Pcp.ArcTypeRoot, Pcp.ArcTypeInherit, Pcp.ArcTypeRelocate, Pcp.ArcTypeVariant, Pcp.ArcTypeReference, Pcp.ArcTypePayload, Pcp.ArcTypeSpecialize) + +class pxr.Pcp.Cache +PcpCache is the context required to make requests of the Pcp +composition algorithm and cache the results. +Because the algorithms are recursive making a request typically makes +other internal requests to solve subproblems caching subproblem +results is required for reasonable performance, and so this cache is +the only entrypoint to the algorithms. +There is a set of parameters that affect the composition results: + +variant fallbacks: per named variant set, an ordered list of +fallback values to use when composing a prim that defines a variant +set but does not specify a selection +payload inclusion set: an SdfPath set used to identify which +prims should have their payloads included during composition; this is +the basis for explicit control over the”working set”of composition +file format target: the file format target that Pcp will request +when opening scene description layers +“USD mode”configures the Pcp composition algorithm to provide +only a custom, lighter subset of the full feature set, as needed by +the Universal Scene Description system +There are a number of different computations that can be requested. +These include computing a layer stack from a PcpLayerStackIdentifier, +computing a prim index or prim stack, and computing a property index. + +Methods: + +ComputeAttributeConnectionPaths(...) +Compute the attribute connection paths for the attribute at attributePath into paths . + +ComputeLayerStack(identifier, allErrors) +Returns the layer stack for identifier if it exists, otherwise creates a new layer stack for identifier . + +ComputePrimIndex(primPath, allErrors) +Compute and return a reference to the cached result for the prim index for the given path. + +ComputePropertyIndex(propPath, allErrors) +Compute and return a reference to the cached result for the property index for the given path. + +ComputeRelationshipTargetPaths(...) +Compute the relationship target paths for the relationship at relationshipPath into paths . + +FindAllLayerStacksUsingLayer(layer) +Returns every computed & cached layer stack that includes layer . + +FindPrimIndex(primPath) +Returns a pointer to the cached computed prim index for the given path, or None if it has not been computed. + +FindPropertyIndex(propPath) +Returns a pointer to the cached computed property index for the given path, or None if it has not been computed. + +FindSiteDependencies(siteLayerStack, ...) +Returns dependencies on the given site of scene description, as discovered by the cached index computations. + +GetDynamicFileFormatArgumentDependencyData(...) +Returns the dynamic file format dependency data object for the prim index with the given primIndexPath . + +GetLayerStackIdentifier() +Get the identifier of the layerStack used for composition. + +GetMutedLayers() +Returns the list of canonical identifiers for muted layers in this cache. + +GetUsedLayers() +Returns set of all layers used by this cache. + +GetUsedLayersRevision() +Return a number that can be used to determine whether or not the set of layers used by this cache may have changed or not. + +GetVariantFallbacks() +Get the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection. + +HasAnyDynamicFileFormatArgumentDependencies() +Returns true if any prim index in this cache has a dependency on a dynamic file format argument field. + +HasRootLayerStack(layerStack) +Return true if this cache's root layer stack is layerStack , false otherwise. + +IsInvalidAssetPath(resolvedAssetPath) +Returns true if resolvedAssetPath was used by a prim (e.g. + +IsInvalidSublayerIdentifier(identifier) +Returns true if identifier was used as a sublayer path in a layer stack but did not identify a valid layer. + +IsLayerMuted(layerIdentifier) +Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise. + +IsPayloadIncluded(path) +Return true if the payload is included for the given path. + +IsPossibleDynamicFileFormatArgumentField(field) +Returns true if the given field is the name of a field that was composed while generating dynamic file format arguments for any prim index in this cache. + +PrintStatistics() +Prints various statistics about the data stored in this cache. + +Reload(changes) +Reload the layers of the layer stack, except session layers and sublayers of session layers. + +RequestLayerMuting(layersToMute, ...) +Request layers to be muted or unmuted in this cache. + +RequestPayloads(pathsToInclude, ...) +Request payloads to be included or excluded from composition. + +SetVariantFallbacks(map, changes) +Set the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection. + +UsesLayerStack(layerStack) +Return true if layerStack is used by this cache in its composition, false otherwise. + +Attributes: + +fileFormatTarget +str + +layerStack +LayerStack + +ComputeAttributeConnectionPaths(attributePath, paths, localOnly, stopProperty, includeStopProperty, deletedPaths, allErrors) → None +Compute the attribute connection paths for the attribute at +attributePath into paths . +If localOnly is true then this will compose attribute +connections from local nodes only. If stopProperty is not None +then this will stop composing attribute connections at +stopProperty , including stopProperty iff +includeStopProperty is true . If not None , +deletedPaths will be populated with connection paths whose +deletion contributed to the computed result. allErrors will +contain any errors encountered while performing this operation. + +Parameters + +attributePath (Path) – +paths (list[SdfPath]) – +localOnly (bool) – +stopProperty (Spec) – +includeStopProperty (bool) – +deletedPaths (list[SdfPath]) – +allErrors (list[PcpError]) – + +ComputeLayerStack(identifier, allErrors) → LayerStack +Returns the layer stack for identifier if it exists, otherwise +creates a new layer stack for identifier . +This returns None if identifier is invalid (i.e. its root +layer is None ). allErrors will contain any errors encountered +while creating a new layer stack. It’ll be unchanged if the layer +stack already existed. + +Parameters + +identifier (LayerStackIdentifier) – +allErrors (list[PcpError]) – + +ComputePrimIndex(primPath, allErrors) → PrimIndex +Compute and return a reference to the cached result for the prim index +for the given path. +allErrors will contain any errors encountered while performing +this operation. + +Parameters + +primPath (Path) – +allErrors (list[PcpError]) – + +ComputePropertyIndex(propPath, allErrors) → PropertyIndex +Compute and return a reference to the cached result for the property +index for the given path. +allErrors will contain any errors encountered while performing +this operation. + +Parameters + +propPath (Path) – +allErrors (list[PcpError]) – + +ComputeRelationshipTargetPaths(relationshipPath, paths, localOnly, stopProperty, includeStopProperty, deletedPaths, allErrors) → None +Compute the relationship target paths for the relationship at +relationshipPath into paths . +If localOnly is true then this will compose relationship +targets from local nodes only. If stopProperty is not None +then this will stop composing relationship targets at stopProperty +, including stopProperty iff includeStopProperty is true . +If not None , deletedPaths will be populated with target paths +whose deletion contributed to the computed result. allErrors will +contain any errors encountered while performing this operation. + +Parameters + +relationshipPath (Path) – +paths (list[SdfPath]) – +localOnly (bool) – +stopProperty (Spec) – +includeStopProperty (bool) – +deletedPaths (list[SdfPath]) – +allErrors (list[PcpError]) – + +FindAllLayerStacksUsingLayer(layer) → list[PcpLayerStackPtr] +Returns every computed & cached layer stack that includes layer . + +Parameters +layer (Layer) – + +FindPrimIndex(primPath) → PrimIndex +Returns a pointer to the cached computed prim index for the given +path, or None if it has not been computed. + +Parameters +primPath (Path) – + +FindPropertyIndex(propPath) → PropertyIndex +Returns a pointer to the cached computed property index for the given +path, or None if it has not been computed. + +Parameters +propPath (Path) – + +FindSiteDependencies(siteLayerStack, sitePath, depMask, recurseOnSite, recurseOnIndex, filterForExistingCachesOnly) → list[PcpDependency] +Returns dependencies on the given site of scene description, as +discovered by the cached index computations. +depMask +specifies what classes of dependency to include; see +PcpDependencyFlags for details recurseOnSite +includes incoming dependencies on children of sitePath recurseOnIndex +extends the result to include all PcpCache child indexes below +discovered results filterForExistingCachesOnly +filters the results to only paths representing computed prim and +property index caches; otherwise a recursively-expanded result can +include un-computed paths that are expected to depend on the site + +Parameters + +siteLayerStack (LayerStack) – +sitePath (Path) – +depMask (PcpDependencyFlags) – +recurseOnSite (bool) – +recurseOnIndex (bool) – +filterForExistingCachesOnly (bool) – + +FindSiteDependencies(siteLayer, sitePath, depMask, recurseOnSite, recurseOnIndex, filterForExistingCachesOnly) -> list[PcpDependency] +Returns dependencies on the given site of scene description, as +discovered by the cached index computations. +This method overload takes a site layer rather than a layer stack. It +will check every layer stack using that layer, and apply any relevant +sublayer offsets to the map functions in the returned +PcpDependencyVector. +See the other method for parameter details. + +Parameters + +siteLayer (Layer) – +sitePath (Path) – +depMask (PcpDependencyFlags) – +recurseOnSite (bool) – +recurseOnIndex (bool) – +filterForExistingCachesOnly (bool) – + +GetDynamicFileFormatArgumentDependencyData(primIndexPath) → DynamicFileFormatDependencyData +Returns the dynamic file format dependency data object for the prim +index with the given primIndexPath . +This will return an empty dependency data if either there is no cache +prim index for the path or if the prim index has no dynamic file +formats that it depends on. + +Parameters +primIndexPath (Path) – + +GetLayerStackIdentifier() → LayerStackIdentifier +Get the identifier of the layerStack used for composition. + +GetMutedLayers() → list[str] +Returns the list of canonical identifiers for muted layers in this +cache. +See documentation on RequestLayerMuting for more details. + +GetUsedLayers() → SdfLayerHandleSet +Returns set of all layers used by this cache. + +GetUsedLayersRevision() → int +Return a number that can be used to determine whether or not the set +of layers used by this cache may have changed or not. +For example, if one calls GetUsedLayers() and saves the +GetUsedLayersRevision() , and then later calls GetUsedLayersRevision() +again, if the number is unchanged, then GetUsedLayers() is guaranteed +to be unchanged as well. + +GetVariantFallbacks() → PcpVariantFallbackMap +Get the list of fallbacks to attempt to use when evaluating variant +sets that lack an authored selection. + +HasAnyDynamicFileFormatArgumentDependencies() → bool +Returns true if any prim index in this cache has a dependency on a +dynamic file format argument field. + +HasRootLayerStack(layerStack) → bool +Return true if this cache’s root layer stack is layerStack , false +otherwise. +This is functionally equivalent to comparing against the result of +GetLayerStack() , but does not require constructing a TfWeakPtr or any +refcount operations. + +Parameters +layerStack (LayerStack) – + +HasRootLayerStack(layerStack) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +layerStack (LayerStack) – + +IsInvalidAssetPath(resolvedAssetPath) → bool +Returns true if resolvedAssetPath was used by a prim (e.g. +in a reference) but did not resolve to a valid asset. This is +functionally equivalent to examining the values in the map returned by +GetInvalidAssetPaths, but more efficient. + +Parameters +resolvedAssetPath (str) – + +IsInvalidSublayerIdentifier(identifier) → bool +Returns true if identifier was used as a sublayer path in a layer +stack but did not identify a valid layer. +This is functionally equivalent to examining the values in the vector +returned by GetInvalidSublayerIdentifiers, but more efficient. + +Parameters +identifier (str) – + +IsLayerMuted(layerIdentifier) → bool +Returns true if the layer specified by layerIdentifier is muted in +this cache, false otherwise. +If layerIdentifier is relative, it is assumed to be relative to +this cache’s root layer. See documentation on RequestLayerMuting for +more details. + +Parameters +layerIdentifier (str) – + +IsLayerMuted(anchorLayer, layerIdentifier, canonicalMutedLayerIdentifier) -> bool +Returns true if the layer specified by layerIdentifier is muted in +this cache, false otherwise. +If layerIdentifier is relative, it is assumed to be relative to +anchorLayer . If canonicalMutedLayerIdentifier is supplied, it +will be populated with the canonical identifier of the muted layer if +this function returns true. See documentation on RequestLayerMuting +for more details. + +Parameters + +anchorLayer (Layer) – +layerIdentifier (str) – +canonicalMutedLayerIdentifier (str) – + +IsPayloadIncluded(path) → bool +Return true if the payload is included for the given path. + +Parameters +path (Path) – + +IsPossibleDynamicFileFormatArgumentField(field) → bool +Returns true if the given field is the name of a field that was +composed while generating dynamic file format arguments for any prim +index in this cache. + +Parameters +field (str) – + +PrintStatistics() → None +Prints various statistics about the data stored in this cache. + +Reload(changes) → None +Reload the layers of the layer stack, except session layers and +sublayers of session layers. +This will also try to load sublayers in this cache’s layer stack that +could not be loaded previously. It will also try to load any +referenced or payloaded layer that could not be loaded previously. +Clients should subsequently Apply() changes to use any now- +valid layers. + +Parameters +changes (PcpChanges) – + +RequestLayerMuting(layersToMute, layersToUnmute, changes, newLayersMuted, newLayersUnmuted) → None +Request layers to be muted or unmuted in this cache. +Muted layers are ignored during composition and do not appear in any +layer stacks. The root layer of this stage may not be muted; +attempting to do so will generate a coding error. If the root layer of +a reference or payload layer stack is muted, the behavior is as if the +muted layer did not exist, which means a composition error will be +generated. +A canonical identifier for each layer in layersToMute will be +computed using ArResolver::CreateIdentifier using the cache’s root +layer as the anchoring asset. Any layer encountered during composition +with the same identifier will be considered muted and ignored. +Note that muting a layer will cause this cache to release all +references to that layer. If no other client is holding on to +references to that layer, it will be unloaded. In this case, if there +are unsaved edits to the muted layer, those edits are lost. Since +anonymous layers are not serialized, muting an anonymous layer will +cause that layer and its contents to be lost in this case. +If changes is not nullptr , it is adjusted to reflect the +changes necessary to see the change in muted layers. Otherwise, those +changes are applied immediately. +newLayersMuted and newLayersUnmuted contains the pruned vector +of layers which are muted or unmuted by this call to +RequestLayerMuting. + +Parameters + +layersToMute (list[str]) – +layersToUnmute (list[str]) – +changes (PcpChanges) – +newLayersMuted (list[str]) – +newLayersUnmuted (list[str]) – + +RequestPayloads(pathsToInclude, pathsToExclude, changes) → None +Request payloads to be included or excluded from composition. +pathsToInclude +is a set of paths to add to the set for payload inclusion. +pathsToExclude +is a set of paths to remove from the set for payload inclusion. +changes +if not None , is adjusted to reflect the changes necessary to see +the change in payloads; otherwise those changes are applied +immediately. +If a path is listed in both pathsToInclude and pathsToExclude, it will +be treated as an inclusion only. + +Parameters + +pathsToInclude (SdfPathSet) – +pathsToExclude (SdfPathSet) – +changes (PcpChanges) – + +SetVariantFallbacks(map, changes) → None +Set the list of fallbacks to attempt to use when evaluating variant +sets that lack an authored selection. +If changes is not None then it’s adjusted to reflect the +changes necessary to see the change in standin preferences, otherwise +those changes are applied immediately. + +Parameters + +map (PcpVariantFallbackMap) – +changes (PcpChanges) – + +UsesLayerStack(layerStack) → bool +Return true if layerStack is used by this cache in its +composition, false otherwise. + +Parameters +layerStack (LayerStack) – + +property fileFormatTarget +str +Returns the file format target this cache is configured for. + +Type +type + +property layerStack +LayerStack +Get the layer stack for GetLayerStackIdentifier() . +Note that this will neither compute the layer stack nor report errors. +So if the layer stack has not been computed yet this will return +None . Use ComputeLayerStack() if you need to compute the layer +stack if it hasn’t been computed already and/or get errors caused by +computing the layer stack. + +Type +type + +class pxr.Pcp.Dependency +Description of a dependency. +Attributes: + +indexPath + +mapFunc + +sitePath + +property indexPath + +property mapFunc + +property sitePath + +class pxr.Pcp.DependencyType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Pcp.DependencyTypeNone, Pcp.DependencyTypeRoot, Pcp.DependencyTypePurelyDirect, Pcp.DependencyTypePartlyDirect, Pcp.DependencyTypeDirect, Pcp.DependencyTypeAncestral, Pcp.DependencyTypeVirtual, Pcp.DependencyTypeNonVirtual, Pcp.DependencyTypeAnyNonVirtual, Pcp.DependencyTypeAnyIncludingVirtual) + +class pxr.Pcp.DynamicFileFormatDependencyData +Contains the necessary information for storing a prim index’s +dependency on dynamic file format arguments and determining if a field +change affects the prim index. This data structure does not store the +prim index or its path itself and is expected to be the data in some +other data structure that maps prim indexes to its dependencies. +Methods: + +CanFieldChangeAffectFileFormatArguments(...) +Given a field name and the changed field values in oldAndNewValues this return whether this change can affect any of the file format arguments generated by any of the contexts stored in this dependency. + +GetRelevantFieldNames() +Returns a list of field names that were composed for any of the dependency contexts that were added to this dependency. + +IsEmpty() +Returns whether this dependency data is empty. + +CanFieldChangeAffectFileFormatArguments(fieldName, oldValue, newValue) → bool +Given a field name and the changed field values in +oldAndNewValues this return whether this change can affect any of +the file format arguments generated by any of the contexts stored in +this dependency. + +Parameters + +fieldName (str) – +oldValue (VtValue) – +newValue (VtValue) – + +GetRelevantFieldNames() → str.Set +Returns a list of field names that were composed for any of the +dependency contexts that were added to this dependency. + +IsEmpty() → bool +Returns whether this dependency data is empty. + +class pxr.Pcp.ErrorArcCycle +Arcs between PcpNodes that form a cycle. + +class pxr.Pcp.ErrorArcPermissionDenied +Arcs that were not made between PcpNodes because of permission +restrictions. + +class pxr.Pcp.ErrorBase +Base class for all error types. +Attributes: + +errorType + +property errorType + +class pxr.Pcp.ErrorCapacityExceeded +Exceeded the capacity for composition arcs at a single site. + +class pxr.Pcp.ErrorInconsistentAttributeType +Attributes that have specs with conflicting definitions. + +class pxr.Pcp.ErrorInconsistentAttributeVariability +Attributes that have specs with conflicting variability. + +class pxr.Pcp.ErrorInconsistentPropertyType +Properties that have specs with conflicting definitions. + +class pxr.Pcp.ErrorInvalidAssetPath +Invalid asset paths used by references or payloads. + +class pxr.Pcp.ErrorInvalidAssetPathBase + +class pxr.Pcp.ErrorInvalidExternalTargetPath +Invalid target or connection path in some scope that points to an +object outside of that scope. + +class pxr.Pcp.ErrorInvalidInstanceTargetPath +Invalid target or connection path authored in an inherited class that +points to an instance of that class. + +class pxr.Pcp.ErrorInvalidPrimPath +Invalid prim paths used by references or payloads. + +class pxr.Pcp.ErrorInvalidReferenceOffset +References or payloads that use invalid layer offsets. + +class pxr.Pcp.ErrorInvalidSublayerOffset +Sublayers that use invalid layer offsets. + +class pxr.Pcp.ErrorInvalidSublayerOwnership +Sibling layers that have the same owner. + +class pxr.Pcp.ErrorInvalidSublayerPath +Asset paths that could not be both resolved and loaded. + +class pxr.Pcp.ErrorInvalidTargetPath +Invalid target or connection path. + +class pxr.Pcp.ErrorMutedAssetPath +Muted asset paths used by references or payloads. + +class pxr.Pcp.ErrorOpinionAtRelocationSource +Opinions were found at a relocation source path. + +class pxr.Pcp.ErrorPrimPermissionDenied +Layers with illegal opinions about private prims. + +class pxr.Pcp.ErrorPropertyPermissionDenied +Layers with illegal opinions about private properties. + +class pxr.Pcp.ErrorSublayerCycle +Layers that recursively sublayer themselves. + +class pxr.Pcp.ErrorTargetPathBase +Base class for composition errors related to target or connection +paths. + +class pxr.Pcp.ErrorTargetPermissionDenied +Paths with illegal opinions about private targets. + +class pxr.Pcp.ErrorType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Pcp.ErrorType_ArcCycle, Pcp.ErrorType_ArcPermissionDenied, Pcp.ErrorType_IndexCapacityExceeded, Pcp.ErrorType_ArcCapacityExceeded, Pcp.ErrorType_ArcNamespaceDepthCapacityExceeded, Pcp.ErrorType_InconsistentPropertyType, Pcp.ErrorType_InconsistentAttributeType, Pcp.ErrorType_InconsistentAttributeVariability, Pcp.ErrorType_InternalAssetPath, Pcp.ErrorType_InvalidPrimPath, Pcp.ErrorType_InvalidAssetPath, Pcp.ErrorType_InvalidInstanceTargetPath, Pcp.ErrorType_InvalidExternalTargetPath, Pcp.ErrorType_InvalidTargetPath, Pcp.ErrorType_InvalidReferenceOffset, Pcp.ErrorType_InvalidSublayerOffset, Pcp.ErrorType_InvalidSublayerOwnership, Pcp.ErrorType_InvalidSublayerPath, Pcp.ErrorType_InvalidVariantSelection, Pcp.ErrorType_OpinionAtRelocationSource, Pcp.ErrorType_PrimPermissionDenied, Pcp.ErrorType_PropertyPermissionDenied, Pcp.ErrorType_SublayerCycle, Pcp.ErrorType_TargetPermissionDenied, Pcp.ErrorType_UnresolvedPrimPath) + +class pxr.Pcp.ErrorUnresolvedPrimPath +Asset paths that could not be both resolved and loaded. + +class pxr.Pcp.InstanceKey +A PcpInstanceKey identifies instanceable prim indexes that share the +same set of opinions. Instanceable prim indexes with equal instance +keys are guaranteed to have the same opinions for name children and +properties beneath those name children. They are NOT guaranteed to +have the same opinions for direct properties of the prim indexes +themselves. + +class pxr.Pcp.LayerStack +Represents a stack of layers that contribute opinions to composition. +Each PcpLayerStack is identified by a PcpLayerStackIdentifier. This +identifier contains all of the parameters needed to construct a layer +stack, such as the root layer, session layer, and path resolver +context. +PcpLayerStacks are constructed and managed by a +Pcp_LayerStackRegistry. +Attributes: + +expired +True if this object has expired, False otherwise. + +identifier +LayerStackIdentifier + +incrementalRelocatesSourceToTarget +SdfRelocatesMap + +incrementalRelocatesTargetToSource +SdfRelocatesMap + +layerOffsets + +layerTree +LayerTree + +layers +list[SdfLayerRefPtr] + +localErrors +list[PcpError] + +mutedLayers +set[str] + +pathsToPrimsWithRelocates +list[SdfPath] + +relocatesSourceToTarget +SdfRelocatesMap + +relocatesTargetToSource +SdfRelocatesMap + +property expired +True if this object has expired, False otherwise. + +property identifier +LayerStackIdentifier +Returns the identifier for this layer stack. + +Type +type + +property incrementalRelocatesSourceToTarget +SdfRelocatesMap +Returns incremental relocation source-to-target mapping for this layer +stack. +This map contains the individual relocation entries found across all +layers in this layer stack; it does not combine ancestral entries with +descendant entries. For instance, if this layer stack contains +relocations { /A: /B} and { /A/C: /A/D}, this map will contain { /A: +/B} and { /A/C: /A/D}. + +Type +type + +property incrementalRelocatesTargetToSource +SdfRelocatesMap +Returns incremental relocation target-to-source mapping for this layer +stack. +See GetIncrementalRelocatesTargetToSource for more details. + +Type +type + +property layerOffsets + +property layerTree +LayerTree +Returns the layer tree representing the structure of this layer stack. + +Type +type + +property layers +list[SdfLayerRefPtr] +Returns the layers in this layer stack in strong-to-weak order. +Note that this is only the local layer stack it does not include +any layers brought in by references inside prims. + +Type +type + +property localErrors +list[PcpError] +Return the list of errors local to this layer stack. + +Type +type + +property mutedLayers +set[str] +Returns the set of layers that were muted in this layer stack. + +Type +type + +property pathsToPrimsWithRelocates +list[SdfPath] +Returns a list of paths to all prims across all layers in this layer +stack that contained relocates. + +Type +type + +property relocatesSourceToTarget +SdfRelocatesMap +Returns relocation source-to-target mapping for this layer stack. +This map combines the individual relocation entries found across all +layers in this layer stack; multiple entries that affect a single prim +will be combined into a single entry. For instance, if this layer +stack contains relocations { /A: /B} and { /A/C: /A/D}, this map will +contain { /A: /B} and { /B/C: /B/D}. This allows consumers to go from +unrelocated namespace to relocated namespace in a single step. + +Type +type + +property relocatesTargetToSource +SdfRelocatesMap +Returns relocation target-to-source mapping for this layer stack. +See GetRelocatesSourceToTarget for more details. + +Type +type + +class pxr.Pcp.LayerStackIdentifier +Arguments used to identify a layer stack. +Objects of this type are immutable. +Attributes: + +pathResolverContext + +rootLayer + +sessionLayer + +property pathResolverContext + +property rootLayer + +property sessionLayer + +class pxr.Pcp.LayerStackSite +A site specifies a path in a layer stack of scene description. +Attributes: + +layerStack + +path + +property layerStack + +property path + +class pxr.Pcp.MapExpression +An expression that yields a PcpMapFunction value. +Expressions comprise constant values, variables, and operators applied +to sub-expressions. Expressions cache their computed values +internally. Assigning a new value to a variable automatically +invalidates the cached values of dependent expressions. Common +(sub-)expressions are automatically detected and shared. +PcpMapExpression exists solely to support efficient incremental +handling of relocates edits. It represents a tree of the namespace +mapping operations and their inputs, so we can narrowly redo the +computation when one of the inputs changes. +Methods: + +AddRootIdentity() +Return a new expression representing this expression with an added (if necessary) mapping fromto. + +Compose(f) +Create a new PcpMapExpression representing the application of f's value, followed by the application of this expression's value. + +Constant +classmethod Constant(constValue) -> MapExpression + +Evaluate() +Evaluate this expression, yielding a PcpMapFunction value. + +Identity +classmethod Identity() -> MapExpression + +Inverse() +Create a new PcpMapExpression representing the inverse of f. + +MapSourceToTarget(path) +Map a path in the source namespace to the target. + +MapTargetToSource(path) +Map a path in the target namespace to the source. + +Attributes: + +isIdentity +bool + +isNull +bool + +timeOffset +LayerOffset + +AddRootIdentity() → MapExpression +Return a new expression representing this expression with an added (if +necessary) mapping fromto. + +Compose(f) → MapExpression +Create a new PcpMapExpression representing the application of f’s +value, followed by the application of this expression’s value. + +Parameters +f (MapExpression) – + +static Constant() +classmethod Constant(constValue) -> MapExpression +Create a new constant. + +Parameters +constValue (Value) – + +Evaluate() → Value +Evaluate this expression, yielding a PcpMapFunction value. +The computed result is cached. The return value is a reference to the +internal cached value. The cache is automatically invalidated as +needed. + +static Identity() +classmethod Identity() -> MapExpression +Return an expression representing PcpMapFunction::Identity() . + +static Inverse() → MapExpression +Create a new PcpMapExpression representing the inverse of f. + +MapSourceToTarget(path) → Path +Map a path in the source namespace to the target. +If the path is not in the domain, returns an empty path. + +Parameters +path (Path) – + +MapTargetToSource(path) → Path +Map a path in the target namespace to the source. +If the path is not in the co-domain, returns an empty path. + +Parameters +path (Path) – + +property isIdentity +bool +Return true if the evaluated map function is the identity function. +For identity, MapSourceToTarget() always returns the path unchanged. + +Type +type + +property isNull +bool +Return true if this is a null expression. + +Type +type + +property timeOffset +LayerOffset +The time offset of the mapping. + +Type +type + +class pxr.Pcp.MapFunction +A function that maps values from one namespace (and time domain) to +another. It represents the transformation that an arc such as a +reference arc applies as it incorporates values across the arc. +Take the example of a reference arc, where a source pathis +referenced as a target path,. The source pathis the +source of the opinions; the target pathis where they are +incorporated in the scene. Values in the model that refer to paths +relative tomust be transformed to be relative +toinstead. The PcpMapFunction for the arc provides this +service. +Map functions have a specific domain, or set of values they can +operate on. Any values outside the domain cannot be mapped. The domain +precisely tracks what areas of namespace can be referred to across +various forms of arcs. +Map functions can be chained to represent a series of map operations +applied in sequence. The map function represent the cumulative effect +as efficiently as possible. For example, in the case of a chained +reference fromtototo, this is +effectively the same as a mapping directly fromto. +Representing the cumulative effect of arcs in this way is important +for handling larger scenes efficiently. +Map functions can be inverted. Formally, map functions are +bijections (one-to-one and onto), which ensures that they can be +inverted. Put differently, no information is lost by applying a map +function to set of values within its domain; they retain their +distinct identities and can always be mapped back. +One analogy that may or may not be helpful: In the same way a +geometric transform maps a model’s points in its rest space into the +world coordinates for a particular instance, a PcpMapFunction maps +values about a referenced model into the composed scene for a +particular instance of that model. But rather than translating and +rotating points, the map function shifts the values in namespace (and +time). +Methods: + +Compose(f) +Compose this map over the given map function. + +ComposeOffset(newOffset) +Compose this map function over a hypothetical map function that has an identity path mapping and offset . + +GetInverse() +Return the inverse of this map function. + +Identity +classmethod Identity() -> MapFunction + +IdentityPathMap +classmethod IdentityPathMap() -> PathMap + +MapSourceToTarget(path) +Map a path in the source namespace to the target. + +MapTargetToSource(path) +Map a path in the target namespace to the source. + +Attributes: + +isIdentity +bool + +isIdentityPathMapping +bool + +isNull +bool + +sourceToTargetMap +PathMap + +timeOffset +LayerOffset + +Compose(f) → MapFunction +Compose this map over the given map function. +The result will represent the application of f followed by the +application of this function. + +Parameters +f (MapFunction) – + +ComposeOffset(newOffset) → MapFunction +Compose this map function over a hypothetical map function that has an +identity path mapping and offset . +This is equivalent to building such a map function and invoking +Compose() , but is faster. + +Parameters +newOffset (LayerOffset) – + +GetInverse() → MapFunction +Return the inverse of this map function. +This returns a true inverse inv: for any path p in this function’s +domain that it maps to p’, inv(p’) ->p. + +static Identity() +classmethod Identity() -> MapFunction +Construct an identity map function. + +static IdentityPathMap() +classmethod IdentityPathMap() -> PathMap +Returns an identity path mapping. + +MapSourceToTarget(path) → Path +Map a path in the source namespace to the target. +If the path is not in the domain, returns an empty path. + +Parameters +path (Path) – + +MapTargetToSource(path) → Path +Map a path in the target namespace to the source. +If the path is not in the co-domain, returns an empty path. + +Parameters +path (Path) – + +property isIdentity +bool +Return true if the map function is the identity function. +The identity function has an identity path mapping and time offset. + +Type +type + +property isIdentityPathMapping +bool +Return true if the map function uses the identity path mapping. +If true, MapSourceToTarget() always returns the path unchanged. +However, this map function may have a non-identity time offset. + +Type +type + +property isNull +bool +Return true if this map function is the null function. +For a null function, MapSourceToTarget() always returns an empty path. + +Type +type + +property sourceToTargetMap +PathMap +The set of path mappings, from source to target. + +Type +type + +property timeOffset +LayerOffset +The time offset of the mapping. + +Type +type + +class pxr.Pcp.NodeRef +PcpNode represents a node in an expression tree for compositing scene +description. +A node represents the opinions from a particular site. In addition, it +may have child nodes, representing nested expressions that are +composited over/under this node. +Child nodes are stored and composited in strength order. +Each node holds information about the arc to its parent. This captures +both the relative strength of the sub-expression as well as any value- +mapping needed, such as to rename opinions from a model to use in a +particular instance. +Methods: + +CanContributeSpecs() +Returns true if this node is allowed to contribute opinions for composition, false otherwise. + +GetDepthBelowIntroduction() +Return the number of levels of namespace this node's site is below the level at which it was introduced by an arc. + +GetIntroPath() +Get the path that introduced this node. + +GetOriginRootNode() +Walk up to the root origin node for this node. + +GetPathAtIntroduction() +Returns the path for this node's site when it was introduced. + +GetRootNode() +Walk up to the root node of this expression. + +IsDueToAncestor() + +IsRootNode() +Returns true if this node is the root node of the prim index graph. + +Attributes: + +arcType +ArcType + +children + +hasSpecs +None + +hasSymmetry +None + +isCulled +bool + +isInert +bool + +isRestricted +bool + +layerStack +LayerStack + +mapToParent +MapExpression + +mapToRoot +MapExpression + +namespaceDepth +int + +origin + +parent + +path +Path + +permission +Permission + +siblingNumAtOrigin +int + +site +LayerStackSite + +CanContributeSpecs() → bool +Returns true if this node is allowed to contribute opinions for +composition, false otherwise. + +GetDepthBelowIntroduction() → int +Return the number of levels of namespace this node’s site is below the +level at which it was introduced by an arc. + +GetIntroPath() → Path +Get the path that introduced this node. +Specifically, this is the path the parent node had at the level of +namespace where this node was added as a child. For a root node, this +returns the absolute root path. See also GetDepthBelowIntroduction() . + +GetOriginRootNode() → NodeRef +Walk up to the root origin node for this node. +This is the very first node that caused this node to be added to the +graph. For instance, the root origin node of an implied inherit is the +original inherit node. + +GetPathAtIntroduction() → Path +Returns the path for this node’s site when it was introduced. + +GetRootNode() → NodeRef +Walk up to the root node of this expression. + +IsDueToAncestor() → bool + +IsRootNode() → bool +Returns true if this node is the root node of the prim index graph. + +property arcType +ArcType +Returns the type of arc connecting this node to its parent node. + +Type +type + +property children + +property hasSpecs +None +Returns true if this node has opinions authored for composition, false +otherwise. + +Type +type + +property hasSymmetry +None +Get/set whether this node provides any symmetry opinions, either +directly or from a namespace ancestor. + +Type +type + +property isCulled +bool + +Type +type + +property isInert +bool + +Type +type + +property isRestricted +bool + +Type +type + +property layerStack +LayerStack +Returns the layer stack for the site this node represents. + +Type +type + +property mapToParent +MapExpression +Returns mapping function used to translate paths and values from this +node to its parent node. + +Type +type + +property mapToRoot +MapExpression +Returns mapping function used to translate paths and values from this +node directly to the root node. + +Type +type + +property namespaceDepth +int +Returns the absolute namespace depth of the node that introduced this +node. +Note that this does not count any variant selections. + +Type +type + +property origin + +property parent + +property path +Path +Returns the path for the site this node represents. + +Type +type + +property permission +Permission + +type : None +Get/set the permission for this node. +This indicates whether specs on this node can be accessed from other +nodes. + +Type +type + +property siblingNumAtOrigin +int +Returns this node’s index among siblings with the same arc type at +this node’s origin. + +Type +type + +property site +LayerStackSite +Get the site this node represents. + +Type +type + +class pxr.Pcp.PrimIndex +PcpPrimIndex is an index of the all sites of scene description that +contribute opinions to a specific prim, under composition semantics. +PcpComputePrimIndex() builds an index (“indexes”) the given prim site. +At any site there may be scene description values expressing arcs that +represent instructions to pull in further scene description. +PcpComputePrimIndex() recursively follows these arcs, building and +ordering the results. +Methods: + +ComposeAuthoredVariantSelections() +Compose the authored prim variant selections. + +ComputePrimChildNames(nameOrder, ...) +Compute the prim child names for the given path. + +ComputePrimPropertyNames(nameOrder) +Compute the prim property names for the given path. + +DumpToDotGraph(filename, ...) +Dump the prim index in dot format to the file named filename . + +DumpToString(includeInheritOriginInfo, ...) +Dump the prim index contents to a string. + +GetNodeProvidingSpec(primSpec) +Returns the node that brings opinions from primSpec into this prim index. + +GetSelectionAppliedForVariantSet(variantSet) +Return the variant selection applied for the named variant set. + +IsInstanceable() +Returns true if this prim index is instanceable. + +IsValid() +Return true if this index is valid. + +PrintStatistics() +Prints various statistics about this prim index. + +Attributes: + +hasAnyPayloads + +localErrors +list[PcpError] + +primStack + +rootNode +NodeRef + +ComposeAuthoredVariantSelections() → SdfVariantSelectionMap +Compose the authored prim variant selections. +These are the variant selections expressed in scene description. Note +that these selections may not have actually been applied, if they are +invalid. +This result is not cached, but computed each time. + +ComputePrimChildNames(nameOrder, prohibitedNameSet) → None +Compute the prim child names for the given path. +errors will contain any errors encountered while performing this +operation. + +Parameters + +nameOrder (list[TfToken]) – +prohibitedNameSet (PcpTokenSet) – + +ComputePrimPropertyNames(nameOrder) → None +Compute the prim property names for the given path. +errors will contain any errors encountered while performing this +operation. The nameOrder vector must not contain any duplicate +entries. + +Parameters +nameOrder (list[TfToken]) – + +DumpToDotGraph(filename, includeInheritOriginInfo, includeMaps) → None +Dump the prim index in dot format to the file named filename . +See Dump(...) for information regarding arguments. + +Parameters + +filename (str) – +includeInheritOriginInfo (bool) – +includeMaps (bool) – + +DumpToString(includeInheritOriginInfo, includeMaps) → str +Dump the prim index contents to a string. +If includeInheritOriginInfo is true , output for implied +inherit nodes will include information about the originating inherit +node. If includeMaps is true , output for each node will +include the mappings to the parent and root node. + +Parameters + +includeInheritOriginInfo (bool) – +includeMaps (bool) – + +GetNodeProvidingSpec(primSpec) → NodeRef +Returns the node that brings opinions from primSpec into this prim +index. +If no such node exists, returns an invalid PcpNodeRef. + +Parameters +primSpec (PrimSpec) – + +GetNodeProvidingSpec(layer, path) -> NodeRef +Returns the node that brings opinions from the Sd prim spec at +layer and path into this prim index. +If no such node exists, returns an invalid PcpNodeRef. + +Parameters + +layer (Layer) – +path (Path) – + +GetSelectionAppliedForVariantSet(variantSet) → str +Return the variant selection applied for the named variant set. +If none was applied, this returns an empty string. This can be +different from the authored variant selection; for example, if the +authored selection is invalid. + +Parameters +variantSet (str) – + +IsInstanceable() → bool +Returns true if this prim index is instanceable. +Instanceable prim indexes with the same instance key are guaranteed to +have the same set of opinions, but may not have local opinions about +name children. +PcpInstanceKey + +IsValid() → bool +Return true if this index is valid. +A default-constructed index is invalid. + +PrintStatistics() → None +Prints various statistics about this prim index. + +property hasAnyPayloads + +property localErrors +list[PcpError] +Return the list of errors local to this prim. + +Type +type + +property primStack + +property rootNode +NodeRef +Returns the root node of the prim index graph. + +Type +type + +class pxr.Pcp.PropertyIndex +PcpPropertyIndex is an index of all sites in scene description that +contribute opinions to a specific property, under composition +semantics. +Attributes: + +localErrors +list[PcpError] + +localPropertyStack + +propertyStack + +property localErrors +list[PcpError] +Return the list of errors local to this property. + +Type +type + +property localPropertyStack + +property propertyStack + +class pxr.Pcp.Site +A site specifies a path in a layer stack of scene description. +Attributes: + +layerStack + +path + +property layerStack + +property path + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/PhysicsSchemaTools.md b/PhysicsSchemaTools.md new file mode 100644 index 0000000000000000000000000000000000000000..2b36d4ed7f758835faecfd51836eb20d17141c42 --- /dev/null +++ b/PhysicsSchemaTools.md @@ -0,0 +1,422 @@ + + +PhysicsSchemaTools module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +PhysicsSchemaTools module + +  + +# PhysicsSchemaTools module + +Summary: Omniverse-specific: The Physics Schema Tools provides tools for the representation of physics properties and behaviors in a 3D scene, such as gravity, collisions, and rigid body dynamics. + +Classes: + +Path(*args, **kwargs) +PurePath subclass that can make system calls. + +Functions: + +addActor + +addBoxCollisionShape + +addCollisionShape + +addDensity + +addDisplayColor + +addGroundPlane + +addGroundTriMesh + +addOrientation + +addPhysicsScene + +addPosition + +addRigidBody + +addRigidBox + +addRigidBoxForInstancing + +addRigidCapsule + +addRigidCone + +addRigidCylinder + +addRigidSphere + +addVelocity + +createMesh + +createMeshBox + +createMeshCapsule + +createMeshCylinder + +createMeshSphere + +createMeshSquare + +decodeSdfPath + +encodeSdfPath + +getMassSpaceInertia + +intToSdfPath + +sdfPathToInt + +class pxr.PhysicsSchemaTools.Path(*args, **kwargs) +PurePath subclass that can make system calls. +Path represents a filesystem path but unlike PurePath, also offers +methods to do system calls on path objects. Depending on your system, +instantiating a Path will return either a PosixPath or a WindowsPath +object. You can also instantiate a PosixPath or WindowsPath directly, +but cannot instantiate a WindowsPath on a POSIX system or vice versa. +Methods: + +absolute() +Return an absolute version of this path. + +chmod(mode, *[, follow_symlinks]) +Change the permissions of the path, like os.chmod(). + +cwd() +Return a new path pointing to the current working directory (as returned by os.getcwd()). + +exists() +Whether this path exists. + +expanduser() +Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser) + +glob(pattern) +Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern. + +group() +Return the group name of the file gid. + +hardlink_to(target) +Make this path a hard link pointing to the same file as target. + +home() +Return a new path pointing to the user's home directory (as returned by os.path.expanduser('~')). + +is_block_device() +Whether this path is a block device. + +is_char_device() +Whether this path is a character device. + +is_dir() +Whether this path is a directory. + +is_fifo() +Whether this path is a FIFO. + +is_file() +Whether this path is a regular file (also True for symlinks pointing to regular files). + +is_mount() +Check if this path is a POSIX mount point + +is_socket() +Whether this path is a socket. + +is_symlink() +Whether this path is a symbolic link. + +iterdir() +Iterate over the files in this directory. + +lchmod(mode) +Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's. + +link_to(target) +Make the target path a hard link pointing to this path. + +lstat() +Like stat(), except if the path points to a symlink, the symlink's status information is returned, rather than its target's. + +mkdir([mode, parents, exist_ok]) +Create a new directory at this given path. + +open([mode, buffering, encoding, errors, ...]) +Open the file pointed by this path and return a file object, as the built-in open() function does. + +owner() +Return the login name of the file owner. + +read_bytes() +Open the file in bytes mode, read it, and close the file. + +read_text([encoding, errors]) +Open the file in text mode, read it, and close the file. + +readlink() +Return the path to which the symbolic link points. + +rename(target) +Rename this path to the target path. + +replace(target) +Rename this path to the target path, overwriting if that path exists. + +resolve([strict]) +Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows). + +rglob(pattern) +Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree. + +rmdir() +Remove this directory. + +samefile(other_path) +Return whether other_path is the same or not as this file (as returned by os.path.samefile()). + +stat(*[, follow_symlinks]) +Return the result of the stat() system call on this path, like os.stat() does. + +symlink_to(target[, target_is_directory]) +Make this path a symlink pointing to the target path. + +touch([mode, exist_ok]) +Create this file with the given access mode, if it doesn't exist. + +unlink([missing_ok]) +Remove this file or link. + +write_bytes(data) +Open the file in bytes mode, write to it, and close the file. + +write_text(data[, encoding, errors, newline]) +Open the file in text mode, write to it, and close the file. + +absolute() +Return an absolute version of this path. This function works +even if the path doesn’t point to anything. +No normalization is done, i.e. all ‘.’ and ‘..’ will be kept along. +Use resolve() to get the canonical path to a file. + +chmod(mode, *, follow_symlinks=True) +Change the permissions of the path, like os.chmod(). + +classmethod cwd() +Return a new path pointing to the current working directory +(as returned by os.getcwd()). + +exists() +Whether this path exists. + +expanduser() +Return a new path with expanded ~ and ~user constructs +(as returned by os.path.expanduser) + +glob(pattern) +Iterate over this subtree and yield all existing files (of any +kind, including directories) matching the given relative pattern. + +group() +Return the group name of the file gid. + +hardlink_to(target) +Make this path a hard link pointing to the same file as target. +Note the order of arguments (self, target) is the reverse of os.link’s. + +classmethod home() +Return a new path pointing to the user’s home directory (as +returned by os.path.expanduser(‘~’)). + +is_block_device() +Whether this path is a block device. + +is_char_device() +Whether this path is a character device. + +is_dir() +Whether this path is a directory. + +is_fifo() +Whether this path is a FIFO. + +is_file() +Whether this path is a regular file (also True for symlinks pointing +to regular files). + +is_mount() +Check if this path is a POSIX mount point + +is_socket() +Whether this path is a socket. + +is_symlink() +Whether this path is a symbolic link. + +iterdir() +Iterate over the files in this directory. Does not yield any +result for the special paths ‘.’ and ‘..’. + +lchmod(mode) +Like chmod(), except if the path points to a symlink, the symlink’s +permissions are changed, rather than its target’s. + +link_to(target) +Make the target path a hard link pointing to this path. +Note this function does not make this path a hard link to target, +despite the implication of the function and argument names. The order +of arguments (target, link) is the reverse of Path.symlink_to, but +matches that of os.link. +Deprecated since Python 3.10 and scheduled for removal in Python 3.12. +Use hardlink_to() instead. + +lstat() +Like stat(), except if the path points to a symlink, the symlink’s +status information is returned, rather than its target’s. + +mkdir(mode=511, parents=False, exist_ok=False) +Create a new directory at this given path. + +open(mode='r', buffering=-1, encoding=None, errors=None, newline=None) +Open the file pointed by this path and return a file object, as +the built-in open() function does. + +owner() +Return the login name of the file owner. + +read_bytes() +Open the file in bytes mode, read it, and close the file. + +read_text(encoding=None, errors=None) +Open the file in text mode, read it, and close the file. + +readlink() +Return the path to which the symbolic link points. + +rename(target) +Rename this path to the target path. +The target path may be absolute or relative. Relative paths are +interpreted relative to the current working directory, not the +directory of the Path object. +Returns the new Path instance pointing to the target path. + +replace(target) +Rename this path to the target path, overwriting if that path exists. +The target path may be absolute or relative. Relative paths are +interpreted relative to the current working directory, not the +directory of the Path object. +Returns the new Path instance pointing to the target path. + +resolve(strict=False) +Make the path absolute, resolving all symlinks on the way and also +normalizing it (for example turning slashes into backslashes under +Windows). + +rglob(pattern) +Recursively yield all existing files (of any kind, including +directories) matching the given relative pattern, anywhere in +this subtree. + +rmdir() +Remove this directory. The directory must be empty. + +samefile(other_path) +Return whether other_path is the same or not as this file +(as returned by os.path.samefile()). + +stat(*, follow_symlinks=True) +Return the result of the stat() system call on this path, like +os.stat() does. + +symlink_to(target, target_is_directory=False) +Make this path a symlink pointing to the target path. +Note the order of arguments (link, target) is the reverse of os.symlink. + +touch(mode=438, exist_ok=True) +Create this file with the given access mode, if it doesn’t exist. + +unlink(missing_ok=False) +Remove this file or link. +If the path is a directory, use rmdir() instead. + +write_bytes(data) +Open the file in bytes mode, write to it, and close the file. + +write_text(data, encoding=None, errors=None, newline=None) +Open the file in text mode, write to it, and close the file. + +pxr.PhysicsSchemaTools.addActor() + +pxr.PhysicsSchemaTools.addBoxCollisionShape() + +pxr.PhysicsSchemaTools.addCollisionShape() + +pxr.PhysicsSchemaTools.addDensity() + +pxr.PhysicsSchemaTools.addDisplayColor() + +pxr.PhysicsSchemaTools.addGroundPlane() + +pxr.PhysicsSchemaTools.addGroundTriMesh() + +pxr.PhysicsSchemaTools.addOrientation() + +pxr.PhysicsSchemaTools.addPhysicsScene() + +pxr.PhysicsSchemaTools.addPosition() + +pxr.PhysicsSchemaTools.addRigidBody() + +pxr.PhysicsSchemaTools.addRigidBox() + +pxr.PhysicsSchemaTools.addRigidBoxForInstancing() + +pxr.PhysicsSchemaTools.addRigidCapsule() + +pxr.PhysicsSchemaTools.addRigidCone() + +pxr.PhysicsSchemaTools.addRigidCylinder() + +pxr.PhysicsSchemaTools.addRigidSphere() + +pxr.PhysicsSchemaTools.addVelocity() + +pxr.PhysicsSchemaTools.createMesh() + +pxr.PhysicsSchemaTools.createMeshBox() + +pxr.PhysicsSchemaTools.createMeshCapsule() + +pxr.PhysicsSchemaTools.createMeshCylinder() + +pxr.PhysicsSchemaTools.createMeshSphere() + +pxr.PhysicsSchemaTools.createMeshSquare() + +pxr.PhysicsSchemaTools.decodeSdfPath() + +pxr.PhysicsSchemaTools.encodeSdfPath() + +pxr.PhysicsSchemaTools.getMassSpaceInertia() + +pxr.PhysicsSchemaTools.intToSdfPath() + +pxr.PhysicsSchemaTools.sdfPathToInt() + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Plug.md b/Plug.md new file mode 100644 index 0000000000000000000000000000000000000000..f2b3cb9f419d020e90a10a29b323665f5a1910e5 --- /dev/null +++ b/Plug.md @@ -0,0 +1,580 @@ + + +Plug module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Plug module + +  + +# Plug module + +Summary: Provides a plug-in framework implementation. Define interfaces, discover, register, and apply plug-in modules to nodes. + +This package defines facilities for dealing with plugins. +Classes: + +Notice +Notifications sent by the Plug module. + +Plugin +Defines an interface to registered plugins. + +Registry +Defines an interface for registering plugins. + +class pxr.Plug.Notice +Notifications sent by the Plug module. +Classes: + +Base + +DidRegisterPlugins + +class Base + +class DidRegisterPlugins +Methods: + +GetNewPlugins + +GetNewPlugins() + +class pxr.Plug.Plugin +Defines an interface to registered plugins. +Plugins are registered using the interfaces in PlugRegistry . +For each registered plugin, there is an instance of PlugPlugin +which can be used to load and unload the plugin and to retrieve +information about the classes implemented by the plugin. +Methods: + +DeclaresType(type, includeSubclasses) +Returns true if type is declared by this plugin. + +FindPluginResource(path, verify) +Find a plugin resource by absolute or relative path optionally verifying that file exists. + +GetMetadataForType(type) +Returns the metadata sub-dictionary for a particular type. + +Load() +Loads the plugin. + +MakeResourcePath(path) +Build a plugin resource path by returning a given absolute path or combining the plugin's resource path with a given relative path. + +Attributes: + +expired +True if this object has expired, False otherwise. + +isLoaded +bool + +isPythonModule +bool + +isResource +bool + +metadata +JsObject + +name +str + +path +str + +resourcePath +str + +DeclaresType(type, includeSubclasses) → bool +Returns true if type is declared by this plugin. +If includeSubclasses is specified, also returns true if any +subclasses of type have been declared. + +Parameters + +type (Type) – +includeSubclasses (bool) – + +FindPluginResource(path, verify) → str +Find a plugin resource by absolute or relative path optionally +verifying that file exists. +If verification fails an empty path is returned. Relative paths are +relative to the plugin’s resource path. + +Parameters + +path (str) – +verify (bool) – + +GetMetadataForType(type) → JsObject +Returns the metadata sub-dictionary for a particular type. + +Parameters +type (Type) – + +Load() → bool +Loads the plugin. +This is a noop if the plugin is already loaded. + +MakeResourcePath(path) → str +Build a plugin resource path by returning a given absolute path or +combining the plugin’s resource path with a given relative path. + +Parameters +path (str) – + +property expired +True if this object has expired, False otherwise. + +property isLoaded +bool +Returns true if the plugin is currently loaded. +Resource plugins always report as loaded. + +Type +type + +property isPythonModule +bool +Returns true if the plugin is a python module. + +Type +type + +property isResource +bool +Returns true if the plugin is resource-only. + +Type +type + +property metadata +JsObject +Returns the dictionary containing meta-data for the plugin. + +Type +type + +property name +str +Returns the plugin’s name. + +Type +type + +property path +str +Returns the plugin’s filesystem path. + +Type +type + +property resourcePath +str +Returns the plugin’s resources filesystem path. + +Type +type + +class pxr.Plug.Registry +Defines an interface for registering plugins. +PlugRegistry maintains a registry of plug-ins known to the system and +provides an interface for base classes to load any plug-ins required +to instantiate a subclass of a given type. + +## Defining a Base Class API + +In order to use this facility you will generally provide a module +which defines the API for a plug-in base class. This API will be +sufficient for the application or framework to make use of custom +subclasses that will be written by plug-in developers. +For example, if you have an image processing application, you might +want to support plug-ins that implement image filters. You can define +an abstract base class for image filters that declares the API your +application will require image filters to implement; perhaps something +simple like C++ Code Example 1 (Doxygen only). +People writing custom filters would write a subclass of ImageFilter +that overrides the two methods, implementing their own special +filtering behavior. + +## Enabling Plug-in Loading for the Base Class + +In order for ImageFilter to be able to load plug-ins that implement +these custom subclasses, it must be registered with the TfType system. +The ImageFilter base class, as was mentioned earlier, should be made +available in a module that the application links with. This is done +so that plug-ins that want to provide ImageFilters can also link with +the module allowing them to subclass ImageFilter. + +## Registering Plug-ins + +A plug-in developer can now write plug-ins with ImageFilter +subclasses. Plug-ins can be implemented either as native dynamic +modules (either regular dynamic modules or framework bundles) or +as Python modules. +Plug-ins must be registered with the registry. All plugins are +registered via RegisterPlugins() . Plug-in Python modules must be +directly importable (in other words they must be able to be found in +Python’s module path.) Plugins are registered by providing a path or +paths to JSON files that describe the location, structure and contents +of the plugin. The standard name for these files in plugInfo.json. +Typically, the application that hosts plug-ins will locate and +register plug-ins at startup. +The plug-in facility is lazy. It does not dynamically load code from +plug-in bundles until that code is required. + +## plugInfo.json + +A plugInfo.json file has the following structure: +{ + # Comments are allowed and indicated by a hash at the start of a + # line or after spaces and tabs. They continue to the end of line. + # Blank lines are okay, too. + + # This is optional. It may contain any number of strings. + # Paths may be absolute or relative. + # Paths ending with slash have plugInfo.json appended automatically. + # '\*' may be used anywhere to match any character except slash. + # '\*\*' may be used anywhere to match any character including slash. + "Includes": [ + "/absolute/path/to/plugInfo.json", + "/absolute/path/to/custom.filename", + "/absolute/path/to/directory/with/plugInfo/", + "relative/path/to/plugInfo.json", + "relative/path/to/directory/with/plugInfo/", + "glob\*/pa\*th/\*to\*/\*/plugInfo.json", + "recursive/pa\*\*th/\*\*/" + ], + + # This is optional. It may contain any number of objects. + "Plugins": [ + { + # Type is required and may be "module", "python" or "resource". + "Type": "module", + + # Name is required. It should be the Python module name, + # the shared module name, or a unique resource name. + "Name": "myplugin", + + # Root is optional. It defaults to ".". + # This gives the path to the plugin as a whole if the plugin + # has substructure. For Python it should be the directory + # with the __init__.py file. The path is usually relative. + "Root": ".", + + # LibraryPath is required by Type "module" and unused + # otherwise. It gives the path to the shared module + # object, either absolute or relative to Root. + "LibraryPath": "libmyplugin.so", + + # ResourcePath is option. It defaults to ".". + # This gives the path to the plugin's resources directory. + # The path is either absolute or relative to Root. + "ResourcePath": "resources", + + # Info is required. It's described below. + "Info": { + # Plugin contents. + } + } + ] +} + +As a special case, if a plugInfo.json contains an object that doesn’t +have either the”Includes”or”Plugins”keys then it’s as if the object +was in a”Plugins”array. + +## Advertising a Plug-in’s Contents + +Once the plug-ins are registered, the plug-in facility must also be +able to tell what they contain. Specifically, it must be able to find +out what subclasses of what plug-in base classes each plug-in +contains. Plug-ins must advertise this information through their +plugInfo.json file in the”Info”key. In the”Info”object there should be +a key”Types”holding an object. +This”Types”object’s keys are names of subclasses and its values are +yet more objects (the subclass meta-data objects). The meta-data +objects can contain arbitrary key-value pairs. The plug-in mechanism +will look for a meta-data key called”displayName”whose value should be +the display name of the subclass. The plug-in mechanism will look for +a meta-data key called”bases”whose value should be an array of base +class type names. +For example, a bundle that contains a subclass of ImageFilter might +have a plugInfo.json that looks like the following example. +{ + "Types": { + "MyCustomCoolFilter" : { + "bases": ["ImageFilter"], + "displayName": "Add Coolness to Image" + # other arbitrary metadata for MyCustomCoolFilter here + } + } +} + +What this says is that the plug-in contains a type called +MyCustomCoolFilter which has a base class ImageFilter and that this +subclass should be called”Add Coolness to Image”in user-visible +contexts. +In addition to the”displayName”meta-data key which is actually known +to the plug-in facility, you may put whatever other information you +want into a class’meta-data dictionary. If your plug-in base class +wants to define custom keys that it requires all subclasses to +provide, you can do that. Or, if a plug-in writer wants to define +their own keys that their code will look for at runtime, that is OK as +well. + +## Working with Subclasses of a Plug-in Base Class + +Most code with uses types defined in plug-ins doesn’t deal with the +Plug API directly. Instead, the TfType interface is used to lookup +types and to manufacture instances. The TfType interface will take +care to load any required plugins. +To wrap up our example, the application that wants to actually use +ImageFilter plug-ins would probably do a couple of things. First, it +would get a list of available ImageFilters to present to the user. +This could be accomplished as shown in Python Code Example 2 (Doxygen +only). +Then, when the user picks a filter from the list, it would manufacture +and instance of the filter as shown in Python Code Example 3 (Doxygen +only). +As was mentioned earlier, this plug-in facility tries to be as lazy as +possible about loading the code associated with plug-ins. To that end, +loading of a plugin will be deferred until an instance of a type is +manufactured which requires the plugin. + +## Multiple Subclasses of Multiple Plug-in Base Classes + +It is possible for a bundle to implement multiple subclasses for a +plug-in base class if desired. If you want to package half a dozen +ImageFilter subclasses in one bundle, that will work fine. All must be +declared in the plugInfo.json. +It is possible for there to be multiple classes in your application or +framework that are plug-in base classes. Plug-ins that implement +subclasses of any of these base classes can all coexist. And, it is +possible to have subclasses of multiple plug-in base classes in the +same bundle. +When putting multiple subclasses (of the same or different base +classes) in a bundle, keep in mind that dynamic loading happens for +the whole bundle the first time any subclass is needed, the whole +bundle will be loaded. But this is generally not a big concern. +For example, say the example application also has a plug-in base +class”ImageCodec”that allows people to add support for reading and +writing other image formats. Imagine that you want to supply a plug-in +that has two codecs and a filter all in a single plug-in. Your +plugInfo.json”Info”object might look something like this example. +{ + "Types": { + "MyTIFFCodec": { + "bases": ["ImageCodec"], + "displayName": "TIFF Image" + }, + "MyJPEGCodec": { + "bases": ["ImageCodec"], + "displayName": "JPEG Image" + }, + "MyCustomCoolFilter" : { + "bases": ["ImageFilter"], + "displayName": "Add Coolness to Image" + } + } +} + +## Dependencies on Other Plug-ins + +If you write a plug-in that has dependencies on another plug-in that +you cannot (or do not want to) link against statically, you can +declare the dependencies in your plug-in’s plugInfo.json. A plug-in +declares dependencies on other classes with a PluginDependencies key +whose value is a dictionary. The keys of the dictionary are plug-in +base class names and the values are arrays of subclass names. +The following example contains an example of a plug-in that depends on +two classes from the plug-in in the previous example. +{ + "Types": { + "UltraCoolFilter": { + "bases": ["MyCustomCoolFilter"], + "displayName": "Add Unbelievable Coolness to Image" + # A subclass of MyCustomCoolFilter that also uses MyTIFFCodec + } + }, + "PluginDependencies": { + "ImageFilter": ["MyCustomCoolFilter"], + "ImageCodec": ["MyTIFFCodec"] + } +} + +The ImageFilter provided by the plug-in in this example depends on the +other ImageFilter MyCoolImageFilter and the ImageCodec MyTIFFCodec. +Before loading this plug-in, the plug-in facility will ensure that +those two classes are present, loading the plug-in that contains them +if needed. +Methods: + +FindDerivedTypeByName +classmethod FindDerivedTypeByName(base, typeName) -> Type + +FindTypeByName +classmethod FindTypeByName(typeName) -> Type + +GetAllDerivedTypes +classmethod GetAllDerivedTypes(base, result) -> None + +GetAllPlugins() +Returns all registered plug-ins. + +GetDirectlyDerivedTypes +classmethod GetDirectlyDerivedTypes(base) -> list[Type] + +GetPluginForType(t) +Returns the plug-in for the given type, or a null pointer if there is no registered plug-in. + +GetPluginWithName(name) +Returns a plugin with the specified module name. + +GetStringFromPluginMetaData(type, key) +Looks for a string associated with type and key and returns it, or an empty string if type or key are not found. + +RegisterPlugins(pathToPlugInfo) +Registers all plug-ins discovered at pathToPlugInfo. + +Attributes: + +expired +True if this object has expired, False otherwise. + +static FindDerivedTypeByName() +classmethod FindDerivedTypeByName(base, typeName) -> Type +Retrieve the TfType that derives from base and has the given +alias or type name typeName . +See the documentation for TfType::FindDerivedByName for more +information. Use this function if you expect that the derived type may +be provided by a plugin. Calling this function will incur plugin +discovery (but not loading) if plugin discovery has not yet occurred. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +Parameters + +base (Type) – +typeName (str) – + +FindDerivedTypeByName(typeName) -> Type +Retrieve the TfType that derives from Base and has the given +alias or type name typeName . +See the documentation for TfType::FindDerivedByName for more +information. Use this function if you expect that the derived type may +be provided by a plugin. Calling this function will incur plugin +discovery (but not loading) if plugin discovery has not yet occurred. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +Parameters +typeName (str) – + +static FindTypeByName() +classmethod FindTypeByName(typeName) -> Type +Retrieve the TfType corresponding to the given name . +See the documentation for TfType::FindByName for more information. +Use this function if you expect that name may name a type provided +by a plugin. Calling this function will incur plugin discovery (but +not loading) if plugin discovery has not yet occurred. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +Parameters +typeName (str) – + +static GetAllDerivedTypes() +classmethod GetAllDerivedTypes(base, result) -> None +Return the set of all types derived (directly or indirectly) from +base. +Use this function if you expect that plugins may provide types derived +from base. Otherwise, use TfType::GetAllDerivedTypes. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +Parameters + +base (Type) – +result (set[Type]) – + +GetAllDerivedTypes(result) -> None +Return the set of all types derived (directly or indirectly) from +Base. +Use this function if you expect that plugins may provide types derived +from base. Otherwise, use TfType::GetAllDerivedTypes. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +Parameters +result (set[Type]) – + +GetAllPlugins() → list[PlugPluginPtr] +Returns all registered plug-ins. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +static GetDirectlyDerivedTypes() +classmethod GetDirectlyDerivedTypes(base) -> list[Type] +Return a vector of types derived directly from base. +Use this function if you expect that plugins may provide types derived +from base. Otherwise, use TfType::GetDirectlyDerivedTypes. + +Parameters +base (Type) – + +GetPluginForType(t) → Plugin +Returns the plug-in for the given type, or a null pointer if there is +no registered plug-in. + +Parameters +t (Type) – + +GetPluginWithName(name) → Plugin +Returns a plugin with the specified module name. +Note that additional plugins may be registered during program runtime. +Plug-In Discovery & Registration + +Parameters +name (str) – + +GetStringFromPluginMetaData(type, key) → str +Looks for a string associated with type and key and returns it, or +an empty string if type or key are not found. + +Parameters + +type (Type) – +key (str) – + +RegisterPlugins(pathToPlugInfo) → list[PlugPluginPtr] +Registers all plug-ins discovered at pathToPlugInfo. +Sends PlugNotice::DidRegisterPlugins with any newly registered +plugins. + +Parameters +pathToPlugInfo (str) – + +RegisterPlugins(pathsToPlugInfo) -> list[PlugPluginPtr] +Registers all plug-ins discovered in any of pathsToPlugInfo. +Sends PlugNotice::DidRegisterPlugins with any newly registered +plugins. + +Parameters +pathsToPlugInfo (list[str]) – + +property expired +True if this object has expired, False otherwise. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Sdf.md b/Sdf.md new file mode 100644 index 0000000000000000000000000000000000000000..49a7e897476991a70a1152a8c04ff04c95afb588 --- /dev/null +++ b/Sdf.md @@ -0,0 +1,6880 @@ + + +Sdf module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Sdf module + +  + +# Sdf module + +Summary: The Sdf (Scene Description Foundation) provides foundations for serializing scene description and primitive abstractions for interacting. + +Classes: + +AngularUnit + +AssetPath +Contains an asset path and an optional resolved path. + +AssetPathArray +An array of type SdfAssetPath. + +AttributeSpec +A subclass of SdfPropertySpec that holds typed data. + +AuthoringError + +BatchNamespaceEdit +A description of an arbitrarily complex namespace edit. + +ChangeBlock +DANGER DANGER DANGER + +ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate + +ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec___ + +ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec___ + +ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec___ + +ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate + +ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec___ + +ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec___ + +CleanupEnabler +An RAII class which, when an instance is alive, enables scheduling of automatic cleanup of SdfLayers. + +DimensionlessUnit + +FastUpdateList + +FileFormat +Base class for file format implementations. + +Int64ListOp + +IntListOp + +Layer +A scene description container that can combine with other such containers to form simple component assets, and successively larger aggregates. + +LayerOffset +Represents a time offset and scale between layers. + +LayerTree +A SdfLayerTree is an immutable tree structure representing a sublayer stack and its recursive structure. + +LengthUnit + +ListEditorProxy_SdfNameKeyPolicy + +ListEditorProxy_SdfPathKeyPolicy + +ListEditorProxy_SdfPayloadTypePolicy + +ListEditorProxy_SdfReferenceTypePolicy + +ListOpType + +ListProxy_SdfNameKeyPolicy + +ListProxy_SdfNameTokenKeyPolicy + +ListProxy_SdfPathKeyPolicy + +ListProxy_SdfPayloadTypePolicy + +ListProxy_SdfReferenceTypePolicy + +ListProxy_SdfSubLayerTypePolicy + +MapEditProxy_VtDictionary + +MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath_____ + +MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string_____ + +NamespaceEdit +A single namespace edit. + +NamespaceEditDetail +Detailed information about a namespace edit. + +Notice +Wrapper class for Sdf notices. + +Path +A path value used to locate objects in layers or scenegraphs. + +PathArray +An array of type SdfPath. + +PathListOp + +Payload +Represents a payload and all its meta data. + +PayloadListOp + +Permission + +PrimSpec +Represents a prim description in an SdfLayer object. + +PropertySpec +Base class for SdfAttributeSpec and SdfRelationshipSpec. + +PseudoRootSpec + +Reference +Represents a reference and all its meta data. + +ReferenceListOp + +RelationshipSpec +A property that contains a reference to one or more SdfPrimSpec instances. + +Spec +Base class for all Sdf spec classes. + +SpecType + +Specifier + +StringListOp + +TimeCode +Value type that represents a time code. + +TimeCodeArray +An array of type SdfTimeCode. + +TokenListOp + +UInt64ListOp + +UIntListOp + +UnregisteredValue +Stores a representation of the value for an unregistered metadata field encountered during text layer parsing. + +UnregisteredValueListOp + +ValueBlock +A special value type that can be used to explicitly author an opinion for an attribute's default value or time sample value that represents having no value. + +ValueRoleNames + +ValueTypeName +Represents a value type name, i.e. an attribute's type name. + +ValueTypeNames + +Variability + +VariantSetSpec +Represents a coherent set of alternate representations for part of a scene. + +VariantSpec +Represents a single variant in a variant set. + +Functions: + +Find(layerFileName, scenePath) +layerFileName: string scenePath: Path + +class pxr.Sdf.AngularUnit +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.AngularUnitDegrees, Sdf.AngularUnitRadians) + +class pxr.Sdf.AssetPath +Contains an asset path and an optional resolved path. Asset paths may +contain non-control UTF-8 encoded characters. Specifically, +U+0000..U+001F (C0 controls), U+007F (delete), and +U+0080..U+009F (C1 controls) are disallowed. Attempts to construct +asset paths with such characters will issue a TfError and produce the +default-constructed empty asset path. +Attributes: + +path + +resolvedPath +str + +property path + +property resolvedPath +str +Return the resolved asset path, if any. +Note that SdfAssetPath carries a resolved path only if its creator +passed one to the constructor. SdfAssetPath never performs resolution +itself. + +type : str +Overload for rvalues, move out the asset path. + +Type +type + +class pxr.Sdf.AssetPathArray +An array of type SdfAssetPath. + +class pxr.Sdf.AttributeSpec +A subclass of SdfPropertySpec that holds typed data. +Attributes are typed data containers that can optionally hold any and +all of the following: + +A single default value. +An array of knot values describing how the value varies over +time. +A dictionary of posed values, indexed by name. +The values contained in an attribute must all be of the same type. In +the Python API the typeName property holds the attribute type. In +the C++ API, you can get the attribute type using the GetTypeName() +method. In addition, all values, including all knot values, must be +the same shape. For information on shapes, see the VtShape class +reference in the C++ documentation. + +Methods: + +ClearColorSpace() +Clears the colorSpace metadata value set on this attribute. + +HasColorSpace() +Returns true if this attribute has a colorSpace value authored. + +Attributes: + +ConnectionPathsKey + +DefaultValueKey + +DisplayUnitKey + +allowedTokens +The allowed value tokens for this property + +colorSpace +The color-space in which the attribute value is authored. + +connectionPathList +A PathListEditor for the attribute's connection paths. + +displayUnit +The display unit for this attribute. + +expired + +roleName +The roleName for this attribute's typeName. + +typeName +The typename of this attribute. + +valueType +The value type of this attribute. + +ClearColorSpace() → None +Clears the colorSpace metadata value set on this attribute. + +HasColorSpace() → bool +Returns true if this attribute has a colorSpace value authored. + +ConnectionPathsKey = 'connectionPaths' + +DefaultValueKey = 'default' + +DisplayUnitKey = 'displayUnit' + +property allowedTokens +The allowed value tokens for this property + +property colorSpace +The color-space in which the attribute value is authored. + +property connectionPathList +A PathListEditor for the attribute’s connection paths. +The list of the connection paths for this attribute may be modified with this PathListEditor. +A PathListEditor may express a list either as an explicit value or as a set of list editing operations. See GdListEditor for more information. + +property displayUnit +The display unit for this attribute. + +property expired + +property roleName +The roleName for this attribute’s typeName. + +property typeName +The typename of this attribute. + +property valueType +The value type of this attribute. + +class pxr.Sdf.AuthoringError +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.AuthoringErrorUnrecognizedFields, Sdf.AuthoringErrorUnrecognizedSpecType) + +class pxr.Sdf.BatchNamespaceEdit +A description of an arbitrarily complex namespace edit. +A SdfBatchNamespaceEdit object describes zero or more namespace +edits. Various types providing a namespace will allow the edits to be +applied in a single operation and also allow testing if this will +work. +Clients are encouraged to group several edits into one object because +that may allow more efficient processing of the edits. If, for +example, you need to reparent several prims it may be faster to add +all of the reparents to a single SdfBatchNamespaceEdit and apply +them at once than to apply each separately. +Objects that allow applying edits are free to apply the edits in any +way and any order they see fit but they should guarantee that the +resulting namespace will be as if each edit was applied one at a time +in the order they were added. +Note that the above rule permits skipping edits that have no effect or +generate a non-final state. For example, if renaming A to B then to C +we could just rename A to C. This means notices may be elided. +However, implementations must not elide notices that contain +information about any edit that clients must be able to know but +otherwise cannot determine. +Methods: + +Add(edit) +Add a namespace edit. + +Process(processedEdits, hasObjectAtPath, ...) +Validate the edits and generate a possibly more efficient edit sequence. + +Attributes: + +edits +list[SdfNamespaceEdit] + +Add(edit) → None +Add a namespace edit. + +Parameters +edit (NamespaceEdit) – + +Add(currentPath, newPath, index) -> None +Add a namespace edit. + +Parameters + +currentPath (NamespaceEdit.Path) – +newPath (NamespaceEdit.Path) – +index (NamespaceEdit.Index) – + +Process(processedEdits, hasObjectAtPath, canEdit, details, fixBackpointers) → bool +Validate the edits and generate a possibly more efficient edit +sequence. +Edits are treated as if they were performed one at time in sequence, +therefore each edit occurs in the namespace resulting from all +previous edits. +Editing the descendants of the object in each edit is implied. If an +object is removed then the new path will be empty. If an object is +removed after being otherwise edited, the other edits will be +processed and included in processedEdits followed by the removal. +This allows clients to fixup references to point to the object’s final +location prior to removal. +This function needs help to determine if edits are allowed. The +callbacks provide that help. hasObjectAtPath returns true iff +there’s an object at the given path. This path will be in the original +namespace not any intermediate or final namespace. canEdit returns +true iff the object at the current path can be namespace edited to +the new path, ignoring whether an object already exists at the new +path. Both paths are in the original namespace. If it returns +false it should set the string to the reason why the edit isn’t +allowed. It should not write either path to the string. +If hasObjectAtPath is invalid then this assumes objects exist +where they should and don’t exist where they shouldn’t. Use this with +care. If canEdit in invalid then it’s assumed all edits are valid. +If fixBackpointers is true then target/connection paths are +expected to be in the intermediate namespace resulting from all +previous edits. If false and any current or new path contains a +target or connection path that has been edited then this will generate +an error. +This method returns true if the edits are allowed and sets +processedEdits to a new edit sequence at least as efficient as the +input sequence. If not allowed it returns false and appends +reasons why not to details . + +Parameters + +processedEdits (list[SdfNamespaceEdit]) – +hasObjectAtPath (HasObjectAtPath) – +canEdit (CanEdit) – +details (list[SdfNamespaceEditDetail]) – +fixBackpointers (bool) – + +property edits +list[SdfNamespaceEdit] +Returns the edits. + +Type +type + +class pxr.Sdf.ChangeBlock +DANGER DANGER DANGER +Please make sure you have read and fully understand the issues below +before using a changeblock! They are very easy to use in an unsafe way +that could make the system crash or corrupt data. If you have any +questions, please contact the USD team, who would be happy to help! +SdfChangeBlock provides a way to group a round of related changes to +scene description in order to process them more efficiently. +Normally, Sdf sends notification immediately as changes are made so +that downstream representations like UsdStage can update accordingly. +However, sometimes it can be advantageous to group a series of Sdf +changes into a batch so that they can be processed more efficiently, +with a single round of change processing. An example might be when +setting many avar values on a model at the same time. +Opening a changeblock tells Sdf to delay sending notification about +changes until the outermost changeblock is exited. Until then, Sdf +internally queues up the notification it needs to send. +It is not safe to use Usd or other downstream API while a +changeblock is open!! This is because those derived representations +will not have had a chance to update while the changeblock is open. +Not only will their view of the world be stale, it could be unsafe to +even make queries from, since they may be holding onto expired handles +to Sdf objects that no longer exist. If you need to make a bunch of +changes to scene description, the best approach is to build a list of +necessary changes that can be performed directly via the Sdf API, then +submit those all inside a changeblock without talking to any +downstream modules. For example, this is how many mutators in Usd +that operate on more than one field or Spec work. + +class pxr.Sdf.ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate +Classes: + +ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate_Iterator + +ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate_KeyIterator + +ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate_ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate_Iterator + +class ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate_KeyIterator + +class ChildrenView_Sdf_AttributeChildPolicy_SdfAttributeViewPredicate_ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec___ +Classes: + +ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec____Iterator + +ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec____KeyIterator + +ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec____ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec____Iterator + +class ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec____KeyIterator + +class ChildrenView_Sdf_AttributeChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfAttributeSpec____ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec___ +Classes: + +ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec____Iterator + +ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec____KeyIterator + +ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec____ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec____Iterator + +class ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec____KeyIterator + +class ChildrenView_Sdf_PrimChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPrimSpec____ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec___ +Classes: + +ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec____Iterator + +ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec____KeyIterator + +ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec____ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec____Iterator + +class ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec____KeyIterator + +class ChildrenView_Sdf_PropertyChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfPropertySpec____ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate +Classes: + +ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate_Iterator + +ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate_KeyIterator + +ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate_ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate_Iterator + +class ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate_KeyIterator + +class ChildrenView_Sdf_RelationshipChildPolicy_SdfRelationshipViewPredicate_ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec___ +Classes: + +ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec____Iterator + +ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec____KeyIterator + +ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec____ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec____Iterator + +class ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec____KeyIterator + +class ChildrenView_Sdf_VariantChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSpec____ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec___ +Classes: + +ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec____Iterator + +ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec____KeyIterator + +ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec____ValueIterator + +Methods: + +get + +index + +items + +keys + +values + +class ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec____Iterator + +class ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec____KeyIterator + +class ChildrenView_Sdf_VariantSetChildPolicy_SdfChildrenViewTrivialPredicate_SdfHandle_SdfVariantSetSpec____ValueIterator + +get() + +index() + +items() + +keys() + +values() + +class pxr.Sdf.CleanupEnabler +An RAII class which, when an instance is alive, enables scheduling of +automatic cleanup of SdfLayers. +Any affected specs which no longer contribute to the scene will be +removed when the last SdfCleanupEnabler instance goes out of scope. +Note that for this purpose, SdfPropertySpecs are removed if they have +only required fields (see SdfPropertySpecs::HasOnlyRequiredFields), +but only if the property spec itself was affected by an edit that left +it with only required fields. This will have the effect of +uninstantiating on-demand attributes. For example, if its parent prim +was affected by an edit that left it otherwise inert, it will not be +removed if it contains an SdfPropertySpec with only required fields, +but if the property spec itself is edited leaving it with only +required fields, it will be removed, potentially uninstantiating it if +it’s an on-demand property. +SdfCleanupEnablers are accessible in both C++ and Python. +/// SdfCleanupEnabler can be used in the following manner: +{ + SdfCleanupEnabler enabler; + + // Perform any action that might otherwise leave inert specs around, + // such as removing info from properties or prims, or removing name + // children. i.e: + primSpec->ClearInfo(SdfFieldKeys->Default); + + // When enabler goes out of scope on the next line, primSpec will + // be removed if it has been left as an empty over. +} + +class pxr.Sdf.DimensionlessUnit +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.DimensionlessUnitPercent, Sdf.DimensionlessUnitDefault) + +class pxr.Sdf.FastUpdateList +Classes: + +FastUpdate + +Attributes: + +fastUpdates + +hasCompositionDependents + +class FastUpdate +Attributes: + +path + +value + +property path + +property value + +property fastUpdates + +property hasCompositionDependents + +class pxr.Sdf.FileFormat +Base class for file format implementations. +Classes: + +Tokens + +Methods: + +CanRead(file) +Returns true if file can be read by this format. + +FindAllFileFormatExtensions +classmethod FindAllFileFormatExtensions() -> set[str] + +FindByExtension +classmethod FindByExtension(path, target) -> FileFormat + +FindById +classmethod FindById(formatId) -> FileFormat + +GetFileExtension +classmethod GetFileExtension(s) -> str + +GetFileExtensions() +Returns a list of extensions that this format supports. + +IsPackage() +Returns true if this file format is a package containing other assets. + +IsSupportedExtension(extension) +Returns true if extension matches one of the extensions returned by GetFileExtensions. + +Attributes: + +expired +True if this object has expired, False otherwise. + +fileCookie +str + +formatId +str + +primaryFileExtension +str + +target +str + +class Tokens +Attributes: + +TargetArg + +TargetArg = 'target' + +CanRead(file) → bool +Returns true if file can be read by this format. + +Parameters +file (str) – + +static FindAllFileFormatExtensions() +classmethod FindAllFileFormatExtensions() -> set[str] +Returns a set containing the extension(s) corresponding to all +registered file formats. + +static FindByExtension() +classmethod FindByExtension(path, target) -> FileFormat +Returns the file format instance that supports the extension for +path . +If a format with a matching extension is not found, this returns a +null file format pointer. +An extension may be handled by multiple file formats, but each with a +different target. In such cases, if no target is specified, the +file format that is registered as the primary plugin will be returned. +Otherwise, the file format whose target matches target will be +returned. + +Parameters + +path (str) – +target (str) – + +FindByExtension(path, args) -> FileFormat +Returns a file format instance that supports the extension for +path and whose target matches one of those specified by the given +args . +If the args specify no target, then the file format that is +registered as the primary plugin will be returned. If a format with a +matching extension is not found, this returns a null file format +pointer. + +Parameters + +path (str) – +args (FileFormatArguments) – + +static FindById() +classmethod FindById(formatId) -> FileFormat +Returns the file format instance with the specified formatId +identifier. +If a format with a matching identifier is not found, this returns a +null file format pointer. + +Parameters +formatId (str) – + +static GetFileExtension() +classmethod GetFileExtension(s) -> str +Returns the file extension for path or file name s , without the +leading dot character. + +Parameters +s (str) – + +GetFileExtensions() → list[str] +Returns a list of extensions that this format supports. + +IsPackage() → bool +Returns true if this file format is a package containing other assets. + +IsSupportedExtension(extension) → bool +Returns true if extension matches one of the extensions returned +by GetFileExtensions. + +Parameters +extension (str) – + +property expired +True if this object has expired, False otherwise. + +property fileCookie +str +Returns the cookie to be used when writing files with this format. + +Type +type + +property formatId +str +Returns the format identifier. + +Type +type + +property primaryFileExtension +str +Returns the primary file extension for this format. +This is the extension that is reported for layers using this file +format. + +Type +type + +property target +str +Returns the target for this file format. + +Type +type + +class pxr.Sdf.Int64ListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.IntListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.Layer +A scene description container that can combine with other such +containers to form simple component assets, and successively larger +aggregates. The contents of an SdfLayer adhere to the SdfData data +model. A layer can be ephemeral, or be an asset accessed and +serialized through the ArAsset and ArResolver interfaces. +The SdfLayer class provides a consistent API for accesing and +serializing scene description, using any data store provided by Ar +plugins. Sdf itself provides a UTF-8 text format for layers identified +by the”.sdf”identifier extension, but via the SdfFileFormat +abstraction, allows downstream modules and plugins to adapt arbitrary +data formats to the SdfData/SdfLayer model. +The FindOrOpen() method returns a new SdfLayer object with scene +description from any supported asset format. Once read, a layer +remembers which asset it was read from. The Save() method saves the +layer back out to the original asset. You can use the Export() method +to write the layer to a different location. You can use the +GetIdentifier() method to get the layer’s Id or GetRealPath() to get +the resolved, full URI. +Layers can have a timeCode range (startTimeCode and endTimeCode). This +range represents the suggested playback range, but has no impact on +the extent of the animation data that may be stored in the layer. The +metadatum”timeCodesPerSecond”is used to annotate how the time ordinate +for samples contained in the file scales to seconds. For example, if +timeCodesPerSecond is 24, then a sample at time ordinate 24 should be +viewed exactly one second after the sample at time ordinate 0. +Classes: + +DetachedLayerRules + +Methods: + +AddToMutedLayers +classmethod AddToMutedLayers(mutedPath) -> None + +Apply(arg1) +Performs a batch of namespace edits. + +ApplyRootPrimOrder(vec) +Reorders the given list of prim names according to the reorder rootPrims statement for this layer. + +CanApply(arg1, details) +Check if a batch of namespace edits will succeed. + +Clear() +Clears the layer of all content. + +ClearColorConfiguration() +Clears the color configuration metadata authored in this layer. + +ClearColorManagementSystem() +Clears the'colorManagementSystem'metadata authored in this layer. + +ClearCustomLayerData() +Clears out the CustomLayerData dictionary associated with this layer. + +ClearDefaultPrim() +Clear the default prim metadata for this layer. + +ClearEndTimeCode() +Clear the endTimeCode opinion. + +ClearFramePrecision() +Clear the framePrecision opinion. + +ClearFramesPerSecond() +Clear the framesPerSecond opinion. + +ClearOwner() +Clear the owner opinion. + +ClearSessionOwner() + +ClearStartTimeCode() +Clear the startTimeCode opinion. + +ClearTimeCodesPerSecond() +Clear the timeCodesPerSecond opinion. + +ComputeAbsolutePath(assetPath) +Returns the path to the asset specified by assetPath using this layer to anchor the path if necessary. + +CreateAnonymous +classmethod CreateAnonymous(tag, args) -> Layer + +CreateIdentifier +classmethod CreateIdentifier(layerPath, arguments) -> str + +CreateNew +classmethod CreateNew(identifier, args) -> Layer + +DumpLayerInfo +Debug helper to examine content of the current layer registry and the asset/real path of all layers in the registry. + +EraseTimeSample(path, time) + +param path + +Export(filename, comment, args) +Exports this layer to a file. + +ExportToString +Returns the string representation of the layer. + +Find(filename) +filename : string + +FindOrOpen +classmethod FindOrOpen(identifier, args) -> Layer + +FindOrOpenRelativeToLayer +classmethod FindOrOpenRelativeToLayer(anchor, identifier, args) -> Layer + +FindRelativeToLayer +Returns the open layer with the given filename, or None. + +GetAssetInfo() +Returns resolve information from the last time the layer identifier was resolved. + +GetAssetName() +Returns the asset name associated with this layer. + +GetAttributeAtPath(path) +Returns an attribute at the given path . + +GetBracketingTimeSamples(time, tLower, tUpper) + +param time + +GetBracketingTimeSamplesForPath(path, time, ...) + +param path + +GetCompositionAssetDependencies() +Return paths of all assets this layer depends on due to composition fields. + +GetDetachedLayerRules +classmethod GetDetachedLayerRules() -> DetachedLayerRules + +GetDisplayName() +Returns the layer's display name. + +GetDisplayNameFromIdentifier +classmethod GetDisplayNameFromIdentifier(identifier) -> str + +GetExternalAssetDependencies() +Returns a set of resolved paths to all external asset dependencies the layer needs to generate its contents. + +GetExternalReferences +Return a list of asset paths for this layer. + +GetFileFormat() +Returns the file format used by this layer. + +GetFileFormatArguments() +Returns the file format-specific arguments used during the construction of this layer. + +GetLoadedLayers +Return list of loaded layers. + +GetMutedLayers +Return list of muted layers. + +GetNumTimeSamplesForPath(path) + +param path + +GetObjectAtPath(path) +Returns the object at the given path . + +GetPrimAtPath(path) +Returns the prim at the given path . + +GetPropertyAtPath(path) +Returns a property at the given path . + +GetRelationshipAtPath(path) +Returns a relationship at the given path . + +HasColorConfiguration() +Returns true if color configuration metadata is set in this layer. + +HasColorManagementSystem() +Returns true if colorManagementSystem metadata is set in this layer. + +HasCustomLayerData() +Returns true if CustomLayerData is authored on the layer. + +HasDefaultPrim() +Return true if the default prim metadata is set in this layer. + +HasEndTimeCode() +Returns true if the layer has an endTimeCode opinion. + +HasFramePrecision() +Returns true if the layer has a frames precision opinion. + +HasFramesPerSecond() +Returns true if the layer has a frames per second opinion. + +HasOwner() +Returns true if the layer has an owner opinion. + +HasSessionOwner() +Returns true if the layer has a session owner opinion. + +HasStartTimeCode() +Returns true if the layer has a startTimeCode opinion. + +HasTimeCodesPerSecond() +Returns true if the layer has a timeCodesPerSecond opinion. + +Import(layerPath) +Imports the content of the given layer path, replacing the content of the current layer. + +ImportFromString(string) +Reads this layer from the given string. + +IsAnonymousLayerIdentifier +classmethod IsAnonymousLayerIdentifier(identifier) -> bool + +IsDetached() +Returns true if this layer is detached from its serialized data store, false otherwise. + +IsIncludedByDetachedLayerRules +classmethod IsIncludedByDetachedLayerRules(identifier) -> bool + +IsMuted +classmethod IsMuted() -> bool + +ListAllTimeSamples() + +ListTimeSamplesForPath(path) + +param path + +New +classmethod New(fileFormat, identifier, args) -> Layer + +OpenAsAnonymous +classmethod OpenAsAnonymous(layerPath, metadataOnly, tag) -> Layer + +QueryTimeSample(path, time, value) + +param path + +Reload(force) +Reloads the layer from its persistent representation. + +ReloadLayers +classmethod ReloadLayers(layers, force) -> bool + +RemoveFromMutedLayers +classmethod RemoveFromMutedLayers(mutedPath) -> None + +RemoveInertSceneDescription() +Removes all scene description in this layer that does not affect the scene. + +Save(force) +Returns true if successful, false if an error occurred. + +ScheduleRemoveIfInert(spec) +Cause spec to be removed if it no longer affects the scene when the last change block is closed, or now if there are no change blocks. + +SetDetachedLayerRules +classmethod SetDetachedLayerRules(mask) -> None + +SetMuted(muted) +Mutes the current layer if muted is true , and unmutes it otherwise. + +SetPermissionToEdit(allow) +Sets permission to edit. + +SetPermissionToSave(allow) +Sets permission to save. + +SetTimeSample(path, time, value) + +param path + +SplitIdentifier +classmethod SplitIdentifier(identifier, layerPath, arguments) -> bool + +StreamsData() +Returns true if this layer streams data from its serialized data store on demand, false otherwise. + +TransferContent(layer) +Copies the content of the given layer into this layer. + +Traverse(path, func) + +param path + +UpdateAssetInfo() +Update layer asset information. + +UpdateCompositionAssetDependency(...) +Updates the asset path of a composation dependency in this layer. + +UpdateExternalReference(oldAssetPath, ...) +Deprecated + +Attributes: + +ColorConfigurationKey + +ColorManagementSystemKey + +CommentKey + +DocumentationKey + +EndFrameKey + +EndTimeCodeKey + +FramePrecisionKey + +FramesPerSecondKey + +HasOwnedSubLayers + +OwnerKey + +SessionOwnerKey + +StartFrameKey + +StartTimeCodeKey + +TimeCodesPerSecondKey + +anonymous +bool + +colorConfiguration +The color configuration asset-path of this layer. + +colorManagementSystem +The name of the color management system used to interpret the colorConfiguration asset. + +comment +The layer's comment string. + +customLayerData +The customLayerData dictionary associated with this layer. + +defaultPrim +The layer's default reference target token. + +dirty +bool + +documentation +The layer's documentation string. + +empty +bool + +endTimeCode +The end timeCode of this layer. + +expired +True if this object has expired, False otherwise. + +externalReferences +Return unique list of asset paths of external references for given layer. + +fileExtension +The layer's file extension. + +framePrecision +The number of digits of precision used in times in this layer. + +framesPerSecond +The frames per second used in this layer. + +hasOwnedSubLayers +Whether this layer's sub layers are expected to have owners. + +identifier +The layer's identifier. + +owner +The owner of this layer. + +permissionToEdit +Return true if permitted to be edited (modified), false otherwise. + +permissionToSave +Return true if permitted to be saved, false otherwise. + +pseudoRoot +The pseudo-root of the layer. + +realPath +The layer's resolved path. + +repositoryPath +The layer's associated repository path + +resolvedPath +The layer's resolved path. + +rootPrimOrder +Get/set the list of root prim names for this layer's 'reorder rootPrims' statement. + +rootPrims +The root prims of this layer, as an ordered dictionary. + +sessionOwner +The session owner of this layer. + +startTimeCode +The start timeCode of this layer. + +subLayerOffsets +The sublayer offsets of this layer, as a list. + +subLayerPaths +The sublayer paths of this layer, as a list. + +timeCodesPerSecond +The timeCodes per second used in this layer. + +version +The layer's version. + +class DetachedLayerRules +Methods: + +Exclude + +GetExcluded + +GetIncluded + +Include + +IncludeAll + +IncludedAll + +IsIncluded + +Exclude() + +GetExcluded() + +GetIncluded() + +Include() + +IncludeAll() + +IncludedAll() + +IsIncluded() + +static AddToMutedLayers() +classmethod AddToMutedLayers(mutedPath) -> None +Add the specified path to the muted layers set. + +Parameters +mutedPath (str) – + +Apply(arg1) → bool +Performs a batch of namespace edits. +Returns true on success and false on failure. On failure, no +namespace edits will have occurred. + +Parameters +arg1 (BatchNamespaceEdit) – + +ApplyRootPrimOrder(vec) → None +Reorders the given list of prim names according to the reorder +rootPrims statement for this layer. +This routine employs the standard list editing operations for ordered +items in a ListEditor. + +Parameters +vec (list[str]) – + +CanApply(arg1, details) → NamespaceEditDetail.Result +Check if a batch of namespace edits will succeed. +This returns SdfNamespaceEditDetail::Okay if they will succeed as +a batch, SdfNamespaceEditDetail::Unbatched if the edits will +succeed but will be applied unbatched, and +SdfNamespaceEditDetail::Error if they will not succeed. No edits +will be performed in any case. +If details is not None and the method does not return Okay +then details about the problems will be appended to details . A +problem may cause the method to return early, so details may not +list every problem. +Note that Sdf does not track backpointers so it’s unable to fix up +targets/connections to namespace edited objects. Clients must fix +those to prevent them from falling off. In addition, this method will +report failure if any relational attribute with a target to a +namespace edited object is subsequently edited (in the same batch). +Clients should perform edits on relational attributes first. +Clients may wish to report unbatch details to the user to confirm that +the edits should be applied unbatched. This will give the user a +chance to correct any problems that cause batching to fail and try +again. + +Parameters + +arg1 (BatchNamespaceEdit) – +details (list[SdfNamespaceEditDetail]) – + +Clear() → None +Clears the layer of all content. +This restores the layer to a state as if it had just been created with +CreateNew() . This operation is Undo-able. +The fileName and whether journaling is enabled are not affected by +this method. + +ClearColorConfiguration() → None +Clears the color configuration metadata authored in this layer. +HasColorConfiguration() , SetColorConfiguration() + +ClearColorManagementSystem() → None +Clears the’colorManagementSystem’metadata authored in this layer. +HascolorManagementSystem(), SetColorManagementSystem() + +ClearCustomLayerData() → None +Clears out the CustomLayerData dictionary associated with this layer. + +ClearDefaultPrim() → None +Clear the default prim metadata for this layer. +See GetDefaultPrim() and SetDefaultPrim() . + +ClearEndTimeCode() → None +Clear the endTimeCode opinion. + +ClearFramePrecision() → None +Clear the framePrecision opinion. + +ClearFramesPerSecond() → None +Clear the framesPerSecond opinion. + +ClearOwner() → None +Clear the owner opinion. + +ClearSessionOwner() → None + +ClearStartTimeCode() → None +Clear the startTimeCode opinion. + +ClearTimeCodesPerSecond() → None +Clear the timeCodesPerSecond opinion. + +ComputeAbsolutePath(assetPath) → str +Returns the path to the asset specified by assetPath using this +layer to anchor the path if necessary. +Returns assetPath if it’s empty or an anonymous layer identifier. +This method can be used on asset paths that are authored in this layer +to create new asset paths that can be copied to other layers. These +new asset paths should refer to the same assets as the original asset +paths. For example, if the underlying ArResolver is filesystem-based +and assetPath is a relative filesystem path, this method might +return the absolute filesystem path using this layer’s location as the +anchor. +The returned path should in general not be assumed to be an absolute +filesystem path or any other specific form. It is”absolute”in that it +should resolve to the same asset regardless of what layer it’s +authored in. + +Parameters +assetPath (str) – + +static CreateAnonymous() +classmethod CreateAnonymous(tag, args) -> Layer +Creates a new anonymous layer with an optional tag . +An anonymous layer is a layer with a system assigned identifier, that +cannot be saved to disk via Save() . Anonymous layers have an +identifier, but no real path or other asset information fields. +Anonymous layers may be tagged, which can be done to aid debugging +subsystems that make use of anonymous layers. The tag becomes the +display name of an anonymous layer, and is also included in the +generated identifier. Untagged anonymous layers have an empty display +name. +Additional arguments may be supplied via the args parameter. These +arguments may control behavior specific to the layer’s file format. + +Parameters + +tag (str) – +args (FileFormatArguments) – + +CreateAnonymous(tag, format, args) -> Layer +Create an anonymous layer with a specific format . + +Parameters + +tag (str) – +format (FileFormat) – +args (FileFormatArguments) – + +static CreateIdentifier() +classmethod CreateIdentifier(layerPath, arguments) -> str +Joins the given layer path and arguments into an identifier. + +Parameters + +layerPath (str) – +arguments (FileFormatArguments) – + +static CreateNew() +classmethod CreateNew(identifier, args) -> Layer +Creates a new empty layer with the given identifier. +Additional arguments may be supplied via the args parameter. These +arguments may control behavior specific to the layer’s file format. + +Parameters + +identifier (str) – +args (FileFormatArguments) – + +CreateNew(fileFormat, identifier, args) -> Layer +Creates a new empty layer with the given identifier for a given file +format class. +This function has the same behavior as the other CreateNew function, +but uses the explicitly-specified fileFormat instead of attempting +to discern the format from identifier . + +Parameters + +fileFormat (FileFormat) – +identifier (str) – +args (FileFormatArguments) – + +static DumpLayerInfo() +Debug helper to examine content of the current layer registry and +the asset/real path of all layers in the registry. + +EraseTimeSample(path, time) → None + +Parameters + +path (Path) – +time (float) – + +Export(filename, comment, args) → bool +Exports this layer to a file. +Returns true if successful, false if an error occurred. +If comment is not empty, the layer gets exported with the given +comment. Additional arguments may be supplied via the args +parameter. These arguments may control behavior specific to the +exported layer’s file format. +Note that the file name or comment of the original layer is not +updated. This only saves a copy of the layer to the given filename. +Subsequent calls to Save() will still save the layer to it’s +previously remembered file name. + +Parameters + +filename (str) – +comment (str) – +args (FileFormatArguments) – + +ExportToString() +Returns the string representation of the layer. + +static Find(filename) → LayerPtr +filename : string +Returns the open layer with the given filename, or None. Note that this is a static class method. + +static FindOrOpen() +classmethod FindOrOpen(identifier, args) -> Layer +Return an existing layer with the given identifier and args , +or else load it. +If the layer can’t be found or loaded, an error is posted and a null +layer is returned. +Arguments in args will override any arguments specified in +identifier . + +Parameters + +identifier (str) – +args (FileFormatArguments) – + +static FindOrOpenRelativeToLayer() +classmethod FindOrOpenRelativeToLayer(anchor, identifier, args) -> Layer +Return an existing layer with the given identifier and args , +or else load it. +The given identifier will be resolved relative to the anchor +layer. If the layer can’t be found or loaded, an error is posted and a +null layer is returned. +If the anchor layer is invalid, issues a coding error and returns +a null handle. +Arguments in args will override any arguments specified in +identifier . + +Parameters + +anchor (Layer) – +identifier (str) – +args (FileFormatArguments) – + +static FindRelativeToLayer() +Returns the open layer with the given filename, or None. If the filename is a relative path then it’s found relative to the given layer. Note that this is a static class method. + +GetAssetInfo() → VtValue +Returns resolve information from the last time the layer identifier +was resolved. + +GetAssetName() → str +Returns the asset name associated with this layer. + +GetAttributeAtPath(path) → AttributeSpec +Returns an attribute at the given path . +Returns None if there is no attribute at path . This is simply +a more specifically typed version of GetObjectAtPath() . + +Parameters +path (Path) – + +GetBracketingTimeSamples(time, tLower, tUpper) → bool + +Parameters + +time (float) – +tLower (float) – +tUpper (float) – + +GetBracketingTimeSamplesForPath(path, time, tLower, tUpper) → bool + +Parameters + +path (Path) – +time (float) – +tLower (float) – +tUpper (float) – + +GetCompositionAssetDependencies() → set[str] +Return paths of all assets this layer depends on due to composition +fields. +This includes the paths of all layers referred to by reference, +payload, and sublayer fields in this layer. This function only returns +direct composition dependencies of this layer, i.e. it does not +recurse to find composition dependencies from its dependent layer +assets. + +static GetDetachedLayerRules() +classmethod GetDetachedLayerRules() -> DetachedLayerRules +Returns the current rules for the detached layer set. + +GetDisplayName() → str +Returns the layer’s display name. +The display name is the base filename of the identifier. + +static GetDisplayNameFromIdentifier() +classmethod GetDisplayNameFromIdentifier(identifier) -> str +Returns the display name for the given identifier , using the same +rules as GetDisplayName. + +Parameters +identifier (str) – + +GetExternalAssetDependencies() → set[str] +Returns a set of resolved paths to all external asset dependencies the +layer needs to generate its contents. +These are additional asset dependencies that are determined by the +layer’s file format and will be consulted during Reload() when +determining if the layer needs to be reloaded. This specifically does +not include dependencies related to composition, i.e. this will not +include assets from references, payloads, and sublayers. + +GetExternalReferences() +Return a list of asset paths for +this layer. + +GetFileFormat() → FileFormat +Returns the file format used by this layer. + +GetFileFormatArguments() → FileFormatArguments +Returns the file format-specific arguments used during the +construction of this layer. + +static GetLoadedLayers() +Return list of loaded layers. + +static GetMutedLayers() +Return list of muted layers. + +GetNumTimeSamplesForPath(path) → int + +Parameters +path (Path) – + +GetObjectAtPath(path) → Spec +Returns the object at the given path . +There is no distinction between an absolute and relative path at the +SdLayer level. +Returns None if there is no object at path . + +Parameters +path (Path) – + +GetPrimAtPath(path) → PrimSpec +Returns the prim at the given path . +Returns None if there is no prim at path . This is simply a +more specifically typed version of GetObjectAtPath() . + +Parameters +path (Path) – + +GetPropertyAtPath(path) → PropertySpec +Returns a property at the given path . +Returns None if there is no property at path . This is simply +a more specifically typed version of GetObjectAtPath() . + +Parameters +path (Path) – + +GetRelationshipAtPath(path) → RelationshipSpec +Returns a relationship at the given path . +Returns None if there is no relationship at path . This is +simply a more specifically typed version of GetObjectAtPath() . + +Parameters +path (Path) – + +HasColorConfiguration() → bool +Returns true if color configuration metadata is set in this layer. +GetColorConfiguration() , SetColorConfiguration() + +HasColorManagementSystem() → bool +Returns true if colorManagementSystem metadata is set in this layer. +GetColorManagementSystem() , SetColorManagementSystem() + +HasCustomLayerData() → bool +Returns true if CustomLayerData is authored on the layer. + +HasDefaultPrim() → bool +Return true if the default prim metadata is set in this layer. +See GetDefaultPrim() and SetDefaultPrim() . + +HasEndTimeCode() → bool +Returns true if the layer has an endTimeCode opinion. + +HasFramePrecision() → bool +Returns true if the layer has a frames precision opinion. + +HasFramesPerSecond() → bool +Returns true if the layer has a frames per second opinion. + +HasOwner() → bool +Returns true if the layer has an owner opinion. + +HasSessionOwner() → bool +Returns true if the layer has a session owner opinion. + +HasStartTimeCode() → bool +Returns true if the layer has a startTimeCode opinion. + +HasTimeCodesPerSecond() → bool +Returns true if the layer has a timeCodesPerSecond opinion. + +Import(layerPath) → bool +Imports the content of the given layer path, replacing the content of +the current layer. +Note: If the layer path is the same as the current layer’s real path, +no action is taken (and a warning occurs). For this case use Reload() +. + +Parameters +layerPath (str) – + +ImportFromString(string) → bool +Reads this layer from the given string. +Returns true if successful, otherwise returns false . + +Parameters +string (str) – + +static IsAnonymousLayerIdentifier() +classmethod IsAnonymousLayerIdentifier(identifier) -> bool +Returns true if the identifier is an anonymous layer unique +identifier. + +Parameters +identifier (str) – + +IsDetached() → bool +Returns true if this layer is detached from its serialized data store, +false otherwise. +Detached layers are isolated from external changes to their serialized +data. + +static IsIncludedByDetachedLayerRules() +classmethod IsIncludedByDetachedLayerRules(identifier) -> bool +Returns whether the given layer identifier is included in the current +rules for the detached layer set. +This is equivalent to GetDetachedLayerRules() .IsIncluded(identifier). + +Parameters +identifier (str) – + +IsMuted() +classmethod IsMuted() -> bool +Returns true if the current layer is muted. + +IsMuted(path) -> bool +Returns true if the specified layer path is muted. + +Parameters +path (str) – + +ListAllTimeSamples() → set[float] + +ListTimeSamplesForPath(path) → set[float] + +Parameters +path (Path) – + +static New() +classmethod New(fileFormat, identifier, args) -> Layer +Creates a new empty layer with the given identifier for a given file +format class. +The new layer will not be dirty and will not be saved. +Additional arguments may be supplied via the args parameter. These +arguments may control behavior specific to the layer’s file format. + +Parameters + +fileFormat (FileFormat) – +identifier (str) – +args (FileFormatArguments) – + +static OpenAsAnonymous() +classmethod OpenAsAnonymous(layerPath, metadataOnly, tag) -> Layer +Load the given layer from disk as a new anonymous layer. +If the layer can’t be found or loaded, an error is posted and a null +layer is returned. +The anonymous layer does not retain any knowledge of the backing file +on the filesystem. +metadataOnly is a flag that asks for only the layer metadata to be +read in, which can be much faster if that is all that is required. +Note that this is just a hint: some FileFormat readers may disregard +this flag and still fully populate the layer contents. +An optional tag may be specified. See CreateAnonymous for details. + +Parameters + +layerPath (str) – +metadataOnly (bool) – +tag (str) – + +QueryTimeSample(path, time, value) → bool + +Parameters + +path (Path) – +time (float) – +value (VtValue) – + +QueryTimeSample(path, time, value) -> bool + +Parameters + +path (Path) – +time (float) – +value (SdfAbstractDataValue) – + +QueryTimeSample(path, time, data) -> bool + +Parameters + +path (Path) – +time (float) – +data (T) – + +Reload(force) → bool +Reloads the layer from its persistent representation. +This restores the layer to a state as if it had just been created with +FindOrOpen() . This operation is Undo-able. +The fileName and whether journaling is enabled are not affected by +this method. +When called with force = false (the default), Reload attempts to avoid +reloading layers that have not changed on disk. It does so by +comparing the file’s modification time (mtime) to when the file was +loaded. If the layer has unsaved modifications, this mechanism is not +used, and the layer is reloaded from disk. If the layer has any +external asset dependencies their modification state will also be +consulted when determining if the layer needs to be reloaded. +Passing true to the force parameter overrides this behavior, +forcing the layer to be reloaded from disk regardless of whether it +has changed. + +Parameters +force (bool) – + +static ReloadLayers() +classmethod ReloadLayers(layers, force) -> bool +Reloads the specified layers. +Returns false if one or more layers failed to reload. +See Reload() for a description of the force flag. + +Parameters + +layers (set[Layer]) – +force (bool) – + +static RemoveFromMutedLayers() +classmethod RemoveFromMutedLayers(mutedPath) -> None +Remove the specified path from the muted layers set. + +Parameters +mutedPath (str) – + +RemoveInertSceneDescription() → None +Removes all scene description in this layer that does not affect the +scene. +This method walks the layer namespace hierarchy and removes any prims +and that are not contributing any opinions. + +Save(force) → bool +Returns true if successful, false if an error occurred. +Returns false if the layer has no remembered file name or the +layer type cannot be saved. The layer will not be overwritten if the +file exists and the layer is not dirty unless force is true. + +Parameters +force (bool) – + +ScheduleRemoveIfInert(spec) → None +Cause spec to be removed if it no longer affects the scene when +the last change block is closed, or now if there are no change blocks. + +Parameters +spec (Spec) – + +static SetDetachedLayerRules() +classmethod SetDetachedLayerRules(mask) -> None +Sets the rules specifying detached layers. +Newly-created or opened layers whose identifiers are included in +rules will be opened as detached layers. Existing layers that are +now included or no longer included will be reloaded. Any unsaved +modifications to those layers will be lost. +This function is not thread-safe. It may not be run concurrently with +any other functions that open, close, or read from any layers. +The detached layer rules are initially set to exclude all layers. This +may be overridden by setting the environment variables +SDF_LAYER_INCLUDE_DETACHED and SDF_LAYER_EXCLUDE_DETACHED to specify +the initial set of include and exclude patterns in the rules. These +variables can be set to a comma-delimited list of patterns. +SDF_LAYER_INCLUDE_DETACHED may also be set to”*”to include all +layers. Note that these environment variables only set the initial +state of the detached layer rules; these values may be overwritten by +subsequent calls to this function. +See SdfLayer::DetachedLayerRules::IsIncluded for details on how the +rules are applied to layer identifiers. + +Parameters +mask (DetachedLayerRules) – + +SetMuted(muted) → None +Mutes the current layer if muted is true , and unmutes it +otherwise. + +Parameters +muted (bool) – + +SetPermissionToEdit(allow) → None +Sets permission to edit. + +Parameters +allow (bool) – + +SetPermissionToSave(allow) → None +Sets permission to save. + +Parameters +allow (bool) – + +SetTimeSample(path, time, value) → None + +Parameters + +path (Path) – +time (float) – +value (VtValue) – + +SetTimeSample(path, time, value) -> None + +Parameters + +path (Path) – +time (float) – +value (SdfAbstractDataConstValue) – + +SetTimeSample(path, time, value) -> None + +Parameters + +path (Path) – +time (float) – +value (T) – + +static SplitIdentifier() +classmethod SplitIdentifier(identifier, layerPath, arguments) -> bool +Splits the given layer identifier into its constituent layer path and +arguments. + +Parameters + +identifier (str) – +layerPath (str) – +arguments (FileFormatArguments) – + +StreamsData() → bool +Returns true if this layer streams data from its serialized data store +on demand, false otherwise. +Layers with streaming data are treated differently to avoid pulling in +data unnecessarily. For example, reloading a streaming layer will not +perform fine-grained change notification, since doing so would require +the full contents of the layer to be loaded. + +TransferContent(layer) → None +Copies the content of the given layer into this layer. +Source layer is unmodified. + +Parameters +layer (Layer) – + +Traverse(path, func) → None + +Parameters + +path (Path) – +func (TraversalFunction) – + +UpdateAssetInfo() → None +Update layer asset information. +Calling this method re-resolves the layer identifier, which updates +asset information such as the layer’s resolved path and other asset +info. This may be used to update the layer after external changes to +the underlying asset system. + +UpdateCompositionAssetDependency(oldAssetPath, newAssetPath) → bool +Updates the asset path of a composation dependency in this layer. +If newAssetPath is supplied, the update works as”rename”, updating +any occurrence of oldAssetPath to newAssetPath in all +reference, payload, and sublayer fields. +If newAssetPath is not given, this update behaves as a”delete”, +removing all occurrences of oldAssetPath from all reference, +payload, and sublayer fields. + +Parameters + +oldAssetPath (str) – +newAssetPath (str) – + +UpdateExternalReference(oldAssetPath, newAssetPath) → bool +Deprecated +Use UpdateCompositionAssetDependency instead. + +Parameters + +oldAssetPath (str) – +newAssetPath (str) – + +ColorConfigurationKey = 'colorConfiguration' + +ColorManagementSystemKey = 'colorManagementSystem' + +CommentKey = 'comment' + +DocumentationKey = 'documentation' + +EndFrameKey = 'endFrame' + +EndTimeCodeKey = 'endTimeCode' + +FramePrecisionKey = 'framePrecision' + +FramesPerSecondKey = 'framesPerSecond' + +HasOwnedSubLayers = 'hasOwnedSubLayers' + +OwnerKey = 'owner' + +SessionOwnerKey = 'sessionOwner' + +StartFrameKey = 'startFrame' + +StartTimeCodeKey = 'startTimeCode' + +TimeCodesPerSecondKey = 'timeCodesPerSecond' + +property anonymous +bool +Returns true if this layer is an anonymous layer. + +Type +type + +property colorConfiguration +The color configuration asset-path of this layer. + +property colorManagementSystem +The name of the color management system used to interpret the colorConfiguration asset. + +property comment +The layer’s comment string. + +property customLayerData +The customLayerData dictionary associated with this layer. + +property defaultPrim +The layer’s default reference target token. + +property dirty +bool +Returns true if the layer is dirty, i.e. +has changed from its persistent representation. + +Type +type + +property documentation +The layer’s documentation string. + +property empty +bool +Returns whether this layer has no significant data. + +Type +type + +property endTimeCode +The end timeCode of this layer. +The end timeCode of a layer is not a hard limit, but is +more of a hint. A layer’s time-varying content is not limited to +the timeCode range of the layer. + +property expired +True if this object has expired, False otherwise. + +property externalReferences +Return unique list of asset paths of external references for +given layer. + +property fileExtension +The layer’s file extension. + +property framePrecision +The number of digits of precision used in times in this layer. + +property framesPerSecond +The frames per second used in this layer. + +property hasOwnedSubLayers +Whether this layer’s sub layers are expected to have owners. + +property identifier +The layer’s identifier. + +property owner +The owner of this layer. + +property permissionToEdit +Return true if permitted to be edited (modified), false otherwise. + +property permissionToSave +Return true if permitted to be saved, false otherwise. + +property pseudoRoot +The pseudo-root of the layer. + +property realPath +The layer’s resolved path. + +property repositoryPath +The layer’s associated repository path + +property resolvedPath +The layer’s resolved path. + +property rootPrimOrder +Get/set the list of root prim names for this layer’s ‘reorder rootPrims’ statement. + +property rootPrims +The root prims of this layer, as an ordered dictionary. +The prims may be accessed by index or by name. +Although this property claims it is read only, you can modify the contents of this dictionary to add, remove, or reorder the contents. + +property sessionOwner +The session owner of this layer. Only intended for use with session layers. + +property startTimeCode +The start timeCode of this layer. +The start timeCode of a layer is not a hard limit, but is +more of a hint. A layer’s time-varying content is not limited to +the timeCode range of the layer. + +property subLayerOffsets +The sublayer offsets of this layer, as a list. Although this property is claimed to be read only, you can modify the contents of this list by assigning new layer offsets to specific indices. + +property subLayerPaths +The sublayer paths of this layer, as a list. Although this property is claimed to be read only, you can modify the contents of this list. + +property timeCodesPerSecond +The timeCodes per second used in this layer. + +property version +The layer’s version. + +class pxr.Sdf.LayerOffset +Represents a time offset and scale between layers. +The SdfLayerOffset class is an affine transform, providing both a +scale and a translate. It supports vector algebra semantics for +composing SdfLayerOffsets together via multiplication. The +SdfLayerOffset class is unitless: it does not refer to seconds or +frames. +For example, suppose layer A uses layer B, with an offset of X: when +bringing animation from B into A, you first apply the scale of X, and +then the offset. Suppose you have a scale of 2 and an offset of 24: +first multiply B’s frame numbers by 2, and then add 24. The animation +from B as seen in A will take twice as long and start 24 frames later. +Offsets are typically used in either sublayers or prim references. For +more information, see the SetSubLayerOffset() method of the SdfLayer +class (the subLayerOffsets property in Python), as well as the +SetReference() and GetReferenceLayerOffset() methods (the latter is +the referenceLayerOffset property in Python) of the SdfPrimSpec class. +Methods: + +GetInverse() +Gets the inverse offset, which performs the opposite transformation. + +IsIdentity() +Returns true if this is an identity transformation, with an offset of 0.0 and a scale of 1.0. + +Attributes: + +offset +None + +scale +None + +GetInverse() → LayerOffset +Gets the inverse offset, which performs the opposite transformation. + +IsIdentity() → bool +Returns true if this is an identity transformation, with an offset +of 0.0 and a scale of 1.0. + +property offset +None +Sets the time offset. + +type : float +Returns the time offset. + +Type +type + +property scale +None +Sets the time scale factor. + +type : float +Returns the time scale factor. + +Type +type + +class pxr.Sdf.LayerTree +A SdfLayerTree is an immutable tree structure representing a sublayer +stack and its recursive structure. +Layers can have sublayers, which can in turn have sublayers of their +own. Clients that want to represent that hierarchical structure in +memory can build a SdfLayerTree for that purpose. +We use TfRefPtr as handles to LayerTrees, as a simple +way to pass them around as immutable trees without worrying about +lifetime. +Attributes: + +childTrees +list[SdfLayerTreeHandle] + +expired +True if this object has expired, False otherwise. + +layer +Layer + +offset +LayerOffset + +property childTrees +list[SdfLayerTreeHandle] +Returns the children of this tree node. + +Type +type + +property expired +True if this object has expired, False otherwise. + +property layer +Layer +Returns the layer handle this tree node represents. + +Type +type + +property offset +LayerOffset +Returns the cumulative layer offset from the root of the tree. + +Type +type + +class pxr.Sdf.LengthUnit +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.LengthUnitMillimeter, Sdf.LengthUnitCentimeter, Sdf.LengthUnitDecimeter, Sdf.LengthUnitMeter, Sdf.LengthUnitKilometer, Sdf.LengthUnitInch, Sdf.LengthUnitFoot, Sdf.LengthUnitYard, Sdf.LengthUnitMile) + +class pxr.Sdf.ListEditorProxy_SdfNameKeyPolicy +Methods: + +Add + +Append + +ApplyEditsToList + +ClearEdits + +ClearEditsAndMakeExplicit + +ContainsItemEdit + +CopyItems + +Erase + +GetAddedOrExplicitItems + +ModifyItemEdits + +Prepend + +Remove + +RemoveItemEdits + +ReplaceItemEdits + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExpired + +isExplicit + +isOrderedOnly + +orderedItems + +prependedItems + +Add() + +Append() + +ApplyEditsToList() + +ClearEdits() + +ClearEditsAndMakeExplicit() + +ContainsItemEdit() + +CopyItems() + +Erase() + +GetAddedOrExplicitItems() + +ModifyItemEdits() + +Prepend() + +Remove() + +RemoveItemEdits() + +ReplaceItemEdits() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExpired + +property isExplicit + +property isOrderedOnly + +property orderedItems + +property prependedItems + +class pxr.Sdf.ListEditorProxy_SdfPathKeyPolicy +Methods: + +Add + +Append + +ApplyEditsToList + +ClearEdits + +ClearEditsAndMakeExplicit + +ContainsItemEdit + +CopyItems + +Erase + +GetAddedOrExplicitItems + +ModifyItemEdits + +Prepend + +Remove + +RemoveItemEdits + +ReplaceItemEdits + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExpired + +isExplicit + +isOrderedOnly + +orderedItems + +prependedItems + +Add() + +Append() + +ApplyEditsToList() + +ClearEdits() + +ClearEditsAndMakeExplicit() + +ContainsItemEdit() + +CopyItems() + +Erase() + +GetAddedOrExplicitItems() + +ModifyItemEdits() + +Prepend() + +Remove() + +RemoveItemEdits() + +ReplaceItemEdits() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExpired + +property isExplicit + +property isOrderedOnly + +property orderedItems + +property prependedItems + +class pxr.Sdf.ListEditorProxy_SdfPayloadTypePolicy +Methods: + +Add + +Append + +ApplyEditsToList + +ClearEdits + +ClearEditsAndMakeExplicit + +ContainsItemEdit + +CopyItems + +Erase + +GetAddedOrExplicitItems + +ModifyItemEdits + +Prepend + +Remove + +RemoveItemEdits + +ReplaceItemEdits + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExpired + +isExplicit + +isOrderedOnly + +orderedItems + +prependedItems + +Add() + +Append() + +ApplyEditsToList() + +ClearEdits() + +ClearEditsAndMakeExplicit() + +ContainsItemEdit() + +CopyItems() + +Erase() + +GetAddedOrExplicitItems() + +ModifyItemEdits() + +Prepend() + +Remove() + +RemoveItemEdits() + +ReplaceItemEdits() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExpired + +property isExplicit + +property isOrderedOnly + +property orderedItems + +property prependedItems + +class pxr.Sdf.ListEditorProxy_SdfReferenceTypePolicy +Methods: + +Add + +Append + +ApplyEditsToList + +ClearEdits + +ClearEditsAndMakeExplicit + +ContainsItemEdit + +CopyItems + +Erase + +GetAddedOrExplicitItems + +ModifyItemEdits + +Prepend + +Remove + +RemoveItemEdits + +ReplaceItemEdits + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExpired + +isExplicit + +isOrderedOnly + +orderedItems + +prependedItems + +Add() + +Append() + +ApplyEditsToList() + +ClearEdits() + +ClearEditsAndMakeExplicit() + +ContainsItemEdit() + +CopyItems() + +Erase() + +GetAddedOrExplicitItems() + +ModifyItemEdits() + +Prepend() + +Remove() + +RemoveItemEdits() + +ReplaceItemEdits() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExpired + +property isExplicit + +property isOrderedOnly + +property orderedItems + +property prependedItems + +class pxr.Sdf.ListOpType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.ListOpTypeExplicit, Sdf.ListOpTypeAdded, Sdf.ListOpTypePrepended, Sdf.ListOpTypeAppended, Sdf.ListOpTypeDeleted, Sdf.ListOpTypeOrdered) + +class pxr.Sdf.ListProxy_SdfNameKeyPolicy +Methods: + +ApplyEditsToList + +ApplyList + +append + +clear + +copy + +count + +index + +insert + +remove + +replace + +Attributes: + +expired + +ApplyEditsToList() + +ApplyList() + +append() + +clear() + +copy() + +count() + +index() + +insert() + +remove() + +replace() + +property expired + +class pxr.Sdf.ListProxy_SdfNameTokenKeyPolicy +Methods: + +ApplyEditsToList + +ApplyList + +append + +clear + +copy + +count + +index + +insert + +remove + +replace + +Attributes: + +expired + +ApplyEditsToList() + +ApplyList() + +append() + +clear() + +copy() + +count() + +index() + +insert() + +remove() + +replace() + +property expired + +class pxr.Sdf.ListProxy_SdfPathKeyPolicy +Methods: + +ApplyEditsToList + +ApplyList + +append + +clear + +copy + +count + +index + +insert + +remove + +replace + +Attributes: + +expired + +ApplyEditsToList() + +ApplyList() + +append() + +clear() + +copy() + +count() + +index() + +insert() + +remove() + +replace() + +property expired + +class pxr.Sdf.ListProxy_SdfPayloadTypePolicy +Methods: + +ApplyEditsToList + +ApplyList + +append + +clear + +copy + +count + +index + +insert + +remove + +replace + +Attributes: + +expired + +ApplyEditsToList() + +ApplyList() + +append() + +clear() + +copy() + +count() + +index() + +insert() + +remove() + +replace() + +property expired + +class pxr.Sdf.ListProxy_SdfReferenceTypePolicy +Methods: + +ApplyEditsToList + +ApplyList + +append + +clear + +copy + +count + +index + +insert + +remove + +replace + +Attributes: + +expired + +ApplyEditsToList() + +ApplyList() + +append() + +clear() + +copy() + +count() + +index() + +insert() + +remove() + +replace() + +property expired + +class pxr.Sdf.ListProxy_SdfSubLayerTypePolicy +Methods: + +ApplyEditsToList + +ApplyList + +append + +clear + +copy + +count + +index + +insert + +remove + +replace + +Attributes: + +expired + +ApplyEditsToList() + +ApplyList() + +append() + +clear() + +copy() + +count() + +index() + +insert() + +remove() + +replace() + +property expired + +class pxr.Sdf.MapEditProxy_VtDictionary +Classes: + +MapEditProxy_VtDictionary_Iterator + +MapEditProxy_VtDictionary_KeyIterator + +MapEditProxy_VtDictionary_ValueIterator + +Methods: + +clear + +copy + +get + +items + +keys + +pop + +popitem + +setdefault + +update + +values + +Attributes: + +expired + +class MapEditProxy_VtDictionary_Iterator + +class MapEditProxy_VtDictionary_KeyIterator + +class MapEditProxy_VtDictionary_ValueIterator + +clear() + +copy() + +get() + +items() + +keys() + +pop() + +popitem() + +setdefault() + +update() + +values() + +property expired + +class pxr.Sdf.MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath_____ +Classes: + +MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath______Iterator + +MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath______KeyIterator + +MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath______ValueIterator + +Methods: + +clear + +copy + +get + +items + +keys + +pop + +popitem + +setdefault + +update + +values + +Attributes: + +expired + +class MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath______Iterator + +class MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath______KeyIterator + +class MapEditProxy_map_SdfPath_SdfPath_less_SdfPath__allocator_pair_SdfPath_const__SdfPath______ValueIterator + +clear() + +copy() + +get() + +items() + +keys() + +pop() + +popitem() + +setdefault() + +update() + +values() + +property expired + +class pxr.Sdf.MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string_____ +Classes: + +MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string______Iterator + +MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string______KeyIterator + +MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string______ValueIterator + +Methods: + +clear + +copy + +get + +items + +keys + +pop + +popitem + +setdefault + +update + +values + +Attributes: + +expired + +class MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string______Iterator + +class MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string______KeyIterator + +class MapEditProxy_map_string_string_less_string__allocator_pair_stringconst__string______ValueIterator + +clear() + +copy() + +get() + +items() + +keys() + +pop() + +popitem() + +setdefault() + +update() + +values() + +property expired + +class pxr.Sdf.NamespaceEdit +A single namespace edit. It supports renaming, reparenting, +reparenting with a rename, reordering, and removal. +Methods: + +Remove +classmethod Remove(currentPath) -> This + +Rename +classmethod Rename(currentPath, name) -> This + +Reorder +classmethod Reorder(currentPath, index) -> This + +Reparent +classmethod Reparent(currentPath, newParentPath, index) -> This + +ReparentAndRename +classmethod ReparentAndRename(currentPath, newParentPath, name, index) -> This + +Attributes: + +atEnd + +currentPath + +index + +newPath + +same + +static Remove() +classmethod Remove(currentPath) -> This +Returns a namespace edit that removes the object at currentPath . + +Parameters +currentPath (Path) – + +static Rename() +classmethod Rename(currentPath, name) -> This +Returns a namespace edit that renames the prim or property at +currentPath to name . + +Parameters + +currentPath (Path) – +name (str) – + +static Reorder() +classmethod Reorder(currentPath, index) -> This +Returns a namespace edit to reorder the prim or property at +currentPath to index index . + +Parameters + +currentPath (Path) – +index (Index) – + +static Reparent() +classmethod Reparent(currentPath, newParentPath, index) -> This +Returns a namespace edit to reparent the prim or property at +currentPath to be under newParentPath at index index . + +Parameters + +currentPath (Path) – +newParentPath (Path) – +index (Index) – + +static ReparentAndRename() +classmethod ReparentAndRename(currentPath, newParentPath, name, index) -> This +Returns a namespace edit to reparent the prim or property at +currentPath to be under newParentPath at index index with +the name name . + +Parameters + +currentPath (Path) – +newParentPath (Path) – +name (str) – +index (Index) – + +atEnd = -1 + +property currentPath + +property index + +property newPath + +same = -2 + +class pxr.Sdf.NamespaceEditDetail +Detailed information about a namespace edit. +Classes: + +Result +Validity of an edit. + +Attributes: + +Error + +Okay + +Unbatched + +edit + +reason + +result + +class Result +Validity of an edit. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.NamespaceEditDetail.Error, Sdf.NamespaceEditDetail.Unbatched, Sdf.NamespaceEditDetail.Okay) + +Error = Sdf.NamespaceEditDetail.Error + +Okay = Sdf.NamespaceEditDetail.Okay + +Unbatched = Sdf.NamespaceEditDetail.Unbatched + +property edit + +property reason + +property result + +class pxr.Sdf.Notice +Wrapper class for Sdf notices. +Classes: + +Base + +LayerDidReloadContent + +LayerDidReplaceContent + +LayerDirtinessChanged + +LayerIdentifierDidChange + +LayerInfoDidChange + +LayerMutenessChanged + +LayersDidChange + +LayersDidChangeSentPerLayer + +class Base + +class LayerDidReloadContent + +class LayerDidReplaceContent + +class LayerDirtinessChanged + +class LayerIdentifierDidChange +Attributes: + +newIdentifier + +oldIdentifier + +property newIdentifier + +property oldIdentifier + +class LayerInfoDidChange +Methods: + +key + +key() + +class LayerMutenessChanged +Attributes: + +layerPath + +wasMuted + +property layerPath + +property wasMuted + +class LayersDidChange +Methods: + +GetLayers + +GetSerialNumber + +GetLayers() + +GetSerialNumber() + +class LayersDidChangeSentPerLayer +Methods: + +GetLayers + +GetSerialNumber + +GetLayers() + +GetSerialNumber() + +class pxr.Sdf.Path +A path value used to locate objects in layers or scenegraphs. + +## Overview + +SdfPath is used in several ways: + +As a storage key for addressing and accessing values held in a +SdfLayer +As a namespace identity for scenegraph objects +As a way to refer to other scenegraph objects through relative +paths +The paths represented by an SdfPath class may be either relative or +absolute. Relative paths are relative to the prim object that contains +them (that is, if an SdfRelationshipSpec target is relative, it is +relative to the SdfPrimSpec object that owns the SdfRelationshipSpec +object). + +SdfPath objects can be readily created from and converted back to +strings, but as SdfPath objects, they have behaviors that make it easy +and efficient to work with them. The SdfPath class provides a full +range of methods for manipulating scene paths by appending a namespace +child, appending a relationship target, getting the parent path, and +so on. Since the SdfPath class uses a node-based representation +internally, you should use the editing functions rather than +converting to and from strings if possible. + +## Path Syntax + +Like a filesystem path, an SdfPath is conceptually just a sequence of +path components. Unlike a filesystem path, each component has a type, +and the type is indicated by the syntax. +Two separators are used between parts of a path. A slash (“/”) +following an identifier is used to introduce a namespace child. A +period (“.”) following an identifier is used to introduce a property. +A property may also have several non-sequential colons (‘:’) in its +name to provide a rudimentary namespace within properties but may not +end or begin with a colon. +A leading slash in the string representation of an SdfPath object +indicates an absolute path. Two adjacent periods indicate the parent +namespace. +Brackets (“[“and”]”) are used to indicate relationship target paths +for relational attributes. +The first part in a path is assumed to be a namespace child unless it +is preceded by a period. That means: + +/Foo is an absolute path specifying the root prim Foo. +/Foo/Bar is an absolute path specifying namespace child Bar +of root prim Foo. +/Foo/Bar.baz is an absolute path specifying property baz +of namespace child Bar of root prim Foo. +Foo is a relative path specifying namespace child Foo of the +current prim. +Foo/Bar is a relative path specifying namespace child Bar of +namespace child Foo of the current prim. +Foo/Bar.baz is a relative path specifying property baz of +namespace child Bar of namespace child Foo of the current prim. +.foo is a relative path specifying the property foo of +the current prim. +/Foo.bar[/Foo.baz].attrib is a relational attribute path. The +relationship /Foo.bar has a target /Foo.baz . There is a +relational attribute attrib on that relationship->target pair. + +## A Note on Thread-Safety + +SdfPath is strongly thread-safe, in the sense that zero additional +synchronization is required between threads creating or using SdfPath +values. Just like TfToken, SdfPath values are immutable. Internally, +SdfPath uses a global prefix tree to efficiently share representations +of paths, and provide fast equality/hashing operations, but +modifications to this table are internally synchronized. Consequently, +as with TfToken, for best performance it is important to minimize the +number of values created (since it requires synchronized access to +this table) or copied (since it requires atomic ref-counting +operations). +Classes: + +AncestorsRange + +Methods: + +AppendChild(childName) +Creates a path by appending an element for childName to this path. + +AppendElementString(element) +Creates a path by extracting and appending an element from the given ascii element encoding. + +AppendExpression() +Creates a path by appending an expression element. + +AppendMapper(targetPath) +Creates a path by appending a mapper element for targetPath . + +AppendMapperArg(argName) +Creates a path by appending an element for argName . + +AppendPath(newSuffix) +Creates a path by appending a given relative path to this path. + +AppendProperty(propName) +Creates a path by appending an element for propName to this path. + +AppendRelationalAttribute(attrName) +Creates a path by appending an element for attrName to this path. + +AppendTarget(targetPath) +Creates a path by appending an element for targetPath . + +AppendVariantSelection(variantSet, variant) +Creates a path by appending an element for variantSet and variant to this path. + +ContainsPrimVariantSelection() +Returns whether the path or any of its parent paths identifies a variant selection for a prim. + +ContainsPropertyElements() +Return true if this path contains any property elements, false otherwise. + +ContainsTargetPath() +Return true if this path is or has a prefix that's a target path or a mapper path. + +FindLongestPrefix + +FindLongestStrictPrefix + +FindPrefixedRange + +GetAbsoluteRootOrPrimPath() +Creates a path by stripping all properties and relational attributes from this path, leaving the path to the containing prim. + +GetAllTargetPathsRecursively(result) +Returns all the relationship target or connection target paths contained in this path, and recursively all the target paths contained in those target paths in reverse depth-first order. + +GetAncestorsRange() +Return a range for iterating over the ancestors of this path. + +GetCommonPrefix(path) +Returns a path with maximal length that is a prefix path of both this path and path . + +GetConciseRelativePaths +classmethod GetConciseRelativePaths(paths) -> list[SdfPath] + +GetParentPath() +Return the path that identifies this path's namespace parent. + +GetPrefixes +Returns the prefix paths of this path. + +GetPrimOrPrimVariantSelectionPath() +Creates a path by stripping all relational attributes, targets, and properties, leaving the nearest path for which IsPrimOrPrimVariantSelectionPath() returns true. + +GetPrimPath() +Creates a path by stripping all relational attributes, targets, properties, and variant selections from the leafmost prim path, leaving the nearest path for which IsPrimPath() returns true. + +GetVariantSelection() +Returns the variant selection for this path, if this is a variant selection path. + +HasPrefix(prefix) +Return true if both this path and prefix are not the empty path and this path has prefix as a prefix. + +IsAbsolutePath() +Returns whether the path is absolute. + +IsAbsoluteRootOrPrimPath() +Returns whether the path identifies a prim or the absolute root. + +IsAbsoluteRootPath() +Return true if this path is the AbsoluteRootPath() . + +IsExpressionPath() +Returns whether the path identifies a connection expression. + +IsMapperArgPath() +Returns whether the path identifies a connection mapper arg. + +IsMapperPath() +Returns whether the path identifies a connection mapper. + +IsNamespacedPropertyPath() +Returns whether the path identifies a namespaced property. + +IsPrimPath() +Returns whether the path identifies a prim. + +IsPrimPropertyPath() +Returns whether the path identifies a prim's property. + +IsPrimVariantSelectionPath() +Returns whether the path identifies a variant selection for a prim. + +IsPropertyPath() +Returns whether the path identifies a property. + +IsRelationalAttributePath() +Returns whether the path identifies a relational attribute. + +IsRootPrimPath() +Returns whether the path identifies a root prim. + +IsTargetPath() +Returns whether the path identifies a relationship or connection target. + +IsValidIdentifier +classmethod IsValidIdentifier(name) -> bool + +IsValidNamespacedIdentifier +classmethod IsValidNamespacedIdentifier(name) -> bool + +IsValidPathString +classmethod IsValidPathString(pathString, errMsg) -> bool + +JoinIdentifier +classmethod JoinIdentifier(names) -> str + +MakeAbsolutePath(anchor) +Returns the absolute form of this path using anchor as the relative basis. + +MakeRelativePath(anchor) +Returns the relative form of this path using anchor as the relative basis. + +RemoveAncestorPaths +classmethod RemoveAncestorPaths(paths) -> None + +RemoveCommonSuffix(otherPath, stopAtRootPrim) +Find and remove the longest common suffix from two paths. + +RemoveDescendentPaths +classmethod RemoveDescendentPaths(paths) -> None + +ReplaceName(newName) +Return a copy of this path with its final component changed to newName. + +ReplacePrefix(oldPrefix, newPrefix, ...) +Returns a path with all occurrences of the prefix path oldPrefix replaced with the prefix path newPrefix . + +ReplaceTargetPath(newTargetPath) +Replaces the relational attribute's target path. + +StripAllVariantSelections() +Create a path by stripping all variant selections from all components of this path, leaving a path with no embedded variant selections. + +StripNamespace +classmethod StripNamespace(name) -> str + +StripPrefixNamespace +classmethod StripPrefixNamespace(name, matchNamespace) -> tuple[str, bool] + +TokenizeIdentifier +classmethod TokenizeIdentifier(name) -> list[str] + +Attributes: + +absoluteIndicator + +absoluteRootPath + +childDelimiter + +elementString +The string representation of the terminal component of this path. + +emptyPath + +expressionIndicator + +isEmpty +bool + +mapperArgDelimiter + +mapperIndicator + +name +The name of the prim, property or relational attribute identified by the path. + +namespaceDelimiter + +parentPathElement + +pathElementCount +The number of path elements in this path. + +pathString +The string representation of this path. + +propertyDelimiter + +reflexiveRelativePath + +relationshipTargetEnd + +relationshipTargetStart + +targetPath +The relational attribute target path for this path. + +class AncestorsRange +Methods: + +GetPath + +GetPath() + +AppendChild(childName) → Path +Creates a path by appending an element for childName to this path. +This path must be a prim path, the AbsoluteRootPath or the +ReflexiveRelativePath. + +Parameters +childName (str) – + +AppendElementString(element) → Path +Creates a path by extracting and appending an element from the given +ascii element encoding. +Attempting to append a root or empty path (or malformed path) or +attempting to append to the EmptyPath will raise an error and return +the EmptyPath. +May also fail and return EmptyPath if this path’s type cannot possess +a child of the type encoded in element . + +Parameters +element (str) – + +AppendExpression() → Path +Creates a path by appending an expression element. +This path must be a prim property or relational attribute path. + +AppendMapper(targetPath) → Path +Creates a path by appending a mapper element for targetPath . +This path must be a prim property or relational attribute path. + +Parameters +targetPath (Path) – + +AppendMapperArg(argName) → Path +Creates a path by appending an element for argName . +This path must be a mapper path. + +Parameters +argName (str) – + +AppendPath(newSuffix) → Path +Creates a path by appending a given relative path to this path. +If the newSuffix is a prim path, then this path must be a prim path or +a root path. +If the newSuffix is a prim property path, then this path must be a +prim path or the ReflexiveRelativePath. + +Parameters +newSuffix (Path) – + +AppendProperty(propName) → Path +Creates a path by appending an element for propName to this path. +This path must be a prim path or the ReflexiveRelativePath. + +Parameters +propName (str) – + +AppendRelationalAttribute(attrName) → Path +Creates a path by appending an element for attrName to this path. +This path must be a target path. + +Parameters +attrName (str) – + +AppendTarget(targetPath) → Path +Creates a path by appending an element for targetPath . +This path must be a prim property or relational attribute path. + +Parameters +targetPath (Path) – + +AppendVariantSelection(variantSet, variant) → Path +Creates a path by appending an element for variantSet and +variant to this path. +This path must be a prim path. + +Parameters + +variantSet (str) – +variant (str) – + +ContainsPrimVariantSelection() → bool +Returns whether the path or any of its parent paths identifies a +variant selection for a prim. + +ContainsPropertyElements() → bool +Return true if this path contains any property elements, false +otherwise. +A false return indicates a prim-like path, specifically a root path, a +prim path, or a prim variant selection path. A true return indicates a +property-like path: a prim property path, a target path, a relational +attribute path, etc. + +ContainsTargetPath() → bool +Return true if this path is or has a prefix that’s a target path or a +mapper path. + +static FindLongestPrefix() + +static FindLongestStrictPrefix() + +static FindPrefixedRange() + +GetAbsoluteRootOrPrimPath() → Path +Creates a path by stripping all properties and relational attributes +from this path, leaving the path to the containing prim. +If the path is already a prim or absolute root path, the same path is +returned. + +GetAllTargetPathsRecursively(result) → None +Returns all the relationship target or connection target paths +contained in this path, and recursively all the target paths contained +in those target paths in reverse depth-first order. +For example, given the +path:’/A/B.a[/C/D.a[/E/F.a]].a[/A/B.a[/C/D.a]]’this method +produces:’/A/B.a[/C/D.a]’,’/C/D.a’,’/C/D.a[/E/F.a]’,’/E/F.a’ + +Parameters +result (list[SdfPath]) – + +GetAncestorsRange() → SdfPathAncestorsRange +Return a range for iterating over the ancestors of this path. +The range provides iteration over the prefixes of a path, ordered from +longest to shortest (the opposite of the order of the prefixes +returned by GetPrefixes). + +GetCommonPrefix(path) → Path +Returns a path with maximal length that is a prefix path of both this +path and path . + +Parameters +path (Path) – + +static GetConciseRelativePaths() +classmethod GetConciseRelativePaths(paths) -> list[SdfPath] +Given some vector of paths, get a vector of concise unambiguous +relative paths. +GetConciseRelativePaths requires a vector of absolute paths. It finds +a set of relative paths such that each relative path is unique. + +Parameters +paths (list[SdfPath]) – + +GetParentPath() → Path +Return the path that identifies this path’s namespace parent. +For a prim path (like’/foo/bar’), return the prim’s parent’s path +(‘/foo’). For a prim property path (like’/foo/bar.property’), return +the prim’s path (‘/foo/bar’). For a target path +(like’/foo/bar.property[/target]’) return the property path +(‘/foo/bar.property’). For a mapper path +(like’/foo/bar.property.mapper[/target]’) return the property path +(‘/foo/bar.property). For a relational attribute path +(like’/foo/bar.property[/target].relAttr’) return the relationship +target’s path (‘/foo/bar.property[/target]’). For a prim variant +selection path (like’/foo/bar{var=sel}’) return the prim path +(‘/foo/bar’). For a root prim path (like’/rootPrim’), return +AbsoluteRootPath() (‘/’). For a single element relative prim path +(like’relativePrim’), return ReflexiveRelativePath() (‘.’). For +ReflexiveRelativePath() , return the relative parent path (’..’). +Note that the parent path of a relative parent path (’..’) is a +relative grandparent path (’../..’). Use caution writing loops +that walk to parent paths since relative paths have infinitely many +ancestors. To more safely traverse ancestor paths, consider iterating +over an SdfPathAncestorsRange instead, as returend by +GetAncestorsRange() . + +GetPrefixes() +Returns the prefix paths of this path. + +GetPrimOrPrimVariantSelectionPath() → Path +Creates a path by stripping all relational attributes, targets, and +properties, leaving the nearest path for which +IsPrimOrPrimVariantSelectionPath() returns true. +See GetPrimPath also. +If the path is already a prim or a prim variant selection path, the +same path is returned. + +GetPrimPath() → Path +Creates a path by stripping all relational attributes, targets, +properties, and variant selections from the leafmost prim path, +leaving the nearest path for which IsPrimPath() returns true. +See GetPrimOrPrimVariantSelectionPath also. +If the path is already a prim path, the same path is returned. + +GetVariantSelection() → tuple[str, str] +Returns the variant selection for this path, if this is a variant +selection path. +Returns a pair of empty strings if this path is not a variant +selection path. + +HasPrefix(prefix) → bool +Return true if both this path and prefix are not the empty path and +this path has prefix as a prefix. +Return false otherwise. + +Parameters +prefix (Path) – + +IsAbsolutePath() → bool +Returns whether the path is absolute. + +IsAbsoluteRootOrPrimPath() → bool +Returns whether the path identifies a prim or the absolute root. + +IsAbsoluteRootPath() → bool +Return true if this path is the AbsoluteRootPath() . + +IsExpressionPath() → bool +Returns whether the path identifies a connection expression. + +IsMapperArgPath() → bool +Returns whether the path identifies a connection mapper arg. + +IsMapperPath() → bool +Returns whether the path identifies a connection mapper. + +IsNamespacedPropertyPath() → bool +Returns whether the path identifies a namespaced property. +A namespaced property has colon embedded in its name. + +IsPrimPath() → bool +Returns whether the path identifies a prim. + +IsPrimPropertyPath() → bool +Returns whether the path identifies a prim’s property. +A relational attribute is not a prim property. + +IsPrimVariantSelectionPath() → bool +Returns whether the path identifies a variant selection for a prim. + +IsPropertyPath() → bool +Returns whether the path identifies a property. +A relational attribute is considered to be a property, so this method +will return true for relational attributes as well as properties of +prims. + +IsRelationalAttributePath() → bool +Returns whether the path identifies a relational attribute. +If this is true, IsPropertyPath() will also be true. + +IsRootPrimPath() → bool +Returns whether the path identifies a root prim. +the path must be absolute and have a single element (for example +/foo ). + +IsTargetPath() → bool +Returns whether the path identifies a relationship or connection +target. + +static IsValidIdentifier() +classmethod IsValidIdentifier(name) -> bool +Returns whether name is a legal identifier for any path component. + +Parameters +name (str) – + +static IsValidNamespacedIdentifier() +classmethod IsValidNamespacedIdentifier(name) -> bool +Returns whether name is a legal namespaced identifier. +This returns true if IsValidIdentifier() does. + +Parameters +name (str) – + +static IsValidPathString() +classmethod IsValidPathString(pathString, errMsg) -> bool +Return true if pathString is a valid path string, meaning that +passing the string to the SdfPath constructor will result in a +valid, non-empty SdfPath. +Otherwise, return false and if errMsg is not None, set the +pointed-to string to the parse error. + +Parameters + +pathString (str) – +errMsg (str) – + +static JoinIdentifier() +classmethod JoinIdentifier(names) -> str +Join names into a single identifier using the namespace delimiter. +Any empty strings present in names are ignored when joining. + +Parameters +names (list[str]) – + +JoinIdentifier(names) -> str +Join names into a single identifier using the namespace delimiter. +Any empty strings present in names are ignored when joining. + +Parameters +names (list[TfToken]) – + +JoinIdentifier(lhs, rhs) -> str +Join lhs and rhs into a single identifier using the namespace +delimiter. +Returns lhs if rhs is empty and vice verse. Returns an empty +string if both lhs and rhs are empty. + +Parameters + +lhs (str) – +rhs (str) – + +JoinIdentifier(lhs, rhs) -> str +Join lhs and rhs into a single identifier using the namespace +delimiter. +Returns lhs if rhs is empty and vice verse. Returns an empty +string if both lhs and rhs are empty. + +Parameters + +lhs (str) – +rhs (str) – + +MakeAbsolutePath(anchor) → Path +Returns the absolute form of this path using anchor as the +relative basis. +anchor must be an absolute prim path. +If this path is a relative path, resolve it using anchor as the +relative basis. +If this path is already an absolute path, just return a copy. + +Parameters +anchor (Path) – + +MakeRelativePath(anchor) → Path +Returns the relative form of this path using anchor as the +relative basis. +anchor must be an absolute prim path. +If this path is an absolute path, return the corresponding relative +path that is relative to the absolute path given by anchor . +If this path is a relative path, return the optimal relative path to +the absolute path given by anchor . (The optimal relative path +from a given prim path is the relative path with the least leading +dot-dots. + +Parameters +anchor (Path) – + +static RemoveAncestorPaths() +classmethod RemoveAncestorPaths(paths) -> None +Remove all elements of paths that prefix other elements in paths. +As a side-effect, the result is left in sorted order. + +Parameters +paths (list[SdfPath]) – + +RemoveCommonSuffix(otherPath, stopAtRootPrim) → tuple[Path, Path] +Find and remove the longest common suffix from two paths. +Returns this path and otherPath with the longest common suffix +removed (first and second, respectively). If the two paths have no +common suffix then the paths are returned as-is. If the paths are +equal then this returns empty paths for relative paths and absolute +roots for absolute paths. The paths need not be the same length. +If stopAtRootPrim is true then neither returned path will be +the root path. That, in turn, means that some common suffixes will not +be removed. For example, if stopAtRootPrim is true then the +paths /A/B and /B will be returned as is. Were it false then the +result would be /A and /. Similarly paths /A/B/C and /B/C would return +/A/B and /B if stopAtRootPrim is true but /A and / if it’s +false . + +Parameters + +otherPath (Path) – +stopAtRootPrim (bool) – + +static RemoveDescendentPaths() +classmethod RemoveDescendentPaths(paths) -> None +Remove all elements of paths that are prefixed by other elements in +paths. +As a side-effect, the result is left in sorted order. + +Parameters +paths (list[SdfPath]) – + +ReplaceName(newName) → Path +Return a copy of this path with its final component changed to +newName. +This path must be a prim or property path. +This method is shorthand for path.GetParentPath().AppendChild(newName) +for prim paths, path.GetParentPath().AppendProperty(newName) for prim +property paths, and +path.GetParentPath().AppendRelationalAttribute(newName) for relational +attribute paths. +Note that only the final path component is ever changed. If the name +of the final path component appears elsewhere in the path, it will not +be modified. +Some examples: +ReplaceName(‘/chars/MeridaGroup’,’AngusGroup’) +->’/chars/AngusGroup’ReplaceName(‘/Merida.tx’,’ty’) +->’/Merida.ty’ReplaceName(‘/Merida.tx[targ].tx’,’ty’) +->’/Merida.tx[targ].ty’ + +Parameters +newName (str) – + +ReplacePrefix(oldPrefix, newPrefix, fixTargetPaths) → Path +Returns a path with all occurrences of the prefix path oldPrefix +replaced with the prefix path newPrefix . +If fixTargetPaths is true, any embedded target paths will also have +their paths replaced. This is the default. +If this is not a target, relational attribute or mapper path this will +do zero or one path prefix replacements, if not the number of +replacements can be greater than one. + +Parameters + +oldPrefix (Path) – +newPrefix (Path) – +fixTargetPaths (bool) – + +ReplaceTargetPath(newTargetPath) → Path +Replaces the relational attribute’s target path. +The path must be a relational attribute path. + +Parameters +newTargetPath (Path) – + +StripAllVariantSelections() → Path +Create a path by stripping all variant selections from all components +of this path, leaving a path with no embedded variant selections. + +static StripNamespace() +classmethod StripNamespace(name) -> str +Returns name stripped of any namespaces. +This does not check the validity of the name; it just attempts to +remove anything that looks like a namespace. + +Parameters +name (str) – + +StripNamespace(name) -> str +Returns name stripped of any namespaces. +This does not check the validity of the name; it just attempts to +remove anything that looks like a namespace. + +Parameters +name (str) – + +static StripPrefixNamespace() +classmethod StripPrefixNamespace(name, matchNamespace) -> tuple[str, bool] +Returns ( name , true ) where name is stripped of the +prefix specified by matchNamespace if name indeed starts with +matchNamespace . +Returns ( name , false ) otherwise, with name unmodified. +This function deals with both the case where matchNamespace +contains the trailing namespace delimiter’:’or not. + +Parameters + +name (str) – +matchNamespace (str) – + +static TokenizeIdentifier() +classmethod TokenizeIdentifier(name) -> list[str] +Tokenizes name by the namespace delimiter. +Returns the empty vector if name is not a valid namespaced +identifier. + +Parameters +name (str) – + +absoluteIndicator = '/' + +absoluteRootPath = Sdf.Path('/') + +childDelimiter = '/' + +property elementString +The string representation of the terminal component of this path. +This path can be reconstructed via +thisPath.GetParentPath().AppendElementString(thisPath.element). +None of absoluteRootPath, reflexiveRelativePath, nor emptyPath +possess the above quality; their .elementString is the empty string. + +emptyPath = Sdf.Path.emptyPath + +expressionIndicator = 'expression' + +property isEmpty +bool +Returns true if this is the empty path ( SdfPath::EmptyPath() ). + +Type +type + +mapperArgDelimiter = '.' + +mapperIndicator = 'mapper' + +property name +The name of the prim, property or relational +attribute identified by the path. +‘’ for EmptyPath. ‘.’ for ReflexiveRelativePath. +‘..’ for a path ending in ParentPathElement. + +namespaceDelimiter = ':' + +parentPathElement = '..' + +property pathElementCount +The number of path elements in this path. + +property pathString +The string representation of this path. + +propertyDelimiter = '.' + +reflexiveRelativePath = Sdf.Path('.') + +relationshipTargetEnd = ']' + +relationshipTargetStart = '[' + +property targetPath +The relational attribute target path for this path. +EmptyPath if this is not a relational attribute path. + +class pxr.Sdf.PathArray +An array of type SdfPath. + +class pxr.Sdf.PathListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.Payload +Represents a payload and all its meta data. +A payload represents a prim reference to an external layer. A payload +is similar to a prim reference (see SdfReference) with the major +difference that payloads are explicitly loaded by the user. +Unloaded payloads represent a boundary that lazy composition and +system behaviors will not traverse across, providing a user-visible +way to manage the working set of the scene. +Attributes: + +assetPath +None + +layerOffset +None + +primPath +None + +property assetPath +None +Sets a new asset path for the layer the payload uses. +See SdfAssetPath for what characters are valid in assetPath . If +assetPath contains invalid characters, issue an error and set this +payload’s asset path to the empty asset path. + +type : str +Returns the asset path of the layer that the payload uses. + +Type +type + +property layerOffset +None +Sets a new layer offset. + +type : LayerOffset +Returns the layer offset associated with the payload. + +Type +type + +property primPath +None +Sets a new prim path for the prim that the payload uses. + +type : Path +Returns the scene path of the prim for the payload. + +Type +type + +class pxr.Sdf.PayloadListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.Permission +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.PermissionPublic, Sdf.PermissionPrivate) + +class pxr.Sdf.PrimSpec +Represents a prim description in an SdfLayer object. +Every SdfPrimSpec object is defined in a layer. It is identified by +its path (SdfPath class) in the namespace hierarchy of its layer. +SdfPrimSpecs can be created using the New() method as children of +either the containing SdfLayer itself (for”root level”prims), or as +children of other SdfPrimSpec objects to extend a hierarchy. The +helper function SdfCreatePrimInLayer() can be used to quickly create a +hierarchy of primSpecs. +SdfPrimSpec objects have properties of two general types: attributes +(containing values) and relationships (different types of connections +to other prims and attributes). Attributes are represented by the +SdfAttributeSpec class and relationships by the SdfRelationshipSpec +class. Each prim has its own namespace of properties. Properties are +stored and accessed by their name. +SdfPrimSpec objects have a typeName, permission restriction, and they +reference and inherit prim paths. Permission restrictions control +which other layers may refer to, or express opinions about a prim. See +the SdfPermission class for more information. + +Insert doc about references and inherits here. +Should have validate... methods for name, children, +properties + +Methods: + +ApplyNameChildrenOrder(vec) +Reorders the given list of child names according to the reorder nameChildren statement for this prim. + +ApplyPropertyOrder(vec) +Reorders the given list of property names according to the reorder properties statement for this prim. + +BlockVariantSelection(variantSetName) +Blocks the variant selected for the given variant set by setting the variant selection to empty. + +CanSetName(newName, whyNot) +Returns true if setting the prim spec's name to newName will succeed. + +ClearActive() +Removes the active opinion in this prim spec if there is one. + +ClearInstanceable() +Clears the value for the prim's instanceable flag. + +ClearKind() +Remove the kind opinion from this prim spec if there is one. + +ClearPayloadList +Clears the payloads for this prim. + +ClearReferenceList +Clears the references for this prim. + +GetAttributeAtPath(path) +Returns an attribute given its path . + +GetObjectAtPath(path) +path: Path + +GetPrimAtPath(path) +Returns a prim given its path . + +GetPropertyAtPath(path) +Returns a property given its path . + +GetRelationshipAtPath(path) +Returns a relationship given its path . + +GetVariantNames(name) +Returns list of variant names for the given variant set. + +HasActive() +Returns true if this prim spec has an opinion about active. + +HasInstanceable() +Returns true if this prim spec has a value authored for its instanceable flag, false otherwise. + +HasKind() +Returns true if this prim spec has an opinion about kind. + +RemoveProperty(property) +Removes the property. + +Attributes: + +ActiveKey + +AnyTypeToken + +CommentKey + +CustomDataKey + +DocumentationKey + +HiddenKey + +InheritPathsKey + +KindKey + +PayloadKey + +PermissionKey + +PrefixKey + +PrefixSubstitutionsKey + +PrimOrderKey + +PropertyOrderKey + +ReferencesKey + +RelocatesKey + +SpecializesKey + +SpecifierKey + +SymmetricPeerKey + +SymmetryArgumentsKey + +SymmetryFunctionKey + +TypeNameKey + +VariantSelectionKey + +VariantSetNamesKey + +active +Whether this prim spec is active. + +assetInfo +Returns the asset info dictionary for this prim. + +attributes +The attributes of this prim, as an ordered dictionary. + +comment +The prim's comment string. + +customData +The custom data for this prim. + +documentation +The prim's documentation string. + +expired + +hasPayloads +Returns true if this prim has payloads set. + +hasReferences +Returns true if this prim has references set. + +hidden +Whether this prim spec will be hidden in browsers. + +inheritPathList +A PathListEditor for the prim's inherit paths. + +instanceable +Whether this prim spec is flagged as instanceable. + +kind +What kind of model this prim spec represents, if any. + +name +The prim's name. + +nameChildren +The prim name children of this prim, as an ordered dictionary. + +nameChildrenOrder +Get/set the list of child names for this prim's 'reorder nameChildren' statement. + +nameParent +The name parent of this prim. + +nameRoot +The name pseudo-root of this prim. + +payloadList +A PayloadListEditor for the prim's payloads. + +permission +The prim's permission restriction. + +prefix +The prim's prefix. + +prefixSubstitutions +Dictionary of prefix substitutions. + +properties +The properties of this prim, as an ordered dictionary. + +propertyOrder +Get/set the list of property names for this prim's 'reorder properties' statement. + +realNameParent +The name parent of this prim. + +referenceList +A ReferenceListEditor for the prim's references. + +relationships +The relationships of this prim, as an ordered dictionary. + +relocates +An editing proxy for the prim's map of relocation paths. + +specializesList +A PathListEditor for the prim's specializes. + +specifier +The prim's specifier (SpecifierDef or SpecifierOver). + +suffix +The prim's suffix. + +suffixSubstitutions +Dictionary of prefix substitutions. + +symmetricPeer +The prims's symmetric peer. + +symmetryArguments +Dictionary with prim symmetry arguments. + +symmetryFunction +The prim's symmetry function. + +typeName +The type of this prim. + +variantSelections +Dictionary whose keys are variant set names and whose values are the variants chosen for each set. + +variantSetNameList +A StringListEditor for the names of the variant sets for this prim. + +variantSets +The VariantSetSpecs for this prim indexed by name. + +ApplyNameChildrenOrder(vec) → None +Reorders the given list of child names according to the reorder +nameChildren statement for this prim. +This routine employs the standard list editing operation for ordered +items in a ListEditor. + +Parameters +vec (list[str]) – + +ApplyPropertyOrder(vec) → None +Reorders the given list of property names according to the reorder +properties statement for this prim. +This routine employs the standard list editing operation for ordered +items in a ListEditor. + +Parameters +vec (list[str]) – + +BlockVariantSelection(variantSetName) → None +Blocks the variant selected for the given variant set by setting the +variant selection to empty. + +Parameters +variantSetName (str) – + +CanSetName(newName, whyNot) → bool +Returns true if setting the prim spec’s name to newName will +succeed. +Returns false if it won’t, and sets whyNot with a string +describing why not. + +Parameters + +newName (str) – +whyNot (str) – + +ClearActive() → None +Removes the active opinion in this prim spec if there is one. + +ClearInstanceable() → None +Clears the value for the prim’s instanceable flag. + +ClearKind() → None +Remove the kind opinion from this prim spec if there is one. + +ClearPayloadList() +Clears the payloads for this prim. + +ClearReferenceList() +Clears the references for this prim. + +GetAttributeAtPath(path) → AttributeSpec +Returns an attribute given its path . +Returns invalid handle if there is no attribute at path . This is +simply a more specifically typed version of GetObjectAtPath. + +Parameters +path (Path) – + +GetObjectAtPath(path) → object +path: Path +Returns a prim or property given its namespace path. +If path is relative then it will be interpreted as relative to this prim. If it is absolute then it will be interpreted as absolute in this prim’s layer. The return type can be either PrimSpecPtr or PropertySpecPtr. + +GetPrimAtPath(path) → PrimSpec +Returns a prim given its path . +Returns invalid handle if there is no prim at path . This is +simply a more specifically typed version of GetObjectAtPath. + +Parameters +path (Path) – + +GetPropertyAtPath(path) → PropertySpec +Returns a property given its path . +Returns invalid handle if there is no property at path . This is +simply a more specifically typed version of GetObjectAtPath. + +Parameters +path (Path) – + +GetRelationshipAtPath(path) → RelationshipSpec +Returns a relationship given its path . +Returns invalid handle if there is no relationship at path . This +is simply a more specifically typed version of GetObjectAtPath. + +Parameters +path (Path) – + +GetVariantNames(name) → list[str] +Returns list of variant names for the given variant set. + +Parameters +name (str) – + +HasActive() → bool +Returns true if this prim spec has an opinion about active. + +HasInstanceable() → bool +Returns true if this prim spec has a value authored for its +instanceable flag, false otherwise. + +HasKind() → bool +Returns true if this prim spec has an opinion about kind. + +RemoveProperty(property) → None +Removes the property. + +Parameters +property (PropertySpec) – + +ActiveKey = 'active' + +AnyTypeToken = '__AnyType__' + +CommentKey = 'comment' + +CustomDataKey = 'customData' + +DocumentationKey = 'documentation' + +HiddenKey = 'hidden' + +InheritPathsKey = 'inheritPaths' + +KindKey = 'kind' + +PayloadKey = 'payload' + +PermissionKey = 'permission' + +PrefixKey = 'prefix' + +PrefixSubstitutionsKey = 'prefixSubstitutions' + +PrimOrderKey = 'primOrder' + +PropertyOrderKey = 'propertyOrder' + +ReferencesKey = 'references' + +RelocatesKey = 'relocates' + +SpecializesKey = 'specializes' + +SpecifierKey = 'specifier' + +SymmetricPeerKey = 'symmetricPeer' + +SymmetryArgumentsKey = 'symmetryArguments' + +SymmetryFunctionKey = 'symmetryFunction' + +TypeNameKey = 'typeName' + +VariantSelectionKey = 'variantSelection' + +VariantSetNamesKey = 'variantSetNames' + +property active +Whether this prim spec is active. +The default value is true. + +property assetInfo +Returns the asset info dictionary for this prim. +The default value is an empty dictionary. +The asset info dictionary is used to annotate prims representing the root-prims of assets (generally organized as models) with various data related to asset management. For example, asset name, root layer identifier, asset version etc. + +property attributes +The attributes of this prim, as an ordered dictionary. + +property comment +The prim’s comment string. + +property customData +The custom data for this prim. +The default value for custom data is an empty dictionary. +Custom data is for use by plugins or other non-tools supplied +extensions that need to be able to store data attached to arbitrary +scene objects. Note that if the only objects you want to store data +on are prims, using custom attributes is probably a better choice. +But if you need to possibly store this data on attributes or +relationships or as annotations on reference arcs, then custom data +is an appropriate choice. + +property documentation +The prim’s documentation string. + +property expired + +property hasPayloads +Returns true if this prim has payloads set. + +property hasReferences +Returns true if this prim has references set. + +property hidden +Whether this prim spec will be hidden in browsers. +The default value is false. + +property inheritPathList +A PathListEditor for the prim’s inherit paths. +The list of the inherit paths for this prim may be modified with this PathListEditor. +A PathListEditor may express a list either as an explicit value or as a set of list editing operations. See PathListEditor for more information. + +property instanceable +Whether this prim spec is flagged as instanceable. +The default value is false. + +property kind +What kind of model this prim spec represents, if any. +The default is an empty string + +property name +The prim’s name. + +property nameChildren +The prim name children of this prim, as an ordered dictionary. +Note that although this property is described as being read-only, you can modify the contents to add, remove, or reorder children. + +property nameChildrenOrder +Get/set the list of child names for this prim’s ‘reorder nameChildren’ statement. + +property nameParent +The name parent of this prim. + +property nameRoot +The name pseudo-root of this prim. + +property payloadList +A PayloadListEditor for the prim’s payloads. +The list of the payloads for this prim may be modified with this PayloadListEditor. +A PayloadListEditor may express a list either as an explicit value or as a set of list editing operations. See PayloadListEditor for more information. + +property permission +The prim’s permission restriction. +The default value is SdfPermissionPublic. + +property prefix +The prim’s prefix. + +property prefixSubstitutions +Dictionary of prefix substitutions. + +property properties +The properties of this prim, as an ordered dictionary. +Note that although this property is described as being read-only, you can modify the contents to add, remove, or reorder properties. + +property propertyOrder +Get/set the list of property names for this prim’s ‘reorder properties’ statement. + +property realNameParent +The name parent of this prim. + +property referenceList +A ReferenceListEditor for the prim’s references. +The list of the references for this prim may be modified with this ReferenceListEditor. +A ReferenceListEditor may express a list either as an explicit value or as a set of list editing operations. See ReferenceListEditor for more information. + +property relationships +The relationships of this prim, as an ordered dictionary. + +property relocates +An editing proxy for the prim’s map of relocation paths. +The map of source-to-target paths specifying namespace relocation may be set or cleared whole, or individual map entries may be added, removed, or edited. + +property specializesList +A PathListEditor for the prim’s specializes. +The list of the specializes for this prim may be modified with this PathListEditor. +A PathListEditor may express a list either as an explicit value or as a set of list editing operations. See PathListEditor for more information. + +property specifier +The prim’s specifier (SpecifierDef or SpecifierOver). +The default value is SpecifierOver. + +property suffix +The prim’s suffix. + +property suffixSubstitutions +Dictionary of prefix substitutions. + +property symmetricPeer +The prims’s symmetric peer. + +property symmetryArguments +Dictionary with prim symmetry arguments. +Although this property is marked read-only, you can modify the contents to add, change, and clear symmetry arguments. + +property symmetryFunction +The prim’s symmetry function. + +property typeName +The type of this prim. + +property variantSelections +Dictionary whose keys are variant set names and whose values are the variants chosen for each set. +Although this property is marked read-only, you can modify the contents to add, change, and clear variants. + +property variantSetNameList +A StringListEditor for the names of the variant +sets for this prim. +The list of the names of the variants sets of this prim may be +modified with this StringListEditor. +A StringListEditor may express a list either as an explicit value or as a set of list editing operations. See StringListEditor for more information. +Although this property is marked as read-only, the returned object is modifiable. + +property variantSets +The VariantSetSpecs for this prim indexed by name. +Although this property is marked as read-only, you can +modify the contents to remove variant sets. New variant sets +are created by creating them with the prim as the owner. +Although this property is marked as read-only, the returned object +is modifiable. + +class pxr.Sdf.PropertySpec +Base class for SdfAttributeSpec and SdfRelationshipSpec. +Scene Spec Attributes (SdfAttributeSpec) and Relationships +(SdfRelationshipSpec) are the basic properties that make up Scene Spec +Prims (SdfPrimSpec). They share many qualities and can sometimes be +treated uniformly. The common qualities are provided by this base +class. +NOTE: Do not use Python reserved words and keywords as attribute +names. This will cause attribute resolution to fail. +Methods: + +ClearDefaultValue() +Clear the attribute's default value. + +HasDefaultValue() +Returns true if a default value is set for this attribute. + +Attributes: + +AssetInfoKey + +CommentKey + +CustomDataKey + +CustomKey + +DisplayGroupKey + +DisplayNameKey + +DocumentationKey + +HiddenKey + +PermissionKey + +PrefixKey + +SymmetricPeerKey + +SymmetryArgumentsKey + +SymmetryFunctionKey + +assetInfo +Returns the asset info dictionary for this property. + +comment +A comment describing the property. + +custom +Whether this property spec declares a custom attribute. + +customData +The property's custom data. + +default +The default value of this property. + +displayGroup +DisplayGroup for the property. + +displayName +DisplayName for the property. + +documentation +Documentation for the property. + +expired + +hasOnlyRequiredFields +Indicates whether this spec has any significant data other than just what is necessary for instantiation. + +hidden +Whether this property will be hidden in browsers. + +name +The name of the property. + +owner +The owner of this property. + +permission +The property's permission restriction. + +prefix +Prefix for the property. + +symmetricPeer +The property's symmetric peer. + +symmetryArguments +Dictionary with property symmetry arguments. + +symmetryFunction +The property's symmetry function. + +variability +Returns the variability of the property. + +ClearDefaultValue() → None +Clear the attribute’s default value. + +HasDefaultValue() → bool +Returns true if a default value is set for this attribute. + +AssetInfoKey = 'assetInfo' + +CommentKey = 'comment' + +CustomDataKey = 'customData' + +CustomKey = 'custom' + +DisplayGroupKey = 'displayGroup' + +DisplayNameKey = 'displayName' + +DocumentationKey = 'documentation' + +HiddenKey = 'hidden' + +PermissionKey = 'permission' + +PrefixKey = 'prefix' + +SymmetricPeerKey = 'symmetricPeer' + +SymmetryArgumentsKey = 'symmetryArguments' + +SymmetryFunctionKey = 'symmetryFunction' + +property assetInfo +Returns the asset info dictionary for this property. +The default value is an empty dictionary. +The asset info dictionary is used to annotate SdfAssetPath-valued attributes pointing to the root-prims of assets (generally organized as models) with various data related to asset management. For example, asset name, root layer identifier, asset version etc. +Note: It is only valid to author assetInfo on attributes that are of type SdfAssetPath. + +property comment +A comment describing the property. + +property custom +Whether this property spec declares a custom attribute. + +property customData +The property’s custom data. +The default value for custom data is an empty dictionary. +Custom data is for use by plugins or other non-tools supplied +extensions that need to be able to store data attached to arbitrary +scene objects. Note that if the only objects you want to store data +on are prims, using custom attributes is probably a better choice. +But if you need to possibly store this data on attributes or +relationships or as annotations on reference arcs, then custom data +is an appropriate choice. + +property default +The default value of this property. + +property displayGroup +DisplayGroup for the property. + +property displayName +DisplayName for the property. + +property documentation +Documentation for the property. + +property expired + +property hasOnlyRequiredFields +Indicates whether this spec has any significant data other +than just what is necessary for instantiation. +This is a less strict version of isInert, returning True if +the spec contains as much as the type and name. + +property hidden +Whether this property will be hidden in browsers. + +property name +The name of the property. + +property owner +The owner of this property. Either a relationship or a prim. + +property permission +The property’s permission restriction. + +property prefix +Prefix for the property. + +property symmetricPeer +The property’s symmetric peer. + +property symmetryArguments +Dictionary with property symmetry arguments. +Although this property is marked read-only, you can modify the contents to add, change, and clear symmetry arguments. + +property symmetryFunction +The property’s symmetry function. + +property variability +Returns the variability of the property. +An attribute’s variability may be Varying +Uniform, Config or Computed. +For an attribute, the default is Varying, for a relationship the default is Uniform. +Varying relationships may be directly authored ‘animating’ targetpaths over time. +Varying attributes may be directly authored, animated and +affected on by Actions. They are the most flexible. +Uniform attributes may be authored only with non-animated values +(default values). They cannot be affected by Actions, but they +can be connected to other Uniform attributes. +Config attributes are the same as Uniform except that a Prim +can choose to alter its collection of built-in properties based +on the values of its Config attributes. +Computed attributes may not be authored in scene description. +Prims determine the values of their Computed attributes through +Prim-specific computation. They may not be connected. + +class pxr.Sdf.PseudoRootSpec +Attributes: + +expired + +property expired + +class pxr.Sdf.Reference +Represents a reference and all its meta data. +A reference is expressed on a prim in a given layer and it identifies +a prim in a layer stack. All opinions in the namespace hierarchy under +the referenced prim will be composed with the opinions in the +namespace hierarchy under the referencing prim. +The asset path specifies the layer stack being referenced. If this +asset path is non-empty, this reference is considered +an’external’reference to the layer stack rooted at the specified +layer. If this is empty, this reference is considered +an’internal’reference to the layer stack containing (but not +necessarily rooted at) the layer where the reference is authored. +The prim path specifies the prim in the referenced layer stack from +which opinions will be composed. If this prim path is empty, it will +be considered a reference to the default prim specified in the root +layer of the referenced layer stack see SdfLayer::GetDefaultPrim. +The meta data for a reference is its layer offset and custom data. The +layer offset is an affine transformation applied to all anim splines +in the referenced prim’s namespace hierarchy, see SdfLayerOffset for +details. Custom data is for use by plugins or other non-tools supplied +extensions that need to be able to store data associated with +references. +Methods: + +IsInternal() +Returns true in the case of an internal reference. + +Attributes: + +assetPath +None + +customData +None + +layerOffset +None + +primPath +None + +IsInternal() → bool +Returns true in the case of an internal reference. +An internal reference is a reference with an empty asset path. + +property assetPath +None +Sets the asset path for the root layer of the referenced layer stack. +This may be set to an empty string to specify an internal reference. +See SdfAssetPath for what characters are valid in assetPath . If +assetPath contains invalid characters, issue an error and set this +reference’s asset path to the empty asset path. + +type : str +Returns the asset path to the root layer of the referenced layer +stack. +This will be empty in the case of an internal reference. + +Type +type + +property customData +None +Sets the custom data associated with the reference. + +type : None +Sets a custom data entry for the reference. +If value is empty, then this removes the given custom data entry. + +type : VtDictionary +Returns the custom data associated with the reference. + +Type +type + +property layerOffset +None +Sets a new layer offset. + +type : LayerOffset +Returns the layer offset associated with the reference. + +Type +type + +property primPath +None +Sets the path of the referenced prim. +This may be set to an empty path to specify a reference to the default +prim in the referenced layer stack. + +type : Path +Returns the path of the referenced prim. +This will be empty if the referenced prim is the default prim +specified in the referenced layer stack. + +Type +type + +class pxr.Sdf.ReferenceListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.RelationshipSpec +A property that contains a reference to one or more SdfPrimSpec +instances. +A relationship may refer to one or more target prims or attributes. +All targets of a single relationship are considered to be playing the +same role. Note that role does not imply that the target prims or +attributes are of the same type . +Relationships may be annotated with relational attributes. Relational +attributes are named SdfAttributeSpec objects containing values that +describe the relationship. For example, point weights are commonly +expressed as relational attributes. +Methods: + +RemoveTargetPath(path, preserveTargetOrder) +Removes the specified target path. + +ReplaceTargetPath(oldPath, newPath) +Updates the specified target path. + +Attributes: + +TargetsKey + +expired + +noLoadHint +whether the target must be loaded to load the prim this relationship is attached to. + +targetPathList +A PathListEditor for the relationship's target paths. + +RemoveTargetPath(path, preserveTargetOrder) → None +Removes the specified target path. +Removes the given target path and any relational attributes for the +given target path. If preserveTargetOrder is true , Erase() is +called on the list editor instead of RemoveItemEdits(). This preserves +the ordered items list. + +Parameters + +path (Path) – +preserveTargetOrder (bool) – + +ReplaceTargetPath(oldPath, newPath) → None +Updates the specified target path. +Replaces the path given by oldPath with the one specified by +newPath . Relational attributes are updated if necessary. + +Parameters + +oldPath (Path) – +newPath (Path) – + +TargetsKey = 'targetPaths' + +property expired + +property noLoadHint +whether the target must be loaded to load the prim this +relationship is attached to. + +property targetPathList +A PathListEditor for the relationship’s target paths. +The list of the target paths for this relationship may be +modified with this PathListEditor. +A PathListEditor may express a list either as an explicit +value or as a set of list editing operations. See PathListEditor +for more information. + +class pxr.Sdf.Spec +Base class for all Sdf spec classes. +Methods: + +ClearInfo(key) +key : string nClears the value for scene spec info with the given key. + +GetAsText + +GetFallbackForInfo(key) +key : string + +GetInfo(key) +Gets the value for the given metadata key. + +GetMetaDataDisplayGroup(key) +Returns this metadata key's displayGroup. + +GetMetaDataInfoKeys() +Returns the list of metadata info keys for this object. + +GetTypeForInfo(key) +key : string + +HasInfo(key) +key : string + +IsInert +Indicates whether this spec has any significant data. + +ListInfoKeys() +Returns the full list of info keys currently set on this object. + +SetInfo(key, value) +Sets the value for the given metadata key. + +SetInfoDictionaryValue(dictionaryKey, ...) +Sets the value for entryKey to value within the dictionary with the given metadata key dictionaryKey . + +Attributes: + +expired + +isInert +Indicates whether this spec has any significant data. + +layer +The owning layer. + +path +The absolute scene path. + +ClearInfo(key) +key : string +nClears the value for scene spec info with the given key. After calling this, HasInfo() will return false. To make HasInfo() return true, set a value for that scene spec info. + +GetAsText() + +GetFallbackForInfo(key) +key : string +Returns the fallback value for the given key. + +GetInfo(key) → VtValue +Gets the value for the given metadata key. +This is interim API which is likely to change. Only editors with an +immediate specific need (like the Inspector) should use this API. + +Parameters +key (str) – + +GetMetaDataDisplayGroup(key) → str +Returns this metadata key’s displayGroup. + +Parameters +key (str) – + +GetMetaDataInfoKeys() → list[str] +Returns the list of metadata info keys for this object. +This is not the complete list of keys, it is only those that should be +considered to be metadata by inspectors or other presentation UI. +This is interim API which is likely to change. Only editors with an +immediate specific need (like the Inspector) should use this API. + +GetTypeForInfo(key) +key : string +Returns the type of value for the given key. + +HasInfo(key) → bool +key : string +Returns whether there is a setting for the scene spec info with the given key. +When asked for a value for one of its scene spec info, a valid value will always be returned. But if this API returns false for a scene spec info, the value of that info will be the defined default value. +(XXX: This may change such that it is an error to ask for a value when there is none). +When dealing with a composedLayer, it is not necessary to worry about whether a scene spec info ‘has a value’ because the composed layer will always have a valid value, even if it is the default. +A spec may or may not have an expressed value for some of its scene spec info. + +IsInert() +Indicates whether this spec has any significant data. If ignoreChildren is true, child scenegraph objects will be ignored. + +ListInfoKeys() → list[str] +Returns the full list of info keys currently set on this object. +This does not include fields that represent names of children. + +SetInfo(key, value) → None +Sets the value for the given metadata key. +It is an error to pass a value that is not the correct type for that +given key. +This is interim API which is likely to change. Only editors with an +immediate specific need (like the Inspector) should use this API. + +Parameters + +key (str) – +value (VtValue) – + +SetInfoDictionaryValue(dictionaryKey, entryKey, value) → None +Sets the value for entryKey to value within the dictionary +with the given metadata key dictionaryKey . + +Parameters + +dictionaryKey (str) – +entryKey (str) – +value (VtValue) – + +property expired + +property isInert +Indicates whether this spec has any significant data. This is for backwards compatibility, use IsInert instead. +Compatibility note: prior to presto 1.9, isInert (then isEmpty) was true for otherwise inert PrimSpecs with inert inherits, references, or variant sets. isInert is now false in such conditions. + +property layer +The owning layer. + +property path +The absolute scene path. + +class pxr.Sdf.SpecType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.SpecTypeUnknown, Sdf.SpecTypeAttribute, Sdf.SpecTypeConnection, Sdf.SpecTypeExpression, Sdf.SpecTypeMapper, Sdf.SpecTypeMapperArg, Sdf.SpecTypePrim, Sdf.SpecTypePseudoRoot, Sdf.SpecTypeRelationship, Sdf.SpecTypeRelationshipTarget, Sdf.SpecTypeVariant, Sdf.SpecTypeVariantSet) + +class pxr.Sdf.Specifier +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.SpecifierDef, Sdf.SpecifierOver, Sdf.SpecifierClass) + +class pxr.Sdf.StringListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.TimeCode +Value type that represents a time code. It’s equivalent to a double +type value but is used to indicate that this value should be resolved +by any time based value resolution. +Methods: + +GetValue() +Return the time value. + +GetValue() → float +Return the time value. + +class pxr.Sdf.TimeCodeArray +An array of type SdfTimeCode. + +class pxr.Sdf.TokenListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.UInt64ListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.UIntListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.UnregisteredValue +Stores a representation of the value for an unregistered metadata +field encountered during text layer parsing. +This provides the ability to serialize this data to a layer, as well +as limited inspection and editing capabilities (e.g., moving this data +to a different spec or field) even when the data type of the value +isn’t known. +Attributes: + +value +VtValue + +property value +VtValue +Returns the wrapped VtValue specified in the constructor. + +Type +type + +class pxr.Sdf.UnregisteredValueListOp +Methods: + +ApplyOperations + +Clear + +ClearAndMakeExplicit + +Create + +CreateExplicit + +GetAddedOrExplicitItems + +HasItem + +Attributes: + +addedItems + +appendedItems + +deletedItems + +explicitItems + +isExplicit + +orderedItems + +prependedItems + +ApplyOperations() + +Clear() + +ClearAndMakeExplicit() + +static Create() + +static CreateExplicit() + +GetAddedOrExplicitItems() + +HasItem() + +property addedItems + +property appendedItems + +property deletedItems + +property explicitItems + +property isExplicit + +property orderedItems + +property prependedItems + +class pxr.Sdf.ValueBlock +A special value type that can be used to explicitly author an opinion +for an attribute’s default value or time sample value that represents +having no value. Note that this is different from not having a value +authored. +One could author such a value in two ways. +attribute->SetDefaultValue(VtValue(SdfValueBlock()); +\.\.\. +layer->SetTimeSample(attribute->GetPath(), 101, VtValue(SdfValueBlock())); + +class pxr.Sdf.ValueRoleNames +Attributes: + +Color + +EdgeIndex + +FaceIndex + +Frame + +Normal + +Point + +PointIndex + +TextureCoordinate + +Transform + +Vector + +Color = 'Color' + +EdgeIndex = 'EdgeIndex' + +FaceIndex = 'FaceIndex' + +Frame = 'Frame' + +Normal = 'Normal' + +Point = 'Point' + +PointIndex = 'PointIndex' + +TextureCoordinate = 'TextureCoordinate' + +Transform = 'Transform' + +Vector = 'Vector' + +class pxr.Sdf.ValueTypeName +Represents a value type name, i.e. an attribute’s type name. Usually, +a value type name associates a string with a TfType and an +optional role, along with additional metadata. A schema registers all +known value type names and may register multiple names for the same +TfType and role pair. All name strings for a given pair are +collectively called its aliases. +A value type name may also represent just a name string, without a +TfType , role or other metadata. This is currently used +exclusively to unserialize and re-serialize an attribute’s type name +where that name is not known to the schema. +Because value type names can have aliases and those aliases may change +in the future, clients should avoid using the value type name’s string +representation except to report human readable messages and when +serializing. Clients can look up a value type name by string using +SdfSchemaBase::FindType() and shouldn’t otherwise need the string. +Aliases compare equal, even if registered by different schemas. +Attributes: + +aliasesAsStrings + +arrayType +ValueTypeName + +cppTypeName + +defaultUnit +Enum + +defaultValue +VtValue + +isArray +bool + +isScalar +bool + +role +str + +scalarType +ValueTypeName + +type +Type + +property aliasesAsStrings + +property arrayType +ValueTypeName +Returns the array version of this type name if it’s an scalar type +name, otherwise returns this type name. +If there is no array type name then this returns the invalid type +name. + +Type +type + +property cppTypeName + +property defaultUnit +Enum +Returns the default unit enum for the type. + +Type +type + +property defaultValue +VtValue +Returns the default value for the type. + +Type +type + +property isArray +bool +Returns true iff this type is an array. +The invalid type is considered neither scalar nor array. + +Type +type + +property isScalar +bool +Returns true iff this type is a scalar. +The invalid type is considered neither scalar nor array. + +Type +type + +property role +str +Returns the type’s role. + +Type +type + +property scalarType +ValueTypeName +Returns the scalar version of this type name if it’s an array type +name, otherwise returns this type name. +If there is no scalar type name then this returns the invalid type +name. + +Type +type + +property type +Type +Returns the TfType of the type. + +Type +type + +class pxr.Sdf.ValueTypeNames +Methods: + +Find + +Attributes: + +Asset + +AssetArray + +Bool + +BoolArray + +Color3d + +Color3dArray + +Color3f + +Color3fArray + +Color3h + +Color3hArray + +Color4d + +Color4dArray + +Color4f + +Color4fArray + +Color4h + +Color4hArray + +Double + +Double2 + +Double2Array + +Double3 + +Double3Array + +Double4 + +Double4Array + +DoubleArray + +Float + +Float2 + +Float2Array + +Float3 + +Float3Array + +Float4 + +Float4Array + +FloatArray + +Frame4d + +Frame4dArray + +Half + +Half2 + +Half2Array + +Half3 + +Half3Array + +Half4 + +Half4Array + +HalfArray + +Int + +Int2 + +Int2Array + +Int3 + +Int3Array + +Int4 + +Int4Array + +Int64 + +Int64Array + +IntArray + +Matrix2d + +Matrix2dArray + +Matrix3d + +Matrix3dArray + +Matrix4d + +Matrix4dArray + +Normal3d + +Normal3dArray + +Normal3f + +Normal3fArray + +Normal3h + +Normal3hArray + +Point3d + +Point3dArray + +Point3f + +Point3fArray + +Point3h + +Point3hArray + +Quatd + +QuatdArray + +Quatf + +QuatfArray + +Quath + +QuathArray + +String + +StringArray + +TexCoord2d + +TexCoord2dArray + +TexCoord2f + +TexCoord2fArray + +TexCoord2h + +TexCoord2hArray + +TexCoord3d + +TexCoord3dArray + +TexCoord3f + +TexCoord3fArray + +TexCoord3h + +TexCoord3hArray + +TimeCode + +TimeCodeArray + +Token + +TokenArray + +UChar + +UCharArray + +UInt + +UInt64 + +UInt64Array + +UIntArray + +Vector3d + +Vector3dArray + +Vector3f + +Vector3fArray + +Vector3h + +Vector3hArray + +static Find() + +Asset =  + +AssetArray =  + +Bool =  + +BoolArray =  + +Color3d =  + +Color3dArray =  + +Color3f =  + +Color3fArray =  + +Color3h =  + +Color3hArray =  + +Color4d =  + +Color4dArray =  + +Color4f =  + +Color4fArray =  + +Color4h =  + +Color4hArray =  + +Double =  + +Double2 =  + +Double2Array =  + +Double3 =  + +Double3Array =  + +Double4 =  + +Double4Array =  + +DoubleArray =  + +Float =  + +Float2 =  + +Float2Array =  + +Float3 =  + +Float3Array =  + +Float4 =  + +Float4Array =  + +FloatArray =  + +Frame4d =  + +Frame4dArray =  + +Half =  + +Half2 =  + +Half2Array =  + +Half3 =  + +Half3Array =  + +Half4 =  + +Half4Array =  + +HalfArray =  + +Int =  + +Int2 =  + +Int2Array =  + +Int3 =  + +Int3Array =  + +Int4 =  + +Int4Array =  + +Int64 =  + +Int64Array =  + +IntArray =  + +Matrix2d =  + +Matrix2dArray =  + +Matrix3d =  + +Matrix3dArray =  + +Matrix4d =  + +Matrix4dArray =  + +Normal3d =  + +Normal3dArray =  + +Normal3f =  + +Normal3fArray =  + +Normal3h =  + +Normal3hArray =  + +Point3d =  + +Point3dArray =  + +Point3f =  + +Point3fArray =  + +Point3h =  + +Point3hArray =  + +Quatd =  + +QuatdArray =  + +Quatf =  + +QuatfArray =  + +Quath =  + +QuathArray =  + +String =  + +StringArray =  + +TexCoord2d =  + +TexCoord2dArray =  + +TexCoord2f =  + +TexCoord2fArray =  + +TexCoord2h =  + +TexCoord2hArray =  + +TexCoord3d =  + +TexCoord3dArray =  + +TexCoord3f =  + +TexCoord3fArray =  + +TexCoord3h =  + +TexCoord3hArray =  + +TimeCode =  + +TimeCodeArray =  + +Token =  + +TokenArray =  + +UChar =  + +UCharArray =  + +UInt =  + +UInt64 =  + +UInt64Array =  + +UIntArray =  + +Vector3d =  + +Vector3dArray =  + +Vector3f =  + +Vector3fArray =  + +Vector3h =  + +Vector3hArray =  + +class pxr.Sdf.Variability +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Sdf.VariabilityVarying, Sdf.VariabilityUniform) + +class pxr.Sdf.VariantSetSpec +Represents a coherent set of alternate representations for part of a +scene. +An SdfPrimSpec object may contain one or more named SdfVariantSetSpec +objects that define variations on the prim. +An SdfVariantSetSpec object contains one or more named SdfVariantSpec +objects. It may also define the name of one of its variants to be used +by default. +When a prim references another prim, the referencing prim may specify +one of the variants from each of the variant sets of the target prim. +The chosen variant from each set (or the default variant from those +sets that the referencing prim does not explicitly specify) is +composited over the target prim, and then the referencing prim is +composited over the result. +Methods: + +RemoveVariant(variant) +Removes variant from the list of variants. + +Attributes: + +expired + +name +The variant set's name. + +owner +The prim that this variant set belongs to. + +variantList +The variants in this variant set as a list. + +variants +The variants in this variant set as a dict. + +RemoveVariant(variant) → None +Removes variant from the list of variants. +If the variant set does not currently own variant , no action is +taken. + +Parameters +variant (VariantSpec) – + +property expired + +property name +The variant set’s name. + +property owner +The prim that this variant set belongs to. + +property variantList +The variants in this variant set as a list. + +property variants +The variants in this variant set as a dict. + +class pxr.Sdf.VariantSpec +Represents a single variant in a variant set. +A variant contains a prim. This prim is the root prim of the variant. +SdfVariantSpecs are value objects. This means they are immutable once +created and they are passed by copy-in APIs. To change a variant spec, +you make a new one and replace the existing one. +Methods: + +GetVariantNames(name) +Returns list of variant names for the given variant set. + +Attributes: + +expired + +name +The variant's name. + +owner +The variant set that this variant belongs to. + +primSpec +The root prim of this variant. + +variantSets +SdfVariantSetsProxy + +GetVariantNames(name) → list[str] +Returns list of variant names for the given variant set. + +Parameters +name (str) – + +property expired + +property name +The variant’s name. + +property owner +The variant set that this variant belongs to. + +property primSpec +The root prim of this variant. + +property variantSets +SdfVariantSetsProxy +Returns the nested variant sets. +The result maps variant set names to variant sets. Variant sets may be +removed through the proxy. + +Type +type + +pxr.Sdf.Find(layerFileName, scenePath) → object +layerFileName: string +scenePath: Path +If given a single string argument, returns the menv layer with +the given filename. If given two arguments (a string and a Path), finds +the menv layer with the given filename and returns the scene object +within it at the given path. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Sdr.md b/Sdr.md new file mode 100644 index 0000000000000000000000000000000000000000..2d5a10f7a5a11dcb05566a678e8e2760072e246c --- /dev/null +++ b/Sdr.md @@ -0,0 +1,709 @@ + + +Sdr module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Sdr module + +  + +# Sdr module + +Summary: The Sdr (Shader Definition Registry) is a specialized version of Ndr for Shaders. + +Python bindings for libSdr +Classes: + +NodeContext + +NodeMetadata + +NodeRole + +PropertyMetadata + +PropertyRole + +PropertyTypes + +Registry +The shading-specialized version of NdrRegistry . + +ShaderNode +A specialized version of NdrNode which holds shading information. + +ShaderNodeList + +ShaderProperty +A specialized version of NdrProperty which holds shading information. + +class pxr.Sdr.NodeContext +Attributes: + +Displacement + +Light + +LightFilter + +Pattern + +PixelFilter + +SampleFilter + +Surface + +Volume + +Displacement = 'displacement' + +Light = 'light' + +LightFilter = 'lightFilter' + +Pattern = 'pattern' + +PixelFilter = 'pixelFilter' + +SampleFilter = 'sampleFilter' + +Surface = 'surface' + +Volume = 'volume' + +class pxr.Sdr.NodeMetadata +Attributes: + +Category + +Departments + +Help + +ImplementationName + +Label + +Pages + +Primvars + +Role + +SdrDefinitionNameFallbackPrefix + +SdrUsdEncodingVersion + +Target + +Category = 'category' + +Departments = 'departments' + +Help = 'help' + +ImplementationName = '__SDR__implementationName' + +Label = 'label' + +Pages = 'pages' + +Primvars = 'primvars' + +Role = 'role' + +SdrDefinitionNameFallbackPrefix = 'sdrDefinitionNameFallbackPrefix' + +SdrUsdEncodingVersion = 'sdrUsdEncodingVersion' + +Target = '__SDR__target' + +class pxr.Sdr.NodeRole +Attributes: + +Field + +Math + +Primvar + +Texture + +Field = 'field' + +Math = 'math' + +Primvar = 'primvar' + +Texture = 'texture' + +class pxr.Sdr.PropertyMetadata +Attributes: + +Colorspace + +Connectable + +DefaultInput + +Help + +Hints + +ImplementationName + +IsAssetIdentifier + +IsDynamicArray + +Label + +Options + +Page + +RenderType + +Role + +SdrUsdDefinitionType + +Target + +ValidConnectionTypes + +VstructConditionalExpr + +VstructMemberName + +VstructMemberOf + +Widget + +Colorspace = '__SDR__colorspace' + +Connectable = 'connectable' + +DefaultInput = '__SDR__defaultinput' + +Help = 'help' + +Hints = 'hints' + +ImplementationName = '__SDR__implementationName' + +IsAssetIdentifier = '__SDR__isAssetIdentifier' + +IsDynamicArray = 'isDynamicArray' + +Label = 'label' + +Options = 'options' + +Page = 'page' + +RenderType = 'renderType' + +Role = 'role' + +SdrUsdDefinitionType = 'sdrUsdDefinitionType' + +Target = '__SDR__target' + +ValidConnectionTypes = 'validConnectionTypes' + +VstructConditionalExpr = 'vstructConditionalExpr' + +VstructMemberName = 'vstructMemberName' + +VstructMemberOf = 'vstructMemberOf' + +Widget = 'widget' + +class pxr.Sdr.PropertyRole +Attributes: + +None + +None = 'none' + +class pxr.Sdr.PropertyTypes +Attributes: + +Color + +Color4 + +Float + +Int + +Matrix + +Normal + +Point + +String + +Struct + +Terminal + +Unknown + +Vector + +Vstruct + +Color = 'color' + +Color4 = 'color4' + +Float = 'float' + +Int = 'int' + +Matrix = 'matrix' + +Normal = 'normal' + +Point = 'point' + +String = 'string' + +Struct = 'struct' + +Terminal = 'terminal' + +Unknown = 'unknown' + +Vector = 'vector' + +Vstruct = 'vstruct' + +class pxr.Sdr.Registry +The shading-specialized version of NdrRegistry . +Methods: + +GetShaderNodeByIdentifier(identifier, ...) +Exactly like NdrRegistry::GetNodeByIdentifier() , but returns a SdrShaderNode pointer instead of a NdrNode pointer. + +GetShaderNodeByIdentifierAndType(identifier, ...) +Exactly like NdrRegistry::GetNodeByIdentifierAndType() , but returns a SdrShaderNode pointer instead of a NdrNode pointer. + +GetShaderNodeByName(name, typePriority, filter) +Exactly like NdrRegistry::GetNodeByName() , but returns a SdrShaderNode pointer instead of a NdrNode pointer. + +GetShaderNodeByNameAndType(name, nodeType, ...) +Exactly like NdrRegistry::GetNodeByNameAndType() , but returns a SdrShaderNode pointer instead of a NdrNode pointer. + +GetShaderNodeFromAsset(shaderAsset, ...) +Wrapper method for NdrRegistry::GetNodeFromAsset() . + +GetShaderNodeFromSourceCode(sourceCode, ...) +Wrapper method for NdrRegistry::GetNodeFromSourceCode() . + +GetShaderNodesByFamily(family, filter) +Exactly like NdrRegistry::GetNodesByFamily() , but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers. + +GetShaderNodesByIdentifier(identifier) +Exactly like NdrRegistry::GetNodesByIdentifier() , but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers. + +GetShaderNodesByName(name, filter) +Exactly like NdrRegistry::GetNodesByName() , but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers. + +Attributes: + +expired +True if this object has expired, False otherwise. + +GetShaderNodeByIdentifier(identifier, typePriority) → ShaderNode +Exactly like NdrRegistry::GetNodeByIdentifier() , but returns a +SdrShaderNode pointer instead of a NdrNode pointer. + +Parameters + +identifier (NdrIdentifier) – +typePriority (NdrTokenVec) – + +GetShaderNodeByIdentifierAndType(identifier, nodeType) → ShaderNode +Exactly like NdrRegistry::GetNodeByIdentifierAndType() , but +returns a SdrShaderNode pointer instead of a NdrNode pointer. + +Parameters + +identifier (NdrIdentifier) – +nodeType (str) – + +GetShaderNodeByName(name, typePriority, filter) → ShaderNode +Exactly like NdrRegistry::GetNodeByName() , but returns a +SdrShaderNode pointer instead of a NdrNode pointer. + +Parameters + +name (str) – +typePriority (NdrTokenVec) – +filter (VersionFilter) – + +GetShaderNodeByNameAndType(name, nodeType, filter) → ShaderNode +Exactly like NdrRegistry::GetNodeByNameAndType() , but returns a +SdrShaderNode pointer instead of a NdrNode pointer. + +Parameters + +name (str) – +nodeType (str) – +filter (VersionFilter) – + +GetShaderNodeFromAsset(shaderAsset, metadata, subIdentifier, sourceType) → ShaderNode +Wrapper method for NdrRegistry::GetNodeFromAsset() . +Returns a valid SdrShaderNode pointer upon success. + +Parameters + +shaderAsset (AssetPath) – +metadata (NdrTokenMap) – +subIdentifier (str) – +sourceType (str) – + +GetShaderNodeFromSourceCode(sourceCode, sourceType, metadata) → ShaderNode +Wrapper method for NdrRegistry::GetNodeFromSourceCode() . +Returns a valid SdrShaderNode pointer upon success. + +Parameters + +sourceCode (str) – +sourceType (str) – +metadata (NdrTokenMap) – + +GetShaderNodesByFamily(family, filter) → SdrShaderNodePtrVec +Exactly like NdrRegistry::GetNodesByFamily() , but returns a +vector of SdrShaderNode pointers instead of a vector of +NdrNode pointers. + +Parameters + +family (str) – +filter (VersionFilter) – + +GetShaderNodesByIdentifier(identifier) → SdrShaderNodePtrVec +Exactly like NdrRegistry::GetNodesByIdentifier() , but returns a +vector of SdrShaderNode pointers instead of a vector of +NdrNode pointers. + +Parameters +identifier (NdrIdentifier) – + +GetShaderNodesByName(name, filter) → SdrShaderNodePtrVec +Exactly like NdrRegistry::GetNodesByName() , but returns a vector +of SdrShaderNode pointers instead of a vector of NdrNode +pointers. + +Parameters + +name (str) – +filter (VersionFilter) – + +property expired +True if this object has expired, False otherwise. + +class pxr.Sdr.ShaderNode +A specialized version of NdrNode which holds shading information. +Methods: + +GetAdditionalPrimvarProperties() +The list of string input properties whose values provide the names of additional primvars consumed by this node. + +GetAllVstructNames() +Gets all vstructs that are present in the shader. + +GetAssetIdentifierInputNames() +Returns the list of all inputs that are tagged as asset identifier inputs. + +GetCategory() +The category assigned to this node, if any. + +GetDefaultInput() +Returns the first shader input that is tagged as the default input. + +GetDepartments() +The departments this node is associated with, if any. + +GetHelp() +The help message assigned to this node, if any. + +GetImplementationName() +Returns the implementation name of this node. + +GetLabel() +The label assigned to this node, if any. + +GetPages() +Gets the pages on which the node's properties reside (an aggregate of the unique SdrShaderProperty::GetPage() values for all of the node's properties). + +GetPrimvars() +The list of primvars this node knows it requires / uses. + +GetPropertyNamesForPage(pageName) +Gets the names of the properties on a certain page (one that was returned by GetPages() ). + +GetRole() +Returns the role of this node. + +GetShaderInput(inputName) +Get a shader input property by name. + +GetShaderOutput(outputName) +Get a shader output property by name. + +GetAdditionalPrimvarProperties() → NdrTokenVec +The list of string input properties whose values provide the names of +additional primvars consumed by this node. +For example, this may return a token named varname . This +indicates that the client should query the value of a (presumed to be +string-valued) input attribute named varname from its scene +description to determine the name of a primvar the node will consume. +See GetPrimvars() for additional information. + +GetAllVstructNames() → NdrTokenVec +Gets all vstructs that are present in the shader. + +GetAssetIdentifierInputNames() → NdrTokenVec +Returns the list of all inputs that are tagged as asset identifier +inputs. + +GetCategory() → str +The category assigned to this node, if any. +Distinct from the family returned from GetFamily() . + +GetDefaultInput() → ShaderProperty +Returns the first shader input that is tagged as the default input. +A default input and its value can be used to acquire a fallback value +for a node when the node is considered’disabled’or otherwise incapable +of producing an output value. + +GetDepartments() → NdrTokenVec +The departments this node is associated with, if any. + +GetHelp() → str +The help message assigned to this node, if any. + +GetImplementationName() → str +Returns the implementation name of this node. +The name of the node is how to refer to the node in shader networks. +The label is how to present this node to users. The implementation +name is the name of the function (or something) this node represents +in the implementation. Any client using the implementation must +call this method to get the correct name; using getName() is not +correct. + +GetLabel() → str +The label assigned to this node, if any. +Distinct from the name returned from GetName() . In the context of +a UI, the label value might be used as the display name for the node +instead of the name. + +GetPages() → NdrTokenVec +Gets the pages on which the node’s properties reside (an aggregate of +the unique SdrShaderProperty::GetPage() values for all of the +node’s properties). +Nodes themselves do not reside on pages. In an example scenario, +properties might be divided into two pages,’Simple’and’Advanced’. + +GetPrimvars() → NdrTokenVec +The list of primvars this node knows it requires / uses. +For example, a shader node may require the’normals’primvar to function +correctly. Additional, user specified primvars may have been authored +on the node. These can be queried via +GetAdditionalPrimvarProperties() . Together, GetPrimvars() and +GetAdditionalPrimvarProperties() , provide the complete list of +primvar requirements for the node. + +GetPropertyNamesForPage(pageName) → NdrTokenVec +Gets the names of the properties on a certain page (one that was +returned by GetPages() ). +To get properties that are not assigned to a page, an empty string can +be used for pageName . + +Parameters +pageName (str) – + +GetRole() → str +Returns the role of this node. +This is used to annotate the role that the shader node plays inside a +shader network. We can tag certain shaders to indicate their role +within a shading network. We currently tag primvar reading nodes, +texture reading nodes and nodes that access volume fields (like +extinction or scattering). This is done to identify resources used by +a shading network. + +GetShaderInput(inputName) → ShaderProperty +Get a shader input property by name. +nullptr is returned if an input with the given name does not +exist. + +Parameters +inputName (str) – + +GetShaderOutput(outputName) → ShaderProperty +Get a shader output property by name. +nullptr is returned if an output with the given name does not +exist. + +Parameters +outputName (str) – + +class pxr.Sdr.ShaderNodeList +Methods: + +append + +extend + +append() + +extend() + +class pxr.Sdr.ShaderProperty +A specialized version of NdrProperty which holds shading +information. +Methods: + +GetDefaultValueAsSdfType() +Accessor for default value corresponding to the SdfValueTypeName returned by GetTypeAsSdfType. + +GetHelp() +The help message assigned to this property, if any. + +GetHints() +Any UI"hints"that are associated with this property. + +GetImplementationName() +Returns the implementation name of this property. + +GetLabel() +The label assigned to this property, if any. + +GetOptions() +If the property has a set of valid values that are pre-determined, this will return the valid option names and corresponding string values (if the option was specified with a value). + +GetPage() +The page (group), eg"Advanced", this property appears on, if any. + +GetVStructConditionalExpr() +If this field is part of a vstruct, this is the conditional expression. + +GetVStructMemberName() +If this field is part of a vstruct, this is its name in the struct. + +GetVStructMemberOf() +If this field is part of a vstruct, this is the name of the struct. + +GetValidConnectionTypes() +Gets the list of valid connection types for this property. + +GetWidget() +The widget"hint"that indicates the widget that can best display the type of data contained in this property, if any. + +IsAssetIdentifier() +Determines if the value held by this property is an asset identifier (eg, a file path); the logic for this is left up to the parser. + +IsDefaultInput() +Determines if the value held by this property is the default input for this node. + +IsVStruct() +Returns true if the field is the head of a vstruct. + +IsVStructMember() +Returns true if this field is part of a vstruct. + +GetDefaultValueAsSdfType() → VtValue +Accessor for default value corresponding to the SdfValueTypeName +returned by GetTypeAsSdfType. +Note that this is different than GetDefaultValue which returns the +default value associated with the SdrPropertyType and may differ from +the SdfValueTypeName, example when sdrUsdDefinitionType metadata is +specified for a sdr property. +GetTypeAsSdfType + +GetHelp() → str +The help message assigned to this property, if any. + +GetHints() → NdrTokenMap +Any UI”hints”that are associated with this property. +“Hints”are simple key/value pairs. + +GetImplementationName() → str +Returns the implementation name of this property. +The name of the property is how to refer to the property in shader +networks. The label is how to present this property to users. The +implementation name is the name of the parameter this property +represents in the implementation. Any client using the implementation +must call this method to get the correct name; using getName() +is not correct. + +GetLabel() → str +The label assigned to this property, if any. +Distinct from the name returned from GetName() . In the context of +a UI, the label value might be used as the display name for the +property instead of the name. + +GetOptions() → NdrOptionVec +If the property has a set of valid values that are pre-determined, +this will return the valid option names and corresponding string +values (if the option was specified with a value). + +GetPage() → str +The page (group), eg”Advanced”, this property appears on, if any. +Note that the page for a shader property can be nested, delimited +by”:”, representing the hierarchy of sub-pages a property is defined +in. + +GetVStructConditionalExpr() → str +If this field is part of a vstruct, this is the conditional +expression. + +GetVStructMemberName() → str +If this field is part of a vstruct, this is its name in the struct. + +GetVStructMemberOf() → str +If this field is part of a vstruct, this is the name of the struct. + +GetValidConnectionTypes() → NdrTokenVec +Gets the list of valid connection types for this property. +This value comes from shader metadata, and may not be specified. The +value from NdrProperty::GetType() can be used as a fallback, or +you can use the connectability test in CanConnectTo() . + +GetWidget() → str +The widget”hint”that indicates the widget that can best display the +type of data contained in this property, if any. +Examples of this value could include”number”,”slider”, etc. + +IsAssetIdentifier() → bool +Determines if the value held by this property is an asset identifier +(eg, a file path); the logic for this is left up to the parser. +Note: The type returned from GetTypeAsSdfType() will be Asset +if this method returns true (even though its true underlying data +type is string). + +IsDefaultInput() → bool +Determines if the value held by this property is the default input for +this node. + +IsVStruct() → bool +Returns true if the field is the head of a vstruct. + +IsVStructMember() → bool +Returns true if this field is part of a vstruct. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Tf.md b/Tf.md new file mode 100644 index 0000000000000000000000000000000000000000..cc541d0f0ecb05a6e23dc06ec103bb95bd94591e --- /dev/null +++ b/Tf.md @@ -0,0 +1,1345 @@ + + +Tf module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Tf module + +  + +# Tf module + +Summary: The Tf (Tools Foundations) module. + +Tf – Tools Foundation +Exceptions: + +CppException + +ErrorException(*args) + +Classes: + +CallContext + +Debug + +DiagnosticType + +Enum + +Error + +MallocTag + +NamedTemporaryFile([suffix, prefix, dir, text]) +A named temporary file which keeps the internal file handle closed. + +Notice + +PyModuleWasLoaded +A TfNotice that is sent when a script module is loaded. + +RefPtrTracker +Provides tracking of TfRefPtr objects to particular objects. + +ScopeDescription +This class is used to provide high-level descriptions about scopes of execution that could possibly block, or to provide relevant information about high-level action that would be useful in a crash report. + +ScriptModuleLoader +Provides low-level facilities for shared modules with script bindings to register themselves with their dependences, and provides a mechanism whereby those script modules will be loaded when necessary. + +Singleton + +StatusObject + +Stopwatch + +TemplateString + +Tf_PyEnumWrapper + +Tf_TestAnnotatedBoolResult + +Tf_TestPyContainerConversions + +Tf_TestPyOptional + +Type +TfType represents a dynamic runtime type. + +Warning + +Functions: + +Fatal(msg) +Raise a fatal error to the Tf Diagnostic system. + +GetCodeLocation(framesUp) +Returns a tuple (moduleName, functionName, fileName, lineNo). + +PrepareModule(module, result) +PrepareModule(module, result) -- Prepare an extension module at import time. + +PreparePythonModule([moduleName]) +Prepare an extension module at import time. + +RaiseCodingError(msg) +Raise a coding error to the Tf Diagnostic system. + +RaiseRuntimeError(msg) +Raise a runtime error to the Tf Diagnostic system. + +Status(msg[, verbose]) +Issues a status update to the Tf diagnostic system. + +Warn(msg[, template]) +Issue a warning via the TfDiagnostic system. + +WindowsImportWrapper() + +exception pxr.Tf.CppException + +exception pxr.Tf.ErrorException(*args) + +class pxr.Tf.CallContext +Attributes: + +file +char + +function +char + +line +int + +prettyFunction +char + +property file +char + +Type +type + +property function +char + +Type +type + +property line +int + +Type +type + +property prettyFunction +char + +Type +type + +class pxr.Tf.Debug +Methods: + +GetDebugSymbolDescription +classmethod GetDebugSymbolDescription(name) -> str + +GetDebugSymbolDescriptions +classmethod GetDebugSymbolDescriptions() -> str + +GetDebugSymbolNames +classmethod GetDebugSymbolNames() -> list[str] + +IsDebugSymbolNameEnabled +classmethod IsDebugSymbolNameEnabled(name) -> bool + +SetDebugSymbolsByName +classmethod SetDebugSymbolsByName(pattern, value) -> list[str] + +SetOutputFile +classmethod SetOutputFile(file) -> None + +static GetDebugSymbolDescription() +classmethod GetDebugSymbolDescription(name) -> str +Get a description for the specified debug symbol. +A short description of the debug symbol is returned. This is the same +description string that is embedded in the return value of +GetDebugSymbolDescriptions. + +Parameters +name (str) – + +static GetDebugSymbolDescriptions() +classmethod GetDebugSymbolDescriptions() -> str +Get a description of all debug symbols and their purpose. +A single string describing all registered debug symbols along with +short descriptions is returned. + +static GetDebugSymbolNames() +classmethod GetDebugSymbolNames() -> list[str] +Get a listing of all debug symbols. + +static IsDebugSymbolNameEnabled() +classmethod IsDebugSymbolNameEnabled(name) -> bool +True if the specified debug symbol is set. + +Parameters +name (str) – + +static SetDebugSymbolsByName() +classmethod SetDebugSymbolsByName(pattern, value) -> list[str] +Set registered debug symbols matching pattern to value . +All registered debug symbols matching pattern are set to value +. The only matching is an exact match with pattern , or if +pattern ends with an’*’as is otherwise a prefix of a debug +symbols. The names of all debug symbols set by this call are returned +as a vector. + +Parameters + +pattern (str) – +value (bool) – + +static SetOutputFile() +classmethod SetOutputFile(file) -> None +Direct debug output to either stdout or stderr. +Note that file MUST be either stdout or stderr. If not, issue an +error and do nothing. Debug output is issued to stdout by default. If +the environment variable TF_DEBUG_OUTPUT_FILE is set to’stderr’, then +output is issued to stderr by default. + +Parameters +file (FILE) – + +class pxr.Tf.DiagnosticType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Tf.TF_DIAGNOSTIC_CODING_ERROR_TYPE, Tf.TF_DIAGNOSTIC_FATAL_CODING_ERROR_TYPE, Tf.TF_DIAGNOSTIC_RUNTIME_ERROR_TYPE, Tf.TF_DIAGNOSTIC_FATAL_ERROR_TYPE, Tf.TF_DIAGNOSTIC_NONFATAL_ERROR_TYPE, Tf.TF_DIAGNOSTIC_WARNING_TYPE, Tf.TF_DIAGNOSTIC_STATUS_TYPE, Tf.TF_APPLICATION_EXIT_TYPE) + +class pxr.Tf.Enum +Methods: + +GetValueFromFullName +classmethod GetValueFromFullName(fullname, foundIt) -> Enum + +static GetValueFromFullName() +classmethod GetValueFromFullName(fullname, foundIt) -> Enum +Returns the enumerated value for a fully-qualified name. +This takes a fully-qualified enumerated value name (e.g., +"Season::WINTER" ) and returns the associated value. If there is +no such name, this returns -1. Since -1 can sometimes be a valid +value, the foundIt flag pointer, if not None , is set to +true if the name was found and false otherwise. Also, since +this is not a templated function, it has to return a generic value +type, so we use TfEnum . + +Parameters + +fullname (str) – +foundIt (bool) – + +class pxr.Tf.Error +Classes: + +Mark + +Attributes: + +errorCode +The error code posted for this error. + +errorCodeString +The error code posted for this error, as a string. + +class Mark +Methods: + +Clear + +GetErrors +A list of the errors held by this mark. + +IsClean + +SetMark + +Clear() + +GetErrors() +A list of the errors held by this mark. + +IsClean() + +SetMark() + +property errorCode +The error code posted for this error. + +property errorCodeString +The error code posted for this error, as a string. + +class pxr.Tf.MallocTag +Classes: + +CallTree + +Methods: + +GetCallStacks + +GetCallTree +classmethod GetCallTree(tree, skipRepeated) -> bool + +GetMaxTotalBytes +classmethod GetMaxTotalBytes() -> int + +GetTotalBytes +classmethod GetTotalBytes() -> int + +Initialize +classmethod Initialize(errMsg) -> bool + +IsInitialized +classmethod IsInitialized() -> bool + +SetCapturedMallocStacksMatchList +classmethod SetCapturedMallocStacksMatchList(matchList) -> None + +SetDebugMatchList +classmethod SetDebugMatchList(matchList) -> None + +class CallTree +Classes: + +CallSite + +PathNode + +Methods: + +GetCallSites + +GetPrettyPrintString + +GetRoot + +LogReport + +Report + +class CallSite +Attributes: + +nBytes + +name + +property nBytes + +property name + +class PathNode +Methods: + +GetChildren + +Attributes: + +nAllocations + +nBytes + +nBytesDirect + +siteName + +GetChildren() + +property nAllocations + +property nBytes + +property nBytesDirect + +property siteName + +GetCallSites() + +GetPrettyPrintString() + +GetRoot() + +LogReport() + +Report() + +static GetCallStacks() + +static GetCallTree() +classmethod GetCallTree(tree, skipRepeated) -> bool +Return a snapshot of memory usage. +Returns a snapshot by writing into \*tree . See the C *tree +structure for documentation. If Initialize() has not been called, +*tree is set to a rather blank structure (empty vectors, empty +strings, zero in all integral fields) and false is returned; +otherwise, \*tree is set with the contents of the current memory +snapshot and true is returned. It is fine to call this function on +the same \*tree instance; each call simply overwrites the data +from the last call. If /p skipRepeated is true , then any repeated +callsite is skipped. See the CallTree documentation for more +details. + +Parameters + +tree (CallTree) – +skipRepeated (bool) – + +static GetMaxTotalBytes() +classmethod GetMaxTotalBytes() -> int +Return the maximum total number of bytes that have ever been allocated +at one time. +This is simply the maximum value of GetTotalBytes() since Initialize() +was called. + +static GetTotalBytes() +classmethod GetTotalBytes() -> int +Return total number of allocated bytes. +The current total memory that has been allocated and not freed is +returned. Memory allocated before calling Initialize() is not +accounted for. + +static Initialize() +classmethod Initialize(errMsg) -> bool +Initialize the memory tagging system. +This function returns true if the memory tagging system can be +successfully initialized or it has already been initialized. +Otherwise, \*errMsg is set with an explanation for the failure. +Until the system is initialized, the various memory reporting calls +will indicate that no memory has been allocated. Note also that memory +allocated prior to calling Initialize() is not tracked i.e. all +data refers to allocations that happen subsequent to calling +Initialize() . + +Parameters +errMsg (str) – + +static IsInitialized() +classmethod IsInitialized() -> bool +Return true if the tagging system is active. +If Initialize() has been successfully called, this function +returns true . + +static SetCapturedMallocStacksMatchList() +classmethod SetCapturedMallocStacksMatchList(matchList) -> None +Sets the tags to trace. +When memory is allocated for any tag that matches matchList a +stack trace is recorded. When that memory is released the stack trace +is discarded. Clients can call GetCapturedMallocStacks() to get a +list of all recorded stack traces. This is useful for finding leaks. +Traces recorded for any tag that will no longer be matched are +discarded by this call. Traces recorded for tags that continue to be +matched are retained. +matchList is a comma, tab or newline separated list of malloc tag +names. The names can have internal spaces but leading and trailing +spaces are stripped. If a name ends in’*’then the suffix is +wildcarded. A name can have a leading’-‘or’+’to prevent or allow a +match. Each name is considered in order and later matches override +earlier matches. For example,’Csd*, -CsdScene::_Populate*, ++CsdScene::_PopulatePrimCacheLocal’matches any malloc tag starting +with’Csd’but nothing starting +with’CsdScene::_Populate’except’CsdScene::_PopulatePrimCacheLocal’. +Use the empty string to disable stack capturing. + +Parameters +matchList (str) – + +static SetDebugMatchList() +classmethod SetDebugMatchList(matchList) -> None +Sets the tags to trap in the debugger. +When memory is allocated or freed for any tag that matches +matchList the debugger trap is invoked. If a debugger is attached +the program will stop in the debugger, otherwise the program will +continue to run. See ArchDebuggerTrap() and ArchDebuggerWait() +. +matchList is a comma, tab or newline separated list of malloc tag +names. The names can have internal spaces but leading and trailing +spaces are stripped. If a name ends in’*’then the suffix is +wildcarded. A name can have a leading’-‘or’+’to prevent or allow a +match. Each name is considered in order and later matches override +earlier matches. For example,’Csd*, -CsdScene::_Populate*, ++CsdScene::_PopulatePrimCacheLocal’matches any malloc tag starting +with’Csd’but nothing starting +with’CsdScene::_Populate’except’CsdScene::_PopulatePrimCacheLocal’. +Use the empty string to disable debugging traps. + +Parameters +matchList (str) – + +class pxr.Tf.NamedTemporaryFile(suffix='', prefix='', dir=None, text=False) +A named temporary file which keeps the internal file handle closed. +A class which constructs a temporary file(that isn’t open) on __enter__, +provides its name as an attribute, and deletes it on __exit__. +Note: The constructor args for this object match those of +python’s tempfile.mkstemp() function, and will have the same effect on +the underlying file created. +Attributes: + +name +The path for the temporary file created. + +property name +The path for the temporary file created. + +class pxr.Tf.Notice +Classes: + +Listener +Represents the Notice connection between senders and receivers of notices. + +Methods: + +Register(noticeType, callback, sender) +noticeType : Tf.Notice callback : function sender : object + +RegisterGlobally(noticeType, callback) +noticeType : Tf.Notice callback : function + +Send +Send(sender) + +SendGlobally +SendGlobally() + +class Listener +Represents the Notice connection between senders and receivers of notices. When a Listener object expires the connection is broken. You can also use the Revoke() function to break the connection. A Listener object is returned from the Register() and RegisterGlobally() functions. +Methods: + +Revoke +Revoke() + +Revoke() +Revoke() +Revoke interest by a notice listener. This function revokes interest in the particular notice type and call-back method that its Listener object was registered for. + +static Register(noticeType, callback, sender) → Listener +noticeType : Tf.Notice +callback : function +sender : object +Register a listener as being interested in a TfNotice type from a specific sender. Notice listener will get sender as an argument. Registration of interest in a notice class N automatically registers interest in all classes derived from N. When a notice of appropriate type is received, the listening object’s member-function method is called with the notice. To reverse the registration, call Revoke() on the Listener object returned by this call. +Register( noticeType, callback, sender ) -> Listener +noticeType : Tf.Notice +callback : function +sender : object +Register a listener as being interested in a TfNotice type from a specific sender. Notice listener will get sender as an argument. Registration of interest in a notice class N automatically registers interest in all classes derived from N. When a notice of appropriate type is received, the listening object’s member-function method is called with the notice. To reverse the registration, call Revoke() on the Listener object returned by this call. + +static RegisterGlobally(noticeType, callback) → Listener +noticeType : Tf.Notice +callback : function +Register a listener as being interested in a TfNotice type from any sender. The notice listener does not get sender as an argument. + +Send() +Send(sender) +sender : object +Deliver the notice to interested listeners, returning the number of interested listeners. This is the recommended form of Send. It takes the sender as an argument. Listeners that registered for the given sender AND listeners that registered globally will get the notice. +Send(sender) +sender : object +Deliver the notice to interested listeners, returning the number of interested listeners. This is the recommended form of Send. It takes the sender as an argument. Listeners that registered for the given sender AND listeners that registered globally will get the notice. + +SendGlobally() +SendGlobally() +Deliver the notice to interested listeners. For most clients it is recommended to use the Send(sender) version of Send() rather than this one. Clients that use this form of Send will prevent listeners from being able to register to receive notices based on the sender of the notice. ONLY listeners that registered globally will get the notice. + +class pxr.Tf.PyModuleWasLoaded +A TfNotice that is sent when a script module is loaded. Since many +modules may be loaded at once, listeners are encouraged to defer work +triggered by this notice to the end of an application iteration. This, +of course, is good practice in general. +Methods: + +name() +Return the name of the module that was loaded. + +name() → str +Return the name of the module that was loaded. + +class pxr.Tf.RefPtrTracker +Provides tracking of TfRefPtr objects to particular objects. +Clients can enable, at compile time, tracking of TfRefPtr objects +that point to particular instances of classes derived from +TfRefBase . This is useful if you have a ref counted object with a +ref count that should’ve gone to zero but didn’t. This tracker can +tell you every TfRefPtr that’s holding the TfRefBase and a +stack trace where it was created or last assigned to. +Clients can get a report of all watched instances and how many +TfRefPtr objects are holding them using +ReportAllWatchedCounts() (in python use Tf.RefPtrTracker() +.GetAllWatchedCountsReport()). You can see all of the stack traces +using ReportAllTraces() (in python use Tf.RefPtrTracker() +.GetAllTracesReport()). +Clients will typically enable tracking using code like this: +#include "pxr/base/tf/refPtrTracker.h" + +class MyRefBaseType; +typedef TfRefPtr MyRefBaseTypeRefPtr; + +TF_DECLARE_REFPTR_TRACK(MyRefBaseType); + +class MyRefBaseType { +\.\.\. +public: + static bool _ShouldWatch(const MyRefBaseType\*); +\.\.\. +}; + +TF_DEFINE_REFPTR_TRACK(MyRefBaseType, MyRefBaseType::_ShouldWatch); + +Note that the TF_DECLARE_REFPTR_TRACK() macro must be invoked +before any use of the MyRefBaseTypeRefPtr type. +The MyRefBaseType::_ShouldWatch() function returns true if the +given instance of MyRefBaseType should be tracked. You can also +use TfRefPtrTracker::WatchAll() to watch every instance (but that +might use a lot of memory and time). +If you have a base type, B , and a derived type, D , and you +hold instances of D in a TfRefPtr < ``B>`` (i.e. a pointer to +the base) then you must track both type B and type D . But you +can use TfRefPtrTracker::WatchNone() when tracking B if you’re +not interested in instances of B . +Methods: + +GetAllTracesReport + +GetAllWatchedCountsReport + +GetTracesReportForWatched + +Attributes: + +expired +True if this object has expired, False otherwise. + +GetAllTracesReport() + +GetAllWatchedCountsReport() + +GetTracesReportForWatched() + +property expired +True if this object has expired, False otherwise. + +class pxr.Tf.ScopeDescription +This class is used to provide high-level descriptions about scopes of +execution that could possibly block, or to provide relevant +information about high-level action that would be useful in a crash +report. +This class is reasonably fast to use, especially if the message +strings are not dynamically created, however it should not be used in +very highly performance sensitive contexts. The cost to push & pop is +essentially a TLS lookup plus a couple of atomic operations. +Methods: + +SetDescription(description) +Replace the description stack entry for this scope description. + +SetDescription(description) → None +Replace the description stack entry for this scope description. +Caller guarantees that the string description lives at least as +long as this TfScopeDescription object. + +Parameters +description (str) – + +SetDescription(description) -> None +Replace the description stack entry for this scope description. +This object adopts ownership of the rvalue description . + +Parameters +description (str) – + +SetDescription(description) -> None +Replace the description stack entry for this scope description. +Caller guarantees that the string description lives at least as +long as this TfScopeDescription object. + +Parameters +description (char) – + +class pxr.Tf.ScriptModuleLoader +Provides low-level facilities for shared modules with script +bindings to register themselves with their dependences, and provides a +mechanism whereby those script modules will be loaded when necessary. +Currently, this is when one of our script modules is loaded, when +TfPyInitialize is called, and when Plug opens shared modules. +Generally, user code will not make use of this. +Methods: + +GetModuleNames() +Return a list of all currently known modules in a valid dependency order. + +GetModulesDict() +Return a python dict containing all currently known modules under their canonical names. + +WriteDotFile(file) +Write a graphviz dot-file for the dependency graph of all. + +Attributes: + +expired +True if this object has expired, False otherwise. + +GetModuleNames() → list[str] +Return a list of all currently known modules in a valid dependency +order. + +GetModulesDict() → python.dict +Return a python dict containing all currently known modules under +their canonical names. + +WriteDotFile(file) → None +Write a graphviz dot-file for the dependency graph of all. +currently known modules/modules to file. + +Parameters +file (str) – + +property expired +True if this object has expired, False otherwise. + +class pxr.Tf.Singleton + +class pxr.Tf.StatusObject + +class pxr.Tf.Stopwatch +Methods: + +AddFrom(t) +Adds the accumulated time and sample count from t into the TfStopwatch . + +Reset() +Resets the accumulated time and the sample count to zero. + +Start() +Record the current time for use by the next Stop() call. + +Stop() +Increases the accumulated time stored in the TfStopwatch . + +Attributes: + +microseconds +int + +milliseconds +int + +nanoseconds +int + +sampleCount +int + +seconds +float + +AddFrom(t) → None +Adds the accumulated time and sample count from t into the +TfStopwatch . +If you have several timers taking measurements, and you wish to +combine them together, you can add one timer’s results into another; +for example, t2.AddFrom(t1) will add t1 ‘s time and sample +count into t2 . + +Parameters +t (Stopwatch) – + +Reset() → None +Resets the accumulated time and the sample count to zero. + +Start() → None +Record the current time for use by the next Stop() call. +The Start() function records the current time. A subsequent call +to Start() before a call to Stop() simply records a later +current time, but does not change the accumulated time of the +TfStopwatch . + +Stop() → None +Increases the accumulated time stored in the TfStopwatch . +The Stop() function increases the accumulated time by the duration +between the current time and the last time recorded by a Start() +call. A subsequent call to Stop() before another call to +Start() will therefore double-count time and throw off the +results. +A TfStopwatch also counts the number of samples it has taken. +The”sample count”is simply the number of times that Stop() has +been called. + +property microseconds +int +Return the accumulated time in microseconds. +Note that 45 minutes will overflow a 32-bit counter, so take care to +save the result in an int64_t , and not a regular int or +long . + +Type +type + +property milliseconds +int +Return the accumulated time in milliseconds. + +Type +type + +property nanoseconds +int +Return the accumulated time in nanoseconds. +Note that this number can easily overflow a 32-bit counter, so take +care to save the result in an int64_t , and not a regular int +or long . + +Type +type + +property sampleCount +int +Return the current sample count. +The sample count, which is simply the number of calls to Stop() +since creation or a call to Reset() , is useful for computing +average running times of a repeated task. + +Type +type + +property seconds +float +Return the accumulated time in seconds as a double . + +Type +type + +class pxr.Tf.TemplateString +Methods: + +GetEmptyMapping() +Returns an empty mapping for the current template. + +GetParseErrors() +Returns any error messages generated during template parsing. + +SafeSubstitute(arg1) +Like Substitute() , except that if placeholders are missing from the mapping, instead of raising a coding error, the original placeholder will appear in the resulting string intact. + +Substitute(arg1) +Performs the template substitution, returning a new string. + +Attributes: + +template +str + +valid +bool + +GetEmptyMapping() → Mapping +Returns an empty mapping for the current template. +This method first calls IsValid to ensure that the template is valid. + +GetParseErrors() → list[str] +Returns any error messages generated during template parsing. + +SafeSubstitute(arg1) → str +Like Substitute() , except that if placeholders are missing from the +mapping, instead of raising a coding error, the original placeholder +will appear in the resulting string intact. + +Parameters +arg1 (Mapping) – + +Substitute(arg1) → str +Performs the template substitution, returning a new string. +The mapping contains keys which match the placeholders in the +template. If a placeholder is found for which no mapping is present, a +coding error is raised. + +Parameters +arg1 (Mapping) – + +property template +str +Returns the template source string supplied to the constructor. + +Type +type + +property valid +bool +Returns true if the current template is well formed. +Empty templates are valid. + +Type +type + +class pxr.Tf.Tf_PyEnumWrapper +Attributes: + +displayName + +fullName + +name + +value + +property displayName + +property fullName + +property name + +property value + +class pxr.Tf.Tf_TestAnnotatedBoolResult +Attributes: + +annotation + +property annotation + +class pxr.Tf.Tf_TestPyContainerConversions +Methods: + +GetPairTimesTwo + +GetTokens + +GetVectorTimesTwo + +static GetPairTimesTwo() + +static GetTokens() + +static GetVectorTimesTwo() + +class pxr.Tf.Tf_TestPyOptional +Methods: + +TakesOptional + +TestOptionalChar + +TestOptionalDouble + +TestOptionalFloat + +TestOptionalInt + +TestOptionalLong + +TestOptionalShort + +TestOptionalString + +TestOptionalStringVector + +TestOptionalUChar + +TestOptionalUInt + +TestOptionalULong + +TestOptionalUShort + +static TakesOptional() + +static TestOptionalChar() + +static TestOptionalDouble() + +static TestOptionalFloat() + +static TestOptionalInt() + +static TestOptionalLong() + +static TestOptionalShort() + +static TestOptionalString() + +static TestOptionalStringVector() + +static TestOptionalUChar() + +static TestOptionalUInt() + +static TestOptionalULong() + +static TestOptionalUShort() + +class pxr.Tf.Type +TfType represents a dynamic runtime type. +TfTypes are created and discovered at runtime, rather than compile +time. +Features: + +unique typename +safe across DSO boundaries +can represent C++ types, pure Python types, or Python subclasses +of wrapped C++ types +lightweight value semantics you can copy and default construct +TfType, unlike std::type_info . +totally ordered can use as a std::map key + +Methods: + +AddAlias +classmethod AddAlias(base, name) -> None + +Define +classmethod Define() -> Type + +Find +classmethod Find() -> Type + +FindByName +classmethod FindByName(name) -> Type + +FindDerivedByName +classmethod FindDerivedByName(name) -> Type + +GetAliases(derivedType) +Returns a vector of the aliases registered for the derivedType under this, the base type. + +GetAllAncestorTypes(result) +Build a vector of all ancestor types inherited by this type. + +GetAllDerivedTypes(result) +Return the set of all types derived (directly or indirectly) from this type. + +GetRoot +classmethod GetRoot() -> Type + +IsA(queryType) +Return true if this type is the same as or derived from queryType + +Attributes: + +Unknown + +baseTypes +list[Type] + +derivedTypes + +isEnumType +bool + +isPlainOldDataType +bool + +isUnknown +bool + +pythonClass +TfPyObjWrapper + +sizeof +int + +typeName +str + +AddAlias() +classmethod AddAlias(base, name) -> None +Add an alias name for this type under the given base type. +Aliases are similar to typedefs in C++: they provide an alternate name +for a type. The alias is defined with respect to the given base +type. Aliases must be unique with respect to both other aliases +beneath that base type and names of derived types of that base. + +Parameters + +base (Type) – +name (str) – + +AddAlias(name) -> None +Add an alias for DERIVED beneath BASE. +This is a convenience method, that declares both DERIVED and BASE as +TfTypes before adding the alias. + +Parameters +name (str) – + +static Define() +classmethod Define() -> Type +Define a TfType with the given C++ type T and C++ base types B. +Each of the base types will be declared (but not defined) as TfTypes +if they have not already been. +The typeName of the created TfType will be the canonical demangled +RTTI type name, as defined by GetCanonicalTypeName() . +It is an error to attempt to define a type that has already been +defined. + +Define() -> Type +Define a TfType with the given C++ type T and no bases. +See the other Define() template for more details. +C++ does not allow default template arguments for function templates, +so we provide this separate definition for the case of no bases. + +static Find() +classmethod Find() -> Type +Retrieve the TfType corresponding to type T . +The type T must have been declared or defined in the type system +or the TfType corresponding to an unknown type is returned. +IsUnknown() + +Find(obj) -> Type +Retrieve the TfType corresponding to obj . +The TfType corresponding to the actual object represented by +obj is returned; this may not be the object returned by +TfType::Find() if T is a polymorphic type. +This works for Python subclasses of the C++ type T as well, as +long as T has been wrapped using TfPyPolymorphic. +Of course, the object’s type must have been declared or defined in the +type system or the TfType corresponding to an unknown type is +returned. +IsUnknown() + +Parameters +obj (T) – + +Find(t) -> Type +Retrieve the TfType corresponding to an obj with the given +type_info . + +Parameters +t (type_info) – + +static FindByName() +classmethod FindByName(name) -> Type +Retrieve the TfType corresponding to the given name . +Every type defined in the TfType system has a unique, implementation +independent name. In addition, aliases can be added to identify a type +underneath a specific base type; see TfType::AddAlias() . The given +name will first be tried as an alias under the root type, and +subsequently as a typename. +This method is equivalent to: +TfType::GetRoot().FindDerivedByName(name) + +For any object obj , +Find(obj) == FindByName( Find(obj).GetTypeName() ) + +Parameters +name (str) – + +FindDerivedByName() +classmethod FindDerivedByName(name) -> Type +Retrieve the TfType that derives from this type and has the given +alias or typename. +AddAlias + +Parameters +name (str) – + +FindDerivedByName(name) -> Type +Retrieve the TfType that derives from BASE and has the given alias +or typename. +This is a convenience method, and is equivalent to: +TfType::Find().FindDerivedByName(name) + +Parameters +name (str) – + +GetAliases(derivedType) → list[str] +Returns a vector of the aliases registered for the derivedType under +this, the base type. +AddAlias() + +Parameters +derivedType (Type) – + +GetAllAncestorTypes(result) → None +Build a vector of all ancestor types inherited by this type. +The starting type is itself included, as the first element of the +results vector. +Types are given in”C3”resolution order, as used for new-style classes +starting in Python 2.3. This algorithm is more complicated than a +simple depth-first traversal of base classes, in order to prevent some +subtle errors with multiple-inheritance. See the references below for +more background. +This can be expensive; consider caching the results. TfType does not +cache this itself since it is not needed internally. +Guido van Rossum.”Unifying types and classes in Python 2.2: Method +resolution order.” +http://www.python.org/download/releases/2.2.2/descrintro/#mro +Barrett, Cassels, Haahr, Moon, Playford, Withington.”A Monotonic +Superclass Linearization for Dylan.”OOPSLA 96. +http://www.webcom.com/haahr/dylan/linearization-oopsla96.html + +Parameters +result (list[Type]) – + +GetAllDerivedTypes(result) → None +Return the set of all types derived (directly or indirectly) from this +type. + +Parameters +result (set[Type]) – + +static GetRoot() +classmethod GetRoot() -> Type +Return the root type of the type hierarchy. +All known types derive (directly or indirectly) from the root. If a +type is specified with no bases, it is implicitly considered to derive +from the root type. + +IsA(queryType) → bool +Return true if this type is the same as or derived from queryType +. +If queryType is unknown, this always returns false . + +Parameters +queryType (Type) – + +IsA() -> bool +Return true if this type is the same as or derived from T. +This is equivalent to: +IsA(Find()) + +Unknown = Tf.Type.Unknown + +property baseTypes +list[Type] +Return a vector of types from which this type was derived. + +Type +type + +property derivedTypes + +property isEnumType +bool +Return true if this is an enum type. + +Type +type + +property isPlainOldDataType +bool +Return true if this is a plain old data type, as defined by C++. + +Type +type + +property isUnknown +bool +Return true if this is the unknown type, representing a type unknown +to the TfType system. +The unknown type does not derive from the root type, or any other +type. + +Type +type + +property pythonClass +TfPyObjWrapper +Return the Python class object for this type. +If this type is unknown or has not yet had a Python class defined, +this will return None , as an empty TfPyObjWrapper +DefinePythonClass() + +Type +type + +property sizeof +int +Return the size required to hold an instance of this type on the stack +(does not include any heap allocated memory the instance uses). +This is what the C++ sizeof operator returns for the type, so this +value is not very useful for Python types (it will always be +sizeof(boost::python::object)). + +Type +type + +property typeName +str +Return the machine-independent name for this type. +This name is specified when the TfType is declared. +Declare() + +Type +type + +class pxr.Tf.Warning + +pxr.Tf.Fatal(msg) +Raise a fatal error to the Tf Diagnostic system. + +pxr.Tf.GetCodeLocation(framesUp) +Returns a tuple (moduleName, functionName, fileName, lineNo). +To trace the current location of python execution, use GetCodeLocation(). +By default, the information is returned at the current stack-frame; thus: +info = GetCodeLocation() + +will return information about the line that GetCodeLocation() was called +from. One can write: +def genericDebugFacility(): + info = GetCodeLocation(1) + # print out data + +def someCode(): + ... + if bad: + genericDebugFacility() + +and genericDebugFacility() will get information associated with its caller, +i.e. the function someCode(). + +pxr.Tf.PrepareModule(module, result) +PrepareModule(module, result) – Prepare an extension module at import +time. Generally, this should only be called by the __init__.py script for a +module upon loading a boost python module (generally ‘_libName.so’). + +pxr.Tf.PreparePythonModule(moduleName=None) +Prepare an extension module at import time. This will import the +Python module associated with the caller’s module (e.g. ‘_tf’ for ‘pxr.Tf’) +or the module with the specified moduleName and copy its contents into +the caller’s local namespace. +Generally, this should only be called by the __init__.py script for a module +upon loading a boost python module (generally ‘_libName.so’). + +pxr.Tf.RaiseCodingError(msg) +Raise a coding error to the Tf Diagnostic system. + +pxr.Tf.RaiseRuntimeError(msg) +Raise a runtime error to the Tf Diagnostic system. + +pxr.Tf.Status(msg, verbose=True) +Issues a status update to the Tf diagnostic system. +If verbose is True (the default) then information about where in the code +the status update was issued from is included. + +pxr.Tf.Warn(msg, template='') +Issue a warning via the TfDiagnostic system. +At this time, template is ignored. + +pxr.Tf.WindowsImportWrapper() + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Trace.md b/Trace.md new file mode 100644 index 0000000000000000000000000000000000000000..1b29c71a66b14f5a9519ef881cc5c03b9c422874 --- /dev/null +++ b/Trace.md @@ -0,0 +1,395 @@ + + +Trace module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Trace module + +  + +# Trace module + +Summary: The Trace module provides performance tracking utility classes for counting, timing, measuring, recording, and reporting events. + +Trace – Utilities for counting and recording events. +Classes: + +AggregateNode +A representation of a call tree. + +Collector +This is a singleton class that records TraceEvent instances and populates TraceCollection instances. + +Reporter +This class converts streams of TraceEvent objects into call trees which can then be used as a data source to a GUI or written out to a file. + +Functions: + +TraceFunction(obj) +A decorator that enables tracing the function that it decorates. + +TraceMethod(obj) +A convenience. + +TraceScope(label) +A context manager that calls BeginEvent on the global collector on enter and EndEvent on exit. + +class pxr.Trace.AggregateNode +A representation of a call tree. Each node represents one or more +calls that occurred in the trace. Multiple calls to a child node are +aggregated into one node. +Attributes: + +children +list[TraceAggregateNodePtr] + +count +int + +exclusiveCount +int + +exclusiveTime +TimeStamp + +expanded +bool + +expired +True if this object has expired, False otherwise. + +id +Id + +inclusiveTime +TimeStamp + +key +str + +property children +list[TraceAggregateNodePtr] + +Type +type + +property count +int +Returns the call count of this node. +recursive determines if recursive calls are counted. + +Type +type + +property exclusiveCount +int +Returns the exclusive count. + +Type +type + +property exclusiveTime +TimeStamp +Returns the time spent in this node but not its children. + +Type +type + +property expanded +bool +Returns whether this node is expanded in a gui. + +type : None +Sets whether or not this node is expanded in a gui. + +Type +type + +property expired +True if this object has expired, False otherwise. + +property id +Id +Returns the node’s id. + +Type +type + +property inclusiveTime +TimeStamp +Returns the total time of this node ands its children. + +Type +type + +property key +str +Returns the node’s key. + +Type +type + +class pxr.Trace.Collector +This is a singleton class that records TraceEvent instances and +populates TraceCollection instances. +All public methods of TraceCollector are safe to call from any thread. +Methods: + +BeginEvent(key) +Record a begin event with key if Category is enabled. + +BeginEventAtTime(key, ms) +Record a begin event with key at a specified time if Category is enabled. + +Clear() +Clear all pending events from the collector. + +EndEvent(key) +Record an end event with key if Category is enabled. + +EndEventAtTime(key, ms) +Record an end event with key at a specified time if Category is enabled. + +GetLabel() +Return the label associated with this collector. + +Attributes: + +enabled +bool + +expired +True if this object has expired, False otherwise. + +pythonTracingEnabled +None + +BeginEvent(key) → TimeStamp +Record a begin event with key if Category is enabled. +A matching end event is expected some time in the future. +If the key is known at compile time BeginScope and Scope +methods are preferred because they have lower overhead. +The TimeStamp of the TraceEvent or 0 if the collector is disabled. +BeginScope +Scope + +Parameters +key (Key) – + +BeginEventAtTime(key, ms) → None +Record a begin event with key at a specified time if Category is +enabled. +This version of the method allows the passing of a specific number of +elapsed milliseconds, ms, to use for this event. This method is used +for testing and debugging code. + +Parameters + +key (Key) – +ms (float) – + +Clear() → None +Clear all pending events from the collector. +No TraceCollection will be made for these events. + +EndEvent(key) → TimeStamp +Record an end event with key if Category is enabled. +A matching begin event must have preceded this end event. +If the key is known at compile time EndScope and Scope methods are +preferred because they have lower overhead. +The TimeStamp of the TraceEvent or 0 if the collector is disabled. +EndScope +Scope + +Parameters +key (Key) – + +EndEventAtTime(key, ms) → None +Record an end event with key at a specified time if Category is +enabled. +This version of the method allows the passing of a specific number of +elapsed milliseconds, ms, to use for this event. This method is used +for testing and debugging code. + +Parameters + +key (Key) – +ms (float) – + +GetLabel() → str +Return the label associated with this collector. + +property enabled +bool +Returns whether collection of events is enabled for DefaultCategory. + +type : None +Enables or disables collection of events for DefaultCategory. + +Type +classmethod type + +property expired +True if this object has expired, False otherwise. + +property pythonTracingEnabled +None +Set whether automatic tracing of all python scopes is enabled. + +type : bool +Returns whether automatic tracing of all python scopes is enabled. + +Type +type + +class pxr.Trace.Reporter +This class converts streams of TraceEvent objects into call trees +which can then be used as a data source to a GUI or written out to a +file. +Methods: + +ClearTree() +Clears event tree and counters. + +GetLabel() +Return the label associated with this reporter. + +Report(s, iterationCount) +Generates a report to the ostream s, dividing all times by iterationCount. + +ReportChromeTracing(s) +Generates a timeline trace report suitable for viewing in Chrome's trace viewer. + +ReportChromeTracingToFile + +ReportTimes(s) +Generates a report of the times to the ostream s. + +UpdateTraceTrees() +This fully re-builds the event and aggregate trees from whatever the current collection holds. + +Attributes: + +aggregateTreeRoot +AggregateNode + +expired +True if this object has expired, False otherwise. + +foldRecursiveCalls +bool + +globalReporter + +groupByFunction +bool + +shouldAdjustForOverheadAndNoise +None + +ClearTree() → None +Clears event tree and counters. + +GetLabel() → str +Return the label associated with this reporter. + +Report(s, iterationCount) → None +Generates a report to the ostream s, dividing all times by +iterationCount. + +Parameters + +s (ostream) – +iterationCount (int) – + +ReportChromeTracing(s) → None +Generates a timeline trace report suitable for viewing in Chrome’s +trace viewer. + +Parameters +s (ostream) – + +ReportChromeTracingToFile() + +ReportTimes(s) → None +Generates a report of the times to the ostream s. + +Parameters +s (ostream) – + +UpdateTraceTrees() → None +This fully re-builds the event and aggregate trees from whatever the +current collection holds. +It is ok to call this multiple times in case the collection gets +appended on inbetween. +If we want to have multiple reporters per collector, this will need to +be changed so that all reporters reporting on a collector update their +respective trees. + +property aggregateTreeRoot +AggregateNode +Returns the root node of the aggregated call tree. + +Type +type + +property expired +True if this object has expired, False otherwise. + +property foldRecursiveCalls +bool +Returns the current setting for recursion folding for stack trace +event reporting. + +type : None +When stack trace event reporting, this sets whether or not recursive +calls are folded in the output. +Recursion folding is useful when the stacks contain deep recursive +structures. + +Type +type + +globalReporter =  + +property groupByFunction +bool +Returns the current group-by-function state. + +type : None +This affects only stack trace event reporting. +If true then all events in a function are grouped together +otherwise events are split out by address. + +Type +type + +property shouldAdjustForOverheadAndNoise +None +Set whether or not the reporter should adjust scope times for overhead +and noise. + +Type +type + +pxr.Trace.TraceFunction(obj) +A decorator that enables tracing the function that it decorates. +If you decorate with ‘TraceFunction’ the function will be traced in the +global collector. + +pxr.Trace.TraceMethod(obj) +A convenience. Same as TraceFunction but changes the recorded +label to use the term ‘method’ rather than ‘function’. + +pxr.Trace.TraceScope(label) +A context manager that calls BeginEvent on the global collector on enter +and EndEvent on exit. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Usd.md b/Usd.md new file mode 100644 index 0000000000000000000000000000000000000000..4e17dcab79b0aee71f1bde5325e5c5202bc6e2ec --- /dev/null +++ b/Usd.md @@ -0,0 +1,10594 @@ + + +Usd module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Usd module + +  + +# Usd module + +Summary: The core client-facing module for authoring, compositing, and reading Universal Scene Description. + +Classes: + +APISchemaBase +The base class for all API schemas. + +AssetInfoKeys + +Attribute +Scenegraph object for authoring and retrieving numeric, string, and array valued data, sampled over time. + +AttributeQuery +Object for efficiently making repeated queries for attribute values. + +ClipsAPI +UsdClipsAPI is an API schema that provides an interface to a prim's clip metadata. + +CollectionAPI +This is a general purpose API schema, used to describe a collection of heterogeneous objects within the scene."Objects"here may be prims or properties belonging to prims or other collections. + +CompositionArc + +CrateInfo +A class for introspecting the underlying qualities of .usdc'crate'files, for diagnostic purposes. + +EditContext +A utility class to temporarily modify a stage's current EditTarget during an execution scope. + +EditTarget +Defines a mapping from scene graph paths to Sdf spec paths in a SdfLayer where edits should be directed, or up to where to perform partial composition. + +Inherits +A proxy class for applying listOp edits to the inherit paths list for a prim. + +InterpolationType + +ListPosition + +LoadPolicy + +ModelAPI +UsdModelAPI is an API schema that provides an interface to a prim's model qualities, if it does, in fact, represent the root prim of a model. + +Notice +Container class for Usd notices + +Object +Base class for Usd scenegraph objects, providing common API. + +Payloads +UsdPayloads provides an interface to authoring and introspecting payloads. + +Prim +UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a"Prim"as described in the Universal Scene Description Composition Compendium + +PrimCompositionQuery +Object for making optionally filtered composition queries about a prim. + +PrimDefinition +Class representing the builtin definition of a prim given the schemas registered in the schema registry. + +PrimRange +An forward-iterable range that traverses a subtree of prims rooted at a given prim in depth-first order. + +PrimTypeInfo +Class that holds the full type information for a prim. + +Property +Base class for UsdAttribute and UsdRelationship scenegraph objects. + +References +UsdReferences provides an interface to authoring and introspecting references in Usd. + +Relationship +A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other prims, attributes, or relationships. + +ResolveInfo +Container for information about the source of an attribute's value, i.e. the'resolved'location of the attribute. + +ResolveInfoSource + +ResolveTarget +Defines a subrange of nodes and layers within a prim's prim index to consider when performing value resolution for the prim's attributes. + +SchemaBase +The base class for all schema types in Usd. + +SchemaKind + +SchemaRegistry +Singleton registry that provides access to schema type information and the prim definitions for registered Usd"IsA"and applied API schema types. + +Specializes +A proxy class for applying listOp edits to the specializes list for a prim. + +Stage +The outermost container for scene description, which owns and presents composed prims as a scenegraph, following the composition recipe recursively described in its associated"root layer". + +StageCache +A strongly concurrency safe collection of UsdStageRefPtr s, enabling sharing across multiple clients and threads. + +StageCacheContext +A context object that lets the UsdStage::Open() API read from or read from and write to a UsdStageCache instance during a scope of execution. + +StageCacheContextBlockType + +StageLoadRules +This class represents rules that govern payload inclusion on UsdStages. + +StagePopulationMask +This class represents a mask that may be applied to a UsdStage to limit the set of UsdPrim s it populates. + +TimeCode +Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdTimeCode::Default() . + +Tokens + +Typed +The base class for all typed schemas (those that can impart a typeName to a UsdPrim), and therefore the base class for all instantiable and"IsA"schemas. + +UsdCollectionMembershipQuery +Represents a flattened view of a collection. + +UsdFileFormat +File format for USD files. + +VariantSet +A UsdVariantSet represents a single VariantSet in USD (e.g. + +VariantSets +UsdVariantSets represents the collection of VariantSets that are present on a UsdPrim. + +ZipFile +Class for reading a zip file. + +ZipFileWriter +Class for writing a zip file. + +class pxr.Usd.APISchemaBase +The base class for all API schemas. +An API schema provides an interface to a prim’s qualities, but does +not specify a typeName for the underlying prim. The prim’s qualities +include its inheritance structure, attributes, relationships etc. +Since it cannot provide a typeName, an API schema is considered to be +non-concrete. +To auto-generate an API schema using usdGenSchema, simply leave the +typeName empty and make it inherit from”/APISchemaBase”or from another +API schema. See UsdModelAPI, UsdClipsAPI and UsdCollectionAPI for +examples. +API schemas are classified into applied and non-applied API schemas. +The author of an API schema has to decide on the type of API schema at +the time of its creation by setting customData[‘apiSchemaType’] in the +schema definition (i.e. in the associated primSpec inside the +schema.usda file). UsdAPISchemaBase implements methods that are used +to record the application of an API schema on a USD prim. +If an API schema only provides an interface to set certain core bits +of metadata (like UsdModelAPI, which sets model kind and UsdClipsAPI, +which sets clips-related metadata) OR if the API schema can apply to +any type of prim or only to a known fixed set of prim types OR if +there is no use of recording the application of the API schema, in +such cases, it would be better to make it a non-applied API schema. +Examples of non-applied API schemas include UsdModelAPI, UsdClipsAPI, +UsdShadeConnectableAPI and UsdGeomPrimvarsAPI. +If there is a need to discover (or record) whether a prim contains or +subscribes to a given API schema, it would be advantageous to make the +API schema be”applied”. In general, API schemas that add one or more +properties to a prim should be tagged as applied API schemas. A public +Apply() method is generated for applied API schemas by usdGenSchema. +An applied API schema must be applied to a prim via a call to the +generated Apply() method, for the schema object to evaluate to true +when converted to a bool using the explicit bool conversion operator. +Examples of applied API schemas include UsdCollectionAPI, +UsdGeomModelAPI and UsdGeomMotionAPI +Methods: + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.Usd.AssetInfoKeys +Attributes: + +identifier + +name + +payloadAssetDependencies + +version + +identifier = 'identifier' + +name = 'name' + +payloadAssetDependencies = 'payloadAssetDependencies' + +version = 'version' + +class pxr.Usd.Attribute +Scenegraph object for authoring and retrieving numeric, string, and +array valued data, sampled over time. +The allowed value types for UsdAttribute are dictated by the Sdf +(“Scene Description Foundations”) core’s data model, which we +summarize in Basic Datatypes for Scene Description Provided by Sdf. + +## Attribute Defining Qualities + +In addition to its value type, an Attribute has two other defining +qualities: + +Variability Expresses whether an attribute is intended to +have time samples ( GetVariability() == SdfVariabilityVarying ), +or only a default ( GetVariability() == SdfVariabilityUniform ). +For more on reasoning about time samples, see Value & Time-Sample +Accessors. +Custom Determines whether an attribute belongs to a schema ( +IsCustom() == false ), or is a user-defined, custom attribute. +schema attributes will always be defined on a prim of the schema type, +ans may possess fallback values from the schema, whereas custom +attributes must always first be authored in order to be defined. Note +that custom is actually an aspect of UsdProperty, as UsdRelationship +can also be custom or provided by a schema. + +## Attribute Creation and Existence + +One can always create an attribute generically via +UsdPrim::CreateAttribute() , which ensures that an attribute”is +defined”in the current UsdEditTarget. In order to author any metadata +or a default or timesample for an attribute, it must first be +defined. It is sufficient that the attribute be defined in any one of +the layers participating in the stage’s current composition; for +builtin attributes (those belonging to the owning prim’s defining +schema, i.e. the most specific subclass of UsdTypedSchema for which +prim.IsA() will evaluate to true) there need be no authored +scene description, because a definition is provided by the prim’s +schema definition. +Creating an attribute does not imply that the attribute has a +value. More broadly, in the following code: +if (UsdAttribute attr = prim.GetAttribute(TfToken("myAttr"))){ + \.\.\. +} + +The UsdAttribute passes the bool test, because it is defined; however, +inside the clause, we have no guarantee that attr has a value. + +## Attribute Value Interpolation + +UsdAttribute supports two interpolation behaviors when retrieving +attribute values at times where no value is explicitly authored. The +desired behavior may be specified via UsdStage::SetInterpolationType. +That behavior will be used for all calls to UsdAttribute::Get. +The supported interpolation types are: + +Held Attribute values are held constant between authored +values. An attribute’s value will be equal to the nearest preceding +authored value. If there is no preceding authored value, the value +will be equal to the nearest subsequent value. +Linear Attribute values are linearly interpolated between +authored values. +Linear interpolation is only supported for certain data types. See +USD_LINEAR_INTERPOLATION_TYPES for the list of these types. Types that +do not support linear interpolation will use held interpolation +instead. + +Linear interpolation is done element-by-element for array, vector, and +matrix data types. If linear interpolation is requested for two array +values with different sizes, held interpolation will be used instead. + +## Attribute Value Blocking + +While prims can effectively be removed from a scene by deactivating +them, properties cannot. However, it is possible to block an +attribute’s value, thus making the attribute behave as if it has a +definition (and possibly metadata), but no authored value. +One blocks an attribute using UsdAttribute::Block() , which will block +the attribute in the stage’s current UsdEditTarget, by authoring an +SdfValueBlock in the attribute’s default, and only values authored +in weaker layers than the editTarget will be blocked. If the value +block is the strongest authored opinion for the attribute, the +HasAuthoredValue() method will return false, and the HasValue() and +Get() methods will only return true if the attribute possesses a +fallback value from the prim’s schema.”Unblocking”a blocked attribute +is as simple as setting a default or timeSample value for the +attribute in the same or stronger layer. +The semantics of Value Clips necessitate the ability to selectively +block an attribute’s value for only some intervals in its authored +range of samples. One can block an attribute’s value at time t by +calling attr.Set(SdfValueBlock, t) When an attribute is +thusly”partially blocked”, UsdAttribute::Get() will succeed only for +those time intervals whose left/earlier bracketing timeSample is +not SdfValueBlock. +Due to this time-varying potential of value blocking, it may be the +case that an attribute’s HasAuthoredValue() and HasValue() methods +both return true (because they do not and cannot consider time- +varying blocks), but Get() may yet return false over some intervals. + +## Attributes of type SdfAssetPath and UsdAttribute::Get() + +If an attribute’s value type is SdfAssetPath or SdfAssetPathArray, +Get() performs extra work to compute the resolved asset paths, using +the layer that has the strongest value opinion as the anchor +for”relative”asset paths. Both the unresolved and resolved results are +available through SdfAssetPath::GetAssetPath() and +SdfAssetPath::GetResolvedPath() , respectively. +Clients that call Get() on many asset-path-valued attributes may wish +to employ an ArResolverScopedCache to improve asset path resolution +performance. +Methods: + +AddConnection(source, position) +Adds source to the list of connections, in the position specified by position . + +Block() +Remove all time samples on an attribute and author a block default value. + +Clear() +Clears the authored default value and all time samples for this attribute at the current EditTarget and returns true on success. + +ClearAtTime(time) +Clear the authored value for this attribute at the given time, at the current EditTarget and return true on success. + +ClearColorSpace() +Clears authored color-space value on the attribute. + +ClearConnections() +Remove all opinions about the connections list from the current edit target. + +ClearDefault() +Shorthand for ClearAtTime(UsdTimeCode::Default()). + +Get(value, time) +Perform value resolution to fetch the value of this attribute at the requested UsdTimeCode time , which defaults to default. + +GetBracketingTimeSamples(desiredTime, lower, ...) +Populate lower and upper with the next greater and lesser value relative to the desiredTime. + +GetColorSpace() +Gets the color space in which the attribute is authored. + +GetConnections(sources) +Compose this attribute's connections and fill sources with the result. + +GetNumTimeSamples() +Returns the number of time samples that have been authored. + +GetResolveInfo(time) +Perform value resolution to determine the source of the resolved value of this attribute at the requested UsdTimeCode time . + +GetRoleName() +Return the roleName for this attribute's typeName. + +GetTimeSamples(times) +Populates a vector with authored sample times. + +GetTimeSamplesInInterval(interval, times) +Populates a vector with authored sample times in interval . + +GetTypeName() +Return the"scene description"value type name for this attribute. + +GetUnionedTimeSamples +classmethod GetUnionedTimeSamples(attrs, times) -> bool + +GetUnionedTimeSamplesInInterval +classmethod GetUnionedTimeSamplesInInterval(attrs, interval, times) -> bool + +GetVariability() +An attribute's variability expresses whether it is intended to have time-samples ( SdfVariabilityVarying ), or only a single default value ( SdfVariabilityUniform ). + +HasAuthoredConnections() +Return true if this attribute has any authored opinions regarding connections. + +HasAuthoredValue() +Return true if this attribute has either an authored default value or authored time samples. + +HasAuthoredValueOpinion() +Deprecated + +HasColorSpace() +Returns whether color-space is authored on the attribute. + +HasFallbackValue() +Return true if this attribute has a fallback value provided by a registered schema. + +HasValue() +Return true if this attribute has an authored default value, authored time samples or a fallback value provided by a registered schema. + +RemoveConnection(source) +Removes target from the list of targets. + +Set(value, time) +Set the value of this attribute in the current UsdEditTarget to value at UsdTimeCode time , which defaults to default. + +SetColorSpace(colorSpace) +Sets the color space of the attribute to colorSpace . + +SetConnections(sources) +Make the authoring layer's opinion of the connection list explicit, and set exactly to sources . + +SetTypeName(typeName) +Set the value for typeName at the current EditTarget, return true on success, false if the value can not be written. + +SetVariability(variability) +Set the value for variability at the current EditTarget, return true on success, false if the value can not be written. + +ValueMightBeTimeVarying() +Return true if it is possible, but not certain, that this attribute's value changes over time, false otherwise. + +AddConnection(source, position) → bool +Adds source to the list of connections, in the position specified +by position . +Issue an error if source identifies a prototype prim or an object +descendant to a prototype prim. It is not valid to author connections +to these objects. +What data this actually authors depends on what data is currently +authored in the authoring layer, with respect to list-editing +semantics, which we will document soon + +Parameters + +source (Path) – +position (ListPosition) – + +Block() → None +Remove all time samples on an attribute and author a block +default value. +This causes the attribute to resolve as if there were no authored +value opinions in weaker layers. +See Attribute Value Blocking for more information, including +information on time-varying blocking. + +Clear() → bool +Clears the authored default value and all time samples for this +attribute at the current EditTarget and returns true on success. +Calling clear when either no value is authored or no spec is present, +is a silent no-op returning true. +This method does not affect any other data authored on this attribute. + +ClearAtTime(time) → bool +Clear the authored value for this attribute at the given time, at +the current EditTarget and return true on success. +UsdTimeCode::Default() can be used to clear the default value. +Calling clear when either no value is authored or no spec is present, +is a silent no-op returning true. + +Parameters +time (TimeCode) – + +ClearColorSpace() → bool +Clears authored color-space value on the attribute. +SetColorSpace() + +ClearConnections() → bool +Remove all opinions about the connections list from the current edit +target. + +ClearDefault() → bool +Shorthand for ClearAtTime(UsdTimeCode::Default()). + +Get(value, time) → bool +Perform value resolution to fetch the value of this attribute at the +requested UsdTimeCode time , which defaults to default. +If no value is authored at time but values are authored at other +times, this function will return an interpolated value based on the +stage’s interpolation type. See Attribute Value Interpolation. +This templated accessor is designed for high performance data- +streaming applications, allowing one to fetch data into the same +container repeatedly, avoiding memory allocations when possible +(VtArray containers will be resized as necessary to conform to the +size of data being read). +This template is only instantiated for the valid scene description +value types and their corresponding VtArray containers. See Basic +Datatypes for Scene Description Provided by Sdf for the complete list +of types. +Values are retrieved without regard to this attribute’s variability. +For example, a uniform attribute may retrieve time sample values if +any are authored. However, the USD_VALIDATE_VARIABILITY TF_DEBUG code +will cause debug information to be output if values that are +inconsistent with this attribute’s variability are retrieved. See +UsdAttribute::GetVariability for more details. +true if there was a value to be read, it was of the type T requested, +and we read it successfully - false otherwise. For more details, see +TimeSamples, Defaults, and Value Resolution, and also Attributes of +type SdfAssetPath and UsdAttribute::Get() for information on how to +retrieve resolved asset paths from SdfAssetPath-valued attributes. + +Parameters + +value (T) – +time (TimeCode) – + +Get(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Type-erased access, often not as efficient as typed access. + +Parameters + +value (VtValue) – +time (TimeCode) – + +GetBracketingTimeSamples(desiredTime, lower, upper, hasTimeSamples) → bool +Populate lower and upper with the next greater and lesser value +relative to the desiredTime. +Return false if no value exists or an error occurs, true if either a +default value or timeSamples exist. +Use standard resolution semantics: if a stronger default value is +authored over weaker time samples, the default value hides the +underlying timeSamples. +1) If a sample exists at the desiredTime, set both upper and lower +to desiredTime. +2) If samples exist surrounding, but not equal to the desiredTime, +set lower and upper to the bracketing samples nearest to the +desiredTime. +3) If the desiredTime is outside of the range of authored samples, +clamp upper and lower to the nearest time sample. +4) If no samples exist, do not modify upper and lower and set +hasTimeSamples to false. +In cases (1), (2) and (3), set hasTimeSamples to true. +All four cases above are considered to be successful, thus the return +value will be true and no error message will be emitted. + +Parameters + +desiredTime (float) – +lower (float) – +upper (float) – +hasTimeSamples (bool) – + +GetColorSpace() → str +Gets the color space in which the attribute is authored. +SetColorSpace() UsdStage Color Configuration API + +GetConnections(sources) → bool +Compose this attribute’s connections and fill sources with the +result. +All preexisting elements in sources are lost. +Returns true if any connection path opinions have been authored and no +composition errors were encountered, returns false otherwise. Note +that authored opinions may include opinions that clear the connections +and a return value of true does not necessarily indicate that +sources will contain any connection paths. +See Relationship Targets and Attribute Connections for details on +behavior when targets point to objects beneath instance prims. +The result is not cached, and thus recomputed on each query. + +Parameters +sources (list[SdfPath]) – + +GetNumTimeSamples() → int +Returns the number of time samples that have been authored. +This method uses the standard resolution semantics, so if a stronger +default value is authored over weaker time samples, the default value +will hide the underlying timesamples. +This function will query all value clips that may contribute time +samples for this attribute, opening them if needed. This may be +expensive, especially if many clips are involved. + +GetResolveInfo(time) → ResolveInfo +Perform value resolution to determine the source of the resolved value +of this attribute at the requested UsdTimeCode time . + +Parameters +time (TimeCode) – + +GetResolveInfo() -> ResolveInfo +Perform value resolution to determine the source of the resolved value +of this attribute at any non-default time. +Often (i.e. unless the attribute is affected by Value Clips) the +source of the resolved value does not vary over time. See +UsdAttributeQuery as an example that takes advantage of this quality +of value resolution. + +GetRoleName() → str +Return the roleName for this attribute’s typeName. + +GetTimeSamples(times) → bool +Populates a vector with authored sample times. +Returns false only on error. +This method uses the standard resolution semantics, so if a stronger +default value is authored over weaker time samples, the default value +will hide the underlying timesamples. +This function will query all value clips that may contribute time +samples for this attribute, opening them if needed. This may be +expensive, especially if many clips are involved. times +- on return, will contain the sorted, ascending timeSample +ordinates. Any data in times will be lost, as this method clears +times . +UsdAttribute::GetTimeSamplesInInterval + +Parameters +times (list[float]) – + +GetTimeSamplesInInterval(interval, times) → bool +Populates a vector with authored sample times in interval . +Returns false only on an error. +This function will only query the value clips that may contribute time +samples for this attribute in the given interval, opening them if +necessary. interval +- the GfInterval on which to gather time samples. times +- on return, will contain the sorted, ascending timeSample +ordinates. Any data in times will be lost, as this method clears +times . +UsdAttribute::GetTimeSamples + +Parameters + +interval (Interval) – +times (list[float]) – + +GetTypeName() → ValueTypeName +Return the”scene description”value type name for this attribute. + +static GetUnionedTimeSamples() +classmethod GetUnionedTimeSamples(attrs, times) -> bool +Populates the given vector, times with the union of all the +authored sample times on all of the given attributes, attrs . +This function will query all value clips that may contribute time +samples for the attributes in attrs , opening them if needed. This +may be expensive, especially if many clips are involved. The +accumulated sample times will be in sorted (increasing) order and will +not contain any duplicates. +This clears any existing values in the times vector before +accumulating sample times of the given attributes. +false if any of the attributes in attr are invalid or if there’s +an error when fetching time-samples for any of the attributes. +UsdAttribute::GetTimeSamples +UsdAttribute::GetUnionedTimeSamplesInInterval + +Parameters + +attrs (list[Attribute]) – +times (list[float]) – + +static GetUnionedTimeSamplesInInterval() +classmethod GetUnionedTimeSamplesInInterval(attrs, interval, times) -> bool +Populates the given vector, times with the union of all the +authored sample times in the GfInterval, interval on all of the +given attributes, attrs . +This function will only query the value clips that may contribute time +samples for the attributes in attrs , in the given interval , +opening them if necessary. The accumulated sample times will be in +sorted (increasing) order and will not contain any duplicates. +This clears any existing values in the times vector before +accumulating sample times of the given attributes. +false if any of the attributes in attr are invalid or if there’s +an error fetching time-samples for any of the attributes. +UsdAttribute::GetTimeSamplesInInterval +UsdAttribute::GetUnionedTimeSamples + +Parameters + +attrs (list[Attribute]) – +interval (Interval) – +times (list[float]) – + +GetVariability() → Variability +An attribute’s variability expresses whether it is intended to have +time-samples ( SdfVariabilityVarying ), or only a single default +value ( SdfVariabilityUniform ). +Variability is required meta-data of all attributes, and its fallback +value is SdfVariabilityVarying. + +HasAuthoredConnections() → bool +Return true if this attribute has any authored opinions regarding +connections. +Note that this includes opinions that remove connections, so a true +return does not necessarily indicate that this attribute has +connections. + +HasAuthoredValue() → bool +Return true if this attribute has either an authored default value or +authored time samples. +If the attribute has been blocked, then return false + +HasAuthoredValueOpinion() → bool +Deprecated +This method is deprecated because it returns true even when an +attribute is blocked. Please use HasAuthoredValue() instead. If you +truly need to know whether the attribute has any authored value +opinions, including blocks, you can make the following query: +attr.GetResolveInfo(). HasAuthoredValueOpinion() +Return true if this attribute has either an authored default value or +authored time samples. + +HasColorSpace() → bool +Returns whether color-space is authored on the attribute. +GetColorSpace() + +HasFallbackValue() → bool +Return true if this attribute has a fallback value provided by a +registered schema. + +HasValue() → bool +Return true if this attribute has an authored default value, authored +time samples or a fallback value provided by a registered schema. +If the attribute has been blocked, then return true if and only if +it has a fallback value. + +RemoveConnection(source) → bool +Removes target from the list of targets. +Issue an error if source identifies a prototype prim or an object +descendant to a prototype prim. It is not valid to author connections +to these objects. + +Parameters +source (Path) – + +Set(value, time) → bool +Set the value of this attribute in the current UsdEditTarget to +value at UsdTimeCode time , which defaults to default. +Values are authored without regard to this attribute’s variability. +For example, time sample values may be authored on a uniform +attribute. However, the USD_VALIDATE_VARIABILITY TF_DEBUG code will +cause debug information to be output if values that are inconsistent +with this attribute’s variability are authored. See +UsdAttribute::GetVariability for more details. +false and generate an error if type T does not match this +attribute’s defined scene description type exactly, or if there is +no existing definition for the attribute. + +Parameters + +value (T) – +time (TimeCode) – + +Set(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +As a convenience, we allow the setting of string value typed +attributes via a C string value. + +Parameters + +value (str) – +time (TimeCode) – + +Set(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +value (VtValue) – +time (TimeCode) – + +SetColorSpace(colorSpace) → None +Sets the color space of the attribute to colorSpace . +GetColorSpace() UsdStage Color Configuration API + +Parameters +colorSpace (str) – + +SetConnections(sources) → bool +Make the authoring layer’s opinion of the connection list explicit, +and set exactly to sources . +Issue an error if source identifies a prototype prim or an object +descendant to a prototype prim. It is not valid to author connections +to these objects. +If any path in sources is invalid, issue an error and return +false. + +Parameters +sources (list[SdfPath]) – + +SetTypeName(typeName) → bool +Set the value for typeName at the current EditTarget, return true on +success, false if the value can not be written. +Note that this value should not be changed as it is typically +either automatically authored or provided by a property definition. +This method is provided primarily for fixing invalid scene +description. + +Parameters +typeName (ValueTypeName) – + +SetVariability(variability) → bool +Set the value for variability at the current EditTarget, return true +on success, false if the value can not be written. +Note that this value should not be changed as it is typically +either automatically authored or provided by a property definition. +This method is provided primarily for fixing invalid scene +description. + +Parameters +variability (Variability) – + +ValueMightBeTimeVarying() → bool +Return true if it is possible, but not certain, that this attribute’s +value changes over time, false otherwise. +If this function returns false, it is certain that this attribute’s +value remains constant over time. +This function is equivalent to checking if GetNumTimeSamples() >1, but +may be more efficient since it does not actually need to get a full +count of all time samples. + +class pxr.Usd.AttributeQuery +Object for efficiently making repeated queries for attribute values. +Retrieving an attribute’s value at a particular time requires +determining the source of strongest opinion for that value. Often +(i.e. unless the attribute is affected by Value Clips) this source +does not vary over time. UsdAttributeQuery uses this fact to speed up +repeated value queries by caching the source information for an +attribute. It is safe to use a UsdAttributeQuery for any attribute - +if the attribute is affected by Value Clips, the performance gain +will just be less. + +## Resolve targets + +An attribute query can also be constructed for an attribute along with +a UsdResolveTarget. A resolve target allows value resolution to +consider only a subrange of the prim stack instead of the entirety of +it. All of the methods of an attribute query created with a resolve +target will perform value resolution within that resolve target. This +can be useful for finding the value of an attribute resolved up to a +particular layer or for determining if a value authored on layer would +be overridden by a stronger opinion. + +## Thread safety + +This object provides the basic thread-safety guarantee. Multiple +threads may call the value accessor functions simultaneously. + +## Invalidation + +This object does not listen for change notification. If a consumer is +holding on to a UsdAttributeQuery, it is their responsibility to +dispose of it in response to a resync change to the associated +attribute. Failing to do so may result in incorrect values or crashes +due to dereferencing invalid objects. +Methods: + +CreateQueries +classmethod CreateQueries(prim, attrNames) -> list[AttributeQuery] + +Get(value, time) +Perform value resolution to fetch the value of the attribute associated with this query at the requested UsdTimeCode time . + +GetAttribute() +Return the attribute associated with this query. + +GetBracketingTimeSamples(desiredTime, lower, ...) +Populate lower and upper with the next greater and lesser value relative to the desiredTime. + +GetNumTimeSamples() +Returns the number of time samples that have been authored. + +GetTimeSamples(times) +Populates a vector with authored sample times. + +GetTimeSamplesInInterval(interval, times) +Populates a vector with authored sample times in interval . + +GetUnionedTimeSamples +classmethod GetUnionedTimeSamples(attrQueries, times) -> bool + +GetUnionedTimeSamplesInInterval +classmethod GetUnionedTimeSamplesInInterval(attrQueries, interval, times) -> bool + +HasAuthoredValue() +Return true if this attribute has either an authored default value or authored time samples. + +HasAuthoredValueOpinion() +Deprecated + +HasFallbackValue() +Return true if the attribute associated with this query has a fallback value provided by a registered schema. + +HasValue() +Return true if the attribute associated with this query has an authored default value, authored time samples or a fallback value provided by a registered schema. + +IsValid() +Return true if this query is valid (i.e. + +ValueMightBeTimeVarying() +Return true if it is possible, but not certain, that this attribute's value changes over time, false otherwise. + +static CreateQueries() +classmethod CreateQueries(prim, attrNames) -> list[AttributeQuery] +Construct new queries for the attributes named in attrNames under +the prim prim . +The objects in the returned vector will line up 1-to-1 with +attrNames . + +Parameters + +prim (Prim) – +attrNames (list[TfToken]) – + +Get(value, time) → bool +Perform value resolution to fetch the value of the attribute +associated with this query at the requested UsdTimeCode time . +UsdAttribute::Get + +Parameters + +value (T) – +time (TimeCode) – + +Get(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Type-erased access, often not as efficient as typed access. + +Parameters + +value (VtValue) – +time (TimeCode) – + +GetAttribute() → Attribute +Return the attribute associated with this query. + +GetBracketingTimeSamples(desiredTime, lower, upper, hasTimeSamples) → bool +Populate lower and upper with the next greater and lesser value +relative to the desiredTime. +UsdAttribute::GetBracketingTimeSamples + +Parameters + +desiredTime (float) – +lower (float) – +upper (float) – +hasTimeSamples (bool) – + +GetNumTimeSamples() → int +Returns the number of time samples that have been authored. +UsdAttribute::GetNumTimeSamples + +GetTimeSamples(times) → bool +Populates a vector with authored sample times. +Returns false only on error. Behaves identically to +UsdAttribute::GetTimeSamples() +UsdAttributeQuery::GetTimeSamplesInInterval + +Parameters +times (list[float]) – + +GetTimeSamplesInInterval(interval, times) → bool +Populates a vector with authored sample times in interval . +Returns false only on an error. +Behaves identically to UsdAttribute::GetTimeSamplesInInterval() + +Parameters + +interval (Interval) – +times (list[float]) – + +static GetUnionedTimeSamples() +classmethod GetUnionedTimeSamples(attrQueries, times) -> bool +Populates the given vector, times with the union of all the +authored sample times on all of the given attribute-query objects, +attrQueries . +Behaves identically to UsdAttribute::GetUnionedTimeSamples() +false if one or more attribute-queries in attrQueries are invalid +or if there’s an error fetching time-samples for any of the attribute- +query objects. +UsdAttribute::GetUnionedTimeSamples +UsdAttributeQuery::GetUnionedTimeSamplesInInterval + +Parameters + +attrQueries (list[AttributeQuery]) – +times (list[float]) – + +static GetUnionedTimeSamplesInInterval() +classmethod GetUnionedTimeSamplesInInterval(attrQueries, interval, times) -> bool +Populates the given vector, times with the union of all the +authored sample times in the GfInterval, interval on all of the +given attribute-query objects, attrQueries . +Behaves identically to UsdAttribute::GetUnionedTimeSamplesInInterval() +false if one or more attribute-queries in attrQueries are invalid +or if there’s an error fetching time-samples for any of the attribute- +query objects. +UsdAttribute::GetUnionedTimeSamplesInInterval + +Parameters + +attrQueries (list[AttributeQuery]) – +interval (Interval) – +times (list[float]) – + +HasAuthoredValue() → bool +Return true if this attribute has either an authored default value or +authored time samples. +If the attribute has been blocked, then return false +UsdAttribute::HasAuthoredValue() + +HasAuthoredValueOpinion() → bool +Deprecated +This method is deprecated because it returns true even when an +attribute is blocked. Please use HasAuthoredValue() instead. If you +truly need to know whether the attribute has any authored value +opinions, including blocks, you can make the following query: +query.GetAttribute().GetResolveInfo(). HasAuthoredValueOpinion() +Return true if this attribute has either an authored default value or +authored time samples. + +HasFallbackValue() → bool +Return true if the attribute associated with this query has a fallback +value provided by a registered schema. +UsdAttribute::HasFallbackValue + +HasValue() → bool +Return true if the attribute associated with this query has an +authored default value, authored time samples or a fallback value +provided by a registered schema. +UsdAttribute::HasValue + +IsValid() → bool +Return true if this query is valid (i.e. +it is associated with a valid attribute), false otherwise. + +ValueMightBeTimeVarying() → bool +Return true if it is possible, but not certain, that this attribute’s +value changes over time, false otherwise. +UsdAttribute::ValueMightBeTimeVarying + +class pxr.Usd.ClipsAPI +UsdClipsAPI is an API schema that provides an interface to a prim’s +clip metadata. Clips are a”value resolution”feature that allows one to +specify a sequence of usd files (clips) to be consulted, over time, as +a source of varying overrides for the prims at and beneath this prim +in namespace. +SetClipAssetPaths() establishes the set of clips that can be +consulted. SetClipActive() specifies the ordering of clip application +over time (clips can be repeated), while SetClipTimes() specifies +time-mapping from stage-time to clip-time for the clip active at a +given stage-time, which allows for time-dilation and repetition of +clips. Finally, SetClipPrimPath() determines the path within each clip +that will map to this prim, i.e. the location within the clip at which +we will look for opinions for this prim. +The clip asset paths, times and active metadata can also be specified +through template clip metadata. This can be desirable when your set of +assets is very large, as the template metadata is much more concise. +SetClipTemplateAssetPath() establishes the asset identifier pattern of +the set of clips to be consulted. SetClipTemplateStride() , +SetClipTemplateEndTime() , and SetClipTemplateStartTime() specify the +range in which USD will search, based on the template. From the set of +resolved asset paths, times and active will be derived internally. +A prim may have multiple”clip sets” named sets of clips that each +have their own values for the metadata described above. For example, a +prim might have a clip set named”Clips_1”that specifies some group of +clip asset paths, and another clip set named”Clips_2”that uses an +entirely different set of clip asset paths. These clip sets are +composed across composition arcs, so clip sets for a prim may be +defined in multiple sublayers or references, for example. Individual +metadata for a given clip set may be sparsely overridden. +Important facts about clips: + +Within the layerstack in which clips are established, the +opinions within the clips will be weaker than any local opinions in +the layerstack, but em stronger than varying opinions coming across +references and variants. +We will never look for metadata or default opinions in clips +when performing value resolution on the owning stage, since these +quantities must be time-invariant. +This leads to the common structure in which we reference a model +asset on a prim, and then author clips at the same site: the asset +reference will provide the topology and unvarying data for the model, +while the clips will provide the time-sampled animation. + +For further information, see Sequencable, Re-timable Animated”Value +Clips” +Methods: + +ComputeClipAssetPaths(clipSet) +Computes and resolves the list of clip asset paths used by the clip set named clipSet . + +GenerateClipManifest(clipSet, ...) +Create a clip manifest containing entries for all attributes in the value clips for clip set clipSet . + +GenerateClipManifestFromLayers +classmethod GenerateClipManifestFromLayers(clipLayers, clipPrimPath) -> Layer + +Get +classmethod Get(stage, path) -> ClipsAPI + +GetClipActive(activeClips, clipSet) +List of pairs (time, clip index) indicating the time on the stage at which the clip in the clip set named clipSet specified by the clip index is active. + +GetClipAssetPaths(assetPaths, clipSet) +List of asset paths to the clips in the clip set named clipSet . + +GetClipManifestAssetPath(manifestAssetPath, ...) +Asset path for the clip manifest for the clip set named clipSet . + +GetClipPrimPath(primPath, clipSet) +Path to the prim in the clips in the clip set named clipSet from which time samples will be read. + +GetClipSets(clipSets) +ListOp that may be used to affect how opinions from clip sets are applied during value resolution. + +GetClipTemplateActiveOffset(...) +A double representing the offset value used by USD when determining the active period for each clip. + +GetClipTemplateAssetPath(...) +A template string representing a set of assets to be used as clips for the clip set named clipSet . + +GetClipTemplateEndTime(clipTemplateEndTime, ...) +A double which indicates the end of the range USD will use to to search for asset paths for the clip set named clipSet . + +GetClipTemplateStartTime(...) +A double which indicates the start of the range USD will use to search for asset paths for the clip set named clipSet . + +GetClipTemplateStride(clipTemplateStride, ...) +A double representing the increment value USD will use when searching for asset paths for the clip set named clipSet . + +GetClipTimes(clipTimes, clipSet) +List of pairs (stage time, clip time) indicating the time in the active clip in the clip set named clipSet that should be consulted for values at the corresponding stage time. + +GetClips(clips) +Dictionary that contains the definition of the clip sets on this prim. + +GetInterpolateMissingClipValues(interpolate, ...) + +param interpolate + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +SetClipActive(activeClips, clipSet) +Set the active clip metadata for the clip set named clipSet . + +SetClipAssetPaths(assetPaths, clipSet) +Set the clip asset paths for the clip set named clipSet . + +SetClipManifestAssetPath(manifestAssetPath, ...) +Set the clip manifest asset path for this prim. + +SetClipPrimPath(primPath, clipSet) +Set the clip prim path for the clip set named clipSet . + +SetClipSets(clipSets) +Set the clip sets list op for this prim. + +SetClipTemplateActiveOffset(...) +Set the clip template offset for the clip set named clipSet . + +SetClipTemplateAssetPath(...) +Set the clip template asset path for the clip set named clipSet . + +SetClipTemplateEndTime(clipTemplateEndTime, ...) +Set the template end time for the clipset named clipSet . + +SetClipTemplateStartTime(...) +Set the template start time for the clip set named clipSet . + +SetClipTemplateStride(clipTemplateStride, ...) +Set the template stride for the clip set named clipSet . + +SetClipTimes(clipTimes, clipSet) +Set the clip times metadata for this prim. + +SetClips(clips) +Set the clips dictionary for this prim. + +SetInterpolateMissingClipValues(interpolate, ...) +Set whether missing clip values are interpolated from surrounding clips. + +ComputeClipAssetPaths(clipSet) → VtArray[AssetPath] +Computes and resolves the list of clip asset paths used by the clip +set named clipSet . +This is the same list of paths that would be used during value +resolution. +If the clip set is defined using template clip metadata, this function +will compute the asset paths based on the template parameters. +Otherwise this function will use the authored clipAssetPaths. + +Parameters +clipSet (str) – + +ComputeClipAssetPaths() -> VtArray[AssetPath] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. + +GenerateClipManifest(clipSet, writeBlocksForClipsWithMissingValues) → Layer +Create a clip manifest containing entries for all attributes in the +value clips for clip set clipSet . +This returns an anonymous layer that can be exported and reused ( +SetClipManifestAssetPath). If writeBlocksForClipsWithMissingValues +is true , the generated manifest will have value blocks authored +for each attribute at the activation times of clips that do not +contain time samples for that attribute. This accelerates searches +done when the interpolation of missing clip values is enabled. See +GetInterpolateMissingClipValues and Interpolating Missing Values in +Clip Set for more details. +Returns an invalid SdfLayerRefPtr on failure. + +Parameters + +clipSet (str) – +writeBlocksForClipsWithMissingValues (bool) – + +GenerateClipManifest(writeBlocksForClipsWithMissingValues) -> Layer +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +writeBlocksForClipsWithMissingValues (bool) – + +static GenerateClipManifestFromLayers() +classmethod GenerateClipManifestFromLayers(clipLayers, clipPrimPath) -> Layer +Create a clip manifest containing entries for all attributes in the +given clipLayers that belong to the prim at clipPrimPath and +all descendants. +This returns an anonymous layer that can be exported and reused ( +SetClipManifestAssetPath). Returns an invalid SdfLayerRefPtr on +failure. + +Parameters + +clipLayers (list[SdfLayerHandle]) – +clipPrimPath (Path) – + +static Get() +classmethod Get(stage, path) -> ClipsAPI +Return a UsdClipsAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdClipsAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetClipActive(activeClips, clipSet) → bool +List of pairs (time, clip index) indicating the time on the stage at +which the clip in the clip set named clipSet specified by the clip +index is active. +For instance, a value of [(0.0, 0), (20.0, 1)] indicates that clip 0 +is active at time 0 and clip 1 is active at time 20. + +Parameters + +activeClips (Vec2dArray) – +clipSet (str) – + +GetClipActive(activeClips) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +activeClips (Vec2dArray) – + +GetClipAssetPaths(assetPaths, clipSet) → bool +List of asset paths to the clips in the clip set named clipSet . +This list is unordered, but elements in this list are referred to by +index in other clip-related fields. + +Parameters + +assetPaths (VtArray[AssetPath]) – +clipSet (str) – + +GetClipAssetPaths(assetPaths) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +assetPaths (VtArray[AssetPath]) – + +GetClipManifestAssetPath(manifestAssetPath, clipSet) → bool +Asset path for the clip manifest for the clip set named clipSet . +The clip manifest indicates which attributes have time samples +authored in the clips specified on this prim. During value resolution, +clips will only be examined if the attribute exists and is declared as +varying in the manifest. See Clip Manifest for more details. +For instance, if this prim’s path is, the clip prim path +is, and we want values for the attribute, we will +only look within this prim’s clips if the attributeexists +and is varying in the manifest. + +Parameters + +manifestAssetPath (AssetPath) – +clipSet (str) – + +GetClipManifestAssetPath(manifestAssetPath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +manifestAssetPath (AssetPath) – + +GetClipPrimPath(primPath, clipSet) → bool +Path to the prim in the clips in the clip set named clipSet from +which time samples will be read. +This prim’s path will be substituted with this value to determine the +final path in the clip from which to read data. For instance, if this +prims’path is’/Prim_1’, the clip prim path is’/Prim’, and we want to +get values for the attribute’/Prim_1.size’. The clip prim path will be +substituted in, yielding’/Prim.size’, and each clip will be examined +for values at that path. + +Parameters + +primPath (str) – +clipSet (str) – + +GetClipPrimPath(primPath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +primPath (str) – + +GetClipSets(clipSets) → bool +ListOp that may be used to affect how opinions from clip sets are +applied during value resolution. +By default, clip sets in a layer stack are examined in lexicographical +order by name for attribute values during value resolution. The clip +sets listOp can be used to reorder the clip sets in a layer stack or +remove them entirely from consideration during value resolution +without modifying the clips dictionary. +This is not the list of clip sets that are authored on this prim. To +retrieve that information, use GetClips to examine the clips +dictionary directly. +This function returns the clip sets listOp from the current edit +target. + +Parameters +clipSets (StringListOp) – + +GetClipTemplateActiveOffset(clipTemplateActiveOffset, clipSet) → bool +A double representing the offset value used by USD when determining +the active period for each clip. + +Parameters + +clipTemplateActiveOffset (float) – +clipSet (str) – + +GetClipTemplateActiveOffset(clipTemplateActiveOffset) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateActiveOffset (float) – + +GetClipTemplateAssetPath(clipTemplateAssetPath, clipSet) → bool +A template string representing a set of assets to be used as clips for +the clip set named clipSet . +This string can be of two forms: +integer frames: path/basename.###.usd +subinteger frames: path/basename.##.##.usd. +For the integer portion of the specification, USD will take a +particular time, determined by the template start time, stride, and +end time, and pad it with zeros up to the number of hashes provided so +long as the number of hashes is greater than the digits required to +specify the integer value. +For instance: +time = 12, template asset path = foo.##.usd =>foo.12.usd time = 12, +template asset path = foo.###.usd =>foo.012.usd time = 333, template +asset path = foo.#.usd =>foo.333.usd +In the case of subinteger portion of a specifications, USD requires +the specification to be exact. +For instance: +time = 1.15, template asset path = foo.#.###.usd =>foo.1.150.usd time += 1.145, template asset path = foo.#.##.usd =>foo.1.15.usd time = 1.1, +template asset path = foo.#.##.usd =>foo.1.10.usd +Note that USD requires that hash groups be adjacent in the string, and +that there only be one or two such groups. + +Parameters + +clipTemplateAssetPath (str) – +clipSet (str) – + +GetClipTemplateAssetPath(clipTemplateAssetPath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateAssetPath (str) – + +GetClipTemplateEndTime(clipTemplateEndTime, clipSet) → bool +A double which indicates the end of the range USD will use to to +search for asset paths for the clip set named clipSet . +This value is inclusive in that range. +GetClipTemplateAssetPath. + +Parameters + +clipTemplateEndTime (float) – +clipSet (str) – + +GetClipTemplateEndTime(clipTemplateEndTime) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateEndTime (float) – + +GetClipTemplateStartTime(clipTemplateStartTime, clipSet) → bool +A double which indicates the start of the range USD will use to search +for asset paths for the clip set named clipSet . +This value is inclusive in that range. +GetClipTemplateAssetPath. + +Parameters + +clipTemplateStartTime (float) – +clipSet (str) – + +GetClipTemplateStartTime(clipTemplateStartTime) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateStartTime (float) – + +GetClipTemplateStride(clipTemplateStride, clipSet) → bool +A double representing the increment value USD will use when searching +for asset paths for the clip set named clipSet . +GetClipTemplateAssetPath. + +Parameters + +clipTemplateStride (float) – +clipSet (str) – + +GetClipTemplateStride(clipTemplateStride) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateStride (float) – + +GetClipTimes(clipTimes, clipSet) → bool +List of pairs (stage time, clip time) indicating the time in the +active clip in the clip set named clipSet that should be consulted +for values at the corresponding stage time. +During value resolution, this list will be sorted by stage time; times +will then be linearly interpolated between consecutive entries. For +instance, for clip times [(0.0, 0.0), (10.0, 20.0)], at stage time 0, +values from the active clip at time 0 will be used, at stage time 5, +values from the active clip at time 10, and at stage time 10, clip +values at time 20. + +Parameters + +clipTimes (Vec2dArray) – +clipSet (str) – + +GetClipTimes(clipTimes) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTimes (Vec2dArray) – + +GetClips(clips) → bool +Dictionary that contains the definition of the clip sets on this prim. +Each entry in this dictionary defines a clip set: the entry’s key is +the name of the clip set and the entry’s value is a dictionary +containing the metadata that specifies the clips in the set. +See UsdClipsAPIInfoKeys for the keys used for each clip set’s +dictionary, or use the other API to set or get values for a given clip +set. + +Parameters +clips (VtDictionary) – + +GetInterpolateMissingClipValues(interpolate, clipSet) → bool + +Parameters + +interpolate (bool) – +clipSet (str) – + +GetInterpolateMissingClipValues(interpolate) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. + +Parameters +interpolate (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +SetClipActive(activeClips, clipSet) → bool +Set the active clip metadata for the clip set named clipSet . +GetClipActive() + +Parameters + +activeClips (Vec2dArray) – +clipSet (str) – + +SetClipActive(activeClips) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +activeClips (Vec2dArray) – + +SetClipAssetPaths(assetPaths, clipSet) → bool +Set the clip asset paths for the clip set named clipSet . +GetClipAssetPaths() + +Parameters + +assetPaths (VtArray[AssetPath]) – +clipSet (str) – + +SetClipAssetPaths(assetPaths) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +assetPaths (VtArray[AssetPath]) – + +SetClipManifestAssetPath(manifestAssetPath, clipSet) → bool +Set the clip manifest asset path for this prim. +GetClipManifestAssetPath() + +Parameters + +manifestAssetPath (AssetPath) – +clipSet (str) – + +SetClipManifestAssetPath(manifestAssetPath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +manifestAssetPath (AssetPath) – + +SetClipPrimPath(primPath, clipSet) → bool +Set the clip prim path for the clip set named clipSet . +GetClipPrimPath() + +Parameters + +primPath (str) – +clipSet (str) – + +SetClipPrimPath(primPath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +primPath (str) – + +SetClipSets(clipSets) → bool +Set the clip sets list op for this prim. +GetClipSets + +Parameters +clipSets (StringListOp) – + +SetClipTemplateActiveOffset(clipTemplateActiveOffset, clipSet) → bool +Set the clip template offset for the clip set named clipSet . +GetClipTemplateActiveOffset + +Parameters + +clipTemplateActiveOffset (float) – +clipSet (str) – + +SetClipTemplateActiveOffset(clipTemplateActiveOffset) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateActiveOffset (float) – + +SetClipTemplateAssetPath(clipTemplateAssetPath, clipSet) → bool +Set the clip template asset path for the clip set named clipSet . +GetClipTemplateAssetPath + +Parameters + +clipTemplateAssetPath (str) – +clipSet (str) – + +SetClipTemplateAssetPath(clipTemplateAssetPath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateAssetPath (str) – + +SetClipTemplateEndTime(clipTemplateEndTime, clipSet) → bool +Set the template end time for the clipset named clipSet . +GetClipTemplateEndTime() + +Parameters + +clipTemplateEndTime (float) – +clipSet (str) – + +SetClipTemplateEndTime(clipTemplateEndTime) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateEndTime (float) – + +SetClipTemplateStartTime(clipTemplateStartTime, clipSet) → bool +Set the template start time for the clip set named clipSet . +GetClipTemplateStartTime + +Parameters + +clipTemplateStartTime (float) – +clipSet (str) – + +SetClipTemplateStartTime(clipTemplateStartTime) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateStartTime (float) – + +SetClipTemplateStride(clipTemplateStride, clipSet) → bool +Set the template stride for the clip set named clipSet . +GetClipTemplateStride() + +Parameters + +clipTemplateStride (float) – +clipSet (str) – + +SetClipTemplateStride(clipTemplateStride) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTemplateStride (float) – + +SetClipTimes(clipTimes, clipSet) → bool +Set the clip times metadata for this prim. +GetClipTimes() + +Parameters + +clipTimes (Vec2dArray) – +clipSet (str) – + +SetClipTimes(clipTimes) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. +UsdClipsAPISetNames + +Parameters +clipTimes (Vec2dArray) – + +SetClips(clips) → bool +Set the clips dictionary for this prim. +GetClips + +Parameters +clips (VtDictionary) – + +SetInterpolateMissingClipValues(interpolate, clipSet) → bool +Set whether missing clip values are interpolated from surrounding +clips. + +Parameters + +interpolate (bool) – +clipSet (str) – + +SetInterpolateMissingClipValues(interpolate) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This function operates on the default clip set. + +Parameters +interpolate (bool) – + +class pxr.Usd.CollectionAPI +This is a general purpose API schema, used to describe a collection of +heterogeneous objects within the scene.”Objects”here may be prims or +properties belonging to prims or other collections. It’s an add-on +schema that can be applied many times to a prim with different +collection names. +A collection allows an enumeration of a set of paths to include and a +set of paths to exclude. Whether the descendants of an included path +are members of a collection are decided by its expansion rule (see +below). If the collection excludes paths that are not descendents of +included paths, the collection implicitly includes the root path. +If such a collection also includes paths that are not descendants of +the excluded paths, it is considered invalid, since the intention is +ambiguous. +All the properties authored by the schema are namespaced +under”collection:”. The given name of the collection provides +additional namespacing for the various per-collection properties, +which include the following: + +uniform token collection: *collectionName* :expansionRule - +specified how the paths that are included in the collection must be +expanded to determine its members. Possible values include: +explicitOnly - only paths in the includes rel targets and not +in the excludes rel targets belong to the collection. +expandPrims - all the prims at or below the includes rel- +targets (and not under the excludes rel-targets) belong to the +collection. Any property paths included in the collection would, of +course, also be honored. This is the default behavior as it satisfies +most use cases. +expandPrimsAndProperties - like expandPrims, but also +includes all properties on all matched prims. We’re still not quite +sure what the use cases are for this, but you can use it to capture a +whole lot of UsdObjects very concisely. +bool collection: *collectionName* :includeRoot - boolean +attribute indicating whether the pseudo-root pathshould be counted +as one of the included target paths. The fallback is false. This +separate attribute is required because relationships cannot directly +target the root. +rel collection: *collectionName* :includes - specifies a list +of targets that are included in the collection. This can target prims +or properties directly. A collection can insert the rules of another +collection by making its includes relationship target the +collection:{collectionName} property on the owning prim of the +collection to be included. Such a property may not (and typically does +not) exist on the UsdStage, but it is the path that is used to refer +to the collection. It is important to note that including another +collection does not guarantee the contents of that collection will be +in the final collection; instead, the rules are merged. This means, +for example, an exclude entry may exclude a portion of the included +collection. When a collection includes one or more collections, the +order in which targets are added to the includes relationship may +become significant, if there are conflicting opinions about the same +path. Targets that are added later are considered to be stronger than +earlier targets for the same path. +rel collection: *collectionName* :excludes - specifies a list +of targets that are excluded below the included paths in this +collection. This can target prims or properties directly, but cannot +target another collection. This is to keep the membership +determining logic simple, efficient and easier to reason about. +Finally, it is invalid for a collection to exclude paths that are not +included in it. The presence of such”orphaned”excluded paths will not +affect the set of paths included in the collection, but may affect the +performance of querying membership of a path in the collection (see +UsdCollectionAPI::MembershipQuery::IsPathIncluded) or of enumerating +the objects belonging to the collection (see +UsdCollectionAPI::GetIncludedObjects). + +Implicit inclusion +In some scenarios it is useful to express a collection that includes +everything except certain paths. To support this, a collection that +has an exclude that is not a descendent of any include will include +the root path. +Creating collections in C++ + +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdTokens. So to set an attribute to the value”rightHanded”, use +UsdTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim, name) -> CollectionAPI + +BlockCollection() +Blocks the targets of the includes and excludes relationships of the collection, making it<* empty if"includeRoot"is false (or unset) or. + +CanApply +classmethod CanApply(prim, name, whyNot) -> bool + +CanContainPropertyName +classmethod CanContainPropertyName(name) -> bool + +ComputeIncludedObjects +classmethod ComputeIncludedObjects(query, stage, pred) -> set[Object] + +ComputeIncludedPaths +classmethod ComputeIncludedPaths(query, stage, pred) -> SdfPathSet + +ComputeMembershipQuery() +Computes and returns a UsdCollectionMembershipQuery object which can be used to query inclusion or exclusion of paths in the collection. + +CreateExcludesRel() +See GetExcludesRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExpansionRuleAttr(defaultValue, ...) +See GetExpansionRuleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateIncludeRootAttr(defaultValue, ...) +See GetIncludeRootAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateIncludesRel() +See GetIncludesRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +ExcludePath(pathToExclude) +Excludes or removes the given path, pathToExclude from the collection. + +Get +classmethod Get(stage, path) -> CollectionAPI + +GetAll +classmethod GetAll(prim) -> list[CollectionAPI] + +GetAllCollections +classmethod GetAllCollections(prim) -> list[CollectionAPI] + +GetCollection +classmethod GetCollection(stage, collectionPath) -> CollectionAPI + +GetCollectionPath() +Returns the canonical path that represents this collection. + +GetExcludesRel() +Specifies a list of targets that are excluded below the included paths in this collection. + +GetExpansionRuleAttr() +Specifies how the paths that are included in the collection must be expanded to determine its members. + +GetIncludeRootAttr() +Boolean attribute indicating whether the pseudo-root pathshould be counted as one of the included target paths. + +GetIncludesRel() +Specifies a list of targets that are included in the collection. + +GetName() +Returns the name of this multiple-apply schema instance. + +GetNamedCollectionPath +classmethod GetNamedCollectionPath(prim, collectionName) -> Path + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +HasNoIncludedPaths() +Returns true if the collection has nothing included in it. + +IncludePath(pathToInclude) +Includes or adds the given path, pathToInclude in the collection. + +IsCollectionAPIPath +classmethod IsCollectionAPIPath(path, name) -> bool + +IsSchemaPropertyBaseName +classmethod IsSchemaPropertyBaseName(baseName) -> bool + +ResetCollection() +Resets the collection by clearing both the includes and excludes targets of the collection in the current UsdEditTarget. + +Validate(reason) +Validates the collection by checking the following rules: + +static Apply() +classmethod Apply(prim, name) -> CollectionAPI +Applies this multiple-apply API schema to the given prim along +with the given instance name, name . +This information is stored by adding”CollectionAPI:name”to the +token-valued, listOp metadata apiSchemas on the prim. For example, +if name is’instance1’, the token’CollectionAPI:instance1’is added +to’apiSchemas’. +A valid UsdCollectionAPI object is returned upon success. An invalid +(or empty) UsdCollectionAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +name (str) – + +BlockCollection() → bool +Blocks the targets of the includes and excludes relationships of the +collection, making it<* empty if”includeRoot”is false (or unset) +or. + +include everything if”includeRoot”is true. (assuming there are +no opinions in stronger edit targets). + +static CanApply() +classmethod CanApply(prim, name, whyNot) -> bool +Returns true if this multiple-apply API schema can be applied, +with the given instance name, name , to the given prim . +If this schema can not be a applied the prim, this returns false and, +if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +name (str) – +whyNot (str) – + +static CanContainPropertyName() +classmethod CanContainPropertyName(name) -> bool +Test whether a given name contains the”collection:”prefix. + +Parameters +name (str) – + +static ComputeIncludedObjects() +classmethod ComputeIncludedObjects(query, stage, pred) -> set[Object] +Returns all the usd objects that satisfy the predicate, pred in +the collection represented by the UsdCollectionMembershipQuery object, +query . +The results depends on the load state of the UsdStage, stage . + +Parameters + +query (UsdCollectionMembershipQuery) – +stage (UsdStageWeak) – +pred (_PrimFlagsPredicate) – + +static ComputeIncludedPaths() +classmethod ComputeIncludedPaths(query, stage, pred) -> SdfPathSet +Returns all the paths that satisfy the predicate, pred in the +collection represented by the UsdCollectionMembershipQuery object, +query . +The result depends on the load state of the UsdStage, stage . + +Parameters + +query (UsdCollectionMembershipQuery) – +stage (UsdStageWeak) – +pred (_PrimFlagsPredicate) – + +ComputeMembershipQuery() → UsdCollectionMembershipQuery +Computes and returns a UsdCollectionMembershipQuery object which can +be used to query inclusion or exclusion of paths in the collection. + +ComputeMembershipQuery(query) -> None +Populates the UsdCollectionMembershipQuery object with data from this +collection, so it can be used to query inclusion or exclusion of +paths. + +Parameters +query (UsdCollectionMembershipQuery) – + +CreateExcludesRel() → Relationship +See GetExcludesRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreateExpansionRuleAttr(defaultValue, writeSparsely) → Attribute +See GetExpansionRuleAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateIncludeRootAttr(defaultValue, writeSparsely) → Attribute +See GetIncludeRootAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateIncludesRel() → Relationship +See GetIncludesRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +ExcludePath(pathToExclude) → bool +Excludes or removes the given path, pathToExclude from the +collection. +If the collection is empty, the collection becomes one that includes +all paths except the givne path. Otherwise, this does nothing if the +path is not included in the collection. +This does not modify the expansion-rule of the collection. Hence, if +the expansionRule is expandPrims or expandPrimsAndProperties, then +the descendants of pathToExclude will also be excluded from the +collection, unless explicitly included. +UsdCollectionAPI::IncludePath() + +Parameters +pathToExclude (Path) – + +static Get() +classmethod Get(stage, path) -> CollectionAPI +Return a UsdCollectionAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +path must be of the format.collection:name. +This is shorthand for the following: +TfToken name = SdfPath::StripNamespace(path.GetToken()); +UsdCollectionAPI( + stage->GetPrimAtPath(path.GetPrimPath()), name); + +Parameters + +stage (Stage) – +path (Path) – + +Get(prim, name) -> CollectionAPI +Return a UsdCollectionAPI with name name holding the prim prim +. +Shorthand for UsdCollectionAPI(prim, name); + +Parameters + +prim (Prim) – +name (str) – + +static GetAll() +classmethod GetAll(prim) -> list[CollectionAPI] +Return a vector of all named instances of UsdCollectionAPI on the +given prim . + +Parameters +prim (Prim) – + +static GetAllCollections() +classmethod GetAllCollections(prim) -> list[CollectionAPI] +Returns all the named collections on the given USD prim. +Deprecated +Use GetAll(prim) instead. + +Parameters +prim (Prim) – + +static GetCollection() +classmethod GetCollection(stage, collectionPath) -> CollectionAPI +Returns the collection represented by the given collection path, +collectionPath on the given USD stage. + +Parameters + +stage (Stage) – +collectionPath (Path) – + +GetCollection(prim, name) -> CollectionAPI +Returns the schema object representing a collection named name on +the given prim . + +Parameters + +prim (Prim) – +name (str) – + +GetCollectionPath() → Path +Returns the canonical path that represents this collection. +This points to a property named”collection:{collectionName}”on the +prim defining the collection (which won’t really exist as a property +on the UsdStage, but will be used to refer to the collection). This is +the path to be used to”include”this collection in another collection. + +GetExcludesRel() → Relationship +Specifies a list of targets that are excluded below the included paths +in this collection. +This can target prims or properties directly, but cannot target +another collection. This is to keep the membership determining logic +simple, efficient and easier to reason about. Finally, it is invalid +for a collection to exclude paths that are not included in it. The +presence of such”orphaned”excluded paths will not affect the set of +paths included in the collection, but may affect the performance of +querying membership of a path in the collection (see +UsdCollectionAPI::MembershipQuery::IsPathIncluded) or of enumerating +the objects belonging to the collection (see +UsdCollectionAPI::GetIncludedObjects). + +GetExpansionRuleAttr() → Attribute +Specifies how the paths that are included in the collection must be +expanded to determine its members. +Declaration +uniform token expansionRule ="expandPrims" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +explicitOnly, expandPrims, expandPrimsAndProperties + +GetIncludeRootAttr() → Attribute +Boolean attribute indicating whether the pseudo-root pathshould be +counted as one of the included target paths. +The fallback is false. This separate attribute is required because +relationships cannot directly target the root. +Declaration +uniform bool includeRoot +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetIncludesRel() → Relationship +Specifies a list of targets that are included in the collection. +This can target prims or properties directly. A collection can insert +the rules of another collection by making its includes relationship +target the collection:{collectionName} property on the owning prim +of the collection to be included + +GetName() → str +Returns the name of this multiple-apply schema instance. + +static GetNamedCollectionPath() +classmethod GetNamedCollectionPath(prim, collectionName) -> Path +Returns the canonical path to the collection named, name on the +given prim, prim . +GetCollectionPath() + +Parameters + +prim (Prim) – +collectionName (str) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSchemaAttributeNames(includeInherited, instanceName) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes for a given instance name. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. The names returned will have the +proper namespace prefix. + +Parameters + +includeInherited (bool) – +instanceName (str) – + +HasNoIncludedPaths() → bool +Returns true if the collection has nothing included in it. +This requires both that the includes relationship have no target +paths, and that the includeRoot attribute be false. Note that there +may be cases where the collection has no objects included in it even +when HasNoIncludedPaths() returns false. For example, if the included +objects are unloaded or if the included objects are also excluded. + +IncludePath(pathToInclude) → bool +Includes or adds the given path, pathToInclude in the collection. +This does nothing if the path is already included in the collection. +This does not modify the expansion-rule of the collection. Hence, if +the expansionRule is expandPrims or expandPrimsAndProperties, then +the descendants of pathToInclude will be also included in the +collection unless explicitly excluded. +UsdCollectionAPI::ExcludePath() + +Parameters +pathToInclude (Path) – + +static IsCollectionAPIPath() +classmethod IsCollectionAPIPath(path, name) -> bool +Checks if the given path path is of an API schema of type +CollectionAPI. +If so, it stores the instance name of the schema in name and +returns true. Otherwise, it returns false. + +Parameters + +path (Path) – +name (str) – + +static IsSchemaPropertyBaseName() +classmethod IsSchemaPropertyBaseName(baseName) -> bool +Checks if the given name baseName is the base name of a property +of CollectionAPI. + +Parameters +baseName (str) – + +ResetCollection() → bool +Resets the collection by clearing both the includes and excludes +targets of the collection in the current UsdEditTarget. +This does not modify the”includeRoot”attribute which is used to +include or exclude everything (i.e. the pseudoRoot) in the USD stage. + +Validate(reason) → bool +Validates the collection by checking the following rules: + +a collection’s expansionRule should be one +of”explicitOnly”,”expandPrims”or”expandPrimsAndProperties”. +a collection should not have have a circular dependency on +another collection. +a collection should not have both includes and excludes among its +top-level rules + +Parameters +reason (str) – + +class pxr.Usd.CompositionArc +Methods: + +GetArcType + +GetIntroducingLayer + +GetIntroducingListEditor + +GetIntroducingNode + +GetIntroducingPrimPath + +GetTargetLayer + +GetTargetNode + +GetTargetPrimPath + +HasSpecs + +IsAncestral + +IsImplicit + +IsIntroducedInRootLayerPrimSpec + +IsIntroducedInRootLayerStack + +MakeResolveTargetStrongerThan + +MakeResolveTargetUpTo + +GetArcType() + +GetIntroducingLayer() + +GetIntroducingListEditor() + +GetIntroducingNode() + +GetIntroducingPrimPath() + +GetTargetLayer() + +GetTargetNode() + +GetTargetPrimPath() + +HasSpecs() + +IsAncestral() + +IsImplicit() + +IsIntroducedInRootLayerPrimSpec() + +IsIntroducedInRootLayerStack() + +MakeResolveTargetStrongerThan() + +MakeResolveTargetUpTo() + +class pxr.Usd.CrateInfo +A class for introspecting the underlying qualities of +.usdc’crate’files, for diagnostic purposes. +Classes: + +Section + +SummaryStats + +Methods: + +GetFileVersion() +Return the file version. + +GetSections() +Return the named file sections, their location and sizes in the file. + +GetSoftwareVersion() +Return the software version. + +GetSummaryStats() +Return summary statistics structure for this file. + +Open +classmethod Open(fileName) -> CrateInfo + +class Section +Attributes: + +name + +size + +start + +property name + +property size + +property start + +class SummaryStats +Attributes: + +numSpecs + +numUniqueFieldSets + +numUniqueFields + +numUniquePaths + +numUniqueStrings + +numUniqueTokens + +property numSpecs + +property numUniqueFieldSets + +property numUniqueFields + +property numUniquePaths + +property numUniqueStrings + +property numUniqueTokens + +GetFileVersion() → str +Return the file version. + +GetSections() → list[Section] +Return the named file sections, their location and sizes in the file. + +GetSoftwareVersion() → str +Return the software version. + +GetSummaryStats() → SummaryStats +Return summary statistics structure for this file. + +static Open() +classmethod Open(fileName) -> CrateInfo +Attempt to open and read fileName . + +Parameters +fileName (str) – + +class pxr.Usd.EditContext +A utility class to temporarily modify a stage’s current EditTarget +during an execution scope. +This is an”RAII”-like object meant to be used as an automatic local +variable. Upon construction, it sets a given stage’s EditTarget, and +upon destruction it restores the stage’s EditTarget to what it was +previously. +Example usage, temporarily overriding a stage’s EditTarget to direct +an edit to the stage’s session layer. When the ctx object expires, +it restores the stage’s EditTarget to whatever it was previously. +void SetVisState(const UsdPrim & prim, bool vis) { + UsdEditContext ctx(prim.GetStage(), + prim.GetStage()->GetSessionLayer()); + prim.GetAttribute("visible").Set(vis); +} + +Threading Note +When one thread is mutating a UsdStage, it is unsafe for any other +thread to either query or mutate it. Using this class with a stage in +such a way that it modifies the stage’s EditTarget constitutes a +mutation. + +class pxr.Usd.EditTarget +Defines a mapping from scene graph paths to Sdf spec paths in a +SdfLayer where edits should be directed, or up to where to perform +partial composition. +A UsdEditTarget can represent an arbitrary point in a composition +graph for the purposes of placing edits and resolving values. This +enables editing and resolving across references, classes, variants, +and payloads. +In the simplest case, an EditTarget represents a single layer in a +stage’s local LayerStack. In this case, the mapping that transforms +scene graph paths to spec paths in the layer is the identity function. +That is, the UsdAttribute path’/World/Foo.avar’would map to the +SdfPropertySpec path’/World/Foo.avar’. +For a more complex example, suppose’/World/Foo’in’Shot.usda’is a +reference to’/Model’in’Model.usda’. One can construct a UsdEditTarget +that maps scene graph paths from the’Shot.usda’stage across the +reference to the appropriate paths in the’Model.usda’layer. For +example, the UsdAttribute ‘/World/Foo.avar’would map to the +SdfPropertySpec ‘/Model.avar’. Paths in the stage composed +at’Shot.usda’that weren’t prefixed by’/World/Foo’would not have a +valid mapping to’Model.usda’. +EditTargets may also work for any other kind of arc or series of arcs. +This allows for editing across variants, classes, and payloads, or in +a variant on the far side of a reference, for example. +In addition to mapping scene paths to spec paths for editing, +EditTargets may also be used to identify points in the composition +graph for partial composition. Though it doesn’t currently exist, a +UsdCompose API that takes UsdEditTarget arguments may someday be +provided. +For convenience and deployment ease, SdfLayerHandles will implicitly +convert to UsdEditTargets. A UsdEditTarget constructed in this way +means direct opinions in a layer in a stage’s local LayerStack. +Methods: + +ComposeOver(weaker) +Return a new EditTarget composed over weaker. + +ForLocalDirectVariant +classmethod ForLocalDirectVariant(layer, varSelPath) -> EditTarget + +GetLayer() +Return the layer this EditTarget contains. + +GetMapFunction() +Returns the PcpMapFunction representing the map from source specs (including any variant selections) to the stage. + +GetPrimSpecForScenePath(scenePath) +Convenience function for getting the PrimSpec in the edit target's layer for scenePath. + +GetPropertySpecForScenePath(scenePath) + +param scenePath + +GetSpecForScenePath(scenePath) + +param scenePath + +IsNull() +Return true if this EditTarget is null. + +IsValid() +Return true if this EditTarget is valid, false otherwise. + +MapToSpecPath(scenePath) +Map the provided scenePath into a SdfSpec path for the EditTarget's layer, according to the EditTarget's mapping. + +ComposeOver(weaker) → EditTarget +Return a new EditTarget composed over weaker. +This is typically used to make an EditTarget”explicit”. For example, +an edit target with a layer but with no mapping and no LayerStack +identifier indicates a layer in the local LayerStack of a composed +scene. However, an EditTarget with the same layer but an explicit +identity mapping and the LayerStack identifier of the composed scene +may be desired. This can be obtained by composing a partial (e.g. +layer only) EditTarget over an explicit EditTarget with layer, mapping +and layer stack identifier. + +Parameters +weaker (EditTarget) – + +static ForLocalDirectVariant() +classmethod ForLocalDirectVariant(layer, varSelPath) -> EditTarget +Convenience constructor for editing a direct variant in a local +LayerStack. +The varSelPath must be a prim variant selection path (see +SdfPath::IsPrimVariantSelectionPath() ). + +Parameters + +layer (Layer) – +varSelPath (Path) – + +GetLayer() → Layer +Return the layer this EditTarget contains. + +GetLayer() -> Layer + +GetMapFunction() → MapFunction +Returns the PcpMapFunction representing the map from source specs +(including any variant selections) to the stage. + +GetPrimSpecForScenePath(scenePath) → PrimSpec +Convenience function for getting the PrimSpec in the edit target’s +layer for scenePath. +This is equivalent to +target.GetLayer()->GetPrimAtPath(target.MapToSpecPath(scenePath)) if +target has a valid layer. If this target IsNull or there is no valid +mapping from scenePath to a SdfPrimSpec path in the layer, return +null. + +Parameters +scenePath (Path) – + +GetPropertySpecForScenePath(scenePath) → PropertySpec + +Parameters +scenePath (Path) – + +GetSpecForScenePath(scenePath) → Spec + +Parameters +scenePath (Path) – + +IsNull() → bool +Return true if this EditTarget is null. +Null EditTargets map paths unchanged, and have no layer or LayerStack +identifier. + +IsValid() → bool +Return true if this EditTarget is valid, false otherwise. +Edit targets are considered valid when they have a layer. + +MapToSpecPath(scenePath) → Path +Map the provided scenePath into a SdfSpec path for the EditTarget’s +layer, according to the EditTarget’s mapping. +Null edit targets and EditTargets for which IsLocalLayer are true +return scenePath unchanged. + +Parameters +scenePath (Path) – + +class pxr.Usd.Inherits +A proxy class for applying listOp edits to the inherit paths list for +a prim. +All paths passed to the UsdInherits API are expected to be in the +namespace of the owning prim’s stage. Subroot prim inherit paths will +be translated from this namespace to the namespace of the current edit +target, if necessary. If a path cannot be translated, a coding error +will be issued and no changes will be made. Root prim inherit paths +will not be translated. +Methods: + +AddInherit(primPath, position) +Adds a path to the inheritPaths listOp at the current EditTarget, in the position specified by position . + +ClearInherits() +Removes the authored inheritPaths listOp edits at the current edit target. + +GetAllDirectInherits() +Return all the paths in this prim's stage's local layer stack that would compose into this prim via direct inherits (excluding prim specs that would be composed into this prim due to inherits authored on ancestral prims) in strong-to-weak order. + +GetPrim() +Return the prim this object is bound to. + +RemoveInherit(primPath) +Removes the specified path from the inheritPaths listOp at the current EditTarget. + +SetInherits(items) +Explicitly set the inherited paths, potentially blocking weaker opinions that add or remove items, returning true on success, false if the edit could not be performed. + +AddInherit(primPath, position) → bool +Adds a path to the inheritPaths listOp at the current EditTarget, in +the position specified by position . + +Parameters + +primPath (Path) – +position (ListPosition) – + +ClearInherits() → bool +Removes the authored inheritPaths listOp edits at the current edit +target. + +GetAllDirectInherits() → list[SdfPath] +Return all the paths in this prim’s stage’s local layer stack that +would compose into this prim via direct inherits (excluding prim specs +that would be composed into this prim due to inherits authored on +ancestral prims) in strong-to-weak order. +Note that there currently may not be any scene description at these +paths on the stage. This returns all the potential places that such +opinions could appear. + +GetPrim() → Prim +Return the prim this object is bound to. + +GetPrim() -> Prim + +RemoveInherit(primPath) → bool +Removes the specified path from the inheritPaths listOp at the current +EditTarget. + +Parameters +primPath (Path) – + +SetInherits(items) → bool +Explicitly set the inherited paths, potentially blocking weaker +opinions that add or remove items, returning true on success, false if +the edit could not be performed. + +Parameters +items (list[SdfPath]) – + +class pxr.Usd.InterpolationType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.InterpolationTypeHeld, Usd.InterpolationTypeLinear) + +class pxr.Usd.ListPosition +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.ListPositionFrontOfPrependList, Usd.ListPositionBackOfPrependList, Usd.ListPositionFrontOfAppendList, Usd.ListPositionBackOfAppendList) + +class pxr.Usd.LoadPolicy +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.LoadWithDescendants, Usd.LoadWithoutDescendants) + +class pxr.Usd.ModelAPI +UsdModelAPI is an API schema that provides an interface to a prim’s +model qualities, if it does, in fact, represent the root prim of a +model. +The first and foremost model quality is its kind, i.e. the metadata +that establishes it as a model (See KindRegistry). UsdModelAPI +provides various methods for setting and querying the prim’s kind, as +well as queries (also available on UsdPrim) for asking what category +of model the prim is. See Kind and Model-ness. +UsdModelAPI also provides access to a prim’s assetInfo data. While any +prim can host assetInfo, it is common that published (referenced) +assets are packaged as models, therefore it is convenient to provide +access to the one from the other. +Classes: + +KindValidation +Option for validating queries to a prim's kind metadata. + +Methods: + +Get +classmethod Get(stage, path) -> ModelAPI + +GetAssetIdentifier(identifier) +Returns the model's asset identifier as authored in the composed assetInfo dictionary. + +GetAssetInfo(info) +Returns the model's composed assetInfo dictionary. + +GetAssetName(assetName) +Returns the model's asset name from the composed assetInfo dictionary. + +GetAssetVersion(version) +Returns the model's resolved asset version. + +GetKind(kind) +Retrieve the authored kind for this prim. + +GetPayloadAssetDependencies(assetDeps) +Returns the list of asset dependencies referenced inside the payload of the model. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +IsGroup() +Return true if this prim represents a model group, based on its kind metadata. + +IsKind(baseKind, validation) +Return true if the prim's kind metadata is or inherits from baseKind as defined by the Kind Registry. + +IsModel() +Return true if this prim represents a model, based on its kind metadata. + +SetAssetIdentifier(identifier) +Sets the model's asset identifier to the given asset path, identifier . + +SetAssetInfo(info) +Sets the model's assetInfo dictionary to info in the current edit target. + +SetAssetName(assetName) +Sets the model's asset name to assetName . + +SetAssetVersion(version) +Sets the model's asset version string. + +SetKind(kind) +Author a kind for this prim, at the current UsdEditTarget. + +SetPayloadAssetDependencies(assetDeps) +Sets the list of external asset dependencies referenced inside the payload of a model. + +Attributes: + +KindValidationModelHierarchy + +KindValidationNone + +class KindValidation +Option for validating queries to a prim’s kind metadata. +IsKind() +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.ModelAPI.KindValidationNone, Usd.ModelAPI.KindValidationModelHierarchy) + +static Get() +classmethod Get(stage, path) -> ModelAPI +Return a UsdModelAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdModelAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAssetIdentifier(identifier) → bool +Returns the model’s asset identifier as authored in the composed +assetInfo dictionary. +The asset identifier can be used to resolve the model’s root layer via +the asset resolver plugin. + +Parameters +identifier (AssetPath) – + +GetAssetInfo(info) → bool +Returns the model’s composed assetInfo dictionary. +The asset info dictionary is used to annotate models with various data +related to asset management. For example, asset name, identifier, +version etc. +The elements of this dictionary are composed element-wise, and are +nestable. + +Parameters +info (VtDictionary) – + +GetAssetName(assetName) → bool +Returns the model’s asset name from the composed assetInfo dictionary. +The asset name is the name of the asset, as would be used in a +database query. + +Parameters +assetName (str) – + +GetAssetVersion(version) → bool +Returns the model’s resolved asset version. +If you publish assets with an embedded version, then you may receive +that version string. You may, however, cause your authoring tools to +record the resolved version at the time at which a reference to the +asset was added to an aggregate, at the referencing site. In such a +pipeline, this API will always return that stronger opinion, even if +the asset is republished with a newer version, and even though that +newer version may be the one that is resolved when the UsdStage is +opened. + +Parameters +version (str) – + +GetKind(kind) → bool +Retrieve the authored kind for this prim. +To test whether the returned kind matches a particular +known”clientKind”: +TfToken kind; + +bool isClientKind = UsdModelAPI(prim).GetKind(&kind) and + KindRegistry::IsA(kind, clientKind); + +true if there was an authored kind that was successfully read, +otherwise false. +The Kind module for further details on how to use Kind for +classification, and how to extend the taxonomy. + +Parameters +kind (str) – + +GetPayloadAssetDependencies(assetDeps) → bool +Returns the list of asset dependencies referenced inside the payload +of the model. +This typically contains identifiers of external assets that are +referenced inside the model’s payload. When the model is created, this +list is compiled and set at the root of the model. This enables +efficient dependency analysis without the need to include the model’s +payload. + +Parameters +assetDeps (VtArray[AssetPath]) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +IsGroup() → bool +Return true if this prim represents a model group, based on its kind +metadata. + +IsKind(baseKind, validation) → bool +Return true if the prim’s kind metadata is or inherits from +baseKind as defined by the Kind Registry. +If validation is KindValidationModelHierarchy (the default), then +this also ensures that if baseKind is a model, the prim conforms to +the rules of model hierarchy, as defined by IsModel. If set to +KindValidationNone, no additional validation is done. +IsModel and IsGroup are preferrable to IsKind(“model”) as they are +optimized for fast traversal. +If a prim’s model hierarchy is not valid, it is possible that that +prim.IsModel() and prim.IsKind(“model”, +Usd.ModelAPI.KindValidationNone) return different answers. (As a +corallary, this is also true for for prim.IsGroup()) + +Parameters + +baseKind (str) – +validation (KindValidation) – + +IsModel() → bool +Return true if this prim represents a model, based on its kind +metadata. + +SetAssetIdentifier(identifier) → None +Sets the model’s asset identifier to the given asset path, +identifier . +GetAssetIdentifier() + +Parameters +identifier (AssetPath) – + +SetAssetInfo(info) → None +Sets the model’s assetInfo dictionary to info in the current edit +target. + +Parameters +info (VtDictionary) – + +SetAssetName(assetName) → None +Sets the model’s asset name to assetName . +GetAssetName() + +Parameters +assetName (str) – + +SetAssetVersion(version) → None +Sets the model’s asset version string. +GetAssetVersion() + +Parameters +version (str) – + +SetKind(kind) → bool +Author a kind for this prim, at the current UsdEditTarget. +true if kind was successully authored, otherwise false. + +Parameters +kind (str) – + +SetPayloadAssetDependencies(assetDeps) → None +Sets the list of external asset dependencies referenced inside the +payload of a model. +GetPayloadAssetDependencies() + +Parameters +assetDeps (VtArray[AssetPath]) – + +KindValidationModelHierarchy = Usd.ModelAPI.KindValidationModelHierarchy + +KindValidationNone = Usd.ModelAPI.KindValidationNone + +class pxr.Usd.Notice +Container class for Usd notices +Classes: + +LayerMutingChanged + +ObjectsChanged + +StageContentsChanged + +StageEditTargetChanged + +StageNotice + +class LayerMutingChanged +Methods: + +GetMutedLayers + +GetUnmutedLayers + +GetMutedLayers() + +GetUnmutedLayers() + +class ObjectsChanged +Methods: + +AffectedObject + +ChangedInfoOnly + +GetChangedFields + +GetChangedInfoOnlyPaths + +GetFastUpdates + +GetResyncedPaths + +HasChangedFields + +ResyncedObject + +AffectedObject() + +ChangedInfoOnly() + +GetChangedFields() + +GetChangedInfoOnlyPaths() + +GetFastUpdates() + +GetResyncedPaths() + +HasChangedFields() + +ResyncedObject() + +class StageContentsChanged + +class StageEditTargetChanged + +class StageNotice +Methods: + +GetStage + +GetStage() + +class pxr.Usd.Object +Base class for Usd scenegraph objects, providing common API. +The commonality between the three types of scenegraph objects in Usd ( +UsdPrim, UsdAttribute, UsdRelationship) is that they can all have +metadata. Other objects in the API ( UsdReferences, UsdVariantSets, +etc.) simply are kinds of metadata. +UsdObject ‘s API primarily provides schema for interacting with the +metadata common to all the scenegraph objects, as well as generic +access to metadata. +section Usd_UsdObject_Lifetime Lifetime Management and Object Validity +Every derived class of UsdObject supports explicit detection of object +validity through an explicit-bool operator, so client code should +always be able use objects safely, even across edits to the owning +UsdStage. UsdObject classes also perform some level of validity +checking upon every use, in order to facilitate debugging of unsafe +code, although we reserve the right to activate that behavior only in +debug builds, if it becomes compelling to do so for performance +reasons. This per-use checking will cause a fatal error upon failing +the inline validity check, with an error message describing the +namespace location of the dereferenced object on its owning UsdStage. +Methods: + +ClearAssetInfo() +Clear the authored opinion for this object's assetInfo dictionary at the current EditTarget. + +ClearAssetInfoByKey(keyPath) +Clear the authored opinion identified by keyPath in this object's assetInfo dictionary at the current EditTarget. + +ClearCustomData() +Clear the authored opinion for this object's customData dictionary at the current EditTarget. + +ClearCustomDataByKey(keyPath) +Clear the authored opinion identified by keyPath in this object's customData dictionary at the current EditTarget. + +ClearDocumentation() +Clears this object's documentation (metadata) in the current EditTarget (only). + +ClearHidden() +Clears the opinion for"Hidden"at the current EditTarget. + +ClearMetadata(key) +Clears the authored key's value at the current EditTarget, returning false on error. + +ClearMetadataByDictKey(key, keyPath) +Clear any authored value identified by key and keyPath at the current EditTarget. + +GetAllAuthoredMetadata() +Resolve and return all user-authored metadata on this object, sorted lexicographically. + +GetAllMetadata() +Resolve and return all metadata (including both authored and fallback values) on this object, sorted lexicographically. + +GetAssetInfo() +Return this object's composed assetInfo dictionary. + +GetAssetInfoByKey(keyPath) +Return the element identified by keyPath in this object's composed assetInfo dictionary. + +GetCustomData() +Return this object's composed customData dictionary. + +GetCustomDataByKey(keyPath) +Return the element identified by keyPath in this object's composed customData dictionary. + +GetDescription() +Return a string that provides a brief summary description of the object. + +GetDocumentation() +Return this object's documentation (metadata). + +GetMetadata(key, value) +Resolve the requested metadatum named key into value , returning true on success. + +GetMetadataByDictKey(key, keyPath, value) +Resolve the requested dictionary sub-element keyPath of dictionary-valued metadatum named key into value , returning true on success. + +GetName() +Return the full name of this object, i.e. + +GetNamespaceDelimiter +classmethod GetNamespaceDelimiter() -> char + +GetPath() +Return the complete scene path to this object on its UsdStage, which may (UsdPrim) or may not (all other subclasses) return a cached result. + +GetPrim() +Return this object if it is a prim, otherwise return this object's nearest owning prim. + +GetPrimPath() +Return this object's path if this object is a prim, otherwise this object's nearest owning prim's path. + +GetStage() +Return the stage that owns the object, and to whose state and lifetime this object's validity is tied. + +HasAssetInfo() +Return true if there are any authored or fallback opinions for this object's assetInfo dictionary, false otherwise. + +HasAssetInfoKey(keyPath) +Return true if there are any authored or fallback opinions for the element identified by keyPath in this object's assetInfo dictionary, false otherwise. + +HasAuthoredAssetInfo() +Return true if there are any authored opinions (excluding fallback) for this object's assetInfo dictionary, false otherwise. + +HasAuthoredAssetInfoKey(keyPath) +Return true if there are any authored opinions (excluding fallback) for the element identified by keyPath in this object's assetInfo dictionary, false otherwise. + +HasAuthoredCustomData() +Return true if there are any authored opinions (excluding fallback) for this object's customData dictionary, false otherwise. + +HasAuthoredCustomDataKey(keyPath) +Return true if there are any authored opinions (excluding fallback) for the element identified by keyPath in this object's customData dictionary, false otherwise. + +HasAuthoredDocumentation() +Returns true if documentation was explicitly authored and GetMetadata() will return a meaningful value for documentation. + +HasAuthoredHidden() +Returns true if hidden was explicitly authored and GetMetadata() will return a meaningful value for Hidden. + +HasAuthoredMetadata(key) +Returns true if the key has an authored value, false if no value was authored or the only value available is a prim's metadata fallback. + +HasAuthoredMetadataDictKey(key, keyPath) +Return true if there exists any authored opinion (excluding fallbacks) for key and keyPath . + +HasCustomData() +Return true if there are any authored or fallback opinions for this object's customData dictionary, false otherwise. + +HasCustomDataKey(keyPath) +Return true if there are any authored or fallback opinions for the element identified by keyPath in this object's customData dictionary, false otherwise. + +HasMetadata(key) +Returns true if the key has a meaningful value, that is, if GetMetadata() will provide a value, either because it was authored or because a prim's metadata fallback will be provided. + +HasMetadataDictKey(key, keyPath) +Return true if there exists any authored or fallback opinion for key and keyPath . + +IsHidden() +Gets the value of the'hidden'metadata field, false if not authored. + +IsValid() +Return true if this is a valid object, false otherwise. + +SetAssetInfo(customData) +Author this object's assetInfo dictionary to assetInfo at the current EditTarget. + +SetAssetInfoByKey(keyPath, value) +Author the element identified by keyPath in this object's assetInfo dictionary at the current EditTarget. + +SetCustomData(customData) +Author this object's customData dictionary to customData at the current EditTarget. + +SetCustomDataByKey(keyPath, value) +Author the element identified by keyPath in this object's customData dictionary at the current EditTarget. + +SetDocumentation(doc) +Sets this object's documentation (metadata). + +SetHidden(hidden) +Sets the value of the'hidden'metadata field. + +SetMetadata(key, value) +Set metadatum key's value to value . + +SetMetadataByDictKey(key, keyPath, value) +Author value to the field identified by key and keyPath at the current EditTarget. + +ClearAssetInfo() → None +Clear the authored opinion for this object’s assetInfo dictionary at +the current EditTarget. +Do nothing if there is no such authored opinion. + +ClearAssetInfoByKey(keyPath) → None +Clear the authored opinion identified by keyPath in this object’s +assetInfo dictionary at the current EditTarget. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. Do nothing if there is no such authored opinion. + +Parameters +keyPath (str) – + +ClearCustomData() → None +Clear the authored opinion for this object’s customData dictionary at +the current EditTarget. +Do nothing if there is no such authored opinion. + +ClearCustomDataByKey(keyPath) → None +Clear the authored opinion identified by keyPath in this object’s +customData dictionary at the current EditTarget. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. Do nothing if there is no such authored opinion. + +Parameters +keyPath (str) – + +ClearDocumentation() → bool +Clears this object’s documentation (metadata) in the current +EditTarget (only). +Returns true on success. + +ClearHidden() → bool +Clears the opinion for”Hidden”at the current EditTarget. + +ClearMetadata(key) → bool +Clears the authored key’s value at the current EditTarget, returning +false on error. +If no value is present, this method is a no-op and returns true. It is +considered an error to call ClearMetadata when no spec is present for +this UsdObject, i.e. if the object has no presence in the current +UsdEditTarget. +General Metadata in USD + +Parameters +key (str) – + +ClearMetadataByDictKey(key, keyPath) → bool +Clear any authored value identified by key and keyPath at the +current EditTarget. +The keyPath is a’:’-separated path identifying a path in +subdictionaries stored in the metadata field at key . Return true +if the value is cleared successfully, false otherwise. +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – + +GetAllAuthoredMetadata() → UsdMetadataValueMap +Resolve and return all user-authored metadata on this object, sorted +lexicographically. +This method does not return field keys for composition arcs, such as +references, inherits, payloads, sublayers, variants, or primChildren, +nor does it return the default value or timeSamples. + +GetAllMetadata() → UsdMetadataValueMap +Resolve and return all metadata (including both authored and fallback +values) on this object, sorted lexicographically. +This method does not return field keys for composition arcs, such as +references, inherits, payloads, sublayers, variants, or primChildren, +nor does it return the default value or timeSamples. + +GetAssetInfo() → VtDictionary +Return this object’s composed assetInfo dictionary. +The asset info dictionary is used to annotate objects representing the +root-prims of assets (generally organized as models) with various data +related to asset management. For example, asset name, root layer +identifier, asset version etc. +The elements of this dictionary are composed element-wise, and are +nestable. +There is no means to query an assetInfo field’s valuetype other than +fetching the value and interrogating it. +GetAssetInfoByKey() + +GetAssetInfoByKey(keyPath) → VtValue +Return the element identified by keyPath in this object’s composed +assetInfo dictionary. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. This is in general more efficient than composing the +entire assetInfo dictionary than pulling out one sub-element. + +Parameters +keyPath (str) – + +GetCustomData() → VtDictionary +Return this object’s composed customData dictionary. +CustomData is”custom metadata”, a place for applications and users to +put uniform data that is entirely dynamic and subject to no schema +known to Usd. Unlike metadata like’hidden’,’displayName’etc, which +must be declared in code or a data file that is considered part of +one’s Usd distribution (e.g. a plugInfo.json file) to be used, +customData keys and the datatypes of their corresponding values are ad +hoc. No validation will ever be performed that values for the same key +in different layers are of the same type - strongest simply wins. +Dictionaries like customData are composed element-wise, and are +nestable. +There is no means to query a customData field’s valuetype other than +fetching the value and interrogating it. +GetCustomDataByKey() + +GetCustomDataByKey(keyPath) → VtValue +Return the element identified by keyPath in this object’s composed +customData dictionary. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. This is in general more efficient than composing the +entire customData dictionary and then pulling out one sub-element. + +Parameters +keyPath (str) – + +GetDescription() → str +Return a string that provides a brief summary description of the +object. +This method, along with IsValid() /bool_operator, is always safe to +call on a possibly-expired object, and the description will specify +whether the object is valid or expired, along with a few other bits of +data. + +GetDocumentation() → str +Return this object’s documentation (metadata). +This returns the empty string if no documentation has been set. +SetDocumentation() + +GetMetadata(key, value) → bool +Resolve the requested metadatum named key into value , +returning true on success. +false if key was not resolvable, or if value's type T +differed from that of the resolved metadatum. +For any composition-related metadata, as enumerated in +GetAllMetadata() , this method will return only the strongest opinion +found, not applying the composition rules used by Pcp to process the +data. For more processed/composed views of composition data, please +refer to the specific interface classes, such as UsdReferences, +UsdInherits, UsdVariantSets, etc. +General Metadata in USD + +Parameters + +key (str) – +value (T) – + +GetMetadata(key, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Type-erased access. + +Parameters + +key (str) – +value (VtValue) – + +GetMetadataByDictKey(key, keyPath, value) → bool +Resolve the requested dictionary sub-element keyPath of +dictionary-valued metadatum named key into value , returning +true on success. +If you know you neeed just a small number of elements from a +dictionary, accessing them element-wise using this method can be much +less expensive than fetching the entire dictionary with +GetMetadata(key). +false if key was not resolvable, or if value's type T +differed from that of the resolved metadatum. The keyPath is +a’:’-separated path addressing an element in subdictionaries. +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – +value (T) – + +GetMetadataByDictKey(key, keyPath, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +key (str) – +keyPath (str) – +value (VtValue) – + +GetName() → str +Return the full name of this object, i.e. +the last component of its SdfPath in namespace. +This is equivalent to, but generally cheaper than, GetPath() +.GetNameToken() + +static GetNamespaceDelimiter() +classmethod GetNamespaceDelimiter() -> char + +GetPath() → Path +Return the complete scene path to this object on its UsdStage, which +may (UsdPrim) or may not (all other subclasses) return a cached +result. + +GetPrim() → Prim +Return this object if it is a prim, otherwise return this object’s +nearest owning prim. + +GetPrimPath() → Path +Return this object’s path if this object is a prim, otherwise this +object’s nearest owning prim’s path. +Equivalent to GetPrim() . GetPath() . + +GetStage() → UsdStageWeak +Return the stage that owns the object, and to whose state and lifetime +this object’s validity is tied. + +HasAssetInfo() → bool +Return true if there are any authored or fallback opinions for this +object’s assetInfo dictionary, false otherwise. + +HasAssetInfoKey(keyPath) → bool +Return true if there are any authored or fallback opinions for the +element identified by keyPath in this object’s assetInfo +dictionary, false otherwise. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. + +Parameters +keyPath (str) – + +HasAuthoredAssetInfo() → bool +Return true if there are any authored opinions (excluding fallback) +for this object’s assetInfo dictionary, false otherwise. + +HasAuthoredAssetInfoKey(keyPath) → bool +Return true if there are any authored opinions (excluding fallback) +for the element identified by keyPath in this object’s assetInfo +dictionary, false otherwise. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. + +Parameters +keyPath (str) – + +HasAuthoredCustomData() → bool +Return true if there are any authored opinions (excluding fallback) +for this object’s customData dictionary, false otherwise. + +HasAuthoredCustomDataKey(keyPath) → bool +Return true if there are any authored opinions (excluding fallback) +for the element identified by keyPath in this object’s customData +dictionary, false otherwise. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. + +Parameters +keyPath (str) – + +HasAuthoredDocumentation() → bool +Returns true if documentation was explicitly authored and +GetMetadata() will return a meaningful value for documentation. + +HasAuthoredHidden() → bool +Returns true if hidden was explicitly authored and GetMetadata() will +return a meaningful value for Hidden. +Note that IsHidden returns a fallback value (false) when hidden is not +authored. + +HasAuthoredMetadata(key) → bool +Returns true if the key has an authored value, false if no value was +authored or the only value available is a prim’s metadata fallback. + +Parameters +key (str) – + +HasAuthoredMetadataDictKey(key, keyPath) → bool +Return true if there exists any authored opinion (excluding fallbacks) +for key and keyPath . +The keyPath is a’:’-separated path identifying a value in +subdictionaries stored in the metadata field at key . +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – + +HasCustomData() → bool +Return true if there are any authored or fallback opinions for this +object’s customData dictionary, false otherwise. + +HasCustomDataKey(keyPath) → bool +Return true if there are any authored or fallback opinions for the +element identified by keyPath in this object’s customData +dictionary, false otherwise. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. + +Parameters +keyPath (str) – + +HasMetadata(key) → bool +Returns true if the key has a meaningful value, that is, if +GetMetadata() will provide a value, either because it was authored or +because a prim’s metadata fallback will be provided. + +Parameters +key (str) – + +HasMetadataDictKey(key, keyPath) → bool +Return true if there exists any authored or fallback opinion for +key and keyPath . +The keyPath is a’:’-separated path identifying a value in +subdictionaries stored in the metadata field at key . +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – + +IsHidden() → bool +Gets the value of the’hidden’metadata field, false if not authored. +When an object is marked as hidden, it is an indicator to clients who +generically display objects (such as GUI widgets) that this object +should not be included, unless explicitly asked for. Although this is +just a hint and thus up to each application to interpret, we use it +primarily as a way of simplifying hierarchy displays, by hiding only +the representation of the object itself, not its subtree, +instead”pulling up”everything below it one level in the hierarchical +nesting. +Note again that this is a hint for UI only - it should not be +interpreted by any renderer as making a prim invisible to drawing. + +IsValid() → bool +Return true if this is a valid object, false otherwise. + +SetAssetInfo(customData) → None +Author this object’s assetInfo dictionary to assetInfo at the +current EditTarget. + +Parameters +customData (VtDictionary) – + +SetAssetInfoByKey(keyPath, value) → None +Author the element identified by keyPath in this object’s +assetInfo dictionary at the current EditTarget. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. + +Parameters + +keyPath (str) – +value (VtValue) – + +SetCustomData(customData) → None +Author this object’s customData dictionary to customData at the +current EditTarget. + +Parameters +customData (VtDictionary) – + +SetCustomDataByKey(keyPath, value) → None +Author the element identified by keyPath in this object’s +customData dictionary at the current EditTarget. +The keyPath is a’:’-separated path identifying a value in +subdictionaries. + +Parameters + +keyPath (str) – +value (VtValue) – + +SetDocumentation(doc) → bool +Sets this object’s documentation (metadata). Returns true on success. + +Parameters +doc (str) – + +SetHidden(hidden) → bool +Sets the value of the’hidden’metadata field. +See IsHidden() for details. + +Parameters +hidden (bool) – + +SetMetadata(key, value) → bool +Set metadatum key's value to value . +false if value's type does not match the schema type for key . +General Metadata in USD + +Parameters + +key (str) – +value (T) – + +SetMetadata(key, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +key (str) – +value (VtValue) – + +SetMetadataByDictKey(key, keyPath, value) → bool +Author value to the field identified by key and keyPath at +the current EditTarget. +The keyPath is a’:’-separated path identifying a value in +subdictionaries stored in the metadata field at key . Return true +if the value is authored successfully, false otherwise. +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – +value (T) – + +SetMetadataByDictKey(key, keyPath, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +key (str) – +keyPath (str) – +value (VtValue) – + +class pxr.Usd.Payloads +UsdPayloads provides an interface to authoring and introspecting +payloads. Payloads behave the same as Usd references except that +payloads can be optionally loaded. +Methods: + +AddInternalPayload(primPath, layerOffset, ...) +Add an internal payload to the specified prim. + +AddPayload(payload, position) +Adds a payload to the payload listOp at the current EditTarget, in the position specified by position . + +ClearPayloads() +Removes the authored payload listOp edits at the current EditTarget. + +GetPrim() +Return the prim this object is bound to. + +RemovePayload(ref) +Removes the specified payload from the payloads listOp at the current EditTarget. + +SetPayloads(items) +Explicitly set the payloads, potentially blocking weaker opinions that add or remove items. + +AddInternalPayload(primPath, layerOffset, position) → bool +Add an internal payload to the specified prim. +Internal Payloads + +Parameters + +primPath (Path) – +layerOffset (LayerOffset) – +position (ListPosition) – + +AddPayload(payload, position) → bool +Adds a payload to the payload listOp at the current EditTarget, in the +position specified by position . +Why adding references may fail for explanation of expectations on +payload and what return values and errors to expect, and ListOps +and List Editing for details on list editing and composition of +listOps. + +Parameters + +payload (Payload) – +position (ListPosition) – + +AddPayload(identifier, primPath, layerOffset, position) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +primPath (Path) – +layerOffset (LayerOffset) – +position (ListPosition) – + +AddPayload(identifier, layerOffset, position) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Payloads Without Prim Paths + +Parameters + +identifier (str) – +layerOffset (LayerOffset) – +position (ListPosition) – + +ClearPayloads() → bool +Removes the authored payload listOp edits at the current EditTarget. +The same caveats for Remove() apply to Clear(). In fact, Clear() may +actually increase the number of composed payloads, if the listOp being +cleared contained the”remove”operator. +ListOps and List Editing + +GetPrim() → Prim +Return the prim this object is bound to. + +GetPrim() -> Prim +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +RemovePayload(ref) → bool +Removes the specified payload from the payloads listOp at the current +EditTarget. +This does not necessarily eliminate the payload completely, as it may +be added or set in another layer in the same LayerStack as the current +EditTarget. +ListOps and List Editing + +Parameters +ref (Payload) – + +SetPayloads(items) → bool +Explicitly set the payloads, potentially blocking weaker opinions that +add or remove items. +Why adding payloads may fail for explanation of expectations on +items and what return values and errors to expect, and ListOps and +List Editing for details on list editing and composition of listOps. + +Parameters +items (list[SdfPayload]) – + +class pxr.Usd.Prim +UsdPrim is the sole persistent scenegraph object on a UsdStage, and is +the embodiment of a”Prim”as described in the Universal Scene +Description Composition Compendium +A UsdPrim is the principal container of other types of scene +description. It provides API for accessing and creating all of the +contained kinds of scene description, which include: + +UsdVariantSets - all VariantSets on the prim ( GetVariantSets() , +GetVariantSet() ) +UsdReferences - all references on the prim ( GetReferences() ) +UsdInherits - all inherits on the prim ( GetInherits() ) +UsdSpecializes - all specializes on the prim ( GetSpecializes() ) +As well as access to the API objects for properties contained within +the prim - UsdPrim as well as all of the following classes are +subclasses of UsdObject : +UsdProperty - generic access to all attributes and relationships. +A UsdProperty can be queried and cast to a UsdAttribute or +UsdRelationship using UsdObject::Is<>() and UsdObject::As<>() . ( +GetPropertyNames() , GetProperties() , GetPropertiesInNamespace() , +GetPropertyOrder() , SetPropertyOrder() ) +UsdAttribute - access to default and timesampled attribute +values, as well as value resolution information, and attribute- +specific metadata ( CreateAttribute() , GetAttribute() , +GetAttributes() , HasAttribute() ) +UsdRelationship - access to authoring and resolving relationships +to other prims and properties ( CreateRelationship() , +GetRelationship() , GetRelationships() , HasRelationship() ) +UsdPrim also provides access to iteration through its prim children, +optionally making use of the prim predicates facility ( GetChildren() +, GetAllChildren() , GetFilteredChildren() ). + +## Management + +Clients acquire UsdPrim objects, which act like weak/guarded pointers +to persistent objects owned and managed by their originating UsdStage. +We provide the following guarantees for a UsdPrim acquired via +UsdStage::GetPrimAtPath() or UsdStage::OverridePrim() or +UsdStage::DefinePrim() : + +As long as no further mutations to the structure of the UsdStage +are made, the UsdPrim will still be valid. Loading and Unloading are +considered structural mutations. +When the UsdStage ‘s structure is mutated, the thread +performing the mutation will receive a UsdNotice::ObjectsChanged +notice after the stage has been reconfigured, which provides details +as to what prims may have been created or destroyed, and what prims +may simply have changed in some structural way. +Prim access in”reader”threads should be limited to GetPrimAtPath() , +which will never cause a mutation to the Stage or its layers. + +Please refer to UsdNotice for a listing of the events that could cause +UsdNotice::ObjectsChanged to be emitted. +Methods: + +AddAppliedSchema(appliedSchemaName) +Adds the applied API schema name token appliedSchemaName to the apiSchemas metadata for this prim at the current edit target. + +ApplyAPI() +Applies a single-apply API schema with the given C++ type'SchemaType'to this prim in the current edit target. + +CanApplyAPI(whyNot) +}@ + +ClearActive() +Remove the authored'active'opinion at the current EditTarget. + +ClearChildrenReorder() +Remove the opinion for the metadata used to reorder children of this prim at the current EditTarget. + +ClearInstanceable() +Remove the authored'instanceable'opinion at the current EditTarget. + +ClearPayload() +Deprecated + +ClearPropertyOrder() +Remove the opinion for propertyOrder metadata on this prim at the current EditTarget. + +ClearTypeName() +Clear the opinion for this Prim's typeName at the current edit target. + +ComputeExpandedPrimIndex() +Compute the prim index containing all sites that could contribute opinions to this prim. + +CreateAttribute(name, typeName, custom, ...) +Author scene description for the attribute named attrName at the current EditTarget if none already exists. + +CreateRelationship(relName, custom) +Author scene description for the relationship named relName at the current EditTarget if none already exists. + +FindAllAttributeConnectionPaths(pred, ...) +Search the prim subtree rooted at this prim for attributes for which predicate returns true, collect their connection source paths and return them in an arbitrary order. + +FindAllRelationshipTargetPaths(pred, ...) +Search the prim subtree rooted at this prim for relationships for which predicate returns true, collect their target paths and return them in an arbitrary order. + +GetAllChildren() +Return all this prim's children as an iterable range. + +GetAllChildrenNames() +Return the names of the child prims in the order they appear when iterating over GetAllChildren. + +GetAppliedSchemas() +Return a vector containing the names of API schemas which have been applied to this prim. + +GetAttribute(attrName) +Return a UsdAttribute with the name attrName. + +GetAttributeAtPath(path) +Returns the attribute at path on the same stage as this prim. + +GetAttributes() +Like GetProperties() , but exclude all relationships from the result. + +GetAuthoredAttributes() +Like GetAttributes() , but exclude attributes without authored scene description from the result. + +GetAuthoredProperties(predicate) +Return this prim's properties (attributes and relationships) that have authored scene description, ordered by name according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan. + +GetAuthoredPropertiesInNamespace(namespaces) +Like GetPropertiesInNamespace() , but exclude properties that do not have authored scene description from the result. + +GetAuthoredPropertyNames(predicate) +Return this prim's property names (attributes and relationships) that have authored scene description, ordered according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan. + +GetAuthoredRelationships() +Like GetRelationships() , but exclude relationships without authored scene description from the result. + +GetChild(name) +Return this prim's direct child named name if it has one, otherwise return an invalid UsdPrim. + +GetChildren() +Return this prim's active, loaded, defined, non-abstract children as an iterable range. + +GetChildrenNames() +Return the names of the child prims in the order they appear when iterating over GetChildren. + +GetChildrenReorder() +Return the strongest opinion for the metadata used to reorder children of this prim. + +GetFilteredChildren(predicate) +Return a subset of all of this prim's children filtered by predicate as an iterable range. + +GetFilteredChildrenNames(predicate) +Return the names of the child prims in the order they appear when iterating over GetFilteredChildren( predicate ). + +GetFilteredNextSibling(predicate) +Return this prim's next sibling that matches predicate if it has one, otherwise return the invalid UsdPrim. + +GetInherits() +Return a UsdInherits object that allows one to add, remove, or mutate inherits at the currently set UsdEditTarget. + +GetInstances() +If this prim is a prototype prim, returns all prims that are instances of this prototype. + +GetNextSibling() +Return this prim's next active, loaded, defined, non-abstract sibling if it has one, otherwise return an invalid UsdPrim. + +GetObjectAtPath(path) +Returns the object at path on the same stage as this prim. + +GetParent() +Return this prim's parent prim. + +GetPayloads() +Return a UsdPayloads object that allows one to add, remove, or mutate payloads at the currently set UsdEditTarget. + +GetPrimAtPath(path) +Returns the prim at path on the same stage as this prim. + +GetPrimDefinition() +Return this prim's definition based on the prim's type if the type is a registered prim type. + +GetPrimInPrototype() +If this prim is an instance proxy, return the UsdPrim for the corresponding prim in the instance's prototype. + +GetPrimIndex() +Return the cached prim index containing all sites that can contribute opinions to this prim. + +GetPrimStack() +Return all the authored SdfPrimSpecs that may contain opinions for this prim in order from strong to weak. + +GetPrimStackWithLayerOffsets() +Return all the authored SdfPrimSpecs that may contain opinions for this prim in order from strong to weak paired with the cumulative layer offset from the stage's root layer to the layer containing the prim spec. + +GetPrimTypeInfo() +Return the prim's full type info composed from its type name, applied API schemas, and any fallback types defined on the stage for unrecognized prim type names. + +GetProperties(predicate) +Return all of this prim's properties (attributes and relationships), including all builtin properties, ordered by name according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan. + +GetPropertiesInNamespace(namespaces) +Return this prim's properties that are inside the given property namespace ordered according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan. + +GetProperty(propName) +Return a UsdProperty with the name propName. + +GetPropertyAtPath(path) +Returns the property at path on the same stage as this prim. + +GetPropertyNames(predicate) +Return all of this prim's property names (attributes and relationships), including all builtin properties. + +GetPropertyOrder() +Return the strongest propertyOrder metadata value authored on this prim. + +GetPrototype() +If this prim is an instance, return the UsdPrim for the corresponding prototype. + +GetReferences() +Return a UsdReferences object that allows one to add, remove, or mutate references at the currently set UsdEditTarget. + +GetRelationship(relName) +Return a UsdRelationship with the name relName. + +GetRelationshipAtPath(path) +Returns the relationship at path on the same stage as this prim. + +GetRelationships() +Like GetProperties() , but exclude all attributes from the result. + +GetSpecializes() +Return a UsdSpecializes object that allows one to add, remove, or mutate specializes at the currently set UsdEditTarget. + +GetSpecifier() +Return this prim's composed specifier. + +GetTypeName() +Return this prim's composed type name. + +GetVariantSet(variantSetName) +Retrieve a specifically named VariantSet for editing or constructing a UsdEditTarget. + +GetVariantSets() +Return a UsdVariantSets object representing all the VariantSets present on this prim. + +HasAPI() +Using HasAPI in C++ + +HasAttribute(attrName) +Return true if this prim has an attribute named attrName , false otherwise. + +HasAuthoredActive() +Return true if this prim has an authored opinion for'active', false otherwise. + +HasAuthoredInherits() +Return true if this prim has any authored inherits. + +HasAuthoredInstanceable() +Return true if this prim has an authored opinion for'instanceable', false otherwise. + +HasAuthoredPayloads() +Return true if this prim has any authored payloads. + +HasAuthoredReferences() +Return true if this prim has any authored references. + +HasAuthoredSpecializes() +Returns true if this prim has any authored specializes. + +HasAuthoredTypeName() +Return true if a typeName has been authored. + +HasDefiningSpecifier() +Return true if this prim has a specifier of type SdfSpecifierDef or SdfSpecifierClass. + +HasPayload() +Deprecated + +HasProperty(propName) +Return true if this prim has an property named propName , false otherwise. + +HasRelationship(relName) +Return true if this prim has a relationship named relName , false otherwise. + +HasVariantSets() +Return true if this prim has any authored VariantSets. + +IsA() +Return true if the prim's schema type, is or inherits schema type T. + +IsAbstract() +Return true if this prim or any of its ancestors is a class. + +IsActive() +Return true if this prim is active, meaning neither it nor any of its ancestors have active=false. + +IsDefined() +Return true if this prim and all its ancestors have defining specifiers, false otherwise. + +IsGroup() +Return true if this prim is a model group based on its kind metadata, false otherwise. + +IsInPrototype() +Return true if this prim is a prototype prim or a descendant of a prototype prim, false otherwise. + +IsInstance() +Return true if this prim is an instance of a prototype, false otherwise. + +IsInstanceProxy() +Return true if this prim is an instance proxy, false otherwise. + +IsInstanceable() +Return true if this prim has been marked as instanceable. + +IsLoaded() +Return true if this prim is active, and either it is loadable and it is loaded, or its nearest loadable ancestor is loaded, or it has no loadable ancestor; false otherwise. + +IsModel() +Return true if this prim is a model based on its kind metadata, false otherwise. + +IsPathInPrototype +classmethod IsPathInPrototype(path) -> bool + +IsPrototype() +Return true if this prim is an instancing prototype prim, false otherwise. + +IsPrototypePath +classmethod IsPrototypePath(path) -> bool + +IsPseudoRoot() +Returns true if the prim is the pseudo root. + +Load(policy) +Load this prim, all its ancestors, and by default all its descendants. + +MakeResolveTargetStrongerThanEditTarget(...) +Creates and returns a resolve target that, when passed to a UsdAttributeQuery for one of this prim's attributes, causes value resolution to only consider specs that are stronger than the spec that would be authored for this prim when using the given editTarget . + +MakeResolveTargetUpToEditTarget(editTarget) +Creates and returns a resolve target that, when passed to a UsdAttributeQuery for one of this prim's attributes, causes value resolution to only consider weaker specs up to and including the spec that would be authored for this prim when using the given editTarget . + +RemoveAPI() +Removes a single-apply API schema with the given C++ type'SchemaType'from this prim in the current edit target. + +RemoveAppliedSchema(appliedSchemaName) +Removes the applied API schema name token appliedSchemaName from the apiSchemas metadata for this prim at the current edit target. + +RemoveProperty(propName) +Remove all scene description for the property with the given propName in the current UsdEditTarget. + +SetActive(active) +Author'active'metadata for this prim at the current EditTarget. + +SetChildrenReorder(order) +Author an opinion for the metadata used to reorder children of this prim at the current EditTarget. + +SetInstanceable(instanceable) +Author'instanceable'metadata for this prim at the current EditTarget. + +SetPayload(payload) +Deprecated + +SetPropertyOrder(order) +Author an opinion for propertyOrder metadata on this prim at the current EditTarget. + +SetSpecifier(specifier) +Author an opinion for this Prim's specifier at the current edit target. + +SetTypeName(typeName) +Author this Prim's typeName at the current EditTarget. + +Unload() +Unloads this prim and all its descendants. + +AddAppliedSchema(appliedSchemaName) → bool +Adds the applied API schema name token appliedSchemaName to the +apiSchemas metadata for this prim at the current edit target. +For multiple-apply schemas the name token should include the instance +name for the applied schema, for example’CollectionAPI:plasticStuff’. +The name will only be added if the list operation at the edit target +does not already have this applied schema in its explicit, prepended, +or appended lists and is always added to the end of either the +prepended or explicit items. +Returns true upon success or if the API schema is already applied in +the current edit target. +An error is issued and false returned for any of the following +conditions: + +this prim is not a valid prim for editing +this prim is valid, but cannot be reached or overridden in the +current edit target +the schema name cannot be added to the apiSchemas listOp metadata +Unlike ApplyAPI this method does not require that the name token +refer to a valid API schema type. ApplyAPI is the preferred method for +applying valid API schemas. + +Parameters +appliedSchemaName (str) – + +ApplyAPI() → bool +Applies a single-apply API schema with the given C++ +type’SchemaType’to this prim in the current edit target. +This information is stored by adding the API schema’s name token to +the token-valued, listOp metadata apiSchemas on this prim. +Returns true upon success or if the API schema is already applied in +the current edit target. +An error is issued and false returned for any of the following +conditions: + +this prim is not a valid prim for editing +this prim is valid, but cannot be reached or overridden in the +current edit target +the schema name cannot be added to the apiSchemas listOp metadata + +ApplyAPI(schemaType) -> bool +Non-templated overload of the templated ApplyAPI above. +This function behaves exactly like the templated ApplyAPI except for +the runtime schemaType validation which happens at compile time in the +templated version. This method is provided for python clients. Use of +the templated ApplyAPI is preferred. + +Parameters +schemaType (Type) – + +ApplyAPI(instanceName) -> bool +Applies a multiple-apply API schema with the given C++ +type’SchemaType’and instance name instanceName to this prim in the +current edit target. +This information is stored in the token-valued, listOp metadata +apiSchemas on this prim. For example, if SchemaType is’ +UsdCollectionAPI ‘and instanceName is’plasticStuff’, the +name’CollectionAPI:plasticStuff’is added to the’apiSchemas’listOp +metadata. +Returns true upon success or if the API schema is already applied with +this instanceName in the current edit target. +An error is issued and false returned for any of the following +conditions: + +instanceName is empty +this prim is not a valid prim for editing +this prim is valid, but cannot be reached or overridden in the +current edit target +the schema name cannot be added to the apiSchemas listOp metadata + +Parameters +instanceName (str) – + +ApplyAPI(schemaType, instanceName) -> bool +Non-templated overload of the templated ApplyAPI above. +This function behaves exactly like the templated ApplyAPI except for +the runtime schemaType validation which happens at compile time in the +templated version. This method is provided for python clients. Use of +the templated ApplyAPI is preferred. + +Parameters + +schemaType (Type) – +instanceName (str) – + +CanApplyAPI(whyNot) → bool +}@ +Returns whether a single-apply API schema with the given C++ +type’SchemaType’can be applied to this prim. If the return value is +false, and whyNot is provided, the reason the schema cannot be +applied is written to whyNot. +Whether the schema can be applied is determined by the schema type +definition which may specify that the API schema can only be applied +to certain prim types. +The return value of this function only indicates whether it would be +valid to apply this schema to the prim. It has no bearing on whether +calling ApplyAPI will be successful or not. + +Parameters +whyNot (str) – + +CanApplyAPI(schemaType, whyNot) -> bool +Non-templated overload of the templated CanApplyAPI above. +This function behaves exactly like the templated CanApplyAPI except +for the runtime schemaType validation which happens at compile time in +the templated version. This method is provided for python clients. Use +of the templated CanApplyAPI is preferred. + +Parameters + +schemaType (Type) – +whyNot (str) – + +CanApplyAPI(instanceName, whyNot) -> bool +Returns whether a multiple-apply API schema with the given C++ +type’SchemaType’can be applied to this prim with the given +instanceName . +If the return value is false, and whyNot is provided, the reason +the schema cannot be applied is written to whyNot. +Whether the schema can be applied is determined by the schema type +definition which may specify that the API schema can only be applied +to certain prim types. It also determines whether the instance name is +a valid instance name for the multiple apply schema. +The return value of this function only indicates whether it would be +valid to apply this schema to the prim. It has no bearing on whether +calling ApplyAPI will be successful or not. + +Parameters + +instanceName (str) – +whyNot (str) – + +CanApplyAPI(schemaType, instanceName, whyNot) -> bool +Non-templated overload of the templated CanApplyAPI above. +This function behaves exactly like the templated CanApplyAPI except +for the runtime schemaType validation which happens at compile time in +the templated version. This method is provided for python clients. Use +of the templated CanApplyAPI is preferred. + +Parameters + +schemaType (Type) – +instanceName (str) – +whyNot (str) – + +ClearActive() → bool +Remove the authored’active’opinion at the current EditTarget. +Do nothing if there is no authored opinion. +See How”active”Affects Prims on a UsdStage for the effects of +activating or deactivating a prim. + +ClearChildrenReorder() → None +Remove the opinion for the metadata used to reorder children of this +prim at the current EditTarget. + +ClearInstanceable() → bool +Remove the authored’instanceable’opinion at the current EditTarget. +Do nothing if there is no authored opinion. + +ClearPayload() → bool +Deprecated +Clears the payload at the current EditTarget for this prim. Return +false if the payload could not be cleared. + +ClearPropertyOrder() → None +Remove the opinion for propertyOrder metadata on this prim at the +current EditTarget. + +ClearTypeName() → bool +Clear the opinion for this Prim’s typeName at the current edit target. + +ComputeExpandedPrimIndex() → PrimIndex +Compute the prim index containing all sites that could contribute +opinions to this prim. +This function is similar to UsdPrim::GetPrimIndex. However, the +returned prim index includes all sites that could possibly contribute +opinions to this prim, not just the sites that currently do so. This +is useful in certain situations; for example, this could be used to +generate a list of sites where clients could make edits to affect this +prim, or for debugging purposes. +This function may be relatively slow, since it will recompute the prim +index on every call. Clients should prefer UsdPrim::GetPrimIndex +unless the additional site information is truly needed. + +CreateAttribute(name, typeName, custom, variability) → Attribute +Author scene description for the attribute named attrName at the +current EditTarget if none already exists. +Return a valid attribute if scene description was successfully +authored or if it already existed, return invalid attribute otherwise. +Note that the supplied typeName and custom arguments are only used +in one specific case. See below for details. +Suggested use: +if (UsdAttribute myAttr = prim.CreateAttribute(\.\.\.)) { + // success. +} + +To call this, GetPrim() must return a valid prim. + +If a spec for this attribute already exists at the current edit +target, do nothing. +If a spec for attrName of a different spec type (e.g. a +relationship) exists at the current EditTarget, issue an error. +If name refers to a builtin attribute according to the prim’s +definition, author an attribute spec with required metadata from the +definition. +If name refers to a builtin relationship, issue an error. +If there exists an absolute strongest authored attribute spec for +attrName, author an attribute spec at the current EditTarget by +copying required metadata from that strongest spec. +If there exists an absolute strongest authored relationship spec +for attrName, issue an error. +Otherwise author an attribute spec at the current EditTarget +using the provided typeName and custom for the required metadata +fields. Note that these supplied arguments are only ever used in this +particular circumstance, in all other cases they are ignored. + +Parameters + +name (str) – +typeName (ValueTypeName) – +custom (bool) – +variability (Variability) – + +CreateAttribute(name, typeName, variability) -> Attribute +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Create a custom attribute with name , typeName and +variability . + +Parameters + +name (str) – +typeName (ValueTypeName) – +variability (Variability) – + +CreateAttribute(nameElts, typeName, custom, variability) -> Attribute +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This overload of CreateAttribute() accepts a vector of name components +used to construct a namespaced property name. +For details, see Names, Namespace Ordering, and Property Namespaces + +Parameters + +nameElts (list[str]) – +typeName (ValueTypeName) – +custom (bool) – +variability (Variability) – + +CreateAttribute(nameElts, typeName, variability) -> Attribute +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Create a custom attribute with nameElts , typeName , and +variability . + +Parameters + +nameElts (list[str]) – +typeName (ValueTypeName) – +variability (Variability) – + +CreateRelationship(relName, custom) → Relationship +Author scene description for the relationship named relName at the +current EditTarget if none already exists. +Return a valid relationship if scene description was successfully +authored or if it already existed, return an invalid relationship +otherwise. +Suggested use: +if (UsdRelationship myRel = prim.CreateRelationship(\.\.\.)) { + // success. +} + +To call this, GetPrim() must return a valid prim. + +If a spec for this relationship already exists at the current +edit target, do nothing. +If a spec for relName of a different spec type (e.g. an +attribute) exists at the current EditTarget, issue an error. +If name refers to a builtin relationship according to the +prim’s definition, author a relationship spec with required metadata +from the definition. +If name refers to a builtin attribute, issue an error. +If there exists an absolute strongest authored relationship spec +for relName, author a relationship spec at the current EditTarget by +copying required metadata from that strongest spec. +If there exists an absolute strongest authored attribute spec for +relName, issue an error. +Otherwise author a uniform relationship spec at the current +EditTarget, honoring custom . + +Parameters + +relName (str) – +custom (bool) – + +CreateRelationship(nameElts, custom) -> Relationship +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This overload of CreateRelationship() accepts a vector of name +components used to construct a namespaced property name. +For details, see Names, Namespace Ordering, and Property Namespaces + +Parameters + +nameElts (list[str]) – +custom (bool) – + +FindAllAttributeConnectionPaths(pred, recurseOnSources) → list[SdfPath] +Search the prim subtree rooted at this prim for attributes for which +predicate returns true, collect their connection source paths and +return them in an arbitrary order. +If recurseOnSources is true, act as if this function was invoked +on the connected prims and owning prims of connected properties also +and return the union. + +Parameters + +pred (function[bool( Attribute )]) – +recurseOnSources (bool) – + +FindAllRelationshipTargetPaths(pred, recurseOnTargets) → list[SdfPath] +Search the prim subtree rooted at this prim for relationships for +which predicate returns true, collect their target paths and +return them in an arbitrary order. +If recurseOnTargets is true, act as if this function was invoked +on the targeted prims and owning prims of targeted properties also +(but not of forwarding relationships) and return the union. + +Parameters + +pred (function[bool( Relationship )]) – +recurseOnTargets (bool) – + +GetAllChildren() → SiblingRange +Return all this prim’s children as an iterable range. + +GetAllChildrenNames() → list[TfToken] +Return the names of the child prims in the order they appear when +iterating over GetAllChildren. + +GetAppliedSchemas() → list[TfToken] +Return a vector containing the names of API schemas which have been +applied to this prim. +This includes both the authored API schemas applied using the Apply() +method on the particular schema class as well as any built-in API +schemas that are automatically included through the prim type’s prim +definition. To get only the authored API schemas use GetPrimTypeInfo +instead. + +GetAttribute(attrName) → Attribute +Return a UsdAttribute with the name attrName. +The attribute returned may or may not actually exist so it must be +checked for validity. Suggested use: +if (UsdAttribute myAttr = prim.GetAttribute("myAttr")) { + // myAttr is safe to use. + // Edits to the owning stage requires subsequent validation. +} else { + // myAttr was not defined/authored +} + +Parameters +attrName (str) – + +GetAttributeAtPath(path) → Attribute +Returns the attribute at path on the same stage as this prim. +If path is relative, it will be anchored to the path of this prim. +There is no guarantee that this method returns an attribute on this +prim. This is only guaranteed if path is a purely relative property +path. +GetAttribute(const TfToken&) const +UsdStage::GetAttributeAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetAttributes() → list[Attribute] +Like GetProperties() , but exclude all relationships from the result. + +GetAuthoredAttributes() → list[Attribute] +Like GetAttributes() , but exclude attributes without authored scene +description from the result. +See UsdProperty::IsAuthored() . + +GetAuthoredProperties(predicate) → list[Property] +Return this prim’s properties (attributes and relationships) that have +authored scene description, ordered by name according to the strongest +propertyOrder statement in scene description if one exists, otherwise +ordered according to TfDictionaryLessThan. +If a valid predicate is passed in, then only authored properties +whose names pass the predicate are included in the result. This is +useful if the client is interested only in a subset of authored +properties on the prim. For example, only the ones in a given +namespace or only the ones needed to compute a value. +GetProperties() +UsdProperty::IsAuthored() + +Parameters +predicate (PropertyPredicateFunc) – + +GetAuthoredPropertiesInNamespace(namespaces) → list[Property] +Like GetPropertiesInNamespace() , but exclude properties that do not +have authored scene description from the result. +See UsdProperty::IsAuthored() . +For details of namespaced properties, see Names, Namespace Ordering, +and Property Namespaces + +Parameters +namespaces (list[str]) – + +GetAuthoredPropertiesInNamespace(namespaces) -> list[Property] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +namespaces must be an already-concatenated ordered set of +namespaces, and may or may not terminate with the namespace-separator +character. +If namespaces is empty, this method is equivalent to +GetAuthoredProperties() . + +Parameters +namespaces (str) – + +GetAuthoredPropertyNames(predicate) → list[TfToken] +Return this prim’s property names (attributes and relationships) that +have authored scene description, ordered according to the strongest +propertyOrder statement in scene description if one exists, otherwise +ordered according to TfDictionaryLessThan. +If a valid predicate is passed in, then only the authored +properties whose names pass the predicate are included in the result. +This is useful if the client is interested only in a subset of +authored properties on the prim. For example, only the ones in a given +namespace or only the ones needed to compute a value. +GetPropertyNames() +UsdProperty::IsAuthored() + +Parameters +predicate (PropertyPredicateFunc) – + +GetAuthoredRelationships() → list[Relationship] +Like GetRelationships() , but exclude relationships without authored +scene description from the result. +See UsdProperty::IsAuthored() . + +GetChild(name) → Prim +Return this prim’s direct child named name if it has one, +otherwise return an invalid UsdPrim. +Equivalent to: +prim.GetStage()->GetPrimAtPath(prim.GetPath().AppendChild(name)) + +Parameters +name (str) – + +GetChildren() → SiblingRange +Return this prim’s active, loaded, defined, non-abstract children as +an iterable range. +Equivalent to: +GetFilteredChildren(UsdPrimDefaultPredicate) + +See Prim predicate flags and UsdPrimDefaultPredicate for more +information. + +GetChildrenNames() → list[TfToken] +Return the names of the child prims in the order they appear when +iterating over GetChildren. + +GetChildrenReorder() → list[TfToken] +Return the strongest opinion for the metadata used to reorder children +of this prim. +Due to how reordering of prim children is composed, this value cannot +be relied on to get the actual order of the prim’s children. Use +GetChidrenNames, GetAllChildrenNames, GetFilteredChildrenNames to get +the true child order if needed. + +GetFilteredChildren(predicate) → SiblingRange +Return a subset of all of this prim’s children filtered by +predicate as an iterable range. +The predicate is generated by combining a series of prim flag +terms with either&&or || and !. +Example usage: +// Get all active model children. +GetFilteredChildren(UsdPrimIsActive && UsdPrimIsModel); + +// Get all model children that pass the default predicate. +GetFilteredChildren(UsdPrimDefaultPredicate && UsdPrimIsModel); + +If this prim is an instance, no children will be returned unless +UsdTraverseInstanceProxies is used to allow instance proxies to be +returned, or if this prim is itself an instance proxy. +See Prim predicate flags and UsdPrimDefaultPredicate for more +information. + +Parameters +predicate (_PrimFlagsPredicate) – + +GetFilteredChildrenNames(predicate) → list[TfToken] +Return the names of the child prims in the order they appear when +iterating over GetFilteredChildren( predicate ). + +Parameters +predicate (_PrimFlagsPredicate) – + +GetFilteredNextSibling(predicate) → Prim +Return this prim’s next sibling that matches predicate if it has +one, otherwise return the invalid UsdPrim. +See Prim predicate flags and UsdPrimDefaultPredicate for more +information. + +Parameters +predicate (_PrimFlagsPredicate) – + +GetInherits() → Inherits +Return a UsdInherits object that allows one to add, remove, or mutate +inherits at the currently set UsdEditTarget. +While the UsdInherits object has no methods for listing the +currently authored inherits on a prim, one can use a +UsdPrimCompositionQuery to query the inherits arcs that are composed +by this prim. +UsdPrimCompositionQuery::GetDirectInherits + +GetInstances() → list[Prim] +If this prim is a prototype prim, returns all prims that are instances +of this prototype. +Otherwise, returns an empty vector. +Note that this function will return prims in prototypes for instances +that are nested beneath other instances. + +GetNextSibling() → Prim +Return this prim’s next active, loaded, defined, non-abstract sibling +if it has one, otherwise return an invalid UsdPrim. +Equivalent to: +GetFilteredNextSibling(UsdPrimDefaultPredicate) + +See Prim predicate flags and UsdPrimDefaultPredicate for more +information. + +GetObjectAtPath(path) → Object +Returns the object at path on the same stage as this prim. +If path is is relative, it will be anchored to the path of this prim. +UsdStage::GetObjectAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetParent() → Prim +Return this prim’s parent prim. +Return an invalid UsdPrim if this is a root prim. + +GetPayloads() → Payloads +Return a UsdPayloads object that allows one to add, remove, or mutate +payloads at the currently set UsdEditTarget. +While the UsdPayloads object has no methods for listing the +currently authored payloads on a prim, one can use a +UsdPrimCompositionQuery to query the payload arcs that are composed by +this prim. + +GetPrimAtPath(path) → Prim +Returns the prim at path on the same stage as this prim. +If path is is relative, it will be anchored to the path of this prim. +UsdStage::GetPrimAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetPrimDefinition() → PrimDefinition +Return this prim’s definition based on the prim’s type if the type is +a registered prim type. +Returns an empty prim definition if it is not. + +GetPrimInPrototype() → Prim +If this prim is an instance proxy, return the UsdPrim for the +corresponding prim in the instance’s prototype. +Otherwise, return an invalid UsdPrim. + +GetPrimIndex() → PrimIndex +Return the cached prim index containing all sites that can contribute +opinions to this prim. +The prim index can be used to examine the composition arcs and scene +description sites that can contribute to this prim’s property and +metadata values. +The prim index returned by this function is optimized and may not +include sites that do not contribute opinions to this prim. Use +UsdPrim::ComputeExpandedPrimIndex to compute a prim index that +includes all possible sites that could contribute opinions. +This prim index will be empty for prototype prims. This ensures that +these prims do not provide any attribute or metadata values. For all +other prims in prototypes, this is the prim index that was chosen to +be shared with all other instances. In either case, the prim index’s +path will not be the same as the prim’s path. +Prim indexes may be invalidated by changes to the UsdStage and cannot +detect if they are expired. Clients should avoid keeping copies of the +prim index across such changes, which include scene description +changes or changes to load state. + +GetPrimStack() → list[SdfPrimSpecHandle] +Return all the authored SdfPrimSpecs that may contain opinions for +this prim in order from strong to weak. +This does not include all the places where contributing prim specs +could potentially be created; rather, it includes only those prim +specs that already exist. To discover all the places that prim specs +could be authored that would contribute opinions, see”Composition +Structure” +Use this method for debugging and diagnostic purposes. It is not +advisable to retain a PrimStack for expedited metadata value +resolution, since not all metadata resolves with +simple”strongestopinion wins”semantics. + +GetPrimStackWithLayerOffsets() → list[tuple[PrimSpec, LayerOffset]] +Return all the authored SdfPrimSpecs that may contain opinions for +this prim in order from strong to weak paired with the cumulative +layer offset from the stage’s root layer to the layer containing the +prim spec. +This behaves exactly the same as UsdPrim::GetPrimStack with the +addition of providing the cumulative layer offset of each spec’s +layer. +Use this method for debugging and diagnostic purposes. It is not +advisable to retain a PrimStack for expedited metadata value +resolution, since not all metadata resolves with +simple”strongestopinion wins”semantics. + +GetPrimTypeInfo() → PrimTypeInfo +Return the prim’s full type info composed from its type name, applied +API schemas, and any fallback types defined on the stage for +unrecognized prim type names. +The returned type structure contains the”true”schema type used to +create this prim’s prim definition and answer the IsA query. This +value is cached and efficient to query. The cached values are +guaranteed to exist for (at least) as long as the prim’s stage is +open. +GetTypeName +GetAppliedSchemas +Fallback Prim Types + +GetProperties(predicate) → list[Property] +Return all of this prim’s properties (attributes and relationships), +including all builtin properties, ordered by name according to the +strongest propertyOrder statement in scene description if one exists, +otherwise ordered according to TfDictionaryLessThan. +If a valid predicate is passed in, then only properties whose +names pass the predicate are included in the result. This is useful +if the client is interested only in a subset of properties on the +prim. For example, only the ones in a given namespace or only the ones +needed to compute a value. +To obtain only either attributes or relationships, use either +GetAttributes() or GetRelationships() . +To determine whether a property is either an attribute or a +relationship, use the UsdObject::As() and UsdObject::Is() methods in +C++: +// Use As<>() to obtain a subclass instance. +if (UsdAttribute attr = property.As()) { + // use attribute 'attr'. +else if (UsdRelationship rel = property.As()) { + // use relationship 'rel'. +} + +// Use Is<>() to discriminate only. +if (property.Is()) { + // property is an attribute. +} + +In Python, use the standard isinstance() function: +if isinstance(property, Usd.Attribute): + # property is a Usd.Attribute. +elif isinstance(property, Usd.Relationship): + # property is a Usd.Relationship. + +GetAuthoredProperties() +UsdProperty::IsAuthored() + +Parameters +predicate (PropertyPredicateFunc) – + +GetPropertiesInNamespace(namespaces) → list[Property] +Return this prim’s properties that are inside the given property +namespace ordered according to the strongest propertyOrder statement +in scene description if one exists, otherwise ordered according to +TfDictionaryLessThan. +A namespaces argument whose elements are [“ri”,”attribute”] will +return all the properties under the namespace”ri:attribute”, +i.e.”ri:attribute:*”. An empty namespaces argument is equivalent +to GetProperties() . +For details of namespaced properties, see Names, Namespace Ordering, +and Property Namespaces + +Parameters +namespaces (list[str]) – + +GetPropertiesInNamespace(namespaces) -> list[Property] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +namespaces must be an already-concatenated ordered set of +namespaces, and may or may not terminate with the namespace-separator +character. +If namespaces is empty, this method is equivalent to +GetProperties() . + +Parameters +namespaces (str) – + +GetProperty(propName) → Property +Return a UsdProperty with the name propName. +The property returned may or may not actually exist so it must be +checked for validity. Suggested use: +if (UsdProperty myProp = prim.GetProperty("myProp")) { + // myProp is safe to use. + // Edits to the owning stage requires subsequent validation. +} else { + // myProp was not defined/authored +} + +Parameters +propName (str) – + +GetPropertyAtPath(path) → Property +Returns the property at path on the same stage as this prim. +If path is relative, it will be anchored to the path of this prim. +There is no guarantee that this method returns a property on this +prim. This is only guaranteed if path is a purely relative property +path. +GetProperty(const TfToken&) const +UsdStage::GetPropertyAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetPropertyNames(predicate) → list[TfToken] +Return all of this prim’s property names (attributes and +relationships), including all builtin properties. +If a valid predicate is passed in, then only properties whose +names pass the predicate are included in the result. This is useful if +the client is interested only in a subset of properties on the prim. +For example, only the ones in a given namespace or only the ones +needed to compute a value. +GetAuthoredPropertyNames() +UsdProperty::IsAuthored() + +Parameters +predicate (PropertyPredicateFunc) – + +GetPropertyOrder() → list[TfToken] +Return the strongest propertyOrder metadata value authored on this +prim. + +GetPrototype() → Prim +If this prim is an instance, return the UsdPrim for the corresponding +prototype. +Otherwise, return an invalid UsdPrim. + +GetReferences() → References +Return a UsdReferences object that allows one to add, remove, or +mutate references at the currently set UsdEditTarget. +While the UsdReferences object has no methods for listing the +currently authored references on a prim, one can use a +UsdPrimCompositionQuery to query the reference arcs that are composed +by this prim. +UsdPrimCompositionQuery::GetDirectReferences + +GetRelationship(relName) → Relationship +Return a UsdRelationship with the name relName. +The relationship returned may or may not actually exist so it must +be checked for validity. Suggested use: +if (UsdRelationship myRel = prim.GetRelationship("myRel")) { + // myRel is safe to use. + // Edits to the owning stage requires subsequent validation. +} else { + // myRel was not defined/authored +} + +Parameters +relName (str) – + +GetRelationshipAtPath(path) → Relationship +Returns the relationship at path on the same stage as this prim. +If path is relative, it will be anchored to the path of this prim. +There is no guarantee that this method returns a relationship on this +prim. This is only guaranteed if path is a purely relative property +path. +GetRelationship(const TfToken&) const +UsdStage::GetRelationshipAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetRelationships() → list[Relationship] +Like GetProperties() , but exclude all attributes from the result. + +GetSpecializes() → Specializes +Return a UsdSpecializes object that allows one to add, remove, or +mutate specializes at the currently set UsdEditTarget. +While the UsdSpecializes object has no methods for listing the +currently authored specializes on a prim, one can use a +UsdPrimCompositionQuery to query the specializes arcs that are +composed by this prim. + +GetSpecifier() → Specifier +Return this prim’s composed specifier. + +GetTypeName() → str +Return this prim’s composed type name. +This value is cached and is efficient to query. Note that this is just +the composed type name as authored and may not represent the full type +of the prim and its prim definition. If you need to reason about the +actual type of the prim, use GetPrimTypeInfo instead as it accounts +for recognized schemas, applied API schemas, fallback types, etc. + +GetVariantSet(variantSetName) → VariantSet +Retrieve a specifically named VariantSet for editing or constructing a +UsdEditTarget. +This is a shortcut for +prim.GetVariantSets().GetVariantSet(variantSetName) + +Parameters +variantSetName (str) – + +GetVariantSets() → VariantSets +Return a UsdVariantSets object representing all the VariantSets +present on this prim. +The returned object also provides the API for adding new VariantSets +to the prim. + +HasAPI() → enable_if[T.schemaKind != SchemaKind.MultipleApplyAPI, bool].type +Using HasAPI in C++ +UsdPrim prim = stage->OverridePrim("/path/to/prim"); +MyDomainBozAPI = MyDomainBozAPI::Apply(prim); +assert(prim.HasAPI()); + +UsdCollectionAPI collAPI = UsdCollectionAPI::Apply(prim, + /\*instanceName\*/ TfToken("geom")) +assert(prim.HasAPI() +assert(prim.HasAPI(/\*instanceName\*/ TfToken("geom"))) + +The python version of this method takes as an argument the TfType of +the API schema class. Similar validation of the schema type is +performed in python at run-time and a coding error is issued if the +given type is not a valid applied API schema. +Using HasAPI in Python + prim = stage.OverridePrim("/path/to/prim") + bozAPI = MyDomain.BozAPI.Apply(prim) + assert prim.HasAPI(MyDomain.BozAPI) + + collAPI = Usd.CollectionAPI.Apply(prim, "geom") + assert(prim.HasAPI(Usd.CollectionAPI)) + assert(prim.HasAPI(Usd.CollectionAPI, instanceName="geom")) + +Return true if the UsdPrim has had a single API schema represented by + +the C++ class type T applied to it through the Apply() method +provided on the API schema class. + +HasAPI(instanceName) -> enable_if[T.schemaKind== SchemaKind.MultipleApplyAPI, bool].type +Return true if the UsdPrim has had a multiple-apply API schema +represented by the C++ class type T applied to it through the +Apply() method provided on the API schema class. +instanceName , if non-empty is used to determine if a particular +instance of a multiple-apply API schema (eg. UsdCollectionAPI) has +been applied to the prim, otherwise this returns true if any instance +of the multiple-apply API has been applied. + +Parameters +instanceName (str) – + +HasAPI(schemaType, instanceName) -> bool +Return true if a prim has an API schema with TfType schemaType . +instanceName , if non-empty is used to determine if a particular +instance of a multiple-apply API schema (eg. UsdCollectionAPI) has +been applied to the prim. A coding error is issued if a non-empty +instanceName is passed in and T represents a single-apply API +schema. +This function behaves exactly like the templated HasAPI functions +except for the runtime schemaType validation which happens at compile +time in the templated versions. This method is provided for python +clients. Use of the templated HasAPI functions are preferred. + +Parameters + +schemaType (Type) – +instanceName (str) – + +HasAttribute(attrName) → bool +Return true if this prim has an attribute named attrName , false +otherwise. + +Parameters +attrName (str) – + +HasAuthoredActive() → bool +Return true if this prim has an authored opinion for’active’, false +otherwise. +See How”active”Affects Prims on a UsdStage for what it means for a +prim to be active. + +HasAuthoredInherits() → bool +Return true if this prim has any authored inherits. + +HasAuthoredInstanceable() → bool +Return true if this prim has an authored opinion for’instanceable’, +false otherwise. + +HasAuthoredPayloads() → bool +Return true if this prim has any authored payloads. + +HasAuthoredReferences() → bool +Return true if this prim has any authored references. + +HasAuthoredSpecializes() → bool +Returns true if this prim has any authored specializes. + +HasAuthoredTypeName() → bool +Return true if a typeName has been authored. + +HasDefiningSpecifier() → bool +Return true if this prim has a specifier of type SdfSpecifierDef or +SdfSpecifierClass. +SdfIsDefiningSpecifier + +HasPayload() → bool +Deprecated +Return true if a payload is present on this prim. +Payloads: Impact of Using and Not Using + +HasProperty(propName) → bool +Return true if this prim has an property named propName , false +otherwise. + +Parameters +propName (str) – + +HasRelationship(relName) → bool +Return true if this prim has a relationship named relName , false +otherwise. + +Parameters +relName (str) – + +HasVariantSets() → bool +Return true if this prim has any authored VariantSets. +this connotes only the existence of one of more VariantSets, not +that such VariantSets necessarily contain any variants or variant +opinions. + +IsA() → bool +Return true if the prim’s schema type, is or inherits schema type T. +GetPrimTypeInfo +UsdPrimTypeInfo::GetSchemaType +Fallback Prim Types + +IsA(schemaType) -> bool +Return true if the prim’s schema type is or inherits schemaType . +GetPrimTypeInfo +UsdPrimTypeInfo::GetSchemaType +Fallback Prim Types + +Parameters +schemaType (Type) – + +IsAbstract() → bool +Return true if this prim or any of its ancestors is a class. + +IsActive() → bool +Return true if this prim is active, meaning neither it nor any of its +ancestors have active=false. +Return false otherwise. +See How”active”Affects Prims on a UsdStage for what it means for a +prim to be active. + +IsDefined() → bool +Return true if this prim and all its ancestors have defining +specifiers, false otherwise. +SdfIsDefiningSpecifier. + +IsGroup() → bool +Return true if this prim is a model group based on its kind metadata, +false otherwise. +If this prim is a group, it is also necessarily a model. + +IsInPrototype() → bool +Return true if this prim is a prototype prim or a descendant of a +prototype prim, false otherwise. +IsPrototype + +IsInstance() → bool +Return true if this prim is an instance of a prototype, false +otherwise. +If this prim is an instance, calling GetPrototype() will return the +UsdPrim for the corresponding prototype prim. + +IsInstanceProxy() → bool +Return true if this prim is an instance proxy, false otherwise. +An instance proxy prim represents a descendent of an instance prim. + +IsInstanceable() → bool +Return true if this prim has been marked as instanceable. +Note that this is not the same as IsInstance() . A prim may return +true for IsInstanceable() and false for IsInstance() if this prim is +not active or if it is marked as instanceable but contains no +instanceable data. + +IsLoaded() → bool +Return true if this prim is active, and either it is loadable and it +is loaded, or its nearest loadable ancestor is loaded, or it has +no loadable ancestor; false otherwise. + +IsModel() → bool +Return true if this prim is a model based on its kind metadata, false +otherwise. + +static IsPathInPrototype() +classmethod IsPathInPrototype(path) -> bool +Return true if the given path identifies a prototype prim or a +prim or property descendant of a prototype prim, false otherwise. +IsPrototypePath + +Parameters +path (Path) – + +IsPrototype() → bool +Return true if this prim is an instancing prototype prim, false +otherwise. +IsInPrototype + +static IsPrototypePath() +classmethod IsPrototypePath(path) -> bool +Return true if the given path identifies a prototype prim, false +otherwise. +This function will return false for prim and property paths that are +descendants of a prototype prim path. +IsPathInPrototype + +Parameters +path (Path) – + +IsPseudoRoot() → bool +Returns true if the prim is the pseudo root. +Equivalent to +prim.GetPath() == SdfPath::AbsoluteRootPath() + +Load(policy) → None +Load this prim, all its ancestors, and by default all its descendants. +If loadPolicy is UsdLoadWithoutDescendants, then load only this +prim and its ancestors. +See UsdStage::Load for additional details. + +Parameters +policy (LoadPolicy) – + +MakeResolveTargetStrongerThanEditTarget(editTarget) → ResolveTarget +Creates and returns a resolve target that, when passed to a +UsdAttributeQuery for one of this prim’s attributes, causes value +resolution to only consider specs that are stronger than the spec that +would be authored for this prim when using the given editTarget . +If the edit target would not affect any specs that could contribute to +this prim, a null resolve target is returned. + +Parameters +editTarget (EditTarget) – + +MakeResolveTargetUpToEditTarget(editTarget) → ResolveTarget +Creates and returns a resolve target that, when passed to a +UsdAttributeQuery for one of this prim’s attributes, causes value +resolution to only consider weaker specs up to and including the spec +that would be authored for this prim when using the given +editTarget . +If the edit target would not affect any specs that could contribute to +this prim, a null resolve target is returned. + +Parameters +editTarget (EditTarget) – + +RemoveAPI() → bool +Removes a single-apply API schema with the given C++ +type’SchemaType’from this prim in the current edit target. +This is done by removing the API schema’s name token from the token- +valued, listOp metadata apiSchemas on this prim as well as authoring +an explicit deletion of schema name from the listOp. +Returns true upon success or if the API schema is already deleted in +the current edit target. +An error is issued and false returned for any of the following +conditions: + +this prim is not a valid prim for editing +this prim is valid, but cannot be reached or overridden in the +current edit target +the schema name cannot be deleted in the apiSchemas listOp +metadata + +RemoveAPI(schemaType) -> bool +Non-templated overload of the templated RemoveAPI above. +This function behaves exactly like the templated RemoveAPI except for +the runtime schemaType validation which happens at compile time in the +templated version. This method is provided for python clients. Use of +the templated RemoveAPI is preferred. + +Parameters +schemaType (Type) – + +RemoveAPI(instanceName) -> bool +Removes a multiple-apply API schema with the given C++ +type’SchemaType’and instance name instanceName from this prim in +the current edit target. +This is done by removing the instanced schema name token from the +token-valued, listOp metadata apiSchemas on this prim as well as +authoring an explicit deletion of the name from the listOp. For +example, if SchemaType is’ UsdCollectionAPI ‘and instanceName +is’plasticStuff’, the name’CollectionAPI:plasticStuff’is deleted from +the’apiSchemas’listOp metadata. +Returns true upon success or if the API schema with this +instanceName is already deleted in the current edit target. +An error is issued and false returned for any of the following +conditions: + +instanceName is empty +this prim is not a valid prim for editing +this prim is valid, but cannot be reached or overridden in the +current edit target +the schema name cannot be deleted in the apiSchemas listOp +metadata + +Parameters +instanceName (str) – + +RemoveAPI(schemaType, instanceName) -> bool +Non-templated overload of the templated RemoveAPI above. +This function behaves exactly like the templated RemoveAPI except for +the runtime schemaType validation which happens at compile time in the +templated version. This method is provided for python clients. Use of +the templated RemoveAPI is preferred. + +Parameters + +schemaType (Type) – +instanceName (str) – + +RemoveAppliedSchema(appliedSchemaName) → bool +Removes the applied API schema name token appliedSchemaName from +the apiSchemas metadata for this prim at the current edit target. +For multiple-apply schemas the name token should include the instance +name for the applied schema, for example’CollectionAPI:plasticStuff’ +For an explicit list operation, this removes the applied schema name +from the explicit items list if it was present. For a non-explicit +list operation, this will remove any occurrence of the applied schema +name from the prepended and appended item as well as adding it to the +deleted items list. +Returns true upon success or if the API schema is already deleted in +the current edit target. +An error is issued and false returned for any of the following +conditions: + +this prim is not a valid prim for editing +this prim is valid, but cannot be reached or overridden in the +current edit target +the schema name cannot be deleted in the apiSchemas listOp +metadata +Unlike RemoveAPI this method does not require that the name token +refer to a valid API schema type. RemoveAPI is the preferred method +for removing valid API schemas. + +Parameters +appliedSchemaName (str) – + +RemoveProperty(propName) → bool +Remove all scene description for the property with the given +propName in the current UsdEditTarget. +Return true if the property is removed, false otherwise. +Because this method can only remove opinions about the property from +the current EditTarget, you may generally find it more useful to use +UsdAttribute::Block() , which will ensure that all values from the +EditTarget and weaker layers for the property will be ignored. + +Parameters +propName (str) – + +SetActive(active) → bool +Author’active’metadata for this prim at the current EditTarget. +See How”active”Affects Prims on a UsdStage for the effects of +activating or deactivating a prim. + +Parameters +active (bool) – + +SetChildrenReorder(order) → None +Author an opinion for the metadata used to reorder children of this +prim at the current EditTarget. + +Parameters +order (list[TfToken]) – + +SetInstanceable(instanceable) → bool +Author’instanceable’metadata for this prim at the current EditTarget. + +Parameters +instanceable (bool) – + +SetPayload(payload) → bool +Deprecated +Author payload metadata for this prim at the current edit target. +Return true on success, false if the value could not be set. +Payloads: Impact of Using and Not Using + +Parameters +payload (Payload) – + +SetPayload(assetPath, primPath) -> bool +Deprecated +Shorthand for SetPayload(SdfPayload(assetPath, primPath)). + +Parameters + +assetPath (str) – +primPath (Path) – + +SetPayload(layer, primPath) -> bool +Deprecated +Shorthand for SetPayload( SdfPayload (layer->GetIdentifier(), +primPath)). + +Parameters + +layer (Layer) – +primPath (Path) – + +SetPropertyOrder(order) → None +Author an opinion for propertyOrder metadata on this prim at the +current EditTarget. + +Parameters +order (list[TfToken]) – + +SetSpecifier(specifier) → bool +Author an opinion for this Prim’s specifier at the current edit +target. + +Parameters +specifier (Specifier) – + +SetTypeName(typeName) → bool +Author this Prim’s typeName at the current EditTarget. + +Parameters +typeName (str) – + +Unload() → None +Unloads this prim and all its descendants. +See UsdStage::Unload for additional details. + +class pxr.Usd.PrimCompositionQuery +Object for making optionally filtered composition queries about a +prim. It creates a list of strength ordering +UsdPrimCompositionQueryArc that can be filtered by a combination of +criteria and returned. + +## Invalidation + +This object does not listen for change notification. If a consumer is +holding on to a UsdPrimCompositionQuery, it is their responsibility to +dispose of it in response to a resync change to the associated prim. +Failing to do so may result in incorrect values or crashes due to +dereferencing invalid objects. +Classes: + +ArcIntroducedFilter +Choices for filtering composition arcs based on where the arc is introduced. + +ArcTypeFilter +Choices for filtering composition arcs based on arc type. + +DependencyTypeFilter +Choices for filtering composition arcs on dependency type. + +Filter + +HasSpecsFilter +Choices for filtering composition arcs on whether the node contributes specs to the prim. + +Methods: + +GetCompositionArcs() +Return a list of composition arcs for this query's prim using the current query filter. + +GetDirectInherits +classmethod GetDirectInherits(prim) -> PrimCompositionQuery + +GetDirectReferences +classmethod GetDirectReferences(prim) -> PrimCompositionQuery + +GetDirectRootLayerArcs +classmethod GetDirectRootLayerArcs(prim) -> PrimCompositionQuery + +Attributes: + +filter +Filter + +class ArcIntroducedFilter +Choices for filtering composition arcs based on where the arc is +introduced. +Attributes: + +All + +IntroducedInRootLayerPrimSpec + +IntroducedInRootLayerStack + +names + +values + +All = pxr.Usd.ArcIntroducedFilter.All + +IntroducedInRootLayerPrimSpec = pxr.Usd.ArcIntroducedFilter.IntroducedInRootLayerPrimSpec + +IntroducedInRootLayerStack = pxr.Usd.ArcIntroducedFilter.IntroducedInRootLayerStack + +names = {'All': pxr.Usd.ArcIntroducedFilter.All, 'IntroducedInRootLayerPrimSpec': pxr.Usd.ArcIntroducedFilter.IntroducedInRootLayerPrimSpec, 'IntroducedInRootLayerStack': pxr.Usd.ArcIntroducedFilter.IntroducedInRootLayerStack} + +values = {0: pxr.Usd.ArcIntroducedFilter.All, 1: pxr.Usd.ArcIntroducedFilter.IntroducedInRootLayerStack, 2: pxr.Usd.ArcIntroducedFilter.IntroducedInRootLayerPrimSpec} + +class ArcTypeFilter +Choices for filtering composition arcs based on arc type. +Attributes: + +All + +Inherit + +InheritOrSpecialize + +NotInheritOrSpecialize + +NotReferenceOrPayload + +NotVariant + +Payload + +Reference + +ReferenceOrPayload + +Specialize + +Variant + +names + +values + +All = pxr.Usd.ArcTypeFilter.All + +Inherit = pxr.Usd.ArcTypeFilter.Inherit + +InheritOrSpecialize = pxr.Usd.ArcTypeFilter.InheritOrSpecialize + +NotInheritOrSpecialize = pxr.Usd.ArcTypeFilter.NotInheritOrSpecialize + +NotReferenceOrPayload = pxr.Usd.ArcTypeFilter.NotReferenceOrPayload + +NotVariant = pxr.Usd.ArcTypeFilter.NotVariant + +Payload = pxr.Usd.ArcTypeFilter.Payload + +Reference = pxr.Usd.ArcTypeFilter.Reference + +ReferenceOrPayload = pxr.Usd.ArcTypeFilter.ReferenceOrPayload + +Specialize = pxr.Usd.ArcTypeFilter.Specialize + +Variant = pxr.Usd.ArcTypeFilter.Variant + +names = {'All': pxr.Usd.ArcTypeFilter.All, 'Inherit': pxr.Usd.ArcTypeFilter.Inherit, 'InheritOrSpecialize': pxr.Usd.ArcTypeFilter.InheritOrSpecialize, 'NotInheritOrSpecialize': pxr.Usd.ArcTypeFilter.NotInheritOrSpecialize, 'NotReferenceOrPayload': pxr.Usd.ArcTypeFilter.NotReferenceOrPayload, 'NotVariant': pxr.Usd.ArcTypeFilter.NotVariant, 'Payload': pxr.Usd.ArcTypeFilter.Payload, 'Reference': pxr.Usd.ArcTypeFilter.Reference, 'ReferenceOrPayload': pxr.Usd.ArcTypeFilter.ReferenceOrPayload, 'Specialize': pxr.Usd.ArcTypeFilter.Specialize, 'Variant': pxr.Usd.ArcTypeFilter.Variant} + +values = {0: pxr.Usd.ArcTypeFilter.All, 1: pxr.Usd.ArcTypeFilter.Reference, 2: pxr.Usd.ArcTypeFilter.Payload, 3: pxr.Usd.ArcTypeFilter.Inherit, 4: pxr.Usd.ArcTypeFilter.Specialize, 5: pxr.Usd.ArcTypeFilter.Variant, 6: pxr.Usd.ArcTypeFilter.ReferenceOrPayload, 7: pxr.Usd.ArcTypeFilter.InheritOrSpecialize, 8: pxr.Usd.ArcTypeFilter.NotReferenceOrPayload, 9: pxr.Usd.ArcTypeFilter.NotInheritOrSpecialize, 10: pxr.Usd.ArcTypeFilter.NotVariant} + +class DependencyTypeFilter +Choices for filtering composition arcs on dependency type. +This can be direct (arc introduced at the prim’s level in namespace) +or ancestral (arc introduced by a namespace parent of the prim). +Attributes: + +All + +Ancestral + +Direct + +names + +values + +All = pxr.Usd.DependencyTypeFilter.All + +Ancestral = pxr.Usd.DependencyTypeFilter.Ancestral + +Direct = pxr.Usd.DependencyTypeFilter.Direct + +names = {'All': pxr.Usd.DependencyTypeFilter.All, 'Ancestral': pxr.Usd.DependencyTypeFilter.Ancestral, 'Direct': pxr.Usd.DependencyTypeFilter.Direct} + +values = {0: pxr.Usd.DependencyTypeFilter.All, 1: pxr.Usd.DependencyTypeFilter.Direct, 2: pxr.Usd.DependencyTypeFilter.Ancestral} + +class Filter +Attributes: + +arcIntroducedFilter + +arcTypeFilter + +dependencyTypeFilter + +hasSpecsFilter + +property arcIntroducedFilter + +property arcTypeFilter + +property dependencyTypeFilter + +property hasSpecsFilter + +class HasSpecsFilter +Choices for filtering composition arcs on whether the node contributes +specs to the prim. +Attributes: + +All + +HasNoSpecs + +HasSpecs + +names + +values + +All = pxr.Usd.HasSpecsFilter.All + +HasNoSpecs = pxr.Usd.HasSpecsFilter.HasNoSpecs + +HasSpecs = pxr.Usd.HasSpecsFilter.HasSpecs + +names = {'All': pxr.Usd.HasSpecsFilter.All, 'HasNoSpecs': pxr.Usd.HasSpecsFilter.HasNoSpecs, 'HasSpecs': pxr.Usd.HasSpecsFilter.HasSpecs} + +values = {0: pxr.Usd.HasSpecsFilter.All, 1: pxr.Usd.HasSpecsFilter.HasSpecs, 2: pxr.Usd.HasSpecsFilter.HasNoSpecs} + +GetCompositionArcs() → list[UsdPrimCompositionQueryArc] +Return a list of composition arcs for this query’s prim using the +current query filter. +The composition arcs are always returned in order from strongest to +weakest regardless of the filter. + +static GetDirectInherits() +classmethod GetDirectInherits(prim) -> PrimCompositionQuery +Returns a prim composition query for the given prim with a preset +filter that only returns inherit arcs that are not ancestral. + +Parameters +prim (Prim) – + +static GetDirectReferences() +classmethod GetDirectReferences(prim) -> PrimCompositionQuery +Returns a prim composition query for the given prim with a preset +filter that only returns reference arcs that are not ancestral. + +Parameters +prim (Prim) – + +static GetDirectRootLayerArcs() +classmethod GetDirectRootLayerArcs(prim) -> PrimCompositionQuery +Returns a prim composition query for the given prim with a preset +filter that only returns direct arcs that were introduced by opinions +defined in a layer in the root layer stack. + +Parameters +prim (Prim) – + +property filter +Filter +Return a copy of the current filter parameters. + +type : None +Change the filter for this query. + +Type +type + +class pxr.Usd.PrimDefinition +Class representing the builtin definition of a prim given the schemas +registered in the schema registry. +It provides access to the the builtin properties and metadata of a +prim whose type is defined by this definition. +Instances of this class can only be created by the UsdSchemaRegistry. +Methods: + +FlattenTo(layer, path, newSpecSpecifier) +Copies the contents of this prim definition to a prim spec on the given layer at the given path . + +GetAppliedAPISchemas() +Return the list of names of the API schemas that have been applied to this prim definition in order. + +GetAttributeFallbackValue(attrName, value) +Retrieves the fallback value for the attribute named attrName and stores it in value if possible. + +GetDocumentation() +Returns the documentation metadata defined by the prim definition for the prim itself. + +GetMetadata(key, value) +Retrieves the fallback value for the metadata field named key , that is defined by this prim definition for the prim itself and stores it in value if possible. + +GetMetadataByDictKey(key, keyPath, value) +Retrieves the value at keyPath from the fallback dictionary value for the dictionary metadata field named key , that is defined by this prim definition for the prim itself, and stores it in value if possible. + +GetPropertyDocumentation(propName) +Returns the documentation metadata defined by the prim definition for the property named propName if it exists. + +GetPropertyMetadata(propName, key, value) +Retrieves the fallback value for the metadata field named key , that is defined by this prim definition for the property named propName , and stores it in value if possible. + +GetPropertyMetadataByDictKey(propName, key, ...) +Retrieves the value at keyPath from the fallback dictionary value for the dictionary metadata field named key , that is defined by this prim definition for the property named propName , and stores it in value if possible. + +GetPropertyNames() +Return the list of names of builtin properties for this prim definition. + +GetSchemaAttributeSpec(attrName) +This is a convenience method. + +GetSchemaPropertySpec(propName) +Return the property spec that defines the fallback for the property named propName on prims of this prim definition's type. + +GetSchemaRelationshipSpec(relName) +This is a convenience method. + +ListMetadataFields() +Returns the list of names of metadata fields that are defined by this prim definition for the prim itself. + +ListPropertyMetadataFields(propName) +Returns the list of names of metadata fields that are defined by this prim definition for property propName if a property named propName exists. + +FlattenTo(layer, path, newSpecSpecifier) → bool +Copies the contents of this prim definition to a prim spec on the +given layer at the given path . +This includes the entire property spec for each of this definition’s +built-in properties as well as all of this definition’s prim metadata. +If the prim definition represents a concrete prim type, the type name +of the prim spec is set to the the type name of this prim definition. +Otherwise the type name is set to empty. The’apiSchemas’metadata on +the prim spec will always be explicitly set to the combined list of +all API schemas applied to this prim definition, i.e. the list +returned by UsdPrimDefinition::GetAppliedAPISchemas. Note that if this +prim definition is an API schema prim definition (see +UsdSchemaRegistry::FindAppliedAPIPrimDefinition) then’apiSchemas’will +be empty as this prim definition does not”have”an applied API because +instead it”is”an applied API. +If there is no prim spec at the given path , a new prim spec is +created at that path with the specifier newSpecSpecifier . Any +necessary ancestor specs will be created as well but they will always +be created as overs. If a spec does exist at path , then all of +its properties and schema allowed metadata are cleared before it is +populated from the prim definition. + +Parameters + +layer (Layer) – +path (Path) – +newSpecSpecifier (Specifier) – + +FlattenTo(parent, name, newSpecSpecifier) -> Prim +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Copies the contents of this prim definition to a prim spec at the +current edit target for a prim with the given name under the prim +parent . + +Parameters + +parent (Prim) – +name (str) – +newSpecSpecifier (Specifier) – + +FlattenTo(prim, newSpecSpecifier) -> Prim +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Copies the contents of this prim definition to a prim spec at the +current edit target for the given prim . + +Parameters + +prim (Prim) – +newSpecSpecifier (Specifier) – + +GetAppliedAPISchemas() → list[TfToken] +Return the list of names of the API schemas that have been applied to +this prim definition in order. + +GetAttributeFallbackValue(attrName, value) → bool +Retrieves the fallback value for the attribute named attrName and +stores it in value if possible. +Returns true if the attribute exists in this prim definition and it +has a fallback value defined. Returns false otherwise. + +Parameters + +attrName (str) – +value (T) – + +GetDocumentation() → str +Returns the documentation metadata defined by the prim definition for +the prim itself. + +GetMetadata(key, value) → bool +Retrieves the fallback value for the metadata field named key , +that is defined by this prim definition for the prim itself and stores +it in value if possible. +Returns true if a fallback value is defined for the given metadata +key . Returns false otherwise. + +Parameters + +key (str) – +value (T) – + +GetMetadataByDictKey(key, keyPath, value) → bool +Retrieves the value at keyPath from the fallback dictionary value +for the dictionary metadata field named key , that is defined by +this prim definition for the prim itself, and stores it in value +if possible. +Returns true if a fallback dictionary value is defined for the given +metadata key and it contains a value at keyPath . Returns +false otherwise. + +Parameters + +key (str) – +keyPath (str) – +value (T) – + +GetPropertyDocumentation(propName) → str +Returns the documentation metadata defined by the prim definition for +the property named propName if it exists. + +Parameters +propName (str) – + +GetPropertyMetadata(propName, key, value) → bool +Retrieves the fallback value for the metadata field named key , +that is defined by this prim definition for the property named +propName , and stores it in value if possible. +Returns true if a fallback value is defined for the given metadata +key for the named property. Returns false otherwise. + +Parameters + +propName (str) – +key (str) – +value (T) – + +GetPropertyMetadataByDictKey(propName, key, keyPath, value) → bool +Retrieves the value at keyPath from the fallback dictionary value +for the dictionary metadata field named key , that is defined by +this prim definition for the property named propName , and stores +it in value if possible. +Returns true if a fallback dictionary value is defined for the given +metadata key for the named property and it contains a value at +keyPath . Returns false otherwise. + +Parameters + +propName (str) – +key (str) – +keyPath (str) – +value (T) – + +GetPropertyNames() → list[TfToken] +Return the list of names of builtin properties for this prim +definition. + +GetSchemaAttributeSpec(attrName) → AttributeSpec +This is a convenience method. +It is shorthand for TfDynamic_cast( +GetSchemaPropertySpec(primType, attrName)); + +Parameters +attrName (str) – + +GetSchemaPropertySpec(propName) → PropertySpec +Return the property spec that defines the fallback for the property +named propName on prims of this prim definition’s type. +Return null if there is no such property spec. + +Parameters +propName (str) – + +GetSchemaRelationshipSpec(relName) → RelationshipSpec +This is a convenience method. +It is shorthand for TfDynamic_cast( +GetSchemaPropertySpec(primType, relName)); + +Parameters +relName (str) – + +ListMetadataFields() → list[TfToken] +Returns the list of names of metadata fields that are defined by this +prim definition for the prim itself. + +ListPropertyMetadataFields(propName) → list[TfToken] +Returns the list of names of metadata fields that are defined by this +prim definition for property propName if a property named +propName exists. + +Parameters +propName (str) – + +class pxr.Usd.PrimRange +An forward-iterable range that traverses a subtree of prims rooted at +a given prim in depth-first order. +In addition to depth-first order, UsdPrimRange provides the optional +ability to traverse in depth-first pre- and post-order wher prims +appear twice in the range; first before all descendants and then again +immediately after all descendants. This is useful for maintaining +state associated with subtrees, in a stack-like fashion. See +UsdPrimRange::iterator::IsPostVisit() to detect when an iterator is +visiting a prim for the second time. +There are several constructors providing different levels of +configurability; ultimately, one can provide a prim predicate for a +custom iteration, just as one would use UsdPrim::GetFilteredChildren() +in a custom recursion. +Why would one want to use a UsdPrimRange rather than just iterating +over the results of UsdPrim::GetFilteredDescendants() ? Primarily, if +one of the following applies: + +You need to perform pre-and-post-order processing +You may want to prune sub-trees from processing (see +UsdPrimRange::iterator::PruneChildren() ) +You want to treat the root prim itself uniformly with its +descendents (GetFilteredDescendants() will not return the root prim +itself, while UsdPrimRange will - see UsdPrimRange::Stage for an +exception). +Using UsdPrimRange in C++ + +UsdPrimRange provides standard container-like semantics. For example: +// simple range-for iteration +for (UsdPrim prim: UsdPrimRange(rootPrim)) { + ProcessPrim(prim); +} + +// using stl algorithms +std::vector meshes; +auto range = stage->Traverse(); +std::copy_if(range.begin(), range.end(), std::back_inserter(meshes), + [](UsdPrim const &) { return prim.IsA(); }); + +// iterator-based iterating, with subtree pruning +UsdPrimRange range(rootPrim); +for (auto iter = range.begin(); iter != range.end(); ++iter) { + if (UsdModelAPI(\*iter).GetKind() == KindTokens->component) { + iter.PruneChildren(); + } + else { + nonComponents.push_back(\*iter); + } +} + +Using Usd.PrimRange in python +The python wrapping for PrimRange is python-iterable, so it can used +directly as the object of a”for x in...”clause; however in that +usage one loses access to PrimRange methods such as PruneChildren() +and IsPostVisit(). Simply create the iterator outside the loop to +overcome this limitation. Finally, in python, prim predicates must be +combined with bit-wise operators rather than logical operators because +the latter are not overridable. +# simple iteration +for prim in Usd.PrimRange(rootPrim): + ProcessPrim(prim) + +# filtered range using iterator to invoke iterator methods +it = iter(Usd.PrimRange.Stage(stage, Usd.PrimIsLoaded & ~Usd.PrimIsAbstract)) +for prim in it: + if Usd.ModelAPI(prim).GetKind() == Kind.Tokens.component: + it.PruneChildren() + else: + nonComponents.append(prim) + +Finally, since iterators in python are not directly dereferencable, we +provide the python only methods GetCurrentPrim() and IsValid(), +documented in the python help system. +Methods: + +AllPrims +classmethod AllPrims(start) -> PrimRange + +AllPrimsPreAndPostVisit +classmethod AllPrimsPreAndPostVisit(start) -> PrimRange + +IsValid +true if the iterator is not yet exhausted + +PreAndPostVisit +classmethod PreAndPostVisit(start) -> PrimRange + +Stage +classmethod Stage(stage, predicate) -> PrimRange + +static AllPrims() +classmethod AllPrims(start) -> PrimRange +Construct a PrimRange that traverses the subtree rooted at start +in depth-first order, visiting all prims (including deactivated, +undefined, and abstract prims). + +Parameters +start (Prim) – + +static AllPrimsPreAndPostVisit() +classmethod AllPrimsPreAndPostVisit(start) -> PrimRange +Construct a PrimRange that traverses the subtree rooted at start +in depth-first order, visiting all prims (including deactivated, +undefined, and abstract prims) with pre- and post-order visitation. +Pre- and post-order visitation means that each prim appears twice in +the range; not only prior to all its descendants as with an ordinary +traversal but also immediately following its descendants. This lets +client code maintain state for subtrees. See +UsdPrimRange::iterator::IsPostVisit() . + +Parameters +start (Prim) – + +IsValid() +true if the iterator is not yet exhausted + +static PreAndPostVisit() +classmethod PreAndPostVisit(start) -> PrimRange +Create a PrimRange that traverses the subtree rooted at start in +depth-first order, visiting prims that pass the default predicate (as +defined by UsdPrimDefaultPredicate) with pre- and post-order +visitation. +Pre- and post-order visitation means that each prim appears twice in +the range; not only prior to all its descendants as with an ordinary +traversal but also immediately following its descendants. This lets +client code maintain state for subtrees. See +UsdPrimRange::iterator::IsPostVisit() . + +Parameters +start (Prim) – + +PreAndPostVisit(start, predicate) -> PrimRange +Create a PrimRange that traverses the subtree rooted at start in +depth-first order, visiting prims that pass predicate with pre- +and post-order visitation. +Pre- and post-order visitation means that each prim appears twice in +the range; not only prior to all its descendants as with an ordinary +traversal but also immediately following its descendants. This lets +client code maintain state for subtrees. See +UsdPrimRange::iterator::IsPostVisit() . + +Parameters + +start (Prim) – +predicate (_PrimFlagsPredicate) – + +static Stage() +classmethod Stage(stage, predicate) -> PrimRange +Create a PrimRange that traverses all the prims on stage , and +visits those that pass the default predicate (as defined by +UsdPrimDefaultPredicate). + +Parameters + +stage (Stage) – +predicate (_PrimFlagsPredicate) – + +class pxr.Usd.PrimTypeInfo +Class that holds the full type information for a prim. +It holds the type name, applied API schema names, and possibly a +mapped schema type name which represent a unique full type. The info +this holds is used to cache and provide the”real”schema type for the +prim’s type name regardless of whether it is a recognized prim type or +not. The optional”mapped schema type name”is used to obtain a valid +schema type for an unrecognized prim type name if the stage provides a +fallback type for the unrecognized type. This class also provides +access to the prim definition that defines all the built-in properties +and metadata of a prim of this type. +Methods: + +GetAppliedAPISchemas() +Returns the list of applied API schemas, directly authored on the prim, that impart additional properties on its prim definition. + +GetEmptyPrimType +classmethod GetEmptyPrimType() -> PrimTypeInfo + +GetPrimDefinition() +Returns the prim definition associated with this prim type's schema type and applied API schemas. + +GetSchemaType() +Returns the TfType of the actual concrete schema that prims of this type will use to create their prim definition. + +GetSchemaTypeName() +Returns the type name associated with the schema type returned from GetSchemaType. + +GetTypeName() +Returns the concrete prim type name. + +GetAppliedAPISchemas() → list[TfToken] +Returns the list of applied API schemas, directly authored on the +prim, that impart additional properties on its prim definition. +This does NOT include the applied API schemas that may be defined in +the conrete prim type’s prim definition.. + +static GetEmptyPrimType() +classmethod GetEmptyPrimType() -> PrimTypeInfo +Returns the empty prim type info. + +GetPrimDefinition() → PrimDefinition +Returns the prim definition associated with this prim type’s schema +type and applied API schemas. + +GetSchemaType() → Type +Returns the TfType of the actual concrete schema that prims of this +type will use to create their prim definition. +Typically, this will be the type registered in the schema registry for +the concrete prim type returned by GetTypeName. But if the stage +provided this type info with a fallback type because the prim type +name is not a recognized schema, this will return the provided +fallback schema type instead. +Fallback Prim Types + +GetSchemaTypeName() → str +Returns the type name associated with the schema type returned from +GetSchemaType. +This will always be equivalent to calling +UsdSchemaRegistry::GetConcreteSchemaTypeName on the type returned by +GetSchemaType and will typically be the same as GetTypeName as long as +the prim type name is a recognized prim type. +Fallback Prim Types + +GetTypeName() → str +Returns the concrete prim type name. + +class pxr.Usd.Property +Base class for UsdAttribute and UsdRelationship scenegraph objects. +UsdProperty has a bool conversion operator that validates that the +property IsDefined() and thus valid for querying and authoring values +and metadata. This is a fairly expensive query that we do not +cache, so if client code retains UsdProperty objects it should manage +its object validity closely for performance. An ideal pattern is to +listen for UsdNotice::StageContentsChanged notifications, and +revalidate/refetch retained UsdObjects only then and otherwise use +them without validity checking. +Methods: + +ClearDisplayGroup() +Clears this property's display group (metadata) in the current EditTarget (only). + +ClearDisplayName() +Clears this property's display name (metadata) in the current EditTarget (only). + +FlattenTo(parent) +Flattens this property to a property spec with the same name beneath the given parent prim in the edit target of its owning stage. + +GetBaseName() +Return this property's name with all namespace prefixes removed, i.e. + +GetDisplayGroup() +Return this property's display group (metadata). + +GetDisplayName() +Return this property's display name (metadata). + +GetNamespace() +Return this property's complete namespace prefix. + +GetNestedDisplayGroups() +Return this property's displayGroup as a sequence of groups to be nested, or an empty vector if displayGroup is empty or not authored. + +GetPropertyStack(time) +Returns a strength-ordered list of property specs that provide opinions for this property. + +GetPropertyStackWithLayerOffsets(time) +Returns a strength-ordered list of property specs that provide opinions for this property paired with the cumulative layer offset from the stage's root layer to the layer containing the property spec. + +HasAuthoredDisplayGroup() +Returns true if displayGroup was explicitly authored and GetMetadata() will return a meaningful value for displayGroup. + +HasAuthoredDisplayName() +Returns true if displayName was explicitly authored and GetMetadata() will return a meaningful value for displayName. + +IsAuthored() +Return true if there are any authored opinions for this property in any layer that contributes to this stage, false otherwise. + +IsAuthoredAt(editTarget) +Return true if there is an SdfPropertySpec authored for this property at the given editTarget, otherwise return false. + +IsCustom() +Return true if this is a custom property (i.e., not part of a prim schema). + +IsDefined() +Return true if this is a builtin property or if the strongest authored SdfPropertySpec for this property's path matches this property's dynamic type. + +SetCustom(isCustom) +Set the value for custom at the current EditTarget, return true on success, false if the value can not be written. + +SetDisplayGroup(displayGroup) +Sets this property's display group (metadata). + +SetDisplayName(name) +Sets this property's display name (metadata). + +SetNestedDisplayGroups(nestedGroups) +Sets this property's display group (metadata) to the nested sequence. + +SplitName() +Return this property's name elements including namespaces and its base name as the final element. + +ClearDisplayGroup() → bool +Clears this property’s display group (metadata) in the current +EditTarget (only). +Returns true on success. + +ClearDisplayName() → bool +Clears this property’s display name (metadata) in the current +EditTarget (only). +Returns true on success. + +FlattenTo(parent) → Property +Flattens this property to a property spec with the same name beneath +the given parent prim in the edit target of its owning stage. +The parent prim may belong to a different stage than this +property’s owning stage. +Flattening authors all authored resolved values and metadata for this +property into the destination property spec. If this property is a +builtin property, fallback values and metadata will also be authored +if the destination property has a different fallback value or no +fallback value, or if the destination property has an authored value +that overrides its fallback. +Attribute connections and relationship targets that target an object +beneath this property’s owning prim will be remapped to target objects +beneath the destination parent prim. +If the destination spec already exists, it will be overwritten. +UsdStage::Flatten + +Parameters +parent (Prim) – + +FlattenTo(parent, propName) -> Property +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Flattens this property to a property spec with the given propName +beneath the given parent prim in the edit target of its owning +stage. +The parent prim may belong to a different stage than this +property’s owning stage. + +Parameters + +parent (Prim) – +propName (str) – + +FlattenTo(property) -> Property +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Flattens this property to a property spec for the given property +in the edit target of its owning prim’s stage. +The property owning prim may belong to a different stage than this +property’s owning stage. + +Parameters +property (Property) – + +GetBaseName() → str +Return this property’s name with all namespace prefixes removed, i.e. +the last component of the return value of GetName() +This is generally the property’s”client name”; property namespaces are +often used to group related properties together. The namespace +prefixes the property name but many consumers will care only about un- +namespaced name, i.e. its BaseName. For more information, see Names, +Namespace Ordering, and Property Namespaces + +GetDisplayGroup() → str +Return this property’s display group (metadata). +This returns the empty token if no display group has been set. +SetDisplayGroup() + +GetDisplayName() → str +Return this property’s display name (metadata). +This returns the empty string if no display name has been set. +SetDisplayName() + +GetNamespace() → str +Return this property’s complete namespace prefix. +Return the empty token if this property has no namespaces. +This is the complement of GetBaseName() , although it does not +contain a trailing namespace delimiter + +GetNestedDisplayGroups() → list[str] +Return this property’s displayGroup as a sequence of groups to be +nested, or an empty vector if displayGroup is empty or not authored. + +GetPropertyStack(time) → list[SdfPropertySpecHandle] +Returns a strength-ordered list of property specs that provide +opinions for this property. +If time is UsdTimeCode::Default() , or this property is a +UsdRelationship (which are never affected by clips), we will not +consider value clips for opinions. For any other time , for a +UsdAttribute, clips whose samples may contribute an opinion will be +included. These specs are ordered from strongest to weakest opinion, +although if time requires interpolation between two adjacent +clips, both clips will appear, sequentially. +The results returned by this method are meant for debugging and +diagnostic purposes. It is not advisable to retain a PropertyStack +for the purposes of expedited value resolution for properties, since +the makeup of an attribute’s PropertyStack may itself be time-varying. +To expedite repeated value resolution of attributes, you should +instead retain a UsdAttributeQuery . +UsdClipsAPI + +Parameters +time (TimeCode) – + +GetPropertyStackWithLayerOffsets(time) → list[tuple[PropertySpec, LayerOffset]] +Returns a strength-ordered list of property specs that provide +opinions for this property paired with the cumulative layer offset +from the stage’s root layer to the layer containing the property spec. +This behaves exactly the same as UsdProperty::GetPropertyStack with +the addition of providing the cumulative layer offset of each spec’s +layer. +The results returned by this method are meant for debugging and +diagnostic purposes. It is not advisable to retain a PropertyStack +for the purposes of expedited value resolution for properties, since +the makeup of an attribute’s PropertyStack may itself be time-varying. +To expedite repeated value resolution of attributes, you should +instead retain a UsdAttributeQuery . + +Parameters +time (TimeCode) – + +HasAuthoredDisplayGroup() → bool +Returns true if displayGroup was explicitly authored and GetMetadata() +will return a meaningful value for displayGroup. + +HasAuthoredDisplayName() → bool +Returns true if displayName was explicitly authored and GetMetadata() +will return a meaningful value for displayName. + +IsAuthored() → bool +Return true if there are any authored opinions for this property in +any layer that contributes to this stage, false otherwise. + +IsAuthoredAt(editTarget) → bool +Return true if there is an SdfPropertySpec authored for this property +at the given editTarget, otherwise return false. +Note that this method does not do partial composition. It does not +consider whether authored scene description exists at editTarget or +weaker, only exactly at the given editTarget. + +Parameters +editTarget (EditTarget) – + +IsCustom() → bool +Return true if this is a custom property (i.e., not part of a prim +schema). +The’custom’modifier in USD serves the same function as +Alembic’s’userProperties’, which is to say as a categorization for ad +hoc client data not formalized into any schema, and therefore not +carrying an expectation of specific processing by consuming +applications. + +IsDefined() → bool +Return true if this is a builtin property or if the strongest authored +SdfPropertySpec for this property’s path matches this property’s +dynamic type. +That is, SdfRelationshipSpec in case this is a UsdRelationship, and +SdfAttributeSpec in case this is a UsdAttribute. Return false if +this property’s prim has expired. +For attributes, a true return does not imply that this attribute +possesses a value, only that has been declared, is of a certain type +and variability, and that it is safe to use to query and author values +and metadata. + +SetCustom(isCustom) → bool +Set the value for custom at the current EditTarget, return true on +success, false if the value can not be written. +Note that this value should not be changed as it is typically +either automatically authored or provided by a property definition. +This method is provided primarily for fixing invalid scene +description. + +Parameters +isCustom (bool) – + +SetDisplayGroup(displayGroup) → bool +Sets this property’s display group (metadata). +Returns true on success. +DisplayGroup provides UI hinting for grouping related properties +together for display. We define a convention for specifying nesting of +groups by recognizing the property namespace separator in displayGroup +as denoting group-nesting. +SetNestedDisplayGroups() + +Parameters +displayGroup (str) – + +SetDisplayName(name) → bool +Sets this property’s display name (metadata). +Returns true on success. +DisplayName is meant to be a descriptive label, not necessarily an +alternate identifier; therefore there is no restriction on which +characters can appear in it. + +Parameters +name (str) – + +SetNestedDisplayGroups(nestedGroups) → bool +Sets this property’s display group (metadata) to the nested sequence. +Returns true on success. +A displayGroup set with this method can still be retrieved with +GetDisplayGroup() , with the namespace separator embedded in the +result. If nestedGroups is empty, we author an empty string for +displayGroup. +SetDisplayGroup() + +Parameters +nestedGroups (list[str]) – + +SplitName() → list[str] +Return this property’s name elements including namespaces and its base +name as the final element. + +class pxr.Usd.References +UsdReferences provides an interface to authoring and introspecting +references in Usd. +References are the primary operator for”encapsulated aggregation”of +scene description. aggregation means that references let us build up +rich scenes by composing scene description recorded in a (most often) +different layer. A scene can reference the same layer many times at +different locations in a scene’s namespace. Referenced scene +description can be overridden in the referencing (or stronger) layers, +allowing each instance of the reference to be directly +customized/overridden. Encapsulated means that regardless of how +much scene description is in the referenced layer, only the scene +description under and composed from (via other composition arcs in the +referenced layer) the targeted prim will be composed into the +aggregate scene. Multiple references to the same layer will result in +the layer being opened and retained in memory only once, although each +referencing prim will compose unique prim indices for the tree rooted +at the referenced prim. + +## Important Qualities and Effective Use of References + +Any prim can host zero, one or multiple references +References are list editable; that is, they compose differently +than ordinary properties and metadata. In any given LayerStack, each +authored reference operation at the same SdfPath location in each +layer (i.e. on the same prim) will compose into an aggregate result by +adding to, removing from, or replacing”weaker”references. +References can target the same LayerStack in which they are +authored, as long as doing so does not introduce a cycle in the +composition graph. See Expressing”internal”references to the +containing LayerStack +The identifier component of a reference in the provided API +can be a resolvable asset-path to some external layer, empty, in which +case the reference targets the root layer of the LayerStack containing +the referencing layer, or the identifier of an existing anonymous, in- +memory-only SdfLayer. Care should be exercised in the latter case: +calling Export() on an anonymous layer to serialize it to a file will +not attempt to replace any references to anonymous layers with +references to file-backed layers. +Opinions brought in by reference on an ancestor prim are weaker +than opinions brought in by references on a descendant prim. + +References may omit the target prim path if the referenced layer has +the’defaultPrim’metadata set. In this case, the reference targets +the’defaultPrim’in the referenced layer. A layer’s defaultPrim can be +authored and accessed on a UsdStage whose root layer is the layer in +question: see UsdStage::GetDefaultPrim() and +UsdStage::SetDefaultPrim() . One can also author defaultPrim directly +on an SdfLayer - see SdfLayer::GetDefaultPrim() , +SdfLayer::SetDefaultPrim() . +References may omit the identifier specifying the referenced layer. +This creates an”internal”reference. During composition, the referenced +layer will be resolved to the root layer of the LayerStack containing +the layer where the reference was authored. See AddInternalReference() +. +References may target any prim in a layer. In the simplest and most +common case, a root prim in a layer will be referenced. However, +referencing sub-root prims can be useful in a variety of other cases; +for example, a user might organize prims into a meaningful hierarchy +in a layer for display purposes, then use sub-root references to +reference a selection from that hierarchy into a scene. +Sub-root references have subtle behaviors with respect to opinions and +composition arcs authored on ancestors of the referenced prim. Users +should carefully consider this when deciding whether to use sub-root +references. These issues can be avoided by not authoring any +properties or metadata on ancestors of prims that are meant to be +referenced. +Consider the following example: +\* shot.usda | \* asset.usda + | +#usda 1.0 | #usda 1.0 + | +over "Class" | class "Class" +{ | { + over "B" | } + { | + over "Model" | def "A" ( + { | inherits = + int a = 3 | ) + } | { + } | token purpose = "render" +} | + | def "B" ( +over "A" | variantSets = "type" +{ | variants = { + over "B" ( | string type = "a" + # variant selection won't be used | } + variants = { | ) + string type = "b" | { + } | variantSet "type" = { + ) | "a" { + { | def "Model" + } | { +} | int a = 1 + | } +def "ReferencedModel" ( | } + references = @./asset.usda@ | "b" { +) | def "Model" +{ | { +} | int a = 2 + | } + | } + | } + | } + | } + + - Property and metadata opinions on the ancestors of the referenced + prim *are not* present in the composed stage and will never contribute + to any computations. In this example, the opinion for the attribute + /A.purpose in asset.usda will never be visible in the UsdStage for + shot.usda. + + - Property and metadata opinions due to ancestral composition arcs + *are* present in the composed stage. In this example, the attribute + /Class/B/Model.a in shot.usda will be present in the UsdStage for + shot.usda, even though the inherit arc is authored on an ancestor of + the referenced prim. + + - A consequence of these rules is that users might not be able to + override ancestral variant selections that affect the referenced prim. + In this example, the Model prim being referenced comes from the + variant selection {type=a} on prim /A/B in asset.usda. The {type=b} + variant cannot be selected in shot.usda, even if prims with the same + hierarchy happen to exist there. There are various workarounds for + this; in this example, the {type=b} variant selection could be + authored on /Class/B/Model in shot.usda instead because of the inherit + arc that was established on prim /A. + +AddReference() and SetReferences() can each fail for a number of +reasons. If one of the specified prim targets for one of the +references is not a prim, we will generate an error, fail to author +any scene description, and return false . If anything goes wrong +in attempting to write the reference, we also return false, and the +reference will also remain unauthored. Otherwise, if the reference was +successfully authored, we will return true . A successful +reference authoring operation may still generate composition errors! +Just because the reference you specified was syntactically correct and +therefore successfully authored, does not imply it was meaningful. If +you wish to ensure that the reference you are about to author will be +meaningfully consumable by your stage, you are strongly encouraged to +ensure it will resolve to an actual file by using +UsdStage::ResolveIdentifierToEditTarget() before authoring the +reference. +When adding an internal reference, the given prim path is expected to +be in the namespace of the owning prim’s stage. Sub-root prim paths +will be translated from this namespace to the namespace of the current +edit target, if necessary. If a path cannot be translated, a coding +error will be issued and no changes will be made. Non-sub-root paths +will not be translated. +Immediately upon successful authoring of the reference (before +returning from AddReference() , RemoveReference() , ClearReferences() +, or SetReferences() ), the UsdStage on which the reference was +authored will recompose the subtree rooted at the prim hosting the +reference. If the provided identifier does not resolve to a layer that +is already opened or that can be opened in the usd format, or if the +provided primPath is not an actual prim in that layer, the stage’s +recomposition will fail, and pass on composition errors to the client. +Methods: + +AddInternalReference(primPath, layerOffset, ...) +Add an internal reference to the specified prim. + +AddReference(ref, position) +Adds a reference to the reference listOp at the current EditTarget, in the position specified by position . + +ClearReferences() +Removes the authored reference listOp edits at the current EditTarget. + +GetPrim() +Return the prim this object is bound to. + +RemoveReference(ref) +Removes the specified reference from the references listOp at the current EditTarget. + +SetReferences(items) +Explicitly set the references, potentially blocking weaker opinions that add or remove items. + +AddInternalReference(primPath, layerOffset, position) → bool +Add an internal reference to the specified prim. +Internal References + +Parameters + +primPath (Path) – +layerOffset (LayerOffset) – +position (ListPosition) – + +AddReference(ref, position) → bool +Adds a reference to the reference listOp at the current EditTarget, in +the position specified by position . +Why adding references may fail for explanation of expectations on +ref and what return values and errors to expect, and ListOps and +List Editing for details on list editing and composition of listOps. + +Parameters + +ref (Reference) – +position (ListPosition) – + +AddReference(identifier, primPath, layerOffset, position) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +primPath (Path) – +layerOffset (LayerOffset) – +position (ListPosition) – + +AddReference(identifier, layerOffset, position) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +References Without Prim Paths + +Parameters + +identifier (str) – +layerOffset (LayerOffset) – +position (ListPosition) – + +ClearReferences() → bool +Removes the authored reference listOp edits at the current EditTarget. +The same caveats for Remove() apply to Clear(). In fact, Clear() may +actually increase the number of composed references, if the listOp +being cleared contained the”remove”operator. +ListOps and List Editing + +GetPrim() → Prim +Return the prim this object is bound to. + +GetPrim() -> Prim +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +RemoveReference(ref) → bool +Removes the specified reference from the references listOp at the +current EditTarget. +This does not necessarily eliminate the reference completely, as it +may be added or set in another layer in the same LayerStack as the +current EditTarget. +ListOps and List Editing + +Parameters +ref (Reference) – + +SetReferences(items) → bool +Explicitly set the references, potentially blocking weaker opinions +that add or remove items. +Why adding references may fail for explanation of expectations on +ref and what return values and errors to expect, and ListOps and +List Editing for details on list editing and composition of listOps. + +Parameters +items (list[SdfReference]) – + +class pxr.Usd.Relationship +A UsdRelationship creates dependencies between scenegraph objects by +allowing a prim to target other prims, attributes, or relationships. + +## Relationship Characteristics + +A UsdRelationship is a pointer to other objects, which are named by +their scenegraph paths. When authoring relationships, the target +parameters should be scenegraph paths in the composed namespace of the +UsdStage into which you are authoring. If your edits are targeted to a +different layer, across various composition arcs (because you +specified a non-default UsdEditTarget), the target’s path will be +automatically translated into the proper namespace. +A single UsdRelationship can target multiple other objects, which can +be of UsdPrim, UsdAttribute, or UsdRelationship type. UsdRelationship +participates in”list editing”, which means that stronger layers in a +composed scene can add, remove, or reorder targets authored on the +relationship in weaker layers without stomping the weaker opinions, +although stomping behavior is still possible, via SetTargets() . +An authored relationship creates a dependency of the targeting prim on +the targeted prim(s). We consider these dependencies to +be”loaddependencies”, which means that when we load the targeting +prim’s”load group”, we will also load the targeted prims’load groups, +to ensure that all the data required to render the model containing +the targeting prim is composed and available. +Like UsdAttribute, UsdRelationship objects are meant to be ephemeral, +live on the stack, and be cheap to refetch from their owning UsdPrim. +Unlike UsdAttribute s, which can either be uniform over all time or +vary in value over time, UsdRelationship is always uniform. + +## Relationship Restrictions + +When authoring relationship targets in a stage’s local LayerStack, all +target paths are legal (Note we may restrict this prior to launch to +only allowing targeting of already-extant scenegraph objects). +However, a relationship target that is legal in a local LayerStack may +become unreachable when the stage’s root layer is referenced into an +aggregate, and will cause an error when attempting to load/compose the +aggregate. +This can happen because references encapsulate just the tree whose +root is targeted in the reference - no other scene description in the +referenced layer will be composed into the aggregate. So if some +descendant prim of the referenced root targets a relationship to +another tree in the same layer, that relationship would dangle, and +the client will error in GetTargets() or GetForwardedTargets() . +Authoring targets to objects within prototypes is not allowed, since +prototype prims do not have a stable identity across runs. Consumers +must author targets to the object within an instance instead. +Relationships authored in a descendent prim of a referenced prim may +not target the referenced prim itself or any of its immediate child +properties if the referencing prim is instanceable. Allowing this +would break the ability for this relationship to be instanced and +shared by multiple instances it would force consumers of +relationships within prototypes to resolve targets in the context of +each of that prototype’s instances. + +## Relationship Forwarding + +Because a relationship can target another relationship, we can and do +provide the ability to resolve chained or forwarded relationships. +This can be useful in several situations, including: + +Combining relationships with VariantSets to create +demultiplexers. A prim can host a relationship that serves as +a”binding post”for other prims to target. The prim also hosts +a”bindingVariant” UsdVariantSet whose variants each modulate the +target of the binding-post relationship. We can now change the +forwarded target of all prims targeting the binding-post by simply +switching the bindingVariant VariantSet. We will work through this +example in the USD reference manual. +Defining a relationship as part of a model’s interface (so that +it can be targeted in model hierarchy with no models loaded), which, +inside the model’s payload, forwards to prims useful to a client, the +set of which may vary depending on the model’s configured VariantSets. + +Methods: + +AddTarget(target, position) +Adds target to the list of targets, in the position specified by position . + +ClearTargets(removeSpec) +Remove all opinions about the target list from the current edit target. + +GetForwardedTargets(targets) +Compose this relationship's ultimate targets, taking into account"relationship forwarding", and fill targets with the result. + +GetTargets(targets) +Compose this relationship's targets and fill targets with the result. + +HasAuthoredTargets() +Returns true if any target path opinions have been authored. + +RemoveTarget(target) +Removes target from the list of targets. + +SetTargets(targets) +Make the authoring layer's opinion of the targets list explicit, and set exactly to targets . + +AddTarget(target, position) → bool +Adds target to the list of targets, in the position specified by +position . +Passing paths to prototype prims or any other objects in prototypes +will cause an error to be issued. It is not valid to author targets to +these objects. +What data this actually authors depends on what data is currently +authored in the authoring layer, with respect to list-editing +semantics, which we will document soon + +Parameters + +target (Path) – +position (ListPosition) – + +ClearTargets(removeSpec) → bool +Remove all opinions about the target list from the current edit +target. +Only remove the spec if removeSpec is true (leave the spec to +preserve meta-data we may have intentionally authored on the +relationship) + +Parameters +removeSpec (bool) – + +GetForwardedTargets(targets) → bool +Compose this relationship’s ultimate targets, taking into +account”relationship forwarding”, and fill targets with the +result. +All preexisting elements in targets are lost. This method never +inserts relationship paths in targets . +Returns true if any of the visited relationships that are not”purely +forwarding”has an authored opinion for its target paths and no +composition errors were encountered while computing any targets. +Purely forwarding, in this context, means the relationship has at +least one target but all of its targets are paths to other +relationships. Note that authored opinions may include opinions that +clear the targets and a return value of true does not necessarily +indicate that targets will not be empty. +Returns false otherwise. When composition errors occur, this function +continues to collect successfully composed targets, but returns false +to indicate to the caller that errors occurred. +When a forwarded target cannot be determined, e.g. due to a +composition error, no value is returned for that target; the +alternative would be to return the relationship path at which the +forwarded targets could not be composed, however this would require +all callers of GetForwardedTargets() to account for unexpected +relationship paths being returned with the expected target results. +For example, a particular caller may expect only prim paths in the +target vector, but when composition errors occur, relationships would +be included, potentially triggering additional down stream errors. +See Relationship Forwarding for details on the semantics. +The result is not cached, so will be recomputed on every query. + +Parameters +targets (list[SdfPath]) – + +GetTargets(targets) → bool +Compose this relationship’s targets and fill targets with the +result. +All preexisting elements in targets are lost. +Returns true if any target path opinions have been authored and no +composition errors were encountered, returns false otherwise. Note +that authored opinions may include opinions that clear the targets and +a return value of true does not necessarily indicate that targets +will contain any target paths. +See Relationship Targets and Attribute Connections for details on +behavior when targets point to objects beneath instance prims. +The result is not cached, so will be recomputed on every query. + +Parameters +targets (list[SdfPath]) – + +HasAuthoredTargets() → bool +Returns true if any target path opinions have been authored. +Note that this may include opinions that clear targets and may not +indicate that target paths will exist for this relationship. + +RemoveTarget(target) → bool +Removes target from the list of targets. +Passing paths to prototype prims or any other objects in prototypes +will cause an error to be issued. It is not valid to author targets to +these objects. + +Parameters +target (Path) – + +SetTargets(targets) → bool +Make the authoring layer’s opinion of the targets list explicit, and +set exactly to targets . +Passing paths to prototype prims or any other objects in prototypes +will cause an error to be issued. It is not valid to author targets to +these objects. +If any target in targets is invalid, no targets will be authored +and this function will return false. + +Parameters +targets (list[SdfPath]) – + +class pxr.Usd.ResolveInfo +Container for information about the source of an attribute’s value, +i.e. the’resolved’location of the attribute. +For more details, see TimeSamples, Defaults, and Value Resolution. +Methods: + +GetNode() +Return the node within the containing PcpPrimIndex that provided the resolved value opinion. + +GetSource() +Return the source of the associated attribute's value. + +ValueIsBlocked() +Return true if this UsdResolveInfo represents an attribute whose value is blocked. + +GetNode() → NodeRef +Return the node within the containing PcpPrimIndex that provided the +resolved value opinion. + +GetSource() → ResolveInfoSource +Return the source of the associated attribute’s value. + +ValueIsBlocked() → bool +Return true if this UsdResolveInfo represents an attribute whose value +is blocked. +UsdAttribute::Block() + +class pxr.Usd.ResolveInfoSource +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.ResolveInfoSourceNone, Usd.ResolveInfoSourceFallback, Usd.ResolveInfoSourceDefault, Usd.ResolveInfoSourceTimeSamples, Usd.ResolveInfoSourceValueClips) + +class pxr.Usd.ResolveTarget +Defines a subrange of nodes and layers within a prim’s prim index to +consider when performing value resolution for the prim’s attributes. A +resolve target can then be passed to UsdAttributeQuery during its +construction to have all of the queries made by the UsdAttributeQuery +use the resolve target’s subrange for their value resolution. +Resolve targets can be created via methods on +UsdPrimCompositionQueryArc to to limit value resolution to a subrange +of the prim’s composed specs that are no stronger that arc, or a +subrange of specs that is strictly stronger than that arc (optionally +providing a particular layer within the arc’s layer stack to further +limit the range of specs). +Alternatively, resolve targets can also be created via methods on +UsdPrim that can limit value resolution to either up to or stronger +than the spec that would be edited when setting a value for the prim +using the given UsdEditTarget. +Unlike UsdEditTarget, a UsdResolveTarget is only relevant to the prim +it is created for and can only be used in a UsdAttributeQuery for +attributes on this prim. + +## Invalidation + +This object does not listen for change notification. If a consumer is +holding on to a UsdResolveTarget, it is their responsibility to +dispose of it in response to a resync change to the associated prim. +Failing to do so may result in incorrect values or crashes due to +dereferencing invalid objects. +Methods: + +GetPrimIndex() +Get the prim index of the resolve target. + +GetStartLayer() +Returns the layer in the layer stack of the start node that value resolution with this resolve target will start at. + +GetStartNode() +Returns the node that value resolution with this resolve target will start at. + +GetStopLayer() +Returns the layer in the layer stack of the stop node that value resolution with this resolve target will stop at. + +GetStopNode() +Returns the node that value resolution with this resolve target will stop at when the"stop at"layer is reached. + +IsNull() +Returns true if this is a null resolve target. + +GetPrimIndex() → PrimIndex +Get the prim index of the resolve target. + +GetStartLayer() → Layer +Returns the layer in the layer stack of the start node that value +resolution with this resolve target will start at. + +GetStartNode() → NodeRef +Returns the node that value resolution with this resolve target will +start at. + +GetStopLayer() → Layer +Returns the layer in the layer stack of the stop node that value +resolution with this resolve target will stop at. + +GetStopNode() → NodeRef +Returns the node that value resolution with this resolve target will +stop at when the”stop at”layer is reached. + +IsNull() → bool +Returns true if this is a null resolve target. + +class pxr.Usd.SchemaBase +The base class for all schema types in Usd. +Schema objects hold a UsdPrim internally and provide a layer of +specific named API atop the underlying scene graph. +Schema objects are polymorphic but they are intended to be created as +automatic local variables, so they may be passed and returned by- +value. This leaves them subject to slicing. This means that if one +passes a SpecificSchema instance to a function that takes a +UsdSchemaBase by-value, all the polymorphic behavior specific to +SpecificSchema is lost. +To avoid slicing, it is encouraged that functions taking schema object +arguments take them by const& if const access is sufficient, +otherwise by non-const pointer. +Methods: + +GetPath() +Shorthand for GetPrim() -> GetPath() . + +GetPrim() +Return this schema object's held prim. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSchemaClassPrimDefinition() +Return the prim definition associated with this schema instance if one exists, otherwise return null. + +GetSchemaKind() +Returns the kind of schema this class is. + +IsAPISchema() +Returns whether this is an API schema or not. + +IsAppliedAPISchema() +Returns whether this is an applied API schema or not. + +IsConcrete() +Returns whether or not this class corresponds to a concrete instantiable prim type in scene description. + +IsMultipleApplyAPISchema() +Returns whether this is an applied API schema or not. + +IsTyped() +Returns whether or not this class inherits from UsdTyped. + +GetPath() → Path +Shorthand for GetPrim() -> GetPath() . + +GetPrim() → Prim +Return this schema object’s held prim. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +Parameters +includeInherited (bool) – + +GetSchemaClassPrimDefinition() → PrimDefinition +Return the prim definition associated with this schema instance if one +exists, otherwise return null. +This does not use the held prim’s type. To get the held prim +instance’s definition, use UsdPrim::GetPrimDefinition() . +UsdPrim::GetPrimDefinition() + +GetSchemaKind() → SchemaKind +Returns the kind of schema this class is. + +IsAPISchema() → bool +Returns whether this is an API schema or not. + +IsAppliedAPISchema() → bool +Returns whether this is an applied API schema or not. +If this returns true this class will have an Apply() method + +IsConcrete() → bool +Returns whether or not this class corresponds to a concrete +instantiable prim type in scene description. +If this is true, GetStaticPrimDefinition() will return a valid prim +definition with a non-empty typeName. + +IsMultipleApplyAPISchema() → bool +Returns whether this is an applied API schema or not. +If this returns true the constructor, Get and Apply methods of this +class will take in the name of the API schema instance. + +IsTyped() → bool +Returns whether or not this class inherits from UsdTyped. +Types which inherit from UsdTyped can impart a typename on a UsdPrim. + +class pxr.Usd.SchemaKind +Attributes: + +AbstractBase + +AbstractTyped + +ConcreteTyped + +Invalid + +MultipleApplyAPI + +NonAppliedAPI + +SingleApplyAPI + +names + +values + +AbstractBase = pxr.Usd.SchemaKind.AbstractBase + +AbstractTyped = pxr.Usd.SchemaKind.AbstractTyped + +ConcreteTyped = pxr.Usd.SchemaKind.ConcreteTyped + +Invalid = pxr.Usd.SchemaKind.Invalid + +MultipleApplyAPI = pxr.Usd.SchemaKind.MultipleApplyAPI + +NonAppliedAPI = pxr.Usd.SchemaKind.NonAppliedAPI + +SingleApplyAPI = pxr.Usd.SchemaKind.SingleApplyAPI + +names = {'AbstractBase': pxr.Usd.SchemaKind.AbstractBase, 'AbstractTyped': pxr.Usd.SchemaKind.AbstractTyped, 'ConcreteTyped': pxr.Usd.SchemaKind.ConcreteTyped, 'Invalid': pxr.Usd.SchemaKind.Invalid, 'MultipleApplyAPI': pxr.Usd.SchemaKind.MultipleApplyAPI, 'NonAppliedAPI': pxr.Usd.SchemaKind.NonAppliedAPI, 'SingleApplyAPI': pxr.Usd.SchemaKind.SingleApplyAPI} + +values = {0: pxr.Usd.SchemaKind.Invalid, 1: pxr.Usd.SchemaKind.AbstractBase, 2: pxr.Usd.SchemaKind.AbstractTyped, 3: pxr.Usd.SchemaKind.ConcreteTyped, 4: pxr.Usd.SchemaKind.NonAppliedAPI, 5: pxr.Usd.SchemaKind.SingleApplyAPI, 6: pxr.Usd.SchemaKind.MultipleApplyAPI} + +class pxr.Usd.SchemaRegistry +Singleton registry that provides access to schema type information and +the prim definitions for registered Usd”IsA”and applied API schema +types. It also contains the data from the generated schemas that is +used by prim definitions to provide properties and fallbacks. +The data contained herein comes from the generatedSchema.usda file +(generated when a schema.usda file is processed by usdGenSchema) of +each schema-defining module. The registry expects each schema type to +be represented as a single prim spec with its inheritance flattened, +i.e. the prim spec contains a union of all its local and class +inherited property specs and metadata fields. +It is used by the Usd core, via UsdPrimDefinition, to determine how to +create scene description for unauthored”built-in”properties of schema +classes, to enumerate all properties for a given schema class, and +finally to provide fallback values for unauthored built-in properties. +Methods: + +BuildComposedPrimDefinition(primType, ...) +Composes and returns a new UsdPrimDefinition from the given primType and list of appliedSchemas . + +FindAppliedAPIPrimDefinition(typeName) +Finds the prim definition for the given typeName token if typeName is a registered applied API schema type. + +FindConcretePrimDefinition(typeName) +Finds the prim definition for the given typeName token if typeName is a registered concrete typed schema type. + +GetAPISchemaCanOnlyApplyToTypeNames +classmethod GetAPISchemaCanOnlyApplyToTypeNames(apiSchemaName, instanceName) -> list[TfToken] + +GetAPISchemaTypeName +classmethod GetAPISchemaTypeName(schemaType) -> str + +GetAPITypeFromSchemaTypeName +classmethod GetAPITypeFromSchemaTypeName(typeName) -> Type + +GetAutoApplyAPISchemas +classmethod GetAutoApplyAPISchemas() -> map[str, list[TfToken]] + +GetConcreteSchemaTypeName +classmethod GetConcreteSchemaTypeName(schemaType) -> str + +GetConcreteTypeFromSchemaTypeName +classmethod GetConcreteTypeFromSchemaTypeName(typeName) -> Type + +GetEmptyPrimDefinition() +Returns the empty prim definition. + +GetFallbackPrimTypes() +Returns a dictionary mapping concrete schema prim type names to a VtTokenArray of fallback prim type names if fallback types are defined for the schema type in its registered schema. + +GetMultipleApplyNameTemplateBaseName +classmethod GetMultipleApplyNameTemplateBaseName(nameTemplate) -> str + +GetSchemaKind +classmethod GetSchemaKind(schemaType) -> SchemaKind + +GetSchemaTypeName +classmethod GetSchemaTypeName(schemaType) -> str + +GetTypeFromName +classmethod GetTypeFromName(typeName) -> Type + +GetTypeFromSchemaTypeName +classmethod GetTypeFromSchemaTypeName(typeName) -> Type + +GetTypeNameAndInstance +classmethod GetTypeNameAndInstance(apiSchemaName) -> tuple[str, str] + +IsAbstract +classmethod IsAbstract(primType) -> bool + +IsAllowedAPISchemaInstanceName +classmethod IsAllowedAPISchemaInstanceName(apiSchemaName, instanceName) -> bool + +IsAppliedAPISchema +classmethod IsAppliedAPISchema(apiSchemaType) -> bool + +IsConcrete +classmethod IsConcrete(primType) -> bool + +IsDisallowedField +classmethod IsDisallowedField(fieldName) -> bool + +IsMultipleApplyAPISchema +classmethod IsMultipleApplyAPISchema(apiSchemaType) -> bool + +IsMultipleApplyNameTemplate +classmethod IsMultipleApplyNameTemplate(nameTemplate) -> bool + +IsTyped +classmethod IsTyped(primType) -> bool + +MakeMultipleApplyNameInstance +classmethod MakeMultipleApplyNameInstance(nameTemplate, instanceName) -> str + +MakeMultipleApplyNameTemplate +classmethod MakeMultipleApplyNameTemplate(namespacePrefix, baseName) -> str + +Attributes: + +expired +True if this object has expired, False otherwise. + +BuildComposedPrimDefinition(primType, appliedAPISchemas) → PrimDefinition +Composes and returns a new UsdPrimDefinition from the given +primType and list of appliedSchemas . +This prim definition will contain a union of properties from the +registered prim definitions of each of the provided types. + +Parameters + +primType (str) – +appliedAPISchemas (list[TfToken]) – + +FindAppliedAPIPrimDefinition(typeName) → PrimDefinition +Finds the prim definition for the given typeName token if +typeName is a registered applied API schema type. +Returns null if it is not. + +Parameters +typeName (str) – + +FindConcretePrimDefinition(typeName) → PrimDefinition +Finds the prim definition for the given typeName token if +typeName is a registered concrete typed schema type. +Returns null if it is not. + +Parameters +typeName (str) – + +static GetAPISchemaCanOnlyApplyToTypeNames() +classmethod GetAPISchemaCanOnlyApplyToTypeNames(apiSchemaName, instanceName) -> list[TfToken] +Returns a list of prim type names that the given apiSchemaName can +only be applied to. +A non-empty list indicates that the API schema can only be applied to +prim that are or derive from prim type names in the list. If the list +is empty, the API schema can be applied to prims of any type. +If a non-empty instanceName is provided, this will first look for +a list of”can only apply to”names specific to that instance of the API +schema and return that if found. If a list is not found for the +specific instance, it will fall back to looking for a”can only apply +to”list for just the schema name itself. + +Parameters + +apiSchemaName (str) – +instanceName (str) – + +static GetAPISchemaTypeName() +classmethod GetAPISchemaTypeName(schemaType) -> str +Return the type name in the USD schema for API schema types only from +the given registered schemaType . + +Parameters +schemaType (Type) – + +static GetAPITypeFromSchemaTypeName() +classmethod GetAPITypeFromSchemaTypeName(typeName) -> Type +Return the TfType of the schema corresponding to the given API schema +type name typeName . +This the inverse of GetAPISchemaTypeNAme. + +Parameters +typeName (str) – + +static GetAutoApplyAPISchemas() +classmethod GetAutoApplyAPISchemas() -> map[str, list[TfToken]] +Returns a map of the names of all registered auto apply API schemas to +the list of type names each is registered to be auto applied to. +The list of type names to apply to will directly match what is +specified in the plugin metadata for each schema type. While auto +apply schemas do account for the existence and validity of the type +names and expand to include derived types of the listed types, the +type lists returned by this function do not. + +static GetConcreteSchemaTypeName() +classmethod GetConcreteSchemaTypeName(schemaType) -> str +Return the type name in the USD schema for concrete prim types only +from the given registered schemaType . + +Parameters +schemaType (Type) – + +static GetConcreteTypeFromSchemaTypeName() +classmethod GetConcreteTypeFromSchemaTypeName(typeName) -> Type +Return the TfType of the schema corresponding to the given concrete +prim type name typeName . +This the inverse of GetConcreteSchemaTypeName. + +Parameters +typeName (str) – + +GetEmptyPrimDefinition() → PrimDefinition +Returns the empty prim definition. + +GetFallbackPrimTypes() → VtDictionary +Returns a dictionary mapping concrete schema prim type names to a +VtTokenArray of fallback prim type names if fallback types are defined +for the schema type in its registered schema. +The standard use case for this to provide schema defined metadata that +can be saved with a stage to inform an older version of USD - that may +not have some schema types - as to which types it can used instead +when encountering a prim of one these types. +UsdStage::WriteFallbackPrimTypes +Fallback Prim Types + +static GetMultipleApplyNameTemplateBaseName() +classmethod GetMultipleApplyNameTemplateBaseName(nameTemplate) -> str +Returns the base name for the multiple apply schema name template +nameTemplate . +The base name is the substring of the given name template that comes +after the instance name placeholder and the subsequent namespace +delimiter. If the given property name does not contain the instance +name placeholder, it is not a name template and the name template is +returned as is. + +Parameters +nameTemplate (str) – + +static GetSchemaKind() +classmethod GetSchemaKind(schemaType) -> SchemaKind +Returns the kind of the schema the given schemaType represents. +This returns UsdSchemaKind::Invalid if schemaType is not a valid +schema type or if the kind cannot be determined from type’s plugin +information. + +Parameters +schemaType (Type) – + +GetSchemaKind(typeName) -> SchemaKind +Returns the kind of the schema the given typeName represents. +This returns UsdSchemaKind::Invalid if typeName is not a valid +schema type name or if the kind cannot be determined from type’s +plugin information. + +Parameters +typeName (str) – + +static GetSchemaTypeName() +classmethod GetSchemaTypeName(schemaType) -> str +Return the type name in the USD schema for prims or API schemas of the +given registered schemaType . + +Parameters +schemaType (Type) – + +GetSchemaTypeName() -> str +Return the type name in the USD schema for prims or API schemas of the +given registered SchemaType . + +static GetTypeFromName() +classmethod GetTypeFromName(typeName) -> Type +Finds the TfType of a schema with typeName . +This is primarily for when you have been provided Schema typeName +(perhaps from a User Interface or Script) and need to identify if a +prim’s type inherits/is that typeName. If the type name IS known, then +using the schema class is preferred. +# This code attempts to match all prims on a stage to a given +# user specified type, making the traditional schema based idioms not +# applicable. +data = parser.parse_args() +tfType = UsdSchemaRegistry.GetTypeFromName(data.type) +matchedPrims = [p for p in stage.Traverse() if p.IsA(tfType)] + +It’s worth noting that GetTypeFromName(“Sphere”) == +GetTypeFromName(“UsdGeomSphere”), as this function resolves both the +Schema’s C++ class name and any registered aliases from a modules +plugInfo.json file. However, GetTypeFromName(“Boundable”) != +GetTypeFromName(“UsdGeomBoundable”) because type aliases don’t get +registered for abstract schema types. + +Parameters +typeName (str) – + +static GetTypeFromSchemaTypeName() +classmethod GetTypeFromSchemaTypeName(typeName) -> Type +Return the TfType of the schema corresponding to the given prim or API +schema name typeName . +This the inverse of GetSchemaTypeName. + +Parameters +typeName (str) – + +static GetTypeNameAndInstance() +classmethod GetTypeNameAndInstance(apiSchemaName) -> tuple[str, str] +Returns the schema type name and the instance name parsed from the +given apiSchemaName . +apiSchemaName is the name of an applied schema as it appears in +the list of applied schemas on a prim. For single-apply API schemas +the name will just be the schema type name. For multiple-apply schemas +the name should include the schema type name and the applied instance +name separated by a namespace delimiter, for +example’CollectionAPI:plasticStuff’. +This function returns the separated schema type name and instance name +component tokens if possible, otherwise it returns the +apiSchemaName as the type name and an empty instance name. +Note that no validation is done on the returned tokens. Clients are +advised to use GetTypeFromSchemaTypeName() to validate the typeName +token. +UsdPrim::AddAppliedSchema(const TfToken&) const +UsdPrim::GetAppliedSchemas() const + +Parameters +apiSchemaName (str) – + +static IsAbstract() +classmethod IsAbstract(primType) -> bool +Returns true if the prim type primType is an abstract schema type +and, unlike a concrete type, is not instantiable in scene description. + +Parameters +primType (Type) – + +IsAbstract(primType) -> bool +Returns true if the prim type primType is an abstract schema type +and, unlike a concrete type, is not instantiable in scene description. + +Parameters +primType (str) – + +static IsAllowedAPISchemaInstanceName() +classmethod IsAllowedAPISchemaInstanceName(apiSchemaName, instanceName) -> bool +Returns true if the given instanceName is an allowed instance name +for the multiple apply API schema named apiSchemaName . +Any instance name that matches the name of a property provided by the +API schema is disallowed and will return false. If the schema type has +plugin metadata that specifies allowed instance names, then only those +specified names are allowed for the schema type. If the instance name +is empty or the API is not a multiple apply schema, this will return +false. + +Parameters + +apiSchemaName (str) – +instanceName (str) – + +static IsAppliedAPISchema() +classmethod IsAppliedAPISchema(apiSchemaType) -> bool +Returns true if apiSchemaType is an applied API schema type. + +Parameters +apiSchemaType (Type) – + +IsAppliedAPISchema(apiSchemaType) -> bool +Returns true if apiSchemaType is an applied API schema type. + +Parameters +apiSchemaType (str) – + +static IsConcrete() +classmethod IsConcrete(primType) -> bool +Returns true if the prim type primType is instantiable in scene +description. + +Parameters +primType (Type) – + +IsConcrete(primType) -> bool +Returns true if the prim type primType is instantiable in scene +description. + +Parameters +primType (str) – + +static IsDisallowedField() +classmethod IsDisallowedField(fieldName) -> bool +Returns true if the field fieldName cannot have fallback values +specified in schemas. +Fields are generally disallowed because their fallback values aren’t +used. For instance, fallback values for composition arcs aren’t used +during composition, so allowing them to be set in schemas would be +misleading. + +Parameters +fieldName (str) – + +static IsMultipleApplyAPISchema() +classmethod IsMultipleApplyAPISchema(apiSchemaType) -> bool +Returns true if apiSchemaType is a multiple-apply API schema type. + +Parameters +apiSchemaType (Type) – + +IsMultipleApplyAPISchema(apiSchemaType) -> bool +Returns true if apiSchemaType is a multiple-apply API schema type. + +Parameters +apiSchemaType (str) – + +static IsMultipleApplyNameTemplate() +classmethod IsMultipleApplyNameTemplate(nameTemplate) -> bool +Returns true if nameTemplate is a multiple apply schema name +template. +The given nameTemplate is a name template if and only if it +contains the instance name place holder”__INSTANCE_NAME__”as an exact +match as one of the tokenized components of the name tokenized by the +namespace delimiter. + +Parameters +nameTemplate (str) – + +static IsTyped() +classmethod IsTyped(primType) -> bool +Returns true if the prim type primType inherits from UsdTyped. + +Parameters +primType (Type) – + +static MakeMultipleApplyNameInstance() +classmethod MakeMultipleApplyNameInstance(nameTemplate, instanceName) -> str +Returns an instance of a multiple apply schema name from the given +nameTemplate for the given instanceName . +The returned name is created by replacing the instance name +placeholder”__INSTANCE_NAME__”in the name template with the given +instance name. If the instance name placeholder is not found in +nameTemplate , then the name template is not multiple apply name +template and is returned as is. +Note that the instance name placeholder must be found as an exact full +word match with one of the tokenized components of the name template, +when tokenized by the namespace delimiter, in order for it to be +treated as a placeholder and substituted with the instance name. + +Parameters + +nameTemplate (str) – +instanceName (str) – + +static MakeMultipleApplyNameTemplate() +classmethod MakeMultipleApplyNameTemplate(namespacePrefix, baseName) -> str +Creates a name template that can represent a property or API schema +that belongs to a multiple apply schema and will therefore have +multiple instances with different names. +The name template is created by joining the namespacePrefix , the +instance name placeholder”__INSTANCE_NAME__”, and the baseName +using the namespace delimiter. Therefore the returned name template +will be of one of the following forms depending on whether either of +the inputs is empty: + +namespacePrefix: INSTANCE_NAME :baseName +namespacePrefix: INSTANCE_NAME +INSTANCE_NAME :baseName +INSTANCE_NAME + +Name templates can be passed to MakeMultipleApplyNameInstance along +with an instance name to create the name for a particular instance. + +Parameters + +namespacePrefix (str) – +baseName (str) – + +property expired +True if this object has expired, False otherwise. + +class pxr.Usd.Specializes +A proxy class for applying listOp edits to the specializes list for a +prim. +All paths passed to the UsdSpecializes API are expected to be in the +namespace of the owning prim’s stage. Subroot prim specializes paths +will be translated from this namespace to the namespace of the current +edit target, if necessary. If a path cannot be translated, a coding +error will be issued and no changes will be made. Root prim +specializes paths will not be translated. +Methods: + +AddSpecialize(primPath, position) +Adds a path to the specializes listOp at the current EditTarget, in the position specified by position . + +ClearSpecializes() +Removes the authored specializes listOp edits at the current edit target. + +GetPrim() +Return the prim this object is bound to. + +RemoveSpecialize(primPath) +Removes the specified path from the specializes listOp at the current EditTarget. + +SetSpecializes(items) +Explicitly set specializes paths, potentially blocking weaker opinions that add or remove items, returning true on success, false if the edit could not be performed. + +AddSpecialize(primPath, position) → bool +Adds a path to the specializes listOp at the current EditTarget, in +the position specified by position . + +Parameters + +primPath (Path) – +position (ListPosition) – + +ClearSpecializes() → bool +Removes the authored specializes listOp edits at the current edit +target. + +GetPrim() → Prim +Return the prim this object is bound to. + +GetPrim() -> Prim + +RemoveSpecialize(primPath) → bool +Removes the specified path from the specializes listOp at the current +EditTarget. + +Parameters +primPath (Path) – + +SetSpecializes(items) → bool +Explicitly set specializes paths, potentially blocking weaker opinions +that add or remove items, returning true on success, false if the edit +could not be performed. + +Parameters +items (list[SdfPath]) – + +class pxr.Usd.Stage +The outermost container for scene description, which owns and presents +composed prims as a scenegraph, following the composition recipe +recursively described in its associated”root layer”. +USD derives its persistent-storage scalability by combining and +reusing simple compositions into richer aggregates using referencing +and layering with sparse overrides. Ultimately, every composition +(i.e.”scene”) is identifiable by its root layer, i.e. the .usd +file, and a scene is instantiated in an application on a UsdStage that +presents a composed view of the scene’s root layer. Each simple +composition referenced into a larger composition could be presented on +its own UsdStage, at the same (or not) time that it is participating +in the larger composition on its own UsdStage; all of the underlying +layers will be shared by the two stages, while each maintains its own +scenegraph of composed prims. +A UsdStage has sole ownership over the UsdPrim ‘s with which it is +populated, and retains shared ownership (with other stages and +direct clients of SdfLayer ‘s, via the Sdf_LayerRegistry that +underlies all SdfLayer creation methods) of layers. It provides +roughly five categories of API that address different aspects of scene +management: + +Stage lifetime management methods for constructing and initially +populating a UsdStage from an existing layer file, or one that will be +created as a result, in memory or on the filesystem. +Load/unload working set management methods that allow you to +specify which payloads should be included and excluded from the +stage’s composition. +Variant management methods to manage policy for which variant to +use when composing prims that provide a named variant set, but do not +specify a selection. +Prim access, creation, and mutation methods that allow you to +find, create, or remove a prim identified by a path on the stage. This +group also provides methods for efficiently traversing the prims on +the stage. +Layers and EditTargets methods provide access to the layers in +the stage’s root LayerStack (i.e. the root layer and all of its +recursive sublayers), and the ability to set a UsdEditTarget into +which all subsequent mutations to objects associated with the stage +(e.g. prims, properties, etc) will go. +Serialization methods for”flattening”a composition (to varying +degrees), and exporting a completely flattened view of the stage to a +string or file. These methods can be very useful for targeted asset +optimization and debugging, though care should be exercized with large +scenes, as flattening defeats some of the benefits of referenced scene +description, and may produce very large results, especially in file +formats that do not support data de-duplication, like the usda ASCII +format! + +## Stage Session Layers + +Each UsdStage can possess an optional”session layer”. The purpose of a +session layer is to hold ephemeral edits that modify a UsdStage ‘s +contents or behavior in a way that is useful to the client, but should +not be considered as permanent mutations to be recorded upon export. A +very common use of session layers is to make variant selections, to +pick a specific LOD or shading variation, for example. The session +layer is also frequently used to perform interactive vising/invsning +of geometry and assets in the scene. A session layer, if present, +contributes to a UsdStage ‘s identity, for purposes of stage-caching, +etc. +Classes: + +InitialLoadSet +Specifies the initial set of prims to load when opening a UsdStage. + +Methods: + +ClearDefaultPrim() +Clear the default prim layer metadata in this stage's root layer. + +ClearMetadata(key) +Clear the value of stage metadatum key , if the stage's current UsdEditTarget is the root or session layer. + +ClearMetadataByDictKey(key, keyPath) +Clear any authored value identified by key and keyPath at the current EditTarget. + +CreateClassPrim(rootPrimPath) +Author an SdfPrimSpec with specifier == SdfSpecifierClass for the class at root prim path path at the current EditTarget. + +CreateInMemory +classmethod CreateInMemory(load) -> Stage + +CreateNew +classmethod CreateNew(identifier, load) -> Stage + +DefinePrim(path, typeName) +Attempt to ensure a UsdPrim at path is defined (according to UsdPrim::IsDefined() ) on this stage. + +ExpandPopulationMask(relPred, attrPred) +Expand this stage's population mask to include the targets of all relationships that pass relPred and connections to all attributes that pass attrPred recursively. + +Export(filename, addSourceFileComment, args) +Writes out the composite scene as a single flattened layer into filename. + +ExportToString(result, addSourceFileComment) +Writes the composite scene as a flattened Usd text representation into the given string. + +FindLoadable(rootPath) +Returns an SdfPathSet of all paths that can be loaded. + +Flatten(addSourceFileComment) +Returns a single, anonymous, merged layer for this composite scene. + +GetAttributeAtPath(path) +Return the UsdAttribute at path , or an invalid UsdAttribute if none exists. + +GetColorConfigFallbacks +classmethod GetColorConfigFallbacks(colorConfiguration, colorManagementSystem) -> None + +GetColorConfiguration() +Returns the default color configuration used to interpret the per- attribute color-spaces in the composed USD stage. + +GetColorManagementSystem() +Sets the name of the color management system to be used for loading and interpreting the color configuration file. + +GetDefaultPrim() +Return the root UsdPrim on this stage whose name is the root layer's defaultPrim metadata's value. + +GetEditTarget() +Return the stage's EditTarget. + +GetEditTargetForLocalLayer(i) +Return a UsdEditTarget for editing the layer at index i in the layer stack. + +GetEndTimeCode() +Returns the stage's end timeCode. + +GetFramesPerSecond() +Returns the stage's framesPerSecond value. + +GetGlobalVariantFallbacks +classmethod GetGlobalVariantFallbacks() -> PcpVariantFallbackMap + +GetInterpolationType() +Returns the interpolation type used during value resolution for all attributes on this stage. + +GetLayerStack(includeSessionLayers) +Return this stage's local layers in strong-to-weak order. + +GetLoadRules() +Return the stage's current UsdStageLoadRules governing payload inclusion. + +GetLoadSet() +Returns a set of all loaded paths. + +GetMetadata(key, value) +Return in value an authored or fallback value (if one was defined for the given metadatum) for Stage metadatum key . + +GetMetadataByDictKey(key, keyPath, value) +Resolve the requested dictionary sub-element keyPath of dictionary-valued metadatum named key , returning the resolved value. + +GetMutedLayers() +Returns a vector of all layers that have been muted on this stage. + +GetObjectAtPath(path) +Return the UsdObject at path , or an invalid UsdObject if none exists. + +GetPathResolverContext() +Return the path resolver context for all path resolution during composition of this stage. + +GetPopulationMask() +Return this stage's population mask. + +GetPrimAtPath(path) +Return the UsdPrim at path , or an invalid UsdPrim if none exists. + +GetPropertyAtPath(path) +Return the UsdProperty at path , or an invalid UsdProperty if none exists. + +GetPrototypes() +Returns all native instancing prototype prims. + +GetPseudoRoot() +Return the stage's"pseudo-root"prim, whose name is defined by Usd. + +GetRelationshipAtPath(path) +Return the UsdAttribute at path , or an invalid UsdAttribute if none exists. + +GetRootLayer() +Return this stage's root layer. + +GetSessionLayer() +Return this stage's root session layer. + +GetStartTimeCode() +Returns the stage's start timeCode. + +GetTimeCodesPerSecond() +Returns the stage's timeCodesPerSecond value. + +GetUsedLayers(includeClipLayers) +Return a vector of all of the layers currently consumed by this stage, as determined by the composition arcs that were traversed to compose and populate the stage. + +HasAuthoredMetadata(key) +Returns true if the key has an authored value, false if no value was authored or the only value available is the SdfSchema 's metadata fallback. + +HasAuthoredMetadataDictKey(key, keyPath) +Return true if there exists any authored opinion (excluding fallbacks) for key and keyPath . + +HasAuthoredTimeCodeRange() +Returns true if the stage has both start and end timeCodes authored in the session layer or the root layer of the stage. + +HasDefaultPrim() +Return true if this stage's root layer has an authored opinion for the default prim layer metadata. + +HasLocalLayer(layer) +Return true if layer is one of the layers in this stage's local, root layerStack. + +HasMetadata(key) +Returns true if the key has a meaningful value, that is, if GetMetadata() will provide a value, either because it was authored or because the Stage metadata was defined with a meaningful fallback value. + +HasMetadataDictKey(key, keyPath) +Return true if there exists any authored or fallback opinion for key and keyPath . + +IsLayerMuted(layerIdentifier) +Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise. + +IsSupportedFile +classmethod IsSupportedFile(filePath) -> bool + +Load(path, policy) +Modify this stage's load rules to load the prim at path , its ancestors, and all of its descendants if policy is UsdLoadWithDescendants. + +LoadAndUnload(loadSet, unloadSet, policy) +Unload and load the given path sets. + +MuteAndUnmuteLayers(muteLayers, unmuteLayers) +Mute and unmute the layers identified in muteLayers and unmuteLayers . + +MuteLayer(layerIdentifier) +Mute the layer identified by layerIdentifier . + +Open +classmethod Open(filePath, load) -> Stage + +OpenMasked +classmethod OpenMasked(filePath, mask, load) -> Stage + +OverridePrim(path) +Attempt to ensure a UsdPrim at path exists on this stage. + +Reload() +Calls SdfLayer::Reload on all layers contributing to this stage, except session layers and sublayers of session layers. + +RemovePrim(path) +Remove all scene description for the given path and its subtree in the current UsdEditTarget. + +ResolveIdentifierToEditTarget(identifier) +Resolve the given identifier using this stage's ArResolverContext and the layer of its GetEditTarget() as an anchor for relative references (e.g. + +Save() +Calls SdfLayer::Save on all dirty layers contributing to this stage except session layers and sublayers of session layers. + +SaveSessionLayers() +Calls SdfLayer::Save on all dirty session layers and sublayers of session layers contributing to this stage. + +SetColorConfigFallbacks +classmethod SetColorConfigFallbacks(colorConfiguration, colorManagementSystem) -> None + +SetColorConfiguration(colorConfig) +Sets the default color configuration to be used to interpret the per- attribute color-spaces in the composed USD stage. + +SetColorManagementSystem(cms) +Sets the name of the color management system used to interpret the color configuration file pointed at by the colorConfiguration metadata. + +SetDefaultPrim(prim) +Set the default prim layer metadata in this stage's root layer. + +SetEditTarget(editTarget) +Set the stage's EditTarget. + +SetEndTimeCode(arg1) +Sets the stage's end timeCode. + +SetFramesPerSecond(framesPerSecond) +Sets the stage's framesPerSecond value. + +SetGlobalVariantFallbacks +classmethod SetGlobalVariantFallbacks(fallbacks) -> None + +SetInterpolationType(interpolationType) +Sets the interpolation type used during value resolution for all attributes on this stage. + +SetLoadRules(rules) +Set the UsdStageLoadRules to govern payload inclusion on this stage. + +SetMetadata(key, value) +Set the value of Stage metadatum key to value , if the stage's current UsdEditTarget is the root or session layer. + +SetMetadataByDictKey(key, keyPath, value) +Author value to the field identified by key and keyPath at the current EditTarget. + +SetPopulationMask(mask) +Set this stage's population mask and recompose the stage. + +SetStartTimeCode(arg1) +Sets the stage's start timeCode. + +SetTimeCodesPerSecond(timeCodesPerSecond) +Sets the stage's timeCodesPerSecond value. + +Traverse() +Traverse the active, loaded, defined, non-abstract prims on this stage depth-first. + +TraverseAll() +Traverse all the prims on this stage depth-first. + +Unload(path) +Modify this stage's load rules to unload the prim and its descendants specified by path . + +UnmuteLayer(layerIdentifier) +Unmute the layer identified by layerIdentifier if it had previously been muted. + +WriteFallbackPrimTypes() +Writes the fallback prim types defined in the schema registry to the stage as dictionary valued fallback prim type metadata. + +Attributes: + +LoadAll + +LoadNone + +expired +True if this object has expired, False otherwise. + +class InitialLoadSet +Specifies the initial set of prims to load when opening a UsdStage. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.Stage.LoadAll, Usd.Stage.LoadNone) + +ClearDefaultPrim() → None +Clear the default prim layer metadata in this stage’s root layer. +This is shorthand for: + stage->GetRootLayer()->ClearDefaultPrim(); + +Note that this function always authors to the stage's root layer. To + +author to a different layer, use the SdfLayer::SetDefaultPrim() API. + +ClearMetadata(key) → bool +Clear the value of stage metadatum key , if the stage’s current +UsdEditTarget is the root or session layer. +If the current EditTarget is any other layer, raise a coding error. +true if authoring was successful, false otherwise. Generates a coding +error if key is not allowed as layer metadata. +General Metadata in USD + +Parameters +key (str) – + +ClearMetadataByDictKey(key, keyPath) → bool +Clear any authored value identified by key and keyPath at the +current EditTarget. +The keyPath is a’:’-separated path identifying a path in +subdictionaries stored in the metadata field at key . If +keyPath is empty, no action is taken. +true if the value is cleared successfully, false otherwise. Generates +a coding error if key is not allowed as layer metadata. +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – + +CreateClassPrim(rootPrimPath) → Prim +Author an SdfPrimSpec with specifier == SdfSpecifierClass for +the class at root prim path path at the current EditTarget. +The current EditTarget must have UsdEditTarget::IsLocalLayer() == +true. +The given path must be an absolute, root prim path that does not +contain any variant selections. +If a defined ( UsdPrim::IsDefined() ) non-class prim already exists at +path , issue an error and return an invalid UsdPrim. +If it is impossible to author the necessary PrimSpec, issue an error +and return an invalid UsdPrim. + +Parameters +rootPrimPath (Path) – + +static CreateInMemory() +classmethod CreateInMemory(load) -> Stage +Creates a new stage only in memory, analogous to creating an anonymous +SdfLayer. +If pathResolverContext is provided it will be bound when creating +the root layer at identifier and whenever asset path resolution is +done for this stage, regardless of what other context may be bound at +that time. Otherwise Usd will create the root layer with no context +bound, then create a context for all future asset path resolution for +the stage by calling ArResolver::CreateDefaultContext. +The initial set of prims to load on the stage can be specified using +the load parameter. +UsdStage::InitialLoadSet. Invoking an overload that does not take a +sessionLayer argument will create a stage with an anonymous in- +memory session layer. To create a stage without a session layer, pass +TfNullPtr (or None in python) as the sessionLayer argument. + +Parameters +load (InitialLoadSet) – + +CreateInMemory(identifier, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +load (InitialLoadSet) – + +CreateInMemory(identifier, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +CreateInMemory(identifier, sessionLayer, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +sessionLayer (Layer) – +load (InitialLoadSet) – + +CreateInMemory(identifier, sessionLayer, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +static CreateNew() +classmethod CreateNew(identifier, load) -> Stage +Create a new stage with root layer identifier , destroying +potentially existing files with that identifier; it is considered an +error if an existing, open layer is present with this identifier. +SdfLayer::CreateNew() Invoking an overload that does not take a +sessionLayer argument will create a stage with an anonymous in- +memory session layer. To create a stage without a session layer, pass +TfNullPtr (or None in python) as the sessionLayer argument. The +initial set of prims to load on the stage can be specified using the +load parameter. +UsdStage::InitialLoadSet. If pathResolverContext is provided it +will be bound when creating the root layer at identifier and +whenever asset path resolution is done for this stage, regardless of +what other context may be bound at that time. Otherwise Usd will +create the root layer with no context bound, then create a context for +all future asset path resolution for the stage by calling +ArResolver::CreateDefaultContextForAsset with the root layer’s +repository path if the layer has one, otherwise its resolved path. + +Parameters + +identifier (str) – +load (InitialLoadSet) – + +CreateNew(identifier, sessionLayer, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +sessionLayer (Layer) – +load (InitialLoadSet) – + +CreateNew(identifier, sessionLayer, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +CreateNew(identifier, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +identifier (str) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +DefinePrim(path, typeName) → Prim +Attempt to ensure a UsdPrim at path is defined (according to +UsdPrim::IsDefined() ) on this stage. +If a prim at path is already defined on this stage and +typeName is empty or equal to the existing prim’s typeName, return +that prim. Otherwise author an SdfPrimSpec with specifier == +SdfSpecifierDef and typeName for the prim at path at the +current EditTarget. Author SdfPrimSpec s with specifier == +SdfSpecifierDef and empty typeName at the current EditTarget for any +nonexistent, or existing but not Defined ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace or one of the ancestors of path is inactive on the +UsdStage), issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not match the supplied typeName , in case a stronger typeName +opinion overrides the opinion at the current EditTarget. + +Parameters + +path (Path) – +typeName (str) – + +ExpandPopulationMask(relPred, attrPred) → None +Expand this stage’s population mask to include the targets of all +relationships that pass relPred and connections to all attributes +that pass attrPred recursively. +If relPred is null, include all relationship targets; if +attrPred is null, include all connections. +This function can be used, for example, to expand a population mask +for a given prim to include bound materials, if those bound materials +are expressed as relationships or attribute connections. +See also UsdPrim::FindAllRelationshipTargetPaths() and +UsdPrim::FindAllAttributeConnectionPaths() . + +Parameters + +relPred (function[bool( Relationship )]) – +attrPred (function[bool( Attribute )]) – + +Export(filename, addSourceFileComment, args) → bool +Writes out the composite scene as a single flattened layer into +filename. +If addSourceFileComment is true, a comment in the output layer will +mention the input layer it was generated from. +See UsdStage::Flatten for details of the flattening transformation. + +Parameters + +filename (str) – +addSourceFileComment (bool) – +args (Layer.FileFormatArguments) – + +ExportToString(result, addSourceFileComment) → bool +Writes the composite scene as a flattened Usd text representation into +the given string. +If addSourceFileComment is true, a comment in the output layer will +mention the input layer it was generated from. +See UsdStage::Flatten for details of the flattening transformation. + +Parameters + +result (str) – +addSourceFileComment (bool) – + +FindLoadable(rootPath) → SdfPathSet +Returns an SdfPathSet of all paths that can be loaded. +Note that this method does not return paths to inactive prims as they +cannot be loaded. +The set returned includes loaded and unloaded paths. To determine the +set of unloaded paths, one can diff this set with the current load +set, for example: +SdfPathSet loaded = stage->GetLoadSet(), + all = stage->FindLoadable(), + result; +std::set_difference(loaded.begin(), loaded.end(), + all.begin(), all.end(), + std::inserter(result, result.end())); + +See Working Set Management for more information. + +Parameters +rootPath (Path) – + +Flatten(addSourceFileComment) → Layer +Returns a single, anonymous, merged layer for this composite scene. +Specifically, this function removes most composition metadata and +authors the resolved values for each object directly into the +flattened layer. +All VariantSets are removed and only the currently selected variants +will be present in the resulting layer. +Class prims will still exist, however all inherits arcs will have been +removed and the inherited data will be copied onto each child object. +Composition arcs authored on the class itself will be flattened into +the class. +Flatten preserves scenegraph instancing by creating independent roots +for each prototype currently composed on this stage, and adding a +single internal reference arc on each instance prim to its +corresponding prototype. +Time samples across sublayer offsets will will have the time offset +and scale applied to each time index. +Finally, any deactivated prims will be pruned from the result. + +Parameters +addSourceFileComment (bool) – + +GetAttributeAtPath(path) → Attribute +Return the UsdAttribute at path , or an invalid UsdAttribute if +none exists. +This is equivalent to +stage.GetObjectAtPath(path).As(); + +GetObjectAtPath(const SdfPath&) const + +Parameters +path (Path) – + +static GetColorConfigFallbacks() +classmethod GetColorConfigFallbacks(colorConfiguration, colorManagementSystem) -> None +Returns the global fallback values +of’colorConfiguration’and’colorManagementSystem’. +These are set in the plugInfo.json file of a plugin, but can be +overridden by calling the static method SetColorConfigFallbacks() . +The python wrapping of this method returns a tuple containing +(colorConfiguration, colorManagementSystem). +SetColorConfigFallbacks, Color Configuration API + +Parameters + +colorConfiguration (AssetPath) – +colorManagementSystem (str) – + +GetColorConfiguration() → AssetPath +Returns the default color configuration used to interpret the per- +attribute color-spaces in the composed USD stage. +Color Configuration API + +GetColorManagementSystem() → str +Sets the name of the color management system to be used for loading +and interpreting the color configuration file. +Color Configuration API + +GetDefaultPrim() → Prim +Return the root UsdPrim on this stage whose name is the root layer’s +defaultPrim metadata’s value. +Return an invalid prim if there is no such prim or if the root layer’s +defaultPrim metadata is unset or is not a valid prim name. Note that +this function only examines this stage’s rootLayer. It does not +consider sublayers of the rootLayer. See also +SdfLayer::GetDefaultPrim() . + +GetEditTarget() → EditTarget +Return the stage’s EditTarget. + +GetEditTargetForLocalLayer(i) → EditTarget +Return a UsdEditTarget for editing the layer at index i in the layer +stack. +This edit target will incorporate any layer time offset that applies +to the sublayer. + +Parameters +i (int) – + +GetEditTargetForLocalLayer(layer) -> EditTarget +Return a UsdEditTarget for editing the given local layer. +If the given layer appears more than once in the layer stack, the time +offset to the first occurrence will be used. + +Parameters +layer (Layer) – + +GetEndTimeCode() → float +Returns the stage’s end timeCode. +If the stage has an associated session layer with an end timeCode +opinion, this value is returned. Otherwise, the end timeCode opinion +from the root layer is returned. + +GetFramesPerSecond() → float +Returns the stage’s framesPerSecond value. +This makes an advisory statement about how the contained data can be +most usefully consumed and presented. It’s primarily an indication of +the expected playback rate for the data, but a timeline editing tool +might also want to use this to decide how to scale and label its +timeline. +The default value of framesPerSecond is 24. + +static GetGlobalVariantFallbacks() +classmethod GetGlobalVariantFallbacks() -> PcpVariantFallbackMap +Get the global variant fallback preferences used in new UsdStages. + +GetInterpolationType() → InterpolationType +Returns the interpolation type used during value resolution for all +attributes on this stage. + +GetLayerStack(includeSessionLayers) → list[SdfLayerHandle] +Return this stage’s local layers in strong-to-weak order. +If includeSessionLayers is true, return the linearized strong-to- +weak sublayers rooted at the stage’s session layer followed by the +linearized strong-to-weak sublayers rooted at this stage’s root layer. +If includeSessionLayers is false, omit the sublayers rooted at this +stage’s session layer. + +Parameters +includeSessionLayers (bool) – + +GetLoadRules() → StageLoadRules +Return the stage’s current UsdStageLoadRules governing payload +inclusion. +See Working Set Management for more information. + +GetLoadSet() → SdfPathSet +Returns a set of all loaded paths. +The paths returned are both those that have been explicitly loaded and +those that were loaded as a result of dependencies, ancestors or +descendants of explicitly loaded paths. +This method does not return paths to inactive prims. +See Working Set Management for more information. + +GetMetadata(key, value) → bool +Return in value an authored or fallback value (if one was defined +for the given metadatum) for Stage metadatum key . +Order of resolution is session layer, followed by root layer, else +fallback to the SdfSchema. +true if we successfully retrieved a value of the requested type; false +if key is not allowed as layer metadata or no value was found. +Generates a coding error if we retrieved a stored value of a type +other than the requested type +General Metadata in USD + +Parameters + +key (str) – +value (T) – + +GetMetadata(key, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +key (str) – +value (VtValue) – + +GetMetadataByDictKey(key, keyPath, value) → bool +Resolve the requested dictionary sub-element keyPath of +dictionary-valued metadatum named key , returning the resolved +value. +If you know you need just a small number of elements from a +dictionary, accessing them element-wise using this method can be much +less expensive than fetching the entire dictionary with +GetMetadata(key). +true if we successfully retrieved a value of the requested type; false +if key is not allowed as layer metadata or no value was found. +Generates a coding error if we retrieved a stored value of a type +other than the requested type The keyPath is a’:’-separated path +addressing an element in subdictionaries. If keyPath is empty, +returns an empty VtValue. + +Parameters + +key (str) – +keyPath (str) – +value (T) – + +GetMetadataByDictKey(key, keyPath, value) -> bool +overload + +Parameters + +key (str) – +keyPath (str) – +value (VtValue) – + +GetMutedLayers() → list[str] +Returns a vector of all layers that have been muted on this stage. + +GetObjectAtPath(path) → Object +Return the UsdObject at path , or an invalid UsdObject if none +exists. +If path indicates a prim beneath an instance, returns an instance +proxy prim if a prim exists at the corresponding path in that +instance’s prototype. If path indicates a property beneath a child +of an instance, returns a property whose parent prim is an instance +proxy prim. +Example: +if (UsdObject obj = stage->GetObjectAtPath(path)) { + if (UsdPrim prim = obj.As()) { + // Do things with prim + } + else if (UsdProperty prop = obj.As()) { + // Do things with property. We can also cast to + // UsdRelationship or UsdAttribute using this same pattern. + } +} +else { + // No object at specified path +} + +Parameters +path (Path) – + +GetPathResolverContext() → ResolverContext +Return the path resolver context for all path resolution during +composition of this stage. +Useful for external clients that want to resolve paths with the same +context as this stage, or create new stages with the same context. + +GetPopulationMask() → StagePopulationMask +Return this stage’s population mask. + +GetPrimAtPath(path) → Prim +Return the UsdPrim at path , or an invalid UsdPrim if none exists. +If path indicates a prim beneath an instance, returns an instance +proxy prim if a prim exists at the corresponding path in that +instance’s prototype. +Unlike OverridePrim() and DefinePrim() , this method will never author +scene description, and therefore is safe to use as a”reader”in the Usd +multi-threading model. + +Parameters +path (Path) – + +GetPropertyAtPath(path) → Property +Return the UsdProperty at path , or an invalid UsdProperty if none +exists. +This is equivalent to +stage.GetObjectAtPath(path).As(); + +GetObjectAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetPrototypes() → list[Prim] +Returns all native instancing prototype prims. + +GetPseudoRoot() → Prim +Return the stage’s”pseudo-root”prim, whose name is defined by Usd. +The stage’s named root prims are namespace children of this prim, +which exists to make the namespace hierarchy a tree instead of a +forest. This simplifies algorithms that want to traverse all prims. +A UsdStage always has a pseudo-root prim, unless there was an error +opening or creating the stage, in which case this method returns an +invalid UsdPrim. + +GetRelationshipAtPath(path) → Relationship +Return the UsdAttribute at path , or an invalid UsdAttribute if +none exists. +This is equivalent to +stage.GetObjectAtPath(path).As(); + +GetObjectAtPath(const SdfPath&) const + +Parameters +path (Path) – + +GetRootLayer() → Layer +Return this stage’s root layer. + +GetSessionLayer() → Layer +Return this stage’s root session layer. + +GetStartTimeCode() → float +Returns the stage’s start timeCode. +If the stage has an associated session layer with a start timeCode +opinion, this value is returned. Otherwise, the start timeCode opinion +from the root layer is returned. + +GetTimeCodesPerSecond() → float +Returns the stage’s timeCodesPerSecond value. +The timeCodesPerSecond value scales the time ordinate for the samples +contained in the stage to seconds. If timeCodesPerSecond is 24, then a +sample at time ordinate 24 should be viewed exactly one second after +the sample at time ordinate 0. +Like SdfLayer::GetTimeCodesPerSecond, this accessor uses a dynamic +fallback to framesPerSecond. The order of precedence is: + +timeCodesPerSecond from session layer +timeCodesPerSecond from root layer +framesPerSecond from session layer +framesPerSecond from root layer +fallback value of 24 + +GetUsedLayers(includeClipLayers) → list[SdfLayerHandle] +Return a vector of all of the layers currently consumed by this +stage, as determined by the composition arcs that were traversed to +compose and populate the stage. +The list of consumed layers will change with the stage’s load-set and +variant selections, so the return value should be considered only a +snapshot. The return value will include the stage’s session layer, if +it has one. If includeClipLayers is true, we will also include all +of the layers that this stage has had to open so far to perform value +resolution of attributes affected by Value Clips + +Parameters +includeClipLayers (bool) – + +HasAuthoredMetadata(key) → bool +Returns true if the key has an authored value, false if no +value was authored or the only value available is the SdfSchema ‘s +metadata fallback. +If a value for a metadatum not legal to author on layers is present +in the root or session layer (which could happen through hand-editing +or use of certain low-level API’s), this method will still return +false . + +Parameters +key (str) – + +HasAuthoredMetadataDictKey(key, keyPath) → bool +Return true if there exists any authored opinion (excluding fallbacks) +for key and keyPath . +The keyPath is a’:’-separated path identifying a value in +subdictionaries stored in the metadata field at key . If +keyPath is empty, returns false . +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – + +HasAuthoredTimeCodeRange() → bool +Returns true if the stage has both start and end timeCodes authored in +the session layer or the root layer of the stage. + +HasDefaultPrim() → bool +Return true if this stage’s root layer has an authored opinion for the +default prim layer metadata. +This is shorthand for: + stage->GetRootLayer()->HasDefaultPrim(); + +Note that this function only consults the stage's root layer. To + +consult a different layer, use the SdfLayer::HasDefaultPrim() API. + +HasLocalLayer(layer) → bool +Return true if layer is one of the layers in this stage’s local, +root layerStack. + +Parameters +layer (Layer) – + +HasMetadata(key) → bool +Returns true if the key has a meaningful value, that is, if +GetMetadata() will provide a value, either because it was authored or +because the Stage metadata was defined with a meaningful fallback +value. +Returns false if key is not allowed as layer metadata. + +Parameters +key (str) – + +HasMetadataDictKey(key, keyPath) → bool +Return true if there exists any authored or fallback opinion for +key and keyPath . +The keyPath is a’:’-separated path identifying a value in +subdictionaries stored in the metadata field at key . If +keyPath is empty, returns false . +Returns false if key is not allowed as layer metadata. +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – + +IsLayerMuted(layerIdentifier) → bool +Returns true if the layer specified by layerIdentifier is muted in +this cache, false otherwise. +See documentation on MuteLayer for details on how layerIdentifier +is compared to the layers that have been muted. + +Parameters +layerIdentifier (str) – + +static IsSupportedFile() +classmethod IsSupportedFile(filePath) -> bool +Indicates whether the specified file is supported by UsdStage. +This function is a cheap way to determine whether a file might be +open-able with UsdStage::Open. It is purely based on the given +filePath and does not open the file or perform analysis on the +contents. As such, UsdStage::Open may still fail even if this function +returns true. + +Parameters +filePath (str) – + +Load(path, policy) → Prim +Modify this stage’s load rules to load the prim at path , its +ancestors, and all of its descendants if policy is +UsdLoadWithDescendants. +If policy is UsdLoadWithoutDescendants, then payloads on +descendant prims are not loaded. +See Working Set Management for more information. + +Parameters + +path (Path) – +policy (LoadPolicy) – + +LoadAndUnload(loadSet, unloadSet, policy) → None +Unload and load the given path sets. +The effect is as if the unload set were processed first followed by +the load set. +This is equivalent to calling UsdStage::Unload for each item in the +unloadSet followed by UsdStage::Load for each item in the loadSet, +however this method is more efficient as all operations are committed +in a single batch. The policy argument is described in the +documentation for Load() . +See Working Set Management for more information. + +Parameters + +loadSet (SdfPathSet) – +unloadSet (SdfPathSet) – +policy (LoadPolicy) – + +MuteAndUnmuteLayers(muteLayers, unmuteLayers) → None +Mute and unmute the layers identified in muteLayers and +unmuteLayers . +This is equivalent to calling UsdStage::UnmuteLayer for each layer in +unmuteLayers followed by UsdStage::MuteLayer for each layer in +muteLayers , however this method is more efficient as all +operations are committed in a single batch. + +Parameters + +muteLayers (list[str]) – +unmuteLayers (list[str]) – + +MuteLayer(layerIdentifier) → None +Mute the layer identified by layerIdentifier . +Muted layers are ignored by the stage; they do not participate in +value resolution or composition and do not appear in any LayerStack. +If the root layer of a reference or payload LayerStack is muted, the +behavior is as if the muted layer did not exist, which means a +composition error will be generated. +A canonical identifier for each layer in layersToMute will be +computed using ArResolver::CreateIdentifier using the stage’s root +layer as the anchoring asset. Any layer encountered during composition +with the same identifier will be considered muted and ignored. +Note that muting a layer will cause this stage to release all +references to that layer. If no other client is holding on to +references to that layer, it will be unloaded. In this case, if there +are unsaved edits to the muted layer, those edits are lost. Since +anonymous layers are not serialized, muting an anonymous layer will +cause that layer and its contents to be lost in this case. +Muting a layer that has not been used by this stage is not an error. +If that layer is encountered later, muting will take effect and that +layer will be ignored. +The root layer of this stage may not be muted; attempting to do so +will generate a coding error. + +Parameters +layerIdentifier (str) – + +static Open() +classmethod Open(filePath, load) -> Stage +Attempt to find a matching existing stage in a cache if +UsdStageCacheContext objects exist on the stack. +Failing that, create a new stage and recursively compose prims defined +within and referenced by the layer at filePath , which must +already exist. +The initial set of prims to load on the stage can be specified using +the load parameter. +UsdStage::InitialLoadSet. If pathResolverContext is provided it +will be bound when opening the root layer at filePath and whenever +asset path resolution is done for this stage, regardless of what other +context may be bound at that time. Otherwise Usd will open the root +layer with no context bound, then create a context for all future +asset path resolution for the stage by calling +ArResolver::CreateDefaultContextForAsset with the layer’s repository +path if the layer has one, otherwise its resolved path. + +Parameters + +filePath (str) – +load (InitialLoadSet) – + +Open(filePath, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +filePath (str) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +Open(rootLayer, load) -> Stage +Open a stage rooted at rootLayer . +Attempt to find a stage that matches the passed arguments in a +UsdStageCache if UsdStageCacheContext objects exist on the calling +stack. If a matching stage is found, return that stage. Otherwise, +create a new stage rooted at rootLayer . +Invoking an overload that does not take a sessionLayer argument +will create a stage with an anonymous in-memory session layer. To +create a stage without a session layer, pass TfNullPtr (or None in +python) as the sessionLayer argument. +The initial set of prims to load on the stage can be specified using +the load parameter. +UsdStage::InitialLoadSet. If pathResolverContext is provided it +will be bound when whenever asset path resolution is done for this +stage, regardless of what other context may be bound at that time. +Otherwise Usd will create a context for all future asset path +resolution for the stage by calling +ArResolver::CreateDefaultContextForAsset with the layer’s repository +path if the layer has one, otherwise its resolved path. +When searching for a matching stage in bound UsdStageCache s, only the +provided arguments matter for cache lookup. For example, if only a +root layer (or a root layer file path) is provided, the first stage +found in any cache that has that root layer is returned. So, for +example if you require that the stage have no session layer, you must +explicitly specify TfNullPtr (or None in python) for the sessionLayer +argument. + +Parameters + +rootLayer (Layer) – +load (InitialLoadSet) – + +Open(rootLayer, sessionLayer, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +load (InitialLoadSet) – + +Open(rootLayer, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +rootLayer (Layer) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +Open(rootLayer, sessionLayer, pathResolverContext, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – +load (InitialLoadSet) – + +static OpenMasked() +classmethod OpenMasked(filePath, mask, load) -> Stage +Create a new stage and recursively compose prims defined within and +referenced by the layer at filePath which must already exist, +subject to mask . +These OpenMasked() methods do not automatically consult or populate +UsdStageCache s. +The initial set of prims to load on the stage can be specified using +the load parameter. +UsdStage::InitialLoadSet. If pathResolverContext is provided it +will be bound when opening the root layer at filePath and whenever +asset path resolution is done for this stage, regardless of what other +context may be bound at that time. Otherwise Usd will open the root +layer with no context bound, then create a context for all future +asset path resolution for the stage by calling +ArResolver::CreateDefaultContextForAsset with the layer’s repository +path if the layer has one, otherwise its resolved path. + +Parameters + +filePath (str) – +mask (StagePopulationMask) – +load (InitialLoadSet) – + +OpenMasked(filePath, pathResolverContext, mask, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +filePath (str) – +pathResolverContext (ResolverContext) – +mask (StagePopulationMask) – +load (InitialLoadSet) – + +OpenMasked(rootLayer, mask, load) -> Stage +Open a stage rooted at rootLayer and with limited population +subject to mask . +These OpenMasked() methods do not automatically consult or populate +UsdStageCache s. +Invoking an overload that does not take a sessionLayer argument +will create a stage with an anonymous in-memory session layer. To +create a stage without a session layer, pass TfNullPtr (or None in +python) as the sessionLayer argument. +The initial set of prims to load on the stage can be specified using +the load parameter. +UsdStage::InitialLoadSet. If pathResolverContext is provided it +will be bound when whenever asset path resolution is done for this +stage, regardless of what other context may be bound at that time. +Otherwise Usd will create a context for all future asset path +resolution for the stage by calling +ArResolver::CreateDefaultContextForAsset with the layer’s repository +path if the layer has one, otherwise its resolved path. + +Parameters + +rootLayer (Layer) – +mask (StagePopulationMask) – +load (InitialLoadSet) – + +OpenMasked(rootLayer, sessionLayer, mask, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +mask (StagePopulationMask) – +load (InitialLoadSet) – + +OpenMasked(rootLayer, pathResolverContext, mask, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +rootLayer (Layer) – +pathResolverContext (ResolverContext) – +mask (StagePopulationMask) – +load (InitialLoadSet) – + +OpenMasked(rootLayer, sessionLayer, pathResolverContext, mask, load) -> Stage +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – +mask (StagePopulationMask) – +load (InitialLoadSet) – + +OverridePrim(path) → Prim +Attempt to ensure a UsdPrim at path exists on this stage. +If a prim already exists at path , return it. Otherwise author +SdfPrimSpecs with specifier == SdfSpecifierOver and empty +typeName at the current EditTarget to create this prim and any +nonexistent ancestors, then return it. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +If an ancestor of path identifies an inactive prim, author scene +description as described above but return an invalid prim, since the +resulting prim is descendant to an inactive prim. + +Parameters +path (Path) – + +Reload() → None +Calls SdfLayer::Reload on all layers contributing to this stage, +except session layers and sublayers of session layers. +This includes non-session sublayers, references and payloads. Note +that reloading anonymous layers clears their content, so invoking +Reload() on a stage constructed via CreateInMemory() will clear its +root layer. +This method is considered a mutation, which has potentially global +effect! Unlike the various Load() methods whose actions affect only +this stage, Reload() may cause layers to change their contents, +and because layers are global resources shared by potentially many +Stages, calling Reload() on one stage may result in a mutation to any +number of stages. In general, unless you are highly confident your +stage is the only consumer of its layers, you should only call +Reload() when you are assured no other threads may be reading from any +Stages. + +RemovePrim(path) → bool +Remove all scene description for the given path and its subtree +in the current UsdEditTarget. +This method does not do what you might initially think! Calling this +function will not necessarily cause the UsdPrim at path on this +stage to disappear. Completely eradicating a prim from a composition +can be an involved process, involving edits to many contributing +layers, some of which (in many circumstances) will not be editable by +a client. This method is a surgical instrument that can be used +iteratively to effect complete removal of a prim and its subtree from +namespace, assuming the proper permissions are acquired, but more +commonly it is used to perform layer-level operations; e.g.: ensuring +that a given layer (as expressed by a UsdEditTarget) provides no +opinions for a prim and its subtree. +Generally, if your eye is attracted to this method, you probably want +to instead use UsdPrim::SetActive(false), which will provide the +composed effect of removing the prim and its subtree from the +composition, without actually removing any scene description, which as +a bonus, means that the effect is reversible at a later time! + +Parameters +path (Path) – + +ResolveIdentifierToEditTarget(identifier) → str +Resolve the given identifier using this stage’s ArResolverContext and +the layer of its GetEditTarget() as an anchor for relative references +(e.g. +@./siblingFile.usd@). +a non-empty string containing either the same identifier that was +passed in (if the identifier refers to an already-opened layer or +an”anonymous”, in-memory layer), or a resolved layer filepath. If the +identifier was not resolvable, return the empty string. + +Parameters +identifier (str) – + +Save() → None +Calls SdfLayer::Save on all dirty layers contributing to this stage +except session layers and sublayers of session layers. +This function will emit a warning and skip each dirty anonymous layer +it encounters, since anonymous layers cannot be saved with +SdfLayer::Save. These layers must be manually exported by calling +SdfLayer::Export. + +SaveSessionLayers() → None +Calls SdfLayer::Save on all dirty session layers and sublayers of +session layers contributing to this stage. +This function will emit a warning and skip each dirty anonymous layer +it encounters, since anonymous layers cannot be saved with +SdfLayer::Save. These layers must be manually exported by calling +SdfLayer::Export. + +static SetColorConfigFallbacks() +classmethod SetColorConfigFallbacks(colorConfiguration, colorManagementSystem) -> None +Sets the global fallback values of color configuration metadata which +includes the’colorConfiguration’asset path and the name of the color +management system. +This overrides any fallback values authored in plugInfo files. +If the specified value of colorConfiguration or +colorManagementSystem is empty, then the corresponding fallback +value isn’t set. In other words, for this call to have an effect, at +least one value must be non-empty. Additionally, these can’t be reset +to empty values. +GetColorConfigFallbacks() Color Configuration API + +Parameters + +colorConfiguration (AssetPath) – +colorManagementSystem (str) – + +SetColorConfiguration(colorConfig) → None +Sets the default color configuration to be used to interpret the per- +attribute color-spaces in the composed USD stage. +This is specified as asset path which can be resolved to the color +spec file. +Color Configuration API + +Parameters +colorConfig (AssetPath) – + +SetColorManagementSystem(cms) → None +Sets the name of the color management system used to interpret the +color configuration file pointed at by the colorConfiguration +metadata. +Color Configuration API + +Parameters +cms (str) – + +SetDefaultPrim(prim) → None +Set the default prim layer metadata in this stage’s root layer. +This is shorthand for: + stage->GetRootLayer()->SetDefaultPrim(prim.GetName()); + +Note that this function always authors to the stage's root layer. To + +author to a different layer, use the SdfLayer::SetDefaultPrim() API. + +Parameters +prim (Prim) – + +SetEditTarget(editTarget) → None +Set the stage’s EditTarget. +If editTarget.IsLocalLayer(), check to see if it’s a layer in this +stage’s local LayerStack. If not, issue an error and do nothing. If +editTarget is invalid, issue an error and do nothing. If +editTarget differs from the stage’s current EditTarget, set the +EditTarget and send UsdNotice::StageChangedEditTarget. Otherwise do +nothing. + +Parameters +editTarget (EditTarget) – + +SetEndTimeCode(arg1) → None +Sets the stage’s end timeCode. +The end timeCode is set in the current EditTarget, if it is the root +layer of the stage or the session layer associated with the stage. If +the current EditTarget is neither, a warning is issued and the end +timeCode is not set. + +Parameters +arg1 (float) – + +SetFramesPerSecond(framesPerSecond) → None +Sets the stage’s framesPerSecond value. +The framesPerSecond value is set in the current EditTarget, if it is +the root layer of the stage or the session layer associated with the +stage. If the current EditTarget is neither, a warning is issued and +no value is set. +GetFramesPerSecond() + +Parameters +framesPerSecond (float) – + +static SetGlobalVariantFallbacks() +classmethod SetGlobalVariantFallbacks(fallbacks) -> None +Set the global variant fallback preferences used in new UsdStages. +This overrides any fallbacks configured in plugin metadata, and only +affects stages created after this call. +This does not affect existing UsdStages. + +Parameters +fallbacks (PcpVariantFallbackMap) – + +SetInterpolationType(interpolationType) → None +Sets the interpolation type used during value resolution for all +attributes on this stage. +Changing this will cause a UsdNotice::StageContentsChanged notice to +be sent, as values at times where no samples are authored may have +changed. + +Parameters +interpolationType (InterpolationType) – + +SetLoadRules(rules) → None +Set the UsdStageLoadRules to govern payload inclusion on this stage. +This rebuilds the stage’s entire prim hierarchy to follow rules . +Note that subsequent calls to Load() , Unload() , LoadAndUnload() will +modify this stages load rules as described in the documentation for +those member functions. +See Working Set Management for more information. + +Parameters +rules (StageLoadRules) – + +SetMetadata(key, value) → bool +Set the value of Stage metadatum key to value , if the stage’s +current UsdEditTarget is the root or session layer. +If the current EditTarget is any other layer, raise a coding error. +true if authoring was successful, false otherwise. Generates a coding +error if key is not allowed as layer metadata. +General Metadata in USD + +Parameters + +key (str) – +value (T) – + +SetMetadata(key, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +key (str) – +value (VtValue) – + +SetMetadataByDictKey(key, keyPath, value) → bool +Author value to the field identified by key and keyPath at +the current EditTarget. +The keyPath is a’:’-separated path identifying a value in +subdictionaries stored in the metadata field at key . If +keyPath is empty, no action is taken. +true if the value is authored successfully, false otherwise. Generates +a coding error if key is not allowed as layer metadata. +Dictionary-valued Metadata + +Parameters + +key (str) – +keyPath (str) – +value (T) – + +SetMetadataByDictKey(key, keyPath, value) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +key (str) – +keyPath (str) – +value (VtValue) – + +SetPopulationMask(mask) → None +Set this stage’s population mask and recompose the stage. + +Parameters +mask (StagePopulationMask) – + +SetStartTimeCode(arg1) → None +Sets the stage’s start timeCode. +The start timeCode is set in the current EditTarget, if it is the root +layer of the stage or the session layer associated with the stage. If +the current EditTarget is neither, a warning is issued and the start +timeCode is not set. + +Parameters +arg1 (float) – + +SetTimeCodesPerSecond(timeCodesPerSecond) → None +Sets the stage’s timeCodesPerSecond value. +The timeCodesPerSecond value is set in the current EditTarget, if it +is the root layer of the stage or the session layer associated with +the stage. If the current EditTarget is neither, a warning is issued +and no value is set. +GetTimeCodesPerSecond() + +Parameters +timeCodesPerSecond (float) – + +Traverse() → PrimRange +Traverse the active, loaded, defined, non-abstract prims on this stage +depth-first. +Traverse() returns a UsdPrimRange, which allows low-latency traversal, +with the ability to prune subtrees from traversal. It is python +iterable, so in its simplest form, one can do: +for prim in stage.Traverse(): + print prim.GetPath() + +If either a pre-and-post-order traversal or a traversal rooted at a +particular prim is desired, construct a UsdPrimRange directly. +This is equivalent to UsdPrimRange::Stage() . + +Traverse(predicate) -> PrimRange +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Traverse the prims on this stage subject to predicate . +This is equivalent to UsdPrimRange::Stage() . + +Parameters +predicate (_PrimFlagsPredicate) – + +TraverseAll() → PrimRange +Traverse all the prims on this stage depth-first. +Traverse() +UsdPrimRange::Stage() + +Unload(path) → None +Modify this stage’s load rules to unload the prim and its descendants +specified by path . +See Working Set Management for more information. + +Parameters +path (Path) – + +UnmuteLayer(layerIdentifier) → None +Unmute the layer identified by layerIdentifier if it had +previously been muted. + +Parameters +layerIdentifier (str) – + +WriteFallbackPrimTypes() → None +Writes the fallback prim types defined in the schema registry to the +stage as dictionary valued fallback prim type metadata. +If the stage already has fallback prim type metadata, the fallback +types from the schema registry will be added to the existing metadata, +only for types that are already present in the dictionary, i.e. this +won’t overwrite existing fallback entries. +The current edit target determines whether the metadata is written to +the root layer or the session layer. If the edit target specifies +another layer besides these, this will produce an error. +This function can be used at any point before calling Save or Export +on a stage to record the fallback types for the current schemas. This +allows another version of Usd to open this stage and treat prim types +it doesn’t recognize as a type it does recognize defined for it in +this metadata. +Fallback Prim Types UsdSchemaRegistry::GetFallbackPrimTypes + +LoadAll = Usd.Stage.LoadAll + +LoadNone = Usd.Stage.LoadNone + +property expired +True if this object has expired, False otherwise. + +class pxr.Usd.StageCache +A strongly concurrency safe collection of UsdStageRefPtr s, enabling +sharing across multiple clients and threads. See UsdStageCacheContext +for typical use cases finding UsdStage s in a cache and publishing +UsdStage s to a cache. +UsdStageCache is strongly thread safe: all operations other than +construction and destruction may be performed concurrently. +Clients typically populate and fetch UsdStage s in caches by binding a +UsdStageCacheContext object to a cache, then using the +UsdStage::Open() API. See UsdStageCacheContext for more details. +Clients may also populate and fetch directly via +UsdStageCache::Insert() , UsdStageCache::Find() , +UsdStageCache::FindOneMatching() , and +UsdStageCache::FindAllMatching() API. +Caches provide a mechanism that associates a lightweight key, +UsdStageCache::Id, with a cached stage. A UsdStageCache::Id can be +converted to and from long int and string. This can be useful for +communicating within a third party application that cannot transmit +arbitrary C++ objects. See UsdStageCache::GetId() . +Clients may iterate all cache elements using +UsdStageCache::GetAllStages() and remove elements with +UsdStageCache::Erase() , UsdStageCache::EraseAll() , and +UsdStageCache::Clear() . +Note that this class is a regular type: it can be copied and assigned +at will. It is not a singleton. Also, since it holds a collection of +UsdStageRefPtr objects, copying it does not create new UsdStage +instances, it merely copies the RefPtrs. +Enabling the USD_STAGE_CACHE TF_DEBUG code will issue debug output for +UsdStageCache Find/Insert/Erase/Clear operations. Also see +UsdStageCache::SetDebugName() and UsdStageCache::GetDebugName() . +Classes: + +Id + +Methods: + +Clear() +Remove all entries from this cache, leaving it empty and equivalent to a default-constructed cache. + +Contains(stage) +Return true if stage is present in this cache, false otherwise. + +Erase(id) +Erase the stage identified by id from this cache and return true. + +EraseAll(rootLayer) +Erase all stages present in the cache with rootLayer and return the number erased. + +Find(id) +Find the stage in this cache corresponding to id in this cache. + +FindAllMatching(rootLayer) +Find all stages in this cache with rootLayer . + +FindOneMatching(rootLayer) +Find a stage in this cache with rootLayer . + +GetAllStages() +Return a vector containing the stages present in this cache. + +GetDebugName() +Retrieve this cache's debug name, set with SetDebugName() . + +GetId(stage) +Return the Id associated with stage in this cache. + +Insert(stage) +Insert stage into this cache and return its associated Id. + +IsEmpty() +Return true if this cache holds no stages, false otherwise. + +SetDebugName(debugName) +Assign a debug name to this cache. + +Size() +Return the number of stages present in this cache. + +swap(other) +Swap the contents of this cache with other . + +class Id +Methods: + +FromLongInt + +FromString + +IsValid + +ToLongInt + +ToString + +static FromLongInt() + +static FromString() + +IsValid() + +ToLongInt() + +ToString() + +Clear() → None +Remove all entries from this cache, leaving it empty and equivalent to +a default-constructed cache. +Since the cache contains UsdStageRefPtr, erasing a stage from the +cache will only destroy the stage if no other UsdStageRefPtrs exist +referring to it. + +Contains(stage) → bool +Return true if stage is present in this cache, false otherwise. + +Parameters +stage (Stage) – + +Contains(id) -> bool +Return true if id is present in this cache, false otherwise. + +Parameters +id (Id) – + +Erase(id) → bool +Erase the stage identified by id from this cache and return true. +If id is invalid or there is no associated stage in this cache, do +nothing and return false. Since the cache contains UsdStageRefPtr, +erasing a stage from the cache will only destroy the stage if no other +UsdStageRefPtrs exist referring to it. + +Parameters +id (Id) – + +Erase(stage) -> bool +Erase stage from this cache and return true. +If stage is not present in this cache, do nothing and return +false. Since the cache contains UsdStageRefPtr, erasing a stage from +the cache will only destroy the stage if no other UsdStageRefPtrs +exist referring to it. + +Parameters +stage (Stage) – + +EraseAll(rootLayer) → int +Erase all stages present in the cache with rootLayer and return +the number erased. +Since the cache contains UsdStageRefPtr, erasing a stage from the +cache will only destroy the stage if no other UsdStageRefPtrs exist +referring to it. + +Parameters +rootLayer (Layer) – + +EraseAll(rootLayer, sessionLayer) -> int +Erase all stages present in the cache with rootLayer and +sessionLayer and return the number erased. +Since the cache contains UsdStageRefPtr, erasing a stage from the +cache will only destroy the stage if no other UsdStageRefPtrs exist +referring to it. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – + +EraseAll(rootLayer, sessionLayer, pathResolverContext) -> int +Erase all stages present in the cache with rootLayer , +sessionLayer , and pathResolverContext and return the number +erased. +Since the cache contains UsdStageRefPtr, erasing a stage from the +cache will only destroy the stage if no other UsdStageRefPtrs exist +referring to it. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – + +Find(id) → Stage +Find the stage in this cache corresponding to id in this cache. +If id is not valid (see Id::IsValid() ) or if this cache does not +have a stage corresponding to id , return null. + +Parameters +id (Id) – + +FindAllMatching(rootLayer) → list[Stage] +Find all stages in this cache with rootLayer . +If there is no matching stage in this cache, return an empty vector. + +Parameters +rootLayer (Layer) – + +FindAllMatching(rootLayer, sessionLayer) -> list[Stage] +Find all stages in this cache with rootLayer and sessionLayer +. +If there is no matching stage in this cache, return an empty vector. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – + +FindAllMatching(rootLayer, pathResolverContext) -> list[Stage] +Find all stages in this cache with rootLayer and +pathResolverContext . +If there is no matching stage in this cache, return an empty vector. + +Parameters + +rootLayer (Layer) – +pathResolverContext (ResolverContext) – + +FindAllMatching(rootLayer, sessionLayer, pathResolverContext) -> list[Stage] +Find all stages in this cache with rootLayer , sessionLayer , +and pathResolverContext . +If there is no matching stage in this cache, return an empty vector. +If there is more than one matching stage in this cache, return an +arbitrary matching one. + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – + +FindOneMatching(rootLayer) → Stage +Find a stage in this cache with rootLayer . +If there is no matching stage in this cache, return null. If there is +more than one matching stage in this cache, return an arbitrary +matching one. See also FindAllMatching() . + +Parameters +rootLayer (Layer) – + +FindOneMatching(rootLayer, sessionLayer) -> Stage +Find a stage in this cache with rootLayer and sessionLayer . +If there is no matching stage in this cache, return null. If there is +more than one matching stage in this cache, return an arbitrary +matching one. See also FindAllMatching() . + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – + +FindOneMatching(rootLayer, pathResolverContext) -> Stage +Find a stage in this cache with rootLayer and +pathResolverContext . +If there is no matching stage in this cache, return null. If there is +more than one matching stage in this cache, return an arbitrary +matching one. +FindAllMatching() + +Parameters + +rootLayer (Layer) – +pathResolverContext (ResolverContext) – + +FindOneMatching(rootLayer, sessionLayer, pathResolverContext) -> Stage +Find a stage in this cache with rootLayer , sessionLayer , and +pathResolverContext . +If there is no matching stage in this cache, return null. If there is +more than one matching stage in this cache, return an arbitrary +matching one. +FindAllMatching() + +Parameters + +rootLayer (Layer) – +sessionLayer (Layer) – +pathResolverContext (ResolverContext) – + +GetAllStages() → list[Stage] +Return a vector containing the stages present in this cache. + +GetDebugName() → str +Retrieve this cache’s debug name, set with SetDebugName() . +If no debug name has been assigned, return the empty string. + +GetId(stage) → Id +Return the Id associated with stage in this cache. +If stage is not present in this cache, return an invalid Id. + +Parameters +stage (Stage) – + +Insert(stage) → Id +Insert stage into this cache and return its associated Id. +If the given stage is already present in this cache, simply return +its associated Id. + +Parameters +stage (Stage) – + +IsEmpty() → bool +Return true if this cache holds no stages, false otherwise. + +SetDebugName(debugName) → None +Assign a debug name to this cache. +This will be emitted in debug output messages when the +USD_STAGE_CACHES debug flag is enabled. If set to the empty string, +the cache’s address will be used instead. + +Parameters +debugName (str) – + +Size() → int +Return the number of stages present in this cache. + +swap(other) → None +Swap the contents of this cache with other . + +Parameters +other (StageCache) – + +class pxr.Usd.StageCacheContext +A context object that lets the UsdStage::Open() API read from or read +from and write to a UsdStageCache instance during a scope of +execution. +Code examples illustrate typical use: +{ + // A stage cache to work with. + UsdStageCache stageCache; + + // Bind this cache. UsdStage::Open() will attempt to find a matching + // stage in the cache. If none is found, it will open a new stage and + // insert it into the cache. + UsdStageCacheContext context(stageCache); + + // Since the cache is currently empty, this Open call will not find an + // existing stage in the cache, but will insert the newly opened stage + // in it. + auto stage = UsdStage::Open(); + + assert(stageCache.Contains(stage)); + + // A subsequent Open() call with the same arguments will retrieve the + // stage from cache. + auto stage2 = UsdStage::Open(); + assert(stage2 == stage); +} + +The UsdStage::Open() API examines caches in UsdStageCacheContexts that +exist on the stack in the current thread in order starting with the +most recently created (deepest in the stack) to the least recently +created. +The UsdUseButDoNotPopulateCache() function makes a cache available for +UsdStage::Open() to find stages in, but newly opened stages will not +be published to it. This can be useful if you want to make use of a +cache but cannot or do not wish to mutate that cache. +Passing UsdBlockStageCaches disables cache use entirely (as if no +UsdStageCacheContexts exist on the stack), while +UsdBlockStageCachePopulation disables writing to all bound caches (as +if they were all established with UsdUseButDoNotPopulateCache()). +Threading note: Different threads have different call stacks, so +UsdStageCacheContext objects that exist in one thread’s stack do not +influence calls to UsdStage::Open() from a different thread. + +class pxr.Usd.StageCacheContextBlockType +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.BlockStageCaches, Usd.BlockStageCachePopulation, Usd._NoBlock) + +class pxr.Usd.StageLoadRules +This class represents rules that govern payload inclusion on +UsdStages. +Rules are represented as pairs of SdfPath and a Rule enum value, one +of AllRule, OnlyRule, and NoneRule. To understand how rules apply to +particular paths, see UsdStageLoadRules::GetEffectiveRuleForPath() . +Convenience methods for manipulating rules by +typical’Load’and’Unload’operations are provided in +UsdStageLoadRules::LoadWithoutDescendants() , +UsdStageLoadRules::LoadWithDescendants() , UsdStageLoadRules::Unload() +. +For finer-grained rule crafting, see AddRule() . +Remove redundant rules that do not change the effective load state +with UsdStageLoadRules::Minimize() . +Classes: + +Rule +These values are paired with paths to govern payload inclusion on UsdStages. + +Methods: + +AddRule(path, rule) +Add a literal rule. + +GetEffectiveRuleForPath(path) +Return the"effective"rule for the given path . + +GetRules() +Return all the rules as a vector. + +IsLoaded(path) +Return true if the given path is considered loaded by these rules, or false if it is considered unloaded. + +IsLoadedWithAllDescendants(path) +Return true if the given path and all descendants are considered loaded by these rules; false otherwise. + +IsLoadedWithNoDescendants(path) +Return true if the given path and is considered loaded, but none of its descendants are considered loaded by these rules; false otherwise. + +LoadAll +classmethod LoadAll() -> StageLoadRules + +LoadAndUnload(loadSet, unloadSet, policy) +Add rules as if Unload() was called for each element of unloadSet followed by calls to either LoadWithDescendants() (if policy is UsdLoadPolicy::LoadWithDescendants) or LoadWithoutDescendants() (if policy is UsdLoadPolicy::LoadWithoutDescendants) for each element of loadSet . + +LoadNone +classmethod LoadNone() -> StageLoadRules + +LoadWithDescendants(path) +Add a rule indicating that path , all its ancestors, and all its descendants shall be loaded. + +LoadWithoutDescendants(path) +Add a rule indicating that path and all its ancestors but none of its descendants shall be loaded. + +Minimize() +Remove any redundant rules to make the set of rules as small as possible without changing behavior. + +SetRules(rules) +Set literal rules, must be sorted by SdfPath::operator< . + +Unload(path) +Add a rule indicating that path and all its descendants shall be unloaded. + +swap(other) +Swap the contents of these rules with other . + +Attributes: + +AllRule + +NoneRule + +OnlyRule + +class Rule +These values are paired with paths to govern payload inclusion on +UsdStages. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (Usd.StageLoadRules.AllRule, Usd.StageLoadRules.OnlyRule, Usd.StageLoadRules.NoneRule) + +AddRule(path, rule) → None +Add a literal rule. If there’s already a rule for path , replace +it. + +Parameters + +path (Path) – +rule (Rule) – + +GetEffectiveRuleForPath(path) → Rule +Return the”effective”rule for the given path . +For example, if the closest ancestral rule of path is an +AllRule , return AllRule . If the closest ancestral rule of +path is for path itself and it is an OnlyRule , return +OnlyRule . Otherwise if there is a closest descendant rule to +path this is an OnlyRule or an AllRule , return +OnlyRule . Otherwise return NoneRule . + +Parameters +path (Path) – + +GetRules() → list[tuple[Path, Rule]] +Return all the rules as a vector. + +IsLoaded(path) → bool +Return true if the given path is considered loaded by these rules, +or false if it is considered unloaded. +This is equivalent to GetEffectiveRuleForPath(path) != NoneRule. + +Parameters +path (Path) – + +IsLoadedWithAllDescendants(path) → bool +Return true if the given path and all descendants are considered +loaded by these rules; false otherwise. + +Parameters +path (Path) – + +IsLoadedWithNoDescendants(path) → bool +Return true if the given path and is considered loaded, but none +of its descendants are considered loaded by these rules; false +otherwise. + +Parameters +path (Path) – + +static LoadAll() +classmethod LoadAll() -> StageLoadRules +Return rules that load all payloads. +This is equivalent to default-constructed UsdStageLoadRules. + +LoadAndUnload(loadSet, unloadSet, policy) → None +Add rules as if Unload() was called for each element of unloadSet +followed by calls to either LoadWithDescendants() (if policy is +UsdLoadPolicy::LoadWithDescendants) or LoadWithoutDescendants() (if +policy is UsdLoadPolicy::LoadWithoutDescendants) for each element +of loadSet . + +Parameters + +loadSet (SdfPathSet) – +unloadSet (SdfPathSet) – +policy (LoadPolicy) – + +static LoadNone() +classmethod LoadNone() -> StageLoadRules +Return rules that load no payloads. + +LoadWithDescendants(path) → None +Add a rule indicating that path , all its ancestors, and all its +descendants shall be loaded. +Any previous rules created by calling LoadWithoutDescendants() or +Unload() on this path or descendant paths are replaced by this rule. +For example, calling LoadWithoutDescendants(‘/World/sets/kitchen’) +followed by LoadWithDescendants(‘/World/sets’) will effectively remove +the rule created in the first call. See AddRule() for more direct +manipulation. + +Parameters +path (Path) – + +LoadWithoutDescendants(path) → None +Add a rule indicating that path and all its ancestors but none of +its descendants shall be loaded. +Any previous rules created by calling LoadWithDescendants() or +Unload() on this path or descendant paths are replaced or restricted +by this rule. For example, calling LoadWithDescendants(‘/World/sets’) +followed by LoadWithoutDescendants(‘/World/sets/kitchen’) will cause +everything under’/World/sets’to load except for those things +under’/World/sets/kitchen’. See AddRule() for more direct +manipulation. + +Parameters +path (Path) – + +Minimize() → None +Remove any redundant rules to make the set of rules as small as +possible without changing behavior. + +SetRules(rules) → None +Set literal rules, must be sorted by SdfPath::operator< . + +Parameters +rules (list[tuple[Path, Rule]]) – + +SetRules(rules) -> None +Set literal rules, must be sorted by SdfPath::operator< . + +Parameters +rules (list[tuple[Path, Rule]]) – + +Unload(path) → None +Add a rule indicating that path and all its descendants shall be +unloaded. +Any previous rules created by calling LoadWithDescendants() or +LoadWithoutDescendants() on this path or descendant paths are replaced +or restricted by this rule. For example, calling +LoadWithDescendants(‘/World/sets’) followed by +Unload(‘/World/sets/kitchen’) will cause everything +under’/World/sets’to load, except for’/World/sets/kitchen’and +everything under it. + +Parameters +path (Path) – + +swap(other) → None +Swap the contents of these rules with other . + +Parameters +other (StageLoadRules) – + +AllRule = Usd.StageLoadRules.AllRule + +NoneRule = Usd.StageLoadRules.NoneRule + +OnlyRule = Usd.StageLoadRules.OnlyRule + +class pxr.Usd.StagePopulationMask +This class represents a mask that may be applied to a UsdStage to +limit the set of UsdPrim s it populates. This is useful in cases where +clients have a large scene but only wish to view or query a single or +a handful of objects. For example, suppose we have a city block with +buildings, cars, crowds of people, and a couple of main characters. +Some tasks might only require looking at a single main character and +perhaps a few props. We can create a population mask with the paths to +the character and props of interest and open a UsdStage with that +mask. Usd will avoid populating the other objects in the scene, saving +time and memory. See UsdStage::OpenMasked() for more. +A mask is defined by a set of SdfPath s with the following qualities: +they are absolute prim paths (or the absolute root path), and no path +in the set is an ancestor path of any other path in the set other than +itself. For example, the set of paths [‘/a/b’,’/a/c’,’/x/y’] is a +valid mask, but the set of paths [‘/a/b’,’/a/b/c’,’/x/y’] is +redundant, since’/a/b’is an ancestor of’/a/b/c’. The path’/a/b/c’may +be removed. The GetUnion() and Add() methods ensure that no redundant +paths are added. +Default-constructed UsdStagePopulationMask s are considered empty ( +IsEmpty() ) and include no paths. A population mask containing +SdfPath::AbsoluteRootPath() includes all paths. +Methods: + +Add(other) +Assign this mask to be its union with other and return a reference to this mask. + +All +classmethod All() -> StagePopulationMask + +GetIncludedChildNames(path, childNames) +Return true if this mask includes any child prims beneath path , false otherwise. + +GetIntersection(other) +Return a mask that is the intersection of this and other . + +GetPaths() +Return the set of paths that define this mask. + +GetUnion(other) +Return a mask that is the union of this and other . + +Includes(other) +Return true if this mask is a superset of other . + +IncludesSubtree(path) +Return true if this mask includes path and all paths descendant to path . + +Intersection +classmethod Intersection(l, r) -> StagePopulationMask + +IsEmpty() +Return true if this mask contains no paths. + +Union +classmethod Union(l, r) -> StagePopulationMask + +Add(other) → StagePopulationMask +Assign this mask to be its union with other and return a reference +to this mask. + +Parameters +other (StagePopulationMask) – + +Add(path) -> StagePopulationMask +Assign this mask to be its union with path and return a reference +to this mask. + +Parameters +path (Path) – + +static All() +classmethod All() -> StagePopulationMask +Return a mask that includes all paths. +This is the mask that contains the absolute root path. + +GetIncludedChildNames(path, childNames) → bool +Return true if this mask includes any child prims beneath path , +false otherwise. +If only specific child prims beneath path are included, the names +of those children will be returned in childNames . If all child +prims beneath path are included, childNames will be empty. + +Parameters + +path (Path) – +childNames (list[str]) – + +GetIntersection(other) → StagePopulationMask +Return a mask that is the intersection of this and other . + +Parameters +other (StagePopulationMask) – + +GetPaths() → list[Path] +Return the set of paths that define this mask. + +GetUnion(other) → StagePopulationMask +Return a mask that is the union of this and other . + +Parameters +other (StagePopulationMask) – + +GetUnion(path) -> StagePopulationMask +Return a mask that is the union of this and a mask containing the +single path . + +Parameters +path (Path) – + +Includes(other) → bool +Return true if this mask is a superset of other . +That is, if this mask includes at least every path that other +includes. + +Parameters +other (StagePopulationMask) – + +Includes(path) -> bool +Return true if this mask includes path . +This is true if path is one of the paths in this mask, or if it is +either a descendant or an ancestor of one of the paths in this mask. + +Parameters +path (Path) – + +IncludesSubtree(path) → bool +Return true if this mask includes path and all paths descendant to +path . +For example, consider a mask containing the path’/a/b’. Then the +following holds: +mask.Includes('/a') -> true +mask.Includes('/a/b') -> true +mask.IncludesSubtree('/a') -> false +mask.IncludesSubtree('/a/b') -> true + +Parameters +path (Path) – + +static Intersection() +classmethod Intersection(l, r) -> StagePopulationMask +Return a mask that is the intersection of l and r . + +Parameters + +l (StagePopulationMask) – +r (StagePopulationMask) – + +IsEmpty() → bool +Return true if this mask contains no paths. +Empty masks include no paths. + +static Union() +classmethod Union(l, r) -> StagePopulationMask +Return a mask that is the union of l and r . + +Parameters + +l (StagePopulationMask) – +r (StagePopulationMask) – + +class pxr.Usd.TimeCode +Represent a time value, which may be either numeric, holding a double +value, or a sentinel value UsdTimeCode::Default() . +A UsdTimeCode does not represent an SMPTE timecode, although we may, +in future, support conversion functions between the two. Instead, +UsdTimeCode is an abstraction that acknowledges that in the principal +domains of use for USD, there are many different ways of encoding +time, and USD must be able to capture and translate between all of +them for interchange, retaining as much intent of the authoring +application as possible. +A UsdTimeCode is therefore a unitless, generic time measurement that +serves as the ordinate for time-sampled data in USD files. A client of +USD relies on the UsdStage (which in turn consults metadata authored +in its root layer) to define the mapping of TimeCodes to units like +seconds and frames. +UsdStage::GetStartTimeCode() +UsdStage::GetEndTimeCode() +UsdStage::GetTimeCodesPerSecond() +UsdStage::GetFramesPerSecond() As described in TimeSamples, Defaults, +and Value Resolution, USD optionally provides an +unvarying,’default’value for every attribute. UsdTimeCode embodies a +time value that can either be a floating-point sample time, or the +default. +All UsdAttribute and derived API that requires a time parameter +defaults to UsdTimeCode::Default() if the parameter is left +unspecified, and auto-constructs from a floating-point argument. +UsdTimeCode::EarliestTime() is provided to aid clients who wish to +retrieve the first authored timesample for any attribute. +Classes: + +Tokens + +Methods: + +Default +classmethod Default() -> TimeCode + +EarliestTime +classmethod EarliestTime() -> TimeCode + +GetValue() +Return the numeric value for this time. + +IsDefault() +Return true if this time represents the'default'sentinel value, false otherwise. + +IsEarliestTime() +Return true if this time represents the lowest/earliest possible timeCode, false otherwise. + +IsNumeric() +Return true if this time represents a numeric value, false otherwise. + +SafeStep +classmethod SafeStep(maxValue, maxCompression) -> float + +class Tokens +Attributes: + +DEFAULT + +EARLIEST + +DEFAULT = 'DEFAULT' + +EARLIEST = 'EARLIEST' + +static Default() +classmethod Default() -> TimeCode +Produce a UsdTimeCode representing the sentinel value for’default’. +In inequality comparisons, Default() is considered less than any +numeric TimeCode, including EarliestTime() , indicative of the fact +that in UsdAttribute value resolution, the sample at Default() (if +any) is always weaker than any numeric timeSample in the same layer. +For more information, see TimeSamples, Defaults, and Value Resolution + +static EarliestTime() +classmethod EarliestTime() -> TimeCode +Produce a UsdTimeCode representing the lowest/earliest possible +timeCode. +Thus, for any given timeSample s, its time ordinate t will obey: +t>= UsdTimeCode::EarliestTime() +This is useful for clients that wish to retrieve the first authored +timeSample for an attribute, as they can use +UsdTimeCode::EarliestTime() as the time argument to +UsdAttribute::Get() and UsdAttribute::GetBracketingTimeSamples() + +GetValue() → float +Return the numeric value for this time. +If this time IsDefault(), return a quiet NaN value. + +IsDefault() → bool +Return true if this time represents the’default’sentinel value, false +otherwise. +This is equivalent to !IsNumeric(). + +IsEarliestTime() → bool +Return true if this time represents the lowest/earliest possible +timeCode, false otherwise. + +IsNumeric() → bool +Return true if this time represents a numeric value, false otherwise. +This is equivalent to !IsDefault(). + +static SafeStep() +classmethod SafeStep(maxValue, maxCompression) -> float +Produce a safe step value such that for any numeric UsdTimeCode t in +[-maxValue, maxValue], t +/- (step / maxCompression) != t with a +safety factor of 2. +This is shorthand for std::numeric_limits::epsilon() * +maxValue * maxCompression * 2.0. Such a step value is recommended +for simulating jump discontinuities in time samples. For example, +author value x at time t, and value y at time t + SafeStep() . This +ensures that as the sample times are shifted and scaled, t and t + +SafeStep() remain distinct so long as they adhere to the maxValue +and maxCompression limits. + +Parameters + +maxValue (float) – +maxCompression (float) – + +class pxr.Usd.Tokens +Attributes: + +apiSchemas + +clipSets + +clips + +collection + +collection_MultipleApplyTemplate_Excludes + +collection_MultipleApplyTemplate_ExpansionRule + +collection_MultipleApplyTemplate_IncludeRoot + +collection_MultipleApplyTemplate_Includes + +exclude + +expandPrims + +expandPrimsAndProperties + +explicitOnly + +fallbackPrimTypes + +apiSchemas = 'apiSchemas' + +clipSets = 'clipSets' + +clips = 'clips' + +collection = 'collection' + +collection_MultipleApplyTemplate_Excludes = 'collection:__INSTANCE_NAME__:excludes' + +collection_MultipleApplyTemplate_ExpansionRule = 'collection:__INSTANCE_NAME__:expansionRule' + +collection_MultipleApplyTemplate_IncludeRoot = 'collection:__INSTANCE_NAME__:includeRoot' + +collection_MultipleApplyTemplate_Includes = 'collection:__INSTANCE_NAME__:includes' + +exclude = 'exclude' + +expandPrims = 'expandPrims' + +expandPrimsAndProperties = 'expandPrimsAndProperties' + +explicitOnly = 'explicitOnly' + +fallbackPrimTypes = 'fallbackPrimTypes' + +class pxr.Usd.Typed +The base class for all typed schemas (those that can impart a +typeName to a UsdPrim), and therefore the base class for all +instantiable and”IsA”schemas. +UsdTyped implements a typeName-based query for its override of +UsdSchemaBase::_IsCompatible() . It provides no other behavior. +Methods: + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.Usd.UsdCollectionMembershipQuery +Represents a flattened view of a collection. For more information +about collections, please see UsdCollectionAPI as a way to encode and +retrieve a collection from scene description. A +UsdCollectionMembershipQuery object can be used to answer queries +about membership of paths in the collection efficiently. +Methods: + +GetAsPathExpansionRuleMap() +Returns a raw map of the paths included or excluded in the collection along with the expansion rules for the included paths. + +GetIncludedCollections() +Returns a set of paths for all collections that were included in the collection from which this UsdCollectionMembershipQuery object was computed. + +HasExcludes() +Returns true if the collection excludes one or more paths below an included path. + +IsPathIncluded(path, expansionRule) +This is an overloaded member function, provided for convenience. + +GetAsPathExpansionRuleMap() → PathExpansionRuleMap +Returns a raw map of the paths included or excluded in the collection +along with the expansion rules for the included paths. + +GetIncludedCollections() → SdfPathSet +Returns a set of paths for all collections that were included in the +collection from which this UsdCollectionMembershipQuery object was +computed. +This set is recursive, so collections that were included by other +collections will be part of this set. The collection from which this +UsdCollectionMembershipQuery object was computed is not part of this +set. + +HasExcludes() → bool +Returns true if the collection excludes one or more paths below an +included path. + +IsPathIncluded(path, expansionRule) → bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Returns whether the given path is included in the collection from +which this UsdCollectionMembershipQuery object was computed. +This is the API that clients should use for determining if a given +object is a member of the collection. To enumerate all the members of +a collection, use UsdComputeIncludedObjectsFromCollection or +UsdComputeIncludedPathsFromCollection. +If expansionRule is not nullptr, it is set to the expansion- rule +value that caused the path to be included in or excluded from the +collection. If path is not included in the collection, +expansionRule is set to UsdTokens->exclude. +It is useful to specify this parameter and use this overload of +IsPathIncluded() , when you’re interested in traversing a subtree and +want to know whether the root of the subtree is included in a +collection. For evaluating membership of descendants of the root, +please use the other overload of IsPathIncluded() , that takes both a +path and the parent expansionRule. +The python version of this method only returns the boolean result. It +does not return expansionRule . + +Parameters + +path (Path) – +expansionRule (str) – + +IsPathIncluded(path, parentExpansionRule, expansionRule) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Returns whether the given path, path is included in the collection +from which this UsdCollectionMembershipQuery object was computed, +given the parent-path’s inherited expansion rule, +parentExpansionRule . +If expansionRule is not nullptr, it is set to the expansion- rule +value that caused the path to be included in or excluded from the +collection. If path is not included in the collection, +expansionRule is set to UsdTokens->exclude. +The python version of this method only returns the boolean result. It +does not return expansionRule . + +Parameters + +path (Path) – +parentExpansionRule (str) – +expansionRule (str) – + +class pxr.Usd.UsdFileFormat +File format for USD files. +When creating a file through the SdfLayer::CreateNew() interface, the +meaningful SdfFileFormat::FileFormatArguments are as follows: + +UsdUsdFileFormatTokens->FormatArg, which must be a supported +format’s’Id’. The possible values are UsdUsdaFileFormatTokens->Id or +UsdUsdcFileFormatTokens->Id. +If no UsdUsdFileFormatTokens->FormatArg is supplied, the default is +UsdUsdcFileFormatTokens->Id. + +Methods: + +GetUnderlyingFormatForLayer +classmethod GetUnderlyingFormatForLayer(layer) -> str + +static GetUnderlyingFormatForLayer() +classmethod GetUnderlyingFormatForLayer(layer) -> str +Returns the value of the”format”argument to be used in the +FileFormatArguments when exporting or saving the given layer. +Returns an empty token if the given layer does not have this file +format. + +Parameters +layer (Layer) – + +class pxr.Usd.VariantSet +A UsdVariantSet represents a single VariantSet in USD (e.g. +modelingVariant or shadingVariant), which can have multiple variations +that express different sets of opinions about the scene description +rooted at the prim that defines the VariantSet. +(More detailed description of variants to follow) +Methods: + +AddVariant(variantName, position) +Author a variant spec for variantName in this VariantSet at the stage's current EditTarget, in the position specified by position . + +BlockVariantSelection() +Block any weaker selections for this VariantSet by authoring an empty string at the stage's current EditTarget. + +ClearVariantSelection() +Clear any selection for this VariantSet from the current EditTarget. + +GetName() +Return this VariantSet's name. + +GetPrim() +Return this VariantSet's held prim. + +GetVariantEditContext(layer) +Helper function for configuring a UsdStage 's EditTarget to author into the currently selected variant. + +GetVariantEditTarget(layer) +Return a UsdEditTarget that edits the currently selected variant in this VariantSet in layer. + +GetVariantNames() +Return the composed variant names for this VariantSet, ordered lexicographically. + +GetVariantSelection() +Return the variant selection for this VariantSet. + +HasAuthoredVariant(variantName) +Returns true if this VariantSet already possesses a variant. + +HasAuthoredVariantSelection(value) +Returns true if there is a selection authored for this VariantSet in any layer. + +IsValid() +Is this UsdVariantSet object usable? If not, calling any of its other methods is likely to crash. + +SetVariantSelection(variantName) +Author a variant selection for this VariantSet, setting it to variantName in the stage's current EditTarget. + +AddVariant(variantName, position) → bool +Author a variant spec for variantName in this VariantSet at the +stage’s current EditTarget, in the position specified by position +. +Return true if the spec was successfully authored, false otherwise. +This will create the VariantSet itself, if necessary, so as long as +UsdPrim “prim”is valid, the following should always work: +UsdVariantSet vs = prim.GetVariantSet("myVariantSet"); +vs.AddVariant("myFirstVariation"); +vs.SetVariantSelection("myFirstVariation"); +{ + UsdEditContext ctx(vs.GetVariantEditContext()); + // Now all of our subsequent edits will go "inside" the + // 'myFirstVariation' variant of 'myVariantSet' +} + +Parameters + +variantName (str) – +position (ListPosition) – + +BlockVariantSelection() → bool +Block any weaker selections for this VariantSet by authoring an empty +string at the stage’s current EditTarget. +Return true on success, false otherwise. + +ClearVariantSelection() → bool +Clear any selection for this VariantSet from the current EditTarget. +Return true on success, false otherwise. + +GetName() → str +Return this VariantSet’s name. + +GetPrim() → Prim +Return this VariantSet’s held prim. + +GetVariantEditContext(layer) → tuple[Stage, EditTarget] +Helper function for configuring a UsdStage ‘s EditTarget to author +into the currently selected variant. +Returns configuration for a UsdEditContext +To begin editing into VariantSet varSet’s currently selected +variant: +In C++, we would use the following pattern: +{ + UsdEditContext ctxt(varSet.GetVariantEditContext()); + + // All Usd mutation of the UsdStage on which varSet sits will + // now go "inside" the currently selected variant of varSet +} + +In python, the pattern is: +with varSet.GetVariantEditContext(): + # Now sending mutations to current variant + +See GetVariantEditTarget() for discussion of layer parameter + +Parameters +layer (Layer) – + +GetVariantEditTarget(layer) → EditTarget +Return a UsdEditTarget that edits the currently selected variant in +this VariantSet in layer. +If there is no currently selected variant in this VariantSet, return +an invalid EditTarget. +If layer is unspecified, then we will use the layer of our prim’s +stage’s current UsdEditTarget. +Currently, we require layer to be in the stage’s local LayerStack +(see UsdStage::HasLocalLayer() ), and will issue an error and return +an invalid EditTarget if layer is not. We may relax this restriction +in the future, if need arises, but it introduces several complications +in specification and behavior. + +Parameters +layer (Layer) – + +GetVariantNames() → list[str] +Return the composed variant names for this VariantSet, ordered +lexicographically. + +GetVariantSelection() → str +Return the variant selection for this VariantSet. +If there is no selection, return the empty string. + +HasAuthoredVariant(variantName) → bool +Returns true if this VariantSet already possesses a variant. + +Parameters +variantName (str) – + +HasAuthoredVariantSelection(value) → bool +Returns true if there is a selection authored for this VariantSet in +any layer. +If requested, the variant selection (if any) will be returned in +value . + +Parameters +value (str) – + +IsValid() → bool +Is this UsdVariantSet object usable? If not, calling any of its other +methods is likely to crash. + +SetVariantSelection(variantName) → bool +Author a variant selection for this VariantSet, setting it to +variantName in the stage’s current EditTarget. +If variantName is empty, clear the variant selection (see +ClearVariantSelection). Call BlockVariantSelection to explicitly set +an empty variant selection. +Return true if the selection was successfully authored or cleared, +false otherwise. + +Parameters +variantName (str) – + +class pxr.Usd.VariantSets +UsdVariantSets represents the collection of VariantSets that are +present on a UsdPrim. +A UsdVariantSets object, retrieved from a prim via +UsdPrim::GetVariantSets() , provides the API for interrogating and +modifying the composed list of VariantSets active defined on the prim, +and also the facility for authoring a VariantSet selection for any +of those VariantSets. +Methods: + +AddVariantSet(variantSetName, position) +Find an existing, or create a new VariantSet on the originating UsdPrim, named variantSetName . + +GetAllVariantSelections() +Returns the composed map of all variant selections authored on the the originating UsdPrim, regardless of whether a corresponding variant set exists. + +GetNames(names) +Compute the list of all VariantSets authored on the originating UsdPrim. + +GetVariantSelection(variantSetName) +Return the composed variant selection for the VariantSet named variantSetName. + +GetVariantSet(variantSetName) +Return a UsdVariantSet object for variantSetName . + +HasVariantSet(variantSetName) +Returns true if a VariantSet named variantSetName exists on the originating prim. + +SetSelection(variantSetName, variantName) + +param variantSetName + +AddVariantSet(variantSetName, position) → VariantSet +Find an existing, or create a new VariantSet on the originating +UsdPrim, named variantSetName . +This step is not always necessary, because if this UsdVariantSets +object is valid, then + varSetsObj.GetVariantSet(variantSetName).AddVariant(variantName); + +will always succeed, creating the VariantSet first, if necessary. + +This method exists for situations in which you want to create a +VariantSet without necessarily populating it with variants. + +Parameters + +variantSetName (str) – +position (ListPosition) – + +GetAllVariantSelections() → SdfVariantSelectionMap +Returns the composed map of all variant selections authored on the the +originating UsdPrim, regardless of whether a corresponding variant set +exists. + +GetNames(names) → bool +Compute the list of all VariantSets authored on the originating +UsdPrim. +Always return true. Clear the contents of names and store the +result there. + +Parameters +names (list[str]) – + +GetNames() -> list[str] +Return a list of all VariantSets authored on the originating UsdPrim. + +GetVariantSelection(variantSetName) → str +Return the composed variant selection for the VariantSet named +variantSetName. +If there is no selection, (or variantSetName does not exist) +return the empty string. + +Parameters +variantSetName (str) – + +GetVariantSet(variantSetName) → VariantSet +Return a UsdVariantSet object for variantSetName . +This always succeeds, although the returned VariantSet will be invalid +if the originating prim is invalid + +Parameters +variantSetName (str) – + +HasVariantSet(variantSetName) → bool +Returns true if a VariantSet named variantSetName exists on the +originating prim. + +Parameters +variantSetName (str) – + +SetSelection(variantSetName, variantName) → bool + +Parameters + +variantSetName (str) – +variantName (str) – + +class pxr.Usd.ZipFile +Class for reading a zip file. This class is primarily intended to +support the .usdz file format. It is not a general-purpose zip reader, +as it does not implement the full zip file specification. In +particular: + +This class does not natively support decompressing data from a +zip archive. Clients may access the data exactly as stored in the file +and perform their own decompression if desired. +This class does not rely on the central directory in order to +read the contents of the file. This allows it to operate on partial +zip archives. However, this also means it may handle certain zip files +incorrectly. For example, if a file was deleted from a zip archive by +just removing its central directory header, that file will still be +found by this class. + +Classes: + +FileInfo + +Methods: + +DumpContents() +Print out listing of contents of this zip archive to stdout. + +GetFile + +GetFileInfo + +GetFileNames + +Open +classmethod Open(filePath) -> ZipFile + +class FileInfo +Attributes: + +compressionMethod + +dataOffset + +encrypted + +size + +uncompressedSize + +property compressionMethod + +property dataOffset + +property encrypted + +property size + +property uncompressedSize + +DumpContents() → None +Print out listing of contents of this zip archive to stdout. +For diagnostic purposes only. + +GetFile() + +GetFileInfo() + +GetFileNames() + +static Open() +classmethod Open(filePath) -> ZipFile +Opens the zip archive at filePath . +Returns invalid object on error. + +Parameters +filePath (str) – + +Open(asset) -> ZipFile +Opens the zip archive asset . +Returns invalid object on error. + +Parameters +asset (ArAsset) – + +class pxr.Usd.ZipFileWriter +Class for writing a zip file. This class is primarily intended to +support the .usdz file format. It is not a general-purpose zip writer, +as it does not implement the full zip file specification. However, all +files written by this class should be valid zip files and readable by +external zip modules and utilities. +Methods: + +AddFile(filePath, filePathInArchive) +Adds the file at filePath to the zip archive with no compression applied. + +CreateNew +classmethod CreateNew(filePath) -> ZipFileWriter + +Discard() +Discards the zip archive so that it is not saved to the destination file path. + +Save() +Finalizes the zip archive and saves it to the destination file path. + +AddFile(filePath, filePathInArchive) → str +Adds the file at filePath to the zip archive with no compression +applied. +If filePathInArchive is non-empty, the file will be added at that +path in the archive. Otherwise, it will be added at filePath . +Returns the file path used to identify the file in the zip archive on +success. This path conforms to the zip file specification and may not +be the same as filePath or filePathInArchive . Returns an +empty string on failure. + +Parameters + +filePath (str) – +filePathInArchive (str) – + +static CreateNew() +classmethod CreateNew(filePath) -> ZipFileWriter +Create a new file writer with filePath as the destination file +path where the zip archive will be written. +The zip file will not be written to filePath until the writer is +destroyed or Save() is called. +Returns an invalid object on error. + +Parameters +filePath (str) – + +Discard() → None +Discards the zip archive so that it is not saved to the destination +file path. +Once discarded, the file writer is invalid and may not be reused. + +Save() → bool +Finalizes the zip archive and saves it to the destination file path. +Once saved, the file writer is invalid and may not be reused. Returns +true on success, false otherwise. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdAppUtils.md b/UsdAppUtils.md new file mode 100644 index 0000000000000000000000000000000000000000..0e8ac2c4d15da29871e27187eaab0ad3b808aa16 --- /dev/null +++ b/UsdAppUtils.md @@ -0,0 +1,115 @@ + + +UsdAppUtils module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdAppUtils module + +  + +# UsdAppUtils module + +Summary: The UsdAppUtils module contains a number of utilities and common functionality for applications that view and/or record images of USD stages. + +Classes: + +FrameRecorder +A utility class for recording images of USD stages. + +class pxr.UsdAppUtils.FrameRecorder +A utility class for recording images of USD stages. +UsdAppUtilsFrameRecorder uses Hydra to produce recorded images of a +USD stage looking through a particular UsdGeomCamera on that stage at +a particular UsdTimeCode. The images generated will be effectively the +same as what you would see in the viewer in usdview. +Note that it is assumed that an OpenGL context has already been setup. +Methods: + +GetCurrentRendererId() +Gets the ID of the Hydra renderer plugin that will be used for recording. + +Record(stage, usdCamera, timeCode, ...) +Records an image and writes the result to outputImagePath . + +SetColorCorrectionMode(colorCorrectionMode) +Sets the color correction mode to be used for recording. + +SetComplexity(complexity) +Sets the level of refinement complexity. + +SetImageWidth(imageWidth) +Sets the width of the recorded image. + +SetIncludedPurposes(purposes) +Sets the UsdGeomImageable purposes to be used for rendering. + +SetRendererPlugin(id) +Sets the Hydra renderer plugin to be used for recording. + +GetCurrentRendererId() → str +Gets the ID of the Hydra renderer plugin that will be used for +recording. + +Record(stage, usdCamera, timeCode, outputImagePath) → bool +Records an image and writes the result to outputImagePath . +The recorded image will represent the view from usdCamera looking +at the imageable prims on USD stage stage at time timeCode . +If usdCamera is not a valid camera, a camera will be computed to +automatically frame the stage geometry. +Returns true if the image was generated and written successfully, or +false otherwise. + +Parameters + +stage (Stage) – +usdCamera (Camera) – +timeCode (TimeCode) – +outputImagePath (str) – + +SetColorCorrectionMode(colorCorrectionMode) → None +Sets the color correction mode to be used for recording. +By default, color correction is disabled. + +Parameters +colorCorrectionMode (str) – + +SetComplexity(complexity) → None +Sets the level of refinement complexity. +The default complexity is”low”(1.0). + +Parameters +complexity (float) – + +SetImageWidth(imageWidth) → None +Sets the width of the recorded image. +The height of the recorded image will be computed using this value and +the aspect ratio of the camera used for recording. +The default image width is 960 pixels. + +Parameters +imageWidth (int) – + +SetIncludedPurposes(purposes) → None +Sets the UsdGeomImageable purposes to be used for rendering. +We will always include”default”purpose, and by default, we will +also include UsdGeomTokens->proxy. Use this method to explicitly +enumerate an alternate set of purposes to be included along +with”default”. + +Parameters +purposes (list[TfToken]) – + +SetRendererPlugin(id) → bool +Sets the Hydra renderer plugin to be used for recording. + +Parameters +id (str) – + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdGeom.md b/UsdGeom.md new file mode 100644 index 0000000000000000000000000000000000000000..3ee65e8fa4c59d39c15baec0b4a58f3112a03998 --- /dev/null +++ b/UsdGeom.md @@ -0,0 +1,11672 @@ + + +UsdGeom module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdGeom module + +  + +# UsdGeom module + +Summary: The UsdGeom module defines 3D graphics-related prim and property schemas that form a basis for geometry interchange. + +Classes: + +BBoxCache +Caches bounds by recursively computing and aggregating bounds of children in world space and aggregating the result back into local space. + +BasisCurves +BasisCurves are a batched curve representation analogous to the classic RIB definition via Basis and Curves statements. + +Boundable +Boundable introduces the ability for a prim to persistently cache a rectilinear, local-space, extent. + +Camera +Transformable camera. + +Capsule +Defines a primitive capsule, i.e. a cylinder capped by two half spheres, centered at the origin, whose spine is along the specified axis. + +Cone +Defines a primitive cone, centered at the origin, whose spine is along the specified axis, with the apex of the cone pointing in the direction of the positive axis. + +ConstraintTarget +Schema wrapper for UsdAttribute for authoring and introspecting attributes that are constraint targets. + +Cube +Defines a primitive rectilinear cube centered at the origin. + +Curves +Base class for UsdGeomBasisCurves, UsdGeomNurbsCurves, and UsdGeomHermiteCurves. + +Cylinder +Defines a primitive cylinder with closed ends, centered at the origin, whose spine is along the specified axis. + +Gprim +Base class for all geometric primitives. + +HermiteCurves +This schema specifies a cubic hermite interpolated curve batch as sometimes used for defining guides for animation. + +Imageable +Base class for all prims that may require rendering or visualization of some sort. + +LinearUnits + +Mesh +Encodes a mesh with optional subdivision properties and features. + +ModelAPI +UsdGeomModelAPI extends the generic UsdModelAPI schema with geometry specific concepts such as cached extents for the entire model, constraint targets, and geometry-inspired extensions to the payload lofting process. + +MotionAPI +UsdGeomMotionAPI encodes data that can live on any prim that may affect computations involving: + +NurbsCurves +This schema is analagous to NURBS Curves in packages like Maya and Houdini, often used for interchange of rigging and modeling curves. + +NurbsPatch +Encodes a rational or polynomial non-uniform B-spline surface, with optional trim curves. + +Plane +Defines a primitive plane, centered at the origin, and is defined by a cardinal axis, width, and length. + +PointBased +Base class for all UsdGeomGprims that possess points, providing common attributes such as normals and velocities. + +PointInstancer +Encodes vectorized instancing of multiple, potentially animated, prototypes (object/instance masters), which can be arbitrary prims/subtrees on a UsdStage. + +Points +Points are analogous to the RiPoints spec. + +Primvar +Schema wrapper for UsdAttribute for authoring and introspecting attributes that are primvars. + +PrimvarsAPI +UsdGeomPrimvarsAPI encodes geometric"primitive variables", as UsdGeomPrimvar, which interpolate across a primitive's topology, can override shader inputs, and inherit down namespace. + +Scope +Scope is the simplest grouping primitive, and does not carry the baggage of transformability. + +Sphere +Defines a primitive sphere centered at the origin. + +Subset +Encodes a subset of a piece of geometry (i.e. + +Tokens + +VisibilityAPI +UsdGeomVisibilityAPI introduces properties that can be used to author visibility opinions. + +Xform +Concrete prim schema for a transform, which implements Xformable + +XformCache +A caching mechanism for transform matrices. + +XformCommonAPI +This class provides API for authoring and retrieving a standard set of component transformations which include a scale, a rotation, a scale- rotate pivot and a translation. + +XformOp +Schema wrapper for UsdAttribute for authoring and computing transformation operations, as consumed by UsdGeomXformable schema. + +XformOpTypes + +Xformable +Base class for all transformable prims, which allows arbitrary sequences of component affine transformations to be encoded. + +class pxr.UsdGeom.BBoxCache +Caches bounds by recursively computing and aggregating bounds of +children in world space and aggregating the result back into local +space. +The cache is configured for a specific time and +UsdGeomImageable::GetPurposeAttr() set of purposes. When querying a +bound, transforms and extents are read either from the time specified +or UsdTimeCode::Default() , following TimeSamples, Defaults, and Value +Resolution standard time-sample value resolution. As noted in +SetIncludedPurposes() , changing the included purposes does not +invalidate the cache, because we cache purpose along with the +geometric data. +Child prims that are invisible at the requested time are excluded when +computing a prim’s bounds. However, if a bound is requested directly +for an excluded prim, it will be computed. Additionally, only prims +deriving from UsdGeomImageable are included in child bounds +computations. +Unlike standard UsdStage traversals, the traversal performed by the +UsdGeomBBoxCache includesprims that are unloaded (see +UsdPrim::IsLoaded() ). This makes it possible to fetch bounds for a +UsdStage that has been opened without forcePopulate, provided the +unloaded model prims have authored extent hints (see +UsdGeomModelAPI::GetExtentsHint() ). +This class is optimized for computing tight +untransformed”object”space bounds for component-models. In the +absence of component models, bounds are optimized for world-space, +since there is no other easily identifiable space for which to +optimize, and we cannot optimize for every prim’s local space without +performing quadratic work. +The TfDebug flag, USDGEOM_BBOX, is provided for debugging. + +Warning + +This class should only be used with valid UsdPrim objects. +This cache does not listen for change notifications; the user is +responsible for clearing the cache when changes occur. +Thread safety: instances of this class may not be used +concurrently. +Plugins may be loaded in order to compute extents for prim types +provided by that plugin. See +UsdGeomBoundable::ComputeExtentFromPlugins + +Methods: + +Clear() +Clears all pre-cached values. + +ClearBaseTime() +Clear this cache's baseTime if one has been set. + +ComputeLocalBound(prim) +Computes the oriented bounding box of the given prim, leveraging any pre-existing, cached bounds. + +ComputePointInstanceLocalBound(instancer, ...) +Compute the oriented bounding boxes of the given point instances. + +ComputePointInstanceLocalBounds(instancer, ...) +Compute the oriented bounding boxes of the given point instances. + +ComputePointInstanceRelativeBound(instancer, ...) +Compute the bound of the given point instance in the space of an ancestor prim relativeToAncestorPrim . + +ComputePointInstanceRelativeBounds(...) +Compute the bounds of the given point instances in the space of an ancestor prim relativeToAncestorPrim . + +ComputePointInstanceUntransformedBound(...) +Computes the bound of the given point instances, but does not include the instancer's transform. + +ComputePointInstanceUntransformedBounds(...) +Computes the bound of the given point instances, but does not include the transform (if any) authored on the instancer itself. + +ComputePointInstanceWorldBound(instancer, ...) +Compute the bound of the given point instance in world space. + +ComputePointInstanceWorldBounds(instancer, ...) +Compute the bound of the given point instances in world space. + +ComputeRelativeBound(prim, ...) +Compute the bound of the given prim in the space of an ancestor prim, relativeToAncestorPrim , leveraging any pre-existing cached bounds. + +ComputeUntransformedBound(prim) +Computes the bound of the prim's children leveraging any pre-existing, cached bounds, but does not include the transform (if any) authored on the prim itself. + +ComputeWorldBound(prim) +Compute the bound of the given prim in world space, leveraging any pre-existing, cached bounds. + +ComputeWorldBoundWithOverrides(prim, ...) +Computes the bound of the prim's descendents in world space while excluding the subtrees rooted at the paths in pathsToSkip . + +GetBaseTime() +Return the base time if set, otherwise GetTime() . + +GetIncludedPurposes() +Get the current set of included purposes. + +GetTime() +Get the current time from which this cache is reading values. + +GetUseExtentsHint() +Returns whether authored extent hints are used to compute bounding boxes. + +HasBaseTime() +Return true if this cache has a baseTime that's been explicitly set, false otherwise. + +SetBaseTime(baseTime) +Set the base time value for this bbox cache. + +SetIncludedPurposes(includedPurposes) +Indicate the set of includedPurposes to use when resolving child bounds. + +SetTime(time) +Use the new time when computing values and may clear any existing values cached for the previous time. + +Clear() → None +Clears all pre-cached values. + +ClearBaseTime() → None +Clear this cache’s baseTime if one has been set. +After calling this, the cache will use its time as the baseTime value. + +ComputeLocalBound(prim) → BBox3d +Computes the oriented bounding box of the given prim, leveraging any +pre-existing, cached bounds. +The computed bound includes the transform authored on the prim itself, +but does not include any ancestor transforms (it does not include the +local-to-world transform). +See ComputeWorldBound() for notes on performance and error handling. + +Parameters +prim (Prim) – + +ComputePointInstanceLocalBound(instancer, instanceId) → BBox3d +Compute the oriented bounding boxes of the given point instances. + +Parameters + +instancer (PointInstancer) – +instanceId (int) – + +ComputePointInstanceLocalBounds(instancer, instanceIdBegin, numIds, result) → bool +Compute the oriented bounding boxes of the given point instances. +The computed bounds include the transform authored on the instancer +itself, but does not include any ancestor transforms (it does not +include the local-to-world transform). +The result pointer must point to numIds GfBBox3d instances to +be filled. + +Parameters + +instancer (PointInstancer) – +instanceIdBegin (int) – +numIds (int) – +result (BBox3d) – + +ComputePointInstanceRelativeBound(instancer, instanceId, relativeToAncestorPrim) → BBox3d +Compute the bound of the given point instance in the space of an +ancestor prim relativeToAncestorPrim . + +Parameters + +instancer (PointInstancer) – +instanceId (int) – +relativeToAncestorPrim (Prim) – + +ComputePointInstanceRelativeBounds(instancer, instanceIdBegin, numIds, relativeToAncestorPrim, result) → bool +Compute the bounds of the given point instances in the space of an +ancestor prim relativeToAncestorPrim . +Write the results to result . +The computed bound excludes the local transform at +relativeToAncestorPrim . The computed bound may be incorrect if +relativeToAncestorPrim is not an ancestor of prim . +The result pointer must point to numIds GfBBox3d instances to +be filled. + +Parameters + +instancer (PointInstancer) – +instanceIdBegin (int) – +numIds (int) – +relativeToAncestorPrim (Prim) – +result (BBox3d) – + +ComputePointInstanceUntransformedBound(instancer, instanceId) → BBox3d +Computes the bound of the given point instances, but does not include +the instancer’s transform. + +Parameters + +instancer (PointInstancer) – +instanceId (int) – + +ComputePointInstanceUntransformedBounds(instancer, instanceIdBegin, numIds, result) → bool +Computes the bound of the given point instances, but does not include +the transform (if any) authored on the instancer itself. +IMPORTANT: while the BBox does not contain the local +transformation, in general it may still contain a non-identity +transformation matrix to put the bounds in the correct space. +Therefore, to obtain the correct axis-aligned bounding box, the client +must call ComputeAlignedRange(). +The result pointer must point to numIds GfBBox3d instances to +be filled. + +Parameters + +instancer (PointInstancer) – +instanceIdBegin (int) – +numIds (int) – +result (BBox3d) – + +ComputePointInstanceWorldBound(instancer, instanceId) → BBox3d +Compute the bound of the given point instance in world space. + +Parameters + +instancer (PointInstancer) – +instanceId (int) – + +ComputePointInstanceWorldBounds(instancer, instanceIdBegin, numIds, result) → bool +Compute the bound of the given point instances in world space. +The bounds of each instance is computed and then transformed to world +space. The result pointer must point to numIds GfBBox3d +instances to be filled. + +Parameters + +instancer (PointInstancer) – +instanceIdBegin (int) – +numIds (int) – +result (BBox3d) – + +ComputeRelativeBound(prim, relativeToAncestorPrim) → BBox3d +Compute the bound of the given prim in the space of an ancestor prim, +relativeToAncestorPrim , leveraging any pre-existing cached +bounds. +The computed bound excludes the local transform at +relativeToAncestorPrim . The computed bound may be incorrect if +relativeToAncestorPrim is not an ancestor of prim . + +Parameters + +prim (Prim) – +relativeToAncestorPrim (Prim) – + +ComputeUntransformedBound(prim) → BBox3d +Computes the bound of the prim’s children leveraging any pre-existing, +cached bounds, but does not include the transform (if any) authored on +the prim itself. +IMPORTANT: while the BBox does not contain the local +transformation, in general it may still contain a non-identity +transformation matrix to put the bounds in the correct space. +Therefore, to obtain the correct axis-aligned bounding box, the client +must call ComputeAlignedRange(). +See ComputeWorldBound() for notes on performance and error handling. + +Parameters +prim (Prim) – + +ComputeUntransformedBound(prim, pathsToSkip, ctmOverrides) -> BBox3d +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the bound of the prim’s descendents while excluding the +subtrees rooted at the paths in pathsToSkip . +Additionally, the parameter ctmOverrides is used to specify +overrides to the CTM values of certain paths underneath the prim. The +CTM values in the ctmOverrides map are in the space of the given +prim, prim . +This leverages any pre-existing, cached bounds, but does not include +the transform (if any) authored on the prim itself. +IMPORTANT: while the BBox does not contain the local +transformation, in general it may still contain a non-identity +transformation matrix to put the bounds in the correct space. +Therefore, to obtain the correct axis-aligned bounding box, the client +must call ComputeAlignedRange(). +See ComputeWorldBound() for notes on performance and error handling. + +Parameters + +prim (Prim) – +pathsToSkip (SdfPathSet) – +ctmOverrides (TfHashMap[Path, Matrix4d, Path.Hash]) – + +ComputeWorldBound(prim) → BBox3d +Compute the bound of the given prim in world space, leveraging any +pre-existing, cached bounds. +The bound of the prim is computed, including the transform (if any) +authored on the node itself, and then transformed to world space. +Error handling note: No checking of prim validity is performed. If +prim is invalid, this method will abort the program; therefore it +is the client’s responsibility to ensure prim is valid. + +Parameters +prim (Prim) – + +ComputeWorldBoundWithOverrides(prim, pathsToSkip, primOverride, ctmOverrides) → BBox3d +Computes the bound of the prim’s descendents in world space while +excluding the subtrees rooted at the paths in pathsToSkip . +Additionally, the parameter primOverride overrides the local-to- +world transform of the prim and ctmOverrides is used to specify +overrides the local-to-world transforms of certain paths underneath +the prim. +This leverages any pre-existing, cached bounds, but does not include +the transform (if any) authored on the prim itself. +See ComputeWorldBound() for notes on performance and error handling. + +Parameters + +prim (Prim) – +pathsToSkip (SdfPathSet) – +primOverride (Matrix4d) – +ctmOverrides (TfHashMap[Path, Matrix4d, Path.Hash]) – + +GetBaseTime() → TimeCode +Return the base time if set, otherwise GetTime() . +Use HasBaseTime() to observe if a base time has been set. + +GetIncludedPurposes() → list[TfToken] +Get the current set of included purposes. + +GetTime() → TimeCode +Get the current time from which this cache is reading values. + +GetUseExtentsHint() → bool +Returns whether authored extent hints are used to compute bounding +boxes. + +HasBaseTime() → bool +Return true if this cache has a baseTime that’s been explicitly set, +false otherwise. + +SetBaseTime(baseTime) → None +Set the base time value for this bbox cache. +This value is used only when computing bboxes for point instancer +instances (see ComputePointInstanceWorldBounds() , for example). See +UsdGeomPointInstancer::ComputeExtentAtTime() for more information. If +unset, the bbox cache uses its time ( GetTime() / SetTime() ) for this +value. +Note that setting the base time does not invalidate any cache entries. + +Parameters +baseTime (TimeCode) – + +SetIncludedPurposes(includedPurposes) → None +Indicate the set of includedPurposes to use when resolving child +bounds. +Each child’s purpose must match one of the elements of this set to be +included in the computation; if it does not, child is excluded. +Note the use of child in the docs above, purpose is ignored for the +prim for whose bounds are directly queried. +Changing this value does not invalidate existing caches. + +Parameters +includedPurposes (list[TfToken]) – + +SetTime(time) → None +Use the new time when computing values and may clear any existing +values cached for the previous time. +Setting time to the current time is a no-op. + +Parameters +time (TimeCode) – + +class pxr.UsdGeom.BasisCurves +BasisCurves are a batched curve representation analogous to the +classic RIB definition via Basis and Curves statements. BasisCurves +are often used to render dense aggregate geometry like hair or grass. +A’matrix’and’vstep’associated with the basis are used to interpolate +the vertices of a cubic BasisCurves. (The basis attribute is unused +for linear BasisCurves.) +A single prim may have many curves whose count is determined +implicitly by the length of the curveVertexCounts vector. Each +individual curve is composed of one or more segments. Each segment is +defined by four vertices for cubic curves and two vertices for linear +curves. See the next section for more information on how to map curve +vertex counts to segment counts. + +## Segment Indexing + +Interpolating a curve requires knowing how to decompose it into its +individual segments. +The segments of a cubic curve are determined by the vertex count, the +wrap (periodicity), and the vstep of the basis. For linear curves, +the basis token is ignored and only the vertex count and wrap are +needed. +cubic basis +vstep +bezier +3 +catmullRom +1 +bspline +1 +The first segment of a cubic (nonperiodic) curve is always defined by +its first four points. The vstep is the increment used to determine +what vertex indices define the next segment. For a two segment +(nonperiodic) bspline basis curve (vstep = 1), the first segment will +be defined by interpolating vertices [0, 1, 2, 3] and the second +segment will be defined by [1, 2, 3, 4]. For a two segment bezier +basis curve (vstep = 3), the first segment will be defined by +interpolating vertices [0, 1, 2, 3] and the second segment will be +defined by [3, 4, 5, 6]. If the vstep is not one, then you must take +special care to make sure that the number of cvs properly divides by +your vstep. (The indices described are relative to the initial vertex +index for a batched curve.) +For periodic curves, at least one of the curve’s initial vertices are +repeated to close the curve. For cubic curves, the number of vertices +repeated is’4 - vstep’. For linear curves, only one vertex is repeated +to close the loop. +Pinned curves are a special case of nonperiodic curves that only +affects the behavior of cubic Bspline and Catmull-Rom curves. To +evaluate or render pinned curves, a client must effectively +add’phantom points’at the beginning and end of every curve in a batch. +These phantom points are injected to ensure that the interpolated +curve begins at P[0] and ends at P[n-1]. +For a curve with initial point P[0] and last point P[n-1], the phantom +points are defined as. P[-1] = 2 * P[0] - P[1] P[n] = 2 * P[n-1] - +P[n-2] +Pinned cubic curves will (usually) have to be unpacked into the +standard nonperiodic representation before rendering. This unpacking +can add some additional overhead. However, using pinned curves reduces +the amount of data recorded in a scene and (more importantly) better +records the authors’intent for interchange. +The additional phantom points mean that the minimum curve vertex count +for cubic bspline and catmullRom curves is 2. Linear curve segments +are defined by two vertices. A two segment linear curve’s first +segment would be defined by interpolating vertices [0, 1]. The second +segment would be defined by vertices [1, 2]. (Again, for a batched +curve, indices are relative to the initial vertex index.) +When validating curve topology, each renderable entry in the +curveVertexCounts vector must pass this check. +type +wrap +validitity +linear +nonperiodic +curveVertexCounts[i]>2 +linear +periodic +curveVertexCounts[i]>3 +cubic +nonperiodic +(curveVertexCounts[i] - 4) % vstep == 0 +cubic +periodic +(curveVertexCounts[i]) % vstep == 0 +cubic +pinned (catmullRom/bspline) +(curveVertexCounts[i] - 2)>= 0 + +## Cubic Vertex Interpolation + +## Linear Vertex Interpolation + +Linear interpolation is always used on curves of type linear.’t’with +domain [0, 1], the curve is defined by the equation P0 * (1-t) + P1 +* t. t at 0 describes the first point and t at 1 describes the end +point. + +## Primvar Interpolation + +For cubic curves, primvar data can be either interpolated cubically +between vertices or linearly across segments. The corresponding token +for cubic interpolation is’vertex’and for linear interpolation +is’varying’. Per vertex data should be the same size as the number of +vertices in your curve. Segment varying data is dependent on the wrap +(periodicity) and number of segments in your curve. For linear curves, +varying and vertex data would be interpolated the same way. By +convention varying is the preferred interpolation because of the +association of varying with linear interpolation. +To convert an entry in the curveVertexCounts vector into a segment +count for an individual curve, apply these rules. Sum up all the +results in order to compute how many total segments all curves have. +The following tables describe the expected segment count for the’i’th +curve in a curve batch as well as the entire batch. Python syntax +like’[:]’(to describe all members of an array) and’len(...)’(to +describe the length of an array) are used. +type +wrap +curve segment count +batch segment count +linear +nonperiodic +curveVertexCounts[i] - 1 +sum(curveVertexCounts[:]) - len(curveVertexCounts) +linear +periodic +curveVertexCounts[i] +sum(curveVertexCounts[:]) +cubic +nonperiodic +(curveVertexCounts[i] - 4) / vstep + 1 +sum(curveVertexCounts[:] - 4) / vstep + len(curveVertexCounts) +cubic +periodic +curveVertexCounts[i] / vstep +sum(curveVertexCounts[:]) / vstep +cubic +pinned (catmullRom/bspline) +(curveVertexCounts[i] - 2) + 1 +sum(curveVertexCounts[:] - 2) + len(curveVertexCounts) +The following table descrives the expected size of varying (linearly +interpolated) data, derived from the segment counts computed above. +wrap +curve varying count +batch varying count +nonperiodic/pinned +segmentCounts[i] + 1 +sum(segmentCounts[:]) + len(curveVertexCounts) +periodic +segmentCounts[i] +sum(segmentCounts[:]) +Both curve types additionally define’constant’interpolation for the +entire prim and’uniform’interpolation as per curve data. +Take care when providing support for linearly interpolated data for +cubic curves. Its shape doesn’t provide a one to one mapping with +either the number of curves (like’uniform’) or the number of vertices +(like’vertex’) and so it is often overlooked. This is the only +primitive in UsdGeom (as of this writing) where this is true. For +meshes, while they use different interpolation +methods,’varying’and’vertex’are both specified per point. It’s common +to assume that curves follow a similar pattern and build in structures +and language for per primitive, per element, and per point data only +to come upon these arrays that don’t quite fit into either of those +categories. It is also common to conflate’varying’with being per +segment data and use the segmentCount rules table instead of its +neighboring varying data table rules. We suspect that this is because +for the common case of nonperiodic cubic curves, both the provided +segment count and varying data size formula end with’+ 1’. While +debugging, users may look at the double’+ 1’as a mistake and try to +remove it. We take this time to enumerate these issues because we’ve +fallen into them before and hope that we save others time in their own +implementations. As an example of deriving per curve segment and +varying primvar data counts from the wrap, type, basis, and +curveVertexCount, the following table is provided. +wrap +type +basis +curveVertexCount +curveSegmentCount +varyingDataCount +nonperiodic +linear +N/A +[2 3 2 5] +[1 2 1 4] +[2 3 2 5] +nonperiodic +cubic +bezier +[4 7 10 4 7] +[1 2 3 1 2] +[2 3 4 2 3] +nonperiodic +cubic +bspline +[5 4 6 7] +[2 1 3 4] +[3 2 4 5] +periodic +cubic +bezier +[6 9 6] +[2 3 2] +[2 3 2] +periodic +linear +N/A +[3 7] +[3 7] +[3 7] + +## Tubes and Ribbons + +The strictest definition of a curve as an infinitely thin wire is not +particularly useful for describing production scenes. The additional +widths and normals attributes can be used to describe cylindrical +tubes and or flat oriented ribbons. +Curves with only widths defined are imaged as tubes with radius’width +/ 2’. Curves with both widths and normals are imaged as ribbons +oriented in the direction of the interpolated normal vectors. +While not technically UsdGeomPrimvars, widths and normals also have +interpolation metadata. It’s common for authored widths to have +constant, varying, or vertex interpolation (see +UsdGeomCurves::GetWidthsInterpolation() ). It’s common for authored +normals to have varying interpolation (see +UsdGeomPointBased::GetNormalsInterpolation() ). +The file used to generate these curves can be found in +pxr/extras/examples/usdGeomExamples/basisCurves.usda. It’s provided as +a reference on how to properly image both tubes and ribbons. The first +row of curves are linear; the second are cubic bezier. (We aim in +future releases of HdSt to fix the discontinuity seen with broken +tangents to better match offline renderers like RenderMan.) The yellow +and violet cubic curves represent cubic vertex width interpolation for +which there is no equivalent for linear curves. +How did this prim type get its name? This prim is a portmanteau of two +different statements in the original RenderMan +specification:’Basis’and’Curves’. For any described attribute +Fallback Value or Allowed Values below that are text/tokens, +the actual token is published and defined in UsdGeomTokens. So to set +an attribute to the value”rightHanded”, use UsdGeomTokens->rightHanded +as the value. +Methods: + +ComputeInterpolationForSize(n, timeCode, info) +Computes interpolation token for n . + +ComputeUniformDataSize(timeCode) +Computes the expected size for data with"uniform"interpolation. + +ComputeVaryingDataSize(timeCode) +Computes the expected size for data with"varying"interpolation. + +ComputeVertexDataSize(timeCode) +Computes the expected size for data with"vertex"interpolation. + +CreateBasisAttr(defaultValue, writeSparsely) +See GetBasisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTypeAttr(defaultValue, writeSparsely) +See GetTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateWrapAttr(defaultValue, writeSparsely) +See GetWrapAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> BasisCurves + +Get +classmethod Get(stage, path) -> BasisCurves + +GetBasisAttr() +The basis specifies the vstep and matrix used for cubic interpolation. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTypeAttr() +Linear curves interpolate linearly between two vertices. + +GetWrapAttr() +If wrap is set to periodic, the curve when rendered will repeat the initial vertices (dependent on the vstep) to close the curve. + +ComputeInterpolationForSize(n, timeCode, info) → str +Computes interpolation token for n . +If this returns an empty token and info was non-None, it’ll +contain the expected value for each token. +The topology is determined using timeCode . + +Parameters + +n (int) – +timeCode (TimeCode) – +info (ComputeInterpolationInfo) – + +ComputeUniformDataSize(timeCode) → int +Computes the expected size for data with”uniform”interpolation. +If you’re trying to determine what interpolation to use, it is more +efficient to use ComputeInterpolationForSize + +Parameters +timeCode (TimeCode) – + +ComputeVaryingDataSize(timeCode) → int +Computes the expected size for data with”varying”interpolation. +If you’re trying to determine what interpolation to use, it is more +efficient to use ComputeInterpolationForSize + +Parameters +timeCode (TimeCode) – + +ComputeVertexDataSize(timeCode) → int +Computes the expected size for data with”vertex”interpolation. +If you’re trying to determine what interpolation to use, it is more +efficient to use ComputeInterpolationForSize + +Parameters +timeCode (TimeCode) – + +CreateBasisAttr(defaultValue, writeSparsely) → Attribute +See GetBasisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTypeAttr(defaultValue, writeSparsely) → Attribute +See GetTypeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateWrapAttr(defaultValue, writeSparsely) → Attribute +See GetWrapAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> BasisCurves +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> BasisCurves +Return a UsdGeomBasisCurves holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomBasisCurves(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetBasisAttr() → Attribute +The basis specifies the vstep and matrix used for cubic interpolation. +The’hermite’and’power’tokens have been removed. We’ve provided +UsdGeomHermiteCurves as an alternative for the’hermite’basis. +Declaration +uniform token basis ="bezier" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +bezier, bspline, catmullRom + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTypeAttr() → Attribute +Linear curves interpolate linearly between two vertices. +Cubic curves use a basis matrix with four vertices to interpolate a +segment. +Declaration +uniform token type ="cubic" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +linear, cubic + +GetWrapAttr() → Attribute +If wrap is set to periodic, the curve when rendered will repeat the +initial vertices (dependent on the vstep) to close the curve. +If wrap is set to’pinned’, phantom points may be created to ensure +that the curve interpolation starts at P[0] and ends at P[n-1]. +Declaration +uniform token wrap ="nonperiodic" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +nonperiodic, periodic, pinned + +class pxr.UsdGeom.Boundable +Boundable introduces the ability for a prim to persistently cache a +rectilinear, local-space, extent. + +## Why Extent and not Bounds ? + +Boundable introduces the notion of”extent”, which is a cached +computation of a prim’s local-space 3D range for its resolved +attributes at the layer and time in which extent is authored. We +have found that with composed scene description, attempting to cache +pre-computed bounds at interior prims in a scene graph is very +fragile, given the ease with which one can author a single attribute +in a stronger layer that can invalidate many authored caches - or with +which a re-published, referenced asset can do the same. +Therefore, we limit to precomputing (generally) leaf-prim extent, +which avoids the need to read in large point arrays to compute bounds, +and provides UsdGeomBBoxCache the means to efficiently compute and +(session-only) cache intermediate bounds. You are free to compute and +author intermediate bounds into your scenes, of course, which may work +well if you have sufficient locks on your pipeline to guarantee that +once authored, the geometry and transforms upon which they are based +will remain unchanged, or if accuracy of the bounds is not an ironclad +requisite. +When intermediate bounds are authored on Boundable parents, the child +prims will be pruned from BBox computation; the authored extent is +expected to incorporate all child bounds. +Methods: + +ComputeExtent +classmethod ComputeExtent(radius, extent) -> bool + +ComputeExtentFromPlugins +classmethod ComputeExtentFromPlugins(boundable, time, extent) -> bool + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> Boundable + +GetExtentAttr() +Extent is a three dimensional range measuring the geometric extent of the authored gprim in its own local space (i.e. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +ComputeExtent() +classmethod ComputeExtent(radius, extent) -> bool +Compute the extent for the sphere defined by the radius. +true upon success, false if unable to calculate extent. On success, +extent will contain an approximate axis-aligned bounding box of the +sphere defined by the radius. +This function is to provide easy authoring of extent for usd authoring +tools, hence it is static and acts outside a specific prim (as in +attribute based methods). + +Parameters + +radius (float) – +extent (Vec3fArray) – + +ComputeExtent(radius, transform, extent) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied. + +Parameters + +radius (float) – +transform (Matrix4d) – +extent (Vec3fArray) – + +static ComputeExtentFromPlugins() +classmethod ComputeExtentFromPlugins(boundable, time, extent) -> bool +Compute the extent for the Boundable prim boundable at time +time . +If successful, populates extent with the result and returns +true , otherwise returns false . +The extent computation is based on the concrete type of the prim +represented by boundable . Plugins that provide a Boundable prim +type may implement and register an extent computation for that type +using UsdGeomRegisterComputeExtentFunction. ComputeExtentFromPlugins +will use this function to compute extents for all prims of that type. +If no function has been registered for a prim type, but a function has +been registered for one of its base types, that function will be used +instead. +This function may load plugins in order to access the extent +computation for a prim type. + +Parameters + +boundable (Boundable) – +time (TimeCode) – +extent (Vec3fArray) – + +ComputeExtentFromPlugins(boundable, time, transform, extent) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied. + +Parameters + +boundable (Boundable) – +time (TimeCode) – +transform (Matrix4d) – +extent (Vec3fArray) – + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> Boundable +Return a UsdGeomBoundable holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomBoundable(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetExtentAttr() → Attribute +Extent is a three dimensional range measuring the geometric extent of +the authored gprim in its own local space (i.e. +its own transform not applied), without accounting for any shader- +induced displacement. If any extent value has been authored for a +given Boundable, then it should be authored at every timeSample at +which geometry-affecting properties are authored, to ensure correct +evaluation via ComputeExtent() . If no extent value has been +authored, then ComputeExtent() will call the Boundable’s registered +ComputeExtentFunction(), which may be expensive, which is why we +strongly encourage proper authoring of extent. +ComputeExtent() +Why Extent and not Bounds? . An authored extent on a prim which has +children is expected to include the extent of all children, as they +will be pruned from BBox computation during traversal. +Declaration +float3[] extent +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.Camera +Transformable camera. +Describes optical properties of a camera via a common set of +attributes that provide control over the camera’s frustum as well as +its depth of field. For stereo, the left and right camera are +individual prims tagged through the stereoRole attribute. +There is a corresponding class GfCamera, which can hold the state of a +camera (at a particular time). UsdGeomCamera::GetCamera() and +UsdGeomCamera::SetFromCamera() convert between a USD camera prim and a +GfCamera. +To obtain the camera’s location in world space, call the following on +a UsdGeomCamera ‘camera’: +GfMatrix4d camXform = camera.ComputeLocalToWorldTransform(time); + +Cameras in USD are always”Y up”, regardless of the stage’s +orientation (i.e. UsdGeomGetStageUpAxis() ). This means that the +inverse of’camXform’(the VIEW half of the MODELVIEW transform in +OpenGL parlance) will transform the world such that the camera is at +the origin, looking down the -Z axis, with +Y as the up axis, and +X +pointing to the right. This describes a right handed coordinate +system. + +## Units of Measure for Camera Properties + +Despite the familiarity of millimeters for specifying some physical +camera properties, UsdGeomCamera opts for greater consistency with all +other UsdGeom schemas, which measure geometric properties in scene +units, as determined by UsdGeomGetStageMetersPerUnit() . We do make a +concession, however, in that lens and filmback properties are measured +in tenths of a scene unit rather than”raw”scene units. This means +that with the fallback value of.01 for metersPerUnit - i.e. scene +unit of centimeters - then these”tenth of scene unit”properties are +effectively millimeters. +If one adds a Camera prim to a UsdStage whose scene unit is not +centimeters, the fallback values for filmback properties will be +incorrect (or at the least, unexpected) in an absolute sense; however, +proper imaging through a”default camera”with focusing disabled depends +only on ratios of the other properties, so the camera is still usable. +However, it follows that if even one property is authored in the +correct scene units, then they all must be. +Linear Algebra in UsdGeom For any described attribute Fallback +Value or Allowed Values below that are text/tokens, the actual +token is published and defined in UsdGeomTokens. So to set an +attribute to the value”rightHanded”, use UsdGeomTokens->rightHanded as +the value. +Methods: + +CreateClippingPlanesAttr(defaultValue, ...) +See GetClippingPlanesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateClippingRangeAttr(defaultValue, ...) +See GetClippingRangeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExposureAttr(defaultValue, writeSparsely) +See GetExposureAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFStopAttr(defaultValue, writeSparsely) +See GetFStopAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFocalLengthAttr(defaultValue, ...) +See GetFocalLengthAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFocusDistanceAttr(defaultValue, ...) +See GetFocusDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateHorizontalApertureAttr(defaultValue, ...) +See GetHorizontalApertureAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateHorizontalApertureOffsetAttr(...) +See GetHorizontalApertureOffsetAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProjectionAttr(defaultValue, writeSparsely) +See GetProjectionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShutterCloseAttr(defaultValue, ...) +See GetShutterCloseAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShutterOpenAttr(defaultValue, ...) +See GetShutterOpenAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateStereoRoleAttr(defaultValue, writeSparsely) +See GetStereoRoleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVerticalApertureAttr(defaultValue, ...) +See GetVerticalApertureAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVerticalApertureOffsetAttr(...) +See GetVerticalApertureOffsetAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Camera + +Get +classmethod Get(stage, path) -> Camera + +GetCamera(time) +Creates a GfCamera object from the attribute values at time . + +GetClippingPlanesAttr() +Additional, arbitrarily oriented clipping planes. + +GetClippingRangeAttr() +Near and far clipping distances in scene units; see Units of Measure for Camera Properties. + +GetExposureAttr() +Exposure adjustment, as a log base-2 value. + +GetFStopAttr() +Lens aperture. + +GetFocalLengthAttr() +Perspective focal length in tenths of a scene unit; see Units of Measure for Camera Properties. + +GetFocusDistanceAttr() +Distance from the camera to the focus plane in scene units; see Units of Measure for Camera Properties. + +GetHorizontalApertureAttr() +Horizontal aperture in tenths of a scene unit; see Units of Measure for Camera Properties. + +GetHorizontalApertureOffsetAttr() +Horizontal aperture offset in the same units as horizontalAperture. + +GetProjectionAttr() +Declaration + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetShutterCloseAttr() +Frame relative shutter close time, analogous comments from shutter:open apply. + +GetShutterOpenAttr() +Frame relative shutter open time in UsdTimeCode units (negative value indicates that the shutter opens before the current frame time). + +GetStereoRoleAttr() +If different from mono, the camera is intended to be the left or right camera of a stereo setup. + +GetVerticalApertureAttr() +Vertical aperture in tenths of a scene unit; see Units of Measure for Camera Properties. + +GetVerticalApertureOffsetAttr() +Vertical aperture offset in the same units as verticalAperture. + +SetFromCamera(camera, time) +Write attribute values from camera for time . + +CreateClippingPlanesAttr(defaultValue, writeSparsely) → Attribute +See GetClippingPlanesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateClippingRangeAttr(defaultValue, writeSparsely) → Attribute +See GetClippingRangeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExposureAttr(defaultValue, writeSparsely) → Attribute +See GetExposureAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFStopAttr(defaultValue, writeSparsely) → Attribute +See GetFStopAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFocalLengthAttr(defaultValue, writeSparsely) → Attribute +See GetFocalLengthAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFocusDistanceAttr(defaultValue, writeSparsely) → Attribute +See GetFocusDistanceAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateHorizontalApertureAttr(defaultValue, writeSparsely) → Attribute +See GetHorizontalApertureAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateHorizontalApertureOffsetAttr(defaultValue, writeSparsely) → Attribute +See GetHorizontalApertureOffsetAttr() , and also Create vs Get +Property Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateProjectionAttr(defaultValue, writeSparsely) → Attribute +See GetProjectionAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShutterCloseAttr(defaultValue, writeSparsely) → Attribute +See GetShutterCloseAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShutterOpenAttr(defaultValue, writeSparsely) → Attribute +See GetShutterOpenAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateStereoRoleAttr(defaultValue, writeSparsely) → Attribute +See GetStereoRoleAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVerticalApertureAttr(defaultValue, writeSparsely) → Attribute +See GetVerticalApertureAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVerticalApertureOffsetAttr(defaultValue, writeSparsely) → Attribute +See GetVerticalApertureOffsetAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Camera +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Camera +Return a UsdGeomCamera holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomCamera(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCamera(time) → Camera +Creates a GfCamera object from the attribute values at time . + +Parameters +time (TimeCode) – + +GetClippingPlanesAttr() → Attribute +Additional, arbitrarily oriented clipping planes. +A vector (a,b,c,d) encodes a clipping plane that cuts off (x,y,z) with +a * x + b * y + c * z + d * 1<0 where (x,y,z) are the +coordinates in the camera’s space. +Declaration +float4[] clippingPlanes = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float4Array + +GetClippingRangeAttr() → Attribute +Near and far clipping distances in scene units; see Units of Measure +for Camera Properties. +Declaration +float2 clippingRange = (1, 1000000) +C++ Type +GfVec2f +Usd Type +SdfValueTypeNames->Float2 + +GetExposureAttr() → Attribute +Exposure adjustment, as a log base-2 value. +The default of 0.0 has no effect. A value of 1.0 will double the +image-plane intensities in a rendered image; a value of -1.0 will +halve them. +Declaration +float exposure = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetFStopAttr() → Attribute +Lens aperture. +Defaults to 0.0, which turns off focusing. +Declaration +float fStop = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetFocalLengthAttr() → Attribute +Perspective focal length in tenths of a scene unit; see Units of +Measure for Camera Properties. +Declaration +float focalLength = 50 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetFocusDistanceAttr() → Attribute +Distance from the camera to the focus plane in scene units; see Units +of Measure for Camera Properties. +Declaration +float focusDistance = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetHorizontalApertureAttr() → Attribute +Horizontal aperture in tenths of a scene unit; see Units of Measure +for Camera Properties. +Default is the equivalent of the standard 35mm spherical projector +aperture. +Declaration +float horizontalAperture = 20.955 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetHorizontalApertureOffsetAttr() → Attribute +Horizontal aperture offset in the same units as horizontalAperture. +Defaults to 0. +Declaration +float horizontalApertureOffset = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetProjectionAttr() → Attribute +Declaration +token projection ="perspective" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +perspective, orthographic + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetShutterCloseAttr() → Attribute +Frame relative shutter close time, analogous comments from +shutter:open apply. +A value greater or equal to shutter:open should be authored, otherwise +there is no exposure and a renderer should produce a black image. +Declaration +double shutter:close = 0 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +GetShutterOpenAttr() → Attribute +Frame relative shutter open time in UsdTimeCode units (negative value +indicates that the shutter opens before the current frame time). +Used for motion blur. +Declaration +double shutter:open = 0 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +GetStereoRoleAttr() → Attribute +If different from mono, the camera is intended to be the left or right +camera of a stereo setup. +Declaration +uniform token stereoRole ="mono" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +mono, left, right + +GetVerticalApertureAttr() → Attribute +Vertical aperture in tenths of a scene unit; see Units of Measure for +Camera Properties. +Default is the equivalent of the standard 35mm spherical projector +aperture. +Declaration +float verticalAperture = 15.2908 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetVerticalApertureOffsetAttr() → Attribute +Vertical aperture offset in the same units as verticalAperture. +Defaults to 0. +Declaration +float verticalApertureOffset = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +SetFromCamera(camera, time) → None +Write attribute values from camera for time . +These attributes will be updated: + +projection +horizontalAperture +horizontalApertureOffset +verticalAperture +verticalApertureOffset +focalLength +clippingRange +clippingPlanes +fStop +focalDistance +xformOpOrder and xformOp:transform + +This will clear any existing xformOpOrder and replace it with a single +xformOp:transform entry. The xformOp:transform property is created or +updated here to match the transform on camera . This operation +will fail if there are stronger xform op opinions in the composed +layer stack that are stronger than that of the current edit target. + +Parameters + +camera (Camera) – +time (TimeCode) – + +class pxr.UsdGeom.Capsule +Defines a primitive capsule, i.e. a cylinder capped by two half +spheres, centered at the origin, whose spine is along the specified +axis. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateHeightAttr(defaultValue, writeSparsely) +See GetHeightAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Capsule + +Get +classmethod Get(stage, path) -> Capsule + +GetAxisAttr() +The axis along which the spine of the capsule is aligned. + +GetExtentAttr() +Extent is re-defined on Capsule only to provide a fallback value. + +GetHeightAttr() +The size of the capsule's spine along the specified axis excluding the size of the two half spheres, i.e. + +GetRadiusAttr() +The radius of the capsule. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateHeightAttr(defaultValue, writeSparsely) → Attribute +See GetHeightAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Capsule +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Capsule +Return a UsdGeomCapsule holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomCapsule(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +The axis along which the spine of the capsule is aligned. +Declaration +uniform token axis ="Z" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetExtentAttr() → Attribute +Extent is re-defined on Capsule only to provide a fallback value. +UsdGeomGprim::GetExtentAttr() . +Declaration +float3[] extent = [(-0.5, -0.5, -1), (0.5, 0.5, 1)] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +GetHeightAttr() → Attribute +The size of the capsule’s spine along the specified axis excluding +the size of the two half spheres, i.e. +the size of the cylinder portion of the capsule. If you author +height you must also author extent. +GetExtentAttr() +Declaration +double height = 1 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +GetRadiusAttr() → Attribute +The radius of the capsule. +If you author radius you must also author extent. +GetExtentAttr() +Declaration +double radius = 0.5 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.Cone +Defines a primitive cone, centered at the origin, whose spine is along +the specified axis, with the apex of the cone pointing in the +direction of the positive axis. +The fallback values for Cube, Sphere, Cone, and Cylinder are set so +that they all pack into the same volume/bounds. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateHeightAttr(defaultValue, writeSparsely) +See GetHeightAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Cone + +Get +classmethod Get(stage, path) -> Cone + +GetAxisAttr() +The axis along which the spine of the cone is aligned. + +GetExtentAttr() +Extent is re-defined on Cone only to provide a fallback value. + +GetHeightAttr() +The size of the cone's spine along the specified axis. + +GetRadiusAttr() +The radius of the cone. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateHeightAttr(defaultValue, writeSparsely) → Attribute +See GetHeightAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Cone +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Cone +Return a UsdGeomCone holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomCone(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +The axis along which the spine of the cone is aligned. +Declaration +uniform token axis ="Z" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetExtentAttr() → Attribute +Extent is re-defined on Cone only to provide a fallback value. +UsdGeomGprim::GetExtentAttr() . +Declaration +float3[] extent = [(-1, -1, -1), (1, 1, 1)] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +GetHeightAttr() → Attribute +The size of the cone’s spine along the specified axis. +If you author height you must also author extent. +GetExtentAttr() +Declaration +double height = 2 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +GetRadiusAttr() → Attribute +The radius of the cone. +If you author radius you must also author extent. +GetExtentAttr() +Declaration +double radius = 1 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.ConstraintTarget +Schema wrapper for UsdAttribute for authoring and introspecting +attributes that are constraint targets. +Constraint targets correspond roughly to what some DCC’s call +locators. They are coordinate frames, represented as (animated or +static) GfMatrix4d values. We represent them as attributes in USD +rather than transformable prims because generally we require no other +coordinated information about a constraint target other than its name +and its matrix value, and because attributes are more concise than +prims. +Because consumer clients often care only about the identity and value +of constraint targets and may be able to usefully consume them without +caring about the actual geometry with which they may logically +correspond, UsdGeom aggregates all constraint targets onto a model’s +root prim, assuming that an exporter will use property namespacing +within the constraint target attribute’s name to indicate a path to a +prim within the model with which the constraint target may correspond. +To facilitate instancing, and also position-tweaking of baked assets, +we stipulate that constraint target values always be recorded in +model-relative transformation space. In other words, to get the +world-space value of a constraint target, transform it by the local- +to-world transformation of the prim on which it is recorded. +ComputeInWorldSpace() will perform this calculation. +Methods: + +ComputeInWorldSpace(time, xfCache) +Computes the value of the constraint target in world space. + +Get(value, time) +Get the attribute value of the ConstraintTarget at time . + +GetAttr() +Explicit UsdAttribute extractor. + +GetConstraintAttrName +classmethod GetConstraintAttrName(constraintName) -> str + +GetIdentifier() +Get the stored identifier unique to the enclosing model's namespace for this constraint target. + +IsDefined() +Return true if the wrapped UsdAttribute::IsDefined() , and in addition the attribute is identified as a ConstraintTarget. + +IsValid +classmethod IsValid(attr) -> bool + +Set(value, time) +Set the attribute value of the ConstraintTarget at time . + +SetIdentifier(identifier) +Explicitly sets the stored identifier to the given string. + +ComputeInWorldSpace(time, xfCache) → Matrix4d +Computes the value of the constraint target in world space. +If a valid UsdGeomXformCache is provided in the argument xfCache , +it is used to evaluate the CTM of the model to which the constraint +target belongs. +To get the constraint value in model-space (or local space), simply +use UsdGeomConstraintTarget::Get() , since the authored values must +already be in model-space. + +Parameters + +time (TimeCode) – +xfCache (XformCache) – + +Get(value, time) → bool +Get the attribute value of the ConstraintTarget at time . + +Parameters + +value (Matrix4d) – +time (TimeCode) – + +GetAttr() → Attribute +Explicit UsdAttribute extractor. + +static GetConstraintAttrName() +classmethod GetConstraintAttrName(constraintName) -> str +Returns the fully namespaced constraint attribute name, given the +constraint name. + +Parameters +constraintName (str) – + +GetIdentifier() → str +Get the stored identifier unique to the enclosing model’s namespace +for this constraint target. +SetIdentifier() + +IsDefined() → bool +Return true if the wrapped UsdAttribute::IsDefined() , and in addition +the attribute is identified as a ConstraintTarget. + +IsValid() +classmethod IsValid(attr) -> bool +Test whether a given UsdAttribute represents valid ConstraintTarget, +which implies that creating a UsdGeomConstraintTarget from the +attribute will succeed. +Success implies that attr.IsDefined() is true. + +Parameters +attr (Attribute) – + +Set(value, time) → bool +Set the attribute value of the ConstraintTarget at time . + +Parameters + +value (Matrix4d) – +time (TimeCode) – + +SetIdentifier(identifier) → None +Explicitly sets the stored identifier to the given string. +Clients are responsible for ensuring the uniqueness of this identifier +within the enclosing model’s namespace. + +Parameters +identifier (str) – + +class pxr.UsdGeom.Cube +Defines a primitive rectilinear cube centered at the origin. +The fallback values for Cube, Sphere, Cone, and Cylinder are set so +that they all pack into the same volume/bounds. +Methods: + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSizeAttr(defaultValue, writeSparsely) +See GetSizeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Cube + +Get +classmethod Get(stage, path) -> Cube + +GetExtentAttr() +Extent is re-defined on Cube only to provide a fallback value. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSizeAttr() +Indicates the length of each edge of the cube. + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSizeAttr(defaultValue, writeSparsely) → Attribute +See GetSizeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Cube +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Cube +Return a UsdGeomCube holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomCube(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetExtentAttr() → Attribute +Extent is re-defined on Cube only to provide a fallback value. +UsdGeomGprim::GetExtentAttr() . +Declaration +float3[] extent = [(-1, -1, -1), (1, 1, 1)] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSizeAttr() → Attribute +Indicates the length of each edge of the cube. +If you author size you must also author extent. +GetExtentAttr() +Declaration +double size = 2 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +class pxr.UsdGeom.Curves +Base class for UsdGeomBasisCurves, UsdGeomNurbsCurves, and +UsdGeomHermiteCurves. The BasisCurves schema is designed to be +analagous to offline renderers’notion of batched curves (such as the +classical RIB definition via Basis and Curves statements), while the +NurbsCurve schema is designed to be analgous to the NURBS curves found +in packages like Maya and Houdini while retaining their consistency +with the RenderMan specification for NURBS Patches. HermiteCurves are +useful for the interchange of animation guides and paths. +It is safe to use the length of the curve vertex count to derive the +number of curves and the number and layout of curve vertices, but this +schema should NOT be used to derive the number of curve points. While +vertex indices are implicit in all shipped descendent types of this +schema, one should not assume that all internal or future shipped +schemas will follow this pattern. Be sure to key any indexing behavior +off the concrete type, not this abstract type. +Methods: + +ComputeExtent +classmethod ComputeExtent(points, widths, extent) -> bool + +CreateCurveVertexCountsAttr(defaultValue, ...) +See GetCurveVertexCountsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateWidthsAttr(defaultValue, writeSparsely) +See GetWidthsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> Curves + +GetCurveCount(timeCode) +Returns the number of curves as defined by the size of the curveVertexCounts array at timeCode. + +GetCurveVertexCountsAttr() +Curves-derived primitives can represent multiple distinct, potentially disconnected curves. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetWidthsAttr() +Provides width specification for the curves, whose application will depend on whether the curve is oriented (normals are defined for it), in which case widths are"ribbon width", or unoriented, in which case widths are cylinder width. + +GetWidthsInterpolation() +Get the interpolation for the widths attribute. + +SetWidthsInterpolation(interpolation) +Set the interpolation for the widths attribute. + +static ComputeExtent() +classmethod ComputeExtent(points, widths, extent) -> bool +Compute the extent for the curves defined by points and widths. +true upon success, false if unable to calculate extent. On success, +extent will contain an approximate axis-aligned bounding box of the +curve defined by points with the given widths. +This function is to provide easy authoring of extent for usd authoring +tools, hence it is static and acts outside a specific prim (as in +attribute based methods). + +Parameters + +points (Vec3fArray) – +widths (FloatArray) – +extent (Vec3fArray) – + +ComputeExtent(points, widths, transform, extent) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied. + +Parameters + +points (Vec3fArray) – +widths (FloatArray) – +transform (Matrix4d) – +extent (Vec3fArray) – + +CreateCurveVertexCountsAttr(defaultValue, writeSparsely) → Attribute +See GetCurveVertexCountsAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateWidthsAttr(defaultValue, writeSparsely) → Attribute +See GetWidthsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> Curves +Return a UsdGeomCurves holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomCurves(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCurveCount(timeCode) → int +Returns the number of curves as defined by the size of the +curveVertexCounts array at timeCode. +For most code, this check will be performant. When using file formats +where the cost of attribute reading is high and the time sampled array +will be read into memory later, it may be better to explicitly read +the value once and check the size of the array directly. +GetCurveVertexCountsAttr() + +Parameters +timeCode (TimeCode) – + +GetCurveVertexCountsAttr() → Attribute +Curves-derived primitives can represent multiple distinct, potentially +disconnected curves. +The length of’curveVertexCounts’gives the number of such curves, and +each element describes the number of vertices in the corresponding +curve +Declaration +int[] curveVertexCounts +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetWidthsAttr() → Attribute +Provides width specification for the curves, whose application will +depend on whether the curve is oriented (normals are defined for it), +in which case widths are”ribbon width”, or unoriented, in which case +widths are cylinder width. +‘widths’is not a generic Primvar, but the number of elements in this +attribute will be determined by its’interpolation’. See +SetWidthsInterpolation() . If’widths’and’primvars:widths’are both +specified, the latter has precedence. +Declaration +float[] widths +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetWidthsInterpolation() → str +Get the interpolation for the widths attribute. +Although’widths’is not classified as a generic UsdGeomPrimvar (and +will not be included in the results of +UsdGeomPrimvarsAPI::GetPrimvars() ) it does require an interpolation +specification. The fallback interpolation, if left unspecified, is +UsdGeomTokens->vertex, which means a width value is specified at the +end of each curve segment. + +SetWidthsInterpolation(interpolation) → bool +Set the interpolation for the widths attribute. +true upon success, false if interpolation is not a legal value as +defined by UsdPrimvar::IsValidInterpolation(), or if there was a +problem setting the value. No attempt is made to validate that the +widths attr’s value contains the right number of elements to match its +interpolation to its prim’s topology. +GetWidthsInterpolation() + +Parameters +interpolation (str) – + +class pxr.UsdGeom.Cylinder +Defines a primitive cylinder with closed ends, centered at the origin, +whose spine is along the specified axis. +The fallback values for Cube, Sphere, Cone, and Cylinder are set so +that they all pack into the same volume/bounds. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateHeightAttr(defaultValue, writeSparsely) +See GetHeightAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Cylinder + +Get +classmethod Get(stage, path) -> Cylinder + +GetAxisAttr() +The axis along which the spine of the cylinder is aligned. + +GetExtentAttr() +Extent is re-defined on Cylinder only to provide a fallback value. + +GetHeightAttr() +The size of the cylinder's spine along the specified axis. + +GetRadiusAttr() +The radius of the cylinder. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateHeightAttr(defaultValue, writeSparsely) → Attribute +See GetHeightAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Cylinder +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Cylinder +Return a UsdGeomCylinder holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomCylinder(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +The axis along which the spine of the cylinder is aligned. +Declaration +uniform token axis ="Z" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetExtentAttr() → Attribute +Extent is re-defined on Cylinder only to provide a fallback value. +UsdGeomGprim::GetExtentAttr() . +Declaration +float3[] extent = [(-1, -1, -1), (1, 1, 1)] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +GetHeightAttr() → Attribute +The size of the cylinder’s spine along the specified axis. +If you author height you must also author extent. +GetExtentAttr() +Declaration +double height = 2 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +GetRadiusAttr() → Attribute +The radius of the cylinder. +If you author radius you must also author extent. +GetExtentAttr() +Declaration +double radius = 1 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.Gprim +Base class for all geometric primitives. +Gprim encodes basic graphical properties such as doubleSided and +orientation, and provides primvars for”display +color”and”displayopacity”that travel with geometry to be used as +shader overrides. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateDisplayColorAttr(defaultValue, ...) +See GetDisplayColorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDisplayColorPrimvar(interpolation, ...) +Convenience function to create the displayColor primvar, optionally specifying interpolation and elementSize. + +CreateDisplayOpacityAttr(defaultValue, ...) +See GetDisplayOpacityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDisplayOpacityPrimvar(interpolation, ...) +Convenience function to create the displayOpacity primvar, optionally specifying interpolation and elementSize. + +CreateDoubleSidedAttr(defaultValue, ...) +See GetDoubleSidedAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateOrientationAttr(defaultValue, ...) +See GetOrientationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> Gprim + +GetDisplayColorAttr() +It is useful to have an"official"colorSet that can be used as a display or modeling color, even in the absence of any specified shader for a gprim. + +GetDisplayColorPrimvar() +Convenience function to get the displayColor Attribute as a Primvar. + +GetDisplayOpacityAttr() +Companion to displayColor that specifies opacity, broken out as an independent attribute rather than an rgba color, both so that each can be independently overridden, and because shaders rarely consume rgba parameters. + +GetDisplayOpacityPrimvar() +Convenience function to get the displayOpacity Attribute as a Primvar. + +GetDoubleSidedAttr() +Although some renderers treat all parametric or polygonal surfaces as if they were effectively laminae with outward-facing normals on both sides, some renderers derive significant optimizations by considering these surfaces to have only a single outward side, typically determined by control-point winding order and/or orientation. + +GetOrientationAttr() +Orientation specifies whether the gprim's surface normal should be computed using the right hand rule, or the left hand rule. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateDisplayColorAttr(defaultValue, writeSparsely) → Attribute +See GetDisplayColorAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDisplayColorPrimvar(interpolation, elementSize) → Primvar +Convenience function to create the displayColor primvar, optionally +specifying interpolation and elementSize. +CreateDisplayColorAttr() , GetDisplayColorPrimvar() + +Parameters + +interpolation (str) – +elementSize (int) – + +CreateDisplayOpacityAttr(defaultValue, writeSparsely) → Attribute +See GetDisplayOpacityAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDisplayOpacityPrimvar(interpolation, elementSize) → Primvar +Convenience function to create the displayOpacity primvar, optionally +specifying interpolation and elementSize. +CreateDisplayOpacityAttr() , GetDisplayOpacityPrimvar() + +Parameters + +interpolation (str) – +elementSize (int) – + +CreateDoubleSidedAttr(defaultValue, writeSparsely) → Attribute +See GetDoubleSidedAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateOrientationAttr(defaultValue, writeSparsely) → Attribute +See GetOrientationAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> Gprim +Return a UsdGeomGprim holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomGprim(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDisplayColorAttr() → Attribute +It is useful to have an”official”colorSet that can be used as a +display or modeling color, even in the absence of any specified shader +for a gprim. +DisplayColor serves this role; because it is a UsdGeomPrimvar, it can +also be used as a gprim override for any shader that consumes a +displayColor parameter. +Declaration +color3f[] primvars:displayColor +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Color3fArray + +GetDisplayColorPrimvar() → Primvar +Convenience function to get the displayColor Attribute as a Primvar. +GetDisplayColorAttr() , CreateDisplayColorPrimvar() + +GetDisplayOpacityAttr() → Attribute +Companion to displayColor that specifies opacity, broken out as an +independent attribute rather than an rgba color, both so that each can +be independently overridden, and because shaders rarely consume rgba +parameters. +Declaration +float[] primvars:displayOpacity +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetDisplayOpacityPrimvar() → Primvar +Convenience function to get the displayOpacity Attribute as a Primvar. +GetDisplayOpacityAttr() , CreateDisplayOpacityPrimvar() + +GetDoubleSidedAttr() → Attribute +Although some renderers treat all parametric or polygonal surfaces as +if they were effectively laminae with outward-facing normals on both +sides, some renderers derive significant optimizations by considering +these surfaces to have only a single outward side, typically +determined by control-point winding order and/or orientation. +By doing so they can perform”backface culling”to avoid drawing the +many polygons of most closed surfaces that face away from the viewer. +However, it is often advantageous to model thin objects such as paper +and cloth as single, open surfaces that must be viewable from both +sides, always. Setting a gprim’s doubleSided attribute to true +instructs all renderers to disable optimizations such as backface +culling for the gprim, and attempt (not all renderers are able to do +so, but the USD reference GL renderer always will) to provide forward- +facing normals on each side of the surface for lighting calculations. +Declaration +uniform bool doubleSided = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetOrientationAttr() → Attribute +Orientation specifies whether the gprim’s surface normal should be +computed using the right hand rule, or the left hand rule. +Please see Coordinate System, Winding Order, Orientation, and Surface +Normals for a deeper explanation and generalization of orientation to +composed scenes with transformation hierarchies. +Declaration +uniform token orientation ="rightHanded" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +rightHanded, leftHanded + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.HermiteCurves +This schema specifies a cubic hermite interpolated curve batch as +sometimes used for defining guides for animation. While hermite curves +can be useful because they interpolate through their control points, +they are not well supported by high-end renderers for imaging. +Therefore, while we include this schema for interchange, we strongly +recommend the use of UsdGeomBasisCurves as the representation of +curves intended to be rendered (ie. hair or grass). Hermite curves can +be converted to a Bezier representation (though not from Bezier back +to Hermite in general). + +## Point Interpolation + +The initial cubic curve segment is defined by the first two points and +first two tangents. Additional segments are defined by additional +point / tangent pairs. The number of segments for each non-batched +hermite curve would be len(curve.points) - 1. The total number of +segments for the batched UsdGeomHermiteCurves representation is +len(points) - len(curveVertexCounts). + +## Primvar, Width, and Normal Interpolation + +Primvar interpolation is not well specified for this type as it is not +intended as a rendering representation. We suggest that per point +primvars would be linearly interpolated across each segment and should +be tagged as’varying’. +It is not immediately clear how to specify cubic +or’vertex’interpolation for this type, as we lack a specification for +primvar tangents. This also means that width and normal interpolation +should be restricted to varying (linear), uniform (per curve element), +or constant (per prim). +Classes: + +PointAndTangentArrays + +Methods: + +CreateTangentsAttr(defaultValue, writeSparsely) +See GetTangentsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> HermiteCurves + +Get +classmethod Get(stage, path) -> HermiteCurves + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTangentsAttr() +Defines the outgoing trajectory tangent for each point. + +class PointAndTangentArrays +Methods: + +GetPoints + +GetTangents + +Interleave + +IsEmpty + +Separate + +GetPoints() + +GetTangents() + +Interleave() + +IsEmpty() + +static Separate() + +CreateTangentsAttr(defaultValue, writeSparsely) → Attribute +See GetTangentsAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> HermiteCurves +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> HermiteCurves +Return a UsdGeomHermiteCurves holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomHermiteCurves(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTangentsAttr() → Attribute +Defines the outgoing trajectory tangent for each point. +Tangents should be the same size as the points attribute. +Declaration +vector3f[] tangents = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray + +class pxr.UsdGeom.Imageable +Base class for all prims that may require rendering or visualization +of some sort. The primary attributes of Imageable are visibility and +purpose, which each provide instructions for what geometry should be +included for processing by rendering and other computations. +Deprecated +Imageable also provides API for accessing primvars, which has been +moved to the UsdGeomPrimvarsAPI schema, because primvars can now be +applied on non-Imageable prim types. This API is planned to be +removed, UsdGeomPrimvarsAPI should be used directly instead. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Classes: + +PurposeInfo + +Methods: + +ComputeEffectiveVisibility(purpose, time) +Calculate the effective purpose visibility of this prim for the given purpose , taking into account opinions for the corresponding purpose attribute, along with overall visibility opinions. + +ComputeLocalBound(time, purpose1, purpose2, ...) +Compute the bound of this prim in local space, at the specified time , and for the specified purposes. + +ComputeLocalToWorldTransform(time) +Compute the transformation matrix for this prim at the given time, including the transform authored on the Prim itself, if present. + +ComputeParentToWorldTransform(time) +Compute the transformation matrix for this prim at the given time, NOT including the transform authored on the prim itself. + +ComputeProxyPrim +Returns None if neither this prim nor any of its ancestors has a valid renderProxy prim. + +ComputePurpose() +Calculate the effective purpose information about this prim. + +ComputePurposeInfo() +Calculate the effective purpose information about this prim which includes final computed purpose value of the prim as well as whether the purpose value should be inherited by namespace children without their own purpose opinions. + +ComputeUntransformedBound(time, purpose1, ...) +Compute the untransformed bound of this prim, at the specified time , and for the specified purposes. + +ComputeVisibility(time) +Calculate the effective visibility of this prim, as defined by its most ancestral authored"invisible"opinion, if any. + +ComputeWorldBound(time, purpose1, purpose2, ...) +Compute the bound of this prim in world space, at the specified time , and for the specified purposes. + +CreateProxyPrimRel() +See GetProxyPrimRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePurposeAttr(defaultValue, writeSparsely) +See GetPurposeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVisibilityAttr(defaultValue, writeSparsely) +See GetVisibilityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> Imageable + +GetOrderedPurposeTokens +classmethod GetOrderedPurposeTokens() -> list[TfToken] + +GetProxyPrimRel() +The proxyPrim relationship allows us to link a prim whose purpose is"render"to its (single target) purpose="proxy"prim. + +GetPurposeAttr() +Purpose is a classification of geometry into categories that can each be independently included or excluded from traversals of prims on a stage, such as rendering or bounding-box computation traversals. + +GetPurposeVisibilityAttr(purpose) +Return the attribute that is used for expressing visibility opinions for the given purpose . + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetVisibilityAttr() +Visibility is meant to be the simplest form of"pruning"visibility that is supported by most DCC apps. + +MakeInvisible(time) +Makes the imageable invisible if it is visible at the given time. + +MakeVisible(time) +Make the imageable visible if it is invisible at the given time. + +SetProxyPrim(proxy) +Convenience function for authoring the renderProxy rel on this prim to target the given proxy prim. + +class PurposeInfo +Methods: + +GetInheritablePurpose + +Attributes: + +isInheritable + +purpose + +GetInheritablePurpose() + +property isInheritable + +property purpose + +ComputeEffectiveVisibility(purpose, time) → str +Calculate the effective purpose visibility of this prim for the given +purpose , taking into account opinions for the corresponding +purpose attribute, along with overall visibility opinions. +If ComputeVisibility() returns”invisible”, then +ComputeEffectiveVisibility() is”invisible”for all purpose values. +Otherwise, ComputeEffectiveVisibility() returns the value of the +nearest ancestral authored opinion for the corresponding purpose +visibility attribute, as retured by GetPurposeVisibilityAttr(purpose). +Note that the value returned here can be”invisible”(indicating the +prim is invisible for the given purpose),”visible”(indicating that +it’s visible), or”inherited”(indicating that the purpose visibility is +context-dependent and the fallback behavior must be determined by the +caller. +This function should be considered a reference implementation for +correctness. If called on each prim in the context of a traversal we +will perform massive overcomputation, because sibling prims share sub- +problems in the query that can be efficiently cached, but are not +(cannot be) by this simple implementation. If you have control of +your traversal, it will be far more efficient to manage visibility on +a stack as you traverse. +UsdGeomVisibilityAPI +GetPurposeVisibilityAttr() +ComputeVisibility() + +Parameters + +purpose (str) – +time (TimeCode) – + +ComputeLocalBound(time, purpose1, purpose2, purpose3, purpose4) → BBox3d +Compute the bound of this prim in local space, at the specified +time , and for the specified purposes. +The bound of the prim is computed, including the transform (if any) +authored on the node itself. +It is an error to not specify any purposes, which will result in the +return of an empty box. +If you need to compute bounds for multiple prims on a stage, it will +be much, much more efficient to instantiate a UsdGeomBBoxCache and +query it directly; doing so will reuse sub-computations shared by the +prims. + +Parameters + +time (TimeCode) – +purpose1 (str) – +purpose2 (str) – +purpose3 (str) – +purpose4 (str) – + +ComputeLocalToWorldTransform(time) → Matrix4d +Compute the transformation matrix for this prim at the given time, +including the transform authored on the Prim itself, if present. +If you need to compute the transform for multiple prims on a stage, +it will be much, much more efficient to instantiate a +UsdGeomXformCache and query it directly; doing so will reuse sub- +computations shared by the prims. + +Parameters +time (TimeCode) – + +ComputeParentToWorldTransform(time) → Matrix4d +Compute the transformation matrix for this prim at the given time, +NOT including the transform authored on the prim itself. +If you need to compute the transform for multiple prims on a stage, +it will be much, much more efficient to instantiate a +UsdGeomXformCache and query it directly; doing so will reuse sub- +computations shared by the prims. + +Parameters +time (TimeCode) – + +ComputeProxyPrim() +Returns None if neither this prim nor any of its ancestors has a valid renderProxy prim. Otherwise, returns a tuple of (proxyPrim, renderPrimWithAuthoredProxyPrimRel) + +ComputePurpose() → str +Calculate the effective purpose information about this prim. +This is equivalent to extracting the purpose from the value returned +by ComputePurposeInfo() . +This function should be considered a reference implementation for +correctness. If called on each prim in the context of a traversal we +will perform massive overcomputation, because sibling prims share sub- +problems in the query that can be efficiently cached, but are not +(cannot be) by this simple implementation. If you have control of +your traversal, it will be far more efficient to manage purpose, along +with visibility, on a stack as you traverse. +GetPurposeAttr() , Imageable Purpose + +ComputePurposeInfo() → PurposeInfo +Calculate the effective purpose information about this prim which +includes final computed purpose value of the prim as well as whether +the purpose value should be inherited by namespace children without +their own purpose opinions. +This function should be considered a reference implementation for +correctness. If called on each prim in the context of a traversal we +will perform massive overcomputation, because sibling prims share sub- +problems in the query that can be efficiently cached, but are not +(cannot be) by this simple implementation. If you have control of +your traversal, it will be far more efficient to manage purpose, along +with visibility, on a stack as you traverse. +GetPurposeAttr() , Imageable Purpose + +ComputePurposeInfo(parentPurposeInfo) -> PurposeInfo +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Calculates the effective purpose information about this prim, given +the computed purpose information of its parent prim. +This can be much more efficient than using CommputePurposeInfo() when +PurposeInfo values are properly computed and cached for a hierarchy of +prims using this function. +GetPurposeAttr() , Imageable Purpose + +Parameters +parentPurposeInfo (PurposeInfo) – + +ComputeUntransformedBound(time, purpose1, purpose2, purpose3, purpose4) → BBox3d +Compute the untransformed bound of this prim, at the specified +time , and for the specified purposes. +The bound of the prim is computed in its object space, ignoring any +transforms authored on or above the prim. +It is an error to not specify any purposes, which will result in the +return of an empty box. +If you need to compute bounds for multiple prims on a stage, it will +be much, much more efficient to instantiate a UsdGeomBBoxCache and +query it directly; doing so will reuse sub-computations shared by the +prims. + +Parameters + +time (TimeCode) – +purpose1 (str) – +purpose2 (str) – +purpose3 (str) – +purpose4 (str) – + +ComputeVisibility(time) → str +Calculate the effective visibility of this prim, as defined by its +most ancestral authored”invisible”opinion, if any. +A prim is considered visible at the current time if none of its +Imageable ancestors express an authored”invisible”opinion, which is +what leads to the”simple pruning”behavior described in +GetVisibilityAttr() . +This function should be considered a reference implementation for +correctness. If called on each prim in the context of a traversal we +will perform massive overcomputation, because sibling prims share sub- +problems in the query that can be efficiently cached, but are not +(cannot be) by this simple implementation. If you have control of +your traversal, it will be far more efficient to manage visibility on +a stack as you traverse. +GetVisibilityAttr() + +Parameters +time (TimeCode) – + +ComputeWorldBound(time, purpose1, purpose2, purpose3, purpose4) → BBox3d +Compute the bound of this prim in world space, at the specified +time , and for the specified purposes. +The bound of the prim is computed, including the transform (if any) +authored on the node itself, and then transformed to world space. +It is an error to not specify any purposes, which will result in the +return of an empty box. +If you need to compute bounds for multiple prims on a stage, it will +be much, much more efficient to instantiate a UsdGeomBBoxCache and +query it directly; doing so will reuse sub-computations shared by the +prims. + +Parameters + +time (TimeCode) – +purpose1 (str) – +purpose2 (str) – +purpose3 (str) – +purpose4 (str) – + +CreateProxyPrimRel() → Relationship +See GetProxyPrimRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreatePurposeAttr(defaultValue, writeSparsely) → Attribute +See GetPurposeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVisibilityAttr(defaultValue, writeSparsely) → Attribute +See GetVisibilityAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> Imageable +Return a UsdGeomImageable holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomImageable(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetOrderedPurposeTokens() +classmethod GetOrderedPurposeTokens() -> list[TfToken] +Returns an ordered list of allowed values of the purpose attribute. +The ordering is important because it defines the protocol between +UsdGeomModelAPI and UsdGeomBBoxCache for caching and retrieving +extents hints by purpose. +The order is: [default, render, proxy, guide] +See +UsdGeomModelAPI::GetExtentsHint() . +GetOrderedPurposeTokens() + +GetProxyPrimRel() → Relationship +The proxyPrim relationship allows us to link a prim whose purpose +is”render”to its (single target) purpose=”proxy”prim. +This is entirely optional, but can be useful in several scenarios: + +In a pipeline that does pruning (for complexity management) by +deactivating prims composed from asset references, when we deactivate +a purpose=”render”prim, we will be able to discover and additionally +deactivate its associated purpose=”proxy”prim, so that preview renders +reflect the pruning accurately. +DCC importers may be able to make more aggressive optimizations +for interactive processing and display if they can discover the proxy +for a given render prim. +With a little more work, a Hydra-based application will be able +to map a picked proxy prim back to its render geometry for selection. + +It is only valid to author the proxyPrim relationship on prims whose +purpose is”render”. + +GetPurposeAttr() → Attribute +Purpose is a classification of geometry into categories that can each +be independently included or excluded from traversals of prims on a +stage, such as rendering or bounding-box computation traversals. +See Imageable Purpose for more detail about how purpose is computed +and used. +Declaration +uniform token purpose ="default" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +default, render, proxy, guide + +GetPurposeVisibilityAttr(purpose) → Attribute +Return the attribute that is used for expressing visibility opinions +for the given purpose . +For”default”purpose, return the overall visibility attribute. +For”guide”,”proxy”, or”render”purpose, return guideVisibility, +proxyVisibility, or renderVisibility if UsdGeomVisibilityAPI is +applied to the prim. If UsdGeomvVisibiltyAPI is not applied, an empty +attribute is returned for purposes other than default. +UsdGeomVisibilityAPI::Apply +UsdGeomVisibilityAPI::GetPurposeVisibilityAttr + +Parameters +purpose (str) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetVisibilityAttr() → Attribute +Visibility is meant to be the simplest form of”pruning”visibility that +is supported by most DCC apps. +Visibility is animatable, allowing a sub-tree of geometry to be +present for some segment of a shot, and absent from others; unlike the +action of deactivating geometry prims, invisible geometry is still +available for inspection, for positioning, for defining volumes, etc. +Declaration +token visibility ="inherited" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +inherited, invisible + +MakeInvisible(time) → None +Makes the imageable invisible if it is visible at the given time. +When visibility is animated, this only works when it is invoked +sequentially at increasing time samples. If visibility is already +authored and animated in the scene, calling MakeVisible() at an +arbitrary (in-between) frame isn’t guaranteed to work. +Be sure to set the edit target to the layer containing the strongest +visibility opinion or to a stronger layer. +MakeVisible() +ComputeVisibility() + +Parameters +time (TimeCode) – + +MakeVisible(time) → None +Make the imageable visible if it is invisible at the given time. +Since visibility is pruning, this may need to override some ancestor’s +visibility and all-but-one of the ancestor’s children’s visibility, +for all the ancestors of this prim up to the highest ancestor that is +explicitly invisible, to preserve the visibility state. +If MakeVisible() (or MakeInvisible() ) is going to be applied to all +the prims on a stage, ancestors must be processed prior to descendants +to get the correct behavior. +When visibility is animated, this only works when it is invoked +sequentially at increasing time samples. If visibility is already +authored and animated in the scene, calling MakeVisible() at an +arbitrary (in-between) frame isn’t guaranteed to work. +This will only work properly if all ancestor prims of the imageable +are defined, as the imageable schema is only valid on defined +prims. +Be sure to set the edit target to the layer containing the strongest +visibility opinion or to a stronger layer. +MakeInvisible() +ComputeVisibility() + +Parameters +time (TimeCode) – + +SetProxyPrim(proxy) → bool +Convenience function for authoring the renderProxy rel on this prim +to target the given proxy prim. +To facilitate authoring on sparse or unloaded stages, we do not +perform any validation of this prim’s purpose or the type or purpose +of the specified prim. +ComputeProxyPrim() , GetProxyPrimRel() + +Parameters +proxy (Prim) – + +SetProxyPrim(proxy) -> bool + +Parameters +proxy (SchemaBase) – + +class pxr.UsdGeom.LinearUnits +Attributes: + +centimeters + +feet + +inches + +kilometers + +lightYears + +meters + +micrometers + +miles + +millimeters + +nanometers + +yards + +centimeters = 0.01 + +feet = 0.3048 + +inches = 0.0254 + +kilometers = 1000.0 + +lightYears = 9460730472580800.0 + +meters = 1.0 + +micrometers = 1e-06 + +miles = 1609.344 + +millimeters = 0.001 + +nanometers = 1e-09 + +yards = 0.9144 + +class pxr.UsdGeom.Mesh +Encodes a mesh with optional subdivision properties and features. +As a point-based primitive, meshes are defined in terms of points that +are connected into edges and faces. Many references to meshes use the +term’vertex’in place of or interchangeably with’points’, while some +use’vertex’to refer to the’face-vertices’that define a face. To avoid +confusion, the term’vertex’is intentionally avoided in favor +of’points’or’face-vertices’. +The connectivity between points, edges and faces is encoded using a +common minimal topological description of the faces of the mesh. Each +face is defined by a set of face-vertices using indices into the +Mesh’s points array (inherited from UsdGeomPointBased) and laid out +in a single linear faceVertexIndices array for efficiency. A +companion faceVertexCounts array provides, for each face, the number +of consecutive face-vertices in faceVertexIndices that define the +face. No additional connectivity information is required or +constructed, so no adjacency or neighborhood queries are available. +A key property of this mesh schema is that it encodes both subdivision +surfaces and simpler polygonal meshes. This is achieved by varying the +subdivisionScheme attribute, which is set to specify Catmull-Clark +subdivision by default, so polygonal meshes must always be explicitly +declared. The available subdivision schemes and additional subdivision +features encoded in optional attributes conform to the feature set of +OpenSubdiv ( +https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html). +A Note About Primvars +The following list clarifies the number of elements for and the +interpolation behavior of the different primvar interpolation types +for meshes: + +constant : One element for the entire mesh; no interpolation. +uniform : One element for each face of the mesh; elements are +typically not interpolated but are inherited by other faces derived +from a given face (via subdivision, tessellation, etc.). +varying : One element for each point of the mesh; +interpolation of point data is always linear. +vertex : One element for each point of the mesh; +interpolation of point data is applied according to the +subdivisionScheme attribute. +faceVarying : One element for each of the face-vertices that +define the mesh topology; interpolation of face-vertex data may be +smooth or linear, according to the subdivisionScheme and +faceVaryingLinearInterpolation attributes. + +Primvar interpolation types and related utilities are described more +generally in Interpolation of Geometric Primitive Variables. +A Note About Normals +Normals should not be authored on a subdivision mesh, since +subdivision algorithms define their own normals. They should only be +authored for polygonal meshes ( subdivisionScheme =”none”). +The normals attribute inherited from UsdGeomPointBased is not a +generic primvar, but the number of elements in this attribute will be +determined by its interpolation. See +UsdGeomPointBased::GetNormalsInterpolation() . If normals and +primvars:normals are both specified, the latter has precedence. If a +polygonal mesh specifies neither normals nor primvars:normals, +then it should be treated and rendered as faceted, with no attempt to +compute smooth normals. +The normals generated for smooth subdivision schemes, e.g. Catmull- +Clark and Loop, will likewise be smooth, but others, e.g. Bilinear, +may be discontinuous between faces and/or within non-planar irregular +faces. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateCornerIndicesAttr(defaultValue, ...) +See GetCornerIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateCornerSharpnessesAttr(defaultValue, ...) +See GetCornerSharpnessesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateCreaseIndicesAttr(defaultValue, ...) +See GetCreaseIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateCreaseLengthsAttr(defaultValue, ...) +See GetCreaseLengthsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateCreaseSharpnessesAttr(defaultValue, ...) +See GetCreaseSharpnessesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFaceVaryingLinearInterpolationAttr(...) +See GetFaceVaryingLinearInterpolationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFaceVertexCountsAttr(defaultValue, ...) +See GetFaceVertexCountsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFaceVertexIndicesAttr(defaultValue, ...) +See GetFaceVertexIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateHoleIndicesAttr(defaultValue, ...) +See GetHoleIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateInterpolateBoundaryAttr(defaultValue, ...) +See GetInterpolateBoundaryAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSubdivisionSchemeAttr(defaultValue, ...) +See GetSubdivisionSchemeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTriangleSubdivisionRuleAttr(...) +See GetTriangleSubdivisionRuleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Mesh + +Get +classmethod Get(stage, path) -> Mesh + +GetCornerIndicesAttr() +The indices of points for which a corresponding sharpness value is specified in cornerSharpnesses (so the size of this array must match that of cornerSharpnesses). + +GetCornerSharpnessesAttr() +The sharpness values associated with a corresponding set of points specified in cornerIndices (so the size of this array must match that of cornerIndices). + +GetCreaseIndicesAttr() +The indices of points grouped into sets of successive pairs that identify edges to be creased. + +GetCreaseLengthsAttr() +The length of this array specifies the number of creases (sets of adjacent sharpened edges) on the mesh. + +GetCreaseSharpnessesAttr() +The per-crease or per-edge sharpness values for all creases. + +GetFaceCount(timeCode) +Returns the number of faces as defined by the size of the faceVertexCounts array at timeCode. + +GetFaceVaryingLinearInterpolationAttr() +Specifies how elements of a primvar of interpolation type"faceVarying"are interpolated for subdivision surfaces. + +GetFaceVertexCountsAttr() +Provides the number of vertices in each face of the mesh, which is also the number of consecutive indices in faceVertexIndices that define the face. + +GetFaceVertexIndicesAttr() +Flat list of the index (into the points attribute) of each vertex of each face in the mesh. + +GetHoleIndicesAttr() +The indices of all faces that should be treated as holes, i.e. + +GetInterpolateBoundaryAttr() +Specifies how subdivision is applied for faces adjacent to boundary edges and boundary points. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSubdivisionSchemeAttr() +The subdivision scheme to be applied to the surface. + +GetTriangleSubdivisionRuleAttr() +Specifies an option to the subdivision rules for the Catmull-Clark scheme to try and improve undesirable artifacts when subdividing triangles. + +ValidateTopology +classmethod ValidateTopology(faceVertexIndices, faceVertexCounts, numPoints, reason) -> bool + +Attributes: + +SHARPNESS_INFINITE + +CreateCornerIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetCornerIndicesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateCornerSharpnessesAttr(defaultValue, writeSparsely) → Attribute +See GetCornerSharpnessesAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateCreaseIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetCreaseIndicesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateCreaseLengthsAttr(defaultValue, writeSparsely) → Attribute +See GetCreaseLengthsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateCreaseSharpnessesAttr(defaultValue, writeSparsely) → Attribute +See GetCreaseSharpnessesAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFaceVaryingLinearInterpolationAttr(defaultValue, writeSparsely) → Attribute +See GetFaceVaryingLinearInterpolationAttr() , and also Create vs Get +Property Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFaceVertexCountsAttr(defaultValue, writeSparsely) → Attribute +See GetFaceVertexCountsAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFaceVertexIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetFaceVertexIndicesAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateHoleIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetHoleIndicesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateInterpolateBoundaryAttr(defaultValue, writeSparsely) → Attribute +See GetInterpolateBoundaryAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSubdivisionSchemeAttr(defaultValue, writeSparsely) → Attribute +See GetSubdivisionSchemeAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTriangleSubdivisionRuleAttr(defaultValue, writeSparsely) → Attribute +See GetTriangleSubdivisionRuleAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Mesh +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Mesh +Return a UsdGeomMesh holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomMesh(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCornerIndicesAttr() → Attribute +The indices of points for which a corresponding sharpness value is +specified in cornerSharpnesses (so the size of this array must match +that of cornerSharpnesses). +Declaration +int[] cornerIndices = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetCornerSharpnessesAttr() → Attribute +The sharpness values associated with a corresponding set of points +specified in cornerIndices (so the size of this array must match +that of cornerIndices). +Use the constant SHARPNESS_INFINITE for a perfectly sharp corner. +Declaration +float[] cornerSharpnesses = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetCreaseIndicesAttr() → Attribute +The indices of points grouped into sets of successive pairs that +identify edges to be creased. +The size of this array must be equal to the sum of all elements of the +creaseLengths attribute. +Declaration +int[] creaseIndices = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetCreaseLengthsAttr() → Attribute +The length of this array specifies the number of creases (sets of +adjacent sharpened edges) on the mesh. +Each element gives the number of points of each crease, whose indices +are successively laid out in the creaseIndices attribute. Since each +crease must be at least one edge long, each element of this array must +be at least two. +Declaration +int[] creaseLengths = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetCreaseSharpnessesAttr() → Attribute +The per-crease or per-edge sharpness values for all creases. +Since creaseLengths encodes the number of points in each crease, the +number of elements in this array will be either len(creaseLengths) or +the sum over all X of (creaseLengths[X] - 1). Note that while the RI +spec allows each crease to have either a single sharpness or a value +per-edge, USD will encode either a single sharpness per crease on a +mesh, or sharpnesses for all edges making up the creases on a mesh. +Use the constant SHARPNESS_INFINITE for a perfectly sharp crease. +Declaration +float[] creaseSharpnesses = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetFaceCount(timeCode) → int +Returns the number of faces as defined by the size of the +faceVertexCounts array at timeCode. +For most code, this check will be performant. When using file formats +where the cost of attribute reading is high and the time sampled array +will be read into memory later, it may be better to explicitly read +the value once and check the size of the array directly. +GetFaceVertexCountsAttr() + +Parameters +timeCode (TimeCode) – + +GetFaceVaryingLinearInterpolationAttr() → Attribute +Specifies how elements of a primvar of interpolation +type”faceVarying”are interpolated for subdivision surfaces. +Interpolation can be as smooth as a”vertex”primvar or constrained to +be linear at features specified by several options. Valid values +correspond to choices available in OpenSubdiv: + +none : No linear constraints or sharpening, smooth everywhere +cornersOnly : Sharpen corners of discontinuous boundaries +only, smooth everywhere else +cornersPlus1 : The default, same as”cornersOnly”plus +additional sharpening at points where three or more distinct face- +varying values occur +cornersPlus2 : Same as”cornersPlus1”plus additional +sharpening at points with at least one discontinuous boundary corner +or only one discontinuous boundary edge (a dart) +boundaries : Piecewise linear along discontinuous boundaries, +smooth interior +all : Piecewise linear everywhere + +These are illustrated and described in more detail in the OpenSubdiv +documentation: +https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html#face- +varying-interpolation-rules +Declaration +token faceVaryingLinearInterpolation ="cornersPlus1" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +none, cornersOnly, cornersPlus1, cornersPlus2, boundaries, all + +GetFaceVertexCountsAttr() → Attribute +Provides the number of vertices in each face of the mesh, which is +also the number of consecutive indices in faceVertexIndices that +define the face. +The length of this attribute is the number of faces in the mesh. If +this attribute has more than one timeSample, the mesh is considered to +be topologically varying. +Declaration +int[] faceVertexCounts +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetFaceVertexIndicesAttr() → Attribute +Flat list of the index (into the points attribute) of each vertex of +each face in the mesh. +If this attribute has more than one timeSample, the mesh is considered +to be topologically varying. +Declaration +int[] faceVertexIndices +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetHoleIndicesAttr() → Attribute +The indices of all faces that should be treated as holes, i.e. +made invisible. This is traditionally a feature of subdivision +surfaces and not generally applied to polygonal meshes. +Declaration +int[] holeIndices = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetInterpolateBoundaryAttr() → Attribute +Specifies how subdivision is applied for faces adjacent to boundary +edges and boundary points. +Valid values correspond to choices available in OpenSubdiv: + +none : No boundary interpolation is applied and boundary +faces are effectively treated as holes +edgeOnly : A sequence of boundary edges defines a smooth +curve to which the edges of subdivided boundary faces converge +edgeAndCorner : The default, similar to”edgeOnly”but the +smooth boundary curve is made sharp at corner points + +These are illustrated and described in more detail in the OpenSubdiv +documentation: +https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html#boundary- +interpolation-rules +Declaration +token interpolateBoundary ="edgeAndCorner" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +none, edgeOnly, edgeAndCorner + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSubdivisionSchemeAttr() → Attribute +The subdivision scheme to be applied to the surface. +Valid values are: + +catmullClark : The default, Catmull-Clark subdivision; +preferred for quad-dominant meshes (generalizes B-splines); +interpolation of point data is smooth (non-linear) +loop : Loop subdivision; preferred for purely triangular +meshes; interpolation of point data is smooth (non-linear) +bilinear : Subdivision reduces all faces to quads +(topologically similar to”catmullClark”); interpolation of point data +is bilinear +none : No subdivision, i.e. a simple polygonal mesh; +interpolation of point data is linear + +Polygonal meshes are typically lighter weight and faster to render, +depending on renderer and render mode. Use of”bilinear”will produce a +similar shape to a polygonal mesh and may offer additional guarantees +of watertightness and additional subdivision features (e.g. holes) but +may also not respect authored normals. +Declaration +uniform token subdivisionScheme ="catmullClark" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +catmullClark, loop, bilinear, none + +GetTriangleSubdivisionRuleAttr() → Attribute +Specifies an option to the subdivision rules for the Catmull-Clark +scheme to try and improve undesirable artifacts when subdividing +triangles. +Valid values are”catmullClark”for the standard rules (the default) +and”smooth”for the improvement. +See +https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html#triangle- +subdivision-rule +Declaration +token triangleSubdivisionRule ="catmullClark" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +catmullClark, smooth + +static ValidateTopology() +classmethod ValidateTopology(faceVertexIndices, faceVertexCounts, numPoints, reason) -> bool +Validate the topology of a mesh. +This validates that the sum of faceVertexCounts is equal to the +size of the faceVertexIndices array, and that all face vertex +indices in the faceVertexIndices array are in the range [0, +numPoints). Returns true if the topology is valid, or false otherwise. +If the topology is invalid and reason is non-null, an error +message describing the validation error will be set. + +Parameters + +faceVertexIndices (IntArray) – +faceVertexCounts (IntArray) – +numPoints (int) – +reason (str) – + +SHARPNESS_INFINITE = 10.0 + +class pxr.UsdGeom.ModelAPI +UsdGeomModelAPI extends the generic UsdModelAPI schema with geometry +specific concepts such as cached extents for the entire model, +constraint targets, and geometry-inspired extensions to the payload +lofting process. +As described in GetExtentsHint() below, it is useful to cache extents +at the model level. UsdGeomModelAPI provides schema for computing and +storing these cached extents, which can be consumed by +UsdGeomBBoxCache to provide fast access to precomputed extents that +will be used as the model’s bounds ( see +UsdGeomBBoxCache::UsdGeomBBoxCache() ). + +## Draw Modes + +Draw modes provide optional alternate imaging behavior for USD +subtrees with kind model. model:drawMode (which is inheritable) and +model:applyDrawMode (which is not) are resolved into a decision to +stop traversing the scene graph at a certain point, and replace a USD +subtree with proxy geometry. +The value of model:drawMode determines the type of proxy geometry: + +origin - Draw the model-space basis vectors of the replaced +prim. +bounds - Draw the model-space bounding box of the replaced +prim. +cards - Draw textured quads as a placeholder for the replaced +prim. +default - An explicit opinion to draw the USD subtree as +normal. +inherited - Defer to the parent opinion. + +model:drawMode falls back to inherited so that a whole scene, a +large group, or all prototypes of a model hierarchy PointInstancer can +be assigned a draw mode with a single attribute edit. If no draw mode +is explicitly set in a hierarchy, the resolved value is default. +model:applyDrawMode is meant to be written when an asset is +authored, and provides flexibility for different asset types. For +example, a character assembly (composed of character, clothes, etc) +might have model:applyDrawMode set at the top of the subtree so the +whole group can be drawn as a single card object. An effects subtree +might have model:applyDrawMode set at a lower level so each particle +group draws individually. +Models of kind component are treated as if model:applyDrawMode were +true. This means a prim is drawn with proxy geometry when: the prim +has kind component, and/or model:applyDrawMode is set; and the +prim’s resolved value for model:drawMode is not default. + +## Cards Geometry + +The specific geometry used in cards mode is controlled by the +model:cardGeometry attribute: + +cross - Generate a quad normal to each basis direction and +negative. Locate each quad so that it bisects the model extents. +box - Generate a quad normal to each basis direction and +negative. Locate each quad on a face of the model extents, facing out. +fromTexture - Generate a quad for each supplied texture from +attributes stored in that texture’s metadata. + +For cross and box mode, the extents are calculated for purposes +default, proxy, and render, at their earliest authored time. If +the model has no textures, all six card faces are rendered using +model:drawModeColor. If one or more textures are present, only axes +with one or more textures assigned are drawn. For each axis, if both +textures (positive and negative) are specified, they’ll be used on the +corresponding card faces; if only one texture is specified, it will be +mapped to the opposite card face after being flipped on the texture’s +s-axis. Any card faces with invalid asset paths will be drawn with +model:drawModeColor. +Both model:cardGeometry and model:drawModeColor should be authored +on the prim where the draw mode takes effect, since these attributes +are not inherited. +For fromTexture mode, only card faces with valid textures assigned +are drawn. The geometry is generated by pulling the worldtoscreen +attribute out of texture metadata. This is expected to be a 4x4 matrix +mapping the model-space position of the card quad to the clip-space +quad with corners (-1,-1,0) and (1,1,0). The card vertices are +generated by transforming the clip-space corners by the inverse of +worldtoscreen. Textures are mapped so that (s) and (t) map to (+x) +and (+y) in clip space. If the metadata cannot be read in the right +format, or the matrix can’t be inverted, the card face is not drawn. +All card faces are drawn and textured as single-sided. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> ModelAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ComputeExtentsHint(bboxCache) +For the given model, compute the value for the extents hint with the given bboxCache . + +ComputeModelDrawMode(parentDrawMode) +Calculate the effective model:drawMode of this prim. + +CreateConstraintTarget(constraintName) +Creates a new constraint target with the given name, constraintName . + +CreateModelApplyDrawModeAttr(defaultValue, ...) +See GetModelApplyDrawModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardGeometryAttr(defaultValue, ...) +See GetModelCardGeometryAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardTextureXNegAttr(defaultValue, ...) +See GetModelCardTextureXNegAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardTextureXPosAttr(defaultValue, ...) +See GetModelCardTextureXPosAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardTextureYNegAttr(defaultValue, ...) +See GetModelCardTextureYNegAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardTextureYPosAttr(defaultValue, ...) +See GetModelCardTextureYPosAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardTextureZNegAttr(defaultValue, ...) +See GetModelCardTextureZNegAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelCardTextureZPosAttr(defaultValue, ...) +See GetModelCardTextureZPosAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelDrawModeAttr(defaultValue, ...) +See GetModelDrawModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateModelDrawModeColorAttr(defaultValue, ...) +See GetModelDrawModeColorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> ModelAPI + +GetConstraintTarget(constraintName) +Get the constraint target with the given name, constraintName . + +GetConstraintTargets() +Returns all the constraint targets belonging to the model. + +GetExtentsHint(extents, time) +Retrieve the authored value (if any) of this model's"extentsHint". + +GetExtentsHintAttr() +Returns the custom'extentsHint'attribute if it exits. + +GetModelApplyDrawModeAttr() +If true, and the resolved value of model:drawMode is non-default, apply an alternate imaging mode to this prim. + +GetModelCardGeometryAttr() +The geometry to generate for imaging prims inserted for cards imaging mode. + +GetModelCardTextureXNegAttr() +In cards imaging mode, the texture applied to the X- quad. + +GetModelCardTextureXPosAttr() +In cards imaging mode, the texture applied to the X+ quad. + +GetModelCardTextureYNegAttr() +In cards imaging mode, the texture applied to the Y- quad. + +GetModelCardTextureYPosAttr() +In cards imaging mode, the texture applied to the Y+ quad. + +GetModelCardTextureZNegAttr() +In cards imaging mode, the texture applied to the Z- quad. + +GetModelCardTextureZPosAttr() +In cards imaging mode, the texture applied to the Z+ quad. + +GetModelDrawModeAttr() +Alternate imaging mode; applied to this prim or child prims where model:applyDrawMode is true, or where the prim has kind component. + +GetModelDrawModeColorAttr() +The base color of imaging prims inserted for alternate imaging modes. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +SetExtentsHint(extents, time) +Authors the extentsHint array for this model at the given time. + +static Apply() +classmethod Apply(prim) -> ModelAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”GeomModelAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdGeomModelAPI object is returned upon success. An invalid +(or empty) UsdGeomModelAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ComputeExtentsHint(bboxCache) → Vec3fArray +For the given model, compute the value for the extents hint with the +given bboxCache . +bboxCache should be setup with the appropriate time. After calling +this function, the bboxCache may have it’s included purposes +changed. +bboxCache should not be in use by any other thread while this +method is using it in a thread. + +Parameters +bboxCache (BBoxCache) – + +ComputeModelDrawMode(parentDrawMode) → str +Calculate the effective model:drawMode of this prim. +If the draw mode is authored on this prim, it’s used. Otherwise, the +fallback value is”inherited”, which defers to the parent opinion. The +first non-inherited opinion found walking from this prim towards the +root is used. If the attribute isn’t set on any ancestors, we +return”default”(meaning, disable”drawMode”geometry). +If this function is being called in a traversal context to compute the +draw mode of an entire hierarchy of prims, it would be beneficial to +cache and pass in the computed parent draw-mode via the +parentDrawMode parameter. This avoids repeated upward traversal to +look for ancestor opinions. +When parentDrawMode is empty (or unspecified), this function does +an upward traversal to find the closest ancestor with an authored +model:drawMode. +GetModelDrawModeAttr() + +Parameters +parentDrawMode (str) – + +CreateConstraintTarget(constraintName) → ConstraintTarget +Creates a new constraint target with the given name, +constraintName . +If the constraint target already exists, then the existing target is +returned. If it does not exist, a new one is created and returned. + +Parameters +constraintName (str) – + +CreateModelApplyDrawModeAttr(defaultValue, writeSparsely) → Attribute +See GetModelApplyDrawModeAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardGeometryAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardGeometryAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardTextureXNegAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardTextureXNegAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardTextureXPosAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardTextureXPosAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardTextureYNegAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardTextureYNegAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardTextureYPosAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardTextureYPosAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardTextureZNegAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardTextureZNegAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelCardTextureZPosAttr(defaultValue, writeSparsely) → Attribute +See GetModelCardTextureZPosAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelDrawModeAttr(defaultValue, writeSparsely) → Attribute +See GetModelDrawModeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateModelDrawModeColorAttr(defaultValue, writeSparsely) → Attribute +See GetModelDrawModeColorAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> ModelAPI +Return a UsdGeomModelAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomModelAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetConstraintTarget(constraintName) → ConstraintTarget +Get the constraint target with the given name, constraintName . +If the requested constraint target does not exist, then an invalid +UsdConstraintTarget object is returned. + +Parameters +constraintName (str) – + +GetConstraintTargets() → list[ConstraintTarget] +Returns all the constraint targets belonging to the model. +Only valid constraint targets in the”constraintTargets”namespace are +returned by this method. + +GetExtentsHint(extents, time) → bool +Retrieve the authored value (if any) of this model’s”extentsHint”. +Persistent caching of bounds in USD is a potentially perilous +endeavor, given that: + +It is very easy to add overrides in new super-layers that +invalidate the cached bounds, and no practical way to automatically +detect when this happens +It is possible for references to be allowed to”float”, so that +asset updates can flow directly into cached scenes. Such changes in +referenced scene description can also invalidate cached bounds in +referencing layers. +For these reasons, as a general rule, we only persistently cache leaf +gprim extents in object space. However, even with cached gprim +extents, computing bounds can be expensive. Since model-level bounds +are so useful to many graphics applications, we make an exception, +with some caveats. The”extentsHint”should be considered entirely +optional (whereas gprim extent is not); if authored, it should +contains the extents for various values of gprim purposes. The extents +for different values of purpose are stored in a linear Vec3f array as +pairs of GfVec3f values in the order specified by +UsdGeomImageable::GetOrderedPurposeTokens() . This list is trimmed to +only include non-empty extents. i.e., if a model has only default and +render geoms, then it will only have 4 GfVec3f values in its +extentsHint array. We do not skip over zero extents, so if a model has +only default and proxy geom, we will author six GfVec3f ‘s, the middle +two representing an zero extent for render geometry. + +A UsdGeomBBoxCache can be configured to first consult the cached +extents when evaluating model roots, rather than descending into the +models for the full computation. This is not the default behavior, and +gives us a convenient way to validate that the cached extentsHint is +still valid. +true if a value was fetched; false if no value was authored, +or on error. It is an error to make this query of a prim that is not a +model root. +UsdGeomImageable::GetPurposeAttr() , +UsdGeomImageable::GetOrderedPurposeTokens() + +Parameters + +extents (Vec3fArray) – +time (TimeCode) – + +GetExtentsHintAttr() → Attribute +Returns the custom’extentsHint’attribute if it exits. + +GetModelApplyDrawModeAttr() → Attribute +If true, and the resolved value of model:drawMode is non-default, +apply an alternate imaging mode to this prim. +See Draw Modes. +Declaration +uniform bool model:applyDrawMode = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetModelCardGeometryAttr() → Attribute +The geometry to generate for imaging prims inserted for cards +imaging mode. +See Cards Geometry for geometry descriptions. +Declaration +uniform token model:cardGeometry ="cross" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +cross, box, fromTexture + +GetModelCardTextureXNegAttr() → Attribute +In cards imaging mode, the texture applied to the X- quad. +The texture axes (s,t) are mapped to model-space axes (y, -z). +Declaration +asset model:cardTextureXNeg +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetModelCardTextureXPosAttr() → Attribute +In cards imaging mode, the texture applied to the X+ quad. +The texture axes (s,t) are mapped to model-space axes (-y, -z). +Declaration +asset model:cardTextureXPos +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetModelCardTextureYNegAttr() → Attribute +In cards imaging mode, the texture applied to the Y- quad. +The texture axes (s,t) are mapped to model-space axes (-x, -z). +Declaration +asset model:cardTextureYNeg +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetModelCardTextureYPosAttr() → Attribute +In cards imaging mode, the texture applied to the Y+ quad. +The texture axes (s,t) are mapped to model-space axes (x, -z). +Declaration +asset model:cardTextureYPos +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetModelCardTextureZNegAttr() → Attribute +In cards imaging mode, the texture applied to the Z- quad. +The texture axes (s,t) are mapped to model-space axes (-x, -y). +Declaration +asset model:cardTextureZNeg +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetModelCardTextureZPosAttr() → Attribute +In cards imaging mode, the texture applied to the Z+ quad. +The texture axes (s,t) are mapped to model-space axes (x, -y). +Declaration +asset model:cardTextureZPos +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetModelDrawModeAttr() → Attribute +Alternate imaging mode; applied to this prim or child prims where +model:applyDrawMode is true, or where the prim has kind component. +See Draw Modes for mode descriptions. +Declaration +uniform token model:drawMode ="inherited" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +origin, bounds, cards, default, inherited + +GetModelDrawModeColorAttr() → Attribute +The base color of imaging prims inserted for alternate imaging modes. +For origin and bounds modes, this controls line color; for cards +mode, this controls the fallback quad color. +Declaration +uniform float3 model:drawModeColor = (0.18, 0.18, 0.18) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Float3 +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +SetExtentsHint(extents, time) → bool +Authors the extentsHint array for this model at the given time. +GetExtentsHint() + +Parameters + +extents (Vec3fArray) – +time (TimeCode) – + +class pxr.UsdGeom.MotionAPI +UsdGeomMotionAPI encodes data that can live on any prim that may +affect computations involving: + +computed motion for motion blur +sampling for motion blur + +The motion:blurScale attribute allows artists to scale the amount +of motion blur to be rendered for parts of the scene without changing +the recorded animation. See Effectively Applying motion:blurScale for +use and implementation details. +Methods: + +Apply +classmethod Apply(prim) -> MotionAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ComputeMotionBlurScale(time) +Compute the inherited value of motion:blurScale at time , i.e. + +ComputeNonlinearSampleCount(time) +Compute the inherited value of nonlinearSampleCount at time , i.e. + +ComputeVelocityScale(time) +Deprecated + +CreateMotionBlurScaleAttr(defaultValue, ...) +See GetMotionBlurScaleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateNonlinearSampleCountAttr(defaultValue, ...) +See GetNonlinearSampleCountAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVelocityScaleAttr(defaultValue, ...) +See GetVelocityScaleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> MotionAPI + +GetMotionBlurScaleAttr() +BlurScale is an inherited float attribute that stipulates the rendered motion blur (as typically specified via UsdGeomCamera 's shutter:open and shutter:close properties) should be scaled for all objects at and beneath the prim in namespace on which the motion:blurScale value is specified. + +GetNonlinearSampleCountAttr() +Determines the number of position or transformation samples created when motion is described by attributes contributing non-linear terms. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetVelocityScaleAttr() +Deprecated + +static Apply() +classmethod Apply(prim) -> MotionAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”MotionAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdGeomMotionAPI object is returned upon success. An invalid +(or empty) UsdGeomMotionAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ComputeMotionBlurScale(time) → float +Compute the inherited value of motion:blurScale at time , i.e. +the authored value on the prim closest to this prim in namespace, +resolved upwards through its ancestors in namespace. +the inherited value, or 1.0 if neither the prim nor any of its +ancestors possesses an authored value. +this is a reference implementation that is not particularly efficient +if evaluating over many prims, because it does not share inherited +results. + +Parameters +time (TimeCode) – + +ComputeNonlinearSampleCount(time) → int +Compute the inherited value of nonlinearSampleCount at time , +i.e. +the authored value on the prim closest to this prim in namespace, +resolved upwards through its ancestors in namespace. +the inherited value, or 3 if neither the prim nor any of its ancestors +possesses an authored value. +this is a reference implementation that is not particularly efficient +if evaluating over many prims, because it does not share inherited +results. + +Parameters +time (TimeCode) – + +ComputeVelocityScale(time) → float +Deprecated +Compute the inherited value of velocityScale at time , i.e. the +authored value on the prim closest to this prim in namespace, resolved +upwards through its ancestors in namespace. +the inherited value, or 1.0 if neither the prim nor any of its +ancestors possesses an authored value. +this is a reference implementation that is not particularly efficient +if evaluating over many prims, because it does not share inherited +results. + +Parameters +time (TimeCode) – + +CreateMotionBlurScaleAttr(defaultValue, writeSparsely) → Attribute +See GetMotionBlurScaleAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateNonlinearSampleCountAttr(defaultValue, writeSparsely) → Attribute +See GetNonlinearSampleCountAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVelocityScaleAttr(defaultValue, writeSparsely) → Attribute +See GetVelocityScaleAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> MotionAPI +Return a UsdGeomMotionAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomMotionAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetMotionBlurScaleAttr() → Attribute +BlurScale is an inherited float attribute that stipulates the +rendered motion blur (as typically specified via UsdGeomCamera ‘s +shutter:open and shutter:close properties) should be scaled for +all objects at and beneath the prim in namespace on which the +motion:blurScale value is specified. +Without changing any other data in the scene, blurScale allows +artists to”dial in”the amount of blur on a per-object basis. A +blurScale value of zero removes all blur, a value of 0.5 reduces +blur by half, and a value of 2.0 doubles the blur. The legal range for +blurScale is [0, inf), although very high values may result in +extremely expensive renders, and may exceed the capabilities of some +renderers. +Although renderers are free to implement this feature however they see +fit, see Effectively Applying motion:blurScale for our guidance on +implementing the feature universally and efficiently. +ComputeMotionBlurScale() +Declaration +float motion:blurScale = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetNonlinearSampleCountAttr() → Attribute +Determines the number of position or transformation samples created +when motion is described by attributes contributing non-linear terms. +To give an example, imagine an application (such as a renderer) +consuming’points’and the USD document also contains’accelerations’for +the same prim. Unless the application can consume +these’accelerations’itself, an intermediate layer has to compute +samples within the sampling interval for the point positions based on +the value of’points’,’velocities’and’accelerations’. The number of +these samples is given by’nonlinearSampleCount’. The samples are +equally spaced within the sampling interval. +Another example involves the PointInstancer +where’nonlinearSampleCount’is relevant +when’angularVelocities’or’accelerations’are authored. +‘nonlinearSampleCount’is an inherited attribute, also see +ComputeNonlinearSampleCount() +Declaration +int motion:nonlinearSampleCount = 3 +C++ Type +int +Usd Type +SdfValueTypeNames->Int + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetVelocityScaleAttr() → Attribute +Deprecated +VelocityScale is an inherited float attribute that velocity-based +schemas (e.g. PointBased, PointInstancer) can consume to compute +interpolated positions and orientations by applying velocity and +angularVelocity, which is required for interpolating between samples +when topology is varying over time. Although these quantities are +generally physically computed by a simulator, sometimes we require +more or less motion-blur to achieve the desired look. VelocityScale +allows artists to dial-in, as a post-sim correction, a scale factor to +be applied to the velocity prior to computing interpolated positions +from it. +Declaration +float motion:velocityScale = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdGeom.NurbsCurves +This schema is analagous to NURBS Curves in packages like Maya and +Houdini, often used for interchange of rigging and modeling curves. +Unlike Maya, this curve spec supports batching of multiple curves into +a single prim, widths, and normals in the schema. Additionally, we +require’numSegments + 2 * degree + 1’knots (2 more than maya does). +This is to be more consistent with RenderMan’s NURBS patch +specification. +To express a periodic curve: + +knot[0] = knot[1] - (knots[-2] - knots[-3]; +knot[-1] = knot[-2] + (knot[2] - knots[1]); + +To express a nonperiodic curve: + +knot[0] = knot[1]; +knot[-1] = knot[-2]; + +In spite of these slight differences in the spec, curves generated in +Maya should be preserved when roundtripping. +order and range, when representing a batched NurbsCurve should be +authored one value per curve. knots should be the concatentation of +all batched curves. +NurbsCurve Form +Form is provided as an aid to interchange between modeling and +animation applications so that they can robustly identify the intent +with which the surface was modelled, and take measures (if they are +able) to preserve the continuity/concidence constraints as the surface +may be rigged or deformed. + +An open-form NurbsCurve has no continuity constraints. +A closed-form NurbsCurve expects the first and last control +points to overlap +A periodic-form NurbsCurve expects the first and last order - +1 control points to overlap. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. + +Methods: + +CreateFormAttr(defaultValue, writeSparsely) +See GetFormAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateKnotsAttr(defaultValue, writeSparsely) +See GetKnotsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateOrderAttr(defaultValue, writeSparsely) +See GetOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePointWeightsAttr(defaultValue, ...) +See GetPointWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRangesAttr(defaultValue, writeSparsely) +See GetRangesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> NurbsCurves + +Get +classmethod Get(stage, path) -> NurbsCurves + +GetFormAttr() +Interpret the control grid and knot vectors as representing an open, geometrically closed, or geometrically closed and C2 continuous curve. + +GetKnotsAttr() +Knot vector providing curve parameterization. + +GetOrderAttr() +Order of the curve. + +GetPointWeightsAttr() +Optionally provides"w"components for each control point, thus must be the same length as the points attribute. + +GetRangesAttr() +Provides the minimum and maximum parametric values (as defined by knots) over which the curve is actually defined. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateFormAttr(defaultValue, writeSparsely) → Attribute +See GetFormAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateKnotsAttr(defaultValue, writeSparsely) → Attribute +See GetKnotsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateOrderAttr(defaultValue, writeSparsely) → Attribute +See GetOrderAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePointWeightsAttr(defaultValue, writeSparsely) → Attribute +See GetPointWeightsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRangesAttr(defaultValue, writeSparsely) → Attribute +See GetRangesAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> NurbsCurves +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> NurbsCurves +Return a UsdGeomNurbsCurves holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomNurbsCurves(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFormAttr() → Attribute +Interpret the control grid and knot vectors as representing an open, +geometrically closed, or geometrically closed and C2 continuous curve. +NurbsCurve Form +Declaration +uniform token form ="open" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +open, closed, periodic + +GetKnotsAttr() → Attribute +Knot vector providing curve parameterization. +The length of the slice of the array for the ith curve must be ( +curveVertexCount[i] + order[i] ), and its entries must take on +monotonically increasing values. +Declaration +double[] knots +C++ Type +VtArray +Usd Type +SdfValueTypeNames->DoubleArray + +GetOrderAttr() → Attribute +Order of the curve. +Order must be positive and is equal to the degree of the polynomial +basis to be evaluated, plus 1. Its value for the’i’th curve must be +less than or equal to curveVertexCount[i] +Declaration +int[] order = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetPointWeightsAttr() → Attribute +Optionally provides”w”components for each control point, thus must be +the same length as the points attribute. +If authored, the patch will be rational. If unauthored, the patch will +be polynomial, i.e. weight for all points is 1.0. +Some DCC’s pre-weight the points, but in this schema, points are +not pre-weighted. +Declaration +double[] pointWeights +C++ Type +VtArray +Usd Type +SdfValueTypeNames->DoubleArray + +GetRangesAttr() → Attribute +Provides the minimum and maximum parametric values (as defined by +knots) over which the curve is actually defined. +The minimum must be less than the maximum, and greater than or equal +to the value of the knots[‘i’th curve slice][order[i]-1]. The maxium +must be less than or equal to the last element’s value in knots[‘i’th +curve slice]. Range maps to (vmin, vmax) in the RenderMan spec. +Declaration +double2[] ranges +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Double2Array + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.NurbsPatch +Encodes a rational or polynomial non-uniform B-spline surface, with +optional trim curves. +The encoding mostly follows that of RiNuPatch and RiTrimCurve: +https://renderman.pixar.com/resources/current/RenderMan/geometricPrimitives.html#rinupatch, +with some minor renaming and coalescing for clarity. +The layout of control vertices in the points attribute inherited +from UsdGeomPointBased is row-major with U considered rows, and V +columns. +NurbsPatch Form +The authored points, orders, knots, weights, and ranges are all that +is required to render the nurbs patch. However, the only way to model +closed surfaces with nurbs is to ensure that the first and last +control points along the given axis are coincident. Similarly, to +ensure the surface is not only closed but also C2 continuous, the last +order - 1 control points must be (correspondingly) coincident with +the first order - 1 control points, and also the spacing of the last +corresponding knots must be the same as the first corresponding knots. +Form is provided as an aid to interchange between modeling and +animation applications so that they can robustly identify the intent +with which the surface was modelled, and take measures (if they are +able) to preserve the continuity/concidence constraints as the surface +may be rigged or deformed. + +An open-form NurbsPatch has no continuity constraints. +A closed-form NurbsPatch expects the first and last control +points to overlap +A periodic-form NurbsPatch expects the first and last order - +1 control points to overlap. +Nurbs vs Subdivision Surfaces + +Nurbs are an important modeling primitive in CAD/CAM tools and early +computer graphics DCC’s. Because they have a natural UV +parameterization they easily support”trim curves”, which allow smooth +shapes to be carved out of the surface. +However, the topology of the patch is always rectangular, and joining +two nurbs patches together (especially when they have differing +numbers of spans) is difficult to do smoothly. Also, nurbs are not +supported by the Ptex texturing technology ( http://ptex.us). +Neither of these limitations are shared by subdivision surfaces; +therefore, although they do not subscribe to trim-curve-based shaping, +subdivs are often considered a more flexible modeling primitive. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreatePointWeightsAttr(defaultValue, ...) +See GetPointWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTrimCurveCountsAttr(defaultValue, ...) +See GetTrimCurveCountsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTrimCurveKnotsAttr(defaultValue, ...) +See GetTrimCurveKnotsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTrimCurveOrdersAttr(defaultValue, ...) +See GetTrimCurveOrdersAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTrimCurvePointsAttr(defaultValue, ...) +See GetTrimCurvePointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTrimCurveRangesAttr(defaultValue, ...) +See GetTrimCurveRangesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTrimCurveVertexCountsAttr(...) +See GetTrimCurveVertexCountsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUFormAttr(defaultValue, writeSparsely) +See GetUFormAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUKnotsAttr(defaultValue, writeSparsely) +See GetUKnotsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUOrderAttr(defaultValue, writeSparsely) +See GetUOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateURangeAttr(defaultValue, writeSparsely) +See GetURangeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUVertexCountAttr(defaultValue, ...) +See GetUVertexCountAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVFormAttr(defaultValue, writeSparsely) +See GetVFormAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVKnotsAttr(defaultValue, writeSparsely) +See GetVKnotsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVOrderAttr(defaultValue, writeSparsely) +See GetVOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVRangeAttr(defaultValue, writeSparsely) +See GetVRangeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVVertexCountAttr(defaultValue, ...) +See GetVVertexCountAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> NurbsPatch + +Get +classmethod Get(stage, path) -> NurbsPatch + +GetPointWeightsAttr() +Optionally provides"w"components for each control point, thus must be the same length as the points attribute. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTrimCurveCountsAttr() +Each element specifies how many curves are present in each"loop"of the trimCurve, and the length of the array determines how many loops the trimCurve contains. + +GetTrimCurveKnotsAttr() +Flat list of parametric values for each of the nCurves curves. + +GetTrimCurveOrdersAttr() +Flat list of orders for each of the nCurves curves. + +GetTrimCurvePointsAttr() +Flat list of homogeneous 2D points (u, v, w) that comprise the nCurves curves. + +GetTrimCurveRangesAttr() +Flat list of minimum and maximum parametric values (as defined by knots) for each of the nCurves curves. + +GetTrimCurveVertexCountsAttr() +Flat list of number of vertices for each of the nCurves curves. + +GetUFormAttr() +Interpret the control grid and knot vectors as representing an open, geometrically closed, or geometrically closed and C2 continuous surface along the U dimension. + +GetUKnotsAttr() +Knot vector for U direction providing U parameterization. + +GetUOrderAttr() +Order in the U direction. + +GetURangeAttr() +Provides the minimum and maximum parametric values (as defined by uKnots) over which the surface is actually defined. + +GetUVertexCountAttr() +Number of vertices in the U direction. + +GetVFormAttr() +Interpret the control grid and knot vectors as representing an open, geometrically closed, or geometrically closed and C2 continuous surface along the V dimension. + +GetVKnotsAttr() +Knot vector for V direction providing U parameterization. + +GetVOrderAttr() +Order in the V direction. + +GetVRangeAttr() +Provides the minimum and maximum parametric values (as defined by vKnots) over which the surface is actually defined. + +GetVVertexCountAttr() +Number of vertices in the V direction. + +CreatePointWeightsAttr(defaultValue, writeSparsely) → Attribute +See GetPointWeightsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTrimCurveCountsAttr(defaultValue, writeSparsely) → Attribute +See GetTrimCurveCountsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTrimCurveKnotsAttr(defaultValue, writeSparsely) → Attribute +See GetTrimCurveKnotsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTrimCurveOrdersAttr(defaultValue, writeSparsely) → Attribute +See GetTrimCurveOrdersAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTrimCurvePointsAttr(defaultValue, writeSparsely) → Attribute +See GetTrimCurvePointsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTrimCurveRangesAttr(defaultValue, writeSparsely) → Attribute +See GetTrimCurveRangesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTrimCurveVertexCountsAttr(defaultValue, writeSparsely) → Attribute +See GetTrimCurveVertexCountsAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateUFormAttr(defaultValue, writeSparsely) → Attribute +See GetUFormAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateUKnotsAttr(defaultValue, writeSparsely) → Attribute +See GetUKnotsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateUOrderAttr(defaultValue, writeSparsely) → Attribute +See GetUOrderAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateURangeAttr(defaultValue, writeSparsely) → Attribute +See GetURangeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateUVertexCountAttr(defaultValue, writeSparsely) → Attribute +See GetUVertexCountAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVFormAttr(defaultValue, writeSparsely) → Attribute +See GetVFormAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVKnotsAttr(defaultValue, writeSparsely) → Attribute +See GetVKnotsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVOrderAttr(defaultValue, writeSparsely) → Attribute +See GetVOrderAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVRangeAttr(defaultValue, writeSparsely) → Attribute +See GetVRangeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVVertexCountAttr(defaultValue, writeSparsely) → Attribute +See GetVVertexCountAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> NurbsPatch +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> NurbsPatch +Return a UsdGeomNurbsPatch holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomNurbsPatch(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetPointWeightsAttr() → Attribute +Optionally provides”w”components for each control point, thus must be +the same length as the points attribute. +If authored, the patch will be rational. If unauthored, the patch will +be polynomial, i.e. weight for all points is 1.0. +Some DCC’s pre-weight the points, but in this schema, points are +not pre-weighted. +Declaration +double[] pointWeights +C++ Type +VtArray +Usd Type +SdfValueTypeNames->DoubleArray + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTrimCurveCountsAttr() → Attribute +Each element specifies how many curves are present in each”loop”of the +trimCurve, and the length of the array determines how many loops the +trimCurve contains. +The sum of all elements is the total nuber of curves in the trim, to +which we will refer as nCurves in describing the other trim +attributes. +Declaration +int[] trimCurve:counts +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetTrimCurveKnotsAttr() → Attribute +Flat list of parametric values for each of the nCurves curves. +There will be as many knots as the sum over all elements of +vertexCounts plus the sum over all elements of orders. +Declaration +double[] trimCurve:knots +C++ Type +VtArray +Usd Type +SdfValueTypeNames->DoubleArray + +GetTrimCurveOrdersAttr() → Attribute +Flat list of orders for each of the nCurves curves. +Declaration +int[] trimCurve:orders +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetTrimCurvePointsAttr() → Attribute +Flat list of homogeneous 2D points (u, v, w) that comprise the +nCurves curves. +The number of points should be equal to the um over all elements of +vertexCounts. +Declaration +double3[] trimCurve:points +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Double3Array + +GetTrimCurveRangesAttr() → Attribute +Flat list of minimum and maximum parametric values (as defined by +knots) for each of the nCurves curves. +Declaration +double2[] trimCurve:ranges +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Double2Array + +GetTrimCurveVertexCountsAttr() → Attribute +Flat list of number of vertices for each of the nCurves curves. +Declaration +int[] trimCurve:vertexCounts +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetUFormAttr() → Attribute +Interpret the control grid and knot vectors as representing an open, +geometrically closed, or geometrically closed and C2 continuous +surface along the U dimension. +NurbsPatch Form +Declaration +uniform token uForm ="open" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +open, closed, periodic + +GetUKnotsAttr() → Attribute +Knot vector for U direction providing U parameterization. +The length of this array must be ( uVertexCount + uOrder), and its +entries must take on monotonically increasing values. +Declaration +double[] uKnots +C++ Type +VtArray +Usd Type +SdfValueTypeNames->DoubleArray + +GetUOrderAttr() → Attribute +Order in the U direction. +Order must be positive and is equal to the degree of the polynomial +basis to be evaluated, plus 1. +Declaration +int uOrder +C++ Type +int +Usd Type +SdfValueTypeNames->Int + +GetURangeAttr() → Attribute +Provides the minimum and maximum parametric values (as defined by +uKnots) over which the surface is actually defined. +The minimum must be less than the maximum, and greater than or equal +to the value of uKnots[uOrder-1]. The maxium must be less than or +equal to the last element’s value in uKnots. +Declaration +double2 uRange +C++ Type +GfVec2d +Usd Type +SdfValueTypeNames->Double2 + +GetUVertexCountAttr() → Attribute +Number of vertices in the U direction. +Should be at least as large as uOrder. +Declaration +int uVertexCount +C++ Type +int +Usd Type +SdfValueTypeNames->Int + +GetVFormAttr() → Attribute +Interpret the control grid and knot vectors as representing an open, +geometrically closed, or geometrically closed and C2 continuous +surface along the V dimension. +NurbsPatch Form +Declaration +uniform token vForm ="open" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +open, closed, periodic + +GetVKnotsAttr() → Attribute +Knot vector for V direction providing U parameterization. +The length of this array must be ( vVertexCount + vOrder), and its +entries must take on monotonically increasing values. +Declaration +double[] vKnots +C++ Type +VtArray +Usd Type +SdfValueTypeNames->DoubleArray + +GetVOrderAttr() → Attribute +Order in the V direction. +Order must be positive and is equal to the degree of the polynomial +basis to be evaluated, plus 1. +Declaration +int vOrder +C++ Type +int +Usd Type +SdfValueTypeNames->Int + +GetVRangeAttr() → Attribute +Provides the minimum and maximum parametric values (as defined by +vKnots) over which the surface is actually defined. +The minimum must be less than the maximum, and greater than or equal +to the value of vKnots[vOrder-1]. The maxium must be less than or +equal to the last element’s value in vKnots. +Declaration +double2 vRange +C++ Type +GfVec2d +Usd Type +SdfValueTypeNames->Double2 + +GetVVertexCountAttr() → Attribute +Number of vertices in the V direction. +Should be at least as large as vOrder. +Declaration +int vVertexCount +C++ Type +int +Usd Type +SdfValueTypeNames->Int + +class pxr.UsdGeom.Plane +Defines a primitive plane, centered at the origin, and is defined by a +cardinal axis, width, and length. The plane is double-sided by +default. +The axis of width and length are perpendicular to the plane’s axis: +axis +width +length +X +z-axis +y-axis +Y +x-axis +z-axis +Z +x-axis +y-axis +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDoubleSidedAttr(defaultValue, ...) +See GetDoubleSidedAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLengthAttr(defaultValue, writeSparsely) +See GetLengthAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateWidthAttr(defaultValue, writeSparsely) +See GetWidthAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Plane + +Get +classmethod Get(stage, path) -> Plane + +GetAxisAttr() +The axis along which the surface of the plane is aligned. + +GetDoubleSidedAttr() +Planes are double-sided by default. + +GetExtentAttr() +Extent is re-defined on Plane only to provide a fallback value. + +GetLengthAttr() +The length of the plane, which aligns to the y-axis when axis is'Z'or'X', or to the z-axis when axis is'Y'. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetWidthAttr() +The width of the plane, which aligns to the x-axis when axis is'Z'or'Y', or to the z-axis when axis is'X'. + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDoubleSidedAttr(defaultValue, writeSparsely) → Attribute +See GetDoubleSidedAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLengthAttr(defaultValue, writeSparsely) → Attribute +See GetLengthAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateWidthAttr(defaultValue, writeSparsely) → Attribute +See GetWidthAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Plane +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Plane +Return a UsdGeomPlane holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomPlane(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +The axis along which the surface of the plane is aligned. +When set to’Z’the plane is in the xy-plane; when axis is’X’the plane +is in the yz-plane, and when axis is’Y’the plane is in the xz-plane. +UsdGeomGprim::GetAxisAttr(). +Declaration +uniform token axis ="Z" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetDoubleSidedAttr() → Attribute +Planes are double-sided by default. +Clients may also support single-sided planes. +UsdGeomGprim::GetDoubleSidedAttr() +Declaration +uniform bool doubleSided = 1 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetExtentAttr() → Attribute +Extent is re-defined on Plane only to provide a fallback value. +UsdGeomGprim::GetExtentAttr() . +Declaration +float3[] extent = [(-1, -1, 0), (1, 1, 0)] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +GetLengthAttr() → Attribute +The length of the plane, which aligns to the y-axis when axis +is’Z’or’X’, or to the z-axis when axis is’Y’. +If you author length you must also author extent. +UsdGeomGprim::GetExtentAttr() +Declaration +double length = 2 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetWidthAttr() → Attribute +The width of the plane, which aligns to the x-axis when axis +is’Z’or’Y’, or to the z-axis when axis is’X’. +If you author width you must also author extent. +UsdGeomGprim::GetExtentAttr() +Declaration +double width = 2 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +class pxr.UsdGeom.PointBased +Base class for all UsdGeomGprims that possess points, providing common +attributes such as normals and velocities. +Methods: + +ComputeExtent +classmethod ComputeExtent(points, extent) -> bool + +ComputePointsAtTime +classmethod ComputePointsAtTime(points, time, baseTime) -> bool + +ComputePointsAtTimes(pointsArray, times, ...) +Compute points as in ComputePointsAtTime, but using multiple sample times. + +CreateAccelerationsAttr(defaultValue, ...) +See GetAccelerationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateNormalsAttr(defaultValue, writeSparsely) +See GetNormalsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePointsAttr(defaultValue, writeSparsely) +See GetPointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVelocitiesAttr(defaultValue, writeSparsely) +See GetVelocitiesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> PointBased + +GetAccelerationsAttr() +If provided,'accelerations'should be used with velocities to compute positions between samples for the'points'attribute rather than interpolating between neighboring'points'samples. + +GetNormalsAttr() +Provide an object-space orientation for individual points, which, depending on subclass, may define a surface, curve, or free points. + +GetNormalsInterpolation() +Get the interpolation for the normals attribute. + +GetPointsAttr() +The primary geometry attribute for all PointBased primitives, describes points in (local) space. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetVelocitiesAttr() +If provided,'velocities'should be used by renderers to. + +SetNormalsInterpolation(interpolation) +Set the interpolation for the normals attribute. + +static ComputeExtent() +classmethod ComputeExtent(points, extent) -> bool +Compute the extent for the point cloud defined by points. +true on success, false if extents was unable to be calculated. On +success, extent will contain the axis-aligned bounding box of the +point cloud defined by points. +This function is to provide easy authoring of extent for usd authoring +tools, hence it is static and acts outside a specific prim (as in +attribute based methods). + +Parameters + +points (Vec3fArray) – +extent (Vec3fArray) – + +ComputeExtent(points, transform, extent) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied. + +Parameters + +points (Vec3fArray) – +transform (Matrix4d) – +extent (Vec3fArray) – + +ComputePointsAtTime() +classmethod ComputePointsAtTime(points, time, baseTime) -> bool +Compute points given the positions, velocities and accelerations at +time . +This will return false and leave points untouched if: + +points is None +one of time and baseTime is numeric and the other is +UsdTimeCode::Default() (they must either both be numeric or both be +default) +there is no authored points attribute + +If there is no error, we will return true and points will +contain the computed points. +points +- the out parameter for the new points. Its size will depend on the +authored data. time +- UsdTimeCode at which we want to evaluate the transforms baseTime +- required for correct interpolation between samples when velocities +or accelerations are present. If there are samples for positions +and velocities at t1 and t2, normal value resolution would attempt +to interpolate between the two samples, and if they could not be +interpolated because they differ in size (common in cases where +velocity is authored), will choose the sample at t1. When sampling for +the purposes of motion-blur, for example, it is common, when rendering +the frame at t2, to sample at [ t2-shutter/2, t2+shutter/2 ] for a +shutter interval of shutter. The first sample falls between t1 and +t2, but we must sample at t2 and apply velocity-based interpolation +based on those samples to get a correct result. In such scenarios, one +should provide a baseTime of t2 when querying both samples. If +your application does not care about off-sample interpolation, it can +supply the same value for baseTime that it does for time . +When baseTime is less than or equal to time , we will choose +the lower bracketing timeSample. + +Parameters + +points (VtArray[Vec3f]) – +time (TimeCode) – +baseTime (TimeCode) – + +ComputePointsAtTime(points, stage, time, positions, velocities, velocitiesSampleTime, accelerations, velocityScale) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Perform the point computation. +This does the same computation as the non-static ComputePointsAtTime +method, but takes all data as parameters rather than accessing +authored data. +points +- the out parameter for the computed points. Its size will depend on +the given data. stage +- the UsdStage time +- time at which we want to evaluate the transforms positions +- array containing all current points. velocities +- array containing all velocities. This array must be either the same +size as positions or empty. If it is empty, points are computed as +if all velocities were zero in all dimensions. velocitiesSampleTime +- time at which the samples from velocities were taken. +accelerations +- array containing all accelerations. This array must be either the +same size as positions or empty. If it is empty, points are +computed as if all accelerations were zero in all dimensions. +velocityScale +- Deprecated + +Parameters + +points (VtArray[Vec3f]) – +stage (UsdStageWeak) – +time (TimeCode) – +positions (Vec3fArray) – +velocities (Vec3fArray) – +velocitiesSampleTime (TimeCode) – +accelerations (Vec3fArray) – +velocityScale (float) – + +ComputePointsAtTimes(pointsArray, times, baseTime) → bool +Compute points as in ComputePointsAtTime, but using multiple sample +times. +An array of vector arrays is returned where each vector array contains +the points for the corresponding time in times . +times +- A vector containing the UsdTimeCodes at which we want to sample. + +Parameters + +pointsArray (list[VtArray[Vec3f]]) – +times (list[TimeCode]) – +baseTime (TimeCode) – + +CreateAccelerationsAttr(defaultValue, writeSparsely) → Attribute +See GetAccelerationsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateNormalsAttr(defaultValue, writeSparsely) → Attribute +See GetNormalsAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePointsAttr(defaultValue, writeSparsely) → Attribute +See GetPointsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVelocitiesAttr(defaultValue, writeSparsely) → Attribute +See GetVelocitiesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> PointBased +Return a UsdGeomPointBased holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomPointBased(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAccelerationsAttr() → Attribute +If provided,’accelerations’should be used with velocities to compute +positions between samples for the’points’attribute rather than +interpolating between neighboring’points’samples. +Acceleration is measured in position units per second-squared. To +convert to position units per squared UsdTimeCode, divide by the +square of UsdStage::GetTimeCodesPerSecond() . +Declaration +vector3f[] accelerations +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray + +GetNormalsAttr() → Attribute +Provide an object-space orientation for individual points, which, +depending on subclass, may define a surface, curve, or free points. +Note that’normals’should not be authored on any Mesh that is +subdivided, since the subdivision algorithm will define its own +normals.’normals’is not a generic primvar, but the number of elements +in this attribute will be determined by its’interpolation’. See +SetNormalsInterpolation() . If’normals’and’primvars:normals’are both +specified, the latter has precedence. +Declaration +normal3f[] normals +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Normal3fArray + +GetNormalsInterpolation() → str +Get the interpolation for the normals attribute. +Although’normals’is not classified as a generic UsdGeomPrimvar (and +will not be included in the results of +UsdGeomPrimvarsAPI::GetPrimvars() ) it does require an interpolation +specification. The fallback interpolation, if left unspecified, is +UsdGeomTokens->vertex, which will generally produce smooth shading on +a polygonal mesh. To achieve partial or fully faceted shading of a +polygonal mesh with normals, one should use UsdGeomTokens->faceVarying +or UsdGeomTokens->uniform interpolation. + +GetPointsAttr() → Attribute +The primary geometry attribute for all PointBased primitives, +describes points in (local) space. +Declaration +point3f[] points +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Point3fArray + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetVelocitiesAttr() → Attribute +If provided,’velocities’should be used by renderers to. +compute positions between samples for the’points’attribute, rather +than interpolating between neighboring’points’samples. This is the +only reasonable means of computing motion blur for topologically +varying PointBased primitives. It follows that the length of +each’velocities’sample must match the length of the +corresponding’points’sample. Velocity is measured in position units +per second, as per most simulation software. To convert to position +units per UsdTimeCode, divide by UsdStage::GetTimeCodesPerSecond() . +See also Applying Timesampled Velocities to Geometry. +Declaration +vector3f[] velocities +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray + +SetNormalsInterpolation(interpolation) → bool +Set the interpolation for the normals attribute. +true upon success, false if interpolation is not a legal value as +defined by UsdGeomPrimvar::IsValidInterpolation() , or if there was a +problem setting the value. No attempt is made to validate that the +normals attr’s value contains the right number of elements to match +its interpolation to its prim’s topology. +GetNormalsInterpolation() + +Parameters +interpolation (str) – + +class pxr.UsdGeom.PointInstancer +Encodes vectorized instancing of multiple, potentially animated, +prototypes (object/instance masters), which can be arbitrary +prims/subtrees on a UsdStage. +PointInstancer is a”multi instancer”, as it allows multiple prototypes +to be scattered among its”points”. We use a UsdRelationship +prototypes to identify and order all of the possible prototypes, by +targeting the root prim of each prototype. The ordering imparted by +relationships associates a zero-based integer with each prototype, and +it is these integers we use to identify the prototype of each +instance, compactly, and allowing prototypes to be swapped out without +needing to reauthor all of the per-instance data. +The PointInstancer schema is designed to scale to billions of +instances, which motivates the choice to split the per-instance +transformation into position, (quaternion) orientation, and scales, +rather than a 4x4 matrix per-instance. In addition to requiring fewer +bytes even if all elements are authored (32 bytes vs 64 for a single- +precision 4x4 matrix), we can also be selective about which attributes +need to animate over time, for substantial data reduction in many +cases. +Note that PointInstancer is not a Gprim, since it is not a graphical +primitive by any stretch of the imagination. It is, however, +Boundable, since we will sometimes want to treat the entire +PointInstancer similarly to a procedural, from the perspective of +inclusion or framing. + +## Varying Instance Identity over Time + +PointInstancers originating from simulations often have the +characteristic that points/instances are”born”, move around for some +time period, and then die (or leave the area of interest). In such +cases, billions of instances may be birthed over time, while at any +specific time, only a much smaller number are actually alive. To +encode this situation efficiently, the simulator may re-use indices in +the instance arrays, when a particle dies, its index will be taken +over by a new particle that may be birthed in a much different +location. This presents challenges both for identity-tracking, and for +motion-blur. +We facilitate identity tracking by providing an optional, animatable +ids attribute, that specifies the 64 bit integer ID of the particle +at each index, at each point in time. If the simulator keeps +monotonically increasing a particle-count each time a new particle is +birthed, it will serve perfectly as particle ids. +We facilitate motion blur for varying-topology particle streams by +optionally allowing per-instance velocities and angularVelocities +to be authored. If instance transforms are requested at a time between +samples and either of the velocity attributes is authored, then we +will not attempt to interpolate samples of positions or +orientations. If not authored, and the bracketing samples have the +same length, then we will interpolate. + +## Computing an Instance Transform + +Each instance’s transformation is a combination of the SRT affine +transform described by its scale, orientation, and position, applied +after (i.e. less locally) than the transformation computed at the +root of the prototype it is instancing. In other words, to put an +instance of a PointInstancer into the space of the PointInstancer’s +parent prim: + +Apply (most locally) the authored transformation for +prototypes[protoIndices[i]] +If scales is authored, next apply the scaling matrix from +scales[i] +If orientations is authored: if *angularVelocities* is +authored, first multiply orientations[i] by the unit quaternion +derived by scaling angularVelocities[i] by the time differential +from the left-bracketing timeSample for orientation to the requested +evaluation time t, storing the result in R, else assign R +directly from orientations[i]. Apply the rotation matrix derived +from R. +Apply the translation derived from positions[i]. If +velocities is authored, apply the translation deriving from +velocities[i] scaled by the time differential from the left- +bracketing timeSample for positions to the requested evaluation time +t. +Least locally, apply the transformation authored on the +PointInstancer prim itself (or the +UsdGeomImageable::ComputeLocalToWorldTransform() of the PointInstancer +to put the instance directly into world space) + +If neither velocities nor angularVelocities are authored, we +fallback to standard position and orientation computation logic (using +linear interpolation between timeSamples) as described by Applying +Timesampled Velocities to Geometry. +Scaling Velocities for Interpolation +When computing time-differentials by which to apply velocity or +angularVelocity to positions or orientations, we must scale by ( 1.0 / +UsdStage::GetTimeCodesPerSecond() ), because velocities are recorded +in units/second, while we are interpolating in UsdTimeCode ordinates. +We provide both high and low-level API’s for dealing with the +transformation as a matrix, both will compute the instance matrices +using multiple threads; the low-level API allows the client to cache +unvarying inputs so that they need not be read duplicately when +computing over time. +See also Applying Timesampled Velocities to Geometry. + +## Primvars on PointInstancer + +Primvars authored on a PointInstancer prim should always be applied to +each instance with constant interpolation at the root of the +instance. When you are authoring primvars on a PointInstancer, think +about it as if you were authoring them on a point-cloud (e.g. a +UsdGeomPoints gprim). The same interpolation rules for points apply +here, substituting”instance”for”point”. +In other words, the (constant) value extracted for each instance from +the authored primvar value depends on the authored interpolation and +elementSize of the primvar, as follows: + +constant or uniform : the entire authored value of the +primvar should be applied exactly to each instance. +varying, vertex, or faceVarying : the first +elementSize elements of the authored primvar array should be +assigned to instance zero, the second elementSize elements should be +assigned to instance one, and so forth. + +## Masking Instances:”Deactivating”and Invising + +Often a PointInstancer is created”upstream”in a graphics pipeline, and +the needs of”downstream”clients necessitate eliminating some of the +instances from further consideration. Accomplishing this pruning by +re-authoring all of the per-instance attributes is not very +attractive, since it may mean destructively editing a large quantity +of data. We therefore provide means of”masking”instances by ID, such +that the instance data is unmolested, but per-instance transform and +primvar data can be retrieved with the no-longer-desired instances +eliminated from the (smaller) arrays. PointInstancer allows two +independent means of masking instances by ID, each with different +features that meet the needs of various clients in a pipeline. Both +pruning features’lists of ID’s are combined to produce the mask +returned by ComputeMaskAtTime() . +If a PointInstancer has no authored ids attribute, the masking +features will still be available, with the integers specifying element +position in the protoIndices array rather than ID. +The first masking feature encodes a list of IDs in a list-editable +metadatum called inactiveIds, which, although it does not have any +similar impact to stage population as prim activation, it shares with +that feature that its application is uniform over all time. Because it +is list-editable, we can sparsely add and remove instances from it +in many layers. +This sparse application pattern makes inactiveIds a good choice when +further downstream clients may need to reverse masking decisions made +upstream, in a manner that is robust to many kinds of future changes +to the upstream data. +See ActivateId() , ActivateIds() , DeactivateId() , DeactivateIds() , +ActivateAllIds() +The second masking feature encodes a list of IDs in a time-varying +Int64Array-valued UsdAttribute called invisibleIds, since it shares +with Imageable visibility the ability to animate object visibility. +Unlike inactiveIds, overriding a set of opinions for invisibleIds +is not at all straightforward, because one will, in general need to +reauthor (in the overriding layer) all timeSamples for the +attribute just to change one Id’s visibility state, so it cannot be +authored sparsely. But it can be a very useful tool for situations +like encoding pre-computed camera-frustum culling of geometry when +either or both of the instances or the camera is animated. +See VisId() , VisIds() , InvisId() , InvisIds() , VisAllIds() + +## Processing and Not Processing Prototypes + +Any prim in the scenegraph can be targeted as a prototype by the +prototypes relationship. We do not, however, provide a specific +mechanism for identifying prototypes as geometry that should not be +drawn (or processed) in their own, local spaces in the scenegraph. We +encourage organizing all prototypes as children of the PointInstancer +prim that consumes them, and pruning”raw”processing and drawing +traversals when they encounter a PointInstancer prim; this is what the +UsdGeomBBoxCache and UsdImaging engines do. +There is a pattern one can deploy for organizing the prototypes such +that they will automatically be skipped by basic +UsdPrim::GetChildren() or UsdPrimRange traversals. Usd prims each have +a specifier of”def”,”over”, or”class”. The default traversals skip +over prims that are”pure overs”or classes. So to protect prototypes +from all generic traversals and processing, place them under a prim +that is just an”over”. For example, +01 def PointInstancer "Crowd_Mid" +02 { +03 rel prototypes = [ , ] +04 +05 over "Prototypes" +06 { +07 def "MaleThin_Business" ( +08 references = [@MaleGroupA/usd/MaleGroupA.usd@] +09 variants = { +10 string modelingVariant = "Thin" +11 string costumeVariant = "BusinessAttire" +12 } +13 ) +14 { \.\.\. } +15 +16 def "MaleThin_Casual" +17 \.\.\. +18 } +19 } + +Classes: + +MaskApplication +Encodes whether to evaluate and apply the PointInstancer's mask to computed results. + +ProtoXformInclusion +Encodes whether to include each prototype's root prim's transformation as the most-local component of computed instance transforms. + +Methods: + +ActivateAllIds() +Ensure that all instances are active over all time. + +ActivateId(id) +Ensure that the instance identified by id is active over all time. + +ActivateIds(ids) +Ensure that the instances identified by ids are active over all time. + +ComputeExtentAtTime(extent, time, baseTime) +Compute the extent of the point instancer based on the per- instance,"PointInstancer relative"transforms at time , as described in Computing an Instance Transform. + +ComputeExtentAtTimes(extents, times, baseTime) +Compute the extent of the point instancer as in ComputeExtentAtTime, but across multiple times . + +ComputeInstanceTransformsAtTime +classmethod ComputeInstanceTransformsAtTime(xforms, time, baseTime, doProtoXforms, applyMask) -> bool + +ComputeInstanceTransformsAtTimes(...) +Compute the per-instance transforms as in ComputeInstanceTransformsAtTime, but using multiple sample times. + +ComputeMaskAtTime(time, ids) +Computes a presence mask to be applied to per-instance data arrays based on authored inactiveIds, invisibleIds, and ids. + +CreateAccelerationsAttr(defaultValue, ...) +See GetAccelerationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateAngularVelocitiesAttr(defaultValue, ...) +See GetAngularVelocitiesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateIdsAttr(defaultValue, writeSparsely) +See GetIdsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateInvisibleIdsAttr(defaultValue, ...) +See GetInvisibleIdsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateOrientationsAttr(defaultValue, ...) +See GetOrientationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePositionsAttr(defaultValue, writeSparsely) +See GetPositionsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProtoIndicesAttr(defaultValue, ...) +See GetProtoIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePrototypesRel() +See GetPrototypesRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateScalesAttr(defaultValue, writeSparsely) +See GetScalesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVelocitiesAttr(defaultValue, writeSparsely) +See GetVelocitiesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +DeactivateId(id) +Ensure that the instance identified by id is inactive over all time. + +DeactivateIds(ids) +Ensure that the instances identified by ids are inactive over all time. + +Define +classmethod Define(stage, path) -> PointInstancer + +Get +classmethod Get(stage, path) -> PointInstancer + +GetAccelerationsAttr() +If authored, per-instance'accelerations'will be used with velocities to compute positions between samples for the'positions'attribute rather than interpolating between neighboring'positions'samples. + +GetAngularVelocitiesAttr() +If authored, per-instance angular velocity vector to be used for interoplating orientations. + +GetIdsAttr() +Ids are optional; if authored, the ids array should be the same length as the protoIndices array, specifying (at each timeSample if instance identities are changing) the id of each instance. + +GetInstanceCount(timeCode) +Returns the number of instances as defined by the size of the protoIndices array at timeCode. + +GetInvisibleIdsAttr() +A list of id's to make invisible at the evaluation time. + +GetOrientationsAttr() +If authored, per-instance orientation of each instance about its prototype's origin, represented as a unit length quaternion, which allows us to encode it with sufficient precision in a compact GfQuath. + +GetPositionsAttr() +Required property. + +GetProtoIndicesAttr() +Required property. + +GetPrototypesRel() +Required property. + +GetScalesAttr() +If authored, per-instance scale to be applied to each instance, before any rotation is applied. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetVelocitiesAttr() +If provided, per-instance'velocities'will be used to compute positions between samples for the'positions'attribute, rather than interpolating between neighboring'positions'samples. + +InvisId(id, time) +Ensure that the instance identified by id is invisible at time + +InvisIds(ids, time) +Ensure that the instances identified by ids are invisible at time . + +VisAllIds(time) +Ensure that all instances are visible at time . + +VisId(id, time) +Ensure that the instance identified by id is visible at time . + +VisIds(ids, time) +Ensure that the instances identified by ids are visible at time . + +Attributes: + +ApplyMask + +ExcludeProtoXform + +IgnoreMask + +IncludeProtoXform + +class MaskApplication +Encodes whether to evaluate and apply the PointInstancer’s mask to +computed results. +ComputeMaskAtTime() +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdGeom.PointInstancer.ApplyMask, UsdGeom.PointInstancer.IgnoreMask) + +class ProtoXformInclusion +Encodes whether to include each prototype’s root prim’s transformation +as the most-local component of computed instance transforms. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdGeom.PointInstancer.IncludeProtoXform, UsdGeom.PointInstancer.ExcludeProtoXform) + +ActivateAllIds() → bool +Ensure that all instances are active over all time. +This does not guarantee that the instances will be rendered, because +each may still be”invisible”due to its presence in the invisibleIds +attribute (see VisId() , InvisId() ) + +ActivateId(id) → bool +Ensure that the instance identified by id is active over all time. +This activation is encoded sparsely, affecting no other instances. +This does not guarantee that the instance will be rendered, because it +may still be”invisible”due to id being present in the +invisibleIds attribute (see VisId() , InvisId() ) + +Parameters +id (int) – + +ActivateIds(ids) → bool +Ensure that the instances identified by ids are active over all +time. +This activation is encoded sparsely, affecting no other instances. +This does not guarantee that the instances will be rendered, because +each may still be”invisible”due to its presence in the invisibleIds +attribute (see VisId() , InvisId() ) + +Parameters +ids (Int64Array) – + +ComputeExtentAtTime(extent, time, baseTime) → bool +Compute the extent of the point instancer based on the per- +instance,”PointInstancer relative”transforms at time , as +described in Computing an Instance Transform. +If there is no error, we return true and extent will be the +tightest bounds we can compute efficiently. If an error occurs, +false will be returned and extent will be left untouched. +For now, this uses a UsdGeomBBoxCache with the”default”,”proxy”, +and”render”purposes. +extent +- the out parameter for the extent. On success, it will contain two +elements representing the min and max. time +- UsdTimeCode at which we want to evaluate the extent baseTime +- required for correct interpolation between samples when velocities +or angularVelocities are present. If there are samples for +positions and velocities at t1 and t2, normal value resolution +would attempt to interpolate between the two samples, and if they +could not be interpolated because they differ in size (common in cases +where velocity is authored), will choose the sample at t1. When +sampling for the purposes of motion-blur, for example, it is common, +when rendering the frame at t2, to sample at [ t2-shutter/2, +t2+shutter/2 ] for a shutter interval of shutter. The first sample +falls between t1 and t2, but we must sample at t2 and apply velocity- +based interpolation based on those samples to get a correct result. In +such scenarios, one should provide a baseTime of t2 when querying +both samples. If your application does not care about off-sample +interpolation, it can supply the same value for baseTime that it +does for time . When baseTime is less than or equal to +time , we will choose the lower bracketing timeSample. + +Parameters + +extent (Vec3fArray) – +time (TimeCode) – +baseTime (TimeCode) – + +ComputeExtentAtTime(extent, time, baseTime, transform) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied. + +Parameters + +extent (Vec3fArray) – +time (TimeCode) – +baseTime (TimeCode) – +transform (Matrix4d) – + +ComputeExtentAtTimes(extents, times, baseTime) → bool +Compute the extent of the point instancer as in ComputeExtentAtTime, +but across multiple times . +This is equivalent to, but more efficient than, calling +ComputeExtentAtTime several times. Each element in extents is the +computed extent at the corresponding time in times . +As in ComputeExtentAtTime, if there is no error, we return true +and extents will be the tightest bounds we can compute +efficiently. If an error occurs computing the extent at any time, +false will be returned and extents will be left untouched. +times +- A vector containing the UsdTimeCodes at which we want to sample. + +Parameters + +extents (list[Vec3fArray]) – +times (list[TimeCode]) – +baseTime (TimeCode) – + +ComputeExtentAtTimes(extents, times, baseTime, transform) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied +at each time. + +Parameters + +extents (list[Vec3fArray]) – +times (list[TimeCode]) – +baseTime (TimeCode) – +transform (Matrix4d) – + +ComputeInstanceTransformsAtTime() +classmethod ComputeInstanceTransformsAtTime(xforms, time, baseTime, doProtoXforms, applyMask) -> bool +Compute the per-instance,”PointInstancer relative”transforms given the +positions, scales, orientations, velocities and angularVelocities at +time , as described in Computing an Instance Transform. +This will return false and leave xforms untouched if: + +xforms is None +one of time and baseTime is numeric and the other is +UsdTimeCode::Default() (they must either both be numeric or both be +default) +there is no authored protoIndices attribute or positions +attribute +the size of any of the per-instance attributes does not match the +size of protoIndices +doProtoXforms is IncludeProtoXform but an index value in +protoIndices is outside the range [0, prototypes.size()) +applyMask is ApplyMask and a mask is set but the size of +the mask does not match the size of protoIndices. + +If there is no error, we will return true and xforms will +contain the computed transformations. +xforms +- the out parameter for the transformations. Its size will depend on +the authored data and applyMask time +- UsdTimeCode at which we want to evaluate the transforms baseTime +- required for correct interpolation between samples when velocities +or angularVelocities are present. If there are samples for +positions and velocities at t1 and t2, normal value resolution +would attempt to interpolate between the two samples, and if they +could not be interpolated because they differ in size (common in cases +where velocity is authored), will choose the sample at t1. When +sampling for the purposes of motion-blur, for example, it is common, +when rendering the frame at t2, to sample at [ t2-shutter/2, +t2+shutter/2 ] for a shutter interval of shutter. The first sample +falls between t1 and t2, but we must sample at t2 and apply velocity- +based interpolation based on those samples to get a correct result. In +such scenarios, one should provide a baseTime of t2 when querying +both samples. If your application does not care about off-sample +interpolation, it can supply the same value for baseTime that it +does for time . When baseTime is less than or equal to +time , we will choose the lower bracketing timeSample. Selecting +sample times with respect to baseTime will be performed independently +for positions and orientations. doProtoXforms +- specifies whether to include the root transformation of each +instance’s prototype in the instance’s transform. Default is to +include it, but some clients may want to apply the proto transform as +part of the prototype itself, so they can specify +ExcludeProtoXform instead. applyMask +- specifies whether to apply ApplyMaskToArray() to the computed +result. The default is ApplyMask . + +Parameters + +xforms (VtArray[Matrix4d]) – +time (TimeCode) – +baseTime (TimeCode) – +doProtoXforms (ProtoXformInclusion) – +applyMask (MaskApplication) – + +ComputeInstanceTransformsAtTime(xforms, stage, time, protoIndices, positions, velocities, velocitiesSampleTime, accelerations, scales, orientations, angularVelocities, angularVelocitiesSampleTime, protoPaths, mask, velocityScale) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Perform the per-instance transform computation as described in +Computing an Instance Transform. +This does the same computation as the non-static +ComputeInstanceTransformsAtTime method, but takes all data as +parameters rather than accessing authored data. +xforms +- the out parameter for the transformations. Its size will depend on +the given data and applyMask stage +- the UsdStage time +- time at which we want to evaluate the transforms protoIndices +- array containing all instance prototype indices. positions +- array containing all instance positions. This array must be the same +size as protoIndices . velocities +- array containing all instance velocities. This array must be either +the same size as protoIndices or empty. If it is empty, transforms +are computed as if all velocities were zero in all dimensions. +velocitiesSampleTime +- time at which the samples from velocities were taken. +accelerations +- array containing all instance accelerations. This array must be +either the same size as protoIndicesor empty. If it is empty, +transforms are computed as if all accelerations were zero in all +dimensions. scales +- array containing all instance scales. This array must be either the +same size as protoIndices or empty. If it is empty, transforms are +computed with no change in scale. orientations +- array containing all instance orientations. This array must be +either the same size as protoIndices or empty. If it is empty, +transforms are computed with no change in orientation +angularVelocities +- array containing all instance angular velocities. This array must be +either the same size as protoIndices or empty. If it is empty, +transforms are computed as if all angular velocities were zero in all +dimensions. angularVelocitiesSampleTime +- time at which the samples from angularVelocities were taken. +protoPaths +- array containing the paths for all instance prototypes. If this +array is not empty, prototype transforms are applied to the instance +transforms. mask +- vector containing a mask to apply to the computed result. This +vector must be either the same size as protoIndices or empty. If +it is empty, no mask is applied. velocityScale +- Deprecated + +Parameters + +xforms (VtArray[Matrix4d]) – +stage (UsdStageWeak) – +time (TimeCode) – +protoIndices (IntArray) – +positions (Vec3fArray) – +velocities (Vec3fArray) – +velocitiesSampleTime (TimeCode) – +accelerations (Vec3fArray) – +scales (Vec3fArray) – +orientations (QuathArray) – +angularVelocities (Vec3fArray) – +angularVelocitiesSampleTime (TimeCode) – +protoPaths (list[SdfPath]) – +mask (list[bool]) – +velocityScale (float) – + +ComputeInstanceTransformsAtTimes(xformsArray, times, baseTime, doProtoXforms, applyMask) → bool +Compute the per-instance transforms as in +ComputeInstanceTransformsAtTime, but using multiple sample times. +An array of matrix arrays is returned where each matrix array contains +the instance transforms for the corresponding time in times . +times +- A vector containing the UsdTimeCodes at which we want to sample. + +Parameters + +xformsArray (list[VtArray[Matrix4d]]) – +times (list[TimeCode]) – +baseTime (TimeCode) – +doProtoXforms (ProtoXformInclusion) – +applyMask (MaskApplication) – + +ComputeMaskAtTime(time, ids) → list[bool] +Computes a presence mask to be applied to per-instance data arrays +based on authored inactiveIds, invisibleIds, and ids. +If no ids attribute has been authored, then the values in +inactiveIds and invisibleIds will be interpreted directly as +indices of protoIndices. +If ids is non-None, it is assumed to be the id-mapping to apply, +and must match the length of protoIndices at time . If None, we +will call GetIdsAttr() .Get(time) +If all”live”instances at UsdTimeCode time pass the mask, we will +return an empty mask so that clients can trivially recognize the +common”no masking”case. The returned mask can be used with +ApplyMaskToArray() , and will contain a true value for every +element that should survive. + +Parameters + +time (TimeCode) – +ids (Int64Array) – + +CreateAccelerationsAttr(defaultValue, writeSparsely) → Attribute +See GetAccelerationsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateAngularVelocitiesAttr(defaultValue, writeSparsely) → Attribute +See GetAngularVelocitiesAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateIdsAttr(defaultValue, writeSparsely) → Attribute +See GetIdsAttr() , and also Create vs Get Property Methods for when to +use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateInvisibleIdsAttr(defaultValue, writeSparsely) → Attribute +See GetInvisibleIdsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateOrientationsAttr(defaultValue, writeSparsely) → Attribute +See GetOrientationsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePositionsAttr(defaultValue, writeSparsely) → Attribute +See GetPositionsAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateProtoIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetProtoIndicesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePrototypesRel() → Relationship +See GetPrototypesRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreateScalesAttr(defaultValue, writeSparsely) → Attribute +See GetScalesAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVelocitiesAttr(defaultValue, writeSparsely) → Attribute +See GetVelocitiesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +DeactivateId(id) → bool +Ensure that the instance identified by id is inactive over all +time. +This deactivation is encoded sparsely, affecting no other instances. +A deactivated instance is guaranteed not to render if the renderer +honors masking. + +Parameters +id (int) – + +DeactivateIds(ids) → bool +Ensure that the instances identified by ids are inactive over all +time. +This deactivation is encoded sparsely, affecting no other instances. +A deactivated instance is guaranteed not to render if the renderer +honors masking. + +Parameters +ids (Int64Array) – + +static Define() +classmethod Define(stage, path) -> PointInstancer +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> PointInstancer +Return a UsdGeomPointInstancer holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomPointInstancer(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAccelerationsAttr() → Attribute +If authored, per-instance’accelerations’will be used with velocities +to compute positions between samples for the’positions’attribute +rather than interpolating between neighboring’positions’samples. +Acceleration is measured in position units per second-squared. To +convert to position units per squared UsdTimeCode, divide by the +square of UsdStage::GetTimeCodesPerSecond() . +Declaration +vector3f[] accelerations +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray + +GetAngularVelocitiesAttr() → Attribute +If authored, per-instance angular velocity vector to be used for +interoplating orientations. +Angular velocities should be considered mandatory if both +protoIndices and orientations are animated. Angular velocity is +measured in degrees per second. To convert to degrees per +UsdTimeCode, divide by UsdStage::GetTimeCodesPerSecond() . +See also Computing an Instance Transform. +Declaration +vector3f[] angularVelocities +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray + +GetIdsAttr() → Attribute +Ids are optional; if authored, the ids array should be the same length +as the protoIndices array, specifying (at each timeSample if +instance identities are changing) the id of each instance. +The type is signed intentionally, so that clients can encode some +binary state on Id’d instances without adding a separate primvar. See +also Varying Instance Identity over Time +Declaration +int64[] ids +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Int64Array + +GetInstanceCount(timeCode) → int +Returns the number of instances as defined by the size of the +protoIndices array at timeCode. +For most code, this check will be performant. When using file formats +where the cost of attribute reading is high and the time sampled array +will be read into memory later, it may be better to explicitly read +the value once and check the size of the array directly. +GetProtoIndicesAttr() + +Parameters +timeCode (TimeCode) – + +GetInvisibleIdsAttr() → Attribute +A list of id’s to make invisible at the evaluation time. +See invisibleIds: Animatable Masking. +Declaration +int64[] invisibleIds = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Int64Array + +GetOrientationsAttr() → Attribute +If authored, per-instance orientation of each instance about its +prototype’s origin, represented as a unit length quaternion, which +allows us to encode it with sufficient precision in a compact GfQuath. +It is client’s responsibility to ensure that authored quaternions are +unit length; the convenience API below for authoring orientations from +rotation matrices will ensure that quaternions are unit length, though +it will not make any attempt to select the”better (for +interpolationwith respect to neighboring samples)”of the two possible +quaternions that encode the rotation. +See also Computing an Instance Transform. +Declaration +quath[] orientations +C++ Type +VtArray +Usd Type +SdfValueTypeNames->QuathArray + +GetPositionsAttr() → Attribute +Required property. +Per-instance position. See also Computing an Instance Transform. +Declaration +point3f[] positions +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Point3fArray + +GetProtoIndicesAttr() → Attribute +Required property. +Per-instance index into prototypes relationship that identifies what +geometry should be drawn for each instance. Topology attribute - +can be animated, but at a potential performance impact for streaming. +Declaration +int[] protoIndices +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetPrototypesRel() → Relationship +Required property. +Orders and targets the prototype root prims, which can be located +anywhere in the scenegraph that is convenient, although we promote +organizing prototypes as children of the PointInstancer. The position +of a prototype in this relationship defines the value an instance +would specify in the protoIndices attribute to instance that +prototype. Since relationships are uniform, this property cannot be +animated. + +GetScalesAttr() → Attribute +If authored, per-instance scale to be applied to each instance, before +any rotation is applied. +See also Computing an Instance Transform. +Declaration +float3[] scales +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetVelocitiesAttr() → Attribute +If provided, per-instance’velocities’will be used to compute positions +between samples for the’positions’attribute, rather than interpolating +between neighboring’positions’samples. +Velocities should be considered mandatory if both protoIndices and +positions are animated. Velocity is measured in position units per +second, as per most simulation software. To convert to position units +per UsdTimeCode, divide by UsdStage::GetTimeCodesPerSecond() . +See also Computing an Instance Transform, Applying Timesampled +Velocities to Geometry. +Declaration +vector3f[] velocities +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray + +InvisId(id, time) → bool +Ensure that the instance identified by id is invisible at time +. +This will cause invisibleIds to first be broken down (keyed) at +time , causing all animation in weaker layers that the current +UsdEditTarget to be overridden. Has no effect on any timeSamples other +than the one at time . +An invised instance is guaranteed not to render if the renderer honors +masking. + +Parameters + +id (int) – +time (TimeCode) – + +InvisIds(ids, time) → bool +Ensure that the instances identified by ids are invisible at +time . +This will cause invisibleIds to first be broken down (keyed) at +time , causing all animation in weaker layers that the current +UsdEditTarget to be overridden. Has no effect on any timeSamples other +than the one at time . +An invised instance is guaranteed not to render if the renderer honors +masking. + +Parameters + +ids (Int64Array) – +time (TimeCode) – + +VisAllIds(time) → bool +Ensure that all instances are visible at time . +Operates by authoring an empty array at time . +This does not guarantee that the instances will be rendered, because +each may still be”inactive”due to its id being present in the +inactivevIds metadata (see ActivateId() , DeactivateId() ) + +Parameters +time (TimeCode) – + +VisId(id, time) → bool +Ensure that the instance identified by id is visible at time . +This will cause invisibleIds to first be broken down (keyed) at +time , causing all animation in weaker layers that the current +UsdEditTarget to be overridden. Has no effect on any timeSamples other +than the one at time . If the invisibleIds attribute is not +authored or is blocked, this operation is a no-op. +This does not guarantee that the instance will be rendered, because it +may still be”inactive”due to id being present in the +inactivevIds metadata (see ActivateId() , DeactivateId() ) + +Parameters + +id (int) – +time (TimeCode) – + +VisIds(ids, time) → bool +Ensure that the instances identified by ids are visible at +time . +This will cause invisibleIds to first be broken down (keyed) at +time , causing all animation in weaker layers that the current +UsdEditTarget to be overridden. Has no effect on any timeSamples other +than the one at time . If the invisibleIds attribute is not +authored or is blocked, this operation is a no-op. +This does not guarantee that the instances will be rendered, because +each may still be”inactive”due to id being present in the +inactivevIds metadata (see ActivateId() , DeactivateId() ) + +Parameters + +ids (Int64Array) – +time (TimeCode) – + +ApplyMask = UsdGeom.PointInstancer.ApplyMask + +ExcludeProtoXform = UsdGeom.PointInstancer.ExcludeProtoXform + +IgnoreMask = UsdGeom.PointInstancer.IgnoreMask + +IncludeProtoXform = UsdGeom.PointInstancer.IncludeProtoXform + +class pxr.UsdGeom.Points +Points are analogous to the RiPoints spec. +Points can be an efficient means of storing and rendering particle +effects comprised of thousands or millions of small particles. Points +generally receive a single shading sample each, which should take +normals into account, if present. +While not technically UsdGeomPrimvars, the widths and normals also +have interpolation metadata. It’s common for authored widths and +normals to have constant or varying interpolation. +Methods: + +ComputeExtent +classmethod ComputeExtent(points, widths, extent) -> bool + +CreateIdsAttr(defaultValue, writeSparsely) +See GetIdsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateWidthsAttr(defaultValue, writeSparsely) +See GetWidthsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Points + +Get +classmethod Get(stage, path) -> Points + +GetIdsAttr() +Ids are optional; if authored, the ids array should be the same length as the points array, specifying (at each timesample if point identities are changing) the id of each point. + +GetPointCount(timeCode) +Returns the number of points as defined by the size of the points array at timeCode. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetWidthsAttr() +Widths are defined as the diameter of the points, in object space. + +GetWidthsInterpolation() +Get the interpolation for the widths attribute. + +SetWidthsInterpolation(interpolation) +Set the interpolation for the widths attribute. + +static ComputeExtent() +classmethod ComputeExtent(points, widths, extent) -> bool +Compute the extent for the point cloud defined by points and widths. +true upon success, false if widths and points are different sized +arrays. On success, extent will contain the axis-aligned bounding box +of the point cloud defined by points with the given widths. +This function is to provide easy authoring of extent for usd authoring +tools, hence it is static and acts outside a specific prim (as in +attribute based methods). + +Parameters + +points (Vec3fArray) – +widths (FloatArray) – +extent (Vec3fArray) – + +ComputeExtent(points, widths, transform, extent) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the extent as if the matrix transform was first applied. + +Parameters + +points (Vec3fArray) – +widths (FloatArray) – +transform (Matrix4d) – +extent (Vec3fArray) – + +CreateIdsAttr(defaultValue, writeSparsely) → Attribute +See GetIdsAttr() , and also Create vs Get Property Methods for when to +use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateWidthsAttr(defaultValue, writeSparsely) → Attribute +See GetWidthsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Points +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Points +Return a UsdGeomPoints holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomPoints(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetIdsAttr() → Attribute +Ids are optional; if authored, the ids array should be the same length +as the points array, specifying (at each timesample if point +identities are changing) the id of each point. +The type is signed intentionally, so that clients can encode some +binary state on Id’d points without adding a separate primvar. +Declaration +int64[] ids +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Int64Array + +GetPointCount(timeCode) → int +Returns the number of points as defined by the size of the points +array at timeCode. +For most code, this check will be performant. When using file formats +where the cost of attribute reading is high and the time sampled array +will be read into memory later, it may be better to explicitly read +the value once and check the size of the array directly. +GetPointsAttr() + +Parameters +timeCode (TimeCode) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetWidthsAttr() → Attribute +Widths are defined as the diameter of the points, in object space. +‘widths’is not a generic Primvar, but the number of elements in this +attribute will be determined by its’interpolation’. See +SetWidthsInterpolation() . If’widths’and’primvars:widths’are both +specified, the latter has precedence. +Declaration +float[] widths +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetWidthsInterpolation() → str +Get the interpolation for the widths attribute. +Although’widths’is not classified as a generic UsdGeomPrimvar (and +will not be included in the results of +UsdGeomPrimvarsAPI::GetPrimvars() ) it does require an interpolation +specification. The fallback interpolation, if left unspecified, is +UsdGeomTokens->vertex, which means a width value is specified for each +point. + +SetWidthsInterpolation(interpolation) → bool +Set the interpolation for the widths attribute. +true upon success, false if interpolation is not a legal value as +defined by UsdPrimvar::IsValidInterpolation(), or if there was a +problem setting the value. No attempt is made to validate that the +widths attr’s value contains the right number of elements to match its +interpolation to its prim’s topology. +GetWidthsInterpolation() + +Parameters +interpolation (str) – + +class pxr.UsdGeom.Primvar +Schema wrapper for UsdAttribute for authoring and introspecting +attributes that are primvars. +UsdGeomPrimvar provides API for authoring and retrieving the +additional data required to encode an attribute as a”Primvar”, which +is a convenient contraction of RenderMan’s”Primitive Variable”concept, +which is represented in Alembic as”arbitrary geometry +parameters”(arbGeomParams). +This includes the attribute’s interpolation across the primitive +(which RenderMan refers to as its class specifier and Alembic as its +“geometry scope” ); it also includes the attribute’s elementSize, +which states how many values in the value array must be aggregated for +each element on the primitive. An attribute’s TypeName also factors +into the encoding of Primvar. + +## What is the Purpose of a Primvar? + +There are three key aspects of Primvar identity: + +Primvars define a value that can vary across the primitive on +which they are defined, via prescribed interpolation rules +Taken collectively on a prim, its Primvars describe the”per- +primitiveoverrides”to the material to which the prim is bound. +Different renderers may communicate the variables to the shaders using +different mechanisms over which Usd has no control; Primvars simply +provide the classification that any renderer should use to locate +potential overrides. Do please note that primvars override parameters +on UsdShadeShader objects, not Interface Attributes on +UsdShadeMaterial prims. +Primvars inherit down scene namespace. Regular USD attributes +only apply to the prim on which they are specified, but primvars +implicitly also apply to any child prims, unless those child prims +have their own opinions about those primvars. This capability +necessarily entails added cost to check for inherited values, but the +benefit is that it allows concise encoding of certain opinions that +broadly affect large amounts of geometry. See +UsdGeomImageable::FindInheritedPrimvars(). + +## Creating and Accessing Primvars + +The UsdGeomPrimvarsAPI schema provides a complete interface for +creating and querying prims for primvars. +The only way to create a new Primvar in scene description is by +calling UsdGeomPrimvarsAPI::CreatePrimvar() . One +cannot”enhance”or”promote”an already existing attribute into a +Primvar, because doing so may require a namespace edit to rename the +attribute, which cannot, in general, be done within a single +UsdEditContext. Instead, create a new UsdGeomPrimvar of the desired +name using UsdGeomPrimvarsAPI::CreatePrimvar() , and then copy the +existing attribute onto the new UsdGeomPrimvar. +Primvar names can contain arbitrary sub-namespaces. The behavior of +UsdGeomImageable::GetPrimvar(TfToken const & name) is to +prepend”primvars:”onto’name’if it is not already a prefix, and return +the result, which means we do not have any ambiguity between the +primvars”primvars:nsA:foo”and”primvars:nsB:foo”. There are reserved +keywords that may not be used as the base names of primvars, and +attempting to create Primvars of these names will result in a coding +error. The reserved keywords are tokens the Primvar uses internally to +encode various features, such as the”indices”keyword used by Indexed +Primvars. +If a client wishes to access an already-extant attribute as a Primvar, +(which may or may not actually be valid Primvar), they can use the +speculative constructor; typically, a primvar is only”interesting”if +it additionally provides a value. This might look like: +UsdGeomPrimvar primvar = UsdGeomPrimvar(usdAttr); +if (primvar.HasValue()) { + VtValue values; + primvar.Get(&values, timeCode); + TfToken interpolation = primvar.GetInterpolation(); + int elementSize = primvar.GetElementSize(); + \.\.\. +} + +or, because Get() returns true if and only if it found a value: +UsdGeomPrimvar primvar = UsdGeomPrimvar(usdAttr); +VtValue values; +if (primvar.Get(&values, timeCode)) { + TfToken interpolation = primvar.GetInterpolation(); + int elementSize = primvar.GetElementSize(); + \.\.\. +} + +As discussed in greater detail in Indexed Primvars, primvars can +optionally contain a (possibly time-varying) indexing attribute that +establishes a sharing topology for elements of the primvar. Consumers +can always chose to ignore the possibility of indexed data by +exclusively using the ComputeFlattened() API. If a client wishes to +preserve indexing in their processing of a primvar, we suggest a +pattern like the following, which accounts for the fact that a +stronger layer can block a primvar’s indexing from a weaker layer, via +UsdGeomPrimvar::BlockIndices() : +VtValue values; +VtIntArray indices; + +if (primvar.Get(&values, timeCode)){ + if (primvar.GetIndices(&indices, timeCode)){ + // primvar is indexed: validate/process values and indices together + } + else { + // primvar is not indexed: validate/process values as flat array + } +} + +UsdGeomPrimvar presents a small slice of the UsdAttribute API - enough +to extract the data that comprises the”Declaration info”, and get/set +of the attribute value. A UsdGeomPrimvar also auto-converts to +UsdAttribute, so you can pass a UsdGeomPrimvar to any function that +accepts a UsdAttribute or const-ref thereto. + +## Primvar Allowed Scene Description Types and Plurality + +There are no limitations imposed on the allowable scene description +types for Primvars; it is the responsibility of each consuming client +to perform renderer-specific conversions, if need be (the USD +distribution will include reference RenderMan conversion utilities). +A note about type plurality of Primvars: It is legitimate for a +Primvar to be of scalar or array type, and again, consuming clients +must be prepared to accommodate both. However, while it is not +possible, in all cases, for USD to prevent one from changing the +type of an attribute in different layers or variants of an asset, it +is never a good idea to do so. This is relevant because, except in a +few special cases, it is not possible to encode an interpolation of +any value greater than constant without providing multiple (i.e. +array) data values. Therefore, if there is any possibility that +downstream clients might need to change a Primvar’s interpolation, the +Primvar-creator should encode it as an array rather than a scalar. +Why allow scalar values at all, then? First, sometimes it brings +clarity to (use of) a shader’s API to acknowledge that some parameters +are meant to be single-valued over a shaded primitive. Second, many +DCC’s provide far richer affordances for editing scalars than they do +array values, and we feel it is safer to let the content creator make +the decision/tradeoff of which kind of flexibility is more relevant, +rather than leaving it to an importer/exporter pair to interpret. +Also, like all attributes, Primvars can be time-sampled, and values +can be authored and consumed just as any other attribute. There is +currently no validation that the length of value arrays matches to the +size required by a gprim’s topology, interpolation, and elementSize. +For consumer convenience, we provide GetDeclarationInfo() , which +returns all the type information (other than topology) needed to +compute the required array size, which is also all the information +required to prepare the Primvar’s value for consumption by a renderer. + +## Lifetime Management and Primvar Validity + +UsdGeomPrimvar has an explicit bool operator that validates that the +attribute IsDefined() and thus valid for querying and authoring values +and metadata. This is a fairly expensive query that we do not +cache, so if client code retains UsdGeomPrimvar objects, it should +manage its object validity closely, for performance. An ideal pattern +is to listen for UsdNotice::StageContentsChanged notifications, and +revalidate/refetch its retained UsdGeomPrimvar s only then, and +otherwise use them without validity checking. + +## Interpolation of Geometric Primitive Variables + +In the following explanation of the meaning of the various +kinds/levels of Primvar interpolation, each bolded bullet gives the +name of the token in UsdGeomTokens that provides the value. So to set +a Primvar’s interpolation to”varying”, one would: +primvar.SetInterpolation(UsdGeomTokens->varying); + +Reprinted and adapted from the RPS documentation, which contains +further details, interpolation describes how the Primvar will be +interpolated over the uv parameter space of a surface primitive (or +curve or pointcloud). The possible values are: + +constant One value remains constant over the entire surface +primitive. +uniform One value remains constant for each uv patch segment +of the surface primitive (which is a face for meshes). +varying Four values are interpolated over each uv patch +segment of the surface. Bilinear interpolation is used for +interpolation between the four values. +vertex Values are interpolated between each vertex in the +surface primitive. The basis function of the surface is used for +interpolation between vertices. +faceVarying For polygons and subdivision surfaces, four +values are interpolated over each face of the mesh. Bilinear +interpolation is used for interpolation between the four values. + +## UsdGeomPrimvar As Example of Attribute Schema + +Just as UsdSchemaBase and its subclasses provide the pattern for how +to layer schema onto the generic UsdPrim object, UsdGeomPrimvar +provides an example of how to layer schema onto a generic UsdAttribute +object. In both cases, the schema object wraps and contains the +UsdObject. + +## Primvar Namespace Inheritance + +Constant interpolation primvar values can be inherited down namespace. +That is, a primvar value set on a prim will also apply to any child +prims, unless those children have their own opinions about those named +primvars. For complete details on how primvars inherit, see +usdGeom_PrimvarInheritance. +UsdGeomImageable::FindInheritablePrimvars(). +Methods: + +BlockIndices() +Block the indices that were previously set. + +ComputeFlattened +classmethod ComputeFlattened(value, time) -> bool + +CreateIndicesAttr() +Returns the existing indices attribute if the primvar is indexed or creates a new one. + +Get(value, time) +Get the attribute value of the Primvar at time . + +GetAttr() +Explicit UsdAttribute extractor. + +GetBaseName() +UsdAttribute::GetBaseName() + +GetDeclarationInfo(name, typeName, ...) +Convenience function for fetching all information required to properly declare this Primvar. + +GetElementSize() +Return the"element size"for this Primvar, which is 1 if unauthored. + +GetIndices(indices, time) +Returns the value of the indices array associated with the indexed primvar at time . + +GetIndicesAttr() +Returns a valid indices attribute if the primvar is indexed. + +GetInterpolation() +Return the Primvar's interpolation, which is UsdGeomTokens->constant if unauthored. + +GetName() +UsdAttribute::GetName() + +GetNamespace() +UsdAttribute::GetNamespace() + +GetPrimvarName() +Returns the primvar's name, devoid of the"primvars:"namespace. + +GetTimeSamples(times) +Populates a vector with authored sample times for this primvar. + +GetTimeSamplesInInterval(interval, times) +Populates a vector with authored sample times in interval . + +GetTypeName() +UsdAttribute::GetTypeName() + +GetUnauthoredValuesIndex() +Returns the index that represents unauthored values in the indices array. + +HasAuthoredElementSize() +Has elementSize been explicitly authored on this Primvar? + +HasAuthoredInterpolation() +Has interpolation been explicitly authored on this Primvar? + +HasAuthoredValue() +Return true if the underlying attribute has an unblocked, authored value. + +HasValue() +Return true if the underlying attribute has a value, either from authored scene description or a fallback. + +IsDefined() +Return true if the underlying UsdAttribute::IsDefined() , and in addition the attribute is identified as a Primvar. + +IsIdTarget() +Returns true if the primvar is an Id primvar. + +IsIndexed() +Returns true if the primvar is indexed, i.e., if it has an associated"indices"attribute. + +IsPrimvar +classmethod IsPrimvar(attr) -> bool + +IsValidInterpolation +classmethod IsValidInterpolation(interpolation) -> bool + +IsValidPrimvarName +classmethod IsValidPrimvarName(name) -> bool + +NameContainsNamespaces() +Does this primvar contain any namespaces other than the"primvars:"namespace? + +Set(value, time) +Set the attribute value of the Primvar at time . + +SetElementSize(eltSize) +Set the elementSize for this Primvar. + +SetIdTarget(path) +This primvar must be of String or StringArray type for this method to succeed. + +SetIndices(indices, time) +Sets the indices value of the indexed primvar at time . + +SetInterpolation(interpolation) +Set the Primvar's interpolation. + +SetUnauthoredValuesIndex(unauthoredValuesIndex) +Set the index that represents unauthored values in the indices array. + +SplitName() +UsdAttribute::SplitName() + +StripPrimvarsName +classmethod StripPrimvarsName(name) -> str + +ValueMightBeTimeVarying() +Return true if it is possible, but not certain, that this primvar's value changes over time, false otherwise. + +BlockIndices() → None +Block the indices that were previously set. +This effectively makes an indexed primvar no longer indexed. This is +useful when overriding an existing primvar. + +ComputeFlattened() +classmethod ComputeFlattened(value, time) -> bool +Computes the flattened value of the primvar at time . +If the primvar is not indexed or if the value type of this primvar is +a scalar, this returns the authored value, which is the same as Get() +. Hence, it’s safe to call ComputeFlattened() on non-indexed primvars. + +Parameters + +value (VtArray[ScalarType]) – +time (TimeCode) – + +ComputeFlattened(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the flattened value of the primvar at time as a VtValue. +If the primvar is not indexed or if the value type of this primvar is +a scalar, this returns the authored value, which is the same as Get() +. Hence, it’s safe to call ComputeFlattened() on non-indexed primvars. + +Parameters + +value (VtValue) – +time (TimeCode) – + +ComputeFlattened(value, attrVal, indices, errString) -> bool +Computes the flattened value of attrValue given indices . +This method is a static convenience function that performs the main +work of ComputeFlattened above without needing an instance of a +UsdGeomPrimvar. +Returns false if the value contained in attrVal is not a +supported type for flattening. Otherwise returns true . The output +errString variable may be populated with an error string if an +error is encountered during flattening. + +Parameters + +value (VtValue) – +attrVal (VtValue) – +indices (IntArray) – +errString (str) – + +CreateIndicesAttr() → Attribute +Returns the existing indices attribute if the primvar is indexed or +creates a new one. + +Get(value, time) → bool +Get the attribute value of the Primvar at time . +Usd_Handling_Indexed_Primvars for proper handling of indexed primvars + +Parameters + +value (T) – +time (TimeCode) – + +Get(value, time) -> bool + +Parameters + +value (str) – +time (TimeCode) – + +Get(value, time) -> bool + +Parameters + +value (StringArray) – +time (TimeCode) – + +Get(value, time) -> bool + +Parameters + +value (VtValue) – +time (TimeCode) – + +GetAttr() → Attribute +Explicit UsdAttribute extractor. + +GetBaseName() → str +UsdAttribute::GetBaseName() + +GetDeclarationInfo(name, typeName, interpolation, elementSize) → None +Convenience function for fetching all information required to properly +declare this Primvar. +The name returned is the”client name”, stripped of +the”primvars”namespace, i.e. equivalent to GetPrimvarName() +May also be more efficient than querying key individually. + +Parameters + +name (str) – +typeName (ValueTypeName) – +interpolation (str) – +elementSize (int) – + +GetElementSize() → int +Return the”element size”for this Primvar, which is 1 if unauthored. +If this Primvar’s type is not an array type, (e.g.”Vec3f[]”), then +elementSize is irrelevant. +ElementSize does not generally encode the length of an array-type +primvar, and rarely needs to be authored. ElementSize can be thought +of as a way to create an”aggregate interpolatable type”, by dictating +how many consecutive elements in the value array should be taken as an +atomic element to be interpolated over a gprim. +For example, spherical harmonics are often represented as a collection +of nine floating-point coefficients, and the coefficients need to be +sampled across a gprim’s surface: a perfect case for primvars. +However, USD has no float9 datatype. But we can communicate the +aggregation of nine floats successfully to renderers by declaring a +simple float-array valued primvar, and setting its elementSize to 9. +To author a uniform spherical harmonic primvar on a Mesh of 42 +faces, the primvar’s array value would contain 9*42 = 378 float +elements. + +GetIndices(indices, time) → bool +Returns the value of the indices array associated with the indexed +primvar at time . +SetIndices() , Proper Client Handling of”Indexed”Primvars + +Parameters + +indices (IntArray) – +time (TimeCode) – + +GetIndicesAttr() → Attribute +Returns a valid indices attribute if the primvar is indexed. +Returns an invalid attribute otherwise. + +GetInterpolation() → str +Return the Primvar’s interpolation, which is UsdGeomTokens->constant +if unauthored. +Interpolation determines how the Primvar interpolates over a geometric +primitive. See Interpolation of Geometric Primitive Variables + +GetName() → str +UsdAttribute::GetName() + +GetNamespace() → str +UsdAttribute::GetNamespace() + +GetPrimvarName() → str +Returns the primvar’s name, devoid of the”primvars:”namespace. +This is the name by which clients should refer to the primvar, if not +by its full attribute name - i.e. they should not, in general, use +GetBaseName() . In the error condition in which this Primvar object is +not backed by a properly namespaced UsdAttribute, return an empty +TfToken. + +GetTimeSamples(times) → bool +Populates a vector with authored sample times for this primvar. +Returns false on error. +This considers any timeSamples authored on the +associated”indices”attribute if the primvar is indexed. +UsdAttribute::GetTimeSamples + +Parameters +times (list[float]) – + +GetTimeSamplesInInterval(interval, times) → bool +Populates a vector with authored sample times in interval . +This considers any timeSamples authored on the +associated”indices”attribute if the primvar is indexed. +UsdAttribute::GetTimeSamplesInInterval + +Parameters + +interval (Interval) – +times (list[float]) – + +GetTypeName() → ValueTypeName +UsdAttribute::GetTypeName() + +GetUnauthoredValuesIndex() → int +Returns the index that represents unauthored values in the indices +array. +SetUnauthoredValuesIndex() + +HasAuthoredElementSize() → bool +Has elementSize been explicitly authored on this Primvar? +GetElementSize() + +HasAuthoredInterpolation() → bool +Has interpolation been explicitly authored on this Primvar? +GetInterpolationSize() + +HasAuthoredValue() → bool +Return true if the underlying attribute has an unblocked, authored +value. + +HasValue() → bool +Return true if the underlying attribute has a value, either from +authored scene description or a fallback. + +IsDefined() → bool +Return true if the underlying UsdAttribute::IsDefined() , and in +addition the attribute is identified as a Primvar. +Does not imply that the primvar provides a value + +IsIdTarget() → bool +Returns true if the primvar is an Id primvar. +UsdGeomPrimvar_Id_primvars + +IsIndexed() → bool +Returns true if the primvar is indexed, i.e., if it has an +associated”indices”attribute. +If you are going to query the indices anyways, prefer to simply +consult the return-value of GetIndices() , which will be more +efficient. + +static IsPrimvar() +classmethod IsPrimvar(attr) -> bool +Test whether a given UsdAttribute represents valid Primvar, which +implies that creating a UsdGeomPrimvar from the attribute will +succeed. +Success implies that attr.IsDefined() is true. + +Parameters +attr (Attribute) – + +static IsValidInterpolation() +classmethod IsValidInterpolation(interpolation) -> bool +Validate that the provided interpolation is a valid setting for +interpolation as defined by Interpolation of Geometric Primitive +Variables. + +Parameters +interpolation (str) – + +static IsValidPrimvarName() +classmethod IsValidPrimvarName(name) -> bool +Test whether a given name represents a valid name of a primvar, +which implies that creating a UsdGeomPrimvar with the given name will +succeed. + +Parameters +name (str) – + +NameContainsNamespaces() → bool +Does this primvar contain any namespaces other than +the”primvars:”namespace? +Some clients may only wish to consume primvars that have no extra +namespaces in their names, for ease of translating to other systems +that do not allow namespaces. + +Set(value, time) → bool +Set the attribute value of the Primvar at time . + +Parameters + +value (T) – +time (TimeCode) – + +SetElementSize(eltSize) → bool +Set the elementSize for this Primvar. +Errors and returns false if eltSize less than 1. +GetElementSize() + +Parameters +eltSize (int) – + +SetIdTarget(path) → bool +This primvar must be of String or StringArray type for this method to +succeed. +If not, a coding error is raised. +UsdGeomPrimvar_Id_primvars + +Parameters +path (Path) – + +SetIndices(indices, time) → bool +Sets the indices value of the indexed primvar at time . +The values in the indices array must be valid indices into the +authored array returned by Get() . The element numerality of the +primvar’s’interpolation’metadata applies to the”indices”array, not the +attribute value array (returned by Get() ). + +Parameters + +indices (IntArray) – +time (TimeCode) – + +SetInterpolation(interpolation) → bool +Set the Primvar’s interpolation. +Errors and returns false if interpolation is out of range as +defined by IsValidInterpolation() . No attempt is made to validate +that the Primvar’s value contains the right number of elements to +match its interpolation to its topology. +GetInterpolation() , Interpolation of Geometric Primitive Variables + +Parameters +interpolation (str) – + +SetUnauthoredValuesIndex(unauthoredValuesIndex) → bool +Set the index that represents unauthored values in the indices array. +Some apps (like Maya) allow you to author primvars sparsely over a +surface. Since most apps can’t handle sparse primvars, Maya needs to +provide a value even for the elements it didn’t author. This metadatum +provides a way to recover the information in apps that do support +sparse authoring / representation of primvars. +The fallback value of unauthoredValuesIndex is -1, which indicates +that there are no unauthored values. +GetUnauthoredValuesIndex() + +Parameters +unauthoredValuesIndex (int) – + +SplitName() → list[str] +UsdAttribute::SplitName() + +static StripPrimvarsName() +classmethod StripPrimvarsName(name) -> str +Returns the name , devoid of the”primvars:”token if present, +otherwise returns the name unchanged. + +Parameters +name (str) – + +ValueMightBeTimeVarying() → bool +Return true if it is possible, but not certain, that this primvar’s +value changes over time, false otherwise. +This considers time-varyingness of the associated”indices”attribute if +the primvar is indexed. +UsdAttribute::ValueMightBeTimeVarying + +class pxr.UsdGeom.PrimvarsAPI +UsdGeomPrimvarsAPI encodes geometric”primitive variables”, as +UsdGeomPrimvar, which interpolate across a primitive’s topology, can +override shader inputs, and inherit down namespace. + +## Which Method to Use to Retrieve Primvars + +While creating primvars is unambiguous ( CreatePrimvar() ), there are +quite a few methods available for retrieving primvars, making it +potentially confusing knowing which one to use. Here are some +guidelines: + +If you are populating a GUI with the primvars already available +for authoring values on a prim, use GetPrimvars() . +If you want all of the”useful”(e.g. to a renderer) primvars +available at a prim, including those inherited from ancestor prims, +use FindPrimvarsWithInheritance() . Note that doing so individually +for many prims will be inefficient. +To find a particular primvar defined directly on a prim, which +may or may not provide a value, use GetPrimvar() . +To find a particular primvar defined on a prim or inherited from +ancestors, which may or may not provide a value, use +FindPrimvarWithInheritance() . +To efficiently query for primvars using the overloads of +FindPrimvarWithInheritance() and FindPrimvarsWithInheritance() , one +must first cache the results of FindIncrementallyInheritablePrimvars() +for each non-leaf prim on the stage. + +Methods: + +BlockPrimvar(name) +Remove all time samples on the primvar and its associated indices attr, and author a block default value. + +CanContainPropertyName +classmethod CanContainPropertyName(name) -> bool + +CreateIndexedPrimvar(name, typeName, value, ...) +Author scene description to create an attribute and authoring a value on this prim that will be recognized as an indexed Primvar with indices appropriately set (i.e. + +CreateNonIndexedPrimvar(name, typeName, ...) +Author scene description to create an attribute and authoring a value on this prim that will be recognized as a Primvar (i.e. + +CreatePrimvar(name, typeName, interpolation, ...) +Author scene description to create an attribute on this prim that will be recognized as Primvar (i.e. + +FindIncrementallyInheritablePrimvars(...) +Compute the primvars that can be inherited from this prim by its child prims, starting from the set of primvars inherited from this prim's ancestors. + +FindInheritablePrimvars() +Compute the primvars that can be inherited from this prim by its child prims, including the primvars that this prim inherits from ancestor prims. + +FindPrimvarWithInheritance(name) +Like GetPrimvar() , but if the named primvar does not exist or has no authored value on this prim, search for the named, value-producing primvar on ancestor prims. + +FindPrimvarsWithInheritance() +Find all of the value-producing primvars either defined on this prim, or inherited from ancestor prims. + +Get +classmethod Get(stage, path) -> PrimvarsAPI + +GetAuthoredPrimvars() +Like GetPrimvars() , but include only primvars that have some authored scene description (though not necessarily a value). + +GetPrimvar(name) +Return the Primvar object named by name , which will be valid if a Primvar attribute definition already exists. + +GetPrimvars() +Return valid UsdGeomPrimvar objects for all defined Primvars on this prim, similarly to UsdPrim::GetAttributes() . + +GetPrimvarsWithAuthoredValues() +Like GetPrimvars() , but include only primvars that have an authored value. + +GetPrimvarsWithValues() +Like GetPrimvars() , but include only primvars that have some value, whether it comes from authored scene description or a schema fallback. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +HasPossiblyInheritedPrimvar(name) +Is there a Primvar named name with an authored value on this prim or any of its ancestors? + +HasPrimvar(name) +Is there a defined Primvar name on this prim? + +RemovePrimvar(name) +Author scene description to delete an attribute on this prim that was recognized as Primvar (i.e. + +BlockPrimvar(name) → None +Remove all time samples on the primvar and its associated indices +attr, and author a block default value. +This will cause authored opinions in weaker layers to be ignored. +UsdAttribute::Block() , UsdGeomPrimvar::BlockIndices + +Parameters +name (str) – + +static CanContainPropertyName() +classmethod CanContainPropertyName(name) -> bool +Test whether a given name contains the”primvars:”prefix. + +Parameters +name (str) – + +CreateIndexedPrimvar(name, typeName, value, indices, interpolation, elementSize, time) → Primvar +Author scene description to create an attribute and authoring a +value on this prim that will be recognized as an indexed Primvar +with indices appropriately set (i.e. +will present as a valid UsdGeomPrimvar). +an invalid UsdGeomPrimvar on error, a valid UsdGeomPrimvar otherwise. +It is fine to call this method multiple times, and in different +UsdEditTargets, even if there is an existing primvar of the same name, +indexed or not. +CreatePrimvar() , CreateNonIndexedPrimvar() , +UsdPrim::CreateAttribute() , UsdGeomPrimvar::IsPrimvar() + +Parameters + +name (str) – +typeName (ValueTypeName) – +value (T) – +indices (IntArray) – +interpolation (str) – +elementSize (int) – +time (TimeCode) – + +CreateNonIndexedPrimvar(name, typeName, value, interpolation, elementSize, time) → Primvar +Author scene description to create an attribute and authoring a +value on this prim that will be recognized as a Primvar (i.e. +will present as a valid UsdGeomPrimvar). Note that unlike +CreatePrimvar using this API explicitly authors a block for the +indices attr associated with the primvar, thereby blocking any indices +set in any weaker layers. +an invalid UsdGeomPrimvar on error, a valid UsdGeomPrimvar otherwise. +It is fine to call this method multiple times, and in different +UsdEditTargets, even if there is an existing primvar of the same name, +indexed or not. +CreatePrimvar() , CreateIndexedPrimvar() , UsdPrim::CreateAttribute() +, UsdGeomPrimvar::IsPrimvar() + +Parameters + +name (str) – +typeName (ValueTypeName) – +value (T) – +interpolation (str) – +elementSize (int) – +time (TimeCode) – + +CreatePrimvar(name, typeName, interpolation, elementSize) → Primvar +Author scene description to create an attribute on this prim that will +be recognized as Primvar (i.e. +will present as a valid UsdGeomPrimvar). +The name of the created attribute may or may not be the specified +name , due to the possible need to apply property namespacing for +primvars. See Creating and Accessing Primvars for more information. +Creation may fail and return an invalid Primvar if name contains a +reserved keyword, such as the”indices”suffix we use for indexed +primvars. +The behavior with respect to the provided typeName is the same as +for UsdAttributes::Create(), and interpolation and elementSize +are as described in UsdGeomPrimvar::GetInterpolation() and +UsdGeomPrimvar::GetElementSize() . +If interpolation and/or elementSize are left unspecified, we +will author no opinions for them, which means any (strongest) opinion +already authored in any contributing layer for these fields will +become the Primvar’s values, or the fallbacks if no opinions have been +authored. +an invalid UsdGeomPrimvar if we failed to create a valid attribute, a +valid UsdGeomPrimvar otherwise. It is not an error to create over an +existing, compatible attribute. +UsdPrim::CreateAttribute() , UsdGeomPrimvar::IsPrimvar() + +Parameters + +name (str) – +typeName (ValueTypeName) – +interpolation (str) – +elementSize (int) – + +FindIncrementallyInheritablePrimvars(inheritedFromAncestors) → list[Primvar] +Compute the primvars that can be inherited from this prim by its child +prims, starting from the set of primvars inherited from this prim’s +ancestors. +If this method returns an empty vector, then this prim’s children +should inherit the same set of primvars available to this prim, i.e. +the input inheritedFromAncestors . +As opposed to FindInheritablePrimvars() , which always recurses up +through all of the prim’s ancestors, this method allows more efficient +computation of inheritable primvars by starting with the list of +primvars inherited from this prim’s ancestors, and returning a newly +allocated vector only when this prim makes a change to the set of +inherited primvars. This enables O(n) inherited primvar computation +for all prims on a Stage, with potential to share computed results +that are identical (i.e. when this method returns an empty vector, its +parent’s result can (and must!) be reused for all of the prim’s +children. +Which Method to Use to Retrieve Primvars + +Parameters +inheritedFromAncestors (list[Primvar]) – + +FindInheritablePrimvars() → list[Primvar] +Compute the primvars that can be inherited from this prim by its child +prims, including the primvars that this prim inherits from +ancestor prims. +Inherited primvars will be bound to attributes on the corresponding +ancestor prims. +Only primvars with authored, non-blocked, constant +interpolation values are inheritable; fallback values are not +inherited. The order of the returned primvars is undefined. +It is not generally useful to call this method on UsdGeomGprim leaf +prims, and furthermore likely to be expensive since most primvars +are defined on Gprims. +Which Method to Use to Retrieve Primvars + +FindPrimvarWithInheritance(name) → Primvar +Like GetPrimvar() , but if the named primvar does not exist or has no +authored value on this prim, search for the named, value-producing +primvar on ancestor prims. +The returned primvar will be bound to the attribute on the +corresponding ancestor prim on which it was found (if any). If neither +this prim nor any ancestor contains a value-producing primvar, then +the returned primvar will be the same as that returned by GetPrimvar() +. +This is probably the method you want to call when needing to consume a +primvar of a particular name. +Which Method to Use to Retrieve Primvars + +Parameters +name (str) – + +FindPrimvarWithInheritance(name, inheritedFromAncestors) -> Primvar +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This version of FindPrimvarWithInheritance() takes the pre-computed +set of primvars inherited from this prim’s ancestors, as computed by +FindInheritablePrimvars() or FindIncrementallyInheritablePrimvars() on +the prim’s parent. +Which Method to Use to Retrieve Primvars + +Parameters + +name (str) – +inheritedFromAncestors (list[Primvar]) – + +FindPrimvarsWithInheritance() → list[Primvar] +Find all of the value-producing primvars either defined on this prim, +or inherited from ancestor prims. +Which Method to Use to Retrieve Primvars + +FindPrimvarsWithInheritance(inheritedFromAncestors) -> list[Primvar] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This version of FindPrimvarsWithInheritance() takes the pre-computed +set of primvars inherited from this prim’s ancestors, as computed by +FindInheritablePrimvars() or FindIncrementallyInheritablePrimvars() on +the prim’s parent. +Which Method to Use to Retrieve Primvars + +Parameters +inheritedFromAncestors (list[Primvar]) – + +static Get() +classmethod Get(stage, path) -> PrimvarsAPI +Return a UsdGeomPrimvarsAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomPrimvarsAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAuthoredPrimvars() → list[Primvar] +Like GetPrimvars() , but include only primvars that have some authored +scene description (though not necessarily a value). +Which Method to Use to Retrieve Primvars + +GetPrimvar(name) → Primvar +Return the Primvar object named by name , which will be valid if a +Primvar attribute definition already exists. +Name lookup will account for Primvar namespacing, which means that +this method will succeed in some cases where + UsdGeomPrimvar(prim->GetAttribute(name)) + +will not, unless ``name`` is properly namespace prefixed. + +Just because a Primvar is valid and defined, and even if its +underlying UsdAttribute (GetAttr()) answers HasValue() affirmatively, +one must still check the return value of Get() , due to the potential +of time-varying value blocks (see Attribute Value Blocking). +HasPrimvar() , Which Method to Use to Retrieve Primvars + +Parameters +name (str) – + +GetPrimvars() → list[Primvar] +Return valid UsdGeomPrimvar objects for all defined Primvars on this +prim, similarly to UsdPrim::GetAttributes() . +The returned primvars may not possess any values, and therefore not be +useful to some clients. For the primvars useful for inheritance +computations, see GetPrimvarsWithAuthoredValues() , and for primvars +useful for direct consumption, see GetPrimvarsWithValues() . +Which Method to Use to Retrieve Primvars + +GetPrimvarsWithAuthoredValues() → list[Primvar] +Like GetPrimvars() , but include only primvars that have an +authored value. +This is the query used when computing inheritable primvars, and is +generally more useful than GetAuthoredPrimvars() . +Which Method to Use to Retrieve Primvars + +GetPrimvarsWithValues() → list[Primvar] +Like GetPrimvars() , but include only primvars that have some value, +whether it comes from authored scene description or a schema fallback. +For most purposes, this method is more useful than GetPrimvars() . +Which Method to Use to Retrieve Primvars + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +HasPossiblyInheritedPrimvar(name) → bool +Is there a Primvar named name with an authored value on this prim +or any of its ancestors? +This is probably the method you want to call when wanting to know +whether or not the prim”has”a primvar of a particular name. +FindPrimvarWithInheritance() + +Parameters +name (str) – + +HasPrimvar(name) → bool +Is there a defined Primvar name on this prim? +Name lookup will account for Primvar namespacing. +Like GetPrimvar() , a return value of true for HasPrimvar() does +not guarantee the primvar will produce a value. + +Parameters +name (str) – + +RemovePrimvar(name) → bool +Author scene description to delete an attribute on this prim that was +recognized as Primvar (i.e. +will present as a valid UsdGeomPrimvar), in the current +UsdEditTarget. +Because this method can only remove opinions about the primvar from +the current EditTarget, you may generally find it more useful to use +BlockPrimvar() which will ensure that all values from the EditTarget +and weaker layers for the primvar and its indices will be ignored. +Removal may fail and return false if name contains a reserved +keyword, such as the”indices”suffix we use for indexed primvars. +Note this will also remove the indices attribute associated with an +indiced primvar. +true if UsdGeomPrimvar and indices attribute was successfully removed, +false otherwise. +UsdPrim::RemoveProperty() ) + +Parameters +name (str) – + +class pxr.UsdGeom.Scope +Scope is the simplest grouping primitive, and does not carry the +baggage of transformability. Note that transforms should inherit down +through a Scope successfully - it is just a guaranteed no-op from a +transformability perspective. +Methods: + +Define +classmethod Define(stage, path) -> Scope + +Get +classmethod Get(stage, path) -> Scope + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> Scope +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Scope +Return a UsdGeomScope holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomScope(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.Sphere +Defines a primitive sphere centered at the origin. +The fallback values for Cube, Sphere, Cone, and Cylinder are set so +that they all pack into the same volume/bounds. +Methods: + +CreateExtentAttr(defaultValue, writeSparsely) +See GetExtentAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Sphere + +Get +classmethod Get(stage, path) -> Sphere + +GetExtentAttr() +Extent is re-defined on Sphere only to provide a fallback value. + +GetRadiusAttr() +Indicates the sphere's radius. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateExtentAttr(defaultValue, writeSparsely) → Attribute +See GetExtentAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Sphere +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Sphere +Return a UsdGeomSphere holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomSphere(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetExtentAttr() → Attribute +Extent is re-defined on Sphere only to provide a fallback value. +UsdGeomGprim::GetExtentAttr() . +Declaration +float3[] extent = [(-1, -1, -1), (1, 1, 1)] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +GetRadiusAttr() → Attribute +Indicates the sphere’s radius. +If you author radius you must also author extent. +GetExtentAttr() +Declaration +double radius = 1 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.Subset +Encodes a subset of a piece of geometry (i.e. a UsdGeomImageable) as a +set of indices. Currently only supports encoding of face-subsets, but +could be extended in the future to support subsets representing edges, +segments, points etc. +To apply to a geometric prim, a GeomSubset prim must be the prim’s +direct child in namespace, and possess a concrete defining specifier +(i.e. def). This restriction makes it easy and efficient to discover +subsets of a prim. We might want to relax this restriction if it’s +common to have multiple families of subsets on a gprim and if it’s +useful to be able to organize subsets belonging to a family under a +common scope. See’familyName’attribute for more info on defining a +family of subsets. +Note that a GeomSubset isn’t an imageable (i.e. doesn’t derive from +UsdGeomImageable). So, you can’t author visibility for it or +override its purpose. +Materials are bound to GeomSubsets just as they are for regular +geometry using API available in UsdShade (UsdShadeMaterial::Bind). +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +CreateElementTypeAttr(defaultValue, ...) +See GetElementTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFamilyNameAttr(defaultValue, writeSparsely) +See GetFamilyNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateGeomSubset +classmethod CreateGeomSubset(geom, subsetName, elementType, indices, familyName, familyType) -> Subset + +CreateIndicesAttr(defaultValue, writeSparsely) +See GetIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUniqueGeomSubset +classmethod CreateUniqueGeomSubset(geom, subsetName, elementType, indices, familyName, familyType) -> Subset + +Define +classmethod Define(stage, path) -> Subset + +Get +classmethod Get(stage, path) -> Subset + +GetAllGeomSubsetFamilyNames +classmethod GetAllGeomSubsetFamilyNames(geom) -> str.Set + +GetAllGeomSubsets +classmethod GetAllGeomSubsets(geom) -> list[Subset] + +GetElementTypeAttr() +The type of element that the indices target. + +GetFamilyNameAttr() +The name of the family of subsets that this subset belongs to. + +GetFamilyType +classmethod GetFamilyType(geom, familyName) -> str + +GetGeomSubsets +classmethod GetGeomSubsets(geom, elementType, familyName) -> list[Subset] + +GetIndicesAttr() +The set of indices included in this subset. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetUnassignedIndices +classmethod GetUnassignedIndices(subsets, elementCount, time) -> IntArray + +SetFamilyType +classmethod SetFamilyType(geom, familyName, familyType) -> bool + +ValidateFamily +classmethod ValidateFamily(geom, elementType, familyName, reason) -> bool + +ValidateSubsets +classmethod ValidateSubsets(subsets, elementCount, familyType, reason) -> bool + +CreateElementTypeAttr(defaultValue, writeSparsely) → Attribute +See GetElementTypeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFamilyNameAttr(defaultValue, writeSparsely) → Attribute +See GetFamilyNameAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static CreateGeomSubset() +classmethod CreateGeomSubset(geom, subsetName, elementType, indices, familyName, familyType) -> Subset +Creates a new GeomSubset below the given geom with the given name, +subsetName , element type, elementType and indices . +If a subset named subsetName already exists below geom , then +this updates its attributes with the values of the provided arguments +(indices value at time’default’will be updated) and returns it. +The family type is set / updated on geom only if a non-empty value +is passed in for familyType and familyName . + +Parameters + +geom (Imageable) – +subsetName (str) – +elementType (str) – +indices (IntArray) – +familyName (str) – +familyType (str) – + +CreateIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetIndicesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static CreateUniqueGeomSubset() +classmethod CreateUniqueGeomSubset(geom, subsetName, elementType, indices, familyName, familyType) -> Subset +Creates a new GeomSubset below the given imageable, geom with the +given name, subsetName , element type, elementType and +indices . +If a subset named subsetName already exists below geom , then +this creates a new subset by appending a suitable index as suffix to +subsetName (eg, subsetName_1) to avoid name collisions. +The family type is set / updated on geom only if a non-empty value +is passed in for familyType and familyName . + +Parameters + +geom (Imageable) – +subsetName (str) – +elementType (str) – +indices (IntArray) – +familyName (str) – +familyType (str) – + +static Define() +classmethod Define(stage, path) -> Subset +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Subset +Return a UsdGeomSubset holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomSubset(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetAllGeomSubsetFamilyNames() +classmethod GetAllGeomSubsetFamilyNames(geom) -> str.Set +Returns the names of all the families of GeomSubsets defined on the +given imageable, geom . + +Parameters +geom (Imageable) – + +static GetAllGeomSubsets() +classmethod GetAllGeomSubsets(geom) -> list[Subset] +Returns all the GeomSubsets defined on the given imageable, geom . + +Parameters +geom (Imageable) – + +GetElementTypeAttr() → Attribute +The type of element that the indices target. +Currently only allows”face”and defaults to it. +Declaration +uniform token elementType ="face" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +face + +GetFamilyNameAttr() → Attribute +The name of the family of subsets that this subset belongs to. +This is optional and is primarily useful when there are multiple +families of subsets under a geometric prim. In some cases, this could +also be used for achieving proper roundtripping of subset data between +DCC apps. When multiple subsets belonging to a prim have the same +familyName, they are said to belong to the family. A familyType +value can be encoded on the owner of a family of subsets as a token +using the static method UsdGeomSubset::SetFamilyType() +.”familyType”can have one of the following values: + +UsdGeomTokens->partition : implies that every element of the +whole geometry appears exactly once in only one of the subsets +belonging to the family. +UsdGeomTokens->nonOverlapping : an element that appears in +one subset may not appear in any other subset belonging to the family. +UsdGeomTokens->unrestricted : implies that there are no +restrictions w.r.t. the membership of elements in the subsets. They +could be overlapping and the union of all subsets in the family may +not represent the whole. + +The validity of subset data is not enforced by the authoring APIs, +however they can be checked using UsdGeomSubset::ValidateFamily() . +Declaration +uniform token familyName ="" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +static GetFamilyType() +classmethod GetFamilyType(geom, familyName) -> str +Returns the type of family that the GeomSubsets on the given geometric +prim geom , with the given family name, familyName belong to. +This only returns the token that’s encoded on geom and does not +perform any actual validation on the family of GeomSubsets. Please use +ValidateFamily() for such validation. +When familyType is not set on geom , the fallback value +UsdTokens->unrestricted is returned. + +Parameters + +geom (Imageable) – +familyName (str) – + +static GetGeomSubsets() +classmethod GetGeomSubsets(geom, elementType, familyName) -> list[Subset] +Returns all the GeomSubsets of the given elementType belonging to +the specified family, familyName on the given imageable, geom +. +If elementType is empty, then subsets containing all element types +are returned. If familyName is left empty, then all subsets of the +specified elementType will be returned. + +Parameters + +geom (Imageable) – +elementType (str) – +familyName (str) – + +GetIndicesAttr() → Attribute +The set of indices included in this subset. +The indices need not be sorted, but the same index should not appear +more than once. +Declaration +int[] indices = [] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +static GetUnassignedIndices() +classmethod GetUnassignedIndices(subsets, elementCount, time) -> IntArray +Utility for getting the list of indices that are not assigned to any +of the GeomSubsets in subsets at the timeCode, time , given +the element count (total number of indices in the array being +subdivided), elementCount . + +Parameters + +subsets (list[Subset]) – +elementCount (int) – +time (TimeCode) – + +static SetFamilyType() +classmethod SetFamilyType(geom, familyName, familyType) -> bool +This method is used to encode the type of family that the GeomSubsets +on the given geometric prim geom , with the given family name, +familyName belong to. +See UsdGeomSubset::GetFamilyNameAttr for the possible values for +familyType . +When a family of GeomSubsets is tagged as a UsdGeomTokens->partition +or UsdGeomTokens->nonOverlapping, the validity of the data (i.e. +mutual exclusivity and/or wholeness) is not enforced by the authoring +APIs. Use ValidateFamily() to validate the data in a family of +GeomSubsets. +Returns false upon failure to create or set the appropriate attribute +on geom . + +Parameters + +geom (Imageable) – +familyName (str) – +familyType (str) – + +static ValidateFamily() +classmethod ValidateFamily(geom, elementType, familyName, reason) -> bool +Validates whether the family of subsets identified by the given +familyName and elementType on the given imageable, geom +contain valid data. +If the family is designated as a partition or as non-overlapping using +SetFamilyType() , then the validity of the data is checked. If the +familyType is”unrestricted”, then this performs only bounds checking +of the values in the”indices”arrays. +If reason is not None, then it is populated with a string +explaining why the family is invalid, if it is invalid. +The python version of this method returns a tuple containing a (bool, +string), where the bool has the validity of the family and the string +contains the reason (if it’s invalid). + +Parameters + +geom (Imageable) – +elementType (str) – +familyName (str) – +reason (str) – + +static ValidateSubsets() +classmethod ValidateSubsets(subsets, elementCount, familyType, reason) -> bool +Validates the data in the given set of GeomSubsets, subsets , +given the total number of elements in the array being subdivided, +elementCount and the familyType that the subsets belong to. +For proper validation of indices in subsets , all of the +GeomSubsets must have the same’elementType’. +If one or more subsets contain invalid data, then false is returned +and reason is populated with a string explaining the reason why it +is invalid. +The python version of this method returns a tuple containing a (bool, +string), where the bool has the validity of the subsets and the string +contains the reason (if they’re invalid). + +Parameters + +subsets (list[Subset]) – +elementCount (int) – +familyType (str) – +reason (str) – + +class pxr.UsdGeom.Tokens +Attributes: + +accelerations + +all + +angularVelocities + +axis + +basis + +bezier + +bilinear + +boundaries + +bounds + +box + +bspline + +cards + +catmullClark + +catmullRom + +clippingPlanes + +clippingRange + +closed + +constant + +cornerIndices + +cornerSharpnesses + +cornersOnly + +cornersPlus1 + +cornersPlus2 + +creaseIndices + +creaseLengths + +creaseSharpnesses + +cross + +cubic + +curveVertexCounts + +default_ + +doubleSided + +edgeAndCorner + +edgeOnly + +elementSize + +elementType + +exposure + +extent + +extentsHint + +fStop + +face + +faceVarying + +faceVaryingLinearInterpolation + +faceVertexCounts + +faceVertexIndices + +familyName + +focalLength + +focusDistance + +form + +fromTexture + +guide + +guideVisibility + +height + +hermite + +holeIndices + +horizontalAperture + +horizontalApertureOffset + +ids + +inactiveIds + +indices + +inherited + +interpolateBoundary + +interpolation + +invisible + +invisibleIds + +knots + +left + +leftHanded + +length + +linear + +loop + +metersPerUnit + +modelApplyDrawMode + +modelCardGeometry + +modelCardTextureXNeg + +modelCardTextureXPos + +modelCardTextureYNeg + +modelCardTextureYPos + +modelCardTextureZNeg + +modelCardTextureZPos + +modelDrawMode + +modelDrawModeColor + +mono + +motionBlurScale + +motionNonlinearSampleCount + +motionVelocityScale + +nonOverlapping + +none + +nonperiodic + +normals + +open + +order + +orientation + +orientations + +origin + +orthographic + +partition + +periodic + +perspective + +pinned + +pivot + +pointWeights + +points + +positions + +power + +primvarsDisplayColor + +primvarsDisplayOpacity + +projection + +protoIndices + +prototypes + +proxy + +proxyPrim + +proxyVisibility + +purpose + +radius + +ranges + +render + +renderVisibility + +right + +rightHanded + +scales + +shutterClose + +shutterOpen + +size + +smooth + +stereoRole + +subdivisionScheme + +tangents + +triangleSubdivisionRule + +trimCurveCounts + +trimCurveKnots + +trimCurveOrders + +trimCurvePoints + +trimCurveRanges + +trimCurveVertexCounts + +type + +uForm + +uKnots + +uOrder + +uRange + +uVertexCount + +unauthoredValuesIndex + +uniform + +unrestricted + +upAxis + +vForm + +vKnots + +vOrder + +vRange + +vVertexCount + +varying + +velocities + +vertex + +verticalAperture + +verticalApertureOffset + +visibility + +visible + +width + +widths + +wrap + +x + +xformOpOrder + +y + +z + +accelerations = 'accelerations' + +all = 'all' + +angularVelocities = 'angularVelocities' + +axis = 'axis' + +basis = 'basis' + +bezier = 'bezier' + +bilinear = 'bilinear' + +boundaries = 'boundaries' + +bounds = 'bounds' + +box = 'box' + +bspline = 'bspline' + +cards = 'cards' + +catmullClark = 'catmullClark' + +catmullRom = 'catmullRom' + +clippingPlanes = 'clippingPlanes' + +clippingRange = 'clippingRange' + +closed = 'closed' + +constant = 'constant' + +cornerIndices = 'cornerIndices' + +cornerSharpnesses = 'cornerSharpnesses' + +cornersOnly = 'cornersOnly' + +cornersPlus1 = 'cornersPlus1' + +cornersPlus2 = 'cornersPlus2' + +creaseIndices = 'creaseIndices' + +creaseLengths = 'creaseLengths' + +creaseSharpnesses = 'creaseSharpnesses' + +cross = 'cross' + +cubic = 'cubic' + +curveVertexCounts = 'curveVertexCounts' + +default_ = 'default' + +doubleSided = 'doubleSided' + +edgeAndCorner = 'edgeAndCorner' + +edgeOnly = 'edgeOnly' + +elementSize = 'elementSize' + +elementType = 'elementType' + +exposure = 'exposure' + +extent = 'extent' + +extentsHint = 'extentsHint' + +fStop = 'fStop' + +face = 'face' + +faceVarying = 'faceVarying' + +faceVaryingLinearInterpolation = 'faceVaryingLinearInterpolation' + +faceVertexCounts = 'faceVertexCounts' + +faceVertexIndices = 'faceVertexIndices' + +familyName = 'familyName' + +focalLength = 'focalLength' + +focusDistance = 'focusDistance' + +form = 'form' + +fromTexture = 'fromTexture' + +guide = 'guide' + +guideVisibility = 'guideVisibility' + +height = 'height' + +hermite = 'hermite' + +holeIndices = 'holeIndices' + +horizontalAperture = 'horizontalAperture' + +horizontalApertureOffset = 'horizontalApertureOffset' + +ids = 'ids' + +inactiveIds = 'inactiveIds' + +indices = 'indices' + +inherited = 'inherited' + +interpolateBoundary = 'interpolateBoundary' + +interpolation = 'interpolation' + +invisible = 'invisible' + +invisibleIds = 'invisibleIds' + +knots = 'knots' + +left = 'left' + +leftHanded = 'leftHanded' + +length = 'length' + +linear = 'linear' + +loop = 'loop' + +metersPerUnit = 'metersPerUnit' + +modelApplyDrawMode = 'model:applyDrawMode' + +modelCardGeometry = 'model:cardGeometry' + +modelCardTextureXNeg = 'model:cardTextureXNeg' + +modelCardTextureXPos = 'model:cardTextureXPos' + +modelCardTextureYNeg = 'model:cardTextureYNeg' + +modelCardTextureYPos = 'model:cardTextureYPos' + +modelCardTextureZNeg = 'model:cardTextureZNeg' + +modelCardTextureZPos = 'model:cardTextureZPos' + +modelDrawMode = 'model:drawMode' + +modelDrawModeColor = 'model:drawModeColor' + +mono = 'mono' + +motionBlurScale = 'motion:blurScale' + +motionNonlinearSampleCount = 'motion:nonlinearSampleCount' + +motionVelocityScale = 'motion:velocityScale' + +nonOverlapping = 'nonOverlapping' + +none = 'none' + +nonperiodic = 'nonperiodic' + +normals = 'normals' + +open = 'open' + +order = 'order' + +orientation = 'orientation' + +orientations = 'orientations' + +origin = 'origin' + +orthographic = 'orthographic' + +partition = 'partition' + +periodic = 'periodic' + +perspective = 'perspective' + +pinned = 'pinned' + +pivot = 'pivot' + +pointWeights = 'pointWeights' + +points = 'points' + +positions = 'positions' + +power = 'power' + +primvarsDisplayColor = 'primvars:displayColor' + +primvarsDisplayOpacity = 'primvars:displayOpacity' + +projection = 'projection' + +protoIndices = 'protoIndices' + +prototypes = 'prototypes' + +proxy = 'proxy' + +proxyPrim = 'proxyPrim' + +proxyVisibility = 'proxyVisibility' + +purpose = 'purpose' + +radius = 'radius' + +ranges = 'ranges' + +render = 'render' + +renderVisibility = 'renderVisibility' + +right = 'right' + +rightHanded = 'rightHanded' + +scales = 'scales' + +shutterClose = 'shutter:close' + +shutterOpen = 'shutter:open' + +size = 'size' + +smooth = 'smooth' + +stereoRole = 'stereoRole' + +subdivisionScheme = 'subdivisionScheme' + +tangents = 'tangents' + +triangleSubdivisionRule = 'triangleSubdivisionRule' + +trimCurveCounts = 'trimCurve:counts' + +trimCurveKnots = 'trimCurve:knots' + +trimCurveOrders = 'trimCurve:orders' + +trimCurvePoints = 'trimCurve:points' + +trimCurveRanges = 'trimCurve:ranges' + +trimCurveVertexCounts = 'trimCurve:vertexCounts' + +type = 'type' + +uForm = 'uForm' + +uKnots = 'uKnots' + +uOrder = 'uOrder' + +uRange = 'uRange' + +uVertexCount = 'uVertexCount' + +unauthoredValuesIndex = 'unauthoredValuesIndex' + +uniform = 'uniform' + +unrestricted = 'unrestricted' + +upAxis = 'upAxis' + +vForm = 'vForm' + +vKnots = 'vKnots' + +vOrder = 'vOrder' + +vRange = 'vRange' + +vVertexCount = 'vVertexCount' + +varying = 'varying' + +velocities = 'velocities' + +vertex = 'vertex' + +verticalAperture = 'verticalAperture' + +verticalApertureOffset = 'verticalApertureOffset' + +visibility = 'visibility' + +visible = 'visible' + +width = 'width' + +widths = 'widths' + +wrap = 'wrap' + +x = 'X' + +xformOpOrder = 'xformOpOrder' + +y = 'Y' + +z = 'Z' + +class pxr.UsdGeom.VisibilityAPI +UsdGeomVisibilityAPI introduces properties that can be used to author +visibility opinions. +Currently, this schema only introduces the attributes that are used to +control purpose visibility. Later, this schema will define all +visibility-related properties and UsdGeomImageable will no longer +define those properties. The purpose visibility attributes added by +this schema, guideVisibility, proxyVisibility, and +renderVisibility can each be used to control visibility for geometry +of the corresponding purpose values, with the overall visibility +attribute acting as an override. I.e., if visibility evaluates +to”invisible”, purpose visibility is invisible; otherwise, purpose +visibility is determined by the corresponding purpose visibility +attribute. +Note that the behavior of guideVisibility is subtly different from +the proxyVisibility and renderVisibility attributes, in +that”guide”purpose visibility always evaluates to +either”invisible”or”visible”, whereas the other attributes may yield +computed values of”inherited”if there is no authored opinion on the +attribute or inherited from an ancestor. This is motivated by the fact +that, in Pixar”s user workflows, we have never found a need to have +all guides visible in a scene by default, whereas we do find that +flexibility useful for”proxy”and”render”geometry. +This schema can only be applied to UsdGeomImageable prims. The +UseGeomImageable schema provides API for computing the purpose +visibility values that result from the attributes introduced by this +schema. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdGeomTokens. So to set an attribute to the value”rightHanded”, +use UsdGeomTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> VisibilityAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateGuideVisibilityAttr(defaultValue, ...) +See GetGuideVisibilityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProxyVisibilityAttr(defaultValue, ...) +See GetProxyVisibilityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRenderVisibilityAttr(defaultValue, ...) +See GetRenderVisibilityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> VisibilityAPI + +GetGuideVisibilityAttr() +This attribute controls visibility for geometry with purpose"guide". + +GetProxyVisibilityAttr() +This attribute controls visibility for geometry with purpose"proxy". + +GetPurposeVisibilityAttr(purpose) +Return the attribute that is used for expressing visibility opinions for the given purpose . + +GetRenderVisibilityAttr() +This attribute controls visibility for geometry with purpose"render". + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> VisibilityAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”VisibilityAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdGeomVisibilityAPI object is returned upon success. An +invalid (or empty) UsdGeomVisibilityAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateGuideVisibilityAttr(defaultValue, writeSparsely) → Attribute +See GetGuideVisibilityAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateProxyVisibilityAttr(defaultValue, writeSparsely) → Attribute +See GetProxyVisibilityAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRenderVisibilityAttr(defaultValue, writeSparsely) → Attribute +See GetRenderVisibilityAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> VisibilityAPI +Return a UsdGeomVisibilityAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomVisibilityAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetGuideVisibilityAttr() → Attribute +This attribute controls visibility for geometry with purpose”guide”. +Unlike overall visibility, guideVisibility is uniform, and +therefore cannot be animated. +Also unlike overall visibility, guideVisibility is tri-state, in +that a descendant with an opinion of”visible”overrides an ancestor +opinion of”invisible”. +The guideVisibility attribute works in concert with the overall +visibility attribute: The visibility of a prim with purpose”guide”is +determined by the inherited values it receives for the visibility +and guideVisibility attributes. If visibility evaluates +to”invisible”, the prim is invisible. If visibility evaluates +to”inherited”and guideVisibility evaluates to”visible”, then the +prim is visible. Otherwise, it is invisible. +Declaration +uniform token guideVisibility ="invisible" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +inherited, invisible, visible + +GetProxyVisibilityAttr() → Attribute +This attribute controls visibility for geometry with purpose”proxy”. +Unlike overall visibility, proxyVisibility is uniform, and +therefore cannot be animated. +Also unlike overall visibility, proxyVisibility is tri-state, in +that a descendant with an opinion of”visible”overrides an ancestor +opinion of”invisible”. +The proxyVisibility attribute works in concert with the overall +visibility attribute: The visibility of a prim with purpose”proxy”is +determined by the inherited values it receives for the visibility +and proxyVisibility attributes. If visibility evaluates +to”invisible”, the prim is invisible. If visibility evaluates +to”inherited”then: If proxyVisibility evaluates to”visible”, then +the prim is visible; if proxyVisibility evaluates to”invisible”, +then the prim is invisible; if proxyVisibility evaluates +to”inherited”, then the prim may either be visible or invisible, +depending on a fallback value determined by the calling context. +Declaration +uniform token proxyVisibility ="inherited" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +inherited, invisible, visible + +GetPurposeVisibilityAttr(purpose) → Attribute +Return the attribute that is used for expressing visibility opinions +for the given purpose . +The valid purpose tokens are”guide”,”proxy”, and”render”which return +the attributes guideVisibility, proxyVisibility, and +renderVisibility respectively. +Note that while”default”is a valid purpose token for +UsdGeomImageable::GetPurposeVisibilityAttr, it is not a valid purpose +for this function, as UsdGeomVisibilityAPI itself does not have a +default visibility attribute. Calling this function with “default will +result in a coding error. + +Parameters +purpose (str) – + +GetRenderVisibilityAttr() → Attribute +This attribute controls visibility for geometry with purpose”render”. +Unlike overall visibility, renderVisibility is uniform, and +therefore cannot be animated. +Also unlike overall visibility, renderVisibility is tri-state, in +that a descendant with an opinion of”visible”overrides an ancestor +opinion of”invisible”. +The renderVisibility attribute works in concert with the overall +visibility attribute: The visibility of a prim with +purpose”render”is determined by the inherited values it receives for +the visibility and renderVisibility attributes. If visibility +evaluates to”invisible”, the prim is invisible. If visibility +evaluates to”inherited”then: If renderVisibility evaluates +to”visible”, then the prim is visible; if renderVisibility evaluates +to”invisible”, then the prim is invisible; if renderVisibility +evaluates to”inherited”, then the prim may either be visible or +invisible, depending on a fallback value determined by the calling +context. +Declaration +uniform token renderVisibility ="inherited" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +inherited, invisible, visible + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.Xform +Concrete prim schema for a transform, which implements Xformable +Methods: + +Define +classmethod Define(stage, path) -> Xform + +Get +classmethod Get(stage, path) -> Xform + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> Xform +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Xform +Return a UsdGeomXform holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomXform(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdGeom.XformCache +A caching mechanism for transform matrices. For best performance, this +object should be reused for multiple CTM queries. +Instances of this type can be copied, though using Swap() may result +in better performance. +It is valid to cache prims from multiple stages in a single +XformCache. +WARNING: this class does not automatically invalidate cached values +based on changes to the stage from which values were cached. +Additionally, a separate instance of this class should be used per- +thread, calling the Get* methods from multiple threads is not safe, +as they mutate internal state. +Methods: + +Clear() +Clears all pre-cached values. + +ComputeRelativeTransform(prim, ancestor, ...) +Returns the result of concatenating all transforms beneath ancestor that affect prim . + +GetLocalToWorldTransform(prim) +Compute the transformation matrix for the given prim , including the transform authored on the Prim itself, if present. + +GetLocalTransformation(prim, resetsXformStack) +Returns the local transformation of the prim. + +GetParentToWorldTransform(prim) +Compute the transformation matrix for the given prim , but do NOT include the transform authored on the prim itself. + +GetTime() +Get the current time from which this cache is reading values. + +SetTime(time) +Use the new time when computing values and may clear any existing values cached for the previous time. + +Swap(other) +Swap the contents of this XformCache with other . + +Clear() → None +Clears all pre-cached values. + +ComputeRelativeTransform(prim, ancestor, resetXformStack) → Matrix4d +Returns the result of concatenating all transforms beneath +ancestor that affect prim . +This includes the local transform of prim itself, but not the +local transform of ancestor . If ancestor is not an ancestor +of prim , the resulting transform is the local-to-world +transformation of prim . The resetXformTsack pointer must be +valid. If any intermediate prims reset the transform stack, +resetXformStack will be set to true. Intermediate transforms are +cached, but the result of this call itself is not cached. + +Parameters + +prim (Prim) – +ancestor (Prim) – +resetXformStack (bool) – + +GetLocalToWorldTransform(prim) → Matrix4d +Compute the transformation matrix for the given prim , including +the transform authored on the Prim itself, if present. +This method may mutate internal cache state and is not thread safe. + +Parameters +prim (Prim) – + +GetLocalTransformation(prim, resetsXformStack) → Matrix4d +Returns the local transformation of the prim. +Uses the cached XformQuery to compute the result quickly. The +resetsXformStack pointer must be valid. It will be set to true if +prim resets the transform stack. The result of this call is +cached. + +Parameters + +prim (Prim) – +resetsXformStack (bool) – + +GetParentToWorldTransform(prim) → Matrix4d +Compute the transformation matrix for the given prim , but do NOT +include the transform authored on the prim itself. +This method may mutate internal cache state and is not thread safe. + +Parameters +prim (Prim) – + +GetTime() → TimeCode +Get the current time from which this cache is reading values. + +SetTime(time) → None +Use the new time when computing values and may clear any existing +values cached for the previous time. +Setting time to the current time is a no-op. + +Parameters +time (TimeCode) – + +Swap(other) → None +Swap the contents of this XformCache with other . + +Parameters +other (XformCache) – + +class pxr.UsdGeom.XformCommonAPI +This class provides API for authoring and retrieving a standard set of +component transformations which include a scale, a rotation, a scale- +rotate pivot and a translation. The goal of the API is to enhance +component-wise interchange. It achieves this by limiting the set of +allowed basic ops and by specifying the order in which they are +applied. In addition to the basic set of ops, the’resetXformStack’bit +can also be set to indicate whether the underlying xformable resets +the parent transformation (i.e. does not inherit it’s parent’s +transformation). +UsdGeomXformCommonAPI::GetResetXformStack() +UsdGeomXformCommonAPI::SetResetXformStack() The operator-bool for the +class will inform you whether an existing xformable is compatible with +this API. +The scale-rotate pivot is represented by a pair of (translate, +inverse-translate) xformOps around the scale and rotate operations. +The rotation operation can be any of the six allowed Euler angle sets. +UsdGeomXformOp::Type. The xformOpOrder of an xformable that has all of +the supported basic ops is as follows: +[“xformOp:translate”,”xformOp:translate:pivot”,”xformOp:rotateXYZ”,”xformOp:scale”,”!invert!xformOp:translate:pivot”]. +It is worth noting that all of the ops are optional. For example, an +xformable may have only a translate or a rotate. It would still be +considered as compatible with this API. Individual SetTranslate() , +SetRotate() , SetScale() and SetPivot() methods are provided by this +API to allow such sparse authoring. +Classes: + +OpFlags +Enumerates the categories of ops that can be handled by XformCommonAPI. + +RotationOrder +Enumerates the rotation order of the 3-angle Euler rotation. + +Methods: + +CanConvertOpTypeToRotationOrder +classmethod CanConvertOpTypeToRotationOrder(opType) -> bool + +ConvertOpTypeToRotationOrder +classmethod ConvertOpTypeToRotationOrder(opType) -> RotationOrder + +ConvertRotationOrderToOpType +classmethod ConvertRotationOrderToOpType(rotOrder) -> XformOp.Type + +CreateXformOps(rotOrder, op1, op2, op3, op4) +Creates the specified XformCommonAPI-compatible xform ops, or returns the existing ops if they already exist. + +Get +classmethod Get(stage, path) -> XformCommonAPI + +GetResetXformStack() +Returns whether the xformable resets the transform stack. + +GetRotationTransform +classmethod GetRotationTransform(rotation, rotationOrder) -> Matrix4d + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetXformVectors(translation, rotation, ...) +Retrieve values of the various component xformOps at a given time + +GetXformVectorsByAccumulation(translation, ...) +Retrieve values of the various component xformOps at a given time + +SetPivot(pivot, time) +Set pivot position at time to pivot . + +SetResetXformStack(resetXformStack) +Set whether the xformable resets the transform stack. + +SetRotate(rotation, rotOrder, time) +Set rotation at time to rotation . + +SetScale(scale, time) +Set scale at time to scale . + +SetTranslate(translation, time) +Set translation at time to translation . + +SetXformVectors(translation, rotation, ...) +Set values for the various component xformOps at a given time . + +Attributes: + +OpPivot + +OpRotate + +OpScale + +OpTranslate + +RotationOrderXYZ + +RotationOrderXZY + +RotationOrderYXZ + +RotationOrderYZX + +RotationOrderZXY + +RotationOrderZYX + +class OpFlags +Enumerates the categories of ops that can be handled by +XformCommonAPI. +For use with CreateXformOps() . +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdGeom.XformCommonAPI.OpTranslate, UsdGeom.XformCommonAPI.OpRotate, UsdGeom.XformCommonAPI.OpScale, UsdGeom.XformCommonAPI.OpPivot) + +class RotationOrder +Enumerates the rotation order of the 3-angle Euler rotation. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdGeom.XformCommonAPI.RotationOrderXYZ, UsdGeom.XformCommonAPI.RotationOrderXZY, UsdGeom.XformCommonAPI.RotationOrderYXZ, UsdGeom.XformCommonAPI.RotationOrderYZX, UsdGeom.XformCommonAPI.RotationOrderZXY, UsdGeom.XformCommonAPI.RotationOrderZYX) + +static CanConvertOpTypeToRotationOrder() +classmethod CanConvertOpTypeToRotationOrder(opType) -> bool +Whether the given opType has a corresponding value in the +UsdGeomXformCommonAPI::RotationOrder enum (i.e., whether it is a +three-axis rotation). + +Parameters +opType (XformOp.Type) – + +static ConvertOpTypeToRotationOrder() +classmethod ConvertOpTypeToRotationOrder(opType) -> RotationOrder +Converts the given opType to the corresponding value in the +UsdGeomXformCommonAPI::RotationOrder enum. +For example, TypeRotateYZX corresponds to RotationOrderYZX. Raises a +coding error if opType is not convertible to RotationOrder (i.e., +if it isn’t a three-axis rotation) and returns the default +RotationOrderXYZ instead. + +Parameters +opType (XformOp.Type) – + +static ConvertRotationOrderToOpType() +classmethod ConvertRotationOrderToOpType(rotOrder) -> XformOp.Type +Converts the given rotOrder to the corresponding value in the +UsdGeomXformOp::Type enum. +For example, RotationOrderYZX corresponds to TypeRotateYZX. Raises a +coding error if rotOrder is not one of the named enumerators of +RotationOrder. + +Parameters +rotOrder (RotationOrder) – + +CreateXformOps(rotOrder, op1, op2, op3, op4) → Ops +Creates the specified XformCommonAPI-compatible xform ops, or returns +the existing ops if they already exist. +If successful, returns an Ops object with all the ops on this prim, +identified by type. If the requested xform ops couldn’t be created or +the prim is not XformCommonAPI-compatible, returns an Ops object with +all invalid ops. +The rotOrder is only used if OpRotate is specified. Otherwise, it +is ignored. (If you don’t need to create a rotate op, you might find +it helpful to use the other overload that takes no rotation order.) + +Parameters + +rotOrder (RotationOrder) – +op1 (OpFlags) – +op2 (OpFlags) – +op3 (OpFlags) – +op4 (OpFlags) – + +CreateXformOps(op1, op2, op3, op4) -> Ops +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +This overload does not take a rotation order. +If you specify OpRotate, then this overload assumes RotationOrderXYZ +or the previously-authored rotation order. (If you do need to create a +rotate op, you might find it helpful to use the other overload that +explicitly takes a rotation order.) + +Parameters + +op1 (OpFlags) – +op2 (OpFlags) – +op3 (OpFlags) – +op4 (OpFlags) – + +static Get() +classmethod Get(stage, path) -> XformCommonAPI +Return a UsdGeomXformCommonAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomXformCommonAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetResetXformStack() → bool +Returns whether the xformable resets the transform stack. +i.e., does not inherit the parent transformation. + +static GetRotationTransform() +classmethod GetRotationTransform(rotation, rotationOrder) -> Matrix4d +Return the 4x4 matrix that applies the rotation encoded by rotation +vector rotation using the rotation order rotationOrder . +Deprecated +Please use the result of ConvertRotationOrderToOpType() along with +UsdGeomXformOp::GetOpTransform() instead. + +Parameters + +rotation (Vec3f) – +rotationOrder (XformCommonAPI.RotationOrder) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetXformVectors(translation, rotation, scale, pivot, rotOrder, time) → bool +Retrieve values of the various component xformOps at a given time +. +Identity values are filled in for the component xformOps that don’t +exist or don’t have an authored value. +This method works even on prims with an incompatible xform schema, +i.e. when the bool operator returns false. When the underlying +xformable has an incompatible xform schema, it performs a full-on +matrix decomposition to XYZ rotation order. + +Parameters + +translation (Vec3d) – +rotation (Vec3f) – +scale (Vec3f) – +pivot (Vec3f) – +rotOrder (RotationOrder) – +time (TimeCode) – + +GetXformVectorsByAccumulation(translation, rotation, scale, pivot, rotOrder, time) → bool +Retrieve values of the various component xformOps at a given time +. +Identity values are filled in for the component xformOps that don’t +exist or don’t have an authored value. +This method allows some additional flexibility for xform schemas that +do not strictly adhere to the xformCommonAPI. For incompatible +schemas, this method will attempt to reduce the schema into one from +which component vectors can be extracted by accumulating xformOp +transforms of the common types. +When the underlying xformable has a compatible xform schema, the usual +component value extraction method is used instead. When the xform +schema is incompatible and it cannot be reduced by accumulating +transforms, it performs a full-on matrix decomposition to XYZ rotation +order. + +Parameters + +translation (Vec3d) – +rotation (Vec3f) – +scale (Vec3f) – +pivot (Vec3f) – +rotOrder (XformCommonAPI.RotationOrder) – +time (TimeCode) – + +SetPivot(pivot, time) → bool +Set pivot position at time to pivot . + +Parameters + +pivot (Vec3f) – +time (TimeCode) – + +SetResetXformStack(resetXformStack) → bool +Set whether the xformable resets the transform stack. +i.e., does not inherit the parent transformation. + +Parameters +resetXformStack (bool) – + +SetRotate(rotation, rotOrder, time) → bool +Set rotation at time to rotation . + +Parameters + +rotation (Vec3f) – +rotOrder (XformCommonAPI.RotationOrder) – +time (TimeCode) – + +SetScale(scale, time) → bool +Set scale at time to scale . + +Parameters + +scale (Vec3f) – +time (TimeCode) – + +SetTranslate(translation, time) → bool +Set translation at time to translation . + +Parameters + +translation (Vec3d) – +time (TimeCode) – + +SetXformVectors(translation, rotation, scale, pivot, rotOrder, time) → bool +Set values for the various component xformOps at a given time . +Calling this method will call all of the supported ops to be created, +even if they only contain default (identity) values. +To author individual operations selectively, use the Set[OpType]() +API. +Once the rotation order has been established for a given xformable +(either because of an already defined (and compatible) rotate op or +from calling SetXformVectors() or SetRotate() ), it cannot be changed. + +Parameters + +translation (Vec3d) – +rotation (Vec3f) – +scale (Vec3f) – +pivot (Vec3f) – +rotOrder (RotationOrder) – +time (TimeCode) – + +OpPivot = UsdGeom.XformCommonAPI.OpPivot + +OpRotate = UsdGeom.XformCommonAPI.OpRotate + +OpScale = UsdGeom.XformCommonAPI.OpScale + +OpTranslate = UsdGeom.XformCommonAPI.OpTranslate + +RotationOrderXYZ = UsdGeom.XformCommonAPI.RotationOrderXYZ + +RotationOrderXZY = UsdGeom.XformCommonAPI.RotationOrderXZY + +RotationOrderYXZ = UsdGeom.XformCommonAPI.RotationOrderYXZ + +RotationOrderYZX = UsdGeom.XformCommonAPI.RotationOrderYZX + +RotationOrderZXY = UsdGeom.XformCommonAPI.RotationOrderZXY + +RotationOrderZYX = UsdGeom.XformCommonAPI.RotationOrderZYX + +class pxr.UsdGeom.XformOp +Schema wrapper for UsdAttribute for authoring and computing +transformation operations, as consumed by UsdGeomXformable schema. +The semantics of an op are determined primarily by its name, which +allows us to decode an op very efficiently. All ops are independent +attributes, which must live in the”xformOp”property namespace. The +op’s primary name within the namespace must be one of +UsdGeomXformOpTypes, which determines the type of transformation +operation, and its secondary name (or suffix) within the namespace +(which is not required to exist), can be any name that distinguishes +it from other ops of the same type. Suffixes are generally imposed by +higer level xform API schemas. +On packing order of rotateABC triples The order in which the axis +rotations are recorded in a Vec3* for the six rotateABC Euler +triples is always the same: vec[0] = X, vec[1] = Y, vec[2] = Z. +The A, B, C in the op name dictate the order in which their +corresponding elements are consumed by the rotation, not how they are +laid out. +Classes: + +Precision +Precision with which the value of the tranformation operation is encoded. + +Type +Enumerates the set of all transformation operation types. + +Methods: + +Get(value, time) +Get the attribute value of the XformOp at time . + +GetAttr() +Explicit UsdAttribute extractor. + +GetBaseName() +UsdAttribute::GetBaseName() + +GetName() +UsdAttribute::GetName() + +GetNamespace() +UsdAttribute::GetNamespace() + +GetNumTimeSamples() +Returns the number of time samples authored for this xformOp. + +GetOpName +classmethod GetOpName(opType, opSuffix, inverse) -> str + +GetOpTransform +classmethod GetOpTransform(time) -> Matrix4d + +GetOpType() +Return the operation type of this op, one of UsdGeomXformOp::Type. + +GetOpTypeEnum +classmethod GetOpTypeEnum(opTypeToken) -> Type + +GetOpTypeToken +classmethod GetOpTypeToken(opType) -> str + +GetPrecision() +Returns the precision level of the xform op. + +GetTimeSamples(times) +Populates the list of time samples at which the associated attribute is authored. + +GetTimeSamplesInInterval(interval, times) +Populates the list of time samples within the given interval , at which the associated attribute is authored. + +GetTypeName() +UsdAttribute::GetTypeName() + +IsDefined() +Return true if the wrapped UsdAttribute::IsDefined() , and in addition the attribute is identified as a XformOp. + +IsInverseOp() +Returns whether the xformOp represents an inverse operation. + +MightBeTimeVarying() +Determine whether there is any possibility that this op's value may vary over time. + +Set(value, time) +Set the attribute value of the XformOp at time . + +SplitName() +UsdAttribute::SplitName() + +Attributes: + +PrecisionDouble + +PrecisionFloat + +PrecisionHalf + +TypeInvalid + +TypeOrient + +TypeRotateX + +TypeRotateXYZ + +TypeRotateXZY + +TypeRotateY + +TypeRotateYXZ + +TypeRotateYZX + +TypeRotateZ + +TypeRotateZXY + +TypeRotateZYX + +TypeScale + +TypeTransform + +TypeTranslate + +class Precision +Precision with which the value of the tranformation operation is +encoded. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdGeom.XformOp.PrecisionDouble, UsdGeom.XformOp.PrecisionFloat, UsdGeom.XformOp.PrecisionHalf) + +class Type +Enumerates the set of all transformation operation types. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdGeom.XformOp.TypeInvalid, UsdGeom.XformOp.TypeTranslate, UsdGeom.XformOp.TypeScale, UsdGeom.XformOp.TypeRotateX, UsdGeom.XformOp.TypeRotateY, UsdGeom.XformOp.TypeRotateZ, UsdGeom.XformOp.TypeRotateXYZ, UsdGeom.XformOp.TypeRotateXZY, UsdGeom.XformOp.TypeRotateYXZ, UsdGeom.XformOp.TypeRotateYZX, UsdGeom.XformOp.TypeRotateZXY, UsdGeom.XformOp.TypeRotateZYX, UsdGeom.XformOp.TypeOrient, UsdGeom.XformOp.TypeTransform) + +Get(value, time) → bool +Get the attribute value of the XformOp at time . +For inverted ops, this returns the raw, uninverted value. + +Parameters + +value (T) – +time (TimeCode) – + +GetAttr() → Attribute +Explicit UsdAttribute extractor. + +GetBaseName() → str +UsdAttribute::GetBaseName() + +GetName() → str +UsdAttribute::GetName() + +GetNamespace() → str +UsdAttribute::GetNamespace() + +GetNumTimeSamples() → int +Returns the number of time samples authored for this xformOp. + +GetOpName() +classmethod GetOpName(opType, opSuffix, inverse) -> str +Returns the xformOp’s name as it appears in xformOpOrder, given the +opType, the (optional) suffix and whether it is an inverse operation. + +Parameters + +opType (Type) – +opSuffix (str) – +inverse (bool) – + +GetOpName() -> str +Returns the opName as it appears in the xformOpOrder attribute. +This will begin with”!invert!:xformOp:”if it is an inverse xform +operation. If it is not an inverse xformOp, it will begin +with’xformOp:’. +This will be empty for an invalid xformOp. + +GetOpTransform() +classmethod GetOpTransform(time) -> Matrix4d +Return the 4x4 matrix that applies the transformation encoded in this +op at time . +Returns the identity matrix and issues a coding error if the op is +invalid. +If the op is valid, but has no authored value, the identity matrix is +returned and no error is issued. + +Parameters +time (TimeCode) – + +GetOpTransform(opType, opVal, isInverseOp) -> Matrix4d +Return the 4x4 matrix that applies the transformation encoded by op +opType and data value opVal . +If isInverseOp is true, then the inverse of the tranformation +represented by the op/value pair is returned. +An error will be issued if opType is not one of the values in the +enum UsdGeomXformOp::Type or if opVal cannot be converted to a +suitable input to opType + +Parameters + +opType (Type) – +opVal (VtValue) – +isInverseOp (bool) – + +GetOpType() → Type +Return the operation type of this op, one of UsdGeomXformOp::Type. + +static GetOpTypeEnum() +classmethod GetOpTypeEnum(opTypeToken) -> Type +Returns the Type enum associated with the given opTypeToken . + +Parameters +opTypeToken (str) – + +static GetOpTypeToken() +classmethod GetOpTypeToken(opType) -> str +Returns the TfToken used to encode the given opType . +Note that an empty TfToken is used to represent TypeInvalid + +Parameters +opType (Type) – + +GetPrecision() → Precision +Returns the precision level of the xform op. + +GetTimeSamples(times) → bool +Populates the list of time samples at which the associated attribute +is authored. + +Parameters +times (list[float]) – + +GetTimeSamplesInInterval(interval, times) → bool +Populates the list of time samples within the given interval , at +which the associated attribute is authored. + +Parameters + +interval (Interval) – +times (list[float]) – + +GetTypeName() → ValueTypeName +UsdAttribute::GetTypeName() + +IsDefined() → bool +Return true if the wrapped UsdAttribute::IsDefined() , and in addition +the attribute is identified as a XformOp. + +IsInverseOp() → bool +Returns whether the xformOp represents an inverse operation. + +MightBeTimeVarying() → bool +Determine whether there is any possibility that this op’s value may +vary over time. +The determination is based on a snapshot of the authored state of the +op, and may become invalid in the face of further authoring. + +Set(value, time) → bool +Set the attribute value of the XformOp at time . +This only works on non-inverse operations. If invoked on an inverse +xform operation, a coding error is issued and no value is authored. + +Parameters + +value (T) – +time (TimeCode) – + +SplitName() → list[str] +UsdAttribute::SplitName() + +PrecisionDouble = UsdGeom.XformOp.PrecisionDouble + +PrecisionFloat = UsdGeom.XformOp.PrecisionFloat + +PrecisionHalf = UsdGeom.XformOp.PrecisionHalf + +TypeInvalid = UsdGeom.XformOp.TypeInvalid + +TypeOrient = UsdGeom.XformOp.TypeOrient + +TypeRotateX = UsdGeom.XformOp.TypeRotateX + +TypeRotateXYZ = UsdGeom.XformOp.TypeRotateXYZ + +TypeRotateXZY = UsdGeom.XformOp.TypeRotateXZY + +TypeRotateY = UsdGeom.XformOp.TypeRotateY + +TypeRotateYXZ = UsdGeom.XformOp.TypeRotateYXZ + +TypeRotateYZX = UsdGeom.XformOp.TypeRotateYZX + +TypeRotateZ = UsdGeom.XformOp.TypeRotateZ + +TypeRotateZXY = UsdGeom.XformOp.TypeRotateZXY + +TypeRotateZYX = UsdGeom.XformOp.TypeRotateZYX + +TypeScale = UsdGeom.XformOp.TypeScale + +TypeTransform = UsdGeom.XformOp.TypeTransform + +TypeTranslate = UsdGeom.XformOp.TypeTranslate + +class pxr.UsdGeom.XformOpTypes +Attributes: + +orient + +resetXformStack + +rotateX + +rotateXYZ + +rotateXZY + +rotateY + +rotateYXZ + +rotateYZX + +rotateZ + +rotateZXY + +rotateZYX + +scale + +transform + +translate + +orient = 'orient' + +resetXformStack = '!resetXformStack!' + +rotateX = 'rotateX' + +rotateXYZ = 'rotateXYZ' + +rotateXZY = 'rotateXZY' + +rotateY = 'rotateY' + +rotateYXZ = 'rotateYXZ' + +rotateYZX = 'rotateYZX' + +rotateZ = 'rotateZ' + +rotateZXY = 'rotateZXY' + +rotateZYX = 'rotateZYX' + +scale = 'scale' + +transform = 'transform' + +translate = 'translate' + +class pxr.UsdGeom.Xformable +Base class for all transformable prims, which allows arbitrary +sequences of component affine transformations to be encoded. +You may find it useful to review Linear Algebra in UsdGeom while +reading this class description. Supported Component Transformation +Operations +UsdGeomXformable currently supports arbitrary sequences of the +following operations, each of which can be encoded in an attribute of +the proper shape in any supported precision: + +translate - 3D +scale - 3D +rotateX - 1D angle in degrees +rotateY - 1D angle in degrees +rotateZ - 1D angle in degrees +rotateABC - 3D where ABC can be any combination of the six +principle Euler Angle sets: XYZ, XZY, YXZ, YZX, ZXY, ZYX. See note on +rotation packing order +orient - 4D (quaternion) +transform - 4x4D +Creating a Component Transformation + +To add components to a UsdGeomXformable prim, simply call AddXformOp() +with the desired op type, as enumerated in UsdGeomXformOp::Type, and +the desired precision, which is one of UsdGeomXformOp::Precision. +Optionally, you can also provide an”op suffix”for the operator that +disambiguates it from other components of the same type on the same +prim. Application-specific transform schemas can use the suffixes to +fill a role similar to that played by AbcGeom::XformOp’s”Hint”enums +for their own round-tripping logic. +We also provide specific”Add”API for each type, for clarity and +conciseness, e.g. AddTranslateOp() , AddRotateXYZOp() etc. +AddXformOp() will return a UsdGeomXformOp object, which is a schema on +a newly created UsdAttribute that provides convenience API for +authoring and computing the component transformations. The +UsdGeomXformOp can then be used to author any number of timesamples +and default for the op. +Each successive call to AddXformOp() adds an operator that will be +applied”more locally”than the preceding operator, just as if we were +pushing transforms onto a transformation stack - which is precisely +what should happen when the operators are consumed by a reader. +If you can, please try to use the UsdGeomXformCommonAPI, which wraps +the UsdGeomXformable with an interface in which Op creation is taken +care of for you, and there is a much higher chance that the data you +author will be importable without flattening into other DCC’s, as it +conforms to a fixed set of Scale-Rotate-Translate Ops. +Using the Authoring API Data Encoding and Op Ordering +Because there is no”fixed schema”of operations, all of the attributes +that encode transform operations are dynamic, and are scoped in the +namespace”xformOp”. The second component of an attribute’s name +provides the type of operation, as listed above. +An”xformOp”attribute can have additional namespace components derived +from the opSuffix argument to the AddXformOp() suite of methods, +which provides a preferred way of naming the ops such that we can have +multiple”translate”ops with unique attribute names. For example, in +the attribute named”xformOp:translate:maya:pivot”,”translate”is the +type of operation and”maya:pivot”is the suffix. +The following ordered list of attribute declarations in usda define a +basic Scale-Rotate-Translate with XYZ Euler angles, wherein the +translation is double-precision, and the remainder of the ops are +single, in which we will: + +Scale by 2.0 in each dimension +Rotate about the X, Y, and Z axes by 30, 60, and 90 degrees, +respectively +Translate by 100 units in the Y direction + +float3 xformOp:rotateXYZ = (30, 60, 90) +float3 xformOp:scale = (2, 2, 2) +double3 xformOp:translate = (0, 100, 0) +uniform token[] xformOpOrder = [ "xformOp:translate", "xformOp:rotateXYZ", "xformOp:scale" ] + +The attributes appear in the dictionary order in which USD, by +default, sorts them. To ensure the ops are recovered and evaluated in +the correct order, the schema introduces the xformOpOrder +attribute, which contains the names of the op attributes, in the +precise sequence in which they should be pushed onto a transform +stack. Note that the order is opposite to what you might expect, +given the matrix algebra described in Linear Algebra in UsdGeom. This +also dictates order of op creation, since each call to AddXformOp() +adds a new op to the end of the xformOpOrder array, as a new”most- +local”operation. See Example 2 below for C++ code that could have +produced this USD. +If it were important for the prim’s rotations to be independently +overridable, we could equivalently (at some performance cost) encode +the transformation also like so: +float xformOp:rotateX = 30 +float xformOp:rotateY = 60 +float xformOp:rotateZ = 90 +float3 xformOp:scale = (2, 2, 2) +double3 xformOp:translate = (0, 100, 0) +uniform token[] xformOpOrder = [ "xformOp:translate", "xformOp:rotateZ", "xformOp:rotateY", "xformOp:rotateX", "xformOp:scale" ] + +Again, note that although we are encoding an XYZ rotation, the three +rotations appear in the xformOpOrder in the opposite order, with +Z, followed, by Y, followed by X. +Were we to add a Maya-style scalePivot to the above example, it might +look like the following: +float3 xformOp:rotateXYZ = (30, 60, 90) +float3 xformOp:scale = (2, 2, 2) +double3 xformOp:translate = (0, 100, 0) +double3 xformOp:translate:scalePivot +uniform token[] xformOpOrder = [ "xformOp:translate", "xformOp:rotateXYZ", "xformOp:translate:scalePivot", "xformOp:scale" ] + +Paired”Inverted”Ops +We have been claiming that the ordered list of ops serves as a set of +instructions to a transform stack, but you may have noticed in the +last example that there is a missing operation - the pivot for the +scale op needs to be applied in its inverse-form as a final (most +local) op! In the AbcGeom::Xform schema, we would have encoded an +actual”final”translation op whose value was authored by the exporter +as the negation of the pivot’s value. However, doing so would be +brittle in USD, given that each op can be independently overridden, +and the constraint that one attribute must be maintained as the +negation of the other in order for successful re-importation of the +schema cannot be expressed in USD. +Our solution leverages the xformOpOrder member of the schema, +which, in addition to ordering the ops, may also contain one of two +special tokens that address the paired op and”stack +resetting”behavior. +The”paired op”behavior is encoded as an”!invert!”prefix in +xformOpOrder, as the result of an AddXformOp(isInverseOp=True) +call. The xformOpOrder for the last example would look like: +uniform token[] xformOpOrder = [ "xformOp:translate", "xformOp:rotateXYZ", "xformOp:translate:scalePivot", "xformOp:scale", "!invert!xformOp:translate:scalePivot" ] + +When asked for its value via UsdGeomXformOp::GetOpTransform() , +an”inverted”Op (i.e. the”inverted”half of a set of paired Ops) will +fetch the value of its paired attribute and return its negation. This +works for all op types - an error will be issued if a”transform”type +op is singular and cannot be inverted. When getting the authored value +of an inverted op via UsdGeomXformOp::Get() , the raw, uninverted +value of the associated attribute is returned. +For the sake of robustness, setting a value on an inverted op is +disallowed. Attempting to set a value on an inverted op will result +in a coding error and no value being set. +Resetting the Transform Stack +The other special op/token that can appear in xformOpOrder is +“!resetXformStack!”, which, appearing as the first element of +xformOpOrder, indicates this prim should not inherit the +transformation of its namespace parent. See SetResetXformStack() +Expected Behavior for”Missing”Ops +If an importer expects Scale-Rotate-Translate operations, but a prim +has only translate and rotate ops authored, the importer should assume +an identity scale. This allows us to optimize the data a bit, if only +a few components of a very rich schema (like Maya’s) are authored in +the app. +Using the C++ API +#1. Creating a simple transform matrix encoding +#2. Creating the simple SRT from the example above + +#3. Creating a parameterized SRT with pivot using + +UsdGeomXformCommonAPI +#4. Creating a rotate-only pivot transform with animated rotation and + +translation + +Methods: + +AddOrientOp(precision, opSuffix, isInverseOp) +Add a orient op (arbitrary axis/angle rotation) to the local stack represented by this xformable. + +AddRotateXOp(precision, opSuffix, isInverseOp) +Add a rotation about the X-axis to the local stack represented by this xformable. + +AddRotateXYZOp(precision, opSuffix, isInverseOp) +Add a rotation op with XYZ rotation order to the local stack represented by this xformable. + +AddRotateXZYOp(precision, opSuffix, isInverseOp) +Add a rotation op with XZY rotation order to the local stack represented by this xformable. + +AddRotateYOp(precision, opSuffix, isInverseOp) +Add a rotation about the YX-axis to the local stack represented by this xformable. + +AddRotateYXZOp(precision, opSuffix, isInverseOp) +Add a rotation op with YXZ rotation order to the local stack represented by this xformable. + +AddRotateYZXOp(precision, opSuffix, isInverseOp) +Add a rotation op with YZX rotation order to the local stack represented by this xformable. + +AddRotateZOp(precision, opSuffix, isInverseOp) +Add a rotation about the Z-axis to the local stack represented by this xformable. + +AddRotateZXYOp(precision, opSuffix, isInverseOp) +Add a rotation op with ZXY rotation order to the local stack represented by this xformable. + +AddRotateZYXOp(precision, opSuffix, isInverseOp) +Add a rotation op with ZYX rotation order to the local stack represented by this xformable. + +AddScaleOp(precision, opSuffix, isInverseOp) +Add a scale operation to the local stack represented by this xformable. + +AddTransformOp(precision, opSuffix, isInverseOp) +Add a tranform op (4x4 matrix transformation) to the local stack represented by this xformable. + +AddTranslateOp(precision, opSuffix, isInverseOp) +Add a translate operation to the local stack represented by this xformable. + +AddXformOp(opType, precision, opSuffix, ...) +Add an affine transformation to the local stack represented by this Xformable. + +ClearXformOpOrder() +Clears the local transform stack. + +CreateXformOpOrderAttr(defaultValue, ...) +See GetXformOpOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> Xformable + +GetLocalTransformation +Compute the fully-combined, local-to-parent transformation for this prim. + +GetOrderedXformOps +Return the ordered list of transform operations to be applied to this prim, in least-to-most-local order. + +GetResetXformStack() +Does this prim reset its parent's inherited transformation? + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTimeSamples +classmethod GetTimeSamples(times) -> bool + +GetTimeSamplesInInterval +classmethod GetTimeSamplesInInterval(interval, times) -> bool + +GetXformOpOrderAttr() +Encodes the sequence of transformation operations in the order in which they should be pushed onto a transform stack while visiting a UsdStage 's prims in a graph traversal that will effect the desired positioning for this prim and its descendant prims. + +IsTransformationAffectedByAttrNamed +classmethod IsTransformationAffectedByAttrNamed(attrName) -> bool + +MakeMatrixXform() +Clears the existing local transform stack and creates a new xform op of type'transform'. + +SetResetXformStack(resetXform) +Specify whether this prim's transform should reset the transformation stack inherited from its parent prim. + +SetXformOpOrder(orderedXformOps, resetXformStack) +Reorder the already-existing transform ops on this prim. + +TransformMightBeTimeVarying() +Determine whether there is any possibility that this prim's local transformation may vary over time. + +AddOrientOp(precision, opSuffix, isInverseOp) → XformOp +Add a orient op (arbitrary axis/angle rotation) to the local stack +represented by this xformable. +AddXformOp() + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateXOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation about the X-axis to the local stack represented by this +xformable. +Set the angle value of the resulting UsdGeomXformOp in degrees +AddXformOp() + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateXYZOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation op with XYZ rotation order to the local stack +represented by this xformable. +Set the angle value of the resulting UsdGeomXformOp in degrees +AddXformOp() , note on angle packing order + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateXZYOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation op with XZY rotation order to the local stack +represented by this xformable. +Set the angle values of the resulting UsdGeomXformOp in degrees +AddXformOp() , note on angle packing order + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateYOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation about the YX-axis to the local stack represented by +this xformable. +Set the angle value of the resulting UsdGeomXformOp in degrees +AddXformOp() + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateYXZOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation op with YXZ rotation order to the local stack +represented by this xformable. +Set the angle values of the resulting UsdGeomXformOp in degrees +AddXformOp() , note on angle packing order + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateYZXOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation op with YZX rotation order to the local stack +represented by this xformable. +Set the angle values of the resulting UsdGeomXformOp in degrees +AddXformOp() , note on angle packing order + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateZOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation about the Z-axis to the local stack represented by this +xformable. +AddXformOp() + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateZXYOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation op with ZXY rotation order to the local stack +represented by this xformable. +Set the angle values of the resulting UsdGeomXformOp in degrees +AddXformOp() , note on angle packing order + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddRotateZYXOp(precision, opSuffix, isInverseOp) → XformOp +Add a rotation op with ZYX rotation order to the local stack +represented by this xformable. +Set the angle values of the resulting UsdGeomXformOp in degrees +AddXformOp() , note on angle packing order + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddScaleOp(precision, opSuffix, isInverseOp) → XformOp +Add a scale operation to the local stack represented by this +xformable. +AddXformOp() + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddTransformOp(precision, opSuffix, isInverseOp) → XformOp +Add a tranform op (4x4 matrix transformation) to the local stack +represented by this xformable. +AddXformOp() Note: This method takes a precision argument only to be +consistent with the other types of xformOps. The only valid precision +here is double since matrix values cannot be encoded in floating-pt +precision in Sdf. + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddTranslateOp(precision, opSuffix, isInverseOp) → XformOp +Add a translate operation to the local stack represented by this +xformable. +AddXformOp() + +Parameters + +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +AddXformOp(opType, precision, opSuffix, isInverseOp) → XformOp +Add an affine transformation to the local stack represented by this +Xformable. +This will fail if there is already a transform operation of the same +name in the ordered ops on this prim (i.e. as returned by +GetOrderedXformOps() ), or if an op of the same name exists at all on +the prim with a different precision than that specified. +The newly created operation will become the most-locally applied +transformation on the prim, and will appear last in the list returned +by GetOrderedXformOps() . It is OK to begin authoring values to the +returned UsdGeomXformOp immediately, interspersed with subsequent +calls to AddXformOp() - just note the order of application, which +can be changed at any time (and in stronger layers) via +SetXformOpOrder() . +opType +is the type of transform operation, one of UsdGeomXformOp::Type. +precision +allows you to specify the precision with which you desire to encode +the data. This should be one of the values in the enum +UsdGeomXformOp::Precision. opSuffix +allows you to specify the purpose/meaning of the op in the stack. When +opSuffix is specified, the associated attribute’s name is set +to”xformOp::”. isInverseOp +is used to indicate an inverse transformation operation. +a UsdGeomXformOp that can be used to author to the operation. An error +is issued and the returned object will be invalid (evaluate to false) +if the op being added already exists in xformOpOrder or if the +arguments supplied are invalid. +If the attribute associated with the op already exists, but isn’t of +the requested precision, a coding error is issued, but a valid xformOp +is returned with the existing attribute. + +Parameters + +opType (XformOp.Type) – +precision (XformOp.Precision) – +opSuffix (str) – +isInverseOp (bool) – + +ClearXformOpOrder() → bool +Clears the local transform stack. + +CreateXformOpOrderAttr(defaultValue, writeSparsely) → Attribute +See GetXformOpOrderAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> Xformable +Return a UsdGeomXformable holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdGeomXformable(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetLocalTransformation() +Compute the fully-combined, local-to-parent transformation for this prim. +If a client does not need to manipulate the individual ops themselves, and requires only the combined transform on this prim, this method will take care of all the data marshalling and linear algebra needed to combine the ops into a 4x4 affine transformation matrix, in double-precision, regardless of the precision of the op inputs. +The python version of this function only returns the computed local-to-parent transformation. Clients must independently call GetResetXformStack() to be able to construct the local-to-world transformation. +Compute the fully-combined, local-to-parent transformation for this prim as efficiently as possible, using pre-fetched list of ordered xform ops supplied by the client. +The python version of this function only returns the computed local-to-parent transformation. Clients must independently call GetResetXformStack() to be able to construct the local-to-world transformation. + +GetOrderedXformOps() +Return the ordered list of transform operations to be applied to this prim, in least-to-most-local order. This is determined by the intersection of authored op-attributes and the explicit ordering of those attributes encoded in the “xformOpOrder” attribute on this prim. +Any entries in “xformOpOrder” that do not correspond to valid attributes on the xformable prim are skipped and a warning is issued. +A UsdGeomTransformable that has not had any ops added via AddXformOp() will return an empty vector. +The python version of this function only returns the ordered list of xformOps. Clients must independently call GetResetXformStack() if they need the info. + +GetResetXformStack() → bool +Does this prim reset its parent’s inherited transformation? +Returns true if”!resetXformStack!”appears anywhere in xformOpOrder. +When this returns true, all ops upto the last”!resetXformStack!”in +xformOpOrder are ignored when computing the local transformation. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTimeSamples() +classmethod GetTimeSamples(times) -> bool +Sets times to the union of all the timesamples at which xformOps +that are included in the xformOpOrder attribute are authored. +This clears the times vector before accumulating sample times from +all the xformOps. +UsdAttribute::GetTimeSamples + +Parameters +times (list[float]) – + +GetTimeSamples(orderedXformOps, times) -> bool +Returns the union of all the timesamples at which the attributes +belonging to the given orderedXformOps are authored. +This clears the times vector before accumulating sample times from +orderedXformOps . +UsdGeomXformable::GetTimeSamples + +Parameters + +orderedXformOps (list[XformOp]) – +times (list[float]) – + +GetTimeSamplesInInterval() +classmethod GetTimeSamplesInInterval(interval, times) -> bool +Sets times to the union of all the timesamples in the interval, +interval , at which xformOps that are included in the xformOpOrder +attribute are authored. +This clears the times vector before accumulating sample times from +all the xformOps. +UsdAttribute::GetTimeSamples + +Parameters + +interval (Interval) – +times (list[float]) – + +GetTimeSamplesInInterval(orderedXformOps, interval, times) -> bool +Returns the union of all the timesamples in the interval at which +the attributes belonging to the given orderedXformOps are +authored. +This clears the times vector before accumulating sample times from +orderedXformOps . +UsdGeomXformable::GetTimeSamplesInInterval + +Parameters + +orderedXformOps (list[XformOp]) – +interval (Interval) – +times (list[float]) – + +GetXformOpOrderAttr() → Attribute +Encodes the sequence of transformation operations in the order in +which they should be pushed onto a transform stack while visiting a +UsdStage ‘s prims in a graph traversal that will effect the desired +positioning for this prim and its descendant prims. +You should rarely, if ever, need to manipulate this attribute +directly. It is managed by the AddXformOp() , SetResetXformStack() , +and SetXformOpOrder() , and consulted by GetOrderedXformOps() and +GetLocalTransformation() . +Declaration +uniform token[] xformOpOrder +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +static IsTransformationAffectedByAttrNamed() +classmethod IsTransformationAffectedByAttrNamed(attrName) -> bool +Returns true if the attribute named attrName could affect the +local transformation of an xformable prim. + +Parameters +attrName (str) – + +MakeMatrixXform() → XformOp +Clears the existing local transform stack and creates a new xform op +of type’transform’. +This API is provided for convenience since this is the most common +xform authoring operation. +ClearXformOpOrder() +AddTransformOp() + +SetResetXformStack(resetXform) → bool +Specify whether this prim’s transform should reset the transformation +stack inherited from its parent prim. +By default, parent transforms are inherited. SetResetXformStack() can +be called at any time during authoring, but will always add +a’!resetXformStack!’op as the first op in the ordered list, if one +does not exist already. If one already exists, and resetXform is +false, it will remove all ops upto and including the +last”!resetXformStack!”op. + +Parameters +resetXform (bool) – + +SetXformOpOrder(orderedXformOps, resetXformStack) → bool +Reorder the already-existing transform ops on this prim. +All elements in orderedXformOps must be valid and represent +attributes on this prim. Note that it is not required that all the +existing operations be present in orderedXformOps , so this method +can be used to completely change the transformation structure applied +to the prim. +If resetXformStack is set to true, then “!resetXformOp! will be +set as the first op in xformOpOrder, to indicate that the prim does +not inherit its parent’s transformation. +If you wish to re-specify a prim’s transformation completely in a +stronger layer, you should first call this method with an empty +orderedXformOps vector. From there you can call AddXformOp() just +as if you were authoring to the prim from scratch. +false if any of the elements of orderedXformOps are not extant on +this prim, or if an error occurred while authoring the ordering +metadata. Under either condition, no scene description is authored. +GetOrderedXformOps() + +Parameters + +orderedXformOps (list[XformOp]) – +resetXformStack (bool) – + +TransformMightBeTimeVarying() → bool +Determine whether there is any possibility that this prim’s local +transformation may vary over time. +The determination is based on a snapshot of the authored state of the +op attributes on the prim, and may become invalid in the face of +further authoring. + +TransformMightBeTimeVarying(ops) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Determine whether there is any possibility that this prim’s local +transformation may vary over time, using a pre-fetched (cached) list +of ordered xform ops supplied by the client. +The determination is based on a snapshot of the authored state of the +op attributes on the prim, and may become invalid in the face of +further authoring. + +Parameters +ops (list[XformOp]) – + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdHydra.md b/UsdHydra.md new file mode 100644 index 0000000000000000000000000000000000000000..fb7f81841060c5887ea78c4788c84f31bbd29d4a --- /dev/null +++ b/UsdHydra.md @@ -0,0 +1,294 @@ + + +UsdHydra module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdHydra module + +  + +# UsdHydra module + +Summary: The UsdHydra module. + +Classes: + +GenerativeProceduralAPI +This API extends and configures the core UsdProcGenerativeProcedural schema defined within usdProc for use with hydra generative procedurals as defined within hdGp. + +Tokens + +class pxr.UsdHydra.GenerativeProceduralAPI +This API extends and configures the core UsdProcGenerativeProcedural +schema defined within usdProc for use with hydra generative +procedurals as defined within hdGp. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdHydraTokens. So to set an attribute to the value”rightHanded”, +use UsdHydraTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> GenerativeProceduralAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateProceduralSystemAttr(defaultValue, ...) +See GetProceduralSystemAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProceduralTypeAttr(defaultValue, ...) +See GetProceduralTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> GenerativeProceduralAPI + +GetProceduralSystemAttr() +This value should correspond to a configured instance of HdGpGenerativeProceduralResolvingSceneIndex which will evaluate the procedural. + +GetProceduralTypeAttr() +The registered name of a HdGpGenerativeProceduralPlugin to be executed. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> GenerativeProceduralAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”HydraGenerativeProceduralAPI”to +the token-valued, listOp metadata apiSchemas on the prim. +A valid UsdHydraGenerativeProceduralAPI object is returned upon +success. An invalid (or empty) UsdHydraGenerativeProceduralAPI object +is returned upon failure. See UsdPrim::ApplyAPI() for conditions +resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateProceduralSystemAttr(defaultValue, writeSparsely) → Attribute +See GetProceduralSystemAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateProceduralTypeAttr(defaultValue, writeSparsely) → Attribute +See GetProceduralTypeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> GenerativeProceduralAPI +Return a UsdHydraGenerativeProceduralAPI holding the prim adhering to +this schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdHydraGenerativeProceduralAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetProceduralSystemAttr() → Attribute +This value should correspond to a configured instance of +HdGpGenerativeProceduralResolvingSceneIndex which will evaluate the +procedural. +The default value of”hydraGenerativeProcedural”matches the equivalent +default of HdGpGenerativeProceduralResolvingSceneIndex. Multiple +instances of the scene index can be used to determine where within a +scene index chain a given procedural will be evaluated. +Declaration +token proceduralSystem ="hydraGenerativeProcedural" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetProceduralTypeAttr() → Attribute +The registered name of a HdGpGenerativeProceduralPlugin to be +executed. +Declaration +token primvars:hdGp:proceduralType +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdHydra.Tokens +Attributes: + +HwPrimvar_1 + +HwPtexTexture_1 + +HwUvTexture_1 + +black + +clamp + +displayLookBxdf + +faceIndex + +faceOffset + +frame + +hydraGenerativeProcedural + +infoFilename + +infoVarname + +linear + +linearMipmapLinear + +linearMipmapNearest + +magFilter + +minFilter + +mirror + +nearest + +nearestMipmapLinear + +nearestMipmapNearest + +primvarsHdGpProceduralType + +proceduralSystem + +repeat + +textureMemory + +useMetadata + +uv + +wrapS + +wrapT + +HwPrimvar_1 = 'HwPrimvar_1' + +HwPtexTexture_1 = 'HwPtexTexture_1' + +HwUvTexture_1 = 'HwUvTexture_1' + +black = 'black' + +clamp = 'clamp' + +displayLookBxdf = 'displayLook:bxdf' + +faceIndex = 'faceIndex' + +faceOffset = 'faceOffset' + +frame = 'frame' + +hydraGenerativeProcedural = 'hydraGenerativeProcedural' + +infoFilename = 'inputs:file' + +infoVarname = 'inputs:varname' + +linear = 'linear' + +linearMipmapLinear = 'linearMipmapLinear' + +linearMipmapNearest = 'linearMipmapNearest' + +magFilter = 'magFilter' + +minFilter = 'minFilter' + +mirror = 'mirror' + +nearest = 'nearest' + +nearestMipmapLinear = 'nearestMipmapLinear' + +nearestMipmapNearest = 'nearestMipmapNearest' + +primvarsHdGpProceduralType = 'primvars:hdGp:proceduralType' + +proceduralSystem = 'proceduralSystem' + +repeat = 'repeat' + +textureMemory = 'textureMemory' + +useMetadata = 'useMetadata' + +uv = 'uv' + +wrapS = 'wrapS' + +wrapT = 'wrapT' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdLux.md b/UsdLux.md new file mode 100644 index 0000000000000000000000000000000000000000..d2855ebdb078345d7e85548cb40fa502461b7712 --- /dev/null +++ b/UsdLux.md @@ -0,0 +1,4017 @@ + + +UsdLux module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdLux module + +  + +# UsdLux module + +Summary: The UsdLux module provides a representation for lights and related components that are common to many graphics environments. + +Classes: + +BoundableLightBase +Base class for intrinsic lights that are boundable. + +CylinderLight +Light emitted outward from a cylinder. + +DiskLight +Light emitted from one side of a circular disk. + +DistantLight +Light emitted from a distant source along the -Z axis. + +DomeLight +Light emitted inward from a distant external environment, such as a sky or IBL light probe. + +GeometryLight +Deprecated + +LightAPI +API schema that imparts the quality of being a light onto a prim. + +LightFilter +A light filter modifies the effect of a light. + +LightListAPI +API schema to support discovery and publishing of lights in a scene. + +ListAPI +Deprecated + +MeshLightAPI +This is the preferred API schema to apply to Mesh type prims when adding light behaviors to a mesh. + +NonboundableLightBase +Base class for intrinsic lights that are not boundable. + +PluginLight +Light that provides properties that allow it to identify an external SdrShadingNode definition, through UsdShadeNodeDefAPI, that can be provided to render delegates without the need to provide a schema definition for the light's type. + +PluginLightFilter +Light filter that provides properties that allow it to identify an external SdrShadingNode definition, through UsdShadeNodeDefAPI, that can be provided to render delegates without the need to provide a schema definition for the light filter's type. + +PortalLight +A rectangular portal in the local XY plane that guides sampling of a dome light. + +RectLight +Light emitted from one side of a rectangle. + +ShadowAPI +Controls to refine a light's shadow behavior. + +ShapingAPI +Controls for shaping a light's emission. + +SphereLight +Light emitted outward from a sphere. + +Tokens + +VolumeLightAPI +This is the preferred API schema to apply to Volume type prims when adding light behaviors to a volume. + +class pxr.UsdLux.BoundableLightBase +Base class for intrinsic lights that are boundable. +The primary purpose of this class is to provide a direct API to the +functions provided by LightAPI for concrete derived light types. +Methods: + +CreateColorAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateColorAttr() . + +CreateColorTemperatureAttr(defaultValue, ...) +See UsdLuxLightAPI::CreateColorTemperatureAttr() . + +CreateDiffuseAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateDiffuseAttr() . + +CreateEnableColorTemperatureAttr(...) +See UsdLuxLightAPI::CreateEnableColorTemperatureAttr() . + +CreateExposureAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateExposureAttr() . + +CreateFiltersRel() +See UsdLuxLightAPI::CreateFiltersRel() . + +CreateIntensityAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateIntensityAttr() . + +CreateNormalizeAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateNormalizeAttr() . + +CreateSpecularAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateSpecularAttr() . + +Get +classmethod Get(stage, path) -> BoundableLightBase + +GetColorAttr() +See UsdLuxLightAPI::GetColorAttr() . + +GetColorTemperatureAttr() +See UsdLuxLightAPI::GetColorTemperatureAttr() . + +GetDiffuseAttr() +See UsdLuxLightAPI::GetDiffuseAttr() . + +GetEnableColorTemperatureAttr() +See UsdLuxLightAPI::GetEnableColorTemperatureAttr() . + +GetExposureAttr() +See UsdLuxLightAPI::GetExposureAttr() . + +GetFiltersRel() +See UsdLuxLightAPI::GetFiltersRel() . + +GetIntensityAttr() +See UsdLuxLightAPI::GetIntensityAttr() . + +GetNormalizeAttr() +See UsdLuxLightAPI::GetNormalizeAttr() . + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSpecularAttr() +See UsdLuxLightAPI::GetSpecularAttr() . + +LightAPI() +Contructs and returns a UsdLuxLightAPI object for this light. + +CreateColorAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateColorAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateColorTemperatureAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateColorTemperatureAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDiffuseAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateDiffuseAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateEnableColorTemperatureAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateEnableColorTemperatureAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExposureAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateExposureAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFiltersRel() → Relationship +See UsdLuxLightAPI::CreateFiltersRel() . + +CreateIntensityAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateIntensityAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateNormalizeAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateNormalizeAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSpecularAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateSpecularAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> BoundableLightBase +Return a UsdLuxBoundableLightBase holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxBoundableLightBase(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetColorAttr() → Attribute +See UsdLuxLightAPI::GetColorAttr() . + +GetColorTemperatureAttr() → Attribute +See UsdLuxLightAPI::GetColorTemperatureAttr() . + +GetDiffuseAttr() → Attribute +See UsdLuxLightAPI::GetDiffuseAttr() . + +GetEnableColorTemperatureAttr() → Attribute +See UsdLuxLightAPI::GetEnableColorTemperatureAttr() . + +GetExposureAttr() → Attribute +See UsdLuxLightAPI::GetExposureAttr() . + +GetFiltersRel() → Relationship +See UsdLuxLightAPI::GetFiltersRel() . + +GetIntensityAttr() → Attribute +See UsdLuxLightAPI::GetIntensityAttr() . + +GetNormalizeAttr() → Attribute +See UsdLuxLightAPI::GetNormalizeAttr() . + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSpecularAttr() → Attribute +See UsdLuxLightAPI::GetSpecularAttr() . + +LightAPI() → LightAPI +Contructs and returns a UsdLuxLightAPI object for this light. + +class pxr.UsdLux.CylinderLight +Light emitted outward from a cylinder. The cylinder is centered at the +origin and has its major axis on the X axis. The cylinder does not +emit light from the flat end-caps. +Methods: + +CreateLengthAttr(defaultValue, writeSparsely) +See GetLengthAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTreatAsLineAttr(defaultValue, ...) +See GetTreatAsLineAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> CylinderLight + +Get +classmethod Get(stage, path) -> CylinderLight + +GetLengthAttr() +Width of the rectangle, in the local X axis. + +GetRadiusAttr() +Radius of the cylinder. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTreatAsLineAttr() +A hint that this light can be treated as a'line'light (effectively, a zero-radius cylinder) by renderers that benefit from non-area lighting. + +CreateLengthAttr(defaultValue, writeSparsely) → Attribute +See GetLengthAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTreatAsLineAttr(defaultValue, writeSparsely) → Attribute +See GetTreatAsLineAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> CylinderLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> CylinderLight +Return a UsdLuxCylinderLight holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxCylinderLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetLengthAttr() → Attribute +Width of the rectangle, in the local X axis. +Declaration +float inputs:length = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetRadiusAttr() → Attribute +Radius of the cylinder. +Declaration +float inputs:radius = 0.5 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTreatAsLineAttr() → Attribute +A hint that this light can be treated as a’line’light (effectively, a +zero-radius cylinder) by renderers that benefit from non-area +lighting. +Renderers that only support area lights can disregard this. +Declaration +bool treatAsLine = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +class pxr.UsdLux.DiskLight +Light emitted from one side of a circular disk. The disk is centered +in the XY plane and emits light along the -Z axis. +Methods: + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> DiskLight + +Get +classmethod Get(stage, path) -> DiskLight + +GetRadiusAttr() +Radius of the disk. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> DiskLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> DiskLight +Return a UsdLuxDiskLight holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxDiskLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetRadiusAttr() → Attribute +Radius of the disk. +Declaration +float inputs:radius = 0.5 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.DistantLight +Light emitted from a distant source along the -Z axis. Also known as a +directional light. +Methods: + +CreateAngleAttr(defaultValue, writeSparsely) +See GetAngleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> DistantLight + +Get +classmethod Get(stage, path) -> DistantLight + +GetAngleAttr() +Angular size of the light in degrees. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateAngleAttr(defaultValue, writeSparsely) → Attribute +See GetAngleAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> DistantLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> DistantLight +Return a UsdLuxDistantLight holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxDistantLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAngleAttr() → Attribute +Angular size of the light in degrees. +As an example, the Sun is approximately 0.53 degrees as seen from +Earth. Higher values broaden the light and therefore soften shadow +edges. +Declaration +float inputs:angle = 0.53 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.DomeLight +Light emitted inward from a distant external environment, such as a +sky or IBL light probe. The orientation of a dome light with a latlong +texture is expected to match the OpenEXR specification for latlong +environment maps. From the OpenEXR documentation: +Latitude-Longitude Map: +The environment is projected onto the image using polar coordinates +(latitude and longitude). A pixel’s x coordinate corresponds to its +longitude, and the y coordinate corresponds to its latitude. Pixel +(dataWindow.min.x, dataWindow.min.y) has latitude +pi/2 and longitude ++pi; pixel (dataWindow.max.x, dataWindow.max.y) has latitude -pi/2 and +longitude -pi. +In 3D space, latitudes -pi/2 and +pi/2 correspond to the negative and +positive y direction. Latitude 0, longitude 0 points into positive z +direction; and latitude 0, longitude pi/2 points into positive x +direction. +The size of the data window should be 2*N by N pixels (width by +height), +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdLuxTokens. So to set an attribute to the value”rightHanded”, use +UsdLuxTokens->rightHanded as the value. +Methods: + +CreateGuideRadiusAttr(defaultValue, ...) +See GetGuideRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePortalsRel() +See GetPortalsRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTextureFileAttr(defaultValue, ...) +See GetTextureFileAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTextureFormatAttr(defaultValue, ...) +See GetTextureFormatAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> DomeLight + +Get +classmethod Get(stage, path) -> DomeLight + +GetGuideRadiusAttr() +The radius of guide geometry to use to visualize the dome light. + +GetPortalsRel() +Optional portals to guide light sampling. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTextureFileAttr() +A color texture to use on the dome, such as an HDR (high dynamic range) texture intended for IBL (image based lighting). + +GetTextureFormatAttr() +Specifies the parameterization of the color map file. + +OrientToStageUpAxis() +Adds a transformation op, if neeeded, to orient the dome to align with the stage's up axis. + +CreateGuideRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetGuideRadiusAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePortalsRel() → Relationship +See GetPortalsRel() , and also Create vs Get Property Methods for when +to use Get vs Create. + +CreateTextureFileAttr(defaultValue, writeSparsely) → Attribute +See GetTextureFileAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTextureFormatAttr(defaultValue, writeSparsely) → Attribute +See GetTextureFormatAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> DomeLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> DomeLight +Return a UsdLuxDomeLight holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxDomeLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetGuideRadiusAttr() → Attribute +The radius of guide geometry to use to visualize the dome light. +The default is 1 km for scenes whose metersPerUnit is the USD default +of 0.01 (i.e., 1 world unit is 1 cm). +Declaration +float guideRadius = 100000 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetPortalsRel() → Relationship +Optional portals to guide light sampling. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTextureFileAttr() → Attribute +A color texture to use on the dome, such as an HDR (high dynamic +range) texture intended for IBL (image based lighting). +Declaration +asset inputs:texture:file +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetTextureFormatAttr() → Attribute +Specifies the parameterization of the color map file. +Valid values are: + +automatic: Tries to determine the layout from the file itself. +For example, Renderman texture files embed an explicit +parameterization. +latlong: Latitude as X, longitude as Y. +mirroredBall: An image of the environment reflected in a sphere, +using an implicitly orthogonal projection. +angular: Similar to mirroredBall but the radial dimension is +mapped linearly to the angle, providing better sampling at the edges. +cubeMapVerticalCross: A cube map with faces laid out as a +vertical cross. + +Declaration +token inputs:texture:format ="automatic" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +automatic, latlong, mirroredBall, angular, cubeMapVerticalCross + +OrientToStageUpAxis() → None +Adds a transformation op, if neeeded, to orient the dome to align with +the stage’s up axis. +Uses UsdLuxTokens->orientToStageUpAxis as the op suffix. If an op with +this suffix already exists, this method assumes it is already applying +the proper correction and does nothing further. If no op is required +to match the stage’s up axis, no op will be created. +UsdGeomXformOp +UsdGeomGetStageUpAxis + +class pxr.UsdLux.GeometryLight +Deprecated +Light emitted outward from a geometric prim (UsdGeomGprim), which is +typically a mesh. +Methods: + +CreateGeometryRel() +See GetGeometryRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> GeometryLight + +Get +classmethod Get(stage, path) -> GeometryLight + +GetGeometryRel() +Relationship to the geometry to use as the light source. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateGeometryRel() → Relationship +See GetGeometryRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +static Define() +classmethod Define(stage, path) -> GeometryLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> GeometryLight +Return a UsdLuxGeometryLight holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxGeometryLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetGeometryRel() → Relationship +Relationship to the geometry to use as the light source. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.LightAPI +API schema that imparts the quality of being a light onto a prim. +A light is any prim that has this schema applied to it. This is true +regardless of whether LightAPI is included as a built-in API of the +prim type (e.g. RectLight or DistantLight) or is applied directly to a +Gprim that should be treated as a light. +Linking +Lights can be linked to geometry. Linking controls which geometry a +light illuminates, and which geometry casts shadows from the light. +Linking is specified as collections (UsdCollectionAPI) which can be +accessed via GetLightLinkCollection() and GetShadowLinkCollection(). +Note that these collections have their includeRoot set to true, so +that lights will illuminate and cast shadows from all objects by +default. To illuminate only a specific set of objects, there are two +options. One option is to modify the collection paths to explicitly +exclude everything else, assuming it is known; the other option is to +set includeRoot to false and explicitly include the desired objects. +These are complementary approaches that may each be preferable +depending on the scenario and how to best express the intent of the +light setup. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdLuxTokens. So to set an attribute to the value”rightHanded”, use +UsdLuxTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> LightAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ConnectableAPI() +Contructs and returns a UsdShadeConnectableAPI object with this light. + +CreateColorAttr(defaultValue, writeSparsely) +See GetColorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateColorTemperatureAttr(defaultValue, ...) +See GetColorTemperatureAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDiffuseAttr(defaultValue, writeSparsely) +See GetDiffuseAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateEnableColorTemperatureAttr(...) +See GetEnableColorTemperatureAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExposureAttr(defaultValue, writeSparsely) +See GetExposureAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFiltersRel() +See GetFiltersRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateInput(name, typeName) +Create an input which can either have a value or can be connected. + +CreateIntensityAttr(defaultValue, writeSparsely) +See GetIntensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMaterialSyncModeAttr(defaultValue, ...) +See GetMaterialSyncModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateNormalizeAttr(defaultValue, writeSparsely) +See GetNormalizeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateOutput(name, typeName) +Create an output which can either have a value or can be connected. + +CreateShaderIdAttr(defaultValue, writeSparsely) +See GetShaderIdAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShaderIdAttrForRenderContext(...) +Creates the shader ID attribute for the given renderContext . + +CreateSpecularAttr(defaultValue, writeSparsely) +See GetSpecularAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> LightAPI + +GetColorAttr() +The color of emitted light, in energy-linear terms. + +GetColorTemperatureAttr() +Color temperature, in degrees Kelvin, representing the white point. + +GetDiffuseAttr() +A multiplier for the effect of this light on the diffuse response of materials. + +GetEnableColorTemperatureAttr() +Enables using colorTemperature. + +GetExposureAttr() +Scales the power of the light exponentially as a power of 2 (similar to an F-stop control over exposure). + +GetFiltersRel() +Relationship to the light filters that apply to this light. + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Inputs are represented by attributes in the"inputs:"namespace. + +GetIntensityAttr() +Scales the power of the light linearly. + +GetLightLinkCollectionAPI() +Return the UsdCollectionAPI interface used for examining and modifying the light-linking of this light. + +GetMaterialSyncModeAttr() +For a LightAPI applied to geometry that has a bound Material, which is entirely or partly emissive, this specifies the relationship of the Material response to the lighting response. + +GetNormalizeAttr() +Normalizes power by the surface area of the light. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Outputs are represented by attributes in the"outputs:"namespace. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetShaderId(renderContexts) +Return the light's shader ID for the given list of available renderContexts . + +GetShaderIdAttr() +Default ID for the light's shader. + +GetShaderIdAttrForRenderContext(renderContext) +Returns the shader ID attribute for the given renderContext . + +GetShadowLinkCollectionAPI() +Return the UsdCollectionAPI interface used for examining and modifying the shadow-linking of this light. + +GetSpecularAttr() +A multiplier for the effect of this light on the specular response of materials. + +static Apply() +classmethod Apply(prim) -> LightAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”LightAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdLuxLightAPI object is returned upon success. An invalid (or +empty) UsdLuxLightAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ConnectableAPI() → ConnectableAPI +Contructs and returns a UsdShadeConnectableAPI object with this light. +Note that most tasks can be accomplished without explicitly +constructing a UsdShadeConnectable API, since connection-related API +such as UsdShadeConnectableAPI::ConnectToSource() are static methods, +and UsdLuxLightAPI will auto-convert to a UsdShadeConnectableAPI when +passed to functions that want to act generically on a connectable +UsdShadeConnectableAPI object. + +CreateColorAttr(defaultValue, writeSparsely) → Attribute +See GetColorAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateColorTemperatureAttr(defaultValue, writeSparsely) → Attribute +See GetColorTemperatureAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDiffuseAttr(defaultValue, writeSparsely) → Attribute +See GetDiffuseAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateEnableColorTemperatureAttr(defaultValue, writeSparsely) → Attribute +See GetEnableColorTemperatureAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExposureAttr(defaultValue, writeSparsely) → Attribute +See GetExposureAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFiltersRel() → Relationship +See GetFiltersRel() , and also Create vs Get Property Methods for when +to use Get vs Create. + +CreateInput(name, typeName) → Input +Create an input which can either have a value or can be connected. +The attribute representing the input is created in +the”inputs:”namespace. Inputs on lights are connectable. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateIntensityAttr(defaultValue, writeSparsely) → Attribute +See GetIntensityAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMaterialSyncModeAttr(defaultValue, writeSparsely) → Attribute +See GetMaterialSyncModeAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateNormalizeAttr(defaultValue, writeSparsely) → Attribute +See GetNormalizeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateOutput(name, typeName) → Output +Create an output which can either have a value or can be connected. +The attribute representing the output is created in +the”outputs:”namespace. Outputs on a light cannot be connected, as +their value is assumed to be computed externally. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateShaderIdAttr(defaultValue, writeSparsely) → Attribute +See GetShaderIdAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShaderIdAttrForRenderContext(renderContext, defaultValue, writeSparsely) → Attribute +Creates the shader ID attribute for the given renderContext . +See GetShaderIdAttrForRenderContext() , and also Create vs Get +Property Methods for when to use Get vs Create. If specified, author +defaultValue as the attribute’s default, sparsely (when it makes +sense to do so) if writeSparsely is true - the default for +writeSparsely is false . + +Parameters + +renderContext (str) – +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSpecularAttr(defaultValue, writeSparsely) → Attribute +See GetSpecularAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> LightAPI +Return a UsdLuxLightAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxLightAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetColorAttr() → Attribute +The color of emitted light, in energy-linear terms. +Declaration +color3f inputs:color = (1, 1, 1) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Color3f + +GetColorTemperatureAttr() → Attribute +Color temperature, in degrees Kelvin, representing the white point. +The default is a common white point, D65. Lower values are warmer and +higher values are cooler. The valid range is from 1000 to 10000. Only +takes effect when enableColorTemperature is set to true. When active, +the computed result multiplies against the color attribute. See +UsdLuxBlackbodyTemperatureAsRgb() . +Declaration +float inputs:colorTemperature = 6500 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetDiffuseAttr() → Attribute +A multiplier for the effect of this light on the diffuse response of +materials. +This is a non-physical control. +Declaration +float inputs:diffuse = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetEnableColorTemperatureAttr() → Attribute +Enables using colorTemperature. +Declaration +bool inputs:enableColorTemperature = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetExposureAttr() → Attribute +Scales the power of the light exponentially as a power of 2 (similar +to an F-stop control over exposure). +The result is multiplied against the intensity. +Declaration +float inputs:exposure = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetFiltersRel() → Relationship +Relationship to the light filters that apply to this light. + +GetInput(name) → Input +Return the requested input if it exists. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Inputs are represented by attributes in the”inputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +GetIntensityAttr() → Attribute +Scales the power of the light linearly. +Declaration +float inputs:intensity = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetLightLinkCollectionAPI() → CollectionAPI +Return the UsdCollectionAPI interface used for examining and modifying +the light-linking of this light. +Light-linking controls which geometry this light illuminates. + +GetMaterialSyncModeAttr() → Attribute +For a LightAPI applied to geometry that has a bound Material, which is +entirely or partly emissive, this specifies the relationship of the +Material response to the lighting response. +Valid values are: + +materialGlowTintsLight: All primary and secondary rays see the +emissive/glow response as dictated by the bound Material while the +base color seen by light rays (which is then modulated by all of the +other LightAPI controls) is the multiplication of the color feeding +the emission/glow input of the Material (i.e. its surface or volume +shader) with the scalar or pattern input to inputs:color. This +allows the light’s color to tint the geometry’s glow color while +preserving access to intensity and other light controls as ways to +further modulate the illumination. +independent: All primary and secondary rays see the emissive/glow +response as dictated by the bound Material, while the base color seen +by light rays is determined solely by inputs:color. Note that for +partially emissive geometry (in which some parts are reflective rather +than emissive), a suitable pattern must be connected to the light’s +color input, or else the light will radiate uniformly from the +geometry. +noMaterialResponse: The geometry behaves as if there is no +Material bound at all, i.e. there is no diffuse, specular, or +transmissive response. The base color of light rays is entirely +controlled by the inputs:color. This is the standard mode +for”canonical”lights in UsdLux and indicates to renderers that a +Material will either never be bound or can always be ignored. + +Declaration +uniform token light:materialSyncMode ="noMaterialResponse" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +materialGlowTintsLight, independent, noMaterialResponse + +GetNormalizeAttr() → Attribute +Normalizes power by the surface area of the light. +This makes it easier to independently adjust the power and shape of +the light, by causing the power to not vary with the area or angular +size of the light. +Declaration +bool inputs:normalize = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetOutput(name) → Output +Return the requested output if it exists. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Outputs are represented by attributes in the”outputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetShaderId(renderContexts) → str +Return the light’s shader ID for the given list of available +renderContexts . +The shader ID returned by this function is the identifier to use when +looking up the shader definition for this light in the shader +registry. +The render contexts are expected to be listed in priority order, so +for each render context provided, this will try to find the shader ID +attribute specific to that render context (see +GetShaderIdAttrForRenderContext() ) and will return the value of the +first one found that has a non-empty value. If no shader ID value can +be found for any of the given render contexts or renderContexts is +empty, then this will return the value of the default shader ID +attribute (see GetShaderIdAttr() ). + +Parameters +renderContexts (list[TfToken]) – + +GetShaderIdAttr() → Attribute +Default ID for the light’s shader. +This defines the shader ID for this light when a render context +specific shader ID is not available. +The default shaderId for the intrinsic UsdLux lights (RectLight, +DistantLight, etc.) are set to default to the light’s type name. For +each intrinsic UsdLux light, we will always register an SdrShaderNode +in the SdrRegistry, with the identifier matching the type name and the +source type”USD”, that corresponds to the light’s inputs. +GetShaderId +GetShaderIdAttrForRenderContext +SdrRegistry::GetShaderNodeByIdentifier +SdrRegistry::GetShaderNodeByIdentifierAndType +Declaration +uniform token light:shaderId ="" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +GetShaderIdAttrForRenderContext(renderContext) → Attribute +Returns the shader ID attribute for the given renderContext . +If renderContext is non-empty, this will try to return an +attribute named light:shaderId with the namespace prefix +renderContext . For example, if the passed in render context +is”ri”then the attribute returned by this function would have the +following signature: +Declaration +token ri:light:shaderId +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +If the render context is empty, this will return the default shader ID +attribute as returned by GetShaderIdAttr() . + +Parameters +renderContext (str) – + +GetShadowLinkCollectionAPI() → CollectionAPI +Return the UsdCollectionAPI interface used for examining and modifying +the shadow-linking of this light. +Shadow-linking controls which geometry casts shadows from this light. + +GetSpecularAttr() → Attribute +A multiplier for the effect of this light on the specular response of +materials. +This is a non-physical control. +Declaration +float inputs:specular = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdLux.LightFilter +A light filter modifies the effect of a light. Lights refer to filters +via relationships so that filters may be shared. +Linking +Filters can be linked to geometry. Linking controls which geometry a +light-filter affects, when considering the light filters attached to a +light illuminating the geometry. +Linking is specified as a collection (UsdCollectionAPI) which can be +accessed via GetFilterLinkCollection(). +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdLuxTokens. So to set an attribute to the value”rightHanded”, use +UsdLuxTokens->rightHanded as the value. +Methods: + +ConnectableAPI() +Contructs and returns a UsdShadeConnectableAPI object with this light filter. + +CreateInput(name, typeName) +Create an input which can either have a value or can be connected. + +CreateOutput(name, typeName) +Create an output which can either have a value or can be connected. + +CreateShaderIdAttr(defaultValue, writeSparsely) +See GetShaderIdAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShaderIdAttrForRenderContext(...) +Creates the shader ID attribute for the given renderContext . + +Define +classmethod Define(stage, path) -> LightFilter + +Get +classmethod Get(stage, path) -> LightFilter + +GetFilterLinkCollectionAPI() +Return the UsdCollectionAPI interface used for examining and modifying the filter-linking of this light filter. + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Inputs are represented by attributes in the"inputs:"namespace. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Outputs are represented by attributes in the"outputs:"namespace. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetShaderId(renderContexts) +Return the light filter's shader ID for the given list of available renderContexts . + +GetShaderIdAttr() +Default ID for the light filter's shader. + +GetShaderIdAttrForRenderContext(renderContext) +Returns the shader ID attribute for the given renderContext . + +ConnectableAPI() → ConnectableAPI +Contructs and returns a UsdShadeConnectableAPI object with this light +filter. +Note that most tasks can be accomplished without explicitly +constructing a UsdShadeConnectable API, since connection-related API +such as UsdShadeConnectableAPI::ConnectToSource() are static methods, +and UsdLuxLightFilter will auto-convert to a UsdShadeConnectableAPI +when passed to functions that want to act generically on a connectable +UsdShadeConnectableAPI object. + +CreateInput(name, typeName) → Input +Create an input which can either have a value or can be connected. +The attribute representing the input is created in +the”inputs:”namespace. Inputs on light filters are connectable. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateOutput(name, typeName) → Output +Create an output which can either have a value or can be connected. +The attribute representing the output is created in +the”outputs:”namespace. Outputs on a light filter cannot be connected, +as their value is assumed to be computed externally. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateShaderIdAttr(defaultValue, writeSparsely) → Attribute +See GetShaderIdAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShaderIdAttrForRenderContext(renderContext, defaultValue, writeSparsely) → Attribute +Creates the shader ID attribute for the given renderContext . +See GetShaderIdAttrForRenderContext() , and also Create vs Get +Property Methods for when to use Get vs Create. If specified, author +defaultValue as the attribute’s default, sparsely (when it makes +sense to do so) if writeSparsely is true - the default for +writeSparsely is false . + +Parameters + +renderContext (str) – +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> LightFilter +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> LightFilter +Return a UsdLuxLightFilter holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxLightFilter(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFilterLinkCollectionAPI() → CollectionAPI +Return the UsdCollectionAPI interface used for examining and modifying +the filter-linking of this light filter. +Linking controls which geometry this light filter affects. + +GetInput(name) → Input +Return the requested input if it exists. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Inputs are represented by attributes in the”inputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +GetOutput(name) → Output +Return the requested output if it exists. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Outputs are represented by attributes in the”outputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetShaderId(renderContexts) → str +Return the light filter’s shader ID for the given list of available +renderContexts . +The shader ID returned by this function is the identifier to use when +looking up the shader definition for this light filter in the shader +registry. +The render contexts are expected to be listed in priority order, so +for each render context provided, this will try to find the shader ID +attribute specific to that render context (see +GetShaderIdAttrForRenderContext() ) and will return the value of the +first one found that has a non-empty value. If no shader ID value can +be found for any of the given render contexts or renderContexts is +empty, then this will return the value of the default shader ID +attribute (see GetShaderIdAttr() ). + +Parameters +renderContexts (list[TfToken]) – + +GetShaderIdAttr() → Attribute +Default ID for the light filter’s shader. +This defines the shader ID for this light filter when a render context +specific shader ID is not available. +GetShaderId +GetShaderIdAttrForRenderContext +SdrRegistry::GetShaderNodeByIdentifier +SdrRegistry::GetShaderNodeByIdentifierAndType +Declaration +uniform token lightFilter:shaderId ="" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +GetShaderIdAttrForRenderContext(renderContext) → Attribute +Returns the shader ID attribute for the given renderContext . +If renderContext is non-empty, this will try to return an +attribute named lightFilter:shaderId with the namespace prefix +renderContext . For example, if the passed in render context +is”ri”then the attribute returned by this function would have the +following signature: +Declaration +token ri:lightFilter:shaderId +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +If the render context is empty, this will return the default shader ID +attribute as returned by GetShaderIdAttr() . + +Parameters +renderContext (str) – + +class pxr.UsdLux.LightListAPI +API schema to support discovery and publishing of lights in a scene. + +## Discovering Lights via Traversal + +To motivate this API, consider what is required to discover all lights +in a scene. We must load all payloads and traverse all prims: +01 // Load everything on the stage so we can find all lights, +02 // including those inside payloads +03 stage->Load(); +04 +05 // Traverse all prims, checking if they have an applied UsdLuxLightAPI +06 // (Note: ignoring instancing and a few other things for simplicity) +07 SdfPathVector lights; +08 for (UsdPrim prim: stage->Traverse()) { +09 if (prim.HasAPI()) { +10 lights.push_back(i->GetPath()); +11 } +12 } + +This traversal suitably elaborated to handle certain details is the +first and simplest thing UsdLuxLightListAPI provides. +UsdLuxLightListAPI::ComputeLightList() performs this traversal and +returns all lights in the scene: +01 UsdLuxLightListAPI listAPI(stage->GetPseudoRoot()); +02 SdfPathVector lights = listAPI.ComputeLightList(); + +## Publishing a Cached Light List + +Consider a USD client that needs to quickly discover lights but wants +to defer loading payloads and traversing the entire scene where +possible, and is willing to do up-front computation and caching to +achieve that. +UsdLuxLightListAPI provides a way to cache the computed light list, by +publishing the list of lights onto prims in the model hierarchy. +Consider a big set that contains lights: +01 def Xform "BigSetWithLights" ( +02 kind = "assembly" +03 payload = @BigSetWithLights.usd@ // Heavy payload +04 ) { +05 // Pre-computed, cached list of lights inside payload +06 rel lightList = [ +07 <./Lights/light_1>, +08 <./Lights/light_2>, +09 \.\.\. +10 ] +11 token lightList:cacheBehavior = "consumeAndContinue"; +12 } + +The lightList relationship encodes a set of lights, and the +lightList:cacheBehavior property provides fine-grained control over +how to use that cache. (See details below.) +The cache can be created by first invoking +ComputeLightList(ComputeModeIgnoreCache) to pre-compute the list and +then storing the result with UsdLuxLightListAPI::StoreLightList() . +To enable efficient retrieval of the cache, it should be stored on a +model hierarchy prim. Furthermore, note that while you can use a +UsdLuxLightListAPI bound to the pseudo-root prim to query the lights +(as in the example above) because it will perform a traversal over +descendants, you cannot store the cache back to the pseduo-root prim. +To consult the cached list, we invoke +ComputeLightList(ComputeModeConsultModelHierarchyCache): +01 // Find and load all lights, using lightList cache where available +02 UsdLuxLightListAPI list(stage->GetPseudoRoot()); +03 SdfPathSet lights = list.ComputeLightList( +04 UsdLuxLightListAPI::ComputeModeConsultModelHierarchyCache); +05 stage.LoadAndUnload(lights, SdfPathSet()); + +In this mode, ComputeLightList() will traverse the model hierarchy, +accumulating cached light lists. + +## Controlling Cache Behavior + +The lightList:cacheBehavior property gives additional fine-grained +control over cache behavior: + +The fallback value,”ignore”, indicates that the lightList should +be disregarded. This provides a way to invalidate cache entries. Note +that unless”ignore”is specified, a lightList with an empty list of +targets is considered a cache indicating that no lights are present. +The value”consumeAndContinue”indicates that the cache should be +consulted to contribute lights to the scene, and that recursion should +continue down the model hierarchy in case additional lights are added +as descedants. This is the default value established when +StoreLightList() is invoked. This behavior allows the lights within a +large model, such as the BigSetWithLights example above, to be +published outside the payload, while also allowing referencing and +layering to add additional lights over that set. +The value”consumeAndHalt”provides a way to terminate recursive +traversal of the scene for light discovery. The cache will be +consulted but no descendant prims will be examined. + +## Instancing + +Where instances are present, UsdLuxLightListAPI::ComputeLightList() +will return the instance-unique paths to any lights discovered within +those instances. Lights within a UsdGeomPointInstancer will not be +returned, however, since they cannot be referred to solely via paths. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdLuxTokens. So to set an attribute to the value”rightHanded”, use +UsdLuxTokens->rightHanded as the value. +Classes: + +ComputeMode +Runtime control over whether to consult stored lightList caches. + +Methods: + +Apply +classmethod Apply(prim) -> LightListAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ComputeLightList(mode) +Computes and returns the list of lights and light filters in the stage, optionally consulting a cached result. + +CreateLightListCacheBehaviorAttr(...) +See GetLightListCacheBehaviorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLightListRel() +See GetLightListRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> LightListAPI + +GetLightListCacheBehaviorAttr() +Controls how the lightList should be interpreted. + +GetLightListRel() +Relationship to lights in the scene. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +InvalidateLightList() +Mark any stored lightlist as invalid, by setting the lightList:cacheBehavior attribute to ignore. + +StoreLightList(arg1) +Store the given paths as the lightlist for this prim. + +Attributes: + +ComputeModeConsultModelHierarchyCache + +ComputeModeIgnoreCache + +class ComputeMode +Runtime control over whether to consult stored lightList caches. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdLux.LightListAPI.ComputeModeConsultModelHierarchyCache, UsdLux.LightListAPI.ComputeModeIgnoreCache) + +static Apply() +classmethod Apply(prim) -> LightListAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”LightListAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdLuxLightListAPI object is returned upon success. An invalid +(or empty) UsdLuxLightListAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ComputeLightList(mode) → SdfPathSet +Computes and returns the list of lights and light filters in the +stage, optionally consulting a cached result. +In ComputeModeIgnoreCache mode, caching is ignored, and this does a +prim traversal looking for prims that have a UsdLuxLightAPI or are of +type UsdLuxLightFilter. +In ComputeModeConsultModelHierarchyCache, this does a traversal only +of the model hierarchy. In this traversal, any lights that live as +model hierarchy prims are accumulated, as well as any paths stored in +lightList caches. The lightList:cacheBehavior attribute gives further +control over the cache behavior; see the class overview for details. +When instances are present, ComputeLightList(ComputeModeIgnoreCache) +will return the instance-uniqiue paths to any lights discovered within +those instances. Lights within a UsdGeomPointInstancer will not be +returned, however, since they cannot be referred to solely via paths. + +Parameters +mode (ComputeMode) – + +CreateLightListCacheBehaviorAttr(defaultValue, writeSparsely) → Attribute +See GetLightListCacheBehaviorAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLightListRel() → Relationship +See GetLightListRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +static Get() +classmethod Get(stage, path) -> LightListAPI +Return a UsdLuxLightListAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxLightListAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetLightListCacheBehaviorAttr() → Attribute +Controls how the lightList should be interpreted. +Valid values are: + +consumeAndHalt: The lightList should be consulted, and if it +exists, treated as a final authoritative statement of any lights that +exist at or below this prim, halting recursive discovery of lights. +consumeAndContinue: The lightList should be consulted, but +recursive traversal over nameChildren should continue in case +additional lights are added by descendants. +ignore: The lightList should be entirely ignored. This provides a +simple way to temporarily invalidate an existing cache. This is the +fallback behavior. + +Declaration +token lightList:cacheBehavior +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +consumeAndHalt, consumeAndContinue, ignore + +GetLightListRel() → Relationship +Relationship to lights in the scene. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +InvalidateLightList() → None +Mark any stored lightlist as invalid, by setting the +lightList:cacheBehavior attribute to ignore. + +StoreLightList(arg1) → None +Store the given paths as the lightlist for this prim. +Paths that do not have this prim’s path as a prefix will be silently +ignored. This will set the listList:cacheBehavior +to”consumeAndContinue”. + +Parameters +arg1 (SdfPathSet) – + +ComputeModeConsultModelHierarchyCache = UsdLux.LightListAPI.ComputeModeConsultModelHierarchyCache + +ComputeModeIgnoreCache = UsdLux.LightListAPI.ComputeModeIgnoreCache + +class pxr.UsdLux.ListAPI +Deprecated +Use LightListAPI instead +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdLuxTokens. So to set an attribute to the value”rightHanded”, use +UsdLuxTokens->rightHanded as the value. +Classes: + +ComputeMode +Runtime control over whether to consult stored lightList caches. + +Methods: + +Apply +classmethod Apply(prim) -> ListAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ComputeLightList(mode) +Computes and returns the list of lights and light filters in the stage, optionally consulting a cached result. + +CreateLightListCacheBehaviorAttr(...) +See GetLightListCacheBehaviorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLightListRel() +See GetLightListRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> ListAPI + +GetLightListCacheBehaviorAttr() +Controls how the lightList should be interpreted. + +GetLightListRel() +Relationship to lights in the scene. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +InvalidateLightList() +Mark any stored lightlist as invalid, by setting the lightList:cacheBehavior attribute to ignore. + +StoreLightList(arg1) +Store the given paths as the lightlist for this prim. + +Attributes: + +ComputeModeConsultModelHierarchyCache + +ComputeModeIgnoreCache + +class ComputeMode +Runtime control over whether to consult stored lightList caches. +Methods: + +GetValueFromName + +Attributes: + +allValues + +static GetValueFromName() + +allValues = (UsdLux.ListAPI.ComputeModeConsultModelHierarchyCache, UsdLux.ListAPI.ComputeModeIgnoreCache) + +static Apply() +classmethod Apply(prim) -> ListAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”ListAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdLuxListAPI object is returned upon success. An invalid (or +empty) UsdLuxListAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ComputeLightList(mode) → SdfPathSet +Computes and returns the list of lights and light filters in the +stage, optionally consulting a cached result. +In ComputeModeIgnoreCache mode, caching is ignored, and this does a +prim traversal looking for prims that have a UsdLuxLightAPI or are of +type UsdLuxLightFilter. +In ComputeModeConsultModelHierarchyCache, this does a traversal only +of the model hierarchy. In this traversal, any lights that live as +model hierarchy prims are accumulated, as well as any paths stored in +lightList caches. The lightList:cacheBehavior attribute gives further +control over the cache behavior; see the class overview for details. +When instances are present, ComputeLightList(ComputeModeIgnoreCache) +will return the instance-uniqiue paths to any lights discovered within +those instances. Lights within a UsdGeomPointInstancer will not be +returned, however, since they cannot be referred to solely via paths. + +Parameters +mode (ComputeMode) – + +CreateLightListCacheBehaviorAttr(defaultValue, writeSparsely) → Attribute +See GetLightListCacheBehaviorAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLightListRel() → Relationship +See GetLightListRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +static Get() +classmethod Get(stage, path) -> ListAPI +Return a UsdLuxListAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxListAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetLightListCacheBehaviorAttr() → Attribute +Controls how the lightList should be interpreted. +Valid values are: + +consumeAndHalt: The lightList should be consulted, and if it +exists, treated as a final authoritative statement of any lights that +exist at or below this prim, halting recursive discovery of lights. +consumeAndContinue: The lightList should be consulted, but +recursive traversal over nameChildren should continue in case +additional lights are added by descendants. +ignore: The lightList should be entirely ignored. This provides a +simple way to temporarily invalidate an existing cache. This is the +fallback behavior. + +Declaration +token lightList:cacheBehavior +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +consumeAndHalt, consumeAndContinue, ignore + +GetLightListRel() → Relationship +Relationship to lights in the scene. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +InvalidateLightList() → None +Mark any stored lightlist as invalid, by setting the +lightList:cacheBehavior attribute to ignore. + +StoreLightList(arg1) → None +Store the given paths as the lightlist for this prim. +Paths that do not have this prim’s path as a prefix will be silently +ignored. This will set the listList:cacheBehavior +to”consumeAndContinue”. + +Parameters +arg1 (SdfPathSet) – + +ComputeModeConsultModelHierarchyCache = UsdLux.ListAPI.ComputeModeConsultModelHierarchyCache + +ComputeModeIgnoreCache = UsdLux.ListAPI.ComputeModeIgnoreCache + +class pxr.UsdLux.MeshLightAPI +This is the preferred API schema to apply to Mesh type prims when +adding light behaviors to a mesh. At its base, this API schema has the +built-in behavior of applying LightAPI to the mesh and overriding the +default materialSyncMode to allow the emission/glow of the bound +material to affect the color of the light. But, it additionally serves +as a hook for plugins to attach additional properties to”mesh +lights”through the creation of API schemas which are authored to auto- +apply to MeshLightAPI. +Auto applied API schemas +Methods: + +Apply +classmethod Apply(prim) -> MeshLightAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +Get +classmethod Get(stage, path) -> MeshLightAPI + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> MeshLightAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”MeshLightAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdLuxMeshLightAPI object is returned upon success. An invalid +(or empty) UsdLuxMeshLightAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +static Get() +classmethod Get(stage, path) -> MeshLightAPI +Return a UsdLuxMeshLightAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxMeshLightAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.NonboundableLightBase +Base class for intrinsic lights that are not boundable. +The primary purpose of this class is to provide a direct API to the +functions provided by LightAPI for concrete derived light types. +Methods: + +CreateColorAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateColorAttr() . + +CreateColorTemperatureAttr(defaultValue, ...) +See UsdLuxLightAPI::CreateColorTemperatureAttr() . + +CreateDiffuseAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateDiffuseAttr() . + +CreateEnableColorTemperatureAttr(...) +See UsdLuxLightAPI::CreateEnableColorTemperatureAttr() . + +CreateExposureAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateExposureAttr() . + +CreateFiltersRel() +See UsdLuxLightAPI::CreateFiltersRel() . + +CreateIntensityAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateIntensityAttr() . + +CreateNormalizeAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateNormalizeAttr() . + +CreateSpecularAttr(defaultValue, writeSparsely) +See UsdLuxLightAPI::CreateSpecularAttr() . + +Get +classmethod Get(stage, path) -> NonboundableLightBase + +GetColorAttr() +See UsdLuxLightAPI::GetColorAttr() . + +GetColorTemperatureAttr() +See UsdLuxLightAPI::GetColorTemperatureAttr() . + +GetDiffuseAttr() +See UsdLuxLightAPI::GetDiffuseAttr() . + +GetEnableColorTemperatureAttr() +See UsdLuxLightAPI::GetEnableColorTemperatureAttr() . + +GetExposureAttr() +See UsdLuxLightAPI::GetExposureAttr() . + +GetFiltersRel() +See UsdLuxLightAPI::GetFiltersRel() . + +GetIntensityAttr() +See UsdLuxLightAPI::GetIntensityAttr() . + +GetNormalizeAttr() +See UsdLuxLightAPI::GetNormalizeAttr() . + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSpecularAttr() +See UsdLuxLightAPI::GetSpecularAttr() . + +LightAPI() +Contructs and returns a UsdLuxLightAPI object for this light. + +CreateColorAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateColorAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateColorTemperatureAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateColorTemperatureAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDiffuseAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateDiffuseAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateEnableColorTemperatureAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateEnableColorTemperatureAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExposureAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateExposureAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFiltersRel() → Relationship +See UsdLuxLightAPI::CreateFiltersRel() . + +CreateIntensityAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateIntensityAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateNormalizeAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateNormalizeAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSpecularAttr(defaultValue, writeSparsely) → Attribute +See UsdLuxLightAPI::CreateSpecularAttr() . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> NonboundableLightBase +Return a UsdLuxNonboundableLightBase holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxNonboundableLightBase(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetColorAttr() → Attribute +See UsdLuxLightAPI::GetColorAttr() . + +GetColorTemperatureAttr() → Attribute +See UsdLuxLightAPI::GetColorTemperatureAttr() . + +GetDiffuseAttr() → Attribute +See UsdLuxLightAPI::GetDiffuseAttr() . + +GetEnableColorTemperatureAttr() → Attribute +See UsdLuxLightAPI::GetEnableColorTemperatureAttr() . + +GetExposureAttr() → Attribute +See UsdLuxLightAPI::GetExposureAttr() . + +GetFiltersRel() → Relationship +See UsdLuxLightAPI::GetFiltersRel() . + +GetIntensityAttr() → Attribute +See UsdLuxLightAPI::GetIntensityAttr() . + +GetNormalizeAttr() → Attribute +See UsdLuxLightAPI::GetNormalizeAttr() . + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSpecularAttr() → Attribute +See UsdLuxLightAPI::GetSpecularAttr() . + +LightAPI() → LightAPI +Contructs and returns a UsdLuxLightAPI object for this light. + +class pxr.UsdLux.PluginLight +Light that provides properties that allow it to identify an external +SdrShadingNode definition, through UsdShadeNodeDefAPI, that can be +provided to render delegates without the need to provide a schema +definition for the light’s type. +Plugin Lights and Light Filters +Methods: + +Define +classmethod Define(stage, path) -> PluginLight + +Get +classmethod Get(stage, path) -> PluginLight + +GetNodeDefAPI() +Convenience method for accessing the UsdShadeNodeDefAPI functionality for this prim. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> PluginLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> PluginLight +Return a UsdLuxPluginLight holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxPluginLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetNodeDefAPI() → NodeDefAPI +Convenience method for accessing the UsdShadeNodeDefAPI functionality +for this prim. +One can also construct a UsdShadeNodeDefAPI directly from a UsdPrim. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.PluginLightFilter +Light filter that provides properties that allow it to identify an +external SdrShadingNode definition, through UsdShadeNodeDefAPI, that +can be provided to render delegates without the need to provide a +schema definition for the light filter’s type. +Plugin Lights and Light Filters +Methods: + +Define +classmethod Define(stage, path) -> PluginLightFilter + +Get +classmethod Get(stage, path) -> PluginLightFilter + +GetNodeDefAPI() +Convenience method for accessing the UsdShadeNodeDefAPI functionality for this prim. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> PluginLightFilter +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> PluginLightFilter +Return a UsdLuxPluginLightFilter holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxPluginLightFilter(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetNodeDefAPI() → NodeDefAPI +Convenience method for accessing the UsdShadeNodeDefAPI functionality +for this prim. +One can also construct a UsdShadeNodeDefAPI directly from a UsdPrim. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.PortalLight +A rectangular portal in the local XY plane that guides sampling of a +dome light. Transmits light in the -Z direction. The rectangle is 1 +unit in length. +Methods: + +Define +classmethod Define(stage, path) -> PortalLight + +Get +classmethod Get(stage, path) -> PortalLight + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> PortalLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> PortalLight +Return a UsdLuxPortalLight holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxPortalLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdLux.RectLight +Light emitted from one side of a rectangle. The rectangle is centered +in the XY plane and emits light along the -Z axis. The rectangle is 1 +unit in length in the X and Y axis. In the default position, a texture +file’s min coordinates should be at (+X, +Y) and max coordinates at +(-X, -Y). +Methods: + +CreateHeightAttr(defaultValue, writeSparsely) +See GetHeightAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTextureFileAttr(defaultValue, ...) +See GetTextureFileAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateWidthAttr(defaultValue, writeSparsely) +See GetWidthAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> RectLight + +Get +classmethod Get(stage, path) -> RectLight + +GetHeightAttr() +Height of the rectangle, in the local Y axis. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTextureFileAttr() +A color texture to use on the rectangle. + +GetWidthAttr() +Width of the rectangle, in the local X axis. + +CreateHeightAttr(defaultValue, writeSparsely) → Attribute +See GetHeightAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTextureFileAttr(defaultValue, writeSparsely) → Attribute +See GetTextureFileAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateWidthAttr(defaultValue, writeSparsely) → Attribute +See GetWidthAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> RectLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> RectLight +Return a UsdLuxRectLight holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxRectLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetHeightAttr() → Attribute +Height of the rectangle, in the local Y axis. +Declaration +float inputs:height = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTextureFileAttr() → Attribute +A color texture to use on the rectangle. +Declaration +asset inputs:texture:file +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetWidthAttr() → Attribute +Width of the rectangle, in the local X axis. +Declaration +float inputs:width = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdLux.ShadowAPI +Controls to refine a light’s shadow behavior. These are non-physical +controls that are valuable for visual lighting work. +Methods: + +Apply +classmethod Apply(prim) -> ShadowAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ConnectableAPI() +Contructs and returns a UsdShadeConnectableAPI object with this shadow API prim. + +CreateInput(name, typeName) +Create an input which can either have a value or can be connected. + +CreateOutput(name, typeName) +Create an output which can either have a value or can be connected. + +CreateShadowColorAttr(defaultValue, ...) +See GetShadowColorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShadowDistanceAttr(defaultValue, ...) +See GetShadowDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShadowEnableAttr(defaultValue, ...) +See GetShadowEnableAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShadowFalloffAttr(defaultValue, ...) +See GetShadowFalloffAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShadowFalloffGammaAttr(defaultValue, ...) +See GetShadowFalloffGammaAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> ShadowAPI + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Inputs are represented by attributes in the"inputs:"namespace. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Outputs are represented by attributes in the"outputs:"namespace. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetShadowColorAttr() +The color of shadows cast by the light. + +GetShadowDistanceAttr() +The maximum distance shadows are cast. + +GetShadowEnableAttr() +Enables shadows to be cast by this light. + +GetShadowFalloffAttr() +The near distance at which shadow falloff begins. + +GetShadowFalloffGammaAttr() +A gamma (i.e., exponential) control over shadow strength with linear distance within the falloff zone. + +static Apply() +classmethod Apply(prim) -> ShadowAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”ShadowAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdLuxShadowAPI object is returned upon success. An invalid +(or empty) UsdLuxShadowAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ConnectableAPI() → ConnectableAPI +Contructs and returns a UsdShadeConnectableAPI object with this shadow +API prim. +Note that a valid UsdLuxShadowAPI will only return a valid +UsdShadeConnectableAPI if the its prim’s Typed schema type is actually +connectable. + +CreateInput(name, typeName) → Input +Create an input which can either have a value or can be connected. +The attribute representing the input is created in +the”inputs:”namespace. Inputs on shadow API are connectable. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateOutput(name, typeName) → Output +Create an output which can either have a value or can be connected. +The attribute representing the output is created in +the”outputs:”namespace. Outputs on a shadow API cannot be connected, +as their value is assumed to be computed externally. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateShadowColorAttr(defaultValue, writeSparsely) → Attribute +See GetShadowColorAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShadowDistanceAttr(defaultValue, writeSparsely) → Attribute +See GetShadowDistanceAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShadowEnableAttr(defaultValue, writeSparsely) → Attribute +See GetShadowEnableAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShadowFalloffAttr(defaultValue, writeSparsely) → Attribute +See GetShadowFalloffAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShadowFalloffGammaAttr(defaultValue, writeSparsely) → Attribute +See GetShadowFalloffGammaAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> ShadowAPI +Return a UsdLuxShadowAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxShadowAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetInput(name) → Input +Return the requested input if it exists. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Inputs are represented by attributes in the”inputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +GetOutput(name) → Output +Return the requested output if it exists. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Outputs are represented by attributes in the”outputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetShadowColorAttr() → Attribute +The color of shadows cast by the light. +This is a non-physical control. The default is to cast black shadows. +Declaration +color3f inputs:shadow:color = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Color3f + +GetShadowDistanceAttr() → Attribute +The maximum distance shadows are cast. +The default value (-1) indicates no limit. +Declaration +float inputs:shadow:distance = -1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetShadowEnableAttr() → Attribute +Enables shadows to be cast by this light. +Declaration +bool inputs:shadow:enable = 1 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetShadowFalloffAttr() → Attribute +The near distance at which shadow falloff begins. +The default value (-1) indicates no falloff. +Declaration +float inputs:shadow:falloff = -1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetShadowFalloffGammaAttr() → Attribute +A gamma (i.e., exponential) control over shadow strength with linear +distance within the falloff zone. +This requires the use of shadowDistance and shadowFalloff. +Declaration +float inputs:shadow:falloffGamma = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdLux.ShapingAPI +Controls for shaping a light’s emission. +Methods: + +Apply +classmethod Apply(prim) -> ShapingAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ConnectableAPI() +Contructs and returns a UsdShadeConnectableAPI object with this shaping API prim. + +CreateInput(name, typeName) +Create an input which can either have a value or can be connected. + +CreateOutput(name, typeName) +Create an output which can either have a value or can be connected. + +CreateShapingConeAngleAttr(defaultValue, ...) +See GetShapingConeAngleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShapingConeSoftnessAttr(defaultValue, ...) +See GetShapingConeSoftnessAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShapingFocusAttr(defaultValue, ...) +See GetShapingFocusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShapingFocusTintAttr(defaultValue, ...) +See GetShapingFocusTintAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShapingIesAngleScaleAttr(defaultValue, ...) +See GetShapingIesAngleScaleAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShapingIesFileAttr(defaultValue, ...) +See GetShapingIesFileAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateShapingIesNormalizeAttr(defaultValue, ...) +See GetShapingIesNormalizeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> ShapingAPI + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Inputs are represented by attributes in the"inputs:"namespace. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Outputs are represented by attributes in the"outputs:"namespace. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetShapingConeAngleAttr() +Angular limit off the primary axis to restrict the light spread. + +GetShapingConeSoftnessAttr() +Controls the cutoff softness for cone angle. + +GetShapingFocusAttr() +A control to shape the spread of light. + +GetShapingFocusTintAttr() +Off-axis color tint. + +GetShapingIesAngleScaleAttr() +Rescales the angular distribution of the IES profile. + +GetShapingIesFileAttr() +An IES (Illumination Engineering Society) light profile describing the angular distribution of light. + +GetShapingIesNormalizeAttr() +Normalizes the IES profile so that it affects the shaping of the light while preserving the overall energy output. + +static Apply() +classmethod Apply(prim) -> ShapingAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”ShapingAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdLuxShapingAPI object is returned upon success. An invalid +(or empty) UsdLuxShapingAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ConnectableAPI() → ConnectableAPI +Contructs and returns a UsdShadeConnectableAPI object with this +shaping API prim. +Note that a valid UsdLuxShapingAPI will only return a valid +UsdShadeConnectableAPI if the its prim’s Typed schema type is actually +connectable. + +CreateInput(name, typeName) → Input +Create an input which can either have a value or can be connected. +The attribute representing the input is created in +the”inputs:”namespace. Inputs on shaping API are connectable. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateOutput(name, typeName) → Output +Create an output which can either have a value or can be connected. +The attribute representing the output is created in +the”outputs:”namespace. Outputs on a shaping API cannot be connected, +as their value is assumed to be computed externally. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateShapingConeAngleAttr(defaultValue, writeSparsely) → Attribute +See GetShapingConeAngleAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShapingConeSoftnessAttr(defaultValue, writeSparsely) → Attribute +See GetShapingConeSoftnessAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShapingFocusAttr(defaultValue, writeSparsely) → Attribute +See GetShapingFocusAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShapingFocusTintAttr(defaultValue, writeSparsely) → Attribute +See GetShapingFocusTintAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShapingIesAngleScaleAttr(defaultValue, writeSparsely) → Attribute +See GetShapingIesAngleScaleAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShapingIesFileAttr(defaultValue, writeSparsely) → Attribute +See GetShapingIesFileAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateShapingIesNormalizeAttr(defaultValue, writeSparsely) → Attribute +See GetShapingIesNormalizeAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> ShapingAPI +Return a UsdLuxShapingAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxShapingAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetInput(name) → Input +Return the requested input if it exists. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Inputs are represented by attributes in the”inputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +GetOutput(name) → Output +Return the requested output if it exists. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Outputs are represented by attributes in the”outputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetShapingConeAngleAttr() → Attribute +Angular limit off the primary axis to restrict the light spread. +Declaration +float inputs:shaping:cone:angle = 90 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetShapingConeSoftnessAttr() → Attribute +Controls the cutoff softness for cone angle. +TODO: clarify semantics +Declaration +float inputs:shaping:cone:softness = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetShapingFocusAttr() → Attribute +A control to shape the spread of light. +Higher focus values pull light towards the center and narrow the +spread. Implemented as an off-axis cosine power exponent. TODO: +clarify semantics +Declaration +float inputs:shaping:focus = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetShapingFocusTintAttr() → Attribute +Off-axis color tint. +This tints the emission in the falloff region. The default tint is +black. TODO: clarify semantics +Declaration +color3f inputs:shaping:focusTint = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Color3f + +GetShapingIesAngleScaleAttr() → Attribute +Rescales the angular distribution of the IES profile. +TODO: clarify semantics +Declaration +float inputs:shaping:ies:angleScale = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetShapingIesFileAttr() → Attribute +An IES (Illumination Engineering Society) light profile describing the +angular distribution of light. +Declaration +asset inputs:shaping:ies:file +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +GetShapingIesNormalizeAttr() → Attribute +Normalizes the IES profile so that it affects the shaping of the light +while preserving the overall energy output. +Declaration +bool inputs:shaping:ies:normalize = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +class pxr.UsdLux.SphereLight +Light emitted outward from a sphere. +Methods: + +CreateRadiusAttr(defaultValue, writeSparsely) +See GetRadiusAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTreatAsPointAttr(defaultValue, ...) +See GetTreatAsPointAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> SphereLight + +Get +classmethod Get(stage, path) -> SphereLight + +GetRadiusAttr() +Radius of the sphere. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTreatAsPointAttr() +A hint that this light can be treated as a'point'light (effectively, a zero-radius sphere) by renderers that benefit from non-area lighting. + +CreateRadiusAttr(defaultValue, writeSparsely) → Attribute +See GetRadiusAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTreatAsPointAttr(defaultValue, writeSparsely) → Attribute +See GetTreatAsPointAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> SphereLight +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> SphereLight +Return a UsdLuxSphereLight holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxSphereLight(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetRadiusAttr() → Attribute +Radius of the sphere. +Declaration +float inputs:radius = 0.5 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTreatAsPointAttr() → Attribute +A hint that this light can be treated as a’point’light (effectively, a +zero-radius sphere) by renderers that benefit from non-area lighting. +Renderers that only support area lights can disregard this. +Declaration +bool treatAsPoint = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +class pxr.UsdLux.Tokens +Attributes: + +angular + +automatic + +collectionFilterLinkIncludeRoot + +collectionLightLinkIncludeRoot + +collectionShadowLinkIncludeRoot + +consumeAndContinue + +consumeAndHalt + +cubeMapVerticalCross + +cylinderLight + +diskLight + +distantLight + +domeLight + +extent + +filterLink + +geometry + +geometryLight + +guideRadius + +ignore + +independent + +inputsAngle + +inputsColor + +inputsColorTemperature + +inputsDiffuse + +inputsEnableColorTemperature + +inputsExposure + +inputsHeight + +inputsIntensity + +inputsLength + +inputsNormalize + +inputsRadius + +inputsShadowColor + +inputsShadowDistance + +inputsShadowEnable + +inputsShadowFalloff + +inputsShadowFalloffGamma + +inputsShapingConeAngle + +inputsShapingConeSoftness + +inputsShapingFocus + +inputsShapingFocusTint + +inputsShapingIesAngleScale + +inputsShapingIesFile + +inputsShapingIesNormalize + +inputsSpecular + +inputsTextureFile + +inputsTextureFormat + +inputsWidth + +latlong + +lightFilterShaderId + +lightFilters + +lightLink + +lightList + +lightListCacheBehavior + +lightMaterialSyncMode + +lightShaderId + +materialGlowTintsLight + +meshLight + +mirroredBall + +noMaterialResponse + +orientToStageUpAxis + +portalLight + +portals + +rectLight + +shadowLink + +sphereLight + +treatAsLine + +treatAsPoint + +volumeLight + +angular = 'angular' + +automatic = 'automatic' + +collectionFilterLinkIncludeRoot = 'collection:filterLink:includeRoot' + +collectionLightLinkIncludeRoot = 'collection:lightLink:includeRoot' + +collectionShadowLinkIncludeRoot = 'collection:shadowLink:includeRoot' + +consumeAndContinue = 'consumeAndContinue' + +consumeAndHalt = 'consumeAndHalt' + +cubeMapVerticalCross = 'cubeMapVerticalCross' + +cylinderLight = 'CylinderLight' + +diskLight = 'DiskLight' + +distantLight = 'DistantLight' + +domeLight = 'DomeLight' + +extent = 'extent' + +filterLink = 'filterLink' + +geometry = 'geometry' + +geometryLight = 'GeometryLight' + +guideRadius = 'guideRadius' + +ignore = 'ignore' + +independent = 'independent' + +inputsAngle = 'inputs:angle' + +inputsColor = 'inputs:color' + +inputsColorTemperature = 'inputs:colorTemperature' + +inputsDiffuse = 'inputs:diffuse' + +inputsEnableColorTemperature = 'inputs:enableColorTemperature' + +inputsExposure = 'inputs:exposure' + +inputsHeight = 'inputs:height' + +inputsIntensity = 'inputs:intensity' + +inputsLength = 'inputs:length' + +inputsNormalize = 'inputs:normalize' + +inputsRadius = 'inputs:radius' + +inputsShadowColor = 'inputs:shadow:color' + +inputsShadowDistance = 'inputs:shadow:distance' + +inputsShadowEnable = 'inputs:shadow:enable' + +inputsShadowFalloff = 'inputs:shadow:falloff' + +inputsShadowFalloffGamma = 'inputs:shadow:falloffGamma' + +inputsShapingConeAngle = 'inputs:shaping:cone:angle' + +inputsShapingConeSoftness = 'inputs:shaping:cone:softness' + +inputsShapingFocus = 'inputs:shaping:focus' + +inputsShapingFocusTint = 'inputs:shaping:focusTint' + +inputsShapingIesAngleScale = 'inputs:shaping:ies:angleScale' + +inputsShapingIesFile = 'inputs:shaping:ies:file' + +inputsShapingIesNormalize = 'inputs:shaping:ies:normalize' + +inputsSpecular = 'inputs:specular' + +inputsTextureFile = 'inputs:texture:file' + +inputsTextureFormat = 'inputs:texture:format' + +inputsWidth = 'inputs:width' + +latlong = 'latlong' + +lightFilterShaderId = 'lightFilter:shaderId' + +lightFilters = 'light:filters' + +lightLink = 'lightLink' + +lightList = 'lightList' + +lightListCacheBehavior = 'lightList:cacheBehavior' + +lightMaterialSyncMode = 'light:materialSyncMode' + +lightShaderId = 'light:shaderId' + +materialGlowTintsLight = 'materialGlowTintsLight' + +meshLight = 'MeshLight' + +mirroredBall = 'mirroredBall' + +noMaterialResponse = 'noMaterialResponse' + +orientToStageUpAxis = 'orientToStageUpAxis' + +portalLight = 'PortalLight' + +portals = 'portals' + +rectLight = 'RectLight' + +shadowLink = 'shadowLink' + +sphereLight = 'SphereLight' + +treatAsLine = 'treatAsLine' + +treatAsPoint = 'treatAsPoint' + +volumeLight = 'VolumeLight' + +class pxr.UsdLux.VolumeLightAPI +This is the preferred API schema to apply to Volume type prims when +adding light behaviors to a volume. At its base, this API schema has +the built-in behavior of applying LightAPI to the volume and +overriding the default materialSyncMode to allow the emission/glow of +the bound material to affect the color of the light. But, it +additionally serves as a hook for plugins to attach additional +properties to”volume lights”through the creation of API schemas which +are authored to auto-apply to VolumeLightAPI. +Auto applied API schemas +Methods: + +Apply +classmethod Apply(prim) -> VolumeLightAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +Get +classmethod Get(stage, path) -> VolumeLightAPI + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> VolumeLightAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”VolumeLightAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdLuxVolumeLightAPI object is returned upon success. An +invalid (or empty) UsdLuxVolumeLightAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +static Get() +classmethod Get(stage, path) -> VolumeLightAPI +Return a UsdLuxVolumeLightAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdLuxVolumeLightAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdMedia.md b/UsdMedia.md new file mode 100644 index 0000000000000000000000000000000000000000..307efa29647f46bb1de4d33717599ab5562c5408 --- /dev/null +++ b/UsdMedia.md @@ -0,0 +1,462 @@ + + +UsdMedia module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdMedia module + +  + +# UsdMedia module + +Summary: The UsdMedia module provides a representation for including other media, such as audio, in the context of a stage. UsdMedia currently contains one media type, UsdMediaSpatialAudio, which allows the playback of audio files both spatially and non-spatially. + +Classes: + +SpatialAudio +The SpatialAudio primitive defines basic properties for encoding playback of an audio file or stream within a USD Stage. + +Tokens + +class pxr.UsdMedia.SpatialAudio +The SpatialAudio primitive defines basic properties for encoding +playback of an audio file or stream within a USD Stage. The +SpatialAudio schema derives from UsdGeomXformable since it can support +full spatial audio while also supporting non-spatial mono and stereo +sounds. One or more SpatialAudio prims can be placed anywhere in the +namespace, though it is advantageous to place truly spatial audio +prims under/inside the models from which the sound emanates, so that +the audio prim need only be transformed relative to the model, rather +than copying its animation. + +## Timecode Attributes and Time Scaling + +startTime and endTime are timecode valued attributes which gives +them the special behavior that layer offsets affecting the layer in +which one of these values is authored are applied to the attribute’s +value itself during value resolution. This allows audio playback to be +kept in sync with time sampled animation as the animation is affected +by layer offsets in the composition. But this behavior brings with it +some interesting edge cases and caveats when it comes to layer offsets +that include scale. +Although authored layer offsets may have a time scale which can scale +the duration between an authored startTime and endTime, we make no +attempt to infer any playback dilation of the actual audio media +itself. Given that startTime and endTime can be independently +authored in different layers with differing time scales, it is not +possible, in general, to define an”original timeframe”from which we +can compute a dilation to composed stage-time. Even if we could +compute a composed dilation this way, it would still be impossible to +flatten a stage or layer stack into a single layer and still retain +the composed audio dilation using this schema. +Although we do not expect it to be common, it is possible to apply a +negative time scale to USD layers, which mostly has the effect of +reversing animation in the affected composition. If a negative scale +is applied to a composition that contains authored startTime and +endTime, it will reverse their relative ordering in time. Therefore, +we stipulate when playbackMode +is”onceFromStartToEnd”or”loopFromStartToEnd”, if endTime is less +than startTime, then begin playback at endTime, and continue until +startTime. When startTime and endTime are inverted, we do not, +however, stipulate that playback of the audio media itself be +inverted, since doing so”successfully”would require perfect knowledge +of when, within the audio clip, relevant audio ends (so that we know +how to offset the reversed audio to align it so that we reach +the”beginning”at startTime), and sounds played in reverse are not +likely to produce desirable results. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdMediaTokens. So to set an attribute to the value”rightHanded”, +use UsdMediaTokens->rightHanded as the value. +Methods: + +CreateAuralModeAttr(defaultValue, writeSparsely) +See GetAuralModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateEndTimeAttr(defaultValue, writeSparsely) +See GetEndTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFilePathAttr(defaultValue, writeSparsely) +See GetFilePathAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateGainAttr(defaultValue, writeSparsely) +See GetGainAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMediaOffsetAttr(defaultValue, ...) +See GetMediaOffsetAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePlaybackModeAttr(defaultValue, ...) +See GetPlaybackModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateStartTimeAttr(defaultValue, writeSparsely) +See GetStartTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> SpatialAudio + +Get +classmethod Get(stage, path) -> SpatialAudio + +GetAuralModeAttr() +Determines how audio should be played. + +GetEndTimeAttr() +Expressed in the timeCodesPerSecond of the containing stage, endTime specifies when the audio stream will cease playing during animation playback if the length of the referenced audio clip is longer than desired. + +GetFilePathAttr() +Path to the audio file. + +GetGainAttr() +Multiplier on the incoming audio signal. + +GetMediaOffsetAttr() +Expressed in seconds, mediaOffset specifies the offset from the referenced audio file's beginning at which we should begin playback when stage playback reaches the time that prim's audio should start. + +GetPlaybackModeAttr() +Along with startTime and endTime, determines when the audio playback should start and stop during the stage's animation playback and whether the audio should loop during its duration. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetStartTimeAttr() +Expressed in the timeCodesPerSecond of the containing stage, startTime specifies when the audio stream will start playing during animation playback. + +CreateAuralModeAttr(defaultValue, writeSparsely) → Attribute +See GetAuralModeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateEndTimeAttr(defaultValue, writeSparsely) → Attribute +See GetEndTimeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFilePathAttr(defaultValue, writeSparsely) → Attribute +See GetFilePathAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateGainAttr(defaultValue, writeSparsely) → Attribute +See GetGainAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMediaOffsetAttr(defaultValue, writeSparsely) → Attribute +See GetMediaOffsetAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePlaybackModeAttr(defaultValue, writeSparsely) → Attribute +See GetPlaybackModeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateStartTimeAttr(defaultValue, writeSparsely) → Attribute +See GetStartTimeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> SpatialAudio +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> SpatialAudio +Return a UsdMediaSpatialAudio holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdMediaSpatialAudio(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAuralModeAttr() → Attribute +Determines how audio should be played. +Valid values are: + +spatial: Play the audio in 3D space if the device can support +spatial audio. if not, fall back to mono. +nonSpatial: Play the audio without regard to the SpatialAudio +prim’s position. If the audio media contains any form of stereo or +other multi-channel sound, it is left to the application to determine +whether the listener’s position should be taken into account. We +expect nonSpatial to be the choice for ambient sounds and music sound- +tracks. + +Declaration +uniform token auralMode ="spatial" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +spatial, nonSpatial + +GetEndTimeAttr() → Attribute +Expressed in the timeCodesPerSecond of the containing stage, endTime +specifies when the audio stream will cease playing during animation +playback if the length of the referenced audio clip is longer than +desired. +This only applies if playbackMode is set to onceFromStartToEnd or +loopFromStartToEnd, otherwise the endTimeCode of the stage is used +instead of endTime. If endTime is less than startTime, it is +expected that the audio will instead be played from endTime to +startTime. Note that endTime is expressed as a timecode so that +the stage can properly apply layer offsets when resolving its value. +See Timecode Attributes and Time Scaling for more details and caveats. +Declaration +uniform timecode endTime = 0 +C++ Type +SdfTimeCode +Usd Type +SdfValueTypeNames->TimeCode +Variability +SdfVariabilityUniform + +GetFilePathAttr() → Attribute +Path to the audio file. +In general, the formats allowed for audio files is no more constrained +by USD than is image-type. As with images, however, usdz has stricter +requirements based on DMA and format support in browsers and consumer +devices. The allowed audio filetypes for usdz are M4A, MP3, WAV (in +order of preference). +Usdz Specification +Declaration +uniform asset filePath = @@ +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset +Variability +SdfVariabilityUniform + +GetGainAttr() → Attribute +Multiplier on the incoming audio signal. +A value of 0”mutes”the signal. Negative values will be clamped to 0. +Declaration +double gain = 1 +C++ Type +double +Usd Type +SdfValueTypeNames->Double + +GetMediaOffsetAttr() → Attribute +Expressed in seconds, mediaOffset specifies the offset from the +referenced audio file’s beginning at which we should begin playback +when stage playback reaches the time that prim’s audio should start. +If the prim’s playbackMode is a looping mode, mediaOffset is +applied only to the first run-through of the audio clip; the second +and all other loops begin from the start of the audio clip. +Declaration +uniform double mediaOffset = 0 +C++ Type +double +Usd Type +SdfValueTypeNames->Double +Variability +SdfVariabilityUniform + +GetPlaybackModeAttr() → Attribute +Along with startTime and endTime, determines when the audio +playback should start and stop during the stage’s animation playback +and whether the audio should loop during its duration. +Valid values are: + +onceFromStart: Play the audio once, starting at startTime, +continuing until the audio completes. +onceFromStartToEnd: Play the audio once beginning at startTime, +continuing until endTime or until the audio completes, whichever +comes first. +loopFromStart: Start playing the audio at startTime and +continue looping through to the stage’s authored endTimeCode. +loopFromStartToEnd: Start playing the audio at startTime and +continue looping through, stopping the audio at endTime. +loopFromStage: Start playing the audio at the stage’s authored +startTimeCode and continue looping through to the stage’s authored +endTimeCode. This can be useful for ambient sounds that should +always be active. + +Declaration +uniform token playbackMode ="onceFromStart" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +onceFromStart, onceFromStartToEnd, loopFromStart, loopFromStartToEnd, +loopFromStage + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetStartTimeAttr() → Attribute +Expressed in the timeCodesPerSecond of the containing stage, +startTime specifies when the audio stream will start playing during +animation playback. +This value is ignored when playbackMode is set to loopFromStage as, +in this mode, the audio will always start at the stage’s authored +startTimeCode. Note that startTime is expressed as a timecode so +that the stage can properly apply layer offsets when resolving its +value. See Timecode Attributes and Time Scaling for more details and +caveats. +Declaration +uniform timecode startTime = 0 +C++ Type +SdfTimeCode +Usd Type +SdfValueTypeNames->TimeCode +Variability +SdfVariabilityUniform + +class pxr.UsdMedia.Tokens +Attributes: + +auralMode + +endTime + +filePath + +gain + +loopFromStage + +loopFromStart + +loopFromStartToEnd + +mediaOffset + +nonSpatial + +onceFromStart + +onceFromStartToEnd + +playbackMode + +spatial + +startTime + +auralMode = 'auralMode' + +endTime = 'endTime' + +filePath = 'filePath' + +gain = 'gain' + +loopFromStage = 'loopFromStage' + +loopFromStart = 'loopFromStart' + +loopFromStartToEnd = 'loopFromStartToEnd' + +mediaOffset = 'mediaOffset' + +nonSpatial = 'nonSpatial' + +onceFromStart = 'onceFromStart' + +onceFromStartToEnd = 'onceFromStartToEnd' + +playbackMode = 'playbackMode' + +spatial = 'spatial' + +startTime = 'startTime' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdPhysics.md b/UsdPhysics.md new file mode 100644 index 0000000000000000000000000000000000000000..0c789c4637ec2076d1e7f3e433c2b8947cb10808 --- /dev/null +++ b/UsdPhysics.md @@ -0,0 +1,3351 @@ + + +UsdPhysics module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdPhysics module + +  + +# UsdPhysics module + +Summary: The UsdPhysics module defines the physics-related prim and property schemas that together form a physics simulation representation. + +Classes: + +ArticulationRootAPI +PhysicsArticulationRootAPI can be applied to a scene graph node, and marks the subtree rooted here for inclusion in one or more reduced coordinate articulations. + +CollisionAPI +Applies collision attributes to a UsdGeomXformable prim. + +CollisionGroup +Defines a collision group for coarse filtering. + +CollisionGroupTable + +DistanceJoint +Predefined distance joint type (Distance between rigid bodies may be limited to given minimum or maximum distance.) + +DriveAPI +The PhysicsDriveAPI when applied to any joint primitive will drive the joint towards a given target. + +FilteredPairsAPI +API to describe fine-grained filtering. + +FixedJoint +Predefined fixed joint type (All degrees of freedom are removed.) + +Joint +A joint constrains the movement of rigid bodies. + +LimitAPI +The PhysicsLimitAPI can be applied to a PhysicsJoint and will restrict the movement along an axis. + +MassAPI +Defines explicit mass properties (mass, density, inertia etc.). + +MassUnits +Container class for static double-precision symbols representing common mass units of measure expressed in kilograms. + +MaterialAPI +Adds simulation material properties to a Material. + +MeshCollisionAPI +Attributes to control how a Mesh is made into a collider. + +PrismaticJoint +Predefined prismatic joint type (translation along prismatic joint axis is permitted.) + +RevoluteJoint +Predefined revolute joint type (rotation along revolute joint axis is permitted.) + +RigidBodyAPI +Applies physics body attributes to any UsdGeomXformable prim and marks that prim to be driven by a simulation. + +Scene +General physics simulation properties, required for simulation. + +SphericalJoint +Predefined spherical joint type (Removes linear degrees of freedom, cone limit may restrict the motion in a given range.) It allows two limit values, which when equal create a circular, else an elliptic cone limit around the limit axis. + +Tokens + +class pxr.UsdPhysics.ArticulationRootAPI +PhysicsArticulationRootAPI can be applied to a scene graph node, and +marks the subtree rooted here for inclusion in one or more reduced +coordinate articulations. For floating articulations, this should be +on the root body. For fixed articulations (robotics jargon for e.g. a +robot arm for welding that is bolted to the floor), this API can be on +a direct or indirect parent of the root joint which is connected to +the world, or on the joint itself.. +Methods: + +Apply +classmethod Apply(prim) -> ArticulationRootAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +Get +classmethod Get(stage, path) -> ArticulationRootAPI + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> ArticulationRootAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsArticulationRootAPI”to the +token-valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsArticulationRootAPI object is returned upon success. +An invalid (or empty) UsdPhysicsArticulationRootAPI object is returned +upon failure. See UsdPrim::ApplyAPI() for conditions resulting in +failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +static Get() +classmethod Get(stage, path) -> ArticulationRootAPI +Return a UsdPhysicsArticulationRootAPI holding the prim adhering to +this schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsArticulationRootAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.CollisionAPI +Applies collision attributes to a UsdGeomXformable prim. If a +simulation is running, this geometry will collide with other +geometries that have PhysicsCollisionAPI applied. If a prim in the +parent hierarchy has the RigidBodyAPI applied, this collider is a part +of that body. If there is no body in the parent hierarchy, this +collider is considered to be static. +Methods: + +Apply +classmethod Apply(prim) -> CollisionAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateCollisionEnabledAttr(defaultValue, ...) +See GetCollisionEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSimulationOwnerRel() +See GetSimulationOwnerRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> CollisionAPI + +GetCollisionEnabledAttr() +Determines if the PhysicsCollisionAPI is enabled. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSimulationOwnerRel() +Single PhysicsScene that will simulate this collider. + +static Apply() +classmethod Apply(prim) -> CollisionAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsCollisionAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsCollisionAPI object is returned upon success. An +invalid (or empty) UsdPhysicsCollisionAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateCollisionEnabledAttr(defaultValue, writeSparsely) → Attribute +See GetCollisionEnabledAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSimulationOwnerRel() → Relationship +See GetSimulationOwnerRel() , and also Create vs Get Property Methods +for when to use Get vs Create. + +static Get() +classmethod Get(stage, path) -> CollisionAPI +Return a UsdPhysicsCollisionAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsCollisionAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCollisionEnabledAttr() → Attribute +Determines if the PhysicsCollisionAPI is enabled. +Declaration +bool physics:collisionEnabled = 1 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSimulationOwnerRel() → Relationship +Single PhysicsScene that will simulate this collider. +By default this object belongs to the first PhysicsScene. Note that if +a RigidBodyAPI in the hierarchy above has a different simulationOwner +then it has a precedence over this relationship. + +class pxr.UsdPhysics.CollisionGroup +Defines a collision group for coarse filtering. When a collision +occurs between two objects that have a PhysicsCollisionGroup assigned, +they will collide with each other unless this PhysicsCollisionGroup +pair is filtered. See filteredGroups attribute. +A CollectionAPI:colliders maintains a list of PhysicsCollisionAPI +rel-s that defines the members of this Collisiongroup. +Methods: + +ComputeCollisionGroupTable +classmethod ComputeCollisionGroupTable(stage) -> CollisionGroupTable + +CreateFilteredGroupsRel() +See GetFilteredGroupsRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateInvertFilteredGroupsAttr(defaultValue, ...) +See GetInvertFilteredGroupsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMergeGroupNameAttr(defaultValue, ...) +See GetMergeGroupNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> CollisionGroup + +Get +classmethod Get(stage, path) -> CollisionGroup + +GetCollidersCollectionAPI() +Return the UsdCollectionAPI interface used for defining what colliders belong to the CollisionGroup. + +GetFilteredGroupsRel() +References a list of PhysicsCollisionGroups with which collisions should be ignored. + +GetInvertFilteredGroupsAttr() +Normally, the filter will disable collisions against the selected filter groups. + +GetMergeGroupNameAttr() +If non-empty, any collision groups in a stage with a matching mergeGroup should be considered to refer to the same collection. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static ComputeCollisionGroupTable() +classmethod ComputeCollisionGroupTable(stage) -> CollisionGroupTable +Compute a table encoding all the collision groups filter rules for a +stage. +This can be used as a reference to validate an implementation of the +collision groups filters. The returned table is diagonally symmetric. + +Parameters +stage (Stage) – + +CreateFilteredGroupsRel() → Relationship +See GetFilteredGroupsRel() , and also Create vs Get Property Methods +for when to use Get vs Create. + +CreateInvertFilteredGroupsAttr(defaultValue, writeSparsely) → Attribute +See GetInvertFilteredGroupsAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMergeGroupNameAttr(defaultValue, writeSparsely) → Attribute +See GetMergeGroupNameAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> CollisionGroup +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> CollisionGroup +Return a UsdPhysicsCollisionGroup holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsCollisionGroup(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCollidersCollectionAPI() → CollectionAPI +Return the UsdCollectionAPI interface used for defining what colliders +belong to the CollisionGroup. + +GetFilteredGroupsRel() → Relationship +References a list of PhysicsCollisionGroups with which collisions +should be ignored. + +GetInvertFilteredGroupsAttr() → Attribute +Normally, the filter will disable collisions against the selected +filter groups. +However, if this option is set, the filter will disable collisions +against all colliders except for those in the selected filter groups. +Declaration +bool physics:invertFilteredGroups +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetMergeGroupNameAttr() → Attribute +If non-empty, any collision groups in a stage with a matching +mergeGroup should be considered to refer to the same collection. +Matching collision groups should behave as if there were a single +group containing referenced colliders and filter groups from both +collections. +Declaration +string physics:mergeGroup +C++ Type +std::string +Usd Type +SdfValueTypeNames->String + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.CollisionGroupTable +Methods: + +GetGroups + +IsCollisionEnabled + +GetGroups() + +IsCollisionEnabled() + +class pxr.UsdPhysics.DistanceJoint +Predefined distance joint type (Distance between rigid bodies may be +limited to given minimum or maximum distance.) +Methods: + +CreateMaxDistanceAttr(defaultValue, ...) +See GetMaxDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMinDistanceAttr(defaultValue, ...) +See GetMinDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> DistanceJoint + +Get +classmethod Get(stage, path) -> DistanceJoint + +GetMaxDistanceAttr() +Maximum distance. + +GetMinDistanceAttr() +Minimum distance. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateMaxDistanceAttr(defaultValue, writeSparsely) → Attribute +See GetMaxDistanceAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMinDistanceAttr(defaultValue, writeSparsely) → Attribute +See GetMinDistanceAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> DistanceJoint +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> DistanceJoint +Return a UsdPhysicsDistanceJoint holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsDistanceJoint(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetMaxDistanceAttr() → Attribute +Maximum distance. +If attribute is negative, the joint is not limited. Units: distance. +Declaration +float physics:maxDistance = -1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetMinDistanceAttr() → Attribute +Minimum distance. +If attribute is negative, the joint is not limited. Units: distance. +Declaration +float physics:minDistance = -1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.DriveAPI +The PhysicsDriveAPI when applied to any joint primitive will drive the +joint towards a given target. The PhysicsDriveAPI is a multipleApply +schema: drive can be set per +axis”transX”,”transY”,”transZ”,”rotX”,”rotY”,”rotZ”or its”linear”for +prismatic joint or”angular”for revolute joints. Setting these as a +multipleApply schema TfToken name will define the degree of freedom +the DriveAPI is applied to. Each drive is an implicit force-limited +damped spring: Force or acceleration = stiffness * (targetPosition - +position) + +damping * (targetVelocity - velocity) + +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, +use UsdPhysicsTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim, name) -> DriveAPI + +CanApply +classmethod CanApply(prim, name, whyNot) -> bool + +CreateDampingAttr(defaultValue, writeSparsely) +See GetDampingAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMaxForceAttr(defaultValue, writeSparsely) +See GetMaxForceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateStiffnessAttr(defaultValue, writeSparsely) +See GetStiffnessAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTargetPositionAttr(defaultValue, ...) +See GetTargetPositionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTargetVelocityAttr(defaultValue, ...) +See GetTargetVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTypeAttr(defaultValue, writeSparsely) +See GetTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> DriveAPI + +GetAll +classmethod GetAll(prim) -> list[DriveAPI] + +GetDampingAttr() +Damping of the drive. + +GetMaxForceAttr() +Maximum force that can be applied to drive. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetStiffnessAttr() +Stiffness of the drive. + +GetTargetPositionAttr() +Target value for position. + +GetTargetVelocityAttr() +Target value for velocity. + +GetTypeAttr() +Drive spring is for the acceleration at the joint (rather than the force). + +IsPhysicsDriveAPIPath +classmethod IsPhysicsDriveAPIPath(path, name) -> bool + +static Apply() +classmethod Apply(prim, name) -> DriveAPI +Applies this multiple-apply API schema to the given prim along +with the given instance name, name . +This information is stored by adding”PhysicsDriveAPI:name”to +the token-valued, listOp metadata apiSchemas on the prim. For +example, if name is’instance1’, the +token’PhysicsDriveAPI:instance1’is added to’apiSchemas’. +A valid UsdPhysicsDriveAPI object is returned upon success. An invalid +(or empty) UsdPhysicsDriveAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +name (str) – + +static CanApply() +classmethod CanApply(prim, name, whyNot) -> bool +Returns true if this multiple-apply API schema can be applied, +with the given instance name, name , to the given prim . +If this schema can not be a applied the prim, this returns false and, +if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +name (str) – +whyNot (str) – + +CreateDampingAttr(defaultValue, writeSparsely) → Attribute +See GetDampingAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMaxForceAttr(defaultValue, writeSparsely) → Attribute +See GetMaxForceAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateStiffnessAttr(defaultValue, writeSparsely) → Attribute +See GetStiffnessAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTargetPositionAttr(defaultValue, writeSparsely) → Attribute +See GetTargetPositionAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTargetVelocityAttr(defaultValue, writeSparsely) → Attribute +See GetTargetVelocityAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTypeAttr(defaultValue, writeSparsely) → Attribute +See GetTypeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> DriveAPI +Return a UsdPhysicsDriveAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +path must be of the format.drive:name. +This is shorthand for the following: +TfToken name = SdfPath::StripNamespace(path.GetToken()); +UsdPhysicsDriveAPI( + stage->GetPrimAtPath(path.GetPrimPath()), name); + +Parameters + +stage (Stage) – +path (Path) – + +Get(prim, name) -> DriveAPI +Return a UsdPhysicsDriveAPI with name name holding the prim +prim . +Shorthand for UsdPhysicsDriveAPI(prim, name); + +Parameters + +prim (Prim) – +name (str) – + +static GetAll() +classmethod GetAll(prim) -> list[DriveAPI] +Return a vector of all named instances of UsdPhysicsDriveAPI on the +given prim . + +Parameters +prim (Prim) – + +GetDampingAttr() → Attribute +Damping of the drive. +Units: if linear drive: mass/second If angular drive: +mass*DIST_UNITS*DIST_UNITS/second/second/degrees. +Declaration +float physics:damping = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetMaxForceAttr() → Attribute +Maximum force that can be applied to drive. +Units: if linear drive: mass*DIST_UNITS/second/second if angular +drive: mass*DIST_UNITS*DIST_UNITS/second/second inf means not +limited. Must be non-negative. +Declaration +float physics:maxForce = inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSchemaAttributeNames(includeInherited, instanceName) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes for a given instance name. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. The names returned will have the +proper namespace prefix. + +Parameters + +includeInherited (bool) – +instanceName (str) – + +GetStiffnessAttr() → Attribute +Stiffness of the drive. +Units: if linear drive: mass/second/second if angular drive: +mass*DIST_UNITS*DIST_UNITS/degree/second/second. +Declaration +float physics:stiffness = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetTargetPositionAttr() → Attribute +Target value for position. +Units: if linear drive: distance if angular drive: degrees. +Declaration +float physics:targetPosition = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetTargetVelocityAttr() → Attribute +Target value for velocity. +Units: if linear drive: distance/second if angular drive: +degrees/second. +Declaration +float physics:targetVelocity = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetTypeAttr() → Attribute +Drive spring is for the acceleration at the joint (rather than the +force). +Declaration +uniform token physics:type ="force" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +force, acceleration + +static IsPhysicsDriveAPIPath() +classmethod IsPhysicsDriveAPIPath(path, name) -> bool +Checks if the given path path is of an API schema of type +PhysicsDriveAPI. +If so, it stores the instance name of the schema in name and +returns true. Otherwise, it returns false. + +Parameters + +path (Path) – +name (str) – + +class pxr.UsdPhysics.FilteredPairsAPI +API to describe fine-grained filtering. If a collision between two +objects occurs, this pair might be filtered if the pair is defined +through this API. This API can be applied either to a body or +collision or even articulation. The”filteredPairs”defines what objects +it should not collide against. Note that FilteredPairsAPI filtering +has precedence over CollisionGroup filtering. +Methods: + +Apply +classmethod Apply(prim) -> FilteredPairsAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateFilteredPairsRel() +See GetFilteredPairsRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> FilteredPairsAPI + +GetFilteredPairsRel() +Relationship to objects that should be filtered. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> FilteredPairsAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsFilteredPairsAPI”to the +token-valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsFilteredPairsAPI object is returned upon success. An +invalid (or empty) UsdPhysicsFilteredPairsAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateFilteredPairsRel() → Relationship +See GetFilteredPairsRel() , and also Create vs Get Property Methods +for when to use Get vs Create. + +static Get() +classmethod Get(stage, path) -> FilteredPairsAPI +Return a UsdPhysicsFilteredPairsAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsFilteredPairsAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFilteredPairsRel() → Relationship +Relationship to objects that should be filtered. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.FixedJoint +Predefined fixed joint type (All degrees of freedom are removed.) +Methods: + +Define +classmethod Define(stage, path) -> FixedJoint + +Get +classmethod Get(stage, path) -> FixedJoint + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> FixedJoint +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> FixedJoint +Return a UsdPhysicsFixedJoint holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsFixedJoint(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.Joint +A joint constrains the movement of rigid bodies. Joint can be created +between two rigid bodies or between one rigid body and world. By +default joint primitive defines a D6 joint where all degrees of +freedom are free. Three linear and three angular degrees of freedom. +Note that default behavior is to disable collision between jointed +bodies. +Methods: + +CreateBody0Rel() +See GetBody0Rel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateBody1Rel() +See GetBody1Rel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateBreakForceAttr(defaultValue, writeSparsely) +See GetBreakForceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateBreakTorqueAttr(defaultValue, ...) +See GetBreakTorqueAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateCollisionEnabledAttr(defaultValue, ...) +See GetCollisionEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExcludeFromArticulationAttr(...) +See GetExcludeFromArticulationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointEnabledAttr(defaultValue, ...) +See GetJointEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLocalPos0Attr(defaultValue, writeSparsely) +See GetLocalPos0Attr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLocalPos1Attr(defaultValue, writeSparsely) +See GetLocalPos1Attr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLocalRot0Attr(defaultValue, writeSparsely) +See GetLocalRot0Attr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLocalRot1Attr(defaultValue, writeSparsely) +See GetLocalRot1Attr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Joint + +Get +classmethod Get(stage, path) -> Joint + +GetBody0Rel() +Relationship to any UsdGeomXformable. + +GetBody1Rel() +Relationship to any UsdGeomXformable. + +GetBreakForceAttr() +Joint break force. + +GetBreakTorqueAttr() +Joint break torque. + +GetCollisionEnabledAttr() +Determines if the jointed subtrees should collide or not. + +GetExcludeFromArticulationAttr() +Determines if the joint can be included in an Articulation. + +GetJointEnabledAttr() +Determines if the joint is enabled. + +GetLocalPos0Attr() +Relative position of the joint frame to body0's frame. + +GetLocalPos1Attr() +Relative position of the joint frame to body1's frame. + +GetLocalRot0Attr() +Relative orientation of the joint frame to body0's frame. + +GetLocalRot1Attr() +Relative orientation of the joint frame to body1's frame. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateBody0Rel() → Relationship +See GetBody0Rel() , and also Create vs Get Property Methods for when +to use Get vs Create. + +CreateBody1Rel() → Relationship +See GetBody1Rel() , and also Create vs Get Property Methods for when +to use Get vs Create. + +CreateBreakForceAttr(defaultValue, writeSparsely) → Attribute +See GetBreakForceAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateBreakTorqueAttr(defaultValue, writeSparsely) → Attribute +See GetBreakTorqueAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateCollisionEnabledAttr(defaultValue, writeSparsely) → Attribute +See GetCollisionEnabledAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExcludeFromArticulationAttr(defaultValue, writeSparsely) → Attribute +See GetExcludeFromArticulationAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointEnabledAttr(defaultValue, writeSparsely) → Attribute +See GetJointEnabledAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLocalPos0Attr(defaultValue, writeSparsely) → Attribute +See GetLocalPos0Attr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLocalPos1Attr(defaultValue, writeSparsely) → Attribute +See GetLocalPos1Attr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLocalRot0Attr(defaultValue, writeSparsely) → Attribute +See GetLocalRot0Attr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLocalRot1Attr(defaultValue, writeSparsely) → Attribute +See GetLocalRot1Attr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Joint +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Joint +Return a UsdPhysicsJoint holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsJoint(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetBody0Rel() → Relationship +Relationship to any UsdGeomXformable. + +GetBody1Rel() → Relationship +Relationship to any UsdGeomXformable. + +GetBreakForceAttr() → Attribute +Joint break force. +If set, joint is to break when this force limit is reached. (Used for +linear DOFs.) Units: mass * distance / second / second +Declaration +float physics:breakForce = inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetBreakTorqueAttr() → Attribute +Joint break torque. +If set, joint is to break when this torque limit is reached. (Used for +angular DOFs.) Units: mass * distance * distance / second / second +Declaration +float physics:breakTorque = inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetCollisionEnabledAttr() → Attribute +Determines if the jointed subtrees should collide or not. +Declaration +bool physics:collisionEnabled = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetExcludeFromArticulationAttr() → Attribute +Determines if the joint can be included in an Articulation. +Declaration +uniform bool physics:excludeFromArticulation = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetJointEnabledAttr() → Attribute +Determines if the joint is enabled. +Declaration +bool physics:jointEnabled = 1 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetLocalPos0Attr() → Attribute +Relative position of the joint frame to body0’s frame. +Declaration +point3f physics:localPos0 = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Point3f + +GetLocalPos1Attr() → Attribute +Relative position of the joint frame to body1’s frame. +Declaration +point3f physics:localPos1 = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Point3f + +GetLocalRot0Attr() → Attribute +Relative orientation of the joint frame to body0’s frame. +Declaration +quatf physics:localRot0 = (1, 0, 0, 0) +C++ Type +GfQuatf +Usd Type +SdfValueTypeNames->Quatf + +GetLocalRot1Attr() → Attribute +Relative orientation of the joint frame to body1’s frame. +Declaration +quatf physics:localRot1 = (1, 0, 0, 0) +C++ Type +GfQuatf +Usd Type +SdfValueTypeNames->Quatf + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.LimitAPI +The PhysicsLimitAPI can be applied to a PhysicsJoint and will restrict +the movement along an axis. PhysicsLimitAPI is a multipleApply schema: +The PhysicsJoint can be restricted +along”transX”,”transY”,”transZ”,”rotX”,”rotY”,”rotZ”,”distance”. +Setting these as a multipleApply schema TfToken name will define the +degree of freedom the PhysicsLimitAPI is applied to. Note that if the +low limit is higher than the high limit, motion along this axis is +considered locked. +Methods: + +Apply +classmethod Apply(prim, name) -> LimitAPI + +CanApply +classmethod CanApply(prim, name, whyNot) -> bool + +CreateHighAttr(defaultValue, writeSparsely) +See GetHighAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLowAttr(defaultValue, writeSparsely) +See GetLowAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> LimitAPI + +GetAll +classmethod GetAll(prim) -> list[LimitAPI] + +GetHighAttr() +Upper limit. + +GetLowAttr() +Lower limit. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +IsPhysicsLimitAPIPath +classmethod IsPhysicsLimitAPIPath(path, name) -> bool + +static Apply() +classmethod Apply(prim, name) -> LimitAPI +Applies this multiple-apply API schema to the given prim along +with the given instance name, name . +This information is stored by adding”PhysicsLimitAPI:name”to +the token-valued, listOp metadata apiSchemas on the prim. For +example, if name is’instance1’, the +token’PhysicsLimitAPI:instance1’is added to’apiSchemas’. +A valid UsdPhysicsLimitAPI object is returned upon success. An invalid +(or empty) UsdPhysicsLimitAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +name (str) – + +static CanApply() +classmethod CanApply(prim, name, whyNot) -> bool +Returns true if this multiple-apply API schema can be applied, +with the given instance name, name , to the given prim . +If this schema can not be a applied the prim, this returns false and, +if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +name (str) – +whyNot (str) – + +CreateHighAttr(defaultValue, writeSparsely) → Attribute +See GetHighAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLowAttr(defaultValue, writeSparsely) → Attribute +See GetLowAttr() , and also Create vs Get Property Methods for when to +use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> LimitAPI +Return a UsdPhysicsLimitAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +path must be of the format.limit:name. +This is shorthand for the following: +TfToken name = SdfPath::StripNamespace(path.GetToken()); +UsdPhysicsLimitAPI( + stage->GetPrimAtPath(path.GetPrimPath()), name); + +Parameters + +stage (Stage) – +path (Path) – + +Get(prim, name) -> LimitAPI +Return a UsdPhysicsLimitAPI with name name holding the prim +prim . +Shorthand for UsdPhysicsLimitAPI(prim, name); + +Parameters + +prim (Prim) – +name (str) – + +static GetAll() +classmethod GetAll(prim) -> list[LimitAPI] +Return a vector of all named instances of UsdPhysicsLimitAPI on the +given prim . + +Parameters +prim (Prim) – + +GetHighAttr() → Attribute +Upper limit. +Units: degrees or distance depending on trans or rot axis applied to. +inf means not limited in positive direction. +Declaration +float physics:high = inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetLowAttr() → Attribute +Lower limit. +Units: degrees or distance depending on trans or rot axis applied to. +-inf means not limited in negative direction. +Declaration +float physics:low = -inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSchemaAttributeNames(includeInherited, instanceName) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes for a given instance name. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. The names returned will have the +proper namespace prefix. + +Parameters + +includeInherited (bool) – +instanceName (str) – + +static IsPhysicsLimitAPIPath() +classmethod IsPhysicsLimitAPIPath(path, name) -> bool +Checks if the given path path is of an API schema of type +PhysicsLimitAPI. +If so, it stores the instance name of the schema in name and +returns true. Otherwise, it returns false. + +Parameters + +path (Path) – +name (str) – + +class pxr.UsdPhysics.MassAPI +Defines explicit mass properties (mass, density, inertia etc.). +MassAPI can be applied to any object that has a PhysicsCollisionAPI or +a PhysicsRigidBodyAPI. +Methods: + +Apply +classmethod Apply(prim) -> MassAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateCenterOfMassAttr(defaultValue, ...) +See GetCenterOfMassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDensityAttr(defaultValue, writeSparsely) +See GetDensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDiagonalInertiaAttr(defaultValue, ...) +See GetDiagonalInertiaAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMassAttr(defaultValue, writeSparsely) +See GetMassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePrincipalAxesAttr(defaultValue, ...) +See GetPrincipalAxesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> MassAPI + +GetCenterOfMassAttr() +Center of mass in the prim's local space. + +GetDensityAttr() +If non-zero, specifies the density of the object. + +GetDiagonalInertiaAttr() +If non-zero, specifies diagonalized inertia tensor along the principal axes. + +GetMassAttr() +If non-zero, directly specifies the mass of the object. + +GetPrincipalAxesAttr() +Orientation of the inertia tensor's principal axes in the prim's local space. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> MassAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsMassAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsMassAPI object is returned upon success. An invalid +(or empty) UsdPhysicsMassAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateCenterOfMassAttr(defaultValue, writeSparsely) → Attribute +See GetCenterOfMassAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDensityAttr(defaultValue, writeSparsely) → Attribute +See GetDensityAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDiagonalInertiaAttr(defaultValue, writeSparsely) → Attribute +See GetDiagonalInertiaAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMassAttr(defaultValue, writeSparsely) → Attribute +See GetMassAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePrincipalAxesAttr(defaultValue, writeSparsely) → Attribute +See GetPrincipalAxesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> MassAPI +Return a UsdPhysicsMassAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsMassAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCenterOfMassAttr() → Attribute +Center of mass in the prim’s local space. +Units: distance. +Declaration +point3f physics:centerOfMass = (-inf, -inf, -inf) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Point3f + +GetDensityAttr() → Attribute +If non-zero, specifies the density of the object. +In the context of rigid body physics, density indirectly results in +setting mass via (mass = density x volume of the object). How the +volume is computed is up to implementation of the physics system. It +is generally computed from the collision approximation rather than the +graphical mesh. In the case where both density and mass are specified +for the same object, mass has precedence over density. Unlike mass, +child’s prim’s density overrides parent prim’s density as it is +accumulative. Note that density of a collisionAPI can be also +alternatively set through a PhysicsMaterialAPI. The material density +has the weakest precedence in density definition. Note if density is +0.0 it is ignored. Units: mass/distance/distance/distance. +Declaration +float physics:density = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetDiagonalInertiaAttr() → Attribute +If non-zero, specifies diagonalized inertia tensor along the principal +axes. +Note if diagonalInertial is (0.0, 0.0, 0.0) it is ignored. Units: +mass*distance*distance. +Declaration +float3 physics:diagonalInertia = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Float3 + +GetMassAttr() → Attribute +If non-zero, directly specifies the mass of the object. +Note that any child prim can also have a mass when they apply massAPI. +In this case, the precedence rule is’parent mass overrides the +child’s’. This may come as counter-intuitive, but mass is a computed +quantity and in general not accumulative. For example, if a parent has +mass of 10, and one of two children has mass of 20, allowing child’s +mass to override its parent results in a mass of -10 for the other +child. Note if mass is 0.0 it is ignored. Units: mass. +Declaration +float physics:mass = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetPrincipalAxesAttr() → Attribute +Orientation of the inertia tensor’s principal axes in the prim’s local +space. +Declaration +quatf physics:principalAxes = (0, 0, 0, 0) +C++ Type +GfQuatf +Usd Type +SdfValueTypeNames->Quatf + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.MassUnits +Container class for static double-precision symbols representing +common mass units of measure expressed in kilograms. +Attributes: + +grams + +kilograms + +slugs + +grams = 0.001 + +kilograms = 1.0 + +slugs = 14.5939 + +class pxr.UsdPhysics.MaterialAPI +Adds simulation material properties to a Material. All collisions that +have a relationship to this material will have their collision +response defined through this material. +Methods: + +Apply +classmethod Apply(prim) -> MaterialAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateDensityAttr(defaultValue, writeSparsely) +See GetDensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDynamicFrictionAttr(defaultValue, ...) +See GetDynamicFrictionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRestitutionAttr(defaultValue, ...) +See GetRestitutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateStaticFrictionAttr(defaultValue, ...) +See GetStaticFrictionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> MaterialAPI + +GetDensityAttr() +If non-zero, defines the density of the material. + +GetDynamicFrictionAttr() +Dynamic friction coefficient. + +GetRestitutionAttr() +Restitution coefficient. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetStaticFrictionAttr() +Static friction coefficient. + +static Apply() +classmethod Apply(prim) -> MaterialAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsMaterialAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsMaterialAPI object is returned upon success. An +invalid (or empty) UsdPhysicsMaterialAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateDensityAttr(defaultValue, writeSparsely) → Attribute +See GetDensityAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDynamicFrictionAttr(defaultValue, writeSparsely) → Attribute +See GetDynamicFrictionAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRestitutionAttr(defaultValue, writeSparsely) → Attribute +See GetRestitutionAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateStaticFrictionAttr(defaultValue, writeSparsely) → Attribute +See GetStaticFrictionAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> MaterialAPI +Return a UsdPhysicsMaterialAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsMaterialAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDensityAttr() → Attribute +If non-zero, defines the density of the material. +This can be used for body mass computation, see PhysicsMassAPI. Note +that if the density is 0.0 it is ignored. Units: +mass/distance/distance/distance. +Declaration +float physics:density = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetDynamicFrictionAttr() → Attribute +Dynamic friction coefficient. +Unitless. +Declaration +float physics:dynamicFriction = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetRestitutionAttr() → Attribute +Restitution coefficient. +Unitless. +Declaration +float physics:restitution = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetStaticFrictionAttr() → Attribute +Static friction coefficient. +Unitless. +Declaration +float physics:staticFriction = 0 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdPhysics.MeshCollisionAPI +Attributes to control how a Mesh is made into a collider. Can be +applied to only a USDGeomMesh in addition to its PhysicsCollisionAPI. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, +use UsdPhysicsTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> MeshCollisionAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateApproximationAttr(defaultValue, ...) +See GetApproximationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> MeshCollisionAPI + +GetApproximationAttr() +Determines the mesh's collision approximation:"none"- The mesh geometry is used directly as a collider without any approximation. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> MeshCollisionAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsMeshCollisionAPI”to the +token-valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsMeshCollisionAPI object is returned upon success. An +invalid (or empty) UsdPhysicsMeshCollisionAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateApproximationAttr(defaultValue, writeSparsely) → Attribute +See GetApproximationAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> MeshCollisionAPI +Return a UsdPhysicsMeshCollisionAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsMeshCollisionAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetApproximationAttr() → Attribute +Determines the mesh’s collision approximation:”none”- The mesh +geometry is used directly as a collider without any approximation. +“convexDecomposition”- A convex mesh decomposition is performed. This +results in a set of convex mesh colliders.”convexHull”- A convex hull +of the mesh is generated and used as the collider.”boundingSphere”- A +bounding sphere is computed around the mesh and used as a +collider.”boundingCube”- An optimally fitting box collider is computed +around the mesh.”meshSimplification”- A mesh simplification step is +performed, resulting in a simplified triangle mesh collider. +Declaration +uniform token physics:approximation ="none" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +none, convexDecomposition, convexHull, boundingSphere, boundingCube, +meshSimplification + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.PrismaticJoint +Predefined prismatic joint type (translation along prismatic joint +axis is permitted.) +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, +use UsdPhysicsTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLowerLimitAttr(defaultValue, writeSparsely) +See GetLowerLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUpperLimitAttr(defaultValue, writeSparsely) +See GetUpperLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> PrismaticJoint + +Get +classmethod Get(stage, path) -> PrismaticJoint + +GetAxisAttr() +Joint axis. + +GetLowerLimitAttr() +Lower limit. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetUpperLimitAttr() +Upper limit. + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLowerLimitAttr(defaultValue, writeSparsely) → Attribute +See GetLowerLimitAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateUpperLimitAttr(defaultValue, writeSparsely) → Attribute +See GetUpperLimitAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> PrismaticJoint +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> PrismaticJoint +Return a UsdPhysicsPrismaticJoint holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsPrismaticJoint(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +Joint axis. +Declaration +uniform token physics:axis ="X" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetLowerLimitAttr() → Attribute +Lower limit. +Units: distance. -inf means not limited in negative direction. +Declaration +float physics:lowerLimit = -inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetUpperLimitAttr() → Attribute +Upper limit. +Units: distance. inf means not limited in positive direction. +Declaration +float physics:upperLimit = inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdPhysics.RevoluteJoint +Predefined revolute joint type (rotation along revolute joint axis is +permitted.) +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, +use UsdPhysicsTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateLowerLimitAttr(defaultValue, writeSparsely) +See GetLowerLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateUpperLimitAttr(defaultValue, writeSparsely) +See GetUpperLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> RevoluteJoint + +Get +classmethod Get(stage, path) -> RevoluteJoint + +GetAxisAttr() +Joint axis. + +GetLowerLimitAttr() +Lower limit. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetUpperLimitAttr() +Upper limit. + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateLowerLimitAttr(defaultValue, writeSparsely) → Attribute +See GetLowerLimitAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateUpperLimitAttr(defaultValue, writeSparsely) → Attribute +See GetUpperLimitAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> RevoluteJoint +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> RevoluteJoint +Return a UsdPhysicsRevoluteJoint holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsRevoluteJoint(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +Joint axis. +Declaration +uniform token physics:axis ="X" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetLowerLimitAttr() → Attribute +Lower limit. +Units: degrees. -inf means not limited in negative direction. +Declaration +float physics:lowerLimit = -inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetUpperLimitAttr() → Attribute +Upper limit. +Units: degrees. inf means not limited in positive direction. +Declaration +float physics:upperLimit = inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +class pxr.UsdPhysics.RigidBodyAPI +Applies physics body attributes to any UsdGeomXformable prim and marks +that prim to be driven by a simulation. If a simulation is running it +will update this prim’s pose. All prims in the hierarchy below this +prim should move accordingly. +Classes: + +MassInformation + +Methods: + +Apply +classmethod Apply(prim) -> RigidBodyAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ComputeMassProperties(diagonalInertia, com, ...) +Compute mass properties of the rigid body diagonalInertia Computed diagonal of the inertial tensor for the rigid body. + +CreateAngularVelocityAttr(defaultValue, ...) +See GetAngularVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateKinematicEnabledAttr(defaultValue, ...) +See GetKinematicEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRigidBodyEnabledAttr(defaultValue, ...) +See GetRigidBodyEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSimulationOwnerRel() +See GetSimulationOwnerRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateStartsAsleepAttr(defaultValue, ...) +See GetStartsAsleepAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVelocityAttr(defaultValue, writeSparsely) +See GetVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> RigidBodyAPI + +GetAngularVelocityAttr() +Angular velocity in the same space as the node's xform. + +GetKinematicEnabledAttr() +Determines whether the body is kinematic or not. + +GetRigidBodyEnabledAttr() +Determines if this PhysicsRigidBodyAPI is enabled. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSimulationOwnerRel() +Single PhysicsScene that will simulate this body. + +GetStartsAsleepAttr() +Determines if the body is asleep when the simulation starts. + +GetVelocityAttr() +Linear velocity in the same space as the node's xform. + +class MassInformation +Attributes: + +centerOfMass + +inertia + +localPos + +localRot + +volume + +property centerOfMass + +property inertia + +property localPos + +property localRot + +property volume + +static Apply() +classmethod Apply(prim) -> RigidBodyAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”PhysicsRigidBodyAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdPhysicsRigidBodyAPI object is returned upon success. An +invalid (or empty) UsdPhysicsRigidBodyAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ComputeMassProperties(diagonalInertia, com, principalAxes, massInfoFn) → float +Compute mass properties of the rigid body diagonalInertia Computed +diagonal of the inertial tensor for the rigid body. +com Computed center of mass for the rigid body. principalAxes +Inertia tensor’s principal axes orienttion for the rigid body. +massInfoFn Callback function to get collision mass information. +Computed mass of the rigid body + +Parameters + +diagonalInertia (Vec3f) – +com (Vec3f) – +principalAxes (Quatf) – +massInfoFn (MassInformationFn) – + +CreateAngularVelocityAttr(defaultValue, writeSparsely) → Attribute +See GetAngularVelocityAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateKinematicEnabledAttr(defaultValue, writeSparsely) → Attribute +See GetKinematicEnabledAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRigidBodyEnabledAttr(defaultValue, writeSparsely) → Attribute +See GetRigidBodyEnabledAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSimulationOwnerRel() → Relationship +See GetSimulationOwnerRel() , and also Create vs Get Property Methods +for when to use Get vs Create. + +CreateStartsAsleepAttr(defaultValue, writeSparsely) → Attribute +See GetStartsAsleepAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVelocityAttr(defaultValue, writeSparsely) → Attribute +See GetVelocityAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> RigidBodyAPI +Return a UsdPhysicsRigidBodyAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsRigidBodyAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAngularVelocityAttr() → Attribute +Angular velocity in the same space as the node’s xform. +Units: degrees/second. +Declaration +vector3f physics:angularVelocity = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Vector3f + +GetKinematicEnabledAttr() → Attribute +Determines whether the body is kinematic or not. +A kinematic body is a body that is moved through animated poses or +through user defined poses. The simulation derives velocities for the +kinematic body based on the external motion. When a continuous motion +is not desired, this kinematic flag should be set to false. +Declaration +bool physics:kinematicEnabled = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +GetRigidBodyEnabledAttr() → Attribute +Determines if this PhysicsRigidBodyAPI is enabled. +Declaration +bool physics:rigidBodyEnabled = 1 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSimulationOwnerRel() → Relationship +Single PhysicsScene that will simulate this body. +By default this is the first PhysicsScene found in the stage using +UsdStage::Traverse() . + +GetStartsAsleepAttr() → Attribute +Determines if the body is asleep when the simulation starts. +Declaration +uniform bool physics:startsAsleep = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetVelocityAttr() → Attribute +Linear velocity in the same space as the node’s xform. +Units: distance/second. +Declaration +vector3f physics:velocity = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Vector3f + +class pxr.UsdPhysics.Scene +General physics simulation properties, required for simulation. +Methods: + +CreateGravityDirectionAttr(defaultValue, ...) +See GetGravityDirectionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateGravityMagnitudeAttr(defaultValue, ...) +See GetGravityMagnitudeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Scene + +Get +classmethod Get(stage, path) -> Scene + +GetGravityDirectionAttr() +Gravity direction vector in simulation world space. + +GetGravityMagnitudeAttr() +Gravity acceleration magnitude in simulation world space. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateGravityDirectionAttr(defaultValue, writeSparsely) → Attribute +See GetGravityDirectionAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateGravityMagnitudeAttr(defaultValue, writeSparsely) → Attribute +See GetGravityMagnitudeAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Scene +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Scene +Return a UsdPhysicsScene holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsScene(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetGravityDirectionAttr() → Attribute +Gravity direction vector in simulation world space. +Will be normalized before use. A zero vector is a request to use the +negative upAxis. Unitless. +Declaration +vector3f physics:gravityDirection = (0, 0, 0) +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Vector3f + +GetGravityMagnitudeAttr() → Attribute +Gravity acceleration magnitude in simulation world space. +A negative value is a request to use a value equivalent to earth +gravity regardless of the metersPerUnit scaling used by this scene. +Units: distance/second/second. +Declaration +float physics:gravityMagnitude = -inf +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.SphericalJoint +Predefined spherical joint type (Removes linear degrees of freedom, +cone limit may restrict the motion in a given range.) It allows two +limit values, which when equal create a circular, else an elliptic +cone limit around the limit axis. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, +use UsdPhysicsTokens->rightHanded as the value. +Methods: + +CreateAxisAttr(defaultValue, writeSparsely) +See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateConeAngle0LimitAttr(defaultValue, ...) +See GetConeAngle0LimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateConeAngle1LimitAttr(defaultValue, ...) +See GetConeAngle1LimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> SphericalJoint + +Get +classmethod Get(stage, path) -> SphericalJoint + +GetAxisAttr() +Cone limit axis. + +GetConeAngle0LimitAttr() +Cone limit from the primary joint axis in the local0 frame toward the next axis. + +GetConeAngle1LimitAttr() +Cone limit from the primary joint axis in the local0 frame toward the second to next axis. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateAxisAttr(defaultValue, writeSparsely) → Attribute +See GetAxisAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateConeAngle0LimitAttr(defaultValue, writeSparsely) → Attribute +See GetConeAngle0LimitAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateConeAngle1LimitAttr(defaultValue, writeSparsely) → Attribute +See GetConeAngle1LimitAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> SphericalJoint +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> SphericalJoint +Return a UsdPhysicsSphericalJoint holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdPhysicsSphericalJoint(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAxisAttr() → Attribute +Cone limit axis. +Declaration +uniform token physics:axis ="X" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +X, Y, Z + +GetConeAngle0LimitAttr() → Attribute +Cone limit from the primary joint axis in the local0 frame toward the +next axis. +(Next axis of X is Y, and of Z is X.) A negative value means not +limited. Units: degrees. +Declaration +float physics:coneAngle0Limit = -1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetConeAngle1LimitAttr() → Attribute +Cone limit from the primary joint axis in the local0 frame toward the +second to next axis. +A negative value means not limited. Units: degrees. +Declaration +float physics:coneAngle1Limit = -1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdPhysics.Tokens +Attributes: + +acceleration + +angular + +boundingCube + +boundingSphere + +colliders + +convexDecomposition + +convexHull + +distance + +drive + +drive_MultipleApplyTemplate_PhysicsDamping + +drive_MultipleApplyTemplate_PhysicsMaxForce + +drive_MultipleApplyTemplate_PhysicsStiffness + +drive_MultipleApplyTemplate_PhysicsTargetPosition + +drive_MultipleApplyTemplate_PhysicsTargetVelocity + +drive_MultipleApplyTemplate_PhysicsType + +force + +kilogramsPerUnit + +limit + +limit_MultipleApplyTemplate_PhysicsHigh + +limit_MultipleApplyTemplate_PhysicsLow + +linear + +meshSimplification + +none + +physicsAngularVelocity + +physicsApproximation + +physicsAxis + +physicsBody0 + +physicsBody1 + +physicsBreakForce + +physicsBreakTorque + +physicsCenterOfMass + +physicsCollisionEnabled + +physicsConeAngle0Limit + +physicsConeAngle1Limit + +physicsDensity + +physicsDiagonalInertia + +physicsDynamicFriction + +physicsExcludeFromArticulation + +physicsFilteredGroups + +physicsFilteredPairs + +physicsGravityDirection + +physicsGravityMagnitude + +physicsInvertFilteredGroups + +physicsJointEnabled + +physicsKinematicEnabled + +physicsLocalPos0 + +physicsLocalPos1 + +physicsLocalRot0 + +physicsLocalRot1 + +physicsLowerLimit + +physicsMass + +physicsMaxDistance + +physicsMergeGroup + +physicsMinDistance + +physicsPrincipalAxes + +physicsRestitution + +physicsRigidBodyEnabled + +physicsSimulationOwner + +physicsStartsAsleep + +physicsStaticFriction + +physicsUpperLimit + +physicsVelocity + +rotX + +rotY + +rotZ + +transX + +transY + +transZ + +x + +y + +z + +acceleration = 'acceleration' + +angular = 'angular' + +boundingCube = 'boundingCube' + +boundingSphere = 'boundingSphere' + +colliders = 'colliders' + +convexDecomposition = 'convexDecomposition' + +convexHull = 'convexHull' + +distance = 'distance' + +drive = 'drive' + +drive_MultipleApplyTemplate_PhysicsDamping = 'drive:__INSTANCE_NAME__:physics:damping' + +drive_MultipleApplyTemplate_PhysicsMaxForce = 'drive:__INSTANCE_NAME__:physics:maxForce' + +drive_MultipleApplyTemplate_PhysicsStiffness = 'drive:__INSTANCE_NAME__:physics:stiffness' + +drive_MultipleApplyTemplate_PhysicsTargetPosition = 'drive:__INSTANCE_NAME__:physics:targetPosition' + +drive_MultipleApplyTemplate_PhysicsTargetVelocity = 'drive:__INSTANCE_NAME__:physics:targetVelocity' + +drive_MultipleApplyTemplate_PhysicsType = 'drive:__INSTANCE_NAME__:physics:type' + +force = 'force' + +kilogramsPerUnit = 'kilogramsPerUnit' + +limit = 'limit' + +limit_MultipleApplyTemplate_PhysicsHigh = 'limit:__INSTANCE_NAME__:physics:high' + +limit_MultipleApplyTemplate_PhysicsLow = 'limit:__INSTANCE_NAME__:physics:low' + +linear = 'linear' + +meshSimplification = 'meshSimplification' + +none = 'none' + +physicsAngularVelocity = 'physics:angularVelocity' + +physicsApproximation = 'physics:approximation' + +physicsAxis = 'physics:axis' + +physicsBody0 = 'physics:body0' + +physicsBody1 = 'physics:body1' + +physicsBreakForce = 'physics:breakForce' + +physicsBreakTorque = 'physics:breakTorque' + +physicsCenterOfMass = 'physics:centerOfMass' + +physicsCollisionEnabled = 'physics:collisionEnabled' + +physicsConeAngle0Limit = 'physics:coneAngle0Limit' + +physicsConeAngle1Limit = 'physics:coneAngle1Limit' + +physicsDensity = 'physics:density' + +physicsDiagonalInertia = 'physics:diagonalInertia' + +physicsDynamicFriction = 'physics:dynamicFriction' + +physicsExcludeFromArticulation = 'physics:excludeFromArticulation' + +physicsFilteredGroups = 'physics:filteredGroups' + +physicsFilteredPairs = 'physics:filteredPairs' + +physicsGravityDirection = 'physics:gravityDirection' + +physicsGravityMagnitude = 'physics:gravityMagnitude' + +physicsInvertFilteredGroups = 'physics:invertFilteredGroups' + +physicsJointEnabled = 'physics:jointEnabled' + +physicsKinematicEnabled = 'physics:kinematicEnabled' + +physicsLocalPos0 = 'physics:localPos0' + +physicsLocalPos1 = 'physics:localPos1' + +physicsLocalRot0 = 'physics:localRot0' + +physicsLocalRot1 = 'physics:localRot1' + +physicsLowerLimit = 'physics:lowerLimit' + +physicsMass = 'physics:mass' + +physicsMaxDistance = 'physics:maxDistance' + +physicsMergeGroup = 'physics:mergeGroup' + +physicsMinDistance = 'physics:minDistance' + +physicsPrincipalAxes = 'physics:principalAxes' + +physicsRestitution = 'physics:restitution' + +physicsRigidBodyEnabled = 'physics:rigidBodyEnabled' + +physicsSimulationOwner = 'physics:simulationOwner' + +physicsStartsAsleep = 'physics:startsAsleep' + +physicsStaticFriction = 'physics:staticFriction' + +physicsUpperLimit = 'physics:upperLimit' + +physicsVelocity = 'physics:velocity' + +rotX = 'rotX' + +rotY = 'rotY' + +rotZ = 'rotZ' + +transX = 'transX' + +transY = 'transY' + +transZ = 'transZ' + +x = 'X' + +y = 'Y' + +z = 'Z' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdProc.md b/UsdProc.md new file mode 100644 index 0000000000000000000000000000000000000000..ab4a2e578dd7e514bb5b10ae5d611a80a4a9ad25 --- /dev/null +++ b/UsdProc.md @@ -0,0 +1,138 @@ + + +UsdProc module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdProc module + +  + +# UsdProc module + +Summary: The UsdProc module defines schemas for the scene description of procedural data meaningful to downstream systems. + +Classes: + +GenerativeProcedural +Represents an abstract generative procedural prim which delivers its input parameters via properties (including relationships) within the"primvars:"namespace. + +Tokens + +class pxr.UsdProc.GenerativeProcedural +Represents an abstract generative procedural prim which delivers its +input parameters via properties (including relationships) within +the”primvars:”namespace. +It does not itself have any awareness or participation in the +execution of the procedural but rather serves as a means of delivering +a procedural’s definition and input parameters. +The value of its”proceduralSystem”property (either authored or +provided by API schema fallback) indicates to which system the +procedural definition is meaningful. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdProcTokens. So to set an attribute to the value”rightHanded”, +use UsdProcTokens->rightHanded as the value. +Methods: + +CreateProceduralSystemAttr(defaultValue, ...) +See GetProceduralSystemAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> GenerativeProcedural + +Get +classmethod Get(stage, path) -> GenerativeProcedural + +GetProceduralSystemAttr() +The name or convention of the system responsible for evaluating the procedural. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateProceduralSystemAttr(defaultValue, writeSparsely) → Attribute +See GetProceduralSystemAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> GenerativeProcedural +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> GenerativeProcedural +Return a UsdProcGenerativeProcedural holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdProcGenerativeProcedural(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetProceduralSystemAttr() → Attribute +The name or convention of the system responsible for evaluating the +procedural. +NOTE: A fallback value for this is typically set via an API schema. +Declaration +token proceduralSystem +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdProc.Tokens +Attributes: + +proceduralSystem + +proceduralSystem = 'proceduralSystem' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdRender.md b/UsdRender.md new file mode 100644 index 0000000000000000000000000000000000000000..c44a630942330c03984f3d87a93e85b76c050c6c --- /dev/null +++ b/UsdRender.md @@ -0,0 +1,1343 @@ + + +UsdRender module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdRender module + +  + +# UsdRender module + +Summary: The UsdRender module provides schemas and behaviors for describing renders. + +Classes: + +DenoisePass +A RenderDenoisePass generates renders via a denoising process. + +Pass +A RenderPass prim encapsulates the necessary information to generate multipass renders. + +Product +A UsdRenderProduct describes an image or other file-like artifact produced by a render. + +Settings +A UsdRenderSettings prim specifies global settings for a render process, including an enumeration of the RenderProducts that should result, and the UsdGeomImageable purposes that should be rendered. + +SettingsBase +Abstract base class that defines render settings that can be specified on either a RenderSettings prim or a RenderProduct prim. + +Tokens + +Var +A UsdRenderVar describes a custom data variable for a render to produce. + +class pxr.UsdRender.DenoisePass +A RenderDenoisePass generates renders via a denoising process. This +may be the same renderer that a pipeline uses for UsdRender, or may be +a separate one. Notably, a RenderDenoisePass requires another Pass to +be present for it to operate. The denoising process itself is not +generative, and requires images inputs to operate. +As denoising integration varies so widely across pipelines, all +implementation details are left to pipeline-specific prims that +inherit from RenderDenoisePass. +Methods: + +Define +classmethod Define(stage, path) -> DenoisePass + +Get +classmethod Get(stage, path) -> DenoisePass + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> DenoisePass +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> DenoisePass +Return a UsdRenderDenoisePass holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRenderDenoisePass(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdRender.Pass +A RenderPass prim encapsulates the necessary information to generate +multipass renders. It houses properties for generating dependencies +and the necessary commands to run to generate renders, as well as +visibility controls for the scene. While RenderSettings describes the +information needed to generate images from a single invocation of a +renderer, RenderPass describes the additional information needed to +generate a time varying set of images. +There are two consumers of RenderPass prims - a runtime executable +that generates images from usdRender prims, and pipeline specific code +that translates between usdRender prims and the pipeline’s resource +scheduling software. We’ll refer to the latter as’job submission +code’. +The name of the prim is used as the pass’s name. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdRenderTokens. So to set an attribute to the value”rightHanded”, +use UsdRenderTokens->rightHanded as the value. +Methods: + +CreateCommandAttr(defaultValue, writeSparsely) +See GetCommandAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDenoiseEnableAttr(defaultValue, ...) +See GetDenoiseEnableAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDenoisePassRel() +See GetDenoisePassRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFileNameAttr(defaultValue, writeSparsely) +See GetFileNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateInputPassesRel() +See GetInputPassesRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePassTypeAttr(defaultValue, writeSparsely) +See GetPassTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRenderSourceRel() +See GetRenderSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Pass + +Get +classmethod Get(stage, path) -> Pass + +GetCommandAttr() +The command to run in order to generate renders for this pass. + +GetDenoiseEnableAttr() +When True, this Pass pass should be denoised. + +GetDenoisePassRel() +The The UsdRenderDenoisePass prim from which to source denoise settings. + +GetFileNameAttr() +The asset that contains the rendering prims or other information needed to render this pass. + +GetInputPassesRel() +The set of other Passes that this Pass depends on in order to be constructed properly. + +GetPassTypeAttr() +A string used to categorize differently structured or executed types of passes within a customized pipeline. + +GetRenderSourceRel() +The source prim to render from. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateCommandAttr(defaultValue, writeSparsely) → Attribute +See GetCommandAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDenoiseEnableAttr(defaultValue, writeSparsely) → Attribute +See GetDenoiseEnableAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDenoisePassRel() → Relationship +See GetDenoisePassRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreateFileNameAttr(defaultValue, writeSparsely) → Attribute +See GetFileNameAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateInputPassesRel() → Relationship +See GetInputPassesRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreatePassTypeAttr(defaultValue, writeSparsely) → Attribute +See GetPassTypeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRenderSourceRel() → Relationship +See GetRenderSourceRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +static Define() +classmethod Define(stage, path) -> Pass +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Pass +Return a UsdRenderPass holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRenderPass(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCommandAttr() → Attribute +The command to run in order to generate renders for this pass. +The job submission code can use this to properly send tasks to the job +scheduling software that will generate products. +The command can contain variables that will be substituted +appropriately during submission, as seen in the example below with +{fileName}. +For example: command[0] =”prman”command[1] =”-progress”command[2] +=”-pixelvariance”command[3] =”-0.15”command[4] =”{fileName}”# the +fileName property will be substituted +Declaration +uniform string[] command +C++ Type +VtArray +Usd Type +SdfValueTypeNames->StringArray +Variability +SdfVariabilityUniform + +GetDenoiseEnableAttr() → Attribute +When True, this Pass pass should be denoised. +Declaration +uniform bool denoise:enable = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetDenoisePassRel() → Relationship +The The UsdRenderDenoisePass prim from which to source denoise +settings. + +GetFileNameAttr() → Attribute +The asset that contains the rendering prims or other information +needed to render this pass. +Declaration +uniform asset fileName +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset +Variability +SdfVariabilityUniform + +GetInputPassesRel() → Relationship +The set of other Passes that this Pass depends on in order to be +constructed properly. +For example, a Pass A may generate a texture, which is then used as an +input to Pass B. +By default, usdRender makes some assumptions about the relationship +between this prim and the prims listed in inputPasses. Namely, when +per-frame tasks are generated from these pass prims, usdRender will +assume a one-to-one relationship between tasks that share their frame +number. Consider a pass named’composite’whose inputPasses targets a +Pass prim named’beauty`. By default, each frame for’composite’will +depend on the same frame from’beauty’: beauty.1 ->composite.1 beauty.2 +->composite.2 etc +The consumer of this RenderPass graph of inputs will need to resolve +the transitive dependencies. + +GetPassTypeAttr() → Attribute +A string used to categorize differently structured or executed types +of passes within a customized pipeline. +For example, when multiple DCC’s (e.g. Houdini, Katana, Nuke) each +compute and contribute different Products to a final result, it may be +clearest and most flexible to create a separate RenderPass for each. +Declaration +uniform token passType +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +GetRenderSourceRel() → Relationship +The source prim to render from. +If fileName is not present, the source is assumed to be a +RenderSettings prim present in the current Usd stage. If fileName is +present, the source should be found in the file there. This +relationship might target a string attribute on this or another prim +that identifies the appropriate object in the external container. +For example, for a Usd-backed pass, this would point to a +RenderSettings prim. Houdini passes would point to a Rop. Nuke passes +would point to a write node. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdRender.Product +A UsdRenderProduct describes an image or other file-like artifact +produced by a render. A RenderProduct combines one or more RenderVars +into a file or interactive buffer. It also provides all the controls +established in UsdRenderSettingsBase as optional overrides to whatever +the owning UsdRenderSettings prim dictates. +Specific renderers may support additional settings, such as a way to +configure compression settings, filetype metadata, and so forth. Such +settings can be encoded using renderer-specific API schemas applied to +the product prim. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdRenderTokens. So to set an attribute to the value”rightHanded”, +use UsdRenderTokens->rightHanded as the value. +Methods: + +CreateOrderedVarsRel() +See GetOrderedVarsRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProductNameAttr(defaultValue, ...) +See GetProductNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProductTypeAttr(defaultValue, ...) +See GetProductTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Product + +Get +classmethod Get(stage, path) -> Product + +GetOrderedVarsRel() +Specifies the RenderVars that should be consumed and combined into the final product. + +GetProductNameAttr() +Specifies the name that the output/display driver should give the product. + +GetProductTypeAttr() +The type of output to produce. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateOrderedVarsRel() → Relationship +See GetOrderedVarsRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreateProductNameAttr(defaultValue, writeSparsely) → Attribute +See GetProductNameAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateProductTypeAttr(defaultValue, writeSparsely) → Attribute +See GetProductTypeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Product +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Product +Return a UsdRenderProduct holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRenderProduct(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetOrderedVarsRel() → Relationship +Specifies the RenderVars that should be consumed and combined into the +final product. +If ordering is relevant to the output driver, then the ordering of +targets in this relationship provides the order to use. + +GetProductNameAttr() → Attribute +Specifies the name that the output/display driver should give the +product. +This is provided as-authored to the driver, whose responsibility it is +to situate the product on a filesystem or other storage, in the +desired location. +Declaration +token productName ="" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetProductTypeAttr() → Attribute +The type of output to produce. +The default,”raster”, indicates a 2D image. +In the future, UsdRender may define additional product types. +Declaration +uniform token productType ="raster" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdRender.Settings +A UsdRenderSettings prim specifies global settings for a render +process, including an enumeration of the RenderProducts that should +result, and the UsdGeomImageable purposes that should be rendered. How +settings affect rendering +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdRenderTokens. So to set an attribute to the value”rightHanded”, +use UsdRenderTokens->rightHanded as the value. +Methods: + +CreateIncludedPurposesAttr(defaultValue, ...) +See GetIncludedPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateMaterialBindingPurposesAttr(...) +See GetMaterialBindingPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateProductsRel() +See GetProductsRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRenderingColorSpaceAttr(defaultValue, ...) +See GetRenderingColorSpaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Settings + +Get +classmethod Get(stage, path) -> Settings + +GetIncludedPurposesAttr() +The list of UsdGeomImageable purpose values that should be included in the render. + +GetMaterialBindingPurposesAttr() +Ordered list of material purposes to consider when resolving material bindings in the scene. + +GetProductsRel() +The set of RenderProducts the render should produce. + +GetRenderingColorSpaceAttr() +Describes a renderer's working (linear) colorSpace where all the renderer/shader math is expected to happen. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetStageRenderSettings +classmethod GetStageRenderSettings(stage) -> Settings + +CreateIncludedPurposesAttr(defaultValue, writeSparsely) → Attribute +See GetIncludedPurposesAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateMaterialBindingPurposesAttr(defaultValue, writeSparsely) → Attribute +See GetMaterialBindingPurposesAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateProductsRel() → Relationship +See GetProductsRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreateRenderingColorSpaceAttr(defaultValue, writeSparsely) → Attribute +See GetRenderingColorSpaceAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Settings +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Settings +Return a UsdRenderSettings holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRenderSettings(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetIncludedPurposesAttr() → Attribute +The list of UsdGeomImageable purpose values that should be included +in the render. +Note this cannot be specified per-RenderProduct because it is a +statement of which geometry is present. +Declaration +uniform token[] includedPurposes = ["default","render"] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +GetMaterialBindingPurposesAttr() → Attribute +Ordered list of material purposes to consider when resolving material +bindings in the scene. +The empty string indicates the”allPurpose”binding. +Declaration +uniform token[] materialBindingPurposes = ["full",""] +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform +Allowed Values +full, preview,”” + +GetProductsRel() → Relationship +The set of RenderProducts the render should produce. +This relationship should target UsdRenderProduct prims. If no +products are specified, an application should produce an rgb image +according to the RenderSettings configuration, to a default display or +image name. + +GetRenderingColorSpaceAttr() → Attribute +Describes a renderer’s working (linear) colorSpace where all the +renderer/shader math is expected to happen. +When no renderingColorSpace is provided, renderer should use its own +default. +Declaration +uniform token renderingColorSpace +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +static GetStageRenderSettings() +classmethod GetStageRenderSettings(stage) -> Settings +Fetch and return stage ‘s render settings, as indicated by root +layer metadata. +If unauthored, or the metadata does not refer to a valid +UsdRenderSettings prim, this will return an invalid UsdRenderSettings +prim. + +Parameters +stage (UsdStageWeak) – + +class pxr.UsdRender.SettingsBase +Abstract base class that defines render settings that can be specified +on either a RenderSettings prim or a RenderProduct prim. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdRenderTokens. So to set an attribute to the value”rightHanded”, +use UsdRenderTokens->rightHanded as the value. +Methods: + +CreateAspectRatioConformPolicyAttr(...) +See GetAspectRatioConformPolicyAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateCameraRel() +See GetCameraRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDataWindowNDCAttr(defaultValue, ...) +See GetDataWindowNDCAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDisableMotionBlurAttr(defaultValue, ...) +See GetDisableMotionBlurAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateInstantaneousShutterAttr(defaultValue, ...) +See GetInstantaneousShutterAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePixelAspectRatioAttr(defaultValue, ...) +See GetPixelAspectRatioAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateResolutionAttr(defaultValue, writeSparsely) +See GetResolutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> SettingsBase + +GetAspectRatioConformPolicyAttr() +Indicates the policy to use to resolve an aspect ratio mismatch between the camera aperture and image settings. + +GetCameraRel() +The camera relationship specifies the primary camera to use in a render. + +GetDataWindowNDCAttr() +dataWindowNDC specifies the axis-aligned rectangular region in the adjusted aperture window within which the renderer should produce data. + +GetDisableMotionBlurAttr() +Disable all motion blur by setting the shutter interval of the targeted camera to [0,0] - that is, take only one sample, namely at the current time code. + +GetInstantaneousShutterAttr() +Deprecated - use disableMotionBlur instead. + +GetPixelAspectRatioAttr() +The aspect ratio (width/height) of image pixels. + +GetResolutionAttr() +The image pixel resolution, corresponding to the camera's screen window. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateAspectRatioConformPolicyAttr(defaultValue, writeSparsely) → Attribute +See GetAspectRatioConformPolicyAttr() , and also Create vs Get +Property Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateCameraRel() → Relationship +See GetCameraRel() , and also Create vs Get Property Methods for when +to use Get vs Create. + +CreateDataWindowNDCAttr(defaultValue, writeSparsely) → Attribute +See GetDataWindowNDCAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDisableMotionBlurAttr(defaultValue, writeSparsely) → Attribute +See GetDisableMotionBlurAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateInstantaneousShutterAttr(defaultValue, writeSparsely) → Attribute +See GetInstantaneousShutterAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePixelAspectRatioAttr(defaultValue, writeSparsely) → Attribute +See GetPixelAspectRatioAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateResolutionAttr(defaultValue, writeSparsely) → Attribute +See GetResolutionAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> SettingsBase +Return a UsdRenderSettingsBase holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRenderSettingsBase(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAspectRatioConformPolicyAttr() → Attribute +Indicates the policy to use to resolve an aspect ratio mismatch +between the camera aperture and image settings. +This policy allows a standard render setting to do something +reasonable given varying camera inputs. +The camera aperture aspect ratio is determined by the aperture +atributes on the UsdGeomCamera. +The image aspect ratio is determined by the resolution and +pixelAspectRatio attributes in the render settings. + +“expandAperture”: if necessary, expand the aperture to fit the +image, exposing additional scene content +“cropAperture”: if necessary, crop the aperture to fit the image, +cropping scene content +“adjustApertureWidth”: if necessary, adjust aperture width to +make its aspect ratio match the image +“adjustApertureHeight”: if necessary, adjust aperture height to +make its aspect ratio match the image +“adjustPixelAspectRatio”: compute pixelAspectRatio to make the +image exactly cover the aperture; disregards existing attribute value +of pixelAspectRatio + +Declaration +uniform token aspectRatioConformPolicy ="expandAperture" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +expandAperture, cropAperture, adjustApertureWidth, +adjustApertureHeight, adjustPixelAspectRatio + +GetCameraRel() → Relationship +The camera relationship specifies the primary camera to use in a +render. +It must target a UsdGeomCamera. + +GetDataWindowNDCAttr() → Attribute +dataWindowNDC specifies the axis-aligned rectangular region in the +adjusted aperture window within which the renderer should produce +data. +It is specified as (xmin, ymin, xmax, ymax) in normalized device +coordinates, where the range 0 to 1 corresponds to the aperture. (0,0) +corresponds to the bottom-left corner and (1,1) corresponds to the +upper-right corner. +Specifying a window outside the unit square will produce overscan +data. Specifying a window that does not cover the unit square will +produce a cropped render. +A pixel is included in the rendered result if the pixel center is +contained by the data window. This is consistent with standard rules +used by polygon rasterization engines. UsdRenderRasterization +The data window is expressed in NDC so that cropping and overscan may +be resolution independent. In interactive workflows, incremental +cropping and resolution adjustment may be intermixed to isolate and +examine parts of the scene. In compositing workflows, overscan may be +used to support image post-processing kernels, and reduced-resolution +proxy renders may be used for faster iteration. +The dataWindow:ndc coordinate system references the aperture after any +adjustments required by aspectRatioConformPolicy. +Declaration +uniform float4 dataWindowNDC = (0, 0, 1, 1) +C++ Type +GfVec4f +Usd Type +SdfValueTypeNames->Float4 +Variability +SdfVariabilityUniform + +GetDisableMotionBlurAttr() → Attribute +Disable all motion blur by setting the shutter interval of the +targeted camera to [0,0] - that is, take only one sample, namely at +the current time code. +Declaration +uniform bool disableMotionBlur = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetInstantaneousShutterAttr() → Attribute +Deprecated - use disableMotionBlur instead. +Override the targeted camera ‘s shutterClose to be equal to the +value of its shutterOpen, to produce a zero-width shutter interval. +This gives us a convenient way to disable motion blur. +Declaration +uniform bool instantaneousShutter = 0 +C++ Type +bool +Usd Type +SdfValueTypeNames->Bool +Variability +SdfVariabilityUniform + +GetPixelAspectRatioAttr() → Attribute +The aspect ratio (width/height) of image pixels. +The default ratio 1.0 indicates square pixels. +Declaration +uniform float pixelAspectRatio = 1 +C++ Type +float +Usd Type +SdfValueTypeNames->Float +Variability +SdfVariabilityUniform + +GetResolutionAttr() → Attribute +The image pixel resolution, corresponding to the camera’s screen +window. +Declaration +uniform int2 resolution = (2048, 1080) +C++ Type +GfVec2i +Usd Type +SdfValueTypeNames->Int2 +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdRender.Tokens +Attributes: + +adjustApertureHeight + +adjustApertureWidth + +adjustPixelAspectRatio + +aspectRatioConformPolicy + +camera + +color3f + +command + +cropAperture + +dataType + +dataWindowNDC + +denoiseEnable + +denoisePass + +disableMotionBlur + +expandAperture + +fileName + +full + +includedPurposes + +inputPasses + +instantaneousShutter + +intrinsic + +lpe + +materialBindingPurposes + +orderedVars + +passType + +pixelAspectRatio + +preview + +primvar + +productName + +productType + +products + +raster + +raw + +renderSettingsPrimPath + +renderSource + +renderingColorSpace + +resolution + +sourceName + +sourceType + +adjustApertureHeight = 'adjustApertureHeight' + +adjustApertureWidth = 'adjustApertureWidth' + +adjustPixelAspectRatio = 'adjustPixelAspectRatio' + +aspectRatioConformPolicy = 'aspectRatioConformPolicy' + +camera = 'camera' + +color3f = 'color3f' + +command = 'command' + +cropAperture = 'cropAperture' + +dataType = 'dataType' + +dataWindowNDC = 'dataWindowNDC' + +denoiseEnable = 'denoise:enable' + +denoisePass = 'denoise:pass' + +disableMotionBlur = 'disableMotionBlur' + +expandAperture = 'expandAperture' + +fileName = 'fileName' + +full = 'full' + +includedPurposes = 'includedPurposes' + +inputPasses = 'inputPasses' + +instantaneousShutter = 'instantaneousShutter' + +intrinsic = 'intrinsic' + +lpe = 'lpe' + +materialBindingPurposes = 'materialBindingPurposes' + +orderedVars = 'orderedVars' + +passType = 'passType' + +pixelAspectRatio = 'pixelAspectRatio' + +preview = 'preview' + +primvar = 'primvar' + +productName = 'productName' + +productType = 'productType' + +products = 'products' + +raster = 'raster' + +raw = 'raw' + +renderSettingsPrimPath = 'renderSettingsPrimPath' + +renderSource = 'renderSource' + +renderingColorSpace = 'renderingColorSpace' + +resolution = 'resolution' + +sourceName = 'sourceName' + +sourceType = 'sourceType' + +class pxr.UsdRender.Var +A UsdRenderVar describes a custom data variable for a render to +produce. The prim describes the source of the data, which can be a +shader output or an LPE (Light Path Expression), and also allows +encoding of (generally renderer-specific) parameters that configure +the renderer for computing the variable. +The name of the RenderVar prim drives the name of the data variable +that the renderer will produce. +In the future, UsdRender may standardize RenderVar representation for +well-known variables under the sourceType intrinsic , such as r, +g, b, a, z, or id. For any described attribute Fallback +Value or Allowed Values below that are text/tokens, the actual +token is published and defined in UsdRenderTokens. So to set an +attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded +as the value. +Methods: + +CreateDataTypeAttr(defaultValue, writeSparsely) +See GetDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSourceNameAttr(defaultValue, writeSparsely) +See GetSourceNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSourceTypeAttr(defaultValue, writeSparsely) +See GetSourceTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Var + +Get +classmethod Get(stage, path) -> Var + +GetDataTypeAttr() +The type of this channel, as a USD attribute type. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSourceNameAttr() +The renderer should look for an output of this name as the computed value for the RenderVar. + +GetSourceTypeAttr() +Indicates the type of the source. + +CreateDataTypeAttr(defaultValue, writeSparsely) → Attribute +See GetDataTypeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSourceNameAttr(defaultValue, writeSparsely) → Attribute +See GetSourceNameAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSourceTypeAttr(defaultValue, writeSparsely) → Attribute +See GetSourceTypeAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Var +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Var +Return a UsdRenderVar holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRenderVar(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDataTypeAttr() → Attribute +The type of this channel, as a USD attribute type. +Declaration +uniform token dataType ="color3f" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSourceNameAttr() → Attribute +The renderer should look for an output of this name as the computed +value for the RenderVar. +Declaration +uniform string sourceName ="" +C++ Type +std::string +Usd Type +SdfValueTypeNames->String +Variability +SdfVariabilityUniform + +GetSourceTypeAttr() → Attribute +Indicates the type of the source. + +“raw”: The name should be passed directly to the renderer. This +is the default behavior. +“primvar”: This source represents the name of a primvar. Some +renderers may use this to ensure that the primvar is provided; other +renderers may require that a suitable material network be provided, in +which case this is simply an advisory setting. +“lpe”: Specifies a Light Path Expression in the OSL Light Path +Expressions language as the source for this RenderVar. Some renderers +may use extensions to that syntax, which will necessarily be non- +portable. +“intrinsic”: This setting is currently unimplemented, but +represents a future namespace for UsdRender to provide portable +baseline RenderVars, such as camera depth, that may have varying +implementations for each renderer. + +Declaration +uniform token sourceType ="raw" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +raw, primvar, lpe, intrinsic + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdRi.md b/UsdRi.md new file mode 100644 index 0000000000000000000000000000000000000000..8d0e2d97a20fbf58d9a1f80b1788230691d325aa --- /dev/null +++ b/UsdRi.md @@ -0,0 +1,974 @@ + + +UsdRi module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdRi module + +  + +# UsdRi module + +Summary: The UsdRi module provides schemas and utilities for authoring USD that encodes Renderman-specific information, and USD/RI data conversions. + +Classes: + +MaterialAPI +Deprecated + +SplineAPI +Deprecated + +StatementsAPI +Container namespace schema for all renderman statements. + +TextureAPI +Deprecated + +Tokens + +class pxr.UsdRi.MaterialAPI +Deprecated +Materials should use UsdShadeMaterial instead. This schema will be +removed in a future release. +This API provides outputs that connect a material prim to prman +shaders and RIS objects. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdRiTokens. So to set an attribute to the value”rightHanded”, use +UsdRiTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> MaterialAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +ComputeInterfaceInputConsumersMap(...) +Walks the namespace subtree below the material and computes a map containing the list of all inputs on the material and the associated vector of consumers of their values. + +CreateDisplacementAttr(defaultValue, ...) +See GetDisplacementAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSurfaceAttr(defaultValue, writeSparsely) +See GetSurfaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVolumeAttr(defaultValue, writeSparsely) +See GetVolumeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> MaterialAPI + +GetDisplacement(ignoreBaseMaterial) +Returns a valid shader object if the"displacement"output on the material is connected to one. + +GetDisplacementAttr() +Declaration + +GetDisplacementOutput() +Returns the"displacement"output associated with the material. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSurface(ignoreBaseMaterial) +Returns a valid shader object if the"surface"output on the material is connected to one. + +GetSurfaceAttr() +Declaration + +GetSurfaceOutput() +Returns the"surface"output associated with the material. + +GetVolume(ignoreBaseMaterial) +Returns a valid shader object if the"volume"output on the material is connected to one. + +GetVolumeAttr() +Declaration + +GetVolumeOutput() +Returns the"volume"output associated with the material. + +SetDisplacementSource(displacementPath) + +param displacementPath + +SetSurfaceSource(surfacePath) + +param surfacePath + +SetVolumeSource(volumePath) + +param volumePath + +static Apply() +classmethod Apply(prim) -> MaterialAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”RiMaterialAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdRiMaterialAPI object is returned upon success. An invalid +(or empty) UsdRiMaterialAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +ComputeInterfaceInputConsumersMap(computeTransitiveConsumers) → NodeGraph.InterfaceInputConsumersMap +Walks the namespace subtree below the material and computes a map +containing the list of all inputs on the material and the associated +vector of consumers of their values. +The consumers can be inputs on shaders within the material or on node- +graphs under it. + +Parameters +computeTransitiveConsumers (bool) – + +CreateDisplacementAttr(defaultValue, writeSparsely) → Attribute +See GetDisplacementAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSurfaceAttr(defaultValue, writeSparsely) → Attribute +See GetSurfaceAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVolumeAttr(defaultValue, writeSparsely) → Attribute +See GetVolumeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> MaterialAPI +Return a UsdRiMaterialAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRiMaterialAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDisplacement(ignoreBaseMaterial) → Shader +Returns a valid shader object if the”displacement”output on the +material is connected to one. +If ignoreBaseMaterial is true and if the”displacement”shader +source is specified in the base-material of this material, then this +returns an invalid shader object. + +Parameters +ignoreBaseMaterial (bool) – + +GetDisplacementAttr() → Attribute +Declaration +token outputs:ri:displacement +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetDisplacementOutput() → Output +Returns the”displacement”output associated with the material. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSurface(ignoreBaseMaterial) → Shader +Returns a valid shader object if the”surface”output on the material is +connected to one. +If ignoreBaseMaterial is true and if the”surface”shader source is +specified in the base-material of this material, then this returns an +invalid shader object. + +Parameters +ignoreBaseMaterial (bool) – + +GetSurfaceAttr() → Attribute +Declaration +token outputs:ri:surface +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetSurfaceOutput() → Output +Returns the”surface”output associated with the material. + +GetVolume(ignoreBaseMaterial) → Shader +Returns a valid shader object if the”volume”output on the material is +connected to one. +If ignoreBaseMaterial is true and if the”volume”shader source is +specified in the base-material of this material, then this returns an +invalid shader object. + +Parameters +ignoreBaseMaterial (bool) – + +GetVolumeAttr() → Attribute +Declaration +token outputs:ri:volume +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetVolumeOutput() → Output +Returns the”volume”output associated with the material. + +SetDisplacementSource(displacementPath) → bool + +Parameters +displacementPath (Path) – + +SetSurfaceSource(surfacePath) → bool + +Parameters +surfacePath (Path) – + +SetVolumeSource(volumePath) → bool + +Parameters +volumePath (Path) – + +class pxr.UsdRi.SplineAPI +Deprecated +This API schema will be removed in a future release. +RiSplineAPI is a general purpose API schema used to describe a named +spline stored as a set of attributes on a prim. +It is an add-on schema that can be applied many times to a prim with +different spline names. All the attributes authored by the schema are +namespaced under”$NAME:spline:”, with the name of the spline providing +a namespace for the attributes. +The spline describes a 2D piecewise cubic curve with a position and +value for each knot. This is chosen to give straightforward artistic +control over the shape. The supported basis types are: + +linear (UsdRiTokens->linear) +bspline (UsdRiTokens->bspline) +Catmull-Rom (UsdRiTokens->catmullRom) + +Methods: + +Apply +classmethod Apply(prim) -> SplineAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateInterpolationAttr(defaultValue, ...) +See GetInterpolationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePositionsAttr(defaultValue, writeSparsely) +See GetPositionsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateValuesAttr(defaultValue, writeSparsely) +See GetValuesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> SplineAPI + +GetInterpolationAttr() +Interpolation method for the spline. + +GetPositionsAttr() +Positions of the knots. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetValuesAttr() +Values of the knots. + +GetValuesTypeName() +Returns the intended typename of the values attribute of the spline. + +Validate(reason) +Validates the attribute values belonging to the spline. + +static Apply() +classmethod Apply(prim) -> SplineAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”RiSplineAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdRiSplineAPI object is returned upon success. An invalid (or +empty) UsdRiSplineAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateInterpolationAttr(defaultValue, writeSparsely) → Attribute +See GetInterpolationAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePositionsAttr(defaultValue, writeSparsely) → Attribute +See GetPositionsAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateValuesAttr(defaultValue, writeSparsely) → Attribute +See GetValuesAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> SplineAPI +Return a UsdRiSplineAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRiSplineAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetInterpolationAttr() → Attribute +Interpolation method for the spline. +C++ Type: TfToken Usd Type: SdfValueTypeNames->Token Variability: +SdfVariabilityUniform Fallback Value: linear Allowed Values : +[linear, constant, bspline, catmullRom] + +GetPositionsAttr() → Attribute +Positions of the knots. +C++ Type: VtArray Usd Type: SdfValueTypeNames->FloatArray +Variability: SdfVariabilityUniform Fallback Value: No Fallback + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetValuesAttr() → Attribute +Values of the knots. +C++ Type: See GetValuesTypeName() Usd Type: See GetValuesTypeName() +Variability: SdfVariabilityUniform Fallback Value: No Fallback + +GetValuesTypeName() → ValueTypeName +Returns the intended typename of the values attribute of the spline. + +Validate(reason) → bool +Validates the attribute values belonging to the spline. +Returns true if the spline has all valid attribute values. Returns +false and populates the reason output argument if the spline has +invalid attribute values. +Here’s the list of validations performed by this method: + +the SplineAPI must be fully initialized +interpolation attribute must exist and use an allowed value +the positions array must be a float array +the positions array must be sorted by increasing value +the values array must use the correct value type +the positions and values array must have the same size + +Parameters +reason (str) – + +class pxr.UsdRi.StatementsAPI +Container namespace schema for all renderman statements. +The longer term goal is for clients to go directly to primvar or +render-attribute API’s, instead of using UsdRi StatementsAPI for +inherited attributes. Anticpating this, StatementsAPI can smooth the +way via a few environment variables: + +USDRI_STATEMENTS_READ_OLD_ENCODING: Causes StatementsAPI to read +old-style attributes instead of primvars in the”ri:”namespace. + +Methods: + +Apply +classmethod Apply(prim) -> StatementsAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateRiAttribute(name, riType, nameSpace) +Create a rib attribute on the prim to which this schema is attached. + +Get +classmethod Get(stage, path) -> StatementsAPI + +GetCoordinateSystem() +Returns the value in the"ri:coordinateSystem"attribute if it exists. + +GetModelCoordinateSystems(targets) +Populates the output targets with the authored ri:modelCoordinateSystems, if any. + +GetModelScopedCoordinateSystems(targets) +Populates the output targets with the authored ri:modelScopedCoordinateSystems, if any. + +GetRiAttribute(name, nameSpace) +Return a UsdAttribute representing the Ri attribute with the name name, in the namespace nameSpace. + +GetRiAttributeName +classmethod GetRiAttributeName(prop) -> str + +GetRiAttributeNameSpace +classmethod GetRiAttributeNameSpace(prop) -> str + +GetRiAttributes(nameSpace) +Return all rib attributes on this prim, or under a specific namespace (e.g."user"). + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetScopedCoordinateSystem() +Returns the value in the"ri:scopedCoordinateSystem"attribute if it exists. + +HasCoordinateSystem() +Returns true if the underlying prim has a ri:coordinateSystem opinion. + +HasScopedCoordinateSystem() +Returns true if the underlying prim has a ri:scopedCoordinateSystem opinion. + +IsRiAttribute +classmethod IsRiAttribute(prop) -> bool + +MakeRiAttributePropertyName +classmethod MakeRiAttributePropertyName(attrName) -> str + +SetCoordinateSystem(coordSysName) +Sets the"ri:coordinateSystem"attribute to the given string value, creating the attribute if needed. + +SetScopedCoordinateSystem(coordSysName) +Sets the"ri:scopedCoordinateSystem"attribute to the given string value, creating the attribute if needed. + +static Apply() +classmethod Apply(prim) -> StatementsAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”StatementsAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdRiStatementsAPI object is returned upon success. An invalid +(or empty) UsdRiStatementsAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateRiAttribute(name, riType, nameSpace) → Attribute +Create a rib attribute on the prim to which this schema is attached. +A rib attribute consists of an attribute “nameSpace” and an +attribute “name”. For example, the namespace”cull”may define +attributes”backfacing”and”hidden”, and user-defined attributes belong +to the namespace”user”. +This method makes no attempt to validate that the given nameSpace +and name are actually meaningful to prman or any other renderer. +riType +should be a known RenderMan type definition, which can be array- +valued. For instance, both”color”and”float[3]”are valid values for +riType . + +Parameters + +name (str) – +riType (str) – +nameSpace (str) – + +CreateRiAttribute(name, tfType, nameSpace) -> Attribute +Creates an attribute of the given tfType . +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +name (str) – +tfType (Type) – +nameSpace (str) – + +static Get() +classmethod Get(stage, path) -> StatementsAPI +Return a UsdRiStatementsAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRiStatementsAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCoordinateSystem() → str +Returns the value in the”ri:coordinateSystem”attribute if it exists. + +GetModelCoordinateSystems(targets) → bool +Populates the output targets with the authored +ri:modelCoordinateSystems, if any. +Returns true if the query was successful. + +Parameters +targets (list[SdfPath]) – + +GetModelScopedCoordinateSystems(targets) → bool +Populates the output targets with the authored +ri:modelScopedCoordinateSystems, if any. +Returns true if the query was successful. + +Parameters +targets (list[SdfPath]) – + +GetRiAttribute(name, nameSpace) → Attribute +Return a UsdAttribute representing the Ri attribute with the name +name, in the namespace nameSpace. +The attribute returned may or may not actually exist so it must be +checked for validity. + +Parameters + +name (str) – +nameSpace (str) – + +static GetRiAttributeName() +classmethod GetRiAttributeName(prop) -> str +Return the base, most-specific name of the rib attribute. +For example, the name of the rib +attribute”cull:backfacing”is”backfacing” + +Parameters +prop (Property) – + +static GetRiAttributeNameSpace() +classmethod GetRiAttributeNameSpace(prop) -> str +Return the containing namespace of the rib attribute (e.g.”user”). + +Parameters +prop (Property) – + +GetRiAttributes(nameSpace) → list[Property] +Return all rib attributes on this prim, or under a specific namespace +(e.g.”user”). +As noted above, rib attributes can be either UsdAttribute or +UsdRelationship, and like all UsdProperties, need not have a defined +value. + +Parameters +nameSpace (str) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetScopedCoordinateSystem() → str +Returns the value in the”ri:scopedCoordinateSystem”attribute if it +exists. + +HasCoordinateSystem() → bool +Returns true if the underlying prim has a ri:coordinateSystem opinion. + +HasScopedCoordinateSystem() → bool +Returns true if the underlying prim has a ri:scopedCoordinateSystem +opinion. + +static IsRiAttribute() +classmethod IsRiAttribute(prop) -> bool +Return true if the property is in the”ri:attributes”namespace. + +Parameters +prop (Property) – + +static MakeRiAttributePropertyName() +classmethod MakeRiAttributePropertyName(attrName) -> str +Returns the given attrName prefixed with the full Ri attribute +namespace, creating a name suitable for an RiAttribute UsdProperty. +This handles conversion of common separator characters used in other +packages, such as periods and underscores. +Will return empty string if attrName is not a valid property +identifier; otherwise, will return a valid property name that +identifies the property as an RiAttribute, according to the following +rules: + +If attrName is already a properly constructed RiAttribute +property name, return it unchanged. +If attrName contains two or more tokens separated by a +colon, consider the first to be the namespace, and the rest the +name, joined by underscores +If attrName contains two or more tokens separated by a +period, consider the first to be the namespace, and the rest the +name, joined by underscores +If attrName contains two or more tokens separated by an, +underscore consider the first to be the namespace, and the rest the +name, joined by underscores +else, assume attrName is the name, and”user”is the namespace + +Parameters +attrName (str) – + +SetCoordinateSystem(coordSysName) → None +Sets the”ri:coordinateSystem”attribute to the given string value, +creating the attribute if needed. +That identifies this prim as providing a coordinate system, which can +be retrieved via UsdGeomXformable::GetTransformAttr(). Also adds the +owning prim to the ri:modelCoordinateSystems relationship targets on +its parent leaf model prim, if it exists. If this prim is not under a +leaf model, no relationship targets will be authored. + +Parameters +coordSysName (str) – + +SetScopedCoordinateSystem(coordSysName) → None +Sets the”ri:scopedCoordinateSystem”attribute to the given string +value, creating the attribute if needed. +That identifies this prim as providing a coordinate system, which can +be retrieved via UsdGeomXformable::GetTransformAttr(). Such coordinate +systems are local to the RI attribute stack state, but does get +updated properly for instances when defined inside an object master. +Also adds the owning prim to the ri:modelScopedCoordinateSystems +relationship targets on its parent leaf model prim, if it exists. If +this prim is not under a leaf model, no relationship targets will be +authored. + +Parameters +coordSysName (str) – + +class pxr.UsdRi.TextureAPI +Deprecated +This API schema will be removed in a future release. +RiTextureAPI is an API schema that provides an interface to add +Renderman-specific attributes to adjust textures. +Methods: + +Apply +classmethod Apply(prim) -> TextureAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateRiTextureGammaAttr(defaultValue, ...) +See GetRiTextureGammaAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRiTextureSaturationAttr(defaultValue, ...) +See GetRiTextureSaturationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> TextureAPI + +GetRiTextureGammaAttr() +Gamma-correct the texture. + +GetRiTextureSaturationAttr() +Adjust the texture's saturation. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> TextureAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”RiTextureAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdRiTextureAPI object is returned upon success. An invalid +(or empty) UsdRiTextureAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateRiTextureGammaAttr(defaultValue, writeSparsely) → Attribute +See GetRiTextureGammaAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRiTextureSaturationAttr(defaultValue, writeSparsely) → Attribute +See GetRiTextureSaturationAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> TextureAPI +Return a UsdRiTextureAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdRiTextureAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetRiTextureGammaAttr() → Attribute +Gamma-correct the texture. +Declaration +float ri:texture:gamma +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +GetRiTextureSaturationAttr() → Attribute +Adjust the texture’s saturation. +Declaration +float ri:texture:saturation +C++ Type +float +Usd Type +SdfValueTypeNames->Float + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdRi.Tokens +Attributes: + +bspline + +catmullRom + +constant + +interpolation + +linear + +outputsRiDisplacement + +outputsRiSurface + +outputsRiVolume + +positions + +renderContext + +riTextureGamma + +riTextureSaturation + +spline + +values + +bspline = 'bspline' + +catmullRom = 'catmull-rom' + +constant = 'constant' + +interpolation = 'interpolation' + +linear = 'linear' + +outputsRiDisplacement = 'outputs:ri:displacement' + +outputsRiSurface = 'outputs:ri:surface' + +outputsRiVolume = 'outputs:ri:volume' + +positions = 'positions' + +renderContext = 'ri' + +riTextureGamma = 'ri:texture:gamma' + +riTextureSaturation = 'ri:texture:saturation' + +spline = 'spline' + +values = 'values' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdShade.md b/UsdShade.md new file mode 100644 index 0000000000000000000000000000000000000000..e0805aa6332890e0e6359b6971ab422b5c4a8044 --- /dev/null +++ b/UsdShade.md @@ -0,0 +1,4302 @@ + + +UsdShade module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdShade module + +  + +# UsdShade module + +Summary: The UsdShade module provides schemas and behaviors for creating and binding materials, which encapsulate shading networks. + +Classes: + +AttributeType + +ConnectableAPI +UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and making connections between shading parameters and outputs. + +ConnectionModification + +ConnectionSourceInfo +A compact struct to represent a bundle of information about an upstream source attribute. + +CoordSysAPI +UsdShadeCoordSysAPI provides a way to designate, name, and discover coordinate systems. + +Input +This class encapsulates a shader or node-graph input, which is a connectable attribute representing a typed value. + +Material +A Material provides a container into which multiple"render targets"can add data that defines a"shading material"for a renderer. + +MaterialBindingAPI +UsdShadeMaterialBindingAPI is an API schema that provides an interface for binding materials to prims or collections of prims (represented by UsdCollectionAPI objects). + +NodeDefAPI +UsdShadeNodeDefAPI is an API schema that provides attributes for a prim to select a corresponding Shader Node Definition ("Sdr Node"), as well as to look up a runtime entry for that shader node in the form of an SdrShaderNode. + +NodeGraph +A node-graph is a container for shading nodes, as well as other node- graphs. + +Output +This class encapsulates a shader or node-graph output, which is a connectable attribute representing a typed, externally computed value. + +Shader +Base class for all USD shaders. + +ShaderDefParserPlugin +Parses shader definitions represented using USD scene description using the schemas provided by UsdShade. + +ShaderDefUtils +This class contains a set of utility functions used for populating the shader registry with shaders definitions specified using UsdShade schemas. + +Tokens + +Utils +This class contains a set of utility functions used when authoring and querying shading networks. + +class pxr.UsdShade.AttributeType +Attributes: + +Input + +Invalid + +Output + +names + +values + +Input = pxr.UsdShade.AttributeType.Input + +Invalid = pxr.UsdShade.AttributeType.Invalid + +Output = pxr.UsdShade.AttributeType.Output + +names = {'Input': pxr.UsdShade.AttributeType.Input, 'Invalid': pxr.UsdShade.AttributeType.Invalid, 'Output': pxr.UsdShade.AttributeType.Output} + +values = {0: pxr.UsdShade.AttributeType.Invalid, 1: pxr.UsdShade.AttributeType.Input, 2: pxr.UsdShade.AttributeType.Output} + +class pxr.UsdShade.ConnectableAPI +UsdShadeConnectableAPI is an API schema that provides a common +interface for creating outputs and making connections between shading +parameters and outputs. The interface is common to all UsdShade +schemas that support Inputs and Outputs, which currently includes +UsdShadeShader, UsdShadeNodeGraph, and UsdShadeMaterial. +One can construct a UsdShadeConnectableAPI directly from a UsdPrim, or +from objects of any of the schema classes listed above. If it seems +onerous to need to construct a secondary schema object to interact +with Inputs and Outputs, keep in mind that any function whose purpose +is either to walk material/shader networks via their connections, or +to create such networks, can typically be written entirely in terms of +UsdShadeConnectableAPI objects, without needing to care what the +underlying prim type is. +Additionally, the most common UsdShadeConnectableAPI behaviors +(creating Inputs and Outputs, and making connections) are wrapped as +convenience methods on the prim schema classes (creation) and +UsdShadeInput and UsdShadeOutput. +Methods: + +CanConnect +classmethod CanConnect(input, source) -> bool + +ClearSource +classmethod ClearSource(shadingAttr) -> bool + +ClearSources +classmethod ClearSources(shadingAttr) -> bool + +ConnectToSource +classmethod ConnectToSource(shadingAttr, source, mod) -> bool + +CreateInput(name, typeName) +Create an input which can both have a value and be connected. + +CreateOutput(name, typeName) +Create an output, which represents and externally computed, typed value. + +DisconnectSource +classmethod DisconnectSource(shadingAttr, sourceAttr) -> bool + +Get +classmethod Get(stage, path) -> ConnectableAPI + +GetConnectedSource +classmethod GetConnectedSource(shadingAttr, source, sourceName, sourceType) -> bool + +GetConnectedSources +classmethod GetConnectedSources(shadingAttr, invalidSourcePaths) -> list[UsdShadeSourceInfo] + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Returns all inputs on the connectable prim (i.e. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Returns all outputs on the connectable prim (i.e. + +GetRawConnectedSourcePaths +classmethod GetRawConnectedSourcePaths(shadingAttr, sourcePaths) -> bool + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +HasConnectableAPI +classmethod HasConnectableAPI(schemaType) -> bool + +HasConnectedSource +classmethod HasConnectedSource(shadingAttr) -> bool + +IsContainer() +Returns true if the prim is a container. + +IsSourceConnectionFromBaseMaterial +classmethod IsSourceConnectionFromBaseMaterial(shadingAttr) -> bool + +RequiresEncapsulation() +Returns true if container encapsulation rules should be respected when evaluating connectibility behavior, false otherwise. + +SetConnectedSources +classmethod SetConnectedSources(shadingAttr, sourceInfos) -> bool + +static CanConnect() +classmethod CanConnect(input, source) -> bool +Determines whether the given input can be connected to the given +source attribute, which can be an input or an output. +The result depends on the”connectability”of the input and the source +attributes. Depending on the prim type, this may require the plugin +that defines connectability behavior for that prim type be loaded. +UsdShadeInput::SetConnectability +UsdShadeInput::GetConnectability + +Parameters + +input (Input) – +source (Attribute) – + +CanConnect(input, sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourceInput (Input) – + +CanConnect(input, sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourceOutput (Output) – + +CanConnect(output, source) -> bool +Determines whether the given output can be connected to the given +source attribute, which can be an input or an output. +An output is considered to be connectable only if it belongs to a +node-graph. Shader outputs are not connectable. +source is an optional argument. If a valid UsdAttribute is +supplied for it, this method will return true only if the source +attribute is owned by a descendant of the node-graph owning the +output. + +Parameters + +output (Output) – +source (Attribute) – + +CanConnect(output, sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourceInput (Input) – + +CanConnect(output, sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourceOutput (Output) – + +static ClearSource() +classmethod ClearSource(shadingAttr) -> bool +Deprecated +This is the older version that only referenced a single source. Please +use ClearSources instead. + +Parameters +shadingAttr (Attribute) – + +ClearSource(input) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +input (Input) – + +ClearSource(output) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +output (Output) – + +static ClearSources() +classmethod ClearSources(shadingAttr) -> bool +Clears sources for this shading attribute in the current +UsdEditTarget. +Most of the time, what you probably want is DisconnectSource() rather +than this function. +DisconnectSource() + +Parameters +shadingAttr (Attribute) – + +ClearSources(input) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +input (Input) – + +ClearSources(output) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +output (Output) – + +static ConnectToSource() +classmethod ConnectToSource(shadingAttr, source, mod) -> bool +Authors a connection for a given shading attribute shadingAttr . +shadingAttr can represent a parameter, an input or an output. +source is a struct that describes the upstream source attribute +with all the information necessary to make a connection. See the +documentation for UsdShadeConnectionSourceInfo. mod describes the +operation that should be applied to the list of connections. By +default the new connection will replace any existing connections, but +it can add to the list of connections to represent multiple input +connections. +true if a connection was created successfully. false if +shadingAttr or source is invalid. +This method does not verify the connectability of the shading +attribute to the source. Clients must invoke CanConnect() themselves +to ensure compatibility. +The source shading attribute is created if it doesn’t exist already. + +Parameters + +shadingAttr (Attribute) – +source (ConnectionSourceInfo) – +mod (ConnectionModification) – + +ConnectToSource(input, source, mod) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +source (ConnectionSourceInfo) – +mod (ConnectionModification) – + +ConnectToSource(output, source, mod) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +source (ConnectionSourceInfo) – +mod (ConnectionModification) – + +ConnectToSource(shadingAttr, source, sourceName, sourceType, typeName) -> bool +Deprecated +Please use the versions that take a UsdShadeConnectionSourceInfo to +describe the upstream source This is an overloaded member function, +provided for convenience. It differs from the above function only in +what argument(s) it accepts. + +Parameters + +shadingAttr (Attribute) – +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – +typeName (ValueTypeName) – + +ConnectToSource(input, source, sourceName, sourceType, typeName) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – +typeName (ValueTypeName) – + +ConnectToSource(output, source, sourceName, sourceType, typeName) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – +typeName (ValueTypeName) – + +ConnectToSource(shadingAttr, sourcePath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Connect the given shading attribute to the source at path, +sourcePath . +sourcePath should be the fully namespaced property path. +This overload is provided for convenience, for use in contexts where +the prim types are unknown or unavailable. + +Parameters + +shadingAttr (Attribute) – +sourcePath (Path) – + +ConnectToSource(input, sourcePath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourcePath (Path) – + +ConnectToSource(output, sourcePath) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourcePath (Path) – + +ConnectToSource(shadingAttr, sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Connect the given shading attribute to the given source input. + +Parameters + +shadingAttr (Attribute) – +sourceInput (Input) – + +ConnectToSource(input, sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourceInput (Input) – + +ConnectToSource(output, sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourceInput (Input) – + +ConnectToSource(shadingAttr, sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Connect the given shading attribute to the given source output. + +Parameters + +shadingAttr (Attribute) – +sourceOutput (Output) – + +ConnectToSource(input, sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourceOutput (Output) – + +ConnectToSource(output, sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourceOutput (Output) – + +CreateInput(name, typeName) → Input +Create an input which can both have a value and be connected. +The attribute representing the input is created in +the”inputs:”namespace. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateOutput(name, typeName) → Output +Create an output, which represents and externally computed, typed +value. +Outputs on node-graphs can be connected. +The attribute representing an output is created in +the”outputs:”namespace. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +static DisconnectSource() +classmethod DisconnectSource(shadingAttr, sourceAttr) -> bool +Disconnect source for this shading attribute. +If sourceAttr is valid it will disconnect the connection to this +upstream attribute. Otherwise it will disconnect all connections by +authoring an empty list of connections for the attribute +shadingAttr . +This may author more scene description than you might expect - we +define the behavior of disconnect to be that, even if a shading +attribute becomes connected in a weaker layer than the current +UsdEditTarget, the attribute will still be disconnected in the +composition, therefore we must”block”it in the current UsdEditTarget. +ConnectToSource() . + +Parameters + +shadingAttr (Attribute) – +sourceAttr (Attribute) – + +DisconnectSource(input, sourceAttr) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourceAttr (Attribute) – + +DisconnectSource(output, sourceAttr) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourceAttr (Attribute) – + +static Get() +classmethod Get(stage, path) -> ConnectableAPI +Return a UsdShadeConnectableAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeConnectableAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetConnectedSource() +classmethod GetConnectedSource(shadingAttr, source, sourceName, sourceType) -> bool +Deprecated +Shading attributes can have multiple connections and so using +GetConnectedSources is needed in general +Finds the source of a connection for the given shading attribute. +shadingAttr is the shading attribute whose connection we want to +interrogate. source is an output parameter which will be set to +the source connectable prim. sourceName will be set to the name of +the source shading attribute, which may be an input or an output, as +specified by sourceType sourceType will have the type of the +source shading attribute, i.e. whether it is an Input or +Output +true if the shading attribute is connected to a valid, defined +source attribute. false if the shading attribute is not connected +to a single, defined source attribute. +Previously this method would silently return false for multiple +connections. We are changing the behavior of this method to return the +result for the first connection and issue a TfWarn about it. We want +to encourage clients to use GetConnectedSources going forward. +The python wrapping for this method returns a (source, sourceName, +sourceType) tuple if the parameter is connected, else None + +Parameters + +shadingAttr (Attribute) – +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – + +GetConnectedSource(input, source, sourceName, sourceType) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – + +GetConnectedSource(output, source, sourceName, sourceType) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – + +static GetConnectedSources() +classmethod GetConnectedSources(shadingAttr, invalidSourcePaths) -> list[UsdShadeSourceInfo] +Finds the valid sources of connections for the given shading +attribute. +shadingAttr is the shading attribute whose connections we want to +interrogate. invalidSourcePaths is an optional output parameter to +collect the invalid source paths that have not been reported in the +returned vector. +Returns a vector of UsdShadeConnectionSourceInfo structs with +information about each upsteam attribute. If the vector is empty, +there have been no connections. +A valid connection requires the existence of the source attribute and +also requires that the source prim is UsdShadeConnectableAPI +compatible. +The python wrapping returns a tuple with the valid connections first, +followed by the invalid source paths. + +Parameters + +shadingAttr (Attribute) – +invalidSourcePaths (list[SdfPath]) – + +GetConnectedSources(input, invalidSourcePaths) -> list[UsdShadeSourceInfo] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +invalidSourcePaths (list[SdfPath]) – + +GetConnectedSources(output, invalidSourcePaths) -> list[UsdShadeSourceInfo] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +invalidSourcePaths (list[SdfPath]) – + +GetInput(name) → Input +Return the requested input if it exists. +name is the unnamespaced base name. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Returns all inputs on the connectable prim (i.e. +shader or node-graph). Inputs are represented by attributes in +the”inputs:”namespace. If onlyAuthored is true (the default), then +only return authored attributes; otherwise, this also returns un- +authored builtins. + +Parameters +onlyAuthored (bool) – + +GetOutput(name) → Output +Return the requested output if it exists. +name is the unnamespaced base name. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Returns all outputs on the connectable prim (i.e. +shader or node-graph). Outputs are represented by attributes in +the”outputs:”namespace. If onlyAuthored is true (the default), +then only return authored attributes; otherwise, this also returns un- +authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetRawConnectedSourcePaths() +classmethod GetRawConnectedSourcePaths(shadingAttr, sourcePaths) -> bool +Deprecated +Please us GetConnectedSources to retrieve multiple connections +Returns the”raw”(authored) connected source paths for the given +shading attribute. + +Parameters + +shadingAttr (Attribute) – +sourcePaths (list[SdfPath]) – + +GetRawConnectedSourcePaths(input, sourcePaths) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +input (Input) – +sourcePaths (list[SdfPath]) – + +GetRawConnectedSourcePaths(output, sourcePaths) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +sourcePaths (list[SdfPath]) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +static HasConnectableAPI() +classmethod HasConnectableAPI(schemaType) -> bool +Return true if the schemaType has a valid connectableAPIBehavior +registered, false otherwise. +To check if a prim’s connectableAPI has a behavior defined, use +UsdSchemaBase::operator bool() . + +Parameters +schemaType (Type) – + +HasConnectableAPI() -> bool +Return true if the schema type T has a connectableAPIBehavior +registered, false otherwise. + +static HasConnectedSource() +classmethod HasConnectedSource(shadingAttr) -> bool +Returns true if and only if the shading attribute is currently +connected to at least one valid (defined) source. +If you will be calling GetConnectedSources() afterwards anyways, it +will be much faster to instead check if the returned vector is +empty: +UsdShadeSourceInfoVector connections = + UsdShadeConnectableAPI::GetConnectedSources(attribute); +if (!connections.empty()){ + // process connected attribute +} else { + // process unconnected attribute +} + +Parameters +shadingAttr (Attribute) – + +HasConnectedSource(input) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +input (Input) – + +HasConnectedSource(output) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +output (Output) – + +IsContainer() → bool +Returns true if the prim is a container. +The underlying prim type may provide runtime behavior that defines +whether it is a container. + +static IsSourceConnectionFromBaseMaterial() +classmethod IsSourceConnectionFromBaseMaterial(shadingAttr) -> bool +Returns true if the connection to the given shading attribute’s +source, as returned by UsdShadeConnectableAPI::GetConnectedSource() , +is authored across a specializes arc, which is used to denote a base +material. + +Parameters +shadingAttr (Attribute) – + +IsSourceConnectionFromBaseMaterial(input) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +input (Input) – + +IsSourceConnectionFromBaseMaterial(output) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +output (Output) – + +RequiresEncapsulation() → bool +Returns true if container encapsulation rules should be respected when +evaluating connectibility behavior, false otherwise. +The underlying prim type may provide runtime behavior that defines if +encapsulation rules are respected or not. + +static SetConnectedSources() +classmethod SetConnectedSources(shadingAttr, sourceInfos) -> bool +Authors a list of connections for a given shading attribute +shadingAttr . +shadingAttr can represent a parameter, an input or an output. +sourceInfos is a vector of structs that describes the upstream +source attributes with all the information necessary to make all the +connections. See the documentation for UsdShadeConnectionSourceInfo. +true if all connection were created successfully. false if the +shadingAttr or one of the sources are invalid. +A valid connection is one that has a valid +UsdShadeConnectionSourceInfo , which requires the existence of the +upstream source prim. It does not require the existence of the source +attribute as it will be create if necessary. + +Parameters + +shadingAttr (Attribute) – +sourceInfos (list[ConnectionSourceInfo]) – + +class pxr.UsdShade.ConnectionModification +Attributes: + +Append + +Prepend + +Replace + +names + +values + +Append = pxr.UsdShade.ConnectionModification.Append + +Prepend = pxr.UsdShade.ConnectionModification.Prepend + +Replace = pxr.UsdShade.ConnectionModification.Replace + +names = {'Append': pxr.UsdShade.ConnectionModification.Append, 'Prepend': pxr.UsdShade.ConnectionModification.Prepend, 'Replace': pxr.UsdShade.ConnectionModification.Replace} + +values = {0: pxr.UsdShade.ConnectionModification.Replace, 1: pxr.UsdShade.ConnectionModification.Prepend, 2: pxr.UsdShade.ConnectionModification.Append} + +class pxr.UsdShade.ConnectionSourceInfo +A compact struct to represent a bundle of information about an +upstream source attribute. +Methods: + +IsValid() +Return true if this source info is valid for setting up a connection. + +Attributes: + +source + +sourceName + +sourceType + +typeName + +IsValid() → bool +Return true if this source info is valid for setting up a connection. + +property source + +property sourceName + +property sourceType + +property typeName + +class pxr.UsdShade.CoordSysAPI +UsdShadeCoordSysAPI provides a way to designate, name, and discover +coordinate systems. +Coordinate systems are implicitly established by UsdGeomXformable +prims, using their local space. That coordinate system may be bound +(i.e., named) from another prim. The binding is encoded as a single- +target relationship in the”coordSys:”namespace. Coordinate system +bindings apply to descendants of the prim where the binding is +expressed, but names may be re-bound by descendant prims. +Named coordinate systems are useful in shading workflows. An example +is projection paint, which projects a texture from a certain view (the +paint coordinate system). Using the paint coordinate frame avoids the +need to assign a UV set to the object, and can be a concise way to +project paint across a collection of objects with a single shared +paint coordinate system. +This is a non-applied API schema. +Methods: + +Bind(name, path) +Bind the name to the given path. + +BlockBinding(name) +Block the indicated coordinate system binding on this prim by blocking targets on the underlying relationship. + +CanContainPropertyName +classmethod CanContainPropertyName(name) -> bool + +ClearBinding(name, removeSpec) +Clear the indicated coordinate system binding on this prim from the current edit target. + +FindBindingsWithInheritance() +Find the list of coordinate system bindings that apply to this prim, including inherited bindings. + +Get +classmethod Get(stage, path) -> CoordSysAPI + +GetCoordSysRelationshipName +classmethod GetCoordSysRelationshipName(coordSysName) -> str + +GetLocalBindings() +Get the list of coordinate system bindings local to this prim. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +HasLocalBindings() +Returns true if the prim has local coordinate system binding opinions. + +Bind(name, path) → bool +Bind the name to the given path. +The prim at the given path is expected to be UsdGeomXformable, in +order for the binding to be succesfully resolved. + +Parameters + +name (str) – +path (Path) – + +BlockBinding(name) → bool +Block the indicated coordinate system binding on this prim by blocking +targets on the underlying relationship. + +Parameters +name (str) – + +static CanContainPropertyName() +classmethod CanContainPropertyName(name) -> bool +Test whether a given name contains the”coordSys:”prefix. + +Parameters +name (str) – + +ClearBinding(name, removeSpec) → bool +Clear the indicated coordinate system binding on this prim from the +current edit target. +Only remove the spec if removeSpec is true (leave the spec to +preserve meta-data we may have intentionally authored on the +relationship) + +Parameters + +name (str) – +removeSpec (bool) – + +FindBindingsWithInheritance() → list[Binding] +Find the list of coordinate system bindings that apply to this prim, +including inherited bindings. +This computation examines this prim and ancestors for the strongest +binding for each name. A binding expressed by a child prim supercedes +bindings on ancestors. +Note that this API does not validate the prims at the target paths; +they may be of incorrect type, or missing entirely. +Binding relationships with no resolved targets are skipped. + +static Get() +classmethod Get(stage, path) -> CoordSysAPI +Return a UsdShadeCoordSysAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeCoordSysAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetCoordSysRelationshipName() +classmethod GetCoordSysRelationshipName(coordSysName) -> str +Returns the fully namespaced coordinate system relationship name, +given the coordinate system name. + +Parameters +coordSysName (str) – + +GetLocalBindings() → list[Binding] +Get the list of coordinate system bindings local to this prim. +This does not process inherited bindings. It does not validate that a +prim exists at the indicated path. If the binding relationship has +multiple targets, only the first is used. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +HasLocalBindings() → bool +Returns true if the prim has local coordinate system binding opinions. +Note that the resulting binding list may still be empty. + +class pxr.UsdShade.Input +This class encapsulates a shader or node-graph input, which is a +connectable attribute representing a typed value. +Methods: + +CanConnect(source) +Determines whether this Input can be connected to the given source attribute, which can be an input or an output. + +ClearConnectability() +Clears any authored connectability on the Input. + +ClearSdrMetadata() +Clears any"sdrMetadata"value authored on the Input in the current EditTarget. + +ClearSdrMetadataByKey(key) +Clears the entry corresponding to the given key in the"sdrMetadata"dictionary authored in the current EditTarget. + +ClearSource() +Deprecated + +ClearSources() +Clears sources for this Input in the current UsdEditTarget. + +ConnectToSource(source, mod) +Authors a connection for this Input. + +DisconnectSource(sourceAttr) +Disconnect source for this Input. + +Get(value, time) +Convenience wrapper for the templated UsdAttribute::Get() . + +GetAttr() +Explicit UsdAttribute extractor. + +GetBaseName() +Returns the name of the input. + +GetConnectability() +Returns the connectability of the Input. + +GetConnectedSource(source, sourceName, ...) +Deprecated + +GetConnectedSources(invalidSourcePaths) +Finds the valid sources of connections for the Input. + +GetDisplayGroup() +Get the displayGroup metadata for this Input, i.e. + +GetDocumentation() +Get documentation string for this Input. + +GetFullName() +Get the name of the attribute associated with the Input. + +GetPrim() +Get the prim that the input belongs to. + +GetRawConnectedSourcePaths(sourcePaths) +Deprecated + +GetRenderType() +Return this Input's specialized renderType, or an empty token if none was authored. + +GetSdrMetadata() +Returns this Input's composed"sdrMetadata"dictionary as a NdrTokenMap. + +GetSdrMetadataByKey(key) +Returns the value corresponding to key in the composed sdrMetadata dictionary. + +GetTypeName() +Get the"scene description"value type name of the attribute associated with the Input. + +GetValueProducingAttribute(attrType) +Deprecated + +GetValueProducingAttributes(shaderOutputsOnly) +Find what is connected to this Input recursively. + +HasConnectedSource() +Returns true if and only if this Input is currently connected to a valid (defined) source. + +HasRenderType() +Return true if a renderType has been specified for this Input. + +HasSdrMetadata() +Returns true if the Input has a non-empty composed"sdrMetadata"dictionary value. + +HasSdrMetadataByKey(key) +Returns true if there is a value corresponding to the given key in the composed"sdrMetadata"dictionary. + +IsInput +classmethod IsInput(attr) -> bool + +IsInterfaceInputName +classmethod IsInterfaceInputName(name) -> bool + +IsSourceConnectionFromBaseMaterial() +Returns true if the connection to this Input's source, as returned by GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. + +Set(value, time) +Set a value for the Input at time . + +SetConnectability(connectability) +Set the connectability of the Input. + +SetConnectedSources(sourceInfos) +Connects this Input to the given sources, sourceInfos . + +SetDisplayGroup(displayGroup) +Set the displayGroup metadata for this Input, i.e. + +SetDocumentation(docs) +Set documentation string for this Input. + +SetRenderType(renderType) +Specify an alternative, renderer-specific type to use when emitting/translating this Input, rather than translating based on its GetTypeName() + +SetSdrMetadata(sdrMetadata) +Authors the given sdrMetadata value on this Input at the current EditTarget. + +SetSdrMetadataByKey(key, value) +Sets the value corresponding to key to the given string value , in the Input's"sdrMetadata"dictionary at the current EditTarget. + +CanConnect(source) → bool +Determines whether this Input can be connected to the given source +attribute, which can be an input or an output. +UsdShadeConnectableAPI::CanConnect + +Parameters +source (Attribute) – + +CanConnect(sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +sourceInput (Input) – + +CanConnect(sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +sourceOutput (Output) – + +ClearConnectability() → bool +Clears any authored connectability on the Input. + +ClearSdrMetadata() → None +Clears any”sdrMetadata”value authored on the Input in the current +EditTarget. + +ClearSdrMetadataByKey(key) → None +Clears the entry corresponding to the given key in +the”sdrMetadata”dictionary authored in the current EditTarget. + +Parameters +key (str) – + +ClearSource() → bool +Deprecated + +ClearSources() → bool +Clears sources for this Input in the current UsdEditTarget. +Most of the time, what you probably want is DisconnectSource() rather +than this function. +UsdShadeConnectableAPI::ClearSources + +ConnectToSource(source, mod) → bool +Authors a connection for this Input. +source is a struct that describes the upstream source attribute +with all the information necessary to make a connection. See the +documentation for UsdShadeConnectionSourceInfo. mod describes the +operation that should be applied to the list of connections. By +default the new connection will replace any existing connections, but +it can add to the list of connections to represent multiple input +connections. +true if a connection was created successfully. false if this +input or source is invalid. +This method does not verify the connectability of the shading +attribute to the source. Clients must invoke CanConnect() themselves +to ensure compatibility. +The source shading attribute is created if it doesn’t exist already. +UsdShadeConnectableAPI::ConnectToSource + +Parameters + +source (ConnectionSourceInfo) – +mod (ConnectionModification) – + +ConnectToSource(source, sourceName, sourceType, typeName) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – +typeName (ValueTypeName) – + +ConnectToSource(sourcePath) -> bool +Authors a connection for this Input to the source at the given path. +UsdShadeConnectableAPI::ConnectToSource + +Parameters +sourcePath (Path) – + +ConnectToSource(sourceInput) -> bool +Connects this Input to the given input, sourceInput . +UsdShadeConnectableAPI::ConnectToSource + +Parameters +sourceInput (Input) – + +ConnectToSource(sourceOutput) -> bool +Connects this Input to the given output, sourceOutput . +UsdShadeConnectableAPI::ConnectToSource + +Parameters +sourceOutput (Output) – + +DisconnectSource(sourceAttr) → bool +Disconnect source for this Input. +If sourceAttr is valid, only a connection to the specified +attribute is disconnected, otherwise all connections are removed. +UsdShadeConnectableAPI::DisconnectSource + +Parameters +sourceAttr (Attribute) – + +Get(value, time) → bool +Convenience wrapper for the templated UsdAttribute::Get() . + +Parameters + +value (T) – +time (TimeCode) – + +Get(value, time) -> bool +Convenience wrapper for VtValue version of UsdAttribute::Get() . + +Parameters + +value (VtValue) – +time (TimeCode) – + +GetAttr() → Attribute +Explicit UsdAttribute extractor. + +GetBaseName() → str +Returns the name of the input. +We call this the base name since it strips off the”inputs:”namespace +prefix from the attribute name, and returns it. + +GetConnectability() → str +Returns the connectability of the Input. +SetConnectability() + +GetConnectedSource(source, sourceName, sourceType) → bool +Deprecated + +Parameters + +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – + +GetConnectedSources(invalidSourcePaths) → list[SourceInfo] +Finds the valid sources of connections for the Input. +invalidSourcePaths is an optional output parameter to collect the +invalid source paths that have not been reported in the returned +vector. +Returns a vector of UsdShadeConnectionSourceInfo structs with +information about each upsteam attribute. If the vector is empty, +there have been no valid connections. +A valid connection requires the existence of the source attribute and +also requires that the source prim is UsdShadeConnectableAPI +compatible. +The python wrapping returns a tuple with the valid connections first, +followed by the invalid source paths. +UsdShadeConnectableAPI::GetConnectedSources + +Parameters +invalidSourcePaths (list[SdfPath]) – + +GetDisplayGroup() → str +Get the displayGroup metadata for this Input, i.e. +hint for the location and nesting of the attribute. +UsdProperty::GetDisplayGroup() , UsdProperty::GetNestedDisplayGroup() + +GetDocumentation() → str +Get documentation string for this Input. +UsdObject::GetDocumentation() + +GetFullName() → str +Get the name of the attribute associated with the Input. + +GetPrim() → Prim +Get the prim that the input belongs to. + +GetRawConnectedSourcePaths(sourcePaths) → bool +Deprecated +Returns the”raw”(authored) connected source paths for this Input. +UsdShadeConnectableAPI::GetRawConnectedSourcePaths + +Parameters +sourcePaths (list[SdfPath]) – + +GetRenderType() → str +Return this Input’s specialized renderType, or an empty token if none +was authored. +SetRenderType() + +GetSdrMetadata() → NdrTokenMap +Returns this Input’s composed”sdrMetadata”dictionary as a NdrTokenMap. + +GetSdrMetadataByKey(key) → str +Returns the value corresponding to key in the composed +sdrMetadata dictionary. + +Parameters +key (str) – + +GetTypeName() → ValueTypeName +Get the”scene description”value type name of the attribute associated +with the Input. + +GetValueProducingAttribute(attrType) → Attribute +Deprecated +in favor of calling GetValueProducingAttributes + +Parameters +attrType (AttributeType) – + +GetValueProducingAttributes(shaderOutputsOnly) → list[UsdShadeAttribute] +Find what is connected to this Input recursively. +UsdShadeUtils::GetValueProducingAttributes + +Parameters +shaderOutputsOnly (bool) – + +HasConnectedSource() → bool +Returns true if and only if this Input is currently connected to a +valid (defined) source. +UsdShadeConnectableAPI::HasConnectedSource + +HasRenderType() → bool +Return true if a renderType has been specified for this Input. +SetRenderType() + +HasSdrMetadata() → bool +Returns true if the Input has a non-empty +composed”sdrMetadata”dictionary value. + +HasSdrMetadataByKey(key) → bool +Returns true if there is a value corresponding to the given key in +the composed”sdrMetadata”dictionary. + +Parameters +key (str) – + +static IsInput() +classmethod IsInput(attr) -> bool +Test whether a given UsdAttribute represents a valid Input, which +implies that creating a UsdShadeInput from the attribute will succeed. +Success implies that attr.IsDefined() is true. + +Parameters +attr (Attribute) – + +static IsInterfaceInputName() +classmethod IsInterfaceInputName(name) -> bool +Test if this name has a namespace that indicates it could be an input. + +Parameters +name (str) – + +IsSourceConnectionFromBaseMaterial() → bool +Returns true if the connection to this Input’s source, as returned by +GetConnectedSource() , is authored across a specializes arc, which is +used to denote a base material. +UsdShadeConnectableAPI::IsSourceConnectionFromBaseMaterial + +Set(value, time) → bool +Set a value for the Input at time . + +Parameters + +value (VtValue) – +time (TimeCode) – + +Set(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Set a value of the Input at time . + +Parameters + +value (T) – +time (TimeCode) – + +SetConnectability(connectability) → bool +Set the connectability of the Input. +In certain shading data models, there is a need to distinguish which +inputs can vary over a surface from those that must be +uniform. This is accomplished in UsdShade by limiting the +connectability of the input. This is done by setting +the”connectability”metadata on the associated attribute. +Connectability of an Input can be set to UsdShadeTokens->full or +UsdShadeTokens->interfaceOnly. + +full implies that the Input can be connected to any other +Input or Output. +interfaceOnly implies that the Input can only be connected to +a NodeGraph Input (which represents an interface override, not a +render-time dataflow connection), or another Input whose +connectability is also”interfaceOnly”. +The default connectability of an input is UsdShadeTokens->full. + +SetConnectability() + +Parameters +connectability (str) – + +SetConnectedSources(sourceInfos) → bool +Connects this Input to the given sources, sourceInfos . +UsdShadeConnectableAPI::SetConnectedSources + +Parameters +sourceInfos (list[ConnectionSourceInfo]) – + +SetDisplayGroup(displayGroup) → bool +Set the displayGroup metadata for this Input, i.e. +hinting for the location and nesting of the attribute. +Note for an input representing a nested SdrShaderProperty, its +expected to have the scope delimited by a”:”. +UsdProperty::SetDisplayGroup() , UsdProperty::SetNestedDisplayGroup() +SdrShaderProperty::GetPage() + +Parameters +displayGroup (str) – + +SetDocumentation(docs) → bool +Set documentation string for this Input. +UsdObject::SetDocumentation() + +Parameters +docs (str) – + +SetRenderType(renderType) → bool +Specify an alternative, renderer-specific type to use when +emitting/translating this Input, rather than translating based on its +GetTypeName() +For example, we set the renderType to”struct”for Inputs that are of +renderman custom struct types. +true on success. + +Parameters +renderType (str) – + +SetSdrMetadata(sdrMetadata) → None +Authors the given sdrMetadata value on this Input at the current +EditTarget. + +Parameters +sdrMetadata (NdrTokenMap) – + +SetSdrMetadataByKey(key, value) → None +Sets the value corresponding to key to the given string value +, in the Input’s”sdrMetadata”dictionary at the current EditTarget. + +Parameters + +key (str) – +value (str) – + +class pxr.UsdShade.Material +A Material provides a container into which multiple”render targets”can +add data that defines a”shading material”for a renderer. Typically +this consists of one or more UsdRelationship properties that target +other prims of type Shader - though a target/client is free to add +any data that is suitable. We strongly advise that all targets +adopt the convention that all properties be prefixed with a namespace +that identifies the target, e.g.”rel ri:surface =”. +In the UsdShading model, geometry expresses a binding to a single +Material or to a set of Materials partitioned by UsdGeomSubsets +defined beneath the geometry; it is legal to bind a Material at the +root (or other sub-prim) of a model, and then bind a different +Material to individual gprims, but the meaning of inheritance +and”ancestral overriding”of Material bindings is left to each render- +target to determine. Since UsdGeom has no concept of shading, we +provide the API for binding and unbinding geometry on the API schema +UsdShadeMaterialBindingAPI. +The entire power of USD VariantSets and all the other composition +operators can leveraged when encoding shading variation. +UsdShadeMaterial provides facilities for a particular way of +building”Material variants”in which neither the identity of the +Materials themselves nor the geometry Material-bindings need to change +- instead we vary the targeted networks, interface values, and even +parameter values within a single variantSet. See Authoring Material +Variations for more details. +UsdShade requires that all of the shaders that”belong”to the Material +live under the Material in namespace. This supports powerful, easy +reuse of Materials, because it allows us to reference a Material +from one asset (the asset might be a module of Materials) into +another asset: USD references compose all descendant prims of the +reference target into the referencer’s namespace, which means that all +of the referenced Material’s shader networks will come along with the +Material. When referenced in this way, Materials can also be +instanced, for ease of deduplication and compactness. Finally, +Material encapsulation also allows us to specialize child materials +from parent materials. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdShadeTokens. So to set an attribute to the value”rightHanded”, +use UsdShadeTokens->rightHanded as the value. +Methods: + +ClearBaseMaterial() +Clear the base Material of this Material. + +ComputeDisplacementSource(renderContext, ...) +Deprecated + +ComputeSurfaceSource(renderContext, ...) +Deprecated + +ComputeVolumeSource(renderContext, ...) +Deprecated + +CreateDisplacementAttr(defaultValue, ...) +See GetDisplacementAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDisplacementOutput(renderContext) +Creates and returns the"displacement"output on this material for the specified renderContext . + +CreateMasterMaterialVariant +classmethod CreateMasterMaterialVariant(masterPrim, MaterialPrims, masterVariantSetName) -> bool + +CreateSurfaceAttr(defaultValue, writeSparsely) +See GetSurfaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSurfaceOutput(renderContext) +Creates and returns the"surface"output on this material for the specified renderContext . + +CreateVolumeAttr(defaultValue, writeSparsely) +See GetVolumeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVolumeOutput(renderContext) +Creates and returns the"volume"output on this material for the specified renderContext . + +Define +classmethod Define(stage, path) -> Material + +Get +classmethod Get(stage, path) -> Material + +GetBaseMaterial() +Get the path to the base Material of this Material. + +GetBaseMaterialPath() +Get the base Material of this Material. + +GetDisplacementAttr() +Represents the universal"displacement"output terminal of a material. + +GetDisplacementOutput(renderContext) +Returns the"displacement"output of this material for the specified renderContext. + +GetDisplacementOutputs() +Returns the"displacement"outputs of this material for all available renderContexts. + +GetEditContextForVariant(...) +Helper function for configuring a UsdStage 's UsdEditTarget to author Material variations. + +GetMaterialVariant() +Return a UsdVariantSet object for interacting with the Material variant variantSet. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSurfaceAttr() +Represents the universal"surface"output terminal of a material. + +GetSurfaceOutput(renderContext) +Returns the"surface"output of this material for the specified renderContext . + +GetSurfaceOutputs() +Returns the"surface"outputs of this material for all available renderContexts. + +GetVolumeAttr() +Represents the universal"volume"output terminal of a material. + +GetVolumeOutput(renderContext) +Returns the"volume"output of this material for the specified renderContext. + +GetVolumeOutputs() +Returns the"volume"outputs of this material for all available renderContexts. + +HasBaseMaterial() + +SetBaseMaterial(baseMaterial) +Set the base Material of this Material. + +SetBaseMaterialPath(baseMaterialPath) +Set the path to the base Material of this Material. + +ClearBaseMaterial() → None +Clear the base Material of this Material. + +ComputeDisplacementSource(renderContext, sourceName, sourceType) → Shader +Deprecated +Use the form that takes a TfTokenVector or renderContexts + +Parameters + +renderContext (str) – +sourceName (str) – +sourceType (AttributeType) – + +ComputeDisplacementSource(contextVector, sourceName, sourceType) -> Shader +Computes the resolved”displacement”output source for the given +contextVector . +Using the earliest renderContext in the contextVector that produces a +valid Shader object. +If a”displacement”output corresponding to each of the renderContexts +does not exist or is not connected to a valid source, then this +checks the universal displacement output. +Returns an empty Shader object if there is no valid displacement +output source for any of the renderContexts in the contextVector . +The python version of this method returns a tuple containing three +elements (the source displacement shader, sourceName, sourceType). + +Parameters + +contextVector (list[TfToken]) – +sourceName (str) – +sourceType (AttributeType) – + +ComputeSurfaceSource(renderContext, sourceName, sourceType) → Shader +Deprecated +Use the form that takes a TfTokenVector or renderContexts. + +Parameters + +renderContext (str) – +sourceName (str) – +sourceType (AttributeType) – + +ComputeSurfaceSource(contextVector, sourceName, sourceType) -> Shader +Computes the resolved”surface”output source for the given +contextVector . +Using the earliest renderContext in the contextVector that produces a +valid Shader object. +If a”surface”output corresponding to each of the renderContexts does +not exist or is not connected to a valid source, then this checks +the universal surface output. +Returns an empty Shader object if there is no valid surface output +source for any of the renderContexts in the contextVector . The +python version of this method returns a tuple containing three +elements (the source surface shader, sourceName, sourceType). + +Parameters + +contextVector (list[TfToken]) – +sourceName (str) – +sourceType (AttributeType) – + +ComputeVolumeSource(renderContext, sourceName, sourceType) → Shader +Deprecated +Use the form that takes a TfTokenVector or renderContexts + +Parameters + +renderContext (str) – +sourceName (str) – +sourceType (AttributeType) – + +ComputeVolumeSource(contextVector, sourceName, sourceType) -> Shader +Computes the resolved”volume”output source for the given +contextVector . +Using the earliest renderContext in the contextVector that produces a +valid Shader object. +If a”volume”output corresponding to each of the renderContexts does +not exist or is not connected to a valid source, then this checks +the universal volume output. +Returns an empty Shader object if there is no valid volume output +output source for any of the renderContexts in the contextVector . +The python version of this method returns a tuple containing three +elements (the source volume shader, sourceName, sourceType). + +Parameters + +contextVector (list[TfToken]) – +sourceName (str) – +sourceType (AttributeType) – + +CreateDisplacementAttr(defaultValue, writeSparsely) → Attribute +See GetDisplacementAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDisplacementOutput(renderContext) → Output +Creates and returns the”displacement”output on this material for the +specified renderContext . +If the output already exists on the material, it is returned and no +authoring is performed. The returned output will always have the +requested renderContext. + +Parameters +renderContext (str) – + +static CreateMasterMaterialVariant() +classmethod CreateMasterMaterialVariant(masterPrim, MaterialPrims, masterVariantSetName) -> bool +Create a variantSet on masterPrim that will set the +MaterialVariant on each of the given MaterialPrims. +The variantSet, whose name can be specified with +masterVariantSetName and defaults to the same MaterialVariant name +created on Materials by GetEditContextForVariant() , will have the +same variants as the Materials, and each Master variant will set every +MaterialPrims' MaterialVariant selection to the same variant as +the master. Thus, it allows all Materials to be switched with a single +variant selection, on masterPrim . +If masterPrim is an ancestor of any given member of +MaterialPrims , then we will author variant selections directly on +the MaterialPrims. However, it is often preferable to create a master +MaterialVariant in a separately rooted tree from the MaterialPrims, so +that it can be layered more strongly on top of the Materials. +Therefore, for any MaterialPrim in a different tree than masterPrim, +we will create”overs”as children of masterPrim that recreate the path +to the MaterialPrim, substituting masterPrim’s full path for the +MaterialPrim’s root path component. +Upon successful completion, the new variantSet we created on +masterPrim will have its variant selection authored to +the”last”variant (determined lexicographically). It is up to the +calling client to either UsdVariantSet::ClearVariantSelection() on +masterPrim , or set the selection to the desired default setting. +Return true on success. It is an error if any of Materials +have a different set of variants for the MaterialVariant than the +others. + +Parameters + +masterPrim (Prim) – +MaterialPrims (list[Prim]) – +masterVariantSetName (str) – + +CreateSurfaceAttr(defaultValue, writeSparsely) → Attribute +See GetSurfaceAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSurfaceOutput(renderContext) → Output +Creates and returns the”surface”output on this material for the +specified renderContext . +If the output already exists on the material, it is returned and no +authoring is performed. The returned output will always have the +requested renderContext. + +Parameters +renderContext (str) – + +CreateVolumeAttr(defaultValue, writeSparsely) → Attribute +See GetVolumeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVolumeOutput(renderContext) → Output +Creates and returns the”volume”output on this material for the +specified renderContext . +If the output already exists on the material, it is returned and no +authoring is performed. The returned output will always have the +requested renderContext. + +Parameters +renderContext (str) – + +static Define() +classmethod Define(stage, path) -> Material +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Material +Return a UsdShadeMaterial holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeMaterial(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetBaseMaterial() → Material +Get the path to the base Material of this Material. +If there is no base Material, an empty Material is returned + +GetBaseMaterialPath() → Path +Get the base Material of this Material. +If there is no base Material, an empty path is returned + +GetDisplacementAttr() → Attribute +Represents the universal”displacement”output terminal of a material. +Declaration +token outputs:displacement +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetDisplacementOutput(renderContext) → Output +Returns the”displacement”output of this material for the specified +renderContext. +The returned output will always have the requested renderContext. +An invalid output is returned if an output corresponding to the +requested specific-renderContext does not exist. +UsdShadeMaterial::ComputeDisplacementSource() + +Parameters +renderContext (str) – + +GetDisplacementOutputs() → list[Output] +Returns the”displacement”outputs of this material for all available +renderContexts. +The returned vector will include all authored”displacement”outputs +with the universal renderContext output first, if present. Outputs +are returned regardless of whether they are connected to a valid +source. + +GetEditContextForVariant(MaterialVariantName, layer) → tuple[Stage, EditTarget] +Helper function for configuring a UsdStage ‘s UsdEditTarget to author +Material variations. +Takes care of creating the Material variantSet and specified variant, +if necessary. +Let’s assume that we are authoring Materials into the Stage’s current +UsdEditTarget, and that we are iterating over the variations of a +UsdShadeMaterial clothMaterial, and currVariant is the variant we +are processing (e.g.”denim”). +In C++, then, we would use the following pattern: +{ + UsdEditContext ctxt(clothMaterial.GetEditContextForVariant(currVariant)); + + // All USD mutation of the UsdStage on which clothMaterial sits will + // now go "inside" the currVariant of the "MaterialVariant" variantSet +} + +In python, the pattern is: +with clothMaterial.GetEditContextForVariant(currVariant): + # Now sending mutations to currVariant + +If layer is specified, then we will use it, rather than the +stage’s current UsdEditTarget ‘s layer as the destination layer for +the edit context we are building. If layer does not actually +contribute to the Material prim’s definition, any editing will have no +effect on this Material. +Note: As just stated, using this method involves authoring a +selection for the MaterialVariant in the stage’s current EditTarget. +When client is done authoring variations on this prim, they will +likely want to either UsdVariantSet::SetVariantSelection() to the +appropriate default selection, or possibly +UsdVariantSet::ClearVariantSelection() on the +UsdShadeMaterial::GetMaterialVariant() UsdVariantSet. +UsdVariantSet::GetVariantEditContext() + +Parameters + +MaterialVariantName (str) – +layer (Layer) – + +GetMaterialVariant() → VariantSet +Return a UsdVariantSet object for interacting with the Material +variant variantSet. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSurfaceAttr() → Attribute +Represents the universal”surface”output terminal of a material. +Declaration +token outputs:surface +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetSurfaceOutput(renderContext) → Output +Returns the”surface”output of this material for the specified +renderContext . +The returned output will always have the requested renderContext. +An invalid output is returned if an output corresponding to the +requested specific-renderContext does not exist. +UsdShadeMaterial::ComputeSurfaceSource() + +Parameters +renderContext (str) – + +GetSurfaceOutputs() → list[Output] +Returns the”surface”outputs of this material for all available +renderContexts. +The returned vector will include all authored”surface”outputs with the +universal renderContext output first, if present. Outputs are +returned regardless of whether they are connected to a valid source. + +GetVolumeAttr() → Attribute +Represents the universal”volume”output terminal of a material. +Declaration +token outputs:volume +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetVolumeOutput(renderContext) → Output +Returns the”volume”output of this material for the specified +renderContext. +The returned output will always have the requested renderContext. +An invalid output is returned if an output corresponding to the +requested specific-renderContext does not exist. +UsdShadeMaterial::ComputeVolumeSource() + +Parameters +renderContext (str) – + +GetVolumeOutputs() → list[Output] +Returns the”volume”outputs of this material for all available +renderContexts. +The returned vector will include all authored”volume”outputs with the +universal renderContext output first, if present. Outputs are +returned regardless of whether they are connected to a valid source. + +HasBaseMaterial() → bool + +SetBaseMaterial(baseMaterial) → None +Set the base Material of this Material. +An empty Material is equivalent to clearing the base Material. + +Parameters +baseMaterial (Material) – + +SetBaseMaterialPath(baseMaterialPath) → None +Set the path to the base Material of this Material. +An empty path is equivalent to clearing the base Material. + +Parameters +baseMaterialPath (Path) – + +class pxr.UsdShade.MaterialBindingAPI +UsdShadeMaterialBindingAPI is an API schema that provides an interface +for binding materials to prims or collections of prims (represented by +UsdCollectionAPI objects). +In the USD shading model, each renderable gprim computes a single +resolved Material that will be used to shade the gprim +(exceptions, of course, for gprims that possess UsdGeomSubsets, as +each subset can be shaded by a different Material). A gprim and each +of its ancestor prims can possess, through the MaterialBindingAPI, +both a direct binding to a Material, and any number of +collection-based bindings to Materials; each binding can be +generic or declared for a particular purpose, and given a specific +binding strength. It is the process of”material resolution”(see +UsdShadeMaterialBindingAPI_MaterialResolution) that examines all of +these bindings, and selects the one Material that best matches the +client’s needs. +The intent of purpose is that each gprim should be able to resolve +a Material for any given purpose, which implies it can have +differently bound materials for different purposes. There are two +special values of purpose defined in UsdShade, although the API +fully supports specifying arbitrary values for it, for the sake of +extensibility: + +UsdShadeTokens->full : to be used when the purpose of the +render is entirely to visualize the truest representation of a scene, +considering all lighting and material information, at highest +fidelity. +UsdShadeTokens->preview : to be used when the render is in +service of a goal other than a high fidelity”full”render (such as +scene manipulation, modeling, or realtime playback). Latency and speed +are generally of greater concern for preview renders, therefore +preview materials are generally designed to be”lighterweight”compared +to full materials. +A binding can also have no specific purpose at all, in which case, it +is considered to be the fallback or all-purpose binding (denoted by +the empty-valued token UsdShadeTokens->allPurpose). + +The purpose of a material binding is encoded in the name of the +binding relationship. + +In the case of a direct binding, the allPurpose binding is +represented by the relationship named “material:binding”. Special- +purpose direct bindings are represented by relationships named +“material:binding: *purpose*. A direct binding relationship must +have a single target path that points to a UsdShadeMaterial. +In the case of a collection-based binding, the allPurpose +binding is represented by a relationship +named”material:binding:collection:bindingName”, where +bindingName establishes an identity for the binding that is unique +on the prim. Attempting to establish two collection bindings of the +same name on the same prim will result in the first binding simply +being overridden. A special-purpose collection-based binding is +represented by a relationship +named”material:binding:collection:purpose:bindingName”. A +collection-based binding relationship must have exacly two targets, +one of which should be a collection-path (see ef +UsdCollectionAPI::GetCollectionPath() ) and the other should point to +a UsdShadeMaterial. In the future, we may allow a single +collection binding to target multiple collections, if we can establish +a reasonable round-tripping pattern for applications that only allow a +single collection to be associated with each Material. + +Note: Both bindingName and purpose must be non-namespaced +tokens. This allows us to know the role of a binding relationship +simply from the number of tokens in it. + +Two tokens : the fallback,”all purpose”, direct binding, +material:binding +Three tokens : a purpose-restricted, direct, fallback +binding, e.g. material:binding:preview +Four tokens : an all-purpose, collection-based binding, e.g. +material:binding:collection:metalBits +Five tokens : a purpose-restricted, collection-based binding, +e.g. material:binding:collection:full:metalBits + +A binding-strength value is used to specify whether a binding +authored on a prim should be weaker or stronger than bindings that +appear lower in namespace. We encode the binding strength with as +token-valued metadata ‘bindMaterialAs’ for future flexibility, +even though for now, there are only two possible values: +UsdShadeTokens->weakerThanDescendants and +UsdShadeTokens->strongerThanDescendants. When binding-strength is +not authored (i.e. empty) on a binding-relationship, the default +behavior matches UsdShadeTokens->weakerThanDescendants. +If a material binding relationship is a built-in property defined as +part of a typed prim’s schema, a fallback value should not be provided +for it. This is because the”material resolution”algorithm only +conisders authored properties. +Classes: + +CollectionBinding + +DirectBinding + +Methods: + +AddPrimToBindingCollection(prim, ...) +Adds the specified prim to the collection targeted by the binding relationship corresponding to given bindingName and materialPurpose . + +Apply +classmethod Apply(prim) -> MaterialBindingAPI + +Bind(material, bindingStrength, materialPurpose) +Authors a direct binding to the given material on this prim. + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CanContainPropertyName +classmethod CanContainPropertyName(name) -> bool + +ComputeBoundMaterial(bindingsCache, ...) +Computes the resolved bound material for this prim, for the given material purpose. + +ComputeBoundMaterials +classmethod ComputeBoundMaterials(prims, materialPurpose, bindingRels) -> list[Material] + +CreateMaterialBindSubset(subsetName, ...) +Creates a GeomSubset named subsetName with element type, elementType and familyName materialBind **below this prim.** + +Get +classmethod Get(stage, path) -> MaterialBindingAPI + +GetCollectionBindingRel(bindingName, ...) +Returns the collection-based material-binding relationship with the given bindingName and materialPurpose on this prim. + +GetCollectionBindingRels(materialPurpose) +Returns the list of collection-based material binding relationships on this prim for the given material purpose, materialPurpose . + +GetCollectionBindings(materialPurpose) +Returns all the collection-based bindings on this prim for the given material purpose. + +GetDirectBinding(materialPurpose) +Computes and returns the direct binding for the given material purpose on this prim. + +GetDirectBindingRel(materialPurpose) +Returns the direct material-binding relationship on this prim for the given material purpose. + +GetMaterialBindSubsets() +Returns all the existing GeomSubsets with familyName=UsdShadeTokens->materialBind below this prim. + +GetMaterialBindSubsetsFamilyType() +Returns the familyType of the family of"materialBind"GeomSubsets on this prim. + +GetMaterialBindingStrength +classmethod GetMaterialBindingStrength(bindingRel) -> str + +GetMaterialPurposes +classmethod GetMaterialPurposes() -> list[TfToken] + +GetResolvedTargetPathFromBindingRel +classmethod GetResolvedTargetPathFromBindingRel(bindingRel) -> Path + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +RemovePrimFromBindingCollection(prim, ...) +Removes the specified prim from the collection targeted by the binding relationship corresponding to given bindingName and materialPurpose . + +SetMaterialBindSubsetsFamilyType(familyType) +Author the familyType of the"materialBind"family of GeomSubsets on this prim. + +SetMaterialBindingStrength +classmethod SetMaterialBindingStrength(bindingRel, bindingStrength) -> bool + +UnbindAllBindings() +Unbinds all direct and collection-based bindings on this prim. + +UnbindCollectionBinding(bindingName, ...) +Unbinds the collection-based binding with the given bindingName , for the given materialPurpose on this prim. + +UnbindDirectBinding(materialPurpose) +Unbinds the direct binding for the given material purpose ( materialPurpose ) on this prim. + +class CollectionBinding +Methods: + +GetBindingRel + +GetCollection + +GetCollectionPath + +GetMaterial + +GetMaterialPath + +IsCollectionBindingRel + +IsValid + +GetBindingRel() + +GetCollection() + +GetCollectionPath() + +GetMaterial() + +GetMaterialPath() + +static IsCollectionBindingRel() + +IsValid() + +class DirectBinding +Methods: + +GetBindingRel + +GetMaterial + +GetMaterialPath + +GetMaterialPurpose + +GetBindingRel() + +GetMaterial() + +GetMaterialPath() + +GetMaterialPurpose() + +AddPrimToBindingCollection(prim, bindingName, materialPurpose) → bool +Adds the specified prim to the collection targeted by the binding +relationship corresponding to given bindingName and +materialPurpose . +If the collection-binding relationship doesn’t exist or if the +targeted collection already includes the prim , then this does +nothing and returns true. +If the targeted collection does not include prim (or excludes it +explicitly), then this modifies the collection by adding the prim to +it (by invoking UsdCollectionAPI::AddPrim()). + +Parameters + +prim (Prim) – +bindingName (str) – +materialPurpose (str) – + +static Apply() +classmethod Apply(prim) -> MaterialBindingAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”MaterialBindingAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdShadeMaterialBindingAPI object is returned upon success. An +invalid (or empty) UsdShadeMaterialBindingAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +Bind(material, bindingStrength, materialPurpose) → bool +Authors a direct binding to the given material on this prim. +If bindingStrength is UsdShadeTokens->fallbackStrength, the value +UsdShadeTokens->weakerThanDescendants is authored sparsely. To stamp +out the bindingStrength value explicitly, clients can pass in +UsdShadeTokens->weakerThanDescendants or +UsdShadeTokens->strongerThanDescendants directly. +If materialPurpose is specified and isn’t equal to +UsdShadeTokens->allPurpose, the binding only applies to the specified +material purpose. +Note that UsdShadeMaterialBindingAPI is a SingleAppliedAPI schema +which when applied updates the prim definition accordingly. This +information on the prim definition is helpful in multiple queries and +more performant. Hence its recommended to call +UsdShadeMaterialBindingAPI::Apply() when Binding a material. +Returns true on success, false otherwise. + +Parameters + +material (Material) – +bindingStrength (str) – +materialPurpose (str) – + +Bind(collection, material, bindingName, bindingStrength, materialPurpose) -> bool +Authors a collection-based binding, which binds the given material +to the given collection on this prim. +bindingName establishes an identity for the binding that is unique +on the prim. Attempting to establish two collection bindings of the +same name on the same prim will result in the first binding simply +being overridden. If bindingName is empty, it is set to the base- +name of the collection being bound (which is the collection-name with +any namespaces stripped out). If there are multiple collections with +the same base-name being bound at the same prim, clients should pass +in a unique binding name per binding, in order to preserve all +bindings. The binding name used in constructing the collection-binding +relationship name shoud not contain namespaces. Hence, a coding error +is issued and no binding is authored if the provided value of +bindingName is non-empty and contains namespaces. +If bindingStrength is UsdShadeTokens->fallbackStrength, the +value UsdShadeTokens->weakerThanDescendants is authored sparsely, i.e. +only when there is an existing binding with a different +bindingStrength. To stamp out the bindingStrength value explicitly, +clients can pass in UsdShadeTokens->weakerThanDescendants or +UsdShadeTokens->strongerThanDescendants directly. +If materialPurpose is specified and isn’t equal to +UsdShadeTokens->allPurpose, the binding only applies to the specified +material purpose. +Note that UsdShadeMaterialBindingAPI is a SingleAppliedAPI schema +which when applied updates the prim definition accordingly. This +information on the prim definition is helpful in multiple queries and +more performant. Hence its recommended to call +UsdShadeMaterialBindingAPI::Apply() when Binding a material. +Returns true on success, false otherwise. + +Parameters + +collection (CollectionAPI) – +material (Material) – +bindingName (str) – +bindingStrength (str) – +materialPurpose (str) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +static CanContainPropertyName() +classmethod CanContainPropertyName(name) -> bool +Test whether a given name contains the”material:binding:”prefix. + +Parameters +name (str) – + +ComputeBoundMaterial(bindingsCache, collectionQueryCache, materialPurpose, bindingRel) → Material +Computes the resolved bound material for this prim, for the given +material purpose. +This overload of ComputeBoundMaterial makes use of the BindingsCache ( +bindingsCache ) and CollectionQueryCache ( +collectionQueryCache ) that are passed in, to avoid redundant +binding computations and computations of MembershipQuery objects for +collections. It would be beneficial to make use of these when +resolving bindings for a tree of prims. These caches are populated +lazily as more and more bindings are resolved. +When the goal is to compute the bound material for a range (or list) +of prims, it is recommended to use this version of +ComputeBoundMaterial() . Here’s how you could compute the bindings of +a range of prims efficiently in C++: +std::vector primBindings; +UsdShadeMaterialBindingAPI::BindingsCache bindingsCache; +UsdShadeMaterialBindingAPI::CollectionQueryCache collQueryCache; + +for (auto prim : UsdPrimRange(rootPrim)) { + UsdShadeMaterial boundMaterial = + UsdShadeMaterialBindingAPI(prim).ComputeBoundMaterial( + & bindingsCache, & collQueryCache); + if (boundMaterial) { + primBindings.emplace_back({prim, boundMaterial}); + } +} + +If bindingRel is not null, then it is set to the”winning”binding +relationship. +Note the resolved bound material is considered valid if the target +path of the binding relationship is a valid non-empty prim path. This +makes sure winning binding relationship and the bound material remain +consistent consistent irrespective of the presence/absence of prim at +material path. For ascenario where ComputeBoundMaterial returns a +invalid UsdShadeMaterial with a valid winning bindingRel, clients can +use the static method +UsdShadeMaterialBindingAPI::GetResolvedTargetPathFromBindingRel to get +the path of the resolved target identified by the winning bindingRel. +See Bound Material Resolution for details on the material resolution +process. +The python version of this method returns a tuple containing the bound +material and the”winning”binding relationship. + +Parameters + +bindingsCache (BindingsCache) – +collectionQueryCache (CollectionQueryCache) – +materialPurpose (str) – +bindingRel (Relationship) – + +ComputeBoundMaterial(materialPurpose, bindingRel) -> Material +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Computes the resolved bound material for this prim, for the given +material purpose. +This overload does not utilize cached MembershipQuery object. However, +it only computes the MembershipQuery of every collection that bound in +the ancestor chain at most once. +If bindingRel is not null, then it is set to the winning binding +relationship. +See Bound Material Resolution for details on the material resolution +process. +The python version of this method returns a tuple containing the bound +material and the”winning”binding relationship. + +Parameters + +materialPurpose (str) – +bindingRel (Relationship) – + +static ComputeBoundMaterials() +classmethod ComputeBoundMaterials(prims, materialPurpose, bindingRels) -> list[Material] +Static API for efficiently and concurrently computing the resolved +material bindings for a vector of UsdPrims, prims for the given +materialPurpose . +The size of the returned vector always matches the size of the input +vector, prims . If a prim is not bound to any material, an invalid +or empty UsdShadeMaterial is returned at the index corresponding to +it. +If the pointer bindingRels points to a valid vector, then it is +populated with the set of all”winning”binding relationships. +The python version of this method returns a tuple containing two lists +- the bound materials and the corresponding”winning”binding +relationships. + +Parameters + +prims (list[Prim]) – +materialPurpose (str) – +bindingRels (list[Relationship]) – + +CreateMaterialBindSubset(subsetName, indices, elementType) → Subset +Creates a GeomSubset named subsetName with element type, +elementType and familyName materialBind **below this prim.** +If a GeomSubset named subsetName already exists, then +its”familyName”is updated to be UsdShadeTokens->materialBind and its +indices (at default timeCode) are updated with the provided +indices value before returning. +This method forces the familyType of the”materialBind”family of +subsets to UsdGeomTokens->nonOverlapping if it’s unset or explicitly +set to UsdGeomTokens->unrestricted. +The default value elementType is UsdGeomTokens->face, as we expect +materials to be bound most often to subsets of faces on meshes. + +Parameters + +subsetName (str) – +indices (IntArray) – +elementType (str) – + +static Get() +classmethod Get(stage, path) -> MaterialBindingAPI +Return a UsdShadeMaterialBindingAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeMaterialBindingAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetCollectionBindingRel(bindingName, materialPurpose) → Relationship +Returns the collection-based material-binding relationship with the +given bindingName and materialPurpose on this prim. +For info on bindingName , see UsdShadeMaterialBindingAPI::Bind() . +The material purpose of the relationship that’s returned will match +the specified materialPurpose . + +Parameters + +bindingName (str) – +materialPurpose (str) – + +GetCollectionBindingRels(materialPurpose) → list[Relationship] +Returns the list of collection-based material binding relationships on +this prim for the given material purpose, materialPurpose . +The returned list of binding relationships will be in native property +order. See UsdPrim::GetPropertyOrder() , UsdPrim::SetPropertyOrder() . +Bindings that appear earlier in the property order are considered to +be stronger than the ones that come later. See rule #6 in +UsdShadeMaterialBindingAPI_MaterialResolution. + +Parameters +materialPurpose (str) – + +GetCollectionBindings(materialPurpose) → list[CollectionBinding] +Returns all the collection-based bindings on this prim for the given +material purpose. +The returned CollectionBinding objects always have the specified +materialPurpose (i.e. the all-purpose binding is not returned if a +special purpose binding is requested). +If one or more collection based bindings are to prims that are not +Materials, this does not generate an error, but the corresponding +Material(s) will be invalid (i.e. evaluate to false). +The python version of this API returns a tuple containing the vector +of CollectionBinding objects and the corresponding vector of binding +relationships. +The returned list of collection-bindings will be in native property +order of the associated binding relationships. See +UsdPrim::GetPropertyOrder() , UsdPrim::SetPropertyOrder() . Binding +relationships that come earlier in the list are considered to be +stronger than the ones that come later. See rule #6 in +UsdShadeMaterialBindingAPI_MaterialResolution. + +Parameters +materialPurpose (str) – + +GetDirectBinding(materialPurpose) → DirectBinding +Computes and returns the direct binding for the given material purpose +on this prim. +The returned binding always has the specified materialPurpose +(i.e. the all-purpose binding is not returned if a special purpose +binding is requested). +If the direct binding is to a prim that is not a Material, this does +not generate an error, but the returned Material will be invalid (i.e. +evaluate to false). + +Parameters +materialPurpose (str) – + +GetDirectBindingRel(materialPurpose) → Relationship +Returns the direct material-binding relationship on this prim for the +given material purpose. +The material purpose of the relationship that’s returned will match +the specified materialPurpose . + +Parameters +materialPurpose (str) – + +GetMaterialBindSubsets() → list[Subset] +Returns all the existing GeomSubsets with +familyName=UsdShadeTokens->materialBind below this prim. + +GetMaterialBindSubsetsFamilyType() → str +Returns the familyType of the family of”materialBind”GeomSubsets on +this prim. +By default, materialBind subsets have familyType=”nonOverlapping”, but +they can also be tagged as a”partition”, using +SetMaterialBindFaceSubsetsFamilyType(). +UsdGeomSubset::GetFamilyNameAttr + +static GetMaterialBindingStrength() +classmethod GetMaterialBindingStrength(bindingRel) -> str +Resolves the’bindMaterialAs’token-valued metadata on the given binding +relationship and returns it. +If the resolved value is empty, this returns the fallback value +UsdShadeTokens->weakerThanDescendants. +UsdShadeMaterialBindingAPI::SetMaterialBindingStrength() + +Parameters +bindingRel (Relationship) – + +static GetMaterialPurposes() +classmethod GetMaterialPurposes() -> list[TfToken] +Returns a vector of the possible values for the’material purpose’. + +static GetResolvedTargetPathFromBindingRel() +classmethod GetResolvedTargetPathFromBindingRel(bindingRel) -> Path +returns the path of the resolved target identified by bindingRel . + +Parameters +bindingRel (Relationship) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +RemovePrimFromBindingCollection(prim, bindingName, materialPurpose) → bool +Removes the specified prim from the collection targeted by the +binding relationship corresponding to given bindingName and +materialPurpose . +If the collection-binding relationship doesn’t exist or if the +targeted collection does not include the prim , then this does +nothing and returns true. +If the targeted collection includes prim , then this modifies the +collection by removing the prim from it (by invoking +UsdCollectionAPI::RemovePrim()). This method can be used in +conjunction with the Unbind*() methods (if desired) to guarantee +that a prim has no resolved material binding. + +Parameters + +prim (Prim) – +bindingName (str) – +materialPurpose (str) – + +SetMaterialBindSubsetsFamilyType(familyType) → bool +Author the familyType of the”materialBind”family of GeomSubsets on +this prim. +The default familyType is UsdGeomTokens->nonOverlapping *. It can +be set to *UsdGeomTokens->partition to indicate that the entire +imageable prim is included in the union of all +the”materialBind”subsets. The family type should never be set to +UsdGeomTokens->unrestricted, since it is invalid for a single piece of +geometry (in this case, a subset) to be bound to more than one +material. Hence, a coding error is issued if familyType is +UsdGeomTokens->unrestricted.** +** +UsdGeomSubset::SetFamilyType** + +Parameters +familyType (str) – + +static SetMaterialBindingStrength() +classmethod SetMaterialBindingStrength(bindingRel, bindingStrength) -> bool +Sets the’bindMaterialAs’token-valued metadata on the given binding +relationship. +If bindingStrength is UsdShadeTokens->fallbackStrength, the +value UsdShadeTokens->weakerThanDescendants is authored sparsely, i.e. +only when there is a different existing bindingStrength value. To +stamp out the bindingStrength value explicitly, clients can pass in +UsdShadeTokens->weakerThanDescendants or +UsdShadeTokens->strongerThanDescendants directly. Returns true on +success, false otherwise. +UsdShadeMaterialBindingAPI::GetMaterialBindingStrength() + +Parameters + +bindingRel (Relationship) – +bindingStrength (str) – + +UnbindAllBindings() → bool +Unbinds all direct and collection-based bindings on this prim. + +UnbindCollectionBinding(bindingName, materialPurpose) → bool +Unbinds the collection-based binding with the given bindingName , +for the given materialPurpose on this prim. +It accomplishes this by blocking the targets of the associated binding +relationship in the current edit target. +If a binding was created without specifying a bindingName , then +the correct bindingName to use for unbinding is the instance name +of the targetted collection. + +Parameters + +bindingName (str) – +materialPurpose (str) – + +UnbindDirectBinding(materialPurpose) → bool +Unbinds the direct binding for the given material purpose ( +materialPurpose ) on this prim. +It accomplishes this by blocking the targets of the binding +relationship in the current edit target. + +Parameters +materialPurpose (str) – + +class pxr.UsdShade.NodeDefAPI +UsdShadeNodeDefAPI is an API schema that provides attributes for a +prim to select a corresponding Shader Node Definition (“Sdr Node”), as +well as to look up a runtime entry for that shader node in the form of +an SdrShaderNode. +UsdShadeNodeDefAPI is intended to be a pre-applied API schema for any +prim type that wants to refer to the SdrRegistry for further +implementation details about the behavior of that prim. The primary +use in UsdShade itself is as UsdShadeShader, which is a basis for +material shading networks (UsdShadeMaterial), but this is intended to +be used in other domains that also use the Sdr node mechanism. +This schema provides properties that allow a prim to identify an +external node definition, either by a direct identifier key into the +SdrRegistry (info:id), an asset to be parsed by a suitable +NdrParserPlugin (info:sourceAsset), or an inline source code that must +also be parsed (info:sourceCode); as well as a selector attribute to +determine which specifier is active (info:implementationSource). +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdShadeTokens. So to set an attribute to the value”rightHanded”, +use UsdShadeTokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> NodeDefAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateIdAttr(defaultValue, writeSparsely) +See GetIdAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateImplementationSourceAttr(defaultValue, ...) +See GetImplementationSourceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> NodeDefAPI + +GetIdAttr() +The id is an identifier for the type or purpose of the shader. + +GetImplementationSource() +Reads the value of info:implementationSource attribute and returns a token identifying the attribute that must be consulted to identify the shader's source program. + +GetImplementationSourceAttr() +Specifies the attribute that should be consulted to get the shader's implementation or its source code. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetShaderId(id) +Fetches the shader's ID value from the info:id attribute, if the shader's info:implementationSource is id. + +GetShaderNodeForSourceType(sourceType) +This method attempts to ensure that there is a ShaderNode in the shader registry (i.e. + +GetSourceAsset(sourceAsset, sourceType) +Fetches the shader's source asset value for the specified sourceType value from the info: *sourceType*: sourceAsset attribute, if the shader's info:implementationSource is sourceAsset. + +GetSourceAssetSubIdentifier(subIdentifier, ...) +Fetches the shader's sub-identifier for the source asset with the specified sourceType value from the info: *sourceType*: sourceAsset:subIdentifier attribute, if the shader's info: implementationSource is sourceAsset. + +GetSourceCode(sourceCode, sourceType) +Fetches the shader's source code for the specified sourceType value by reading the info: *sourceType*: sourceCode attribute, if the shader's info:implementationSource is sourceCode. + +SetShaderId(id) +Sets the shader's ID value. + +SetSourceAsset(sourceAsset, sourceType) +Sets the shader's source-asset path value to sourceAsset for the given source type, sourceType . + +SetSourceAssetSubIdentifier(subIdentifier, ...) +Set a sub-identifier to be used with a source asset of the given source type. + +SetSourceCode(sourceCode, sourceType) +Sets the shader's source-code value to sourceCode for the given source type, sourceType . + +static Apply() +classmethod Apply(prim) -> NodeDefAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”NodeDefAPI”to the token-valued, +listOp metadata apiSchemas on the prim. +A valid UsdShadeNodeDefAPI object is returned upon success. An invalid +(or empty) UsdShadeNodeDefAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateIdAttr(defaultValue, writeSparsely) → Attribute +See GetIdAttr() , and also Create vs Get Property Methods for when to +use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateImplementationSourceAttr(defaultValue, writeSparsely) → Attribute +See GetImplementationSourceAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> NodeDefAPI +Return a UsdShadeNodeDefAPI holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeNodeDefAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetIdAttr() → Attribute +The id is an identifier for the type or purpose of the shader. +E.g.: Texture or FractalFloat. The use of this id will depend on the +render target: some will turn it into an actual shader path, some will +use it to generate shader source code dynamically. +SetShaderId() +Declaration +uniform token info:id +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +GetImplementationSource() → str +Reads the value of info:implementationSource attribute and returns a +token identifying the attribute that must be consulted to identify the +shader’s source program. +This returns + +id, to indicate that the”info:id”attribute must be consulted. +sourceAsset to indicate that the asset- +valued”info:{sourceType}:sourceAsset”attribute associated with the +desired sourceType should be consulted to locate the asset with +the shader’s source. +sourceCode to indicate that the string- +valued”info:{sourceType}:sourceCode”attribute associated with the +desired sourceType should be read to get shader’s source. + +This issues a warning and returns id if the +info:implementationSource attribute has an invalid value. +{sourceType} above is a place holder for a token that identifies the +type of shader source or its implementation. For example: osl, glslfx, +riCpp etc. This allows a shader to specify different sourceAsset (or +sourceCode) values for different sourceTypes. The sourceType tokens +usually correspond to the sourceType value of the NdrParserPlugin +that’s used to parse the shader source (NdrParserPlugin::SourceType). +When sourceType is empty, the corresponding sourceAsset or sourceCode +is considered to be”universal”(or fallback), which is represented by +the empty-valued token UsdShadeTokens->universalSourceType. When the +sourceAsset (or sourceCode) corresponding to a specific, requested +sourceType is unavailable, the universal sourceAsset (or sourceCode) +is returned by GetSourceAsset (and GetSourceCode} API, if present. +GetShaderId() +GetSourceAsset() +GetSourceCode() + +GetImplementationSourceAttr() → Attribute +Specifies the attribute that should be consulted to get the shader’s +implementation or its source code. + +If set to”id”, the”info:id”attribute’s value is used to determine +the shader source from the shader registry. +If set to”sourceAsset”, the resolved value of +the”info:sourceAsset”attribute corresponding to the desired +implementation (or source-type) is used to locate the shader source. A +source asset file may also specify multiple shader definitions, so +there is an optional attribute”info:sourceAsset:subIdentifier”whose +value should be used to indicate a particular shader definition from a +source asset file. +If set to”sourceCode”, the value of”info:sourceCode”attribute +corresponding to the desired implementation (or source type) is used +as the shader source. + +Declaration +uniform token info:implementationSource ="id" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +id, sourceAsset, sourceCode + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetShaderId(id) → bool +Fetches the shader’s ID value from the info:id attribute, if the +shader’s info:implementationSource is id. +Returns true if the shader’s implementation source is id and +the value was fetched properly into id . Returns false otherwise. +GetImplementationSource() + +Parameters +id (str) – + +GetShaderNodeForSourceType(sourceType) → ShaderNode +This method attempts to ensure that there is a ShaderNode in the +shader registry (i.e. +SdrRegistry) representing this shader for the given sourceType . +It may return a null pointer if none could be found or created. + +Parameters +sourceType (str) – + +GetSourceAsset(sourceAsset, sourceType) → bool +Fetches the shader’s source asset value for the specified +sourceType value from the info: *sourceType*: sourceAsset +attribute, if the shader’s info:implementationSource is +sourceAsset. +If the sourceAsset attribute corresponding to the requested +sourceType isn’t present on the shader, then the universal +fallback sourceAsset attribute, i.e. info:sourceAsset is +consulted, if present, to get the source asset path. +Returns true if the shader’s implementation source is +sourceAsset and the source asset path value was fetched +successfully into sourceAsset . Returns false otherwise. +GetImplementationSource() + +Parameters + +sourceAsset (AssetPath) – +sourceType (str) – + +GetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool +Fetches the shader’s sub-identifier for the source asset with the +specified sourceType value from the info: *sourceType*: +sourceAsset:subIdentifier attribute, if the shader’s info: +implementationSource is sourceAsset. +If the subIdentifier attribute corresponding to the requested +sourceType isn’t present on the shader, then the universal +fallback sub-identifier attribute, i.e. info:sourceAsset: +subIdentifier is consulted, if present, to get the sub-identifier +name. +Returns true if the shader’s implementation source is +sourceAsset and the sub-identifier for the given source type was +fetched successfully into subIdentifier . Returns false otherwise. + +Parameters + +subIdentifier (str) – +sourceType (str) – + +GetSourceCode(sourceCode, sourceType) → bool +Fetches the shader’s source code for the specified sourceType +value by reading the info: *sourceType*: sourceCode attribute, if +the shader’s info:implementationSource is sourceCode. +If the sourceCode attribute corresponding to the requested +sourceType isn’t present on the shader, then the universal or +fallback sourceCode attribute (i.e. info:sourceCode) is consulted, +if present, to get the source code. +Returns true if the shader’s implementation source is +sourceCode and the source code string was fetched successfully +into sourceCode . Returns false otherwise. +GetImplementationSource() + +Parameters + +sourceCode (str) – +sourceType (str) – + +SetShaderId(id) → bool +Sets the shader’s ID value. +This also sets the info:implementationSource attribute on the shader +to UsdShadeTokens->id, if the existing value is different. + +Parameters +id (str) – + +SetSourceAsset(sourceAsset, sourceType) → bool +Sets the shader’s source-asset path value to sourceAsset for the +given source type, sourceType . +This also sets the info:implementationSource attribute on the shader +to UsdShadeTokens->sourceAsset. + +Parameters + +sourceAsset (AssetPath) – +sourceType (str) – + +SetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool +Set a sub-identifier to be used with a source asset of the given +source type. +This sets the info: *sourceType*: sourceAsset:subIdentifier. +This also sets the info:implementationSource attribute on the shader +to UsdShadeTokens->sourceAsset + +Parameters + +subIdentifier (str) – +sourceType (str) – + +SetSourceCode(sourceCode, sourceType) → bool +Sets the shader’s source-code value to sourceCode for the given +source type, sourceType . +This also sets the info:implementationSource attribute on the shader +to UsdShadeTokens->sourceCode. + +Parameters + +sourceCode (str) – +sourceType (str) – + +class pxr.UsdShade.NodeGraph +A node-graph is a container for shading nodes, as well as other node- +graphs. It has a public input interface and provides a list of public +outputs. +Node Graph Interfaces +One of the most important functions of a node-graph is to host +the”interface”with which clients of already-built shading networks +will interact. Please see Interface Inputs for a detailed explanation +of what the interface provides, and how to construct and use it, to +effectively share/instance shader networks. +Node Graph Outputs +These behave like outputs on a shader and are typically connected to +an output on a shader inside the node-graph. +Methods: + +ComputeInterfaceInputConsumersMap(...) +Walks the namespace subtree below the node-graph and computes a map containing the list of all inputs on the node-graph and the associated vector of consumers of their values. + +ComputeOutputSource(outputName, sourceName, ...) +Deprecated + +ConnectableAPI() +Contructs and returns a UsdShadeConnectableAPI object with this node- graph. + +CreateInput(name, typeName) +Create an Input which can either have a value or can be connected. + +CreateOutput(name, typeName) +Create an output which can either have a value or can be connected. + +Define +classmethod Define(stage, path) -> NodeGraph + +Get +classmethod Get(stage, path) -> NodeGraph + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Returns all inputs present on the node-graph. + +GetInterfaceInputs() +Returns all the"Interface Inputs"of the node-graph. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Outputs are represented by attributes in the"outputs:"namespace. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +ComputeInterfaceInputConsumersMap(computeTransitiveConsumers) → InterfaceInputConsumersMap +Walks the namespace subtree below the node-graph and computes a map +containing the list of all inputs on the node-graph and the associated +vector of consumers of their values. +The consumers can be inputs on shaders within the node-graph or on +nested node-graphs). +If computeTransitiveConsumers is true, then value consumers +belonging to node-graphs are resolved transitively to compute the +transitive mapping from inputs on the node-graph to inputs on shaders +inside the material. Note that inputs on node-graphs that don’t have +value consumers will continue to be included in the result. +This API is provided for use by DCC’s that want to present node-graph +interface / shader connections in the opposite direction than they are +encoded in USD. + +Parameters +computeTransitiveConsumers (bool) – + +ComputeOutputSource(outputName, sourceName, sourceType) → Shader +Deprecated +in favor of GetValueProducingAttributes on UsdShadeOutput Resolves the +connection source of the requested output, identified by +outputName to a shader output. +sourceName is an output parameter that is set to the name of the +resolved output, if the node-graph output is connected to a valid +shader source. +sourceType is an output parameter that is set to the type of the +resolved output, if the node-graph output is connected to a valid +shader source. +Returns a valid shader object if the specified output exists and is +connected to one. Return an empty shader object otherwise. The python +version of this method returns a tuple containing three elements (the +source shader, sourceName, sourceType). + +Parameters + +outputName (str) – +sourceName (str) – +sourceType (AttributeType) – + +ConnectableAPI() → ConnectableAPI +Contructs and returns a UsdShadeConnectableAPI object with this node- +graph. +Note that most tasks can be accomplished without explicitly +constructing a UsdShadeConnectable API, since connection-related API +such as UsdShadeConnectableAPI::ConnectToSource() are static methods, +and UsdShadeNodeGraph will auto-convert to a UsdShadeConnectableAPI +when passed to functions that want to act generically on a connectable +UsdShadeConnectableAPI object. + +CreateInput(name, typeName) → Input +Create an Input which can either have a value or can be connected. +The attribute representing the input is created in +the”inputs:”namespace. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateOutput(name, typeName) → Output +Create an output which can either have a value or can be connected. +The attribute representing the output is created in +the”outputs:”namespace. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +static Define() +classmethod Define(stage, path) -> NodeGraph +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> NodeGraph +Return a UsdShadeNodeGraph holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeNodeGraph(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetInput(name) → Input +Return the requested input if it exists. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Returns all inputs present on the node-graph. +These are represented by attributes in the”inputs:”namespace. If +onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +GetInterfaceInputs() → list[Input] +Returns all the”Interface Inputs”of the node-graph. +This is the same as GetInputs() , but is provided as a convenience, to +allow clients to distinguish between inputs on shaders vs. interface- +inputs on node-graphs. + +GetOutput(name) → Output +Return the requested output if it exists. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Outputs are represented by attributes in the”outputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdShade.Output +This class encapsulates a shader or node-graph output, which is a +connectable attribute representing a typed, externally computed value. +Methods: + +CanConnect(source) +Determines whether this Output can be connected to the given source attribute, which can be an input or an output. + +ClearSdrMetadata() +Clears any"sdrMetadata"value authored on the Output in the current EditTarget. + +ClearSdrMetadataByKey(key) +Clears the entry corresponding to the given key in the"sdrMetadata"dictionary authored in the current EditTarget. + +ClearSource() +Deprecated + +ClearSources() +Clears sources for this Output in the current UsdEditTarget. + +ConnectToSource(source, mod) +Authors a connection for this Output. + +DisconnectSource(sourceAttr) +Disconnect source for this Output. + +GetAttr() +Explicit UsdAttribute extractor. + +GetBaseName() +Returns the name of the output. + +GetConnectedSource(source, sourceName, ...) +Deprecated + +GetConnectedSources(invalidSourcePaths) +Finds the valid sources of connections for the Output. + +GetFullName() +Get the name of the attribute associated with the output. + +GetPrim() +Get the prim that the output belongs to. + +GetRawConnectedSourcePaths(sourcePaths) +Deprecated + +GetRenderType() +Return this output's specialized renderType, or an empty token if none was authored. + +GetSdrMetadata() +Returns this Output's composed"sdrMetadata"dictionary as a NdrTokenMap. + +GetSdrMetadataByKey(key) +Returns the value corresponding to key in the composed sdrMetadata dictionary. + +GetTypeName() +Get the"scene description"value type name of the attribute associated with the output. + +GetValueProducingAttributes(shaderOutputsOnly) +Find what is connected to this Output recursively. + +HasConnectedSource() +Returns true if and only if this Output is currently connected to a valid (defined) source. + +HasRenderType() +Return true if a renderType has been specified for this output. + +HasSdrMetadata() +Returns true if the Output has a non-empty composed"sdrMetadata"dictionary value. + +HasSdrMetadataByKey(key) +Returns true if there is a value corresponding to the given key in the composed"sdrMetadata"dictionary. + +IsOutput +classmethod IsOutput(attr) -> bool + +IsSourceConnectionFromBaseMaterial() +Returns true if the connection to this Output's source, as returned by GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. + +Set(value, time) +Set a value for the output. + +SetConnectedSources(sourceInfos) +Connects this Output to the given sources, sourceInfos . + +SetRenderType(renderType) +Specify an alternative, renderer-specific type to use when emitting/translating this output, rather than translating based on its GetTypeName() + +SetSdrMetadata(sdrMetadata) +Authors the given sdrMetadata value on this Output at the current EditTarget. + +SetSdrMetadataByKey(key, value) +Sets the value corresponding to key to the given string value , in the Output's"sdrMetadata"dictionary at the current EditTarget. + +CanConnect(source) → bool +Determines whether this Output can be connected to the given source +attribute, which can be an input or an output. +An output is considered to be connectable only if it belongs to a +node-graph. Shader outputs are not connectable. +UsdShadeConnectableAPI::CanConnect + +Parameters +source (Attribute) – + +CanConnect(sourceInput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +sourceInput (Input) – + +CanConnect(sourceOutput) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters +sourceOutput (Output) – + +ClearSdrMetadata() → None +Clears any”sdrMetadata”value authored on the Output in the current +EditTarget. + +ClearSdrMetadataByKey(key) → None +Clears the entry corresponding to the given key in +the”sdrMetadata”dictionary authored in the current EditTarget. + +Parameters +key (str) – + +ClearSource() → bool +Deprecated + +ClearSources() → bool +Clears sources for this Output in the current UsdEditTarget. +Most of the time, what you probably want is DisconnectSource() rather +than this function. +UsdShadeConnectableAPI::ClearSources + +ConnectToSource(source, mod) → bool +Authors a connection for this Output. +source is a struct that describes the upstream source attribute +with all the information necessary to make a connection. See the +documentation for UsdShadeConnectionSourceInfo. mod describes the +operation that should be applied to the list of connections. By +default the new connection will replace any existing connections, but +it can add to the list of connections to represent multiple input +connections. +true if a connection was created successfully. false if +shadingAttr or source is invalid. +This method does not verify the connectability of the shading +attribute to the source. Clients must invoke CanConnect() themselves +to ensure compatibility. +The source shading attribute is created if it doesn’t exist already. +UsdShadeConnectableAPI::ConnectToSource + +Parameters + +source (ConnectionSourceInfo) – +mod (ConnectionModification) – + +ConnectToSource(source, sourceName, sourceType, typeName) -> bool +Deprecated +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – +typeName (ValueTypeName) – + +ConnectToSource(sourcePath) -> bool +Authors a connection for this Output to the source at the given path. +UsdShadeConnectableAPI::ConnectToSource + +Parameters +sourcePath (Path) – + +ConnectToSource(sourceInput) -> bool +Connects this Output to the given input, sourceInput . +UsdShadeConnectableAPI::ConnectToSource + +Parameters +sourceInput (Input) – + +ConnectToSource(sourceOutput) -> bool +Connects this Output to the given output, sourceOutput . +UsdShadeConnectableAPI::ConnectToSource + +Parameters +sourceOutput (Output) – + +DisconnectSource(sourceAttr) → bool +Disconnect source for this Output. +If sourceAttr is valid, only a connection to the specified +attribute is disconnected, otherwise all connections are removed. +UsdShadeConnectableAPI::DisconnectSource + +Parameters +sourceAttr (Attribute) – + +GetAttr() → Attribute +Explicit UsdAttribute extractor. + +GetBaseName() → str +Returns the name of the output. +We call this the base name since it strips off the”outputs:”namespace +prefix from the attribute name, and returns it. + +GetConnectedSource(source, sourceName, sourceType) → bool +Deprecated +Please use GetConnectedSources instead + +Parameters + +source (ConnectableAPI) – +sourceName (str) – +sourceType (AttributeType) – + +GetConnectedSources(invalidSourcePaths) → list[SourceInfo] +Finds the valid sources of connections for the Output. +invalidSourcePaths is an optional output parameter to collect the +invalid source paths that have not been reported in the returned +vector. +Returns a vector of UsdShadeConnectionSourceInfo structs with +information about each upsteam attribute. If the vector is empty, +there have been no valid connections. +A valid connection requires the existence of the source attribute and +also requires that the source prim is UsdShadeConnectableAPI +compatible. +The python wrapping returns a tuple with the valid connections first, +followed by the invalid source paths. +UsdShadeConnectableAPI::GetConnectedSources + +Parameters +invalidSourcePaths (list[SdfPath]) – + +GetFullName() → str +Get the name of the attribute associated with the output. + +GetPrim() → Prim +Get the prim that the output belongs to. + +GetRawConnectedSourcePaths(sourcePaths) → bool +Deprecated +Returns the”raw”(authored) connected source paths for this Output. +UsdShadeConnectableAPI::GetRawConnectedSourcePaths + +Parameters +sourcePaths (list[SdfPath]) – + +GetRenderType() → str +Return this output’s specialized renderType, or an empty token if none +was authored. +SetRenderType() + +GetSdrMetadata() → NdrTokenMap +Returns this Output’s composed”sdrMetadata”dictionary as a +NdrTokenMap. + +GetSdrMetadataByKey(key) → str +Returns the value corresponding to key in the composed +sdrMetadata dictionary. + +Parameters +key (str) – + +GetTypeName() → ValueTypeName +Get the”scene description”value type name of the attribute associated +with the output. + +GetValueProducingAttributes(shaderOutputsOnly) → list[UsdShadeAttribute] +Find what is connected to this Output recursively. +UsdShadeUtils::GetValueProducingAttributes + +Parameters +shaderOutputsOnly (bool) – + +HasConnectedSource() → bool +Returns true if and only if this Output is currently connected to a +valid (defined) source. +UsdShadeConnectableAPI::HasConnectedSource + +HasRenderType() → bool +Return true if a renderType has been specified for this output. +SetRenderType() + +HasSdrMetadata() → bool +Returns true if the Output has a non-empty +composed”sdrMetadata”dictionary value. + +HasSdrMetadataByKey(key) → bool +Returns true if there is a value corresponding to the given key in +the composed”sdrMetadata”dictionary. + +Parameters +key (str) – + +static IsOutput() +classmethod IsOutput(attr) -> bool +Test whether a given UsdAttribute represents a valid Output, which +implies that creating a UsdShadeOutput from the attribute will +succeed. +Success implies that attr.IsDefined() is true. + +Parameters +attr (Attribute) – + +IsSourceConnectionFromBaseMaterial() → bool +Returns true if the connection to this Output’s source, as returned by +GetConnectedSource() , is authored across a specializes arc, which is +used to denote a base material. +UsdShadeConnectableAPI::IsSourceConnectionFromBaseMaterial + +Set(value, time) → bool +Set a value for the output. +It’s unusual to be setting a value on an output since it represents an +externally computed value. The Set API is provided here just for the +sake of completeness and uniformity with other property schema. + +Parameters + +value (VtValue) – +time (TimeCode) – + +Set(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Set the attribute value of the Output at time . + +Parameters + +value (T) – +time (TimeCode) – + +SetConnectedSources(sourceInfos) → bool +Connects this Output to the given sources, sourceInfos . +UsdShadeConnectableAPI::SetConnectedSources + +Parameters +sourceInfos (list[ConnectionSourceInfo]) – + +SetRenderType(renderType) → bool +Specify an alternative, renderer-specific type to use when +emitting/translating this output, rather than translating based on its +GetTypeName() +For example, we set the renderType to”struct”for outputs that are of +renderman custom struct types. +true on success + +Parameters +renderType (str) – + +SetSdrMetadata(sdrMetadata) → None +Authors the given sdrMetadata value on this Output at the current +EditTarget. + +Parameters +sdrMetadata (NdrTokenMap) – + +SetSdrMetadataByKey(key, value) → None +Sets the value corresponding to key to the given string value +, in the Output’s”sdrMetadata”dictionary at the current EditTarget. + +Parameters + +key (str) – +value (str) – + +class pxr.UsdShade.Shader +Base class for all USD shaders. Shaders are the building blocks of +shading networks. While UsdShadeShader objects are not target +specific, each renderer or application target may derive its own +renderer-specific shader object types from this base, if needed. +Objects of this class generally represent a single shading object, +whether it exists in the target renderer or not. For example, a +texture, a fractal, or a mix node. +The UsdShadeNodeDefAPI provides attributes to uniquely identify the +type of this node. The id resolution into a renderable shader target +type of this node. The id resolution into a renderable shader target +is deferred to the consuming application. +The purpose of representing them in Usd is two-fold: + +To represent, via”connections”the topology of the shading network +that must be reconstructed in the renderer. Facilities for authoring +and manipulating connections are encapsulated in the API schema +UsdShadeConnectableAPI. +To present a (partial or full) interface of typed input +parameters whose values can be set and overridden in Usd, to be +provided later at render-time as parameter values to the actual render +shader objects. Shader input parameters are encapsulated in the +property schema UsdShadeInput. + +Methods: + +ClearSdrMetadata() +Clears any"sdrMetadata"value authored on the shader in the current EditTarget. + +ClearSdrMetadataByKey(key) +Clears the entry corresponding to the given key in the"sdrMetadata"dictionary authored in the current EditTarget. + +ConnectableAPI() +Contructs and returns a UsdShadeConnectableAPI object with this shader. + +CreateIdAttr(defaultValue, writeSparsely) +Forwards to UsdShadeNodeDefAPI(prim). + +CreateImplementationSourceAttr(defaultValue, ...) +Forwards to UsdShadeNodeDefAPI(prim). + +CreateInput(name, typeName) +Create an input which can either have a value or can be connected. + +CreateOutput(name, typeName) +Create an output which can either have a value or can be connected. + +Define +classmethod Define(stage, path) -> Shader + +Get +classmethod Get(stage, path) -> Shader + +GetIdAttr() +Forwards to UsdShadeNodeDefAPI(prim). + +GetImplementationSource() +Forwards to UsdShadeNodeDefAPI(prim). + +GetImplementationSourceAttr() +Forwards to UsdShadeNodeDefAPI(prim). + +GetInput(name) +Return the requested input if it exists. + +GetInputs(onlyAuthored) +Inputs are represented by attributes in the"inputs:"namespace. + +GetOutput(name) +Return the requested output if it exists. + +GetOutputs(onlyAuthored) +Outputs are represented by attributes in the"outputs:"namespace. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSdrMetadata() +Returns this shader's composed"sdrMetadata"dictionary as a NdrTokenMap. + +GetSdrMetadataByKey(key) +Returns the value corresponding to key in the composed sdrMetadata dictionary. + +GetShaderId(id) +Forwards to UsdShadeNodeDefAPI(prim). + +GetShaderNodeForSourceType(sourceType) +Forwards to UsdShadeNodeDefAPI(prim). + +GetSourceAsset(sourceAsset, sourceType) +Forwards to UsdShadeNodeDefAPI(prim). + +GetSourceAssetSubIdentifier(subIdentifier, ...) +Forwards to UsdShadeNodeDefAPI(prim). + +GetSourceCode(sourceCode, sourceType) +Forwards to UsdShadeNodeDefAPI(prim). + +HasSdrMetadata() +Returns true if the shader has a non-empty composed"sdrMetadata"dictionary value. + +HasSdrMetadataByKey(key) +Returns true if there is a value corresponding to the given key in the composed"sdrMetadata"dictionary. + +SetSdrMetadata(sdrMetadata) +Authors the given sdrMetadata on this shader at the current EditTarget. + +SetSdrMetadataByKey(key, value) +Sets the value corresponding to key to the given string value , in the shader's"sdrMetadata"dictionary at the current EditTarget. + +SetShaderId(id) +Forwards to UsdShadeNodeDefAPI(prim). + +SetSourceAsset(sourceAsset, sourceType) +Forwards to UsdShadeNodeDefAPI(prim). + +SetSourceAssetSubIdentifier(subIdentifier, ...) +Forwards to UsdShadeNodeDefAPI(prim). + +SetSourceCode(sourceCode, sourceType) +Forwards to UsdShadeNodeDefAPI(prim). + +ClearSdrMetadata() → None +Clears any”sdrMetadata”value authored on the shader in the current +EditTarget. + +ClearSdrMetadataByKey(key) → None +Clears the entry corresponding to the given key in +the”sdrMetadata”dictionary authored in the current EditTarget. + +Parameters +key (str) – + +ConnectableAPI() → ConnectableAPI +Contructs and returns a UsdShadeConnectableAPI object with this +shader. +Note that most tasks can be accomplished without explicitly +constructing a UsdShadeConnectable API, since connection-related API +such as UsdShadeConnectableAPI::ConnectToSource() are static methods, +and UsdShadeShader will auto-convert to a UsdShadeConnectableAPI when +passed to functions that want to act generically on a connectable +UsdShadeConnectableAPI object. + +CreateIdAttr(defaultValue, writeSparsely) → Attribute +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateImplementationSourceAttr(defaultValue, writeSparsely) → Attribute +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateInput(name, typeName) → Input +Create an input which can either have a value or can be connected. +The attribute representing the input is created in +the”inputs:”namespace. Inputs on both shaders and node-graphs are +connectable. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +CreateOutput(name, typeName) → Output +Create an output which can either have a value or can be connected. +The attribute representing the output is created in +the”outputs:”namespace. Outputs on a shader cannot be connected, as +their value is assumed to be computed externally. + +Parameters + +name (str) – +typeName (ValueTypeName) – + +static Define() +classmethod Define(stage, path) -> Shader +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Shader +Return a UsdShadeShader holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdShadeShader(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetIdAttr() → Attribute +Forwards to UsdShadeNodeDefAPI(prim). + +GetImplementationSource() → str +Forwards to UsdShadeNodeDefAPI(prim). + +GetImplementationSourceAttr() → Attribute +Forwards to UsdShadeNodeDefAPI(prim). + +GetInput(name) → Input +Return the requested input if it exists. + +Parameters +name (str) – + +GetInputs(onlyAuthored) → list[Input] +Inputs are represented by attributes in the”inputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +GetOutput(name) → Output +Return the requested output if it exists. + +Parameters +name (str) – + +GetOutputs(onlyAuthored) → list[Output] +Outputs are represented by attributes in the”outputs:”namespace. +If onlyAuthored is true (the default), then only return authored +attributes; otherwise, this also returns un-authored builtins. + +Parameters +onlyAuthored (bool) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSdrMetadata() → NdrTokenMap +Returns this shader’s composed”sdrMetadata”dictionary as a +NdrTokenMap. + +GetSdrMetadataByKey(key) → str +Returns the value corresponding to key in the composed +sdrMetadata dictionary. + +Parameters +key (str) – + +GetShaderId(id) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters +id (str) – + +GetShaderNodeForSourceType(sourceType) → ShaderNode +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters +sourceType (str) – + +GetSourceAsset(sourceAsset, sourceType) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +sourceAsset (AssetPath) – +sourceType (str) – + +GetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +subIdentifier (str) – +sourceType (str) – + +GetSourceCode(sourceCode, sourceType) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +sourceCode (str) – +sourceType (str) – + +HasSdrMetadata() → bool +Returns true if the shader has a non-empty +composed”sdrMetadata”dictionary value. + +HasSdrMetadataByKey(key) → bool +Returns true if there is a value corresponding to the given key in +the composed”sdrMetadata”dictionary. + +Parameters +key (str) – + +SetSdrMetadata(sdrMetadata) → None +Authors the given sdrMetadata on this shader at the current +EditTarget. + +Parameters +sdrMetadata (NdrTokenMap) – + +SetSdrMetadataByKey(key, value) → None +Sets the value corresponding to key to the given string value +, in the shader’s”sdrMetadata”dictionary at the current EditTarget. + +Parameters + +key (str) – +value (str) – + +SetShaderId(id) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters +id (str) – + +SetSourceAsset(sourceAsset, sourceType) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +sourceAsset (AssetPath) – +sourceType (str) – + +SetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +subIdentifier (str) – +sourceType (str) – + +SetSourceCode(sourceCode, sourceType) → bool +Forwards to UsdShadeNodeDefAPI(prim). + +Parameters + +sourceCode (str) – +sourceType (str) – + +class pxr.UsdShade.ShaderDefParserPlugin +Parses shader definitions represented using USD scene description +using the schemas provided by UsdShade. +Methods: + +GetDiscoveryTypes() +Returns the types of nodes that this plugin can parse. + +GetSourceType() +Returns the source type that this parser operates on. + +Parse(discoveryResult) +Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new NdrNode . + +GetDiscoveryTypes() → NdrTokenVec +Returns the types of nodes that this plugin can parse. +“Type”here is the discovery type (in the case of files, this will +probably be the file extension, but in other systems will be data that +can be determined during discovery). This type should only be used to +match up a NdrNodeDiscoveryResult to its parser plugin; this value +is not exposed in the node’s API. + +GetSourceType() → str +Returns the source type that this parser operates on. +A source type is the most general type for a node. The parser plugin +is responsible for parsing all discovery results that have the types +declared under GetDiscoveryTypes() , and those types are +collectively identified as one”source type”. + +Parse(discoveryResult) → NdrNodeUnique +Takes the specified NdrNodeDiscoveryResult instance, which was a +result of the discovery process, and generates a new NdrNode . +The node’s name, source type, and family must match. + +Parameters +discoveryResult (NodeDiscoveryResult) – + +class pxr.UsdShade.ShaderDefUtils +This class contains a set of utility functions used for populating the +shader registry with shaders definitions specified using UsdShade +schemas. +Methods: + +GetNodeDiscoveryResults +classmethod GetNodeDiscoveryResults(shaderDef, sourceUri) -> NdrNodeDiscoveryResultVec + +GetPrimvarNamesMetadataString +classmethod GetPrimvarNamesMetadataString(metadata, shaderDef) -> str + +GetShaderProperties +classmethod GetShaderProperties(shaderDef) -> NdrPropertyUniquePtrVec + +static GetNodeDiscoveryResults() +classmethod GetNodeDiscoveryResults(shaderDef, sourceUri) -> NdrNodeDiscoveryResultVec +Returns the list of NdrNodeDiscoveryResult objects that must be added +to the shader registry for the given shader shaderDef , assuming +it is found in a shader definition file found by an Ndr discovery +plugin. +To enable the shaderDef parser to find and parse this shader, +sourceUri should have the resolved path to the usd file containing +this shader prim. + +Parameters + +shaderDef (Shader) – +sourceUri (str) – + +static GetPrimvarNamesMetadataString() +classmethod GetPrimvarNamesMetadataString(metadata, shaderDef) -> str +Collects all the names of valid primvar inputs of the given +metadata and the given shaderDef and returns the string used +to represent them in SdrShaderNode metadata. + +Parameters + +metadata (NdrTokenMap) – +shaderDef (ConnectableAPI) – + +static GetShaderProperties() +classmethod GetShaderProperties(shaderDef) -> NdrPropertyUniquePtrVec +Gets all input and output properties of the given shaderDef and +translates them into NdrProperties that can be used as the properties +for an SdrShaderNode. + +Parameters +shaderDef (ConnectableAPI) – + +class pxr.UsdShade.Tokens +Attributes: + +allPurpose + +bindMaterialAs + +coordSys + +displacement + +fallbackStrength + +full + +id + +infoId + +infoImplementationSource + +inputs + +interfaceOnly + +materialBind + +materialBinding + +materialBindingCollection + +materialVariant + +outputs + +outputsDisplacement + +outputsSurface + +outputsVolume + +preview + +sdrMetadata + +sourceAsset + +sourceCode + +strongerThanDescendants + +subIdentifier + +surface + +universalRenderContext + +universalSourceType + +volume + +weakerThanDescendants + +allPurpose = '' + +bindMaterialAs = 'bindMaterialAs' + +coordSys = 'coordSys:' + +displacement = 'displacement' + +fallbackStrength = 'fallbackStrength' + +full = 'full' + +id = 'id' + +infoId = 'info:id' + +infoImplementationSource = 'info:implementationSource' + +inputs = 'inputs:' + +interfaceOnly = 'interfaceOnly' + +materialBind = 'materialBind' + +materialBinding = 'material:binding' + +materialBindingCollection = 'material:binding:collection' + +materialVariant = 'materialVariant' + +outputs = 'outputs:' + +outputsDisplacement = 'outputs:displacement' + +outputsSurface = 'outputs:surface' + +outputsVolume = 'outputs:volume' + +preview = 'preview' + +sdrMetadata = 'sdrMetadata' + +sourceAsset = 'sourceAsset' + +sourceCode = 'sourceCode' + +strongerThanDescendants = 'strongerThanDescendants' + +subIdentifier = 'subIdentifier' + +surface = 'surface' + +universalRenderContext = '' + +universalSourceType = '' + +volume = 'volume' + +weakerThanDescendants = 'weakerThanDescendants' + +class pxr.UsdShade.Utils +This class contains a set of utility functions used when authoring and +querying shading networks. +Methods: + +GetBaseNameAndType +classmethod GetBaseNameAndType(fullName) -> tuple[str, AttributeType] + +GetConnectedSourcePath +classmethod GetConnectedSourcePath(srcInfo) -> Path + +GetFullName +classmethod GetFullName(baseName, type) -> str + +GetPrefixForAttributeType +classmethod GetPrefixForAttributeType(sourceType) -> str + +GetType +classmethod GetType(fullName) -> AttributeType + +GetValueProducingAttributes +classmethod GetValueProducingAttributes(input, shaderOutputsOnly) -> list[UsdShadeAttribute] + +static GetBaseNameAndType() +classmethod GetBaseNameAndType(fullName) -> tuple[str, AttributeType] +Given the full name of a shading attribute, returns it’s base name and +shading attribute type. + +Parameters +fullName (str) – + +static GetConnectedSourcePath() +classmethod GetConnectedSourcePath(srcInfo) -> Path +For a valid UsdShadeConnectionSourceInfo, return the complete path to +the source property; otherwise the empty path. + +Parameters +srcInfo (ConnectionSourceInfo) – + +static GetFullName() +classmethod GetFullName(baseName, type) -> str +Returns the full shading attribute name given the basename and the +shading attribute type. +baseName is the name of the input or output on the shading node. +type is the UsdShadeAttributeType of the shading attribute. + +Parameters + +baseName (str) – +type (AttributeType) – + +static GetPrefixForAttributeType() +classmethod GetPrefixForAttributeType(sourceType) -> str +Returns the namespace prefix of the USD attribute associated with the +given shading attribute type. + +Parameters +sourceType (AttributeType) – + +static GetType() +classmethod GetType(fullName) -> AttributeType +Given the full name of a shading attribute, returns its shading +attribute type. + +Parameters +fullName (str) – + +static GetValueProducingAttributes() +classmethod GetValueProducingAttributes(input, shaderOutputsOnly) -> list[UsdShadeAttribute] +Find what is connected to an Input or Output recursively. +GetValueProducingAttributes implements the UsdShade connectivity rules +described in Connection Resolution Utilities. +When tracing connections within networks that contain containers like +UsdShadeNodeGraph nodes, the actual output(s) or value(s) at the end +of an input or output might be multiple connections removed. The +methods below resolves this across multiple physical connections. +An UsdShadeInput is getting its value from one of these sources: + +If the input is not connected the UsdAttribute for this input is +returned, but only if it has an authored value. The input attribute +itself carries the value for this input. +If the input is connected we follow the connection(s) until we +reach a valid output of a UsdShadeShader node or if we reach a valid +UsdShadeInput attribute of a UsdShadeNodeGraph or UsdShadeMaterial +that has an authored value. + +An UsdShadeOutput on a container can get its value from the same type +of sources as a UsdShadeInput on either a UsdShadeShader or +UsdShadeNodeGraph. Outputs on non-containers (UsdShadeShaders) cannot +be connected. +This function returns a vector of UsdAttributes. The vector is empty +if no valid attribute was found. The type of each attribute can be +determined with the UsdShadeUtils::GetType function. +If shaderOutputsOnly is true, it will only report attributes that +are outputs of non-containers (UsdShadeShaders). This is a bit faster +and what is need when determining the connections for Material +terminals. +This will return the last attribute along the connection chain that +has an authored value, which might not be the last attribute in the +chain itself. +When the network contains multi-connections, this function can return +multiple attributes for a single input or output. The list of +attributes is build by a depth-first search, following the underlying +connection paths in order. The list can contain both UsdShadeOutput +and UsdShadeInput attributes. It is up to the caller to decide how to +process such a mixture. + +Parameters + +input (Input) – +shaderOutputsOnly (bool) – + +GetValueProducingAttributes(output, shaderOutputsOnly) -> list[UsdShadeAttribute] +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +output (Output) – +shaderOutputsOnly (bool) – + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdSkel.md b/UsdSkel.md new file mode 100644 index 0000000000000000000000000000000000000000..829551b30a780d4948af77184a99474e5043beaf --- /dev/null +++ b/UsdSkel.md @@ -0,0 +1,2480 @@ + + +UsdSkel module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdSkel module + +  + +# UsdSkel module + +Summary: The UsdSkel module defines schemas and API that form a basis for interchanging skeletally-skinned meshes and joint animations. + +Classes: + +AnimMapper + +AnimQuery +Class providing efficient queries of primitives that provide skel animation. + +Animation +Describes a skel animation, where joint animation is stored in a vectorized form. + +Binding +Helper object that describes the binding of a skeleton to a set of skinnable objects. + +BindingAPI +Provides API for authoring and extracting all the skinning-related data that lives in the"geometry hierarchy"of prims and models that want to be skeletally deformed. + +BlendShape +Describes a target blend shape, possibly containing inbetween shapes. + +BlendShapeQuery +Helper class used to resolve blend shape weights, including inbetweens. + +Cache +Thread-safe cache for accessing query objects for evaluating skeletal data. + +InbetweenShape +Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape. + +PackedJointAnimation +Deprecated. + +Root +Boundable prim type used to identify a scope beneath which skeletally- posed primitives are defined. + +Skeleton +Describes a skeleton. + +SkeletonQuery +Primary interface to reading bound skeleton data. + +SkinningQuery +Object used for querying resolved bindings for skinning. + +Tokens + +Topology +Object holding information describing skeleton topology. + +class pxr.UsdSkel.AnimMapper +Methods: + +IsIdentity() +Returns true if this is an identity map. + +IsNull() +Returns true if this is a null mapping. + +IsSparse() +Returns true if this is a sparse mapping. + +Remap(source, target, elementSize, defaultValue) +Typed remapping of data in an arbitrary, stl-like container. + +RemapTransforms(source, target, elementSize) +Convenience method for the common task of remapping transform arrays. + +IsIdentity() → bool +Returns true if this is an identity map. +The source and target orders of an identity map are identical. + +IsNull() → bool +Returns true if this is a null mapping. +No source elements of a null map are mapped to the target. + +IsSparse() → bool +Returns true if this is a sparse mapping. +A sparse mapping means that not all target values will be overridden +by source values, when mapped with Remap(). + +Remap(source, target, elementSize, defaultValue) → bool +Typed remapping of data in an arbitrary, stl-like container. +The source array provides a run of elementSize for each path +in the em sourceOrder. These elements are remapped and copied over +the target array. Prior to remapping, the target array is +resized to the size of the em targetOrder (as given at mapper +construction time) multiplied by the elementSize . New element +created in the array are initialized to defaultValue , if +provided. + +Parameters + +source (Container) – +target (Container) – +elementSize (int) – +defaultValue (Container.value_type) – + +Remap(source, target, elementSize, defaultValue) -> bool +Type-erased remapping of data from source into target . +The source array provides a run of elementSize elements for +each path in the em sourceOrder. These elements are remapped and +copied over the target array. Prior to remapping, the target +array is resized to the size of the em targetOrder (as given at +mapper construction time) multiplied by the elementSize . New +elements created in the array are initialized to defaultValue , if +provided. Remapping is supported for registered Sdf array value types +only. + +Parameters + +source (VtValue) – +target (VtValue) – +elementSize (int) – +defaultValue (VtValue) – + +RemapTransforms(source, target, elementSize) → bool +Convenience method for the common task of remapping transform arrays. +This performs the same operation as Remap(), but sets the matrix +identity as the default value. + +Parameters + +source (VtArray[Matrix4]) – +target (VtArray[Matrix4]) – +elementSize (int) – + +class pxr.UsdSkel.AnimQuery +Class providing efficient queries of primitives that provide skel +animation. +Methods: + +BlendShapeWeightsMightBeTimeVarying() +Return true if it possible, but not certain, that the blend shape weights computed through this animation query change over time, false otherwise. + +ComputeBlendShapeWeights(weights, time) + +param weights + +ComputeJointLocalTransformComponents(...) +Compute translation,rotation,scale components of the joint transforms in joint-local space. + +ComputeJointLocalTransforms(xforms, time) +Compute joint transforms in joint-local space. + +GetBlendShapeOrder() +Returns an array of tokens describing the ordering of blend shape channels in the animation. + +GetBlendShapeWeightTimeSamples(attrs) +Get the time samples at which values contributing to blend shape weights have been set. + +GetBlendShapeWeightTimeSamplesInInterval(...) +Get the time samples at which values contributing to blend shape weights are set, over interval . + +GetJointOrder() +Returns an array of tokens describing the ordering of joints in the animation. + +GetJointTransformTimeSamples(times) +Get the time samples at which values contributing to joint transforms are set. + +GetJointTransformTimeSamplesInInterval(...) +Get the time samples at which values contributing to joint transforms are set, over interval . + +GetPrim() +Return the primitive this anim query reads from. + +JointTransformsMightBeTimeVarying() +Return true if it possible, but not certain, that joint transforms computed through this animation query change over time, false otherwise. + +BlendShapeWeightsMightBeTimeVarying() → bool +Return true if it possible, but not certain, that the blend shape +weights computed through this animation query change over time, false +otherwise. +UsdAttribute::ValueMightBeTimeVayring + +ComputeBlendShapeWeights(weights, time) → bool + +Parameters + +weights (FloatArray) – +time (TimeCode) – + +ComputeJointLocalTransformComponents(translations, rotations, scales, time) → bool +Compute translation,rotation,scale components of the joint transforms +in joint-local space. +This is provided to facilitate direct streaming of animation data in a +form that can efficiently be processed for animation blending. + +Parameters + +translations (Vec3fArray) – +rotations (QuatfArray) – +scales (Vec3hArray) – +time (TimeCode) – + +ComputeJointLocalTransforms(xforms, time) → bool +Compute joint transforms in joint-local space. +Transforms are returned in the order specified by the joint ordering +of the animation primitive itself. + +Parameters + +xforms (VtArray[Matrix4]) – +time (TimeCode) – + +GetBlendShapeOrder() → TokenArray +Returns an array of tokens describing the ordering of blend shape +channels in the animation. + +GetBlendShapeWeightTimeSamples(attrs) → bool +Get the time samples at which values contributing to blend shape +weights have been set. +UsdAttribute::GetTimeSamples + +Parameters +attrs (list[float]) – + +GetBlendShapeWeightTimeSamplesInInterval(interval, times) → bool +Get the time samples at which values contributing to blend shape +weights are set, over interval . +UsdAttribute::GetTimeSamplesInInterval + +Parameters + +interval (Interval) – +times (list[float]) – + +GetJointOrder() → TokenArray +Returns an array of tokens describing the ordering of joints in the +animation. +UsdSkelSkeleton::GetJointOrder + +GetJointTransformTimeSamples(times) → bool +Get the time samples at which values contributing to joint transforms +are set. +This only computes the time samples for sampling transforms in joint- +local space, and does not include time samples affecting the root +transformation. +UsdAttribute::GetTimeSamples + +Parameters +times (list[float]) – + +GetJointTransformTimeSamplesInInterval(interval, times) → bool +Get the time samples at which values contributing to joint transforms +are set, over interval . +This only computes the time samples for sampling transforms in joint- +local space, and does not include time samples affecting the root +transformation. +UsdAttribute::GetTimeSamplesInInterval + +Parameters + +interval (Interval) – +times (list[float]) – + +GetPrim() → Prim +Return the primitive this anim query reads from. + +JointTransformsMightBeTimeVarying() → bool +Return true if it possible, but not certain, that joint transforms +computed through this animation query change over time, false +otherwise. +UsdAttribute::ValueMightBeTimeVayring + +class pxr.UsdSkel.Animation +Describes a skel animation, where joint animation is stored in a +vectorized form. +See the extended Skel Animation documentation for more information. +Methods: + +CreateBlendShapeWeightsAttr(defaultValue, ...) +See GetBlendShapeWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateBlendShapesAttr(defaultValue, ...) +See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointsAttr(defaultValue, writeSparsely) +See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRotationsAttr(defaultValue, writeSparsely) +See GetRotationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateScalesAttr(defaultValue, writeSparsely) +See GetScalesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateTranslationsAttr(defaultValue, ...) +See GetTranslationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Animation + +Get +classmethod Get(stage, path) -> Animation + +GetBlendShapeWeightsAttr() +Array of weight values for each blend shape. + +GetBlendShapesAttr() +Array of tokens identifying which blend shapes this animation's data applies to. + +GetJointsAttr() +Array of tokens identifying which joints this animation's data applies to. + +GetRotationsAttr() +Joint-local unit quaternion rotations of all affected joints, in 32-bit precision. + +GetScalesAttr() +Joint-local scales of all affected joints, in 16 bit precision. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetTransforms(xforms, time) +Convenience method for querying resolved transforms at time . + +GetTranslationsAttr() +Joint-local translations of all affected joints. + +SetTransforms(xforms, time) +Convenience method for setting an array of transforms. + +CreateBlendShapeWeightsAttr(defaultValue, writeSparsely) → Attribute +See GetBlendShapeWeightsAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateBlendShapesAttr(defaultValue, writeSparsely) → Attribute +See GetBlendShapesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointsAttr(defaultValue, writeSparsely) → Attribute +See GetJointsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRotationsAttr(defaultValue, writeSparsely) → Attribute +See GetRotationsAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateScalesAttr(defaultValue, writeSparsely) → Attribute +See GetScalesAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateTranslationsAttr(defaultValue, writeSparsely) → Attribute +See GetTranslationsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Animation +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Animation +Return a UsdSkelAnimation holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdSkelAnimation(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetBlendShapeWeightsAttr() → Attribute +Array of weight values for each blend shape. +Each weight value is associated with the corresponding blend shape +identified within the blendShapes token array, and therefore must +have the same length as *blendShapes. +Declaration +float[] blendShapeWeights +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetBlendShapesAttr() → Attribute +Array of tokens identifying which blend shapes this animation’s data +applies to. +The tokens for blendShapes correspond to the tokens set in the +skel:blendShapes binding property of the UsdSkelBindingAPI. +Declaration +uniform token[] blendShapes +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +GetJointsAttr() → Attribute +Array of tokens identifying which joints this animation’s data applies +to. +The tokens for joints correspond to the tokens of Skeleton primitives. +The order of the joints as listed here may vary from the order of +joints on the Skeleton itself. +Declaration +uniform token[] joints +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +GetRotationsAttr() → Attribute +Joint-local unit quaternion rotations of all affected joints, in +32-bit precision. +Array length should match the size of the joints attribute. +Declaration +quatf[] rotations +C++ Type +VtArray +Usd Type +SdfValueTypeNames->QuatfArray + +GetScalesAttr() → Attribute +Joint-local scales of all affected joints, in 16 bit precision. +Array length should match the size of the joints attribute. +Declaration +half3[] scales +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Half3Array + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetTransforms(xforms, time) → bool +Convenience method for querying resolved transforms at time . +Note that it is more efficient to query transforms through +UsdSkelAnimQuery or UsdSkelSkeletonQuery. + +Parameters + +xforms (Matrix4dArray) – +time (TimeCode) – + +GetTranslationsAttr() → Attribute +Joint-local translations of all affected joints. +Array length should match the size of the joints attribute. +Declaration +float3[] translations +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Float3Array + +SetTransforms(xforms, time) → bool +Convenience method for setting an array of transforms. +The given transforms must be orthogonal. + +Parameters + +xforms (Matrix4dArray) – +time (TimeCode) – + +class pxr.UsdSkel.Binding +Helper object that describes the binding of a skeleton to a set of +skinnable objects. The set of skinnable objects is given as +UsdSkelSkinningQuery prims, which can be used both to identify the +skinned prim as well compute skinning properties of the prim. +Methods: + +GetSkeleton() +Returns the bound skeleton. + +GetSkinningTargets() +Returns the set skinning targets. + +GetSkeleton() → Skeleton +Returns the bound skeleton. + +GetSkinningTargets() → VtArray[SkinningQuery] +Returns the set skinning targets. + +class pxr.UsdSkel.BindingAPI +Provides API for authoring and extracting all the skinning-related +data that lives in the”geometry hierarchy”of prims and models that +want to be skeletally deformed. +See the extended UsdSkelBindingAPI schema documentation for more about +bindings and how they apply in a scene graph. +Methods: + +Apply +classmethod Apply(prim) -> BindingAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateAnimationSourceRel() +See GetAnimationSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateBlendShapeTargetsRel() +See GetBlendShapeTargetsRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateBlendShapesAttr(defaultValue, ...) +See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateGeomBindTransformAttr(defaultValue, ...) +See GetGeomBindTransformAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointIndicesAttr(defaultValue, ...) +See GetJointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointIndicesPrimvar(constant, elementSize) +Convenience function to create the jointIndices primvar, optionally specifying elementSize. + +CreateJointWeightsAttr(defaultValue, ...) +See GetJointWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointWeightsPrimvar(constant, elementSize) +Convenience function to create the jointWeights primvar, optionally specifying elementSize. + +CreateJointsAttr(defaultValue, writeSparsely) +See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSkeletonRel() +See GetSkeletonRel() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSkinningBlendWeightPrimvar + +CreateSkinningBlendWeightsAttr(defaultValue, ...) +See GetSkinningBlendWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSkinningMethodAttr(defaultValue, ...) +See GetSkinningMethodAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> BindingAPI + +GetAnimationSource(prim) +Convenience method to query the animation source bound on this prim. + +GetAnimationSourceRel() +Animation source to be bound to Skeleton primitives at or beneath the location at which this property is defined. + +GetBlendShapeTargetsRel() +Ordered list of all target blend shapes. + +GetBlendShapesAttr() +An array of tokens defining the order onto which blend shape weights from an animation source map onto the skel:blendShapeTargets rel of a binding site. + +GetGeomBindTransformAttr() +Encodes the bind-time world space transforms of the prim. + +GetInheritedAnimationSource() +Returns the animation source bound at this prim, or one of its ancestors. + +GetInheritedSkeleton() +Returns the skeleton bound at this prim, or one of its ancestors. + +GetJointIndicesAttr() +Indices into the joints attribute of the closest (in namespace) bound Skeleton that affect each point of a PointBased gprim. + +GetJointIndicesPrimvar() +Convenience function to get the jointIndices attribute as a primvar. + +GetJointWeightsAttr() +Weights for the joints that affect each point of a PointBased gprim. + +GetJointWeightsPrimvar() +Convenience function to get the jointWeights attribute as a primvar. + +GetJointsAttr() +An (optional) array of tokens defining the list of joints to which jointIndices apply. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSkeleton(skel) +Convenience method to query the Skeleton bound on this prim. + +GetSkeletonRel() +Skeleton to be bound to this prim and its descendents that possess a mapping and weighting to the joints of the identified Skeleton. + +GetSkinningBlendWeightPrimvar + +GetSkinningBlendWeightsAttr() +Weights for weighted blend skinning method. + +GetSkinningMethodAttr() +Different calculation method for skinning. + +SetRigidJointInfluence(jointIndex, weight) +Convenience method for defining joints influences that make a primitive rigidly deformed by a single joint. + +ValidateJointIndices +classmethod ValidateJointIndices(indices, numJoints, reason) -> bool + +static Apply() +classmethod Apply(prim) -> BindingAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”SkelBindingAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdSkelBindingAPI object is returned upon success. An invalid +(or empty) UsdSkelBindingAPI object is returned upon failure. See +UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateAnimationSourceRel() → Relationship +See GetAnimationSourceRel() , and also Create vs Get Property Methods +for when to use Get vs Create. + +CreateBlendShapeTargetsRel() → Relationship +See GetBlendShapeTargetsRel() , and also Create vs Get Property +Methods for when to use Get vs Create. + +CreateBlendShapesAttr(defaultValue, writeSparsely) → Attribute +See GetBlendShapesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateGeomBindTransformAttr(defaultValue, writeSparsely) → Attribute +See GetGeomBindTransformAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetJointIndicesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointIndicesPrimvar(constant, elementSize) → Primvar +Convenience function to create the jointIndices primvar, optionally +specifying elementSize. +If constant is true, the resulting primvar is configured +with’constant’interpolation, and describes a rigid deformation. +Otherwise, the primvar is configured with’vertex’interpolation, and +describes joint influences that vary per point. +CreateJointIndicesAttr() , GetJointIndicesPrimvar() + +Parameters + +constant (bool) – +elementSize (int) – + +CreateJointWeightsAttr(defaultValue, writeSparsely) → Attribute +See GetJointWeightsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointWeightsPrimvar(constant, elementSize) → Primvar +Convenience function to create the jointWeights primvar, optionally +specifying elementSize. +If constant is true, the resulting primvar is configured +with’constant’interpolation, and describes a rigid deformation. +Otherwise, the primvar is configured with’vertex’interpolation, and +describes joint influences that vary per point. +CreateJointWeightsAttr() , GetJointWeightsPrimvar() + +Parameters + +constant (bool) – +elementSize (int) – + +CreateJointsAttr(defaultValue, writeSparsely) → Attribute +See GetJointsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSkeletonRel() → Relationship +See GetSkeletonRel() , and also Create vs Get Property Methods for +when to use Get vs Create. + +CreateSkinningBlendWeightPrimvar() + +CreateSkinningBlendWeightsAttr(defaultValue, writeSparsely) → Attribute +See GetSkinningBlendWeightsAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSkinningMethodAttr(defaultValue, writeSparsely) → Attribute +See GetSkinningMethodAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> BindingAPI +Return a UsdSkelBindingAPI holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdSkelBindingAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAnimationSource(prim) → bool +Convenience method to query the animation source bound on this prim. +Returns true if an animation source binding is defined, and sets +prim to the target prim. The resulting primitive may still be +invalid, if the prim has been explicitly unbound. +This does not resolved inherited animation source bindings. + +Parameters +prim (Prim) – + +GetAnimationSourceRel() → Relationship +Animation source to be bound to Skeleton primitives at or beneath the +location at which this property is defined. + +GetBlendShapeTargetsRel() → Relationship +Ordered list of all target blend shapes. +This property is not inherited hierarchically, and is expected to be +authored directly on the skinnable primitive to which the the blend +shapes apply. + +GetBlendShapesAttr() → Attribute +An array of tokens defining the order onto which blend shape weights +from an animation source map onto the skel:blendShapeTargets rel of +a binding site. +If authored, the number of elements must be equal to the number of +targets in the blendShapeTargets rel. This property is not inherited +hierarchically, and is expected to be authored directly on the +skinnable primitive to which the blend shapes apply. +Declaration +uniform token[] skel:blendShapes +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +GetGeomBindTransformAttr() → Attribute +Encodes the bind-time world space transforms of the prim. +If the transform is identical for a group of gprims that share a +common ancestor, the transform may be authored on the ancestor, +to”inherit”down to all the leaf gprims. If this transform is unset, an +identity transform is used instead. +Declaration +matrix4d primvars:skel:geomBindTransform +C++ Type +GfMatrix4d +Usd Type +SdfValueTypeNames->Matrix4d + +GetInheritedAnimationSource() → Prim +Returns the animation source bound at this prim, or one of its +ancestors. + +GetInheritedSkeleton() → Skeleton +Returns the skeleton bound at this prim, or one of its ancestors. + +GetJointIndicesAttr() → Attribute +Indices into the joints attribute of the closest (in namespace) +bound Skeleton that affect each point of a PointBased gprim. +The primvar can have either constant or vertex interpolation. This +primvar’s elementSize will determine how many joint influences apply +to each point. Indices must point be valid. Null influences should be +defined by setting values in jointWeights to zero. See UsdGeomPrimvar +for more information on interpolation and elementSize. +Declaration +int[] primvars:skel:jointIndices +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray + +GetJointIndicesPrimvar() → Primvar +Convenience function to get the jointIndices attribute as a primvar. +GetJointIndicesAttr, GetInheritedJointWeightsPrimvar + +GetJointWeightsAttr() → Attribute +Weights for the joints that affect each point of a PointBased gprim. +The primvar can have either constant or vertex interpolation. This +primvar’s elementSize will determine how many joints influences +apply to each point. The length, interpolation, and elementSize of +jointWeights must match that of jointIndices. See UsdGeomPrimvar +for more information on interpolation and elementSize. +Declaration +float[] primvars:skel:jointWeights +C++ Type +VtArray +Usd Type +SdfValueTypeNames->FloatArray + +GetJointWeightsPrimvar() → Primvar +Convenience function to get the jointWeights attribute as a primvar. +GetJointWeightsAttr, GetInheritedJointWeightsPrimvar + +GetJointsAttr() → Attribute +An (optional) array of tokens defining the list of joints to which +jointIndices apply. +If not defined, jointIndices applies to the ordered list of joints +defined in the bound Skeleton’s joints attribute. If undefined on a +primitive, the primitive inherits the value of the nearest ancestor +prim, if any. +Declaration +uniform token[] skel:joints +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSkeleton(skel) → bool +Convenience method to query the Skeleton bound on this prim. +Returns true if a Skeleton binding is defined, and sets skel to +the target skel. The resulting Skeleton may still be invalid, if the +Skeleton has been explicitly unbound. +This does not resolved inherited skeleton bindings. + +Parameters +skel (Skeleton) – + +GetSkeletonRel() → Relationship +Skeleton to be bound to this prim and its descendents that possess a +mapping and weighting to the joints of the identified Skeleton. + +GetSkinningBlendWeightPrimvar() + +GetSkinningBlendWeightsAttr() → Attribute +Weights for weighted blend skinning method. +The primvar can have either constant or vertex interpolation. +Constant interpolation means every vertex share the same single blend +weight. Vertex interpolation means every vertex has their own blend +weight. The element size should match the vertices count in this case. +C++ Type: VtArray Usd Type: SdfValueTypeNames->FloatArray +Variability: SdfVariabilityUniform Fallback Value: No Fallback + +GetSkinningMethodAttr() → Attribute +Different calculation method for skinning. +LBS, DQ, and blendWeight +C++ Type: TfToken Usd Type: SdfValueTypeNames->Token Variability: +SdfVariabilityUniform Fallback Value: ClassicLinear Allowed Values : +[ClassicLinear, DualQuaternion, WeightedBlend] + +SetRigidJointInfluence(jointIndex, weight) → bool +Convenience method for defining joints influences that make a +primitive rigidly deformed by a single joint. + +Parameters + +jointIndex (int) – +weight (float) – + +static ValidateJointIndices() +classmethod ValidateJointIndices(indices, numJoints, reason) -> bool +Validate an array of joint indices. +This ensures that all indices are the in the range [0, numJoints). +Returns true if the indices are valid, or false otherwise. If invalid +and reason is non-null, an error message describing the first +validation error will be set. + +Parameters + +indices (TfSpan[int]) – +numJoints (int) – +reason (str) – + +class pxr.UsdSkel.BlendShape +Describes a target blend shape, possibly containing inbetween shapes. +See the extended Blend Shape Schema documentation for information. +Methods: + +CreateInbetween(name) +Author scene description to create an attribute on this prim that will be recognized as an Inbetween (i.e. + +CreateNormalOffsetsAttr(defaultValue, ...) +See GetNormalOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateOffsetsAttr(defaultValue, writeSparsely) +See GetOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePointIndicesAttr(defaultValue, ...) +See GetPointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> BlendShape + +Get +classmethod Get(stage, path) -> BlendShape + +GetAuthoredInbetweens() +Like GetInbetweens() , but exclude inbetwens that have no authored scene / description. + +GetInbetween(name) +Return the Inbetween corresponding to the attribute named name , which will be valid if an Inbetween attribute definition already exists. + +GetInbetweens() +Return valid UsdSkelInbetweenShape objects for all defined Inbetweens on this prim. + +GetNormalOffsetsAttr() +Required property. + +GetOffsetsAttr() +Required property. + +GetPointIndicesAttr() +Optional property. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +HasInbetween(name) +Return true if there is a defined Inbetween named name on this prim. + +ValidatePointIndices +classmethod ValidatePointIndices(indices, numPoints, reason) -> bool + +CreateInbetween(name) → InbetweenShape +Author scene description to create an attribute on this prim that will +be recognized as an Inbetween (i.e. +will present as a valid UsdSkelInbetweenShape). +The name of the created attribute or may or may not be the specified +attrName , due to the possible need to apply property namespacing. +Creation may fail and return an invalid Inbetwen if attrName +contains a reserved keyword. +an invalid UsdSkelInbetweenShape if we failed to create a valid +attribute, a valid UsdSkelInbetweenShape otherwise. It is not an error +to create over an existing, compatible attribute. +UsdSkelInbetweenShape::IsInbetween() + +Parameters +name (str) – + +CreateNormalOffsetsAttr(defaultValue, writeSparsely) → Attribute +See GetNormalOffsetsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateOffsetsAttr(defaultValue, writeSparsely) → Attribute +See GetOffsetsAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePointIndicesAttr(defaultValue, writeSparsely) → Attribute +See GetPointIndicesAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> BlendShape +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> BlendShape +Return a UsdSkelBlendShape holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdSkelBlendShape(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetAuthoredInbetweens() → list[InbetweenShape] +Like GetInbetweens() , but exclude inbetwens that have no authored +scene / description. + +GetInbetween(name) → InbetweenShape +Return the Inbetween corresponding to the attribute named name , +which will be valid if an Inbetween attribute definition already +exists. +Name lookup will account for Inbetween namespacing, which means that +this method will succeed in some cases where UsdSkelInbetweenShape +(prim->GetAttribute(name)) will not, unless name has the proper +namespace prefix. +HasInbetween() + +Parameters +name (str) – + +GetInbetweens() → list[InbetweenShape] +Return valid UsdSkelInbetweenShape objects for all defined Inbetweens +on this prim. + +GetNormalOffsetsAttr() → Attribute +Required property. +Normal offsets which, when added to the base pose, provides the +normals of the target shape. +Declaration +uniform vector3f[] normalOffsets +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray +Variability +SdfVariabilityUniform + +GetOffsetsAttr() → Attribute +Required property. +Position offsets which, when added to the base pose, provides the +target shape. +Declaration +uniform vector3f[] offsets +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Vector3fArray +Variability +SdfVariabilityUniform + +GetPointIndicesAttr() → Attribute +Optional property. +Indices into the original mesh that correspond to the values in +offsets and of any inbetween shapes. If authored, the number of +elements must be equal to the number of elements in the offsets +array. +Declaration +uniform int[] pointIndices +C++ Type +VtArray +Usd Type +SdfValueTypeNames->IntArray +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +HasInbetween(name) → bool +Return true if there is a defined Inbetween named name on this +prim. +Name lookup will account for Inbetween namespacing. +GetInbetween() + +Parameters +name (str) – + +static ValidatePointIndices() +classmethod ValidatePointIndices(indices, numPoints, reason) -> bool +Validates a set of point indices for a given point count. +This ensures that all point indices are in the range [0, numPoints). +Returns true if the indices are valid, or false otherwise. If invalid +and reason is non-null, an error message describing the first +validation error will be set. + +Parameters + +indices (TfSpan[int]) – +numPoints (int) – +reason (str) – + +class pxr.UsdSkel.BlendShapeQuery +Helper class used to resolve blend shape weights, including +inbetweens. +Methods: + +ComputeBlendShapePointIndices() +Compute an array holding the point indices of all shapes. + +ComputeDeformedPoints(subShapeWeights, ...) +Deform points using the resolved sub-shapes given by subShapeWeights , blendShapeIndices and subShapeIndices . + +ComputeSubShapePointOffsets() +Compute an array holding the point offsets of all sub-shapes. + +ComputeSubShapeWeights(weights, ...) +Compute the resolved weights for all sub-shapes bound to this prim. + +GetBlendShape(blendShapeIndex) +Returns the blend shape corresponding to blendShapeIndex . + +GetBlendShapeIndex(subShapeIndex) +Returns the blend shape index corresponding to the i'th sub-shape. + +GetInbetween(subShapeIndex) +Returns the inbetween shape corresponding to sub-shape i , if any. + +GetNumBlendShapes() + +GetNumSubShapes() + +ComputeBlendShapePointIndices() → list[IntArray] +Compute an array holding the point indices of all shapes. +This is indexed by the blendShapeIndices returned by +ComputeSubShapes(). Since the pointIndices property of blend shapes +is optional, some of the arrays may be empty. + +ComputeDeformedPoints(subShapeWeights, blendShapeIndices, subShapeIndices, blendShapePointIndices, subShapePointOffsets, points) → bool +Deform points using the resolved sub-shapes given by +subShapeWeights , blendShapeIndices and subShapeIndices . +The blendShapePointIndices and blendShapePointOffsets arrays +both provide the pre-computed point offsets and indices of each sub- +shape, as computed by ComputeBlendShapePointIndices() and +ComputeSubShapePointOffsets() . + +Parameters + +subShapeWeights (TfSpan[float]) – +blendShapeIndices (TfSpan[unsigned]) – +subShapeIndices (TfSpan[unsigned]) – +blendShapePointIndices (list[IntArray]) – +subShapePointOffsets (list[Vec3fArray]) – +points (TfSpan[Vec3f]) – + +ComputeSubShapePointOffsets() → list[Vec3fArray] +Compute an array holding the point offsets of all sub-shapes. +This includes offsets of both primary shapes those stored directly on +a BlendShape primitive as well as those of inbetween shapes. This is +indexed by the subShapeIndices returned by ComputeSubShapeWeights() +. + +ComputeSubShapeWeights(weights, subShapeWeights, blendShapeIndices, subShapeIndices) → bool +Compute the resolved weights for all sub-shapes bound to this prim. +The weights values are initial weight values, ordered according to +the skel:blendShapeTargets relationship of the prim this query is +associated with. If there are any inbetween shapes, a new set of +weights is computed, providing weighting of the relevant inbetweens. +All computed arrays shared the same size. Elements of the same index +identify which sub-shape of which blend shape a given weight value is +mapped to. + +Parameters + +weights (TfSpan[float]) – +subShapeWeights (FloatArray) – +blendShapeIndices (UIntArray) – +subShapeIndices (UIntArray) – + +GetBlendShape(blendShapeIndex) → BlendShape +Returns the blend shape corresponding to blendShapeIndex . + +Parameters +blendShapeIndex (int) – + +GetBlendShapeIndex(subShapeIndex) → int +Returns the blend shape index corresponding to the i'th sub-shape. + +Parameters +subShapeIndex (int) – + +GetInbetween(subShapeIndex) → InbetweenShape +Returns the inbetween shape corresponding to sub-shape i , if any. + +Parameters +subShapeIndex (int) – + +GetNumBlendShapes() → int + +GetNumSubShapes() → int + +class pxr.UsdSkel.Cache +Thread-safe cache for accessing query objects for evaluating skeletal +data. +This provides caching of major structural components, such as skeletal +topology. In a streaming context, this cache is intended to persist. +Methods: + +Clear() + +ComputeSkelBinding(skelRoot, skel, binding, ...) +Compute the bindings corresponding to a single skeleton, bound beneath skelRoot , as discovered through a traversal using predicate . + +ComputeSkelBindings(skelRoot, bindings, ...) +Compute the set of skeleton bindings beneath skelRoot , as discovered through a traversal using predicate . + +GetAnimQuery(anim) +Get an anim query corresponding to anim . + +GetSkelQuery(skel) +Get a skel query for computing properties of skel . + +GetSkinningQuery(prim) +Get a skinning query at prim . + +Populate(root, predicate) +Populate the cache for the skeletal data beneath prim root , as traversed using predicate . + +Clear() → None + +ComputeSkelBinding(skelRoot, skel, binding, predicate) → bool +Compute the bindings corresponding to a single skeleton, bound beneath +skelRoot , as discovered through a traversal using predicate . +Skinnable prims are only discoverable by this method if Populate() has +already been called for skelRoot , with an equivalent predicate. + +Parameters + +skelRoot (Root) – +skel (Skeleton) – +binding (Binding) – +predicate (_PrimFlagsPredicate) – + +ComputeSkelBindings(skelRoot, bindings, predicate) → bool +Compute the set of skeleton bindings beneath skelRoot , as +discovered through a traversal using predicate . +Skinnable prims are only discoverable by this method if Populate() has +already been called for skelRoot , with an equivalent predicate. + +Parameters + +skelRoot (Root) – +bindings (list[Binding]) – +predicate (_PrimFlagsPredicate) – + +GetAnimQuery(anim) → AnimQuery +Get an anim query corresponding to anim . +This does not require Populate() to be called on the cache. + +Parameters +anim (Animation) – + +GetAnimQuery(prim) -> AnimQuery +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +Deprecated + +Parameters +prim (Prim) – + +GetSkelQuery(skel) → SkeletonQuery +Get a skel query for computing properties of skel . +This does not require Populate() to be called on the cache. + +Parameters +skel (Skeleton) – + +GetSkinningQuery(prim) → SkinningQuery +Get a skinning query at prim . +Skinning queries are defined at any skinnable prims (I.e., boundable +prims with fully defined joint influences). +The caller must first Populate() the cache with the skel root +containing prim , with a predicate that will visit prim , in +order for a skinning query to be discoverable. + +Parameters +prim (Prim) – + +Populate(root, predicate) → bool +Populate the cache for the skeletal data beneath prim root , as +traversed using predicate . +Population resolves inherited skel bindings set using the +UsdSkelBindingAPI, making resolved bindings available through +GetSkinningQuery() , ComputeSkelBdining() and ComputeSkelBindings() . + +Parameters + +root (Root) – +predicate (_PrimFlagsPredicate) – + +class pxr.UsdSkel.InbetweenShape +Schema wrapper for UsdAttribute for authoring and introspecting +attributes that serve as inbetween shapes of a UsdSkelBlendShape. +Inbetween shapes allow an explicit shape to be specified when the +blendshape to which it’s bound is evaluated at a certain weight. For +example, rather than performing piecewise linear interpolation between +a primary shape and the rest shape at weight 0.5, an inbetween shape +could be defined at the weight. For weight values greater than 0.5, a +shape would then be resolved by linearly interpolating between the +inbetween shape and the primary shape, while for weight values less +than or equal to 0.5, the shape is resolved by linearly interpolating +between the inbetween shape and the primary shape. +Methods: + +CreateNormalOffsetsAttr(defaultValue) +Returns the existing normal offsets attribute if the shape has normal offsets, or creates a new one. + +GetAttr() +Explicit UsdAttribute extractor. + +GetNormalOffsets(offsets) +Get the normal offsets authored for this shape. + +GetNormalOffsetsAttr() +Returns a valid normal offsets attribute if the shape has normal offsets. + +GetOffsets(offsets) +Get the point offsets corresponding to this shape. + +GetWeight(weight) +Return the location at which the shape is applied. + +HasAuthoredWeight() +Has a weight value been explicitly authored on this shape? + +IsDefined() +Return true if the wrapped UsdAttribute::IsDefined() , and in addition the attribute is identified as an Inbetween. + +IsInbetween +classmethod IsInbetween(attr) -> bool + +SetNormalOffsets(offsets) +Set the normal offsets authored for this shape. + +SetOffsets(offsets) +Set the point offsets corresponding to this shape. + +SetWeight(weight) +Set the location at which the shape is applied. + +CreateNormalOffsetsAttr(defaultValue) → Attribute +Returns the existing normal offsets attribute if the shape has normal +offsets, or creates a new one. + +Parameters +defaultValue (VtValue) – + +GetAttr() → Attribute +Explicit UsdAttribute extractor. + +GetNormalOffsets(offsets) → bool +Get the normal offsets authored for this shape. +Normal offsets are optional, and may be left unspecified. + +Parameters +offsets (Vec3fArray) – + +GetNormalOffsetsAttr() → Attribute +Returns a valid normal offsets attribute if the shape has normal +offsets. +Returns an invalid attribute otherwise. + +GetOffsets(offsets) → bool +Get the point offsets corresponding to this shape. + +Parameters +offsets (Vec3fArray) – + +GetWeight(weight) → bool +Return the location at which the shape is applied. + +Parameters +weight (float) – + +HasAuthoredWeight() → bool +Has a weight value been explicitly authored on this shape? +GetWeight() + +IsDefined() → bool +Return true if the wrapped UsdAttribute::IsDefined() , and in addition +the attribute is identified as an Inbetween. + +static IsInbetween() +classmethod IsInbetween(attr) -> bool +Test whether a given UsdAttribute represents a valid Inbetween, which +implies that creating a UsdSkelInbetweenShape from the attribute will +succeed. +Succes implies that attr.IsDefined() is true. + +Parameters +attr (Attribute) – + +SetNormalOffsets(offsets) → bool +Set the normal offsets authored for this shape. + +Parameters +offsets (Vec3fArray) – + +SetOffsets(offsets) → bool +Set the point offsets corresponding to this shape. + +Parameters +offsets (Vec3fArray) – + +SetWeight(weight) → bool +Set the location at which the shape is applied. + +Parameters +weight (float) – + +class pxr.UsdSkel.PackedJointAnimation +Deprecated. Please use SkelAnimation instead. +Methods: + +Define +classmethod Define(stage, path) -> PackedJointAnimation + +Get +classmethod Get(stage, path) -> PackedJointAnimation + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> PackedJointAnimation +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> PackedJointAnimation +Return a UsdSkelPackedJointAnimation holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdSkelPackedJointAnimation(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdSkel.Root +Boundable prim type used to identify a scope beneath which skeletally- +posed primitives are defined. +A SkelRoot must be defined at or above a skinned primitive for any +skinning behaviors in UsdSkel. +See the extended Skel Root Schema documentation for more information. +Methods: + +Define +classmethod Define(stage, path) -> Root + +Find +classmethod Find(prim) -> Root + +Get +classmethod Get(stage, path) -> Root + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Define() +classmethod Define(stage, path) -> Root +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Find() +classmethod Find(prim) -> Root +Returns the skel root at or above prim , or an invalid schema +object if no ancestor prim is defined as a skel root. + +Parameters +prim (Prim) – + +static Get() +classmethod Get(stage, path) -> Root +Return a UsdSkelRoot holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdSkelRoot(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdSkel.Skeleton +Describes a skeleton. +See the extended Skeleton Schema documentation for more information. +Methods: + +CreateBindTransformsAttr(defaultValue, ...) +See GetBindTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointNamesAttr(defaultValue, writeSparsely) +See GetJointNamesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateJointsAttr(defaultValue, writeSparsely) +See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateRestTransformsAttr(defaultValue, ...) +See GetRestTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Skeleton + +Get +classmethod Get(stage, path) -> Skeleton + +GetBindTransformsAttr() +Specifies the bind-pose transforms of each joint in world space, in the ordering imposed by joints. + +GetJointNamesAttr() +If authored, provides a unique name per joint. + +GetJointsAttr() +An array of path tokens identifying the set of joints that make up the skeleton, and their order. + +GetRestTransformsAttr() +Specifies the rest-pose transforms of each joint in local space, in the ordering imposed by joints. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateBindTransformsAttr(defaultValue, writeSparsely) → Attribute +See GetBindTransformsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointNamesAttr(defaultValue, writeSparsely) → Attribute +See GetJointNamesAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateJointsAttr(defaultValue, writeSparsely) → Attribute +See GetJointsAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateRestTransformsAttr(defaultValue, writeSparsely) → Attribute +See GetRestTransformsAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Skeleton +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Skeleton +Return a UsdSkelSkeleton holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdSkelSkeleton(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetBindTransformsAttr() → Attribute +Specifies the bind-pose transforms of each joint in world space, +in the ordering imposed by joints. +Declaration +uniform matrix4d[] bindTransforms +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Matrix4dArray +Variability +SdfVariabilityUniform + +GetJointNamesAttr() → Attribute +If authored, provides a unique name per joint. +This may be optionally set to provide better names when translating to +DCC apps that require unique joint names. +Declaration +uniform token[] jointNames +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +GetJointsAttr() → Attribute +An array of path tokens identifying the set of joints that make up the +skeleton, and their order. +Each token in the array must be valid when parsed as an SdfPath. The +parent-child relationships of the corresponding paths determine the +parent-child relationships of each joint. It is not required that the +name at the end of each path be unique, but rather only that the paths +themselves be unique. +Declaration +uniform token[] joints +C++ Type +VtArray +Usd Type +SdfValueTypeNames->TokenArray +Variability +SdfVariabilityUniform + +GetRestTransformsAttr() → Attribute +Specifies the rest-pose transforms of each joint in local space, +in the ordering imposed by joints. +This provides fallback values for joint transforms when a Skeleton +either has no bound animation source, or when that animation source +only contains animation for a subset of a Skeleton’s joints. +Declaration +uniform matrix4d[] restTransforms +C++ Type +VtArray +Usd Type +SdfValueTypeNames->Matrix4dArray +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdSkel.SkeletonQuery +Primary interface to reading bound skeleton data. This is used to +query properties such as resolved transforms and animation bindings, +as bound through the UsdSkelBindingAPI. +A UsdSkelSkeletonQuery can not be constructed directly, and instead +must be constructed through a UsdSkelCache instance. This is done as +follows: +// Global cache, intended to persist. +UsdSkelCache skelCache; +// Populate the cache for a skel root. +skelCache.Populate(UsdSkelRoot(skelRootPrim)); + +if (UsdSkelSkeletonQuery skelQuery = skelCache.GetSkelQuery(skelPrim)) { + \.\.\. +} + +Methods: + +ComputeJointLocalTransforms(xforms, time, atRest) +Compute joint transforms in joint-local space, at time . + +ComputeJointRestRelativeTransforms(xforms, time) +Compute joint transforms which, when concatenated against the rest pose, produce joint transforms in joint-local space. + +ComputeJointSkelTransforms(xforms, time, atRest) +Compute joint transforms in skeleton space, at time . + +ComputeJointWorldTransforms(xforms, xfCache, ...) +Compute joint transforms in world space, at whatever time is configured on xfCache . + +ComputeSkinningTransforms(xforms, time) +Compute transforms representing the change in transformation of a joint from its rest pose, in skeleton space. + +GetAnimQuery() +Returns the animation query that provides animation for the bound skeleton instance, if any. + +GetJointOrder() +Returns an array of joint paths, given as tokens, describing the order and parent-child relationships of joints in the skeleton. + +GetJointWorldBindTransforms(xforms) +Returns the world space joint transforms at bind time. + +GetMapper() +Returns a mapper for remapping from the bound animation, if any, to the Skeleton. + +GetPrim() +Returns the underlying Skeleton primitive corresponding to the bound skeleton instance, if any. + +GetSkeleton() +Returns the bound skeleton instance, if any. + +GetTopology() +Returns the topology of the bound skeleton instance, if any. + +HasBindPose() +Returns true if the size of the array returned by skeleton::GetBindTransformsAttr() matches the number of joints in the skeleton. + +HasRestPose() +Returns true if the size of the array returned by skeleton::GetRestTransformsAttr() matches the number of joints in the skeleton. + +ComputeJointLocalTransforms(xforms, time, atRest) → bool +Compute joint transforms in joint-local space, at time . +This returns transforms in joint order of the skeleton. If atRest +is false and an animation source is bound, local transforms defined by +the animation are mapped into the skeleton’s joint order. Any +transforms not defined by the animation source use the transforms from +the rest pose as a fallback value. If valid transforms cannot be +computed for the animation source, the xforms are instead set to +the rest transforms. + +Parameters + +xforms (VtArray[Matrix4]) – +time (TimeCode) – +atRest (bool) – + +ComputeJointRestRelativeTransforms(xforms, time) → bool +Compute joint transforms which, when concatenated against the rest +pose, produce joint transforms in joint-local space. +More specifically, this computes restRelativeTransform in: +restRelativeTransform \* restTransform = jointLocalTransform + +Parameters + +xforms (VtArray[Matrix4]) – +time (TimeCode) – + +ComputeJointSkelTransforms(xforms, time, atRest) → bool +Compute joint transforms in skeleton space, at time . +This concatenates joint transforms as computed from +ComputeJointLocalTransforms() . If atRest is true, any bound +animation source is ignored, and transforms are computed from the rest +pose. The skeleton-space transforms of the rest pose are cached +internally. + +Parameters + +xforms (VtArray[Matrix4]) – +time (TimeCode) – +atRest (bool) – + +ComputeJointWorldTransforms(xforms, xfCache, atRest) → bool +Compute joint transforms in world space, at whatever time is +configured on xfCache . +This is equivalent to computing skel-space joint transforms with +CmoputeJointSkelTransforms(), and then concatenating all transforms by +the local-to-world transform of the Skeleton prim. If atRest is +true, any bound animation source is ignored, and transforms are +computed from the rest pose. + +Parameters + +xforms (VtArray[Matrix4]) – +xfCache (XformCache) – +atRest (bool) – + +ComputeSkinningTransforms(xforms, time) → bool +Compute transforms representing the change in transformation of a +joint from its rest pose, in skeleton space. +I.e., +inverse(bindTransform)\*jointTransform + +These are the transforms usually required for skinning. + +Parameters + +xforms (VtArray[Matrix4]) – +time (TimeCode) – + +GetAnimQuery() → AnimQuery +Returns the animation query that provides animation for the bound +skeleton instance, if any. + +GetJointOrder() → TokenArray +Returns an array of joint paths, given as tokens, describing the order +and parent-child relationships of joints in the skeleton. +UsdSkelSkeleton::GetJointOrder + +GetJointWorldBindTransforms(xforms) → bool +Returns the world space joint transforms at bind time. + +Parameters +xforms (VtArray[Matrix4]) – + +GetMapper() → AnimMapper +Returns a mapper for remapping from the bound animation, if any, to +the Skeleton. + +GetPrim() → Prim +Returns the underlying Skeleton primitive corresponding to the bound +skeleton instance, if any. + +GetSkeleton() → Skeleton +Returns the bound skeleton instance, if any. + +GetTopology() → Topology +Returns the topology of the bound skeleton instance, if any. + +HasBindPose() → bool +Returns true if the size of the array returned by +skeleton::GetBindTransformsAttr() matches the number of joints in the +skeleton. + +HasRestPose() → bool +Returns true if the size of the array returned by +skeleton::GetRestTransformsAttr() matches the number of joints in the +skeleton. + +class pxr.UsdSkel.SkinningQuery +Object used for querying resolved bindings for skinning. +Methods: + +ComputeExtentsPadding(skelRestXforms, boundable) +Helper for computing an approximate padding for use in extents computations. + +ComputeJointInfluences(indices, weights, time) +Convenience method for computing joint influences. + +ComputeSkinnedPoints(xforms, points, time) +Compute skinned points using linear blend skinning. + +ComputeSkinnedTransform(xforms, xform, time) +Compute a skinning transform using linear blend skinning. + +ComputeVaryingJointInfluences(numPoints, ...) +Convenience method for computing joint influence, where constant influences are expanded to hold values per point. + +GetBlendShapeMapper() +Return the mapper for remapping blend shapes from the order of the bound SkelAnimation to the local blend shape order of this prim. + +GetBlendShapeOrder(blendShapes) +Get the blend shapes for this skinning site, if any. + +GetBlendShapeTargetsRel() + +GetBlendShapesAttr() + +GetGeomBindTransform(time) + +param time + +GetGeomBindTransformAttr() + +GetInterpolation() + +GetJointIndicesPrimvar() + +GetJointMapper() +Return a mapper for remapping from the joint order of the skeleton to the local joint order of this prim, if any. + +GetJointOrder(jointOrder) +Get the custom joint order for this skinning site, if any. + +GetJointWeightsPrimvar() + +GetMapper() +Deprecated + +GetNumInfluencesPerComponent() +Returns the number of influences encoded for each component. + +GetPrim() + +GetSkinningBlendWeightsPrimvar() + +GetSkinningMethodAttr() + +GetTimeSamples(times) +Populate times with the union of time samples for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). + +GetTimeSamplesInInterval(interval, times) +Populate times with the union of time samples within interval , for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). + +HasBlendShapes() +Returns true if there are blend shapes associated with this prim. + +HasJointInfluences() +Returns true if joint influence data is associated with this prim. + +IsRigidlyDeformed() +Returns true if the held prim has the same joint influences across all points, or false otherwise. + +ComputeExtentsPadding(skelRestXforms, boundable) → float +Helper for computing an approximate padding for use in extents +computations. +The padding is computed as the difference between the pivots of the +skelRestXforms skeleton space joint transforms at rest and the +extents of the skinned primitive. This is intended to provide a +suitable, constant metric for padding joint extents as computed by +UsdSkelComputeJointsExtent. + +Parameters + +skelRestXforms (VtArray[Matrix4]) – +boundable (Boundable) – + +ComputeJointInfluences(indices, weights, time) → bool +Convenience method for computing joint influences. +In addition to querying influences, this will also perform validation +of the basic form of the weight data although the array contents is +not validated. + +Parameters + +indices (IntArray) – +weights (FloatArray) – +time (TimeCode) – + +ComputeSkinnedPoints(xforms, points, time) → bool +Compute skinned points using linear blend skinning. +Both xforms and points are given in skeleton space, using +the joint order of the bound skeleton. Joint influences and the +(optional) binding transform are computed at time time (which will +typically be unvarying). +UsdSkelSkeletonQuery::ComputeSkinningTransforms + +Parameters + +xforms (VtArray[Matrix4]) – +points (Vec3fArray) – +time (TimeCode) – + +ComputeSkinnedTransform(xforms, xform, time) → bool +Compute a skinning transform using linear blend skinning. +The xforms are given in skeleton space, using the joint order of +the bound skeleton. Joint influences and the (optional) binding +transform are computed at time time (which will typically be +unvarying). If this skinning query holds non-constant joint +influences, no transform will be computed, and the function will +return false. +UsdSkelSkeletonQuery::ComputeSkinningTransforms + +Parameters + +xforms (VtArray[Matrix4]) – +xform (Matrix4) – +time (TimeCode) – + +ComputeVaryingJointInfluences(numPoints, indices, weights, time) → bool +Convenience method for computing joint influence, where constant +influences are expanded to hold values per point. +In addition to querying influences, this will also perform validation +of the basic form of the weight data although the array contents is +not validated. + +Parameters + +numPoints (int) – +indices (IntArray) – +weights (FloatArray) – +time (TimeCode) – + +GetBlendShapeMapper() → AnimMapper +Return the mapper for remapping blend shapes from the order of the +bound SkelAnimation to the local blend shape order of this prim. +Returns a null reference if the underlying prim has no blend shapes. +The mapper maps data from the order given by the blendShapes order +on the SkelAnimation to the order given by the skel:blendShapes +property, as set through the UsdSkelBindingAPI. + +GetBlendShapeOrder(blendShapes) → bool +Get the blend shapes for this skinning site, if any. + +Parameters +blendShapes (TokenArray) – + +GetBlendShapeTargetsRel() → Relationship + +GetBlendShapesAttr() → Attribute + +GetGeomBindTransform(time) → Matrix4d + +Parameters +time (TimeCode) – + +GetGeomBindTransformAttr() → Attribute + +GetInterpolation() → str + +GetJointIndicesPrimvar() → Primvar + +GetJointMapper() → AnimMapper +Return a mapper for remapping from the joint order of the skeleton to +the local joint order of this prim, if any. +Returns a null pointer if the prim has no custom joint orer. The +mapper maps data from the order given by the joints order on the +Skeleton to the order given by the skel:joints property, as +optionally set through the UsdSkelBindingAPI. + +GetJointOrder(jointOrder) → bool +Get the custom joint order for this skinning site, if any. + +Parameters +jointOrder (TokenArray) – + +GetJointWeightsPrimvar() → Primvar + +GetMapper() → AnimMapper +Deprecated +Use GetJointMapper. + +GetNumInfluencesPerComponent() → int +Returns the number of influences encoded for each component. +If the prim defines rigid joint influences, then this returns the +number of influences that map to every point. Otherwise, this provides +the number of influences per point. +IsRigidlyDeformed + +GetPrim() → Prim + +GetSkinningBlendWeightsPrimvar() → Primvar + +GetSkinningMethodAttr() → Attribute + +GetTimeSamples(times) → bool +Populate times with the union of time samples for all properties +that affect skinning, independent of joint transforms and any other +prim-specific properties (such as points). +UsdAttribute::GetTimeSamples + +Parameters +times (list[float]) – + +GetTimeSamplesInInterval(interval, times) → bool +Populate times with the union of time samples within interval +, for all properties that affect skinning, independent of joint +transforms and any other prim-specific properties (such as points). +UsdAttribute::GetTimeSamplesInInterval + +Parameters + +interval (Interval) – +times (list[float]) – + +HasBlendShapes() → bool +Returns true if there are blend shapes associated with this prim. + +HasJointInfluences() → bool +Returns true if joint influence data is associated with this prim. + +IsRigidlyDeformed() → bool +Returns true if the held prim has the same joint influences across all +points, or false otherwise. + +class pxr.UsdSkel.Tokens +Attributes: + +bindTransforms + +blendShapeWeights + +blendShapes + +classicLinear + +dualQuaternion + +jointNames + +joints + +normalOffsets + +offsets + +pointIndices + +primvarsSkelGeomBindTransform + +primvarsSkelJointIndices + +primvarsSkelJointWeights + +primvarsSkelSkinningBlendWeights + +restTransforms + +rotations + +scales + +skelAnimationSource + +skelBlendShapeTargets + +skelBlendShapes + +skelJoints + +skelSkeleton + +skelSkinningMethod + +translations + +weight + +weightedBlend + +bindTransforms = 'bindTransforms' + +blendShapeWeights = 'blendShapeWeights' + +blendShapes = 'blendShapes' + +classicLinear = 'ClassicLinear' + +dualQuaternion = 'DualQuaternion' + +jointNames = 'jointNames' + +joints = 'joints' + +normalOffsets = 'normalOffsets' + +offsets = 'offsets' + +pointIndices = 'pointIndices' + +primvarsSkelGeomBindTransform = 'primvars:skel:geomBindTransform' + +primvarsSkelJointIndices = 'primvars:skel:jointIndices' + +primvarsSkelJointWeights = 'primvars:skel:jointWeights' + +primvarsSkelSkinningBlendWeights = 'primvars:skel:skinningBlendWeights' + +restTransforms = 'restTransforms' + +rotations = 'rotations' + +scales = 'scales' + +skelAnimationSource = 'skel:animationSource' + +skelBlendShapeTargets = 'skel:blendShapeTargets' + +skelBlendShapes = 'skel:blendShapes' + +skelJoints = 'skel:joints' + +skelSkeleton = 'skel:skeleton' + +skelSkinningMethod = 'skel:skinningMethod' + +translations = 'translations' + +weight = 'weight' + +weightedBlend = 'WeightedBlend' + +class pxr.UsdSkel.Topology +Object holding information describing skeleton topology. This provides +the hierarchical information needed to reason about joint +relationships in a manner suitable to computations. +Methods: + +GetNumJoints() + +GetParent(index) +Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots). + +GetParentIndices() + +IsRoot(index) +Returns true if the index'th joint is a root joint. + +Validate(reason) +Validate the topology. + +GetNumJoints() → int + +GetParent(index) → int +Returns the parent joint of the index'th joint, Returns -1 for +joints with no parent (roots). + +Parameters +index (int) – + +GetParentIndices() → IntArray + +IsRoot(index) → bool +Returns true if the index'th joint is a root joint. + +Parameters +index (int) – + +Validate(reason) → bool +Validate the topology. +If validation is unsuccessful, a reason why will be written to +reason , if provided. + +Parameters +reason (str) – + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdUI.md b/UsdUI.md new file mode 100644 index 0000000000000000000000000000000000000000..f50aaf173747366272abf793b50d8198dd0eb81b --- /dev/null +++ b/UsdUI.md @@ -0,0 +1,622 @@ + + +UsdUI module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdUI module + +  + +# UsdUI module + +Summary: The UsdUI module provides schemas for encoding information on USD prims for client GUI tools to use in organizing/presenting prims in GUI layouts. + +Classes: + +Backdrop +Provides a'group-box'for the purpose of node graph organization. + +NodeGraphNodeAPI +This api helps storing information about nodes in node graphs. + +SceneGraphPrimAPI +Utility schema for display properties of a prim + +Tokens + +class pxr.UsdUI.Backdrop +Provides a’group-box’for the purpose of node graph organization. +Unlike containers, backdrops do not store the Shader nodes inside of +them. Backdrops are an organizational tool that allows Shader nodes to +be visually grouped together in a node-graph UI, but there is no +direct relationship between a Shader node and a Backdrop. +The guideline for a node-graph UI is that a Shader node is considered +part of a Backdrop when the Backdrop is the smallest Backdrop a Shader +node’s bounding-box fits inside. +Backdrop objects are contained inside a NodeGraph, similar to how +Shader objects are contained inside a NodeGraph. +Backdrops have no shading inputs or outputs that influence the +rendered results of a NodeGraph. Therefore they can be safely ignored +during import. +Like Shaders and NodeGraphs, Backdrops subscribe to the +NodeGraphNodeAPI to specify position and size. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdUITokens. So to set an attribute to the value”rightHanded”, use +UsdUITokens->rightHanded as the value. +Methods: + +CreateDescriptionAttr(defaultValue, ...) +See GetDescriptionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Backdrop + +Get +classmethod Get(stage, path) -> Backdrop + +GetDescriptionAttr() +The text label that is displayed on the backdrop in the node graph. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateDescriptionAttr(defaultValue, writeSparsely) → Attribute +See GetDescriptionAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Backdrop +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Backdrop +Return a UsdUIBackdrop holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdUIBackdrop(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDescriptionAttr() → Attribute +The text label that is displayed on the backdrop in the node graph. +This help-description explains what the nodes in a backdrop do. +Declaration +uniform token ui:description +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdUI.NodeGraphNodeAPI +This api helps storing information about nodes in node graphs. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdUITokens. So to set an attribute to the value”rightHanded”, use +UsdUITokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> NodeGraphNodeAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateDisplayColorAttr(defaultValue, ...) +See GetDisplayColorAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateExpansionStateAttr(defaultValue, ...) +See GetExpansionStateAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateIconAttr(defaultValue, writeSparsely) +See GetIconAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreatePosAttr(defaultValue, writeSparsely) +See GetPosAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateSizeAttr(defaultValue, writeSparsely) +See GetSizeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateStackingOrderAttr(defaultValue, ...) +See GetStackingOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> NodeGraphNodeAPI + +GetDisplayColorAttr() +This hint defines what tint the node should have in the node graph. + +GetExpansionStateAttr() +The current expansionState of the node in the ui. + +GetIconAttr() +This points to an image that should be displayed on the node. + +GetPosAttr() +Declared relative position to the parent in a node graph. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetSizeAttr() +Optional size hint for a node in a node graph. + +GetStackingOrderAttr() +This optional value is a useful hint when an application cares about the visibility of a node and whether each node overlaps another. + +static Apply() +classmethod Apply(prim) -> NodeGraphNodeAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”NodeGraphNodeAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdUINodeGraphNodeAPI object is returned upon success. An +invalid (or empty) UsdUINodeGraphNodeAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateDisplayColorAttr(defaultValue, writeSparsely) → Attribute +See GetDisplayColorAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateExpansionStateAttr(defaultValue, writeSparsely) → Attribute +See GetExpansionStateAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateIconAttr(defaultValue, writeSparsely) → Attribute +See GetIconAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreatePosAttr(defaultValue, writeSparsely) → Attribute +See GetPosAttr() , and also Create vs Get Property Methods for when to +use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateSizeAttr(defaultValue, writeSparsely) → Attribute +See GetSizeAttr() , and also Create vs Get Property Methods for when +to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateStackingOrderAttr(defaultValue, writeSparsely) → Attribute +See GetStackingOrderAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> NodeGraphNodeAPI +Return a UsdUINodeGraphNodeAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdUINodeGraphNodeAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDisplayColorAttr() → Attribute +This hint defines what tint the node should have in the node graph. +Declaration +uniform color3f ui:nodegraph:node:displayColor +C++ Type +GfVec3f +Usd Type +SdfValueTypeNames->Color3f +Variability +SdfVariabilityUniform + +GetExpansionStateAttr() → Attribute +The current expansionState of the node in the ui. +‘open’= fully expanded’closed’= fully collapsed’minimized’= should +take the least space possible +Declaration +uniform token ui:nodegraph:node:expansionState +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform +Allowed Values +open, closed, minimized + +GetIconAttr() → Attribute +This points to an image that should be displayed on the node. +It is intended to be useful for summary visual classification of +nodes, rather than a thumbnail preview of the computed result of the +node in some computational system. +Declaration +uniform asset ui:nodegraph:node:icon +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset +Variability +SdfVariabilityUniform + +GetPosAttr() → Attribute +Declared relative position to the parent in a node graph. +X is the horizontal position. Y is the vertical position. Higher +numbers correspond to lower positions (coordinates are Qt style, not +cartesian). +These positions are not explicitly meant in pixel space, but rather +assume that the size of a node is approximately 1.0x1.0. Where size-x +is the node width and size-y height of the node. Depending on graph UI +implementation, the size of a node may vary in each direction. +Example: If a node’s width is 300 and it is position is at 1000, we +store for x-position: 1000 * (1.0/300) +Declaration +uniform float2 ui:nodegraph:node:pos +C++ Type +GfVec2f +Usd Type +SdfValueTypeNames->Float2 +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetSizeAttr() → Attribute +Optional size hint for a node in a node graph. +X is the width. Y is the height. +This value is optional, because node size is often determined based on +the number of in- and outputs of a node. +Declaration +uniform float2 ui:nodegraph:node:size +C++ Type +GfVec2f +Usd Type +SdfValueTypeNames->Float2 +Variability +SdfVariabilityUniform + +GetStackingOrderAttr() → Attribute +This optional value is a useful hint when an application cares about +the visibility of a node and whether each node overlaps another. +Nodes with lower stacking order values are meant to be drawn below +higher ones. Negative values are meant as background. Positive values +are meant as foreground. Undefined values should be treated as 0. +There are no set limits in these values. +Declaration +uniform int ui:nodegraph:node:stackingOrder +C++ Type +int +Usd Type +SdfValueTypeNames->Int +Variability +SdfVariabilityUniform + +class pxr.UsdUI.SceneGraphPrimAPI +Utility schema for display properties of a prim +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdUITokens. So to set an attribute to the value”rightHanded”, use +UsdUITokens->rightHanded as the value. +Methods: + +Apply +classmethod Apply(prim) -> SceneGraphPrimAPI + +CanApply +classmethod CanApply(prim, whyNot) -> bool + +CreateDisplayGroupAttr(defaultValue, ...) +See GetDisplayGroupAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateDisplayNameAttr(defaultValue, ...) +See GetDisplayNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> SceneGraphPrimAPI + +GetDisplayGroupAttr() +When publishing a nodegraph or a material, it can be useful to provide an optional display group, for organizational purposes and readability. + +GetDisplayNameAttr() +When publishing a nodegraph or a material, it can be useful to provide an optional display name, for readability. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Apply() +classmethod Apply(prim) -> SceneGraphPrimAPI +Applies this single-apply API schema to the given prim . +This information is stored by adding”SceneGraphPrimAPI”to the token- +valued, listOp metadata apiSchemas on the prim. +A valid UsdUISceneGraphPrimAPI object is returned upon success. An +invalid (or empty) UsdUISceneGraphPrimAPI object is returned upon +failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters +prim (Prim) – + +static CanApply() +classmethod CanApply(prim, whyNot) -> bool +Returns true if this single-apply API schema can be applied to the +given prim . +If this schema can not be a applied to the prim, this returns false +and, if provided, populates whyNot with the reason it can not be +applied. +Note that if CanApply returns false, that does not necessarily imply +that calling Apply will fail. Callers are expected to call CanApply +before calling Apply if they want to ensure that it is valid to apply +a schema. +UsdPrim::GetAppliedSchemas() +UsdPrim::HasAPI() +UsdPrim::CanApplyAPI() +UsdPrim::ApplyAPI() +UsdPrim::RemoveAPI() + +Parameters + +prim (Prim) – +whyNot (str) – + +CreateDisplayGroupAttr(defaultValue, writeSparsely) → Attribute +See GetDisplayGroupAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateDisplayNameAttr(defaultValue, writeSparsely) → Attribute +See GetDisplayNameAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> SceneGraphPrimAPI +Return a UsdUISceneGraphPrimAPI holding the prim adhering to this +schema at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdUISceneGraphPrimAPI(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetDisplayGroupAttr() → Attribute +When publishing a nodegraph or a material, it can be useful to provide +an optional display group, for organizational purposes and +readability. +This is because often the usd shading hierarchy is rather flat while +we want to display it in organized groups. +Declaration +uniform token ui:displayGroup +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +GetDisplayNameAttr() → Attribute +When publishing a nodegraph or a material, it can be useful to provide +an optional display name, for readability. +Declaration +uniform token ui:displayName +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Variability +SdfVariabilityUniform + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdUI.Tokens +Attributes: + +closed + +minimized + +open + +uiDescription + +uiDisplayGroup + +uiDisplayName + +uiNodegraphNodeDisplayColor + +uiNodegraphNodeExpansionState + +uiNodegraphNodeIcon + +uiNodegraphNodePos + +uiNodegraphNodeSize + +uiNodegraphNodeStackingOrder + +closed = 'closed' + +minimized = 'minimized' + +open = 'open' + +uiDescription = 'ui:description' + +uiDisplayGroup = 'ui:displayGroup' + +uiDisplayName = 'ui:displayName' + +uiNodegraphNodeDisplayColor = 'ui:nodegraph:node:displayColor' + +uiNodegraphNodeExpansionState = 'ui:nodegraph:node:expansionState' + +uiNodegraphNodeIcon = 'ui:nodegraph:node:icon' + +uiNodegraphNodePos = 'ui:nodegraph:node:pos' + +uiNodegraphNodeSize = 'ui:nodegraph:node:size' + +uiNodegraphNodeStackingOrder = 'ui:nodegraph:node:stackingOrder' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdUtils.md b/UsdUtils.md new file mode 100644 index 0000000000000000000000000000000000000000..63a09b9e1ae4ee8ebf9604605957a6d087d10f4f --- /dev/null +++ b/UsdUtils.md @@ -0,0 +1,635 @@ + + +UsdUtils module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdUtils module + +  + +# UsdUtils module + +Summary: The UsdUtils module contains utility classes and functions for managing, inspecting, editing, and creating USD Assets. + +Classes: + +CoalescingDiagnosticDelegate +A class which collects warnings and statuses from the Tf diagnostic manager system in a thread safe manner. + +CoalescingDiagnosticDelegateItem +An item used in coalesced results, containing a shared component: the file/function/line number, and a set of unshared components: the call context and commentary. + +CoalescingDiagnosticDelegateSharedItem +The shared component in a coalesced result This type can be thought of as the key by which we coalesce our diagnostics. + +CoalescingDiagnosticDelegateUnsharedItem +The unshared component in a coalesced result. + +ConditionalAbortDiagnosticDelegate +A class that allows client application to instantiate a diagnostic delegate that can be used to abort operations for a non fatal USD error or warning based on immutable include exclude rules defined for this instance. + +ConditionalAbortDiagnosticDelegateErrorFilters +A class which represents the inclusion exclusion filters on which errors will be matched stringFilters: matching and filtering will be done on explicit string of the error/warning codePathFilters: matching and filtering will be done on errors/warnings coming from a specific usd code path. + +RegisteredVariantSet +Info for registered variant set + +SparseAttrValueWriter +A utility class for authoring time-varying attribute values with simple run-length encoding, by skipping any redundant time-samples. + +SparseValueWriter +Utility class that manages sparse authoring of a set of UsdAttributes. + +StageCache +The UsdUtilsStageCache class provides a simple interface for handling a singleton usd stage cache for use by all USD clients. + +TimeCodeRange +Represents a range of UsdTimeCode values as start and end time codes and a stride value. + +UsdStageStatsKeys + +class pxr.UsdUtils.CoalescingDiagnosticDelegate +A class which collects warnings and statuses from the Tf diagnostic +manager system in a thread safe manner. +This class allows clients to get both the unfiltered results, as well +as a compressed view which deduplicates diagnostic events by their +source line number, function and file from which they occurred. +Methods: + +DumpCoalescedDiagnosticsToStderr + +DumpCoalescedDiagnosticsToStdout + +DumpUncoalescedDiagnostics(ostr) +Print all pending diagnostics without any coalescing to ostr . + +TakeCoalescedDiagnostics() +Get all pending diagnostics in a coalesced form. + +TakeUncoalescedDiagnostics() +Get all pending diagnostics without any coalescing. + +DumpCoalescedDiagnosticsToStderr() + +DumpCoalescedDiagnosticsToStdout() + +DumpUncoalescedDiagnostics(ostr) → None +Print all pending diagnostics without any coalescing to ostr . +This method clears the pending diagnostics. + +Parameters +ostr (ostream) – + +TakeCoalescedDiagnostics() → list[UsdUtilsCoalescingDiagnosticDelegate] +Get all pending diagnostics in a coalesced form. +This method clears the pending diagnostics. + +TakeUncoalescedDiagnostics() → list[TfDiagnosticBase] +Get all pending diagnostics without any coalescing. +This method clears the pending diagnostics. + +class pxr.UsdUtils.CoalescingDiagnosticDelegateItem +An item used in coalesced results, containing a shared component: the +file/function/line number, and a set of unshared components: the call +context and commentary. +Attributes: + +sharedItem + +unsharedItems + +property sharedItem + +property unsharedItems + +class pxr.UsdUtils.CoalescingDiagnosticDelegateSharedItem +The shared component in a coalesced result This type can be thought of +as the key by which we coalesce our diagnostics. +Attributes: + +sourceFileName + +sourceFunction + +sourceLineNumber + +property sourceFileName + +property sourceFunction + +property sourceLineNumber + +class pxr.UsdUtils.CoalescingDiagnosticDelegateUnsharedItem +The unshared component in a coalesced result. +Attributes: + +commentary + +context + +property commentary + +property context + +class pxr.UsdUtils.ConditionalAbortDiagnosticDelegate +A class that allows client application to instantiate a diagnostic +delegate that can be used to abort operations for a non fatal USD +error or warning based on immutable include exclude rules defined for +this instance. +These rules are regex strings where case sensitive matching is done on +error/warning text or the location of the code path where the +error/warning occured. Note that these rules will be respected only +during the lifetime of the delegate. Include Rules determine what +errors or warnings will cause a fatal abort. Exclude Rules determine +what errors or warnings matched from the Include Rules should not +cause the fatal abort. Example: to abort on all errors and warnings +coming from”*pxr*”codepath but not +from”*ConditionalAbortDiagnosticDelegate*”, a client can create +the following delegate: +UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters includeFilters; +UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters excludeFilters; +includeFilters.SetCodePathFilters({"\*pxr\*"}); +excludeFilters.SetCodePathFilters({"\*ConditionalAbortDiagnosticDelegate\*"}); +UsdUtilsConditionalAbortDiagnosticDelegate delegate = + UsdUtilsConditionalAbortDiagnosticDelegate(includeFilters, + excludeFilters); + +class pxr.UsdUtils.ConditionalAbortDiagnosticDelegateErrorFilters +A class which represents the inclusion exclusion filters on which +errors will be matched stringFilters: matching and filtering will be +done on explicit string of the error/warning codePathFilters: matching +and filtering will be done on errors/warnings coming from a specific +usd code path. +Methods: + +GetCodePathFilters() + +GetStringFilters() + +SetCodePathFilters(codePathFilters) + +param codePathFilters + +SetStringFilters(stringFilters) + +param stringFilters + +GetCodePathFilters() → list[str] + +GetStringFilters() → list[str] + +SetCodePathFilters(codePathFilters) → None + +Parameters +codePathFilters (list[str]) – + +SetStringFilters(stringFilters) → None + +Parameters +stringFilters (list[str]) – + +class pxr.UsdUtils.RegisteredVariantSet +Info for registered variant set +Classes: + +SelectionExportPolicy +This specifies how the variantSet should be treated during export. + +Attributes: + +name + +selectionExportPolicy + +class SelectionExportPolicy +This specifies how the variantSet should be treated during export. +Note, in the plugInfo.json, the values for these enum’s are +lowerCamelCase. +Attributes: + +Always + +IfAuthored + +Never + +names + +values + +Always = pxr.UsdUtils.SelectionExportPolicy.Always + +IfAuthored = pxr.UsdUtils.SelectionExportPolicy.IfAuthored + +Never = pxr.UsdUtils.SelectionExportPolicy.Never + +names = {'Always': pxr.UsdUtils.SelectionExportPolicy.Always, 'IfAuthored': pxr.UsdUtils.SelectionExportPolicy.IfAuthored, 'Never': pxr.UsdUtils.SelectionExportPolicy.Never} + +values = {0: pxr.UsdUtils.SelectionExportPolicy.Never, 1: pxr.UsdUtils.SelectionExportPolicy.IfAuthored, 2: pxr.UsdUtils.SelectionExportPolicy.Always} + +property name + +property selectionExportPolicy + +class pxr.UsdUtils.SparseAttrValueWriter +A utility class for authoring time-varying attribute values with +simple run-length encoding, by skipping any redundant time-samples. +Time-samples that are close enough to each other, with relative +difference smaller than a fixed epsilon value are considered to be +equivalent. This is to avoid unnecessary authoring of time-samples +caused by numerical fuzz in certain computations. +For vectors, matrices, and other composite types (like quaternions and +arrays), each component is compared with the corresponding component +for closeness. The chosen epsilon value for double precision floating +point numbers is 1e-12. For single-precision, it is 1e-6 and for half- +precision, it is 1e-2. +Example c++ usage: +UsdGeomSphere sphere = UsdGeomSphere::Define(stage, SdfPath("/Sphere")); +UsdAttribute radius = sphere.CreateRadiusAttr(); +UsdUtilsSparseAttrValueWriter attrValueWriter(radius, + /\*defaultValue\*/ VtValue(1.0)); +attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(1.0)); +attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(2.0)); +attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(3.0)); +attrValueWriter.SetTimeSample(VtValue(20.0), UsdTimeCode(4.0)); + +Equivalent python example: +sphere = UsdGeom.Sphere.Define(stage, Sdf.Path("/Sphere")) +radius = sphere.CreateRadiusAttr() +attrValueWriter = UsdUtils.SparseAttrValueWriter(radius, defaultValue=1.0) +attrValueWriter.SetTimeSample(10.0, 1.0) +attrValueWriter.SetTimeSample(10.0, 2.0) +attrValueWriter.SetTimeSample(10.0, 3.0) +attrValueWriter.SetTimeSample(20.0, 4.0) + +In the above examples, the specified default value of radius (1.0) +will not be authored into scene description since it matches the +fallback value. Additionally, the time-sample authored at time=2.0 +will be skipped since it is redundant. Also note that for correct +behavior, the calls to SetTimeSample() must be made with sequentially +increasing time values. If not, a coding error is issued and the +authored animation may be incorrect. +Methods: + +SetTimeSample(value, time) +Sets a new time-sample on the attribute with given value at the given time . + +SetTimeSample(value, time) → bool +Sets a new time-sample on the attribute with given value at the +given time . +The time-sample is only authored if it’s different from the previously +set time-sample, in which case the previous time-sample is also +authored, in order to to end the previous run of contiguous identical +values and start a new run. +This incurs a copy of value . Also, the value will be held in +memory at least until the next time-sample is written or until the +SparseAttrValueWriter instance is destroyed. + +Parameters + +value (VtValue) – +time (TimeCode) – + +SetTimeSample(value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +For efficiency, this function swaps out the given value , leaving +it empty. +The value will be held in memory at least until the next time-sample +is written or until the SparseAttrValueWriter instance is destroyed. + +Parameters + +value (VtValue) – +time (TimeCode) – + +class pxr.UsdUtils.SparseValueWriter +Utility class that manages sparse authoring of a set of UsdAttributes. +It does this by maintaining a map of UsdAttributes to their +corresponding UsdUtilsSparseAttrValueWriter objects. +To use this class, simply instantiate an instance of it and invoke the +SetAttribute() method with various attributes and their associated +time-samples. +If the attribute has a default value, SetAttribute() must be called +with time=Default first (multiple times, if necessary), followed by +calls to author time-samples in sequentially increasing time order. +This class is not threadsafe. In general, authoring to a single USD +layer from multiple threads isn’t threadsafe. Hence, there is little +value in making this class threadsafe. Example c++ usage: +UsdGeomCylinder cylinder = UsdGeomCylinder::Define(stage, SdfPath("/Cylinder")); +UsdAttribute radius = cylinder.CreateRadiusAttr(); +UsdAttribute height = cylinder.CreateHeightAttr(); +UsdUtilsSparseValueWriter valueWriter; +valueWriter.SetAttribute(radius, 2.0, UsdTimeCode::Default()); +valueWriter.SetAttribute(height, 2.0, UsdTimeCode::Default()); + +valueWriter.SetAttribute(radius, 10.0, UsdTimeCode(1.0)); +valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(2.0)); +valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(3.0)); +valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(4.0)); + +valueWriter.SetAttribute(height, 2.0, UsdTimeCode(1.0)); +valueWriter.SetAttribute(height, 2.0, UsdTimeCode(2.0)); +valueWriter.SetAttribute(height, 3.0, UsdTimeCode(3.0)); +valueWriter.SetAttribute(height, 3.0, UsdTimeCode(4.0)); + +Equivalent python code: +cylinder = UsdGeom.Cylinder.Define(stage, Sdf.Path("/Cylinder")) +radius = cylinder.CreateRadiusAttr() +height = cylinder.CreateHeightAttr() +valueWriter = UsdUtils.SparseValueWriter() +valueWriter.SetAttribute(radius, 2.0, Usd.TimeCode.Default()) +valueWriter.SetAttribute(height, 2.0, Usd.TimeCode.Default()) + +valueWriter.SetAttribute(radius, 10.0, 1.0) +valueWriter.SetAttribute(radius, 20.0, 2.0) +valueWriter.SetAttribute(radius, 20.0, 3.0) +valueWriter.SetAttribute(radius, 20.0, 4.0) + +valueWriter.SetAttribute(height, 2.0, 1.0) +valueWriter.SetAttribute(height, 2.0, 2.0) +valueWriter.SetAttribute(height, 3.0, 3.0) +valueWriter.SetAttribute(height, 3.0, 4.0) + +In the above example, + +The default value of the”height”attribute is not authored into +scene description since it matches the fallback value. +Time-samples at time=3.0 and time=4.0 will be skipped for the +radius attribute. +For the”height”attribute, the first timesample at time=1.0 will +be skipped since it matches the default value. +The last time-sample at time=4.0 will also be skipped +for”height”since it matches the previously written value at time=3.0. + +Methods: + +GetSparseAttrValueWriters() +Returns a new vector of UsdUtilsSparseAttrValueWriter populated from the attrValueWriter map. + +SetAttribute(attr, value, time) +Sets the value of attr to value at time time . + +GetSparseAttrValueWriters() → list[SparseAttrValueWriter] +Returns a new vector of UsdUtilsSparseAttrValueWriter populated from +the attrValueWriter map. + +SetAttribute(attr, value, time) → bool +Sets the value of attr to value at time time . +The value is written sparsely, i.e., the default value is authored +only if it is different from the fallback value or the existing +default value, and any redundant time-samples are skipped when the +attribute value does not change significantly between consecutive +time-samples. + +Parameters + +attr (Attribute) – +value (VtValue) – +time (TimeCode) – + +SetAttribute(attr, value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. +For efficiency, this function swaps out the given value , leaving +it empty. +The value will be held in memory at least until the next time-sample +is written or until the SparseAttrValueWriter instance is destroyed. + +Parameters + +attr (Attribute) – +value (VtValue) – +time (TimeCode) – + +SetAttribute(attr, value, time) -> bool +This is an overloaded member function, provided for convenience. It +differs from the above function only in what argument(s) it accepts. + +Parameters + +attr (Attribute) – +value (T) – +time (TimeCode) – + +class pxr.UsdUtils.StageCache +The UsdUtilsStageCache class provides a simple interface for handling +a singleton usd stage cache for use by all USD clients. This way code +from any location can make use of the same cache to maximize stage +reuse. +Methods: + +Get +classmethod Get() -> StageCache + +GetSessionLayerForVariantSelections +classmethod GetSessionLayerForVariantSelections(modelName, variantSelections) -> Layer + +static Get() +classmethod Get() -> StageCache +Returns the singleton stage cache. + +static GetSessionLayerForVariantSelections() +classmethod GetSessionLayerForVariantSelections(modelName, variantSelections) -> Layer +Given variant selections as a vector of pairs (vector in case order +matters to the client), constructs a session layer with overs on the +given root modelName with the variant selections, or returns a cached +session layer with those opinions. + +Parameters + +modelName (str) – +variantSelections (list[tuple[str, str]]) – + +class pxr.UsdUtils.TimeCodeRange +Represents a range of UsdTimeCode values as start and end time codes +and a stride value. +A UsdUtilsTimeCodeRange can be iterated to retrieve all time code +values in the range. The range may be empty, it may contain a single +time code, or it may represent multiple time codes from start to end. +The interval defined by the start and end time codes is closed on both +ends. +Note that when constructing a UsdUtilsTimeCodeRange, +UsdTimeCode::EarliestTime() and UsdTimeCode::Default() cannot be used +as the start or end time codes. Also, the end time code cannot be less +than the start time code for positive stride values, and the end time +code cannot be greater than the start time code for negative stride +values. Finally, the stride value cannot be zero. If any of these +conditions are not satisfied, then an invalid empty range will be +returned. +Classes: + +Tokens + +Methods: + +CreateFromFrameSpec +classmethod CreateFromFrameSpec(frameSpec) -> TimeCodeRange + +IsValid() +Return true if this range contains one or more time codes, or false otherwise. + +empty() +Return true if this range contains no time codes, or false otherwise. + +Attributes: + +endTimeCode +TimeCode + +frameSpec + +startTimeCode +TimeCode + +stride +float + +class Tokens +Attributes: + +EmptyTimeCodeRange + +RangeSeparator + +StrideSeparator + +EmptyTimeCodeRange = 'NONE' + +RangeSeparator = ':' + +StrideSeparator = 'x' + +static CreateFromFrameSpec() +classmethod CreateFromFrameSpec(frameSpec) -> TimeCodeRange +Create a time code range from frameSpec . +A FrameSpec is a compact string representation of a time code range. A +FrameSpec may contain up to three floating point values for the start +time code, end time code, and stride values of a time code range. +A FrameSpec containing just a single floating point value represents a +time code range containing only that time code. +A FrameSpec containing two floating point values separated by the +range separator (‘:’) represents a time code range from the first +value as the start time code to the second values as the end time +code. +A FrameSpec that specifies both a start and end time code value may +also optionally specify a third floating point value as the stride, +separating it from the first two values using the stride separator +(‘x’). +The following are examples of valid FrameSpecs: 123 101:105 105:101 +101:109x2 101:110x2 101:104x0.5 +An empty string corresponds to an invalid empty time code range. +A coding error will be issued if the given string is malformed. + +Parameters +frameSpec (str) – + +IsValid() → bool +Return true if this range contains one or more time codes, or false +otherwise. + +empty() → bool +Return true if this range contains no time codes, or false otherwise. + +property endTimeCode +TimeCode +Return the end time code of this range. + +Type +type + +property frameSpec + +property startTimeCode +TimeCode +Return the start time code of this range. + +Type +type + +property stride +float +Return the stride value of this range. + +Type +type + +class pxr.UsdUtils.UsdStageStatsKeys +Attributes: + +activePrimCount + +approxMemoryInMb + +assetCount + +inactivePrimCount + +instanceCount + +instancedModelCount + +modelCount + +primCounts + +primCountsByType + +primary + +prototypeCount + +prototypes + +pureOverCount + +totalInstanceCount + +totalPrimCount + +untyped + +usedLayerCount + +activePrimCount = 'activePrimCount' + +approxMemoryInMb = 'approxMemoryInMb' + +assetCount = 'assetCount' + +inactivePrimCount = 'inactivePrimCount' + +instanceCount = 'instanceCount' + +instancedModelCount = 'instancedModelCount' + +modelCount = 'modelCount' + +primCounts = 'primCounts' + +primCountsByType = 'primCountsByType' + +primary = 'primary' + +prototypeCount = 'prototypeCount' + +prototypes = 'prototypes' + +pureOverCount = 'pureOverCount' + +totalInstanceCount = 'totalInstanceCount' + +totalPrimCount = 'totalPrimCount' + +untyped = 'untyped' + +usedLayerCount = 'usedLayerCount' + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/UsdVol.md b/UsdVol.md new file mode 100644 index 0000000000000000000000000000000000000000..0f14b6137adf4b392402b0f2b55080b991b4c2bd --- /dev/null +++ b/UsdVol.md @@ -0,0 +1,831 @@ + + +UsdVol module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +UsdVol module + +  + +# UsdVol module + +Summary: The UsdVol module provides schemas for representing volumes (smoke, fire, etc). + +Classes: + +Field3DAsset +Field3D field primitive. + +FieldAsset +Base class for field primitives defined by an external file. + +FieldBase +Base class for field primitives. + +OpenVDBAsset +OpenVDB field primitive. + +Tokens + +Volume +A renderable volume primitive. + +class pxr.UsdVol.Field3DAsset +Field3D field primitive. The FieldAsset filePath attribute must +specify a file in the Field3D format on disk. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdVolTokens. So to set an attribute to the value”rightHanded”, use +UsdVolTokens->rightHanded as the value. +Methods: + +CreateFieldDataTypeAttr(defaultValue, ...) +See GetFieldDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFieldPurposeAttr(defaultValue, ...) +See GetFieldPurposeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> Field3DAsset + +Get +classmethod Get(stage, path) -> Field3DAsset + +GetFieldDataTypeAttr() +Token which is used to indicate the data type of an individual field. + +GetFieldPurposeAttr() +Optional token which can be used to indicate the purpose or grouping of an individual field. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateFieldDataTypeAttr(defaultValue, writeSparsely) → Attribute +See GetFieldDataTypeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFieldPurposeAttr(defaultValue, writeSparsely) → Attribute +See GetFieldPurposeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> Field3DAsset +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Field3DAsset +Return a UsdVolField3DAsset holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdVolField3DAsset(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFieldDataTypeAttr() → Attribute +Token which is used to indicate the data type of an individual field. +Authors use this to tell consumers more about the field without +opening the file on disk. The list of allowed tokens reflects the +available choices for Field3d volumes. +Declaration +token fieldDataType +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +half, float, double, half3, float3, double3 + +GetFieldPurposeAttr() → Attribute +Optional token which can be used to indicate the purpose or grouping +of an individual field. +Clients which consume Field3D files should treat this as the Field3D +field name. +Declaration +token fieldPurpose +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdVol.FieldAsset +Base class for field primitives defined by an external file. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdVolTokens. So to set an attribute to the value”rightHanded”, use +UsdVolTokens->rightHanded as the value. +Methods: + +CreateFieldDataTypeAttr(defaultValue, ...) +See GetFieldDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFieldIndexAttr(defaultValue, writeSparsely) +See GetFieldIndexAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFieldNameAttr(defaultValue, writeSparsely) +See GetFieldNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFilePathAttr(defaultValue, writeSparsely) +See GetFilePathAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateVectorDataRoleHintAttr(defaultValue, ...) +See GetVectorDataRoleHintAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Get +classmethod Get(stage, path) -> FieldAsset + +GetFieldDataTypeAttr() +Token which is used to indicate the data type of an individual field. + +GetFieldIndexAttr() +A file can contain multiple fields with the same name. + +GetFieldNameAttr() +Name of an individual field within the file specified by the filePath attribute. + +GetFilePathAttr() +An asset path attribute that points to a file on disk. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +GetVectorDataRoleHintAttr() +Optional token which is used to indicate the role of a vector valued field. + +CreateFieldDataTypeAttr(defaultValue, writeSparsely) → Attribute +See GetFieldDataTypeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFieldIndexAttr(defaultValue, writeSparsely) → Attribute +See GetFieldIndexAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFieldNameAttr(defaultValue, writeSparsely) → Attribute +See GetFieldNameAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFilePathAttr(defaultValue, writeSparsely) → Attribute +See GetFilePathAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateVectorDataRoleHintAttr(defaultValue, writeSparsely) → Attribute +See GetVectorDataRoleHintAttr() , and also Create vs Get Property +Methods for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Get() +classmethod Get(stage, path) -> FieldAsset +Return a UsdVolFieldAsset holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdVolFieldAsset(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFieldDataTypeAttr() → Attribute +Token which is used to indicate the data type of an individual field. +Authors use this to tell consumers more about the field without +opening the file on disk. The list of allowed tokens is specified with +the specific asset type. A missing value is considered an error. +Declaration +token fieldDataType +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetFieldIndexAttr() → Attribute +A file can contain multiple fields with the same name. +This optional attribute is an index used to disambiguate between these +multiple fields with the same name. +Declaration +int fieldIndex +C++ Type +int +Usd Type +SdfValueTypeNames->Int + +GetFieldNameAttr() → Attribute +Name of an individual field within the file specified by the filePath +attribute. +Declaration +token fieldName +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token + +GetFilePathAttr() → Attribute +An asset path attribute that points to a file on disk. +For each supported file format, a separate FieldAsset subclass is +required. +This attribute’s value can be animated over time, as most volume asset +formats represent just a single timeSample of a volume. However, it +does not, at this time, support any pattern substitutions like”$F”. +Declaration +asset filePath +C++ Type +SdfAssetPath +Usd Type +SdfValueTypeNames->Asset + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +GetVectorDataRoleHintAttr() → Attribute +Optional token which is used to indicate the role of a vector valued +field. +This can drive the data type in which fields are made available in a +renderer or whether the vector values are to be transformed. +Declaration +token vectorDataRoleHint ="None" +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +None, Point, Normal, Vector, Color + +class pxr.UsdVol.FieldBase +Base class for field primitives. +Methods: + +Get +classmethod Get(stage, path) -> FieldBase + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +static Get() +classmethod Get(stage, path) -> FieldBase +Return a UsdVolFieldBase holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdVolFieldBase(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdVol.OpenVDBAsset +OpenVDB field primitive. The FieldAsset filePath attribute must +specify a file in the OpenVDB format on disk. +For any described attribute Fallback Value or Allowed Values +below that are text/tokens, the actual token is published and defined +in UsdVolTokens. So to set an attribute to the value”rightHanded”, use +UsdVolTokens->rightHanded as the value. +Methods: + +CreateFieldClassAttr(defaultValue, writeSparsely) +See GetFieldClassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +CreateFieldDataTypeAttr(defaultValue, ...) +See GetFieldDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. + +Define +classmethod Define(stage, path) -> OpenVDBAsset + +Get +classmethod Get(stage, path) -> OpenVDBAsset + +GetFieldClassAttr() +Optional token which can be used to indicate the class of an individual grid. + +GetFieldDataTypeAttr() +Token which is used to indicate the data type of an individual field. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +CreateFieldClassAttr(defaultValue, writeSparsely) → Attribute +See GetFieldClassAttr() , and also Create vs Get Property Methods for +when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +CreateFieldDataTypeAttr(defaultValue, writeSparsely) → Attribute +See GetFieldDataTypeAttr() , and also Create vs Get Property Methods +for when to use Get vs Create. +If specified, author defaultValue as the attribute’s default, +sparsely (when it makes sense to do so) if writeSparsely is +true - the default for writeSparsely is false . + +Parameters + +defaultValue (VtValue) – +writeSparsely (bool) – + +static Define() +classmethod Define(stage, path) -> OpenVDBAsset +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> OpenVDBAsset +Return a UsdVolOpenVDBAsset holding the prim adhering to this schema +at path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdVolOpenVDBAsset(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFieldClassAttr() → Attribute +Optional token which can be used to indicate the class of an +individual grid. +This is a mapping to openvdb::GridClass where the values are +GRID_LEVEL_SET, GRID_FOG_VOLUME, GRID_STAGGERED, and GRID_UNKNOWN. +Declaration +token fieldClass +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +levelSet, fogVolume, staggered, unknown + +GetFieldDataTypeAttr() → Attribute +Token which is used to indicate the data type of an individual field. +Authors use this to tell consumers more about the field without +opening the file on disk. The list of allowed tokens reflects the +available choices for OpenVDB volumes. +Declaration +token fieldDataType +C++ Type +TfToken +Usd Type +SdfValueTypeNames->Token +Allowed Values +half, float, double, int, uint, int64, half2, float2, double2, int2, +half3, float3, double3, int3, matrix3d, matrix4d, quatd, bool, mask, +string + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +class pxr.UsdVol.Tokens +Attributes: + +bool_ + +color + +double2 + +double3 + +double_ + +field + +fieldClass + +fieldDataType + +fieldIndex + +fieldName + +fieldPurpose + +filePath + +float2 + +float3 + +float_ + +fogVolume + +half + +half2 + +half3 + +int2 + +int3 + +int64 + +int_ + +levelSet + +mask + +matrix3d + +matrix4d + +none_ + +normal + +point + +quatd + +staggered + +string + +uint + +unknown + +vector + +vectorDataRoleHint + +bool_ = 'bool' + +color = 'Color' + +double2 = 'double2' + +double3 = 'double3' + +double_ = 'double' + +field = 'field' + +fieldClass = 'fieldClass' + +fieldDataType = 'fieldDataType' + +fieldIndex = 'fieldIndex' + +fieldName = 'fieldName' + +fieldPurpose = 'fieldPurpose' + +filePath = 'filePath' + +float2 = 'float2' + +float3 = 'float3' + +float_ = 'float' + +fogVolume = 'fogVolume' + +half = 'half' + +half2 = 'half2' + +half3 = 'half3' + +int2 = 'int2' + +int3 = 'int3' + +int64 = 'int64' + +int_ = 'int' + +levelSet = 'levelSet' + +mask = 'mask' + +matrix3d = 'matrix3d' + +matrix4d = 'matrix4d' + +none_ = 'None' + +normal = 'Normal' + +point = 'Point' + +quatd = 'quatd' + +staggered = 'staggered' + +string = 'string' + +uint = 'uint' + +unknown = 'unknown' + +vector = 'Vector' + +vectorDataRoleHint = 'vectorDataRoleHint' + +class pxr.UsdVol.Volume +A renderable volume primitive. A volume is made up of any number of +FieldBase primitives bound together in this volume. Each FieldBase +primitive is specified as a relationship with a namespace prefix +of”field”. +The relationship name is used by the renderer to associate individual +fields with the named input parameters on the volume shader. Using +this indirect approach to connecting fields to shader parameters +(rather than using the field prim’s name) allows a single field to be +reused for different shader inputs, or to be used as different shader +parameters when rendering different Volumes. This means that the name +of the field prim is not relevant to its contribution to the volume +prims which refer to it. Nor does the field prim’s location in the +scene graph have any relevance, and Volumes may refer to fields +anywhere in the scene graph. However, unless Field prims need to +be shared by multiple Volumes, a Volume’s Field prims should be +located under the Volume in namespace, for enhanced organization. +Methods: + +BlockFieldRelationship(name) +Blocks an existing field relationship on this volume, ensuring it will not be enumerated by GetFieldPaths() . + +CreateFieldRelationship(name, fieldPath) +Creates a relationship on this volume that targets the specified field. + +Define +classmethod Define(stage, path) -> Volume + +Get +classmethod Get(stage, path) -> Volume + +GetFieldPath(name) +Checks if there is an existing field relationship with a given name, and if so, returns the path to the Field prim it targets, or else the empty path. + +GetFieldPaths() +Return a map of field relationship names to the fields themselves, represented as prim paths. + +GetSchemaAttributeNames +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] + +HasFieldRelationship(name) +Checks if there is an existing field relationship with a given name. + +BlockFieldRelationship(name) → bool +Blocks an existing field relationship on this volume, ensuring it will +not be enumerated by GetFieldPaths() . +Returns true if the relationship existed, false if it did not. In +other words the return value indicates whether the volume prim was +changed. +The name lookup automatically applies the field relationship +namespacing, if it isn’t specified in the name token. + +Parameters +name (str) – + +CreateFieldRelationship(name, fieldPath) → bool +Creates a relationship on this volume that targets the specified +field. +If an existing relationship exists with the same name, it is replaced +(since only one target is allowed for each named relationship). +Returns true if the relationship was successfully created and set +- it is legal to call this method for a field relationship that +already”exists”, i.e. already posesses scene description, as this is +the only method we provide for setting a field relatioonship’s value, +to help enforce that field relationships can have only a single (or +no) target. +fieldPath +- can be a prim path, or the path of another relationship, to effect +Relationship Forwarding The name lookup automatically applies the +field relationship namespacing, if it isn’t specified in the name +token. + +Parameters + +name (str) – +fieldPath (Path) – + +static Define() +classmethod Define(stage, path) -> Volume +Attempt to ensure a UsdPrim adhering to this schema at path is +defined (according to UsdPrim::IsDefined() ) on this stage. +If a prim adhering to this schema at path is already defined on +this stage, return that prim. Otherwise author an SdfPrimSpec with +specifier == SdfSpecifierDef and this schema’s prim type name for +the prim at path at the current EditTarget. Author SdfPrimSpec s +with specifier == SdfSpecifierDef and empty typeName at the +current EditTarget for any nonexistent, or existing but not Defined +ancestors. +The given path must be an absolute prim path that does not contain +any variant selections. +If it is impossible to author any of the necessary PrimSpecs, (for +example, in case path cannot map to the current UsdEditTarget ‘s +namespace) issue an error and return an invalid UsdPrim. +Note that this method may return a defined prim whose typeName does +not specify this schema class, in case a stronger typeName opinion +overrides the opinion at the current EditTarget. + +Parameters + +stage (Stage) – +path (Path) – + +static Get() +classmethod Get(stage, path) -> Volume +Return a UsdVolVolume holding the prim adhering to this schema at +path on stage . +If no prim exists at path on stage , or if the prim at that +path does not adhere to this schema, return an invalid schema object. +This is shorthand for the following: +UsdVolVolume(stage->GetPrimAtPath(path)); + +Parameters + +stage (Stage) – +path (Path) – + +GetFieldPath(name) → Path +Checks if there is an existing field relationship with a given name, +and if so, returns the path to the Field prim it targets, or else the +empty path. +The name lookup automatically applies the field relationship +namespacing, if it isn’t specified in the name token. + +Parameters +name (str) – + +GetFieldPaths() → FieldMap +Return a map of field relationship names to the fields themselves, +represented as prim paths. +This map provides all the information that should be needed to tie +fields to shader parameters and render this volume. +The field relationship names that server as the map keys will have the +field namespace stripped from them. + +static GetSchemaAttributeNames() +classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] +Return a vector of names of all pre-declared attributes for this +schema class and all its ancestor classes. +Does not include attributes that may be authored by custom/extended +methods of the schemas involved. + +Parameters +includeInherited (bool) – + +HasFieldRelationship(name) → bool +Checks if there is an existing field relationship with a given name. +This query will return true even for a field relationship that has +been blocked and therefore will not contribute to the map returned by +GetFieldRelationships() +The name lookup automatically applies the field relationship +namespacing, if it isn’t specified in the name token. + +Parameters +name (str) – + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Vt.md b/Vt.md new file mode 100644 index 0000000000000000000000000000000000000000..16f569f067cfad81b8ca6dd7db33eb0a45303de7 --- /dev/null +++ b/Vt.md @@ -0,0 +1,696 @@ + + +Vt module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Vt module + +  + +# Vt module + +Summary: The Vt (Value Types) module defines classes that provide for type abstraction, enhanced array types, and value type manipulation. + +Vt Value Types library +This package defines classes for creating objects that behave like value +types. It contains facilities for creating simple copy-on-write +implicitly shared types. +Classes: + +BoolArray +An array of type bool. + +CharArray +An array of type char. + +DoubleArray +An array of type double. + +DualQuatdArray +An array of type GfDualQuatd. + +DualQuatfArray +An array of type GfDualQuatf. + +DualQuathArray +An array of type GfDualQuath. + +FloatArray +An array of type float. + +HalfArray +An array of type pxr_half::half. + +Int64Array +An array of type __int64. + +IntArray +An array of type int. + +IntervalArray +An array of type GfInterval. + +Matrix2dArray +An array of type GfMatrix2d. + +Matrix2fArray +An array of type GfMatrix2f. + +Matrix3dArray +An array of type GfMatrix3d. + +Matrix3fArray +An array of type GfMatrix3f. + +Matrix4dArray +An array of type GfMatrix4d. + +Matrix4fArray +An array of type GfMatrix4f. + +QuatdArray +An array of type GfQuatd. + +QuaternionArray +An array of type GfQuaternion. + +QuatfArray +An array of type GfQuatf. + +QuathArray +An array of type GfQuath. + +Range1dArray +An array of type GfRange1d. + +Range1fArray +An array of type GfRange1f. + +Range2dArray +An array of type GfRange2d. + +Range2fArray +An array of type GfRange2f. + +Range3dArray +An array of type GfRange3d. + +Range3fArray +An array of type GfRange3f. + +Rect2iArray +An array of type GfRect2i. + +ShortArray +An array of type short. + +StringArray +An array of type string. + +TokenArray +An array of type TfToken. + +UCharArray +An array of type unsigned char. + +UInt64Array +An array of type unsigned __int64. + +UIntArray +An array of type unsigned int. + +UShortArray +An array of type unsigned short. + +Vec2dArray +An array of type GfVec2d. + +Vec2fArray +An array of type GfVec2f. + +Vec2hArray +An array of type GfVec2h. + +Vec2iArray +An array of type GfVec2i. + +Vec3dArray +An array of type GfVec3d. + +Vec3fArray +An array of type GfVec3f. + +Vec3hArray +An array of type GfVec3h. + +Vec3iArray +An array of type GfVec3i. + +Vec4dArray +An array of type GfVec4d. + +Vec4fArray +An array of type GfVec4f. + +Vec4hArray +An array of type GfVec4h. + +Vec4iArray +An array of type GfVec4i. + +class pxr.Vt.BoolArray +An array of type bool. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.CharArray +An array of type char. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.DoubleArray +An array of type double. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.DualQuatdArray +An array of type GfDualQuatd. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.DualQuatfArray +An array of type GfDualQuatf. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.DualQuathArray +An array of type GfDualQuath. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.FloatArray +An array of type float. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.HalfArray +An array of type pxr_half::half. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Int64Array +An array of type __int64. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.IntArray +An array of type int. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.IntervalArray +An array of type GfInterval. + +class pxr.Vt.Matrix2dArray +An array of type GfMatrix2d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Matrix2fArray +An array of type GfMatrix2f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Matrix3dArray +An array of type GfMatrix3d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Matrix3fArray +An array of type GfMatrix3f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Matrix4dArray +An array of type GfMatrix4d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Matrix4fArray +An array of type GfMatrix4f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.QuatdArray +An array of type GfQuatd. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.QuaternionArray +An array of type GfQuaternion. + +class pxr.Vt.QuatfArray +An array of type GfQuatf. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.QuathArray +An array of type GfQuath. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Range1dArray +An array of type GfRange1d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Range1fArray +An array of type GfRange1f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Range2dArray +An array of type GfRange2d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Range2fArray +An array of type GfRange2f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Range3dArray +An array of type GfRange3d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Range3fArray +An array of type GfRange3f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Rect2iArray +An array of type GfRect2i. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.ShortArray +An array of type short. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.StringArray +An array of type string. + +class pxr.Vt.TokenArray +An array of type TfToken. + +class pxr.Vt.UCharArray +An array of type unsigned char. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.UInt64Array +An array of type unsigned __int64. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.UIntArray +An array of type unsigned int. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.UShortArray +An array of type unsigned short. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec2dArray +An array of type GfVec2d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec2fArray +An array of type GfVec2f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec2hArray +An array of type GfVec2h. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec2iArray +An array of type GfVec2i. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec3dArray +An array of type GfVec3d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec3fArray +An array of type GfVec3f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec3hArray +An array of type GfVec3h. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec3iArray +An array of type GfVec3i. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec4dArray +An array of type GfVec4d. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec4fArray +An array of type GfVec4f. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec4hArray +An array of type GfVec4h. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +class pxr.Vt.Vec4iArray +An array of type GfVec4i. +Methods: + +FromBuffer + +FromNumpy + +static FromBuffer() + +static FromNumpy() + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/Work.md b/Work.md new file mode 100644 index 0000000000000000000000000000000000000000..f81703222257480de17e9fe3bb80174b23e130af --- /dev/null +++ b/Work.md @@ -0,0 +1,49 @@ + + +Work module — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules » +Work module + +  + +# Work module + +Summary: The Work library is intended to simplify the use of multithreading in the context of our software ecosystem. + +Work +Allows for configuration of the system’s multithreading subsystem. +Functions: + +GetConcurrencyLimit + +GetPhysicalConcurrencyLimit + +HasConcurrency + +SetConcurrencyLimit + +SetConcurrencyLimitArgument + +SetMaximumConcurrencyLimit + +pxr.Work.GetConcurrencyLimit() + +pxr.Work.GetPhysicalConcurrencyLimit() + +pxr.Work.HasConcurrency() + +pxr.Work.SetConcurrencyLimit() + +pxr.Work.SetConcurrencyLimitArgument() + +pxr.Work.SetMaximumConcurrencyLimit() + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/build.md b/build.md new file mode 100644 index 0000000000000000000000000000000000000000..f88917a3630d2567a738c5c51f6dbe1a9b927b25 --- /dev/null +++ b/build.md @@ -0,0 +1,46 @@ + + +Build a Project — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Build a Project + +  + +# Build a Project + +Depending on the nature of your project, a ‘build step’ may be required as development progresses. Omniverse supports this step with a variety of scripts and tools that generate a representation of the final product, enabling subsequent testing, debugging, and packaging. + +## Build-less Projects + +Python-only extensions do not require a build step. +Your project might simply be an Extension within another Application, consisting of purely Python code. If that’s the case, you can bypass the build step for the time being. However, if the complexity of your project increases or you decide to create a tailored Application around your extension, introducing a build step into your development process might become necessary. + +## “Repo Build” + +Find more information about Repo Tools in the Repo Tools documentation. + +The Repo Tool is your most likely method for building a Project. This tool operates on both Linux and Windows platforms, providing functionalities ranging from creating new extensions from a template to packaging your final build for distribution. +For access to the current list of available tools via Repo, you can use the following command in a terminal: +repo -h + +By Default, you can execute a build which compiles a release target by entering: +repo build + +Other options include: + +-r [default] will build only the release pipeline. +-d will build only the debug pipeline. +-x will delete all build files in the _build folder. + +After executing a repo build, a _build folder is generated, containing targets that you’ve selected to build. +Within this directory, you will find a script file which loads the .kit file that you created for your Project. Alternatively, if you created an Extension, a script file should be present to load the Application you added your Extension to. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/cli.md b/cli.md new file mode 100644 index 0000000000000000000000000000000000000000..6739c06b0873c99bd0983b9c090e4e64dbec7d95 --- /dev/null +++ b/cli.md @@ -0,0 +1,231 @@ + + +Omni Asset Validator (CLI) — asset-validator 0.6.2 documentation + +asset-validator + + » +Omni Asset Validator (CLI) + +  + +# Omni Asset Validator (CLI) + +## Command Line Interface + +Utility for USD validation to ensure layers run smoothly across all Omniverse +products. Validation is based on the USD ComplianceChecker (i.e. the same +backend as the usdchecker commandline tool), and has been extended with +additional rules as follows: + +Additional “Basic” rules applicable in the broader USD ecosystem. +Omniverse centric rules that ensure layer files work well with all +Omniverse applications & connectors. +Configurable end-user rules that can be specific to individual company +and/or team workflows. + +Note this level of configuration requires manipulating PYTHONPATH prior to launching this tool. + +### Syntax + +Use the following syntax to run asset validator: +usage: omni_asset_validator [-h] [-d 0|1] [-c CATEGORY] [-r RULE] [-e] [-f] [-p PREDICATE] [URI] + +### Positional arguments + +#### URI + +A single Omniverse Asset. +> Note: This can be a file URI or folder/container URI. (default: None) + +### Options + +#### -h, –help + +show this help message and exit + +#### -d 0| 1, –defaultRules 0|1 + +Flag to use the default-enabled validation rules. Opt-out of this behavior to gain finer control over +the rules using the –categories and –rules flags. The default configuration includes: + +ByteAlignmentChecker +CompressionChecker +MissingReferenceChecker +StageMetadataChecker +TextureChecker +PrimEncapsulationChecker +NormalMapTextureChecker +KindChecker +ExtentsChecker +TypeChecker +OmniInvalidCharacterChecker +OmniDefaultPrimChecker +OmniOrphanedPrimChecker +OmniMaterialPathChecker +UsdAsciiPerformanceChecker +UsdLuxSchemaChecker +UsdGeomSubsetChecker +UsdMaterialBindingApi +UsdDanglingMaterialBinding + +(default: 1) + +#### -c CATEGORY, –category CATEGORY + +Categories to enable, regardless of the –defaultRules flag. +Valid categories are: + +Basic +ARKit +Omni:NamingConventions +Omni:Layout +Omni:Material +Usd:Performance +Usd:Schema + +(default: []) + +#### -r RULE, –rule RULE + +Rules to enable, regardless of the –defaultRules flag. Valid rules include: + +ByteAlignmentChecker +CompressionChecker +MissingReferenceChecker +StageMetadataChecker +TextureChecker +PrimEncapsulationChecker +NormalMapTextureChecker +KindChecker +ExtentsChecker +TypeChecker +ARKitLayerChecker +ARKitPrimTypeChecker +ARKitShaderChecker +ARKitMaterialBindingChecker +ARKitFileExtensionChecker +ARKitPackageEncapsulationChecker +ARKitRootLayerChecker +OmniInvalidCharacterChecker +OmniDefaultPrimChecker +OmniOrphanedPrimChecker +OmniMaterialPathChecker +UsdAsciiPerformanceChecker +UsdLuxSchemaChecker +UsdGeomSubsetChecker +UsdMaterialBindingApi +UsdDanglingMaterialBinding + +(default: []) + +#### -e, –explain + +Rather than running the validator, provide descriptions for each configured rule. +(default: False) + +#### -f, –fix + +If this is selected, apply fixes. + +#### -p PREDICATE, –predicate PREDICATE + +Report issues and fix issues that match this predicate. Currently: +IsFailure +IsWarning +IsError +HasRootLayer + +See Asset Validator for more details. + +## Command Line Interface using USD Composer + +### Getting USD Composer installation path + +Open Omniverse Launcher. On Library / USD Composer, beside the Launch button click the burger menu to view the settings. +On Settings we can see the path of USD Composer installation. + +Add it as environment variable. +In Windows: +set INSTALL_DIR=#See above +set KIT_PATH=%INSTALL_DIR%\kit + +In Linux: +export INSTALL_DIR=#See above +export KIT_PATH=${INSTALL_DIR}\kit + +### Getting Asset Validation Core path + +Open the Extension manager in USD Composer. In Windows / Extensions, select omni.asset_validator.core extension. +On the extension information click on the path icon. + +Add it as environment variable. +In Windows: +set VALIDATION_PATH=#See above + +In Linux: +export VALIDATION_PATH=#See above + +### Examples + +#### Calling the help command + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py --help" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py --help" + +#### Validating a file + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py %VALIDATION_PATH%\scripts\test\asset.usda" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py ${VALIDATION_PATH}\scripts\test\asset.usda" + +#### Validating a folder, recursively + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py %VALIDATION_PATH%\scripts\test\" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py ${VALIDATION_PATH}\scripts\test\" + +#### Apply fixes on file + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py --fix %VALIDATION_PATH%\scripts\test\asset.usda" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py --fix ${VALIDATION_PATH}\scripts\test\asset.usda" + +#### Apply fixes on a folder, specific category + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py --fix --category Usd:Schema %VALIDATION_PATH%\scripts\test\" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py --fix --category Usd:Schema ${VALIDATION_PATH}\scripts\test\" + +#### Apply fixes on a folder, multiple categories + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py --fix --category Usd:Schema --category Basic %VALIDATION_PATH%\scripts\test\" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py --fix --category Usd:Schema --category Basic ${VALIDATION_PATH}\scripts\test\" + +#### Apply predicates, single file + +Windows: +%KIT_PATH% --enable omni.asset_validator.core --exec "%VALIDATION_PATH%\scripts\omni_asset_validator.py --predicate HasRootLayer %VALIDATION_PATH%\scripts\test\asset.usda" + +Linux: +${KIT_PATH} --enable omni.asset_validator.core --exec "${VALIDATION_PATH}\scripts\omni_asset_validator.py --predicate HasRootLayer ${VALIDATION_PATH}\scripts\test\asset.usda" + +© Copyright 2021-2023, NVIDIA. + Last updated on Jun 20, 2023. + + + diff --git a/configuring.md b/configuring.md new file mode 100644 index 0000000000000000000000000000000000000000..adb933c30ac4af7f124480325ca122b647f526da --- /dev/null +++ b/configuring.md @@ -0,0 +1,362 @@ + + +Configuration — kit-manual 105.1 documentation + +kit-manual + + » +Configuration + +  + +# Configuration + +Kit comes with a very rich and flexible configuration system based on Carbonite settings. Settings is a runtime representation of typical configuration formats (like json, toml, xml), and is basically a nested dictionary of values. + +## Quick Start + +When you run a kit executable, it doesn’t load any kit app file: +> kit.exe +That will start kit and exit, without enabling any extensions or applying any configuration, except for the built-in config: kit-core.json. + +Note +To see all flags call > kit.exe -h + +To see default kit settings pass --/app/printConfig=true: +> kit.exe --/app/printConfig=true +That will print all settings. This syntax --/ is used to apply settings from the command line. Any setting can be modified in this way. You may notice that the config it printed includes app/printConfig. You can try adding your own settings to the command line and observing them in the printed config to prove yourself that it works as expected. +Another useful flag to learn early is -v to enable info logging or -vv to enable verbose logging. There are settings to control logging more precisely, but this is an easy way to get more logging in console and debug startup routine. +> kit.exe -v +To make kit do something let’s enable some extensions: +> kit.exe --enable omni.kit.window.script_editor +That enables a script editor extension. You may also notice that it enabled a few extensions that it depends on. You can stack multiple --enable keywords to enable more extensions. +You can also add more folders to search in more for extensions with --ext-folder: +> kit.exe --enable omni.kit.window.script_editor --ext-folder ./exts --enable foo.bar +That enables you to create e.g exts/foo.bar/extension.toml and start hacking on your own extension right away. +Those flags, like --enable, --ext-folder and many others are just shorthand for commonly-used settings. For example, they just append to /app/exts/enabled and /app/exts/folders arrays respectively. + +## Application Config + +Settings can also be applied by passing a configuration file as a positional argument to Kit: +> kit.exe my.toml +This kind of config file becomes the “Application config”. It receives special treatment from Kit: + +The config name becomes application name. +Separate data, documents and cache folders are created for applications. +The Folder where this config exists located becomes the application path. + +This allows you to build separate applications with their own data and behavior. + +## Kit File + +A Kit file is the recommended way to configure applications. +> kit.exe my.kit +Kit files are single-file extensions (basically renamed extension.toml files). Only the [settings] part of them is applied to settings (as with any extension). Here is an example: +[package] +title = "My Script Editor App" +version = "0.1.0" +keywords = ["app"] + +[dependencies] +"omni.kit.window.script_editor" = {} + +[settings] +foo.bar = "123" + +exts."omni.kit.window.script_editor".windowOpenByDefault = true + +As with any extension, it can be named, versioned and even published to the registry. It defines dependencies in the same format to pull in additional extensions. +Notice that the setting windowOpenByDefault of the script editor extension is being overridden. Any extension can define its own settings and a guideline is to put them in the extension.toml file of the extension. Check the extension.toml file for omni.kit.window.script_editor. Another guideline is to use the root exts namespace and the name of extension next. +The goal of the .kit file is to bridge the gap between settings and extensions and have one file that the user can click to run Kit-based application (e.g. if .kit file extensions are associated with kit.exe in the OS). + +## System Configs + +You can create system wide configuration files to override any setting. There are few places to put them: + +${shared_documents}/user.toml - To override settings of any kit application in the shared documents folder, typically in (on Windows): C:\Users\[username]\Documents\Kit\shared\user.toml +${app_documents}/user.toml - To override settings of particular application in the application documents folder, typically in: C:\Users\[username]\Documents\Kit\apps\[app_name]\user.toml +\<0 or more levels above>\deps\user.toml - To override settings of any kit application locally, near the application .kit file. Only in portable mode. +\<0 or more levels above>\deps\[app_name]\user.toml - To override settings of particular application locally, near the application .kit file. Only in portable mode. +${shared_program_data}/kit.config.toml - To override settings of any kit application in the shared program data, typically in (on Windows): %PROGRAMDATA%/NVIDIA Corporation/Kit/kit.config.toml +${app_program_data}/kit.config.toml - To override settings of particular application in the application program data, typically in (on Windows): %PROGRAMDATA%/NVIDIA Corporation/Kit/[app name]/kit.config.toml + +To find the path of these folders on your system, you can run Kit with info logging enabled and look for Applied configs: and Non-existent configs: messages at the beginning. Also, Look for Tokens: list in the log. For more info: Tokens. + +## Special Keys + +### Appending Arrays + +When configs are merged, one value can override another. Sometimes we want to append values for arrays instead of override. For this, use the special ++ key. For example, to add additional extension folders to the /app/folders setting, you can write: +[app.exts] +folders."++" = ["c:/temp"] + +You can put that for instance in user.toml described above to add more extension folder search paths. + +### Importing Other Configs + +You can use the @import@ key to import other config files in that location: +[foo] +"@import@": ["./some.toml"], + +That will import the config some.toml under the key foo. The ./ syntax implies a relative path, and that the config file is in the same folder. + +## Portable Mode + +A regular kit-based app installation sets and uses system wide data, cache, logs folders. It also reads the global Omniverse config in a known system-specific location. To know which folders are being used, you can look at tokens, like ${data}, ${cache}, ${logs}. They can be found at the beginning of each log file. +Kit based apps can also run in a portable mode, using a specified folder as a root for all of those folders. Useful for developers. Local builds by default run in portable mode. There are a few different ways to run kit in portable mode: + +### Cmd Args + +Pass --portable to run kit in portable mode and optionally pass --portable-root [path] to specify the location of the portable root. + +### Portable Configs (Markers) + +Kit looks for the following configs that force it to run in portable mode. It reads the content of a file if it finds one, and treats it as a path. If a path is relative - it is relative to this config folder. The priority of search is: + +App portable config, e.g. foo.portable near foo.kit when run with: kit.exe foo.kit +Kit portable config near experience, e.g. kit.portable near foo.kit when run with: kit.exe foo.kit +Kit portable config near kit.exe, e.g. kit.portable near kit.exe + +## Changing Settings With Command Line + +Any setting can be changed via command line using --/ prefix: +> kit.exe --/[path/to/setting]=[value] +Path to setting is separated by / and prefixed by --/. +For example, if the required option is ignoreUnsavedOnExit as shown in the printed JSON configuration: +: +{ + "app": { + "hangDetector": { + "enabled": false, + "timeout": 120 + }, + "file": { + "ignoreUnsavedOnExit": false, + ... + }, + ... + }, + ... +} + +To change the value of ignoreUnsavedOnExit to true, you need to add --/app/file/ignoreUnsavedOnExit=true to the command line: +> kit.exe --/app/file/ignoreUnsavedOnExit=true +To specify a boolean value, true and false strings must be used. + +Note + +The values are case-insensitive and using --/some/path/to/parameter=false or --/some/path/to/parameter=FaLsE produces the same result +If you need to set the string value "true" or "false" escape it with double quotes: --/some/path/to/text_parameter=\"false\" +It is also possible to use --/some/path/to/parameter=0 or --/some/path/to/parameter=1 to set a setting to true or false correspondingly. In this case the actual value in the settings will be an integer, but functions working with settings will correctly convert it to a boolean. + +Setting a numeric or string value is straightforward: +> kit.exe --/some/number=7 --/another/number=1.5 --/some/string=test +If you need to set a string value that can be parsed as a number or a boolean - or if the string value contains whitespaces - use double quotes to escape it: +> kit.exe --/sets/string/value=\"7\" --/sets/string/with/whitespaces=\"string with spaces\" + +Note +Do not forget to escape the quotes so that the OS doesn’t remove them. + +### Changing an array value with command line + +To set an array value you can: + +Specify individual array elements by adding their index in the array at the end of the path to the value: + +for example, > kit.exe --/some/array/1=17 will change +... +"some": { + "array" : [1, 2, 3], +}, +... + +into +... +"some": { + "array" : [1, 17, 3], +}, +... + +Specify all array elements in the form [value0,value1,...]: + +for example, > kit.exe --/some/array=[8,11] replaces +... +"some": { + "array" : [1, 2, 3], +}, +... + +with +... +"some": { + "array" : [8, 11], +}, +... + +Note +You can use whitespace in the square brackets ([val0,  val1, val2]), if you escape the whole expression with double quotes, in order to prevent the OS from separating it into several command line arguments: +> kit.exe --/some/array="[ 8,  11]" + +It is also possible to assign a proper JSON as a parameter value: +> kit.exe --/my/json/param={\"num\":1,\"str\":\"test\",\"arr\":[1,2,3],\"obj\":{\"info\":42}} results in +... +"my": { + "json" : { + "param" : { + "num": 1, + "str": "test", + "arr": [ + 1, + 2, + 3 + ], + "obj": { + "info": 42 + } + } + } +}, +... + +## Passing Command Line arguments to extensions + +Kit ignores all command line arguments after --. It also writes those into the /app/cmdLineUnprocessedArgs setting. Extensions can use this setting to access them and process as they wish. + +## Code Examples + +### Get Setting + +# Settings/Get Setting +import carb.settings + +settings = carb.settings.get_settings() + +# get a string +print(settings.get("/log/file")) + +# get an array (tuple) +print(settings.get("/app/exts/folders")) + +# get an array element syntax: +print(settings.get("/app/exts/folders/0")) + +# get a whole dictionary +exts = settings.get("/app/exts") +print(exts) +print(exts["folders"]) + +# get `None` if doesn't exist +print(settings.get("/app/DOES_NOT_EXIST_1111")) + +### Set Setting + +# Settings/Set Setting +import carb.settings + +settings = carb.settings.get_settings() + +# set different types into different keys +# guideline: each extension puts settings in /ext/[ext name]/ and lists them extension.toml for discoverability +settings.set("/exts/your.ext.name/test/value_int", 23) +settings.set("/exts/your.ext.name/test/value_float", 502.45) +settings.set("/exts/your.ext.name/test/value_bool", False) +settings.set("/exts/your.ext.name/test/value_str", "summer") +settings.set("/exts/your.ext.name/test/value_array", [9,13,17,21]) +settings.set("/exts/your.ext.name/test/value_dict", { "a": 2, "b": "winter"}) + +# print all: +print(settings.get("/exts/your.ext.name/test")) + +### Set Persistent Setting + +# Settings/Set Persistent Setting +import carb.settings + +settings = carb.settings.get_settings() + +# all settings stored under "/persistent" saved between sessions +# run that snippet again after restarting an app to see that value is still there: +key = "/persistent/exts/your.ext.name/test/value" +print("{}: {}".format(key, settings.get(key))) +settings.set(key, "string from previous session") + +# Below is a setting with location of a file where persistent settings are stored. +# To reset settings: delete it or run kit with `--reset-user` +print("persistent settings are stored in: {}".format(settings.get("/app/userConfigPath"))) + +### Subscribe To Setting Changes + +# Settings/Subscribe To Setting Changes +import carb.settings +import omni.kit.app + +settings = carb.settings.get_settings() + +def on_change(value, change_type: carb.settings.ChangeEventType): + print(value, change_type) + +# subscribe to value changes, returned object is subscription holder. To unsubscribe - destroy it. +subscription1 = omni.kit.app.SettingChangeSubscription("/exts/your.ext.name/test/test/value", on_change) + +settings.set("/exts/your.ext.name/test/test/value", 23) +settings.set("/exts/your.ext.name/test/test/value", "fall") +settings.set("/exts/your.ext.name/test/test/value", None) +settings.set("/exts/your.ext.name/test/test/value", 89) +subscription1 = None # no more notifications +settings.set("/exts/your.ext.name/test/test/value", 100) + +## Kit Kernel Settings + +### /app/enableStdoutOutput (default: true) + +Enable kernel standard output. E.g. when extension starts etc. + +### /app/disableCmdArgs (default: false) + +Disable processing of any command line arguments. + +### /app/printConfig (default: false) + +Print all settings on startup. + +### /app/settings/persistent (default: true) + +Enable saving persistent settings (user.config.json). It autosaves changed persistent settings (/persistent namespace) each frame. + +### /app/settings/loadUserConfig (default: true) + +Enable loading persistent settings (user.config.json) on startup. + +### /app/hangDetector/enabled (default: false) + +Enable hang detector. + +### /app/hangDetector/alwaysEnabled (default: false) + +It true ignore /app/hangDetector/disableReasons settings and keep hang detector always enabled. Normally it is disabled during startup and extensions can choose to disable it. + +### /app/hangDetector/timeout (default: 120) + +Hang detector timeout to trigger (in seconds). + +### /app/quitAfter (default: -1) + +Automatically quit app after X frames (if X is positive). + +### /app/quitAfterMs (default: -1.0) + +Automatically quit app after X milliseconds (if X is positive). + +### /app/fastShutdown (default: false) + +Do not perform full extension shutdown flow. Instead only let subscribers handle IApp shutdown event and terminate. + +### /app/python/logSysStdOutput (default: true) + +Intercept and log all python standard output in carb logger (info level). + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/content_install.md b/content_install.md new file mode 100644 index 0000000000000000000000000000000000000000..69c6147e13963b3ae23100e7f358fd77da934834 --- /dev/null +++ b/content_install.md @@ -0,0 +1,499 @@ + + +3D Content Pack Installation — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +3D Content Pack Installation + +  + +# 3D Content Pack Installation + +For our Omniverse customers who need to run in a firewalled environment, here is how to configure the sample 3D content that comes with the Omniverse foundation applications. As there is currently a total of roughly 260GB of USD samples, materials and environments available, this document should help you identify the types of content packs that you need to provide to your internal Omniverse users to help them with their workflows. + +## 3D Content Pack Download Process + +There are five steps for IT managers to follow to download and configure individual Omniverse content packs for firewalled environments and users. +1) Identify: The first step is to select which 3D content packs are required by your users. Given that users will often ask for content based on where it lives within certain Omniverse foundation app Browsers (e.g. “can I get all of the Base Materials in the Materials tab?”) this documentation organizes the downloadable packs by which Omniverse Browser they normally reside or which Omniverse Extension they relate to. +See the following section on the various Omniverse browsers and extensions that include content. +2) Download: Once you’ve determined which content packs to download, the next step is to go to the Omniverse Enterprise Web Portal, and to click on the Content section to find all of the available archive files. When you find the pack that matches, click Download, and choose whether you’re downloading for a Windows or Linux workstation. The download will begin automatically for that pack. Given that many content packs are GBs in size, this process can take some time to complete. + +Note +Certain Omniverse foundation applications contain the same browsers, but the content available within them may be slightly different or reduced. Wherever possible, we have indicated which content packs in each browser are included with those apps. + +3) Unpack: After each content pack is downloaded, you need to unzip it. We’ve tried to make the unpacking process as simple as possible by configuring each zip archive so that it mirrors the same folder structure that exists on our AWS server so that all you have to do is create a top-level folder where you want ALL of your content to live, and then unpack the archives “as-is” into that root location. Doing so will create an exact copy of the NVIDIA folder structure normally available within every Nucleus install. +By default, that top-level structure includes five (5) main folders (Assets / Demos / Environments / Materials / Samples): + +Each of the downloadable content packs is set up to reflect these top-level folders which should make organization of the assets themselves efficient and straightforward. +For example, if you download the Base Materials pack, when you open the zip archive, you’ll see this: + +By default, the content itself lives inside of the sub-folder and is called package.zip. If you decompress the entire archive, you’ll end up with a sub-folder and when you open the package.zip file within it, you’ll see this: + +At the root is a /Materials folder, which matches the online AWS configuration, and within it are the various sub-folders and files that make up the Base Materials MDL library. By unpacking the archive with the folder structure intact, you’ll ensure that your library matches the one that exists online. + +Note +There are two additional files in each archive: + +A PACKAGE-INFO.yaml file - this describes the package contents. +A PACKAGE-LICENSES folder with a text document pointing users to the Omniverse Terms of Use. + +Neither of these is required for your users to access the content packs, and can be safely stored elsewhere or deleted upon the completion of unpacking each archive. + +4) Deploy: In order to make the content visible within Omniverse for your users, you have a choice on how to deploy the content. + +Option 1: Copy all of the content to a local hard disk drive location +Option 2: Copy all of the content to a shared Nucleus server behind your firewall + +Both options are straightforward as you simply need to transfer the entire content folder structure that you set up in Step 3 to a local physical hard drive location or you can use Nucleus Navigator to copy that content folder to a shared internal Nucleus Server that is accessible to your internal users. +5) Update firewalled TOML files: In order for a user to see the local files instead of trying to “dial-out” to get content via AWS, you need to add a set of known redirect paths to point those requests to your local hard disk or internal Enterprise Nucleus server. To do this, you must define the new content path root aliases within the omniverse.toml file stored in ~/.nvidia-omniverse/config (Linux) or \%USERPROFILE%\.nvidia-omniverse\config (Windows) for each user on the network. +If you have opted to place the content on a local hard disk drive location, add the following section in its entirety to the omniverse.toml file and replace the variable with the folder you chose in step 5 to store all of the content packs. +[aliases] +"http://omniverse-content-production.s3.us-west-2.amazonaws.com" = "" +"https://omniverse-content-production.s3.us-west-2.amazonaws.com" = "" +"http://omniverse-content-production.s3-us-west-2.amazonaws.com" = "" +"https://omniverse-content-production.s3-us-west-2.amazonaws.com" = "" +"https://twinbru.s3.eu-west-1.amazonaws.com/omniverse" = "" + +As an example, if you have copied all of your content to the C:\Temp\NVIDIA_Assets folder on the local machine, the paths would look like this: +[aliases] +"http://omniverse-content-production.s3.us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" +"https://omniverse-content-production.s3.us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" +"http://omniverse-content-production.s3-us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" +"https://omniverse-content-production.s3-us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" +"https://twinbru.s3.eu-west-1.amazonaws.com/omniverse" = "C:\\Temp\\NVIDIA_Assets" + +Note +The need for double-backslashes (\\) in the path name if you’re on Windows. + +If you have opted to place the content on a shared Nucleus location, in the following section replace the with the actual name of your server (i.e. is replaced with localhost). +[aliases] +"http://omniverse-content-production.s3.us-west-2.amazonaws.com" = "omniverse:///" +"https://omniverse-content-production.s3.us-west-2.amazonaws.com" = "omniverse:///" +"http://omniverse-content-production.s3-us-west-2.amazonaws.com" = "omniverse:///" +"https://omniverse-content-production.s3-us-west-2.amazonaws.com" = "omniverse:///" +"https://twinbru.s3.eu-west-1.amazonaws.com/omniverse" = "omniverse:///" + +Once this process is complete, when a user launches their copy of an Omniverse foundation app, they should have direct access to the various content packs directly without the application trying to connect to the Internet. + +## What 3D Content Packs Do I Need? + +As mentioned earlier, users will likely want access to content that lives in various Omniverse Foundation App Browsers. Most of the content is provided visually this way and as such, we’ve provided convenient links to each of the browsers so you can see what content lives within them and download what your users need. +It’s important to note that many of the browsers contain sample content that is contained within multiple zip archives. For instance, while the Showcases Browser only lists a single zip file as being needed to display all of the content within it, others like the NVIDIA Assets Browser will indicate that 5 separate zip downloads are needed to provide all of the various 3D assets within it. +Here is a list of the various Browsers that accompany the Omniverse foundation applications: + +Core Content (Strongly Recommended all users grab this) +NVIDIA Assets +Environments +Materials +Showcases +SimReady Explorer +Examples +Physics Demo Scenes + +Additionally, some content shows up with specific Omniverse extensions, and if your users ask for any of these content packs by the extension they support, you can find them here: + +AnimGraph +Rendering +Particles +ActionGraph +Warp +Flow + +Some Omniverse foundation applications also include unique content packs as well. You can find them here: + +Audio2Face +IsaacSim + +## Core Omniverse App Content + +When many Omniverse foundation applications start (USD Composer, USD Explorer, Code), it loads a set of default scene templates including the textured ground plane and lighting that comes up automatically. This pack should always be downloaded. It is very small but will help prevent errors in the console when an Omniverse application first starts in an firewalled environment. + +This content pack includes all of the templates and is essential for firewalled environments. + +Launcher Pack Name: Default Scene Templates Pack +Included in Omniverse Apps: USD Composer / USD Explorer / Code / USD Presenter +Pack: Scene_Templates_NVD@10010.zip +Pack Size: 24MB +Contents: All of the scene templates that can be accessed from the File->New from Stage Template menu in Omniverse +Default Nucleus Location: NVIDIA/Assets/Scenes/Templates + +## Browsers Content + +There are several different browsers where you can access and utilize content provided by NVIDIA. Some of these are visible by default (depending on which foundation Omniverse application you are running), while others are accessible via different menus inside of the applications. +For each browser, here is a list of the content packs required. + +### NVIDIA Assets Browser + +There are 5 individual content pack downloads that encompass all of the visible content available within this browser + +Launcher Pack Name: Commercial 3D Models Pack +Included in Omniverse Apps: USD Composer / USD Explorer / Code +Pack: Commercial_NVD@10013.zip +Pack Size: 5.8GB +Contents: Commercial furniture and entourage content +Default Nucleus Location: NVIDIA/Assets/ArchVis/Commercial + +Note +In order for the Commercial content within this pack to operate correctly, it needs to have the Materials / Base Materials Pack (Base_Materials_NVD@10012.zip) from the Materials Browser installed for the materials. + +Launcher Pack Name: Industrial 3D Models Pack +Included in Omniverse Apps: USD Composer / USD Explorer / Code +Pack: Industrial_NVD@10012.zip +Pack Size: 1.8GB +Contents: Industrials boxes/shelving and entourage content +Default Nucleus Location: NVIDIA/Assets/ArchVis/Industrial + +Launcher Pack Name: Residential 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Residential_NVD@10012.zip +Pack Size: 22.5GB +Contents: Residential furniture and entourage content +Default Nucleus Location: NVIDIA/Assets/ArchVis/Residential + +Launcher Pack Name: Vegetation 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Vegetation_NVD@10012.zip +Pack Size: 2.7GB +Contents: Selection of plants and tree content +Default Nucleus Location: NVIDIA/Assets/Vegetation + +Launcher Pack Name: Warehouse 3D Models Pack +Included in Omniverse Apps: USD Composer / USD Explorer / Code +Pack: Warehouse_NVD@10012.zip +Pack Size: 18GB +Contents: Digital Twin warehouse elements content +Default Nucleus Location: NVIDIA/Assets/DigitalTwin/Assets/Warehouse + +### Showcases Browser + +Note +In order for the content within this pack to operate correctly, it needs to have the Examples Browser / Sample Scenes Pack from the Examples Browser installed for the materials. + +Launcher Pack Name: Showcase Scenes 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Showcases_Content_NVD@10010.zip +Pack Size: 2.3GB +Contents: Full warehouse and Ragnarok vehicle content +Default Nucleus Location: NVIDIA/Samples/Showcases + +### Materials Browser + +There are 3 individual content pack downloads that encompass all of the visible content available through this browser and it is recommended that you download and install both the Base Materials and vMaterials 2 packs as they are often used within other sample content. + +Launcher Pack Name: Base Materials Pack +Included in Omniverse Apps: USD Composer / USD Explorer / Code +Pack: Base_Materials_NVD@10012.zip +Pack Size: 8.2GB +Contents: Base materials library +Default Nucleus Location: NVIDIA/Materials/2023_1/Base + +Launcher Pack Name: VMaterials 2 Pack +Included in Omniverse Apps: USD Composer / Code +Pack: vMaterials_2_2_1_NVD@20022.zip +Pack Size: 5.5GB +Contents: vMaterials 2 library (v. 2.2.1 is the current release) +Default Nucleus Location: NVIDIA/Materials/2023_1/vMaterials_2 + +Launcher Pack Name: Automotive Materials Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Automotive_Materials_NVD@10010.zip +Pack Size: 21GB +Contents: Automotive materials library +Default Nucleus Location: NVIDIA/Materials/2023_1/Automotive + +### Environments Browser + +There are two content pack downloads that encompass all of the +content available through this browser. + +Launcher Pack Name: Environments Skies Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Environments_NVD@10012.zip +Pack Size: 8.9GB +Contents: HDRI skydomes and Dynamic sky environments +Default Nucleus Location: NVIDIA/Environments/2023_1/DomeLights + +Launcher Pack Name: Environment Templates Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Environments_Templates_NVD@10010.zip +Pack Size: 16.0GB +Contents: Templates that have been designed to assist with automotive presentations +Default Nucleus Location: NVIDIA/Environments/2023_1/Templates + +### SimReady Explorer + +There are 5 individual content pack downloads that encompass all of the +content available through this browser. + +Note +There is some redundancy in files between packs that are +shared across the entire library, but if you are only interested in a +small subset of the content, you will still get all of the supporting +materials and configuration files in any one downloaded content pack. + +Launcher Pack Name: SimReady Warehouse 01 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: SimReady_Warehouse_01_NVD@10010.zip +Pack Size: 13.9GB +Contents: Warehouse elements (foot stools, ramps, shelving, pallets) +Default Nucleus Location: NVIDIA/Assets/simready_content + +Launcher Pack Name: SimReady Warehouse 02 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: SimReady_Warehouse_02_NVD@10010.zip +Pack Size: 20.5GB +Contents: Warehouse elements (pallets, racks, ramps) +Default Nucleus Location: NVIDIA/Assets/simready_content + +Launcher Pack Name: SimReady Furniture & Misc 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: SimReady_Furniture_Misc_NVD@10010.zip +Pack Size: 9.4GB +Contents: Assorted furniture and entourage elements (cones, chairs, sofas, utensils) +Default Nucleus Location: NVIDIA/Assets/simready_content + +Launcher Pack Name: SimReady Containers & Shipping 01 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: SimReady_Containers_Shipping_01_NVD@10010.zip +Pack Size: 21.4GB +Contents: Industrial elements (bins, boxes, cases, drums, buckets) +Default Nucleus Location: NVIDIA/Assets/simready_content + +Launcher Pack Name: SimReady Containers & Shipping 01 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: SimReady_Containers_Shipping_02_NVD@10010.zip +Pack Size: 20.6GB +Contents: Industrial elements (crates, jugs, IBC tank, bottles, etc.) +Default Nucleus Location: NVIDIA/Assets/simready_content + +### Examples Browser + +There are 5 individual content pack downloads that encompass all of the +content available through this browser. + +Launcher Pack Name: AnimGraph Sample 3D Model Pack +Included in Omniverse Apps: USD Composer +Pack: AnimGraph_NVD@10010.zip +Pack Size: 1.6GB +Contents: This pack includes all of the character animation samples +Default Nucleus Location: NVIDIA/Assets/AnimGraph + +Launcher Pack Name: Automotive Configurator 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Configurator_Content_NVD@10010.zip +Pack Size: 2.0GB +Contents: This pack contains content for building automotive configurators +Default Nucleus Location: NVIDIA/Assets/Configurator + +Launcher Pack Name: Sample Scenes 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Sample_Scenes_NVD@10010.zip +Pack Size: 26.0GB +Contents: High fidelity rendering scenes including the Astronaut, Marbles and the Old Attic datasets +Default Nucleus Location: NVIDIA/Samples/Examples/2023_1/Rendering + +Note +The Sample_Scenes pack is also needed if you’ve downloaded the Showcases content pack to work as expected. + +Launcher Pack Name: Particle Systems 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Particles_NVD@10010.zip +Pack Size: 159MB +Contents: This pack includes all of the particle systems sample files +Default Nucleus Location: NVIDIA/Assets/Particles + +Launcher Pack Name: Extensions Samples 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Extensions_Samples_NVD@10010.zip +Pack Size: 900MB +Contents: Contains sample data for Flow, Paint, Warp and ActionGraph extensions +Default Nucleus Location: NVIDIA/Assets/Extensions/Samples + +### Physics Demo Scenes Browser + +This browser is opened from the Window -> Simulation -> Demo Scenes +menu option. + +Launcher Pack Name: Physics Demo Scenes 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Physics_Scenes_NVD@10010.zip +Pack Size: 5.5GB +Contents: All of the current Physics sample scene files that can be loaded from the Demo Scenes tab +Default Nucleus Location: Not in a public Nucleus folder + +## Extensions Content + +Extension content is mostly covered within the various Browsers inside +of the foundation Omniverse applications. But if you’re interested in a +specific extension and the content that showcases it, here’s a list of +which downloadable pack contains that content. + +### AnimGraph Samples + +AnimGraph: Available within the Examples Browser under the Animation header + +Launcher Pack Name: AnimGraph Sample 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: AnimGraph_NVD@10010.zip +Pack Size: 1.6GB +Contents: Character and motion sample data for use with AnimGraph +Default Nucleus Location: NVIDIA/Assets/AnimGraph + +### Rendering Samples + +Rendering: Available within the Examples Browser under the Rendering header + +Launcher Pack Name: Sample Scenes 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Sample_Scenes_NVD@10010.zip +Pack Size: 26.0GB +Contents: High fidelity rendering scenes including the Astronaut, Marbles and the Old Attic datasets +Default Nucleus Location: NVIDIA/Samples/Examples/2023_1/Rendering + +### Particle Systems Presets + +Particle Systems: Available within the Examples Browser under the Simulation header + +Launcher Pack Name: Particle Systems 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Particles_NVD@10010.zip +Pack Size: 159MB +Contents: Particles systems presets +Default Nucleus Location: NVIDIA/Samples/Examples/2023_1/Visual Scripting + +Note +The Ocean sample files are installed locally with the omni.ocean extension and can be found in the following Omniverse install location (USD Composer: +- /Omniverse/Library/prod-create-2023.1.1/extscache/omni.ocean-0.4.1/data | + +Any installed Omniverse foundation application that includes the +omni.ocean extension will include these files, so you can replace the +library app path (e.g. prod-create-2023.1.1) to find those that are +installed on your machine. + +### ActionGraph Samples + +ActionGraph: Available within the Examples Browser under the Visual Scripting header + +Launcher Pack Name: Sample Scenes 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Sample_Scenes_NVD@10010.zip +Pack Size: 26.0GB +Contents: Tutorial samples for OmniGraph +Default Nucleus Location: NVIDIA/Samples/Examples/2023_01/Visual Scripting + +### Warp Samples + +Warp: Available within the Examples Browser under the Warp header + +Launcher Pack Name: Extensions Samples 3D Models Pack +Included in Omniverse Apps: USD Composer / Code +Pack: Extensions_Samples_NVD@10010.zip +Pack Size: 878MB +Contents: Tutorial samples for the Warp extension +Default Nucleus Location: NVIDIA/Samples/Examples/Warp + +Note +Some of the sample files are installed locally with the omni.warp extension and can be found in the following Omniverse install location (USD Composer: +- /Omniverse/Library/extscache/omni.warp-0.8.2/data/scenes + +Any installed Omniverse foundation application that includes the +omni.warp extension will include these files, so you can replace the +library app path (e.g. prod-create-2023.1.1) to find those that are +installed on your machine. + +### Flow Presets + +Flow: Accessed through the Window -> Simulation -> Flow Presets menu + +Launcher Pack Name: Extensions Samples 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Extensions_Samples_NVD@10010.zip +Pack Size: 878MB +Contents: Tutorial samples for the Flow simulation extension +Default Nucleus Location: NVIDIA/Samples/Examples/Flow + +XR: This content is accessed directly from within the Nucleus +Content browser + +Launcher Pack Name: XR Samples 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: XR_Content_NVD@10010.zip +Pack Size: 5.3GB +Contents: Legacy Create XR templates and stages for working in XR environments +Default Nucleus Location: NVIDIA/Assets/XR + +Core Demos: This content is accessed directly from within the +Nucleus Content browser + +Launcher Pack Name: Core Demo Samples 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Core_Demos_NVD@10010.zip +Pack Size: 8.9GB +Contents: Contains multiple demo scenes for MFG, Cloudmaker, Connect and Warehouse Physics +Default Nucleus Location: NVIDIA/Demos + +## Foundation Apps Specific Content + +### Audio2Face App + +Launcher Pack Name: Audio2Face Sample 3D Models Pack +Included in Omniverse Apps: Audio2Face / USD Composer +Pack: A2F_Content_NVD@10010.zip +Pack Size: 6.2GB +Contents: All of the core Audio2Face sample content that is available within the Example Browser in the Audio2Face app +Default Nucleus Location: NVIDIA/Assets/Audio2Face + +### IsaacSim + +IsaacSim content is versioned in folders inside of NVIDIA/Assets/Isaac +on AWS and as such, it’s been configured in zip archives to mimic this +folder structure. Each version of Isaac Sim uses only the specific +versioned folder. In the Launcher IsaacSim Assets is split into 3 +content packs. + +Launcher Pack Name: Isaac Sim Assets Pack 1 +Included in Omniverse Apps: IsaacSim +Pack Size: 19.9GB +Contents: All of the core Isaac Sim sample content plus dependencies from the /NVIDIA folder. Split into 3 packs. +Default Nucleus Location: NVIDIA/Assets/Isaac/2023.1.0 + +Launcher Pack Name: Isaac Sim Assets Pack 2 +Included in Omniverse Apps: IsaacSim +Pack Size: 27.8GB +Contents: All of the core Isaac Sim sample content plus dependencies from the /NVIDIA folder. Split into 3 packs. +Default Nucleus Location: NVIDIA/Assets/Isaac/2023.1.0 + +Launcher Pack Name: Isaac Sim Assets Pack 3 +Included in Omniverse Apps: IsaacSim +Pack Size: 28.4GB +Contents: All of the core Isaac Sim sample content plus dependencies from the /NVIDIA folder. Split into 3 packs. +Default Nucleus Location: NVIDIA/Assets/Isaac/2023.1.0 + +## Extra Content Packs + +### Datacenter + +Launcher Pack Name: Datacenter 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: Datacenter_NVD@10011.zip +Pack Size: 187MB +Contents: Datacenter assets for creating digital twins +Default Nucleus Location: NVIDIA/Assets/DigitalTwin/Assets/Datacenter + +### AECXR + +Launcher Pack Name: AEC XR 3D Models Pack +Included in Omniverse Apps: USD Composer +Pack: AEC_XR_NVD@10012.zip +Pack Size: 13MB +Contents: Architectural AEC elements for XR testing +Default Nucleus Location: No default location on Nucleus - only available through download + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/core.md b/core.md new file mode 100644 index 0000000000000000000000000000000000000000..43a8c9d35b9f4d2f1321e99ca1417074ce30a8b6 --- /dev/null +++ b/core.md @@ -0,0 +1,77 @@ + + +Omni Asset Validator (Core) — asset-validator 0.6.2 documentation + +asset-validator + + » +Omni Asset Validator (Core) + +  + +# Omni Asset Validator (Core) + +Validates assets against Omniverse specific rules to ensure they run smoothly across all Omniverse products. +It includes the following components: + +A rule interface and registration mechanism that can be called from external python modules. +An engine that runs the rules on a given Usd.Stage, layer file, or recursively searches an OV folder for layer files. +An issue fixing interface for applying automated fixes if/when individual rules provide suggestions. + +Note +The IssueFixer API is still a work in-progress. Currently no rules provide the necessary suggestions to fix issues. + +## Validation Rules by Category + +Several categories of validation rules are defined in this core module. These include: + +The Basic rules from Pixar (e.g. the default usdchecker rules). +The ARKit rules from Apple (also available via usdchecker). + +These rules are disabled by default in this system, as they are in usdchecker. Use Carbonite Settings or the ValidationEngine API to re-enable them. + +A few NVIDIA developed rules that we plan to contribute back to the Basic set. +Some Omniverse specific rules that apply to all Omniverse apps. These will be available under several Omni: prefixed categories. + +## Writing your own Rules + +Any external client code can define new rules and register them with the system. Simply add omni.asset_validator.core as a dependency of your tool (e.g. your Kit extension or other python module), derive a new class from BaseRuleChecker, and use the ValidationRulesRegistry to categorize your rule with the system. See the Core Python API for thorough details and example code. We even provide a small Testing API to ease unittesting your new rules against known USD layer files. + +Important +Put extra thought into your category name, your class name, your GetDescription() implementation, and the messages in any errors, warnings, or failures that your rule generates at runtime. These are the user-facing portions of your rule, and many users will appreciate natural language over engineering semantics. + +## Running the Validation Engine + +Validation can be run synchronously (blocking) via ValidationEngine.validate(), or asynchronously via either ValidationEngine.validate_async() or ValidationEngine.validate_with_callbacks(). Currently validation within an individual layer file or Usd.Stage is synchronous. This may become asynchronous in the future if it is merited. +Validation Issues are captured in a Results container. Issues vary in severity (Error, Failure, Warning) and will provide detailed messages explaining the problem. Optionally, they may also provide detail on where the issue occured in the Usd.Stage and a suggestion (callable python code) for how it can be fixed automatically. + +## Fixing Issues automatically + +Once validation Results have been obtained, they can be displayed for a user as plain text, but we also provide an automatic IssueFixer for some Issues. It is up to each individual rule to define the suggested fix via a python callable. See the Core Python API for more details. + +## Configuring Rules with Carbonite Settings + +As with many Omniverse tools, omni.asset_validator.core is configurable at runtime using Carbonite settings. The following settings can be used to customize which rules are enabled/disabled for a particular app, company, or team. + +### Settings + +enabledCategories/disabledCategories are lists of of glob style patterns matched against registered categories. Categories can be force-enabled using an exact match (no wildcards) in enabledCategories. +enabledRules/disabledRules are lists of of glob style patterns matched against class names of registered rules. Rules can be force-enabled using an exact match (no wildcards) in enabledRules. + +Tip +These settings only affect a default-constructed ValidationEngine. Using the Python API, client code may further configure a ValidationEngine using enableRule(). In such cases, the rules may not even be registered with the ValidationRulesRegistry. + +## API and Changelog + +We provide a thorough public API for the core validation framework and a minimal public testing API to assist clients in authoring new rules. + +Core Python API +Testing API +Rules +Changelog + +© Copyright 2021-2023, NVIDIA. + Last updated on Jun 20, 2023. + + + diff --git a/create.md b/create.md new file mode 100644 index 0000000000000000000000000000000000000000..bdabc31a8de49ee368f3ee0af15aa1307ef58e84 --- /dev/null +++ b/create.md @@ -0,0 +1,209 @@ + + +Create a Project — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Create a Project + +  + +# Create a Project + +Before development can begin, you must first create a new Project. There are many ways to create an Omniverse Project, and the method you choose depends on what you intend to build and how you prefer to work. Projects tend to align within distinct categories, yet there remains remarkable flexibility within each category to help you address the needs of the user. +Here we will give instructions on how to begin the most common types of Projects using the Omniverse platform. + +## Extensions + +Introduction +Extensions are a common development path within Omniverse and they serve as the fundamental building blocks of Applications and Services. In effect, all user-facing elements in an Omniverse Application are created using Extensions. Extensions such as the Content Browser, Viewport and Stage elements are used by the Omniverse USD Composer and Omniverse USD Presenter Applications among many others. Extensions are persistent within Applications so long as they are configured as an application dependency or they are set to load in the Extension Manager. +In creating Omniverse Extensions, multiple options are available: + +One powerful and flexible technique involves cloning our template from Github, which can be discovered under the Automated (Repo Tool) tab above. +For a simpler route, we offer a method via the UI (Extension Manager) tab. This provides a straightforward UI workflow to create your extension in another application, such as Omniverse Code. + +Automated (Repo Tool) +Requirements: Git, Command-Line +Optional: VS Code +A template for Omniverse Project development can be accessed via the following GitHub repository: + +Advanced Template Repository. + +Below we describe the procedure to create an Extension development Project using this template. + +Fork and/or Clone the Kit App Template repository link into a local directory using Git. The Windows/Linux command-line might resemble: + +From the chosen local directory: +git clone https://github.com/NVIDIA-Omniverse/kit-app-template + +This command will generate a subfolder named kit-app-template with multiple files and folders designed to help you customize your Omniverse Project including sample Extension and Application files. + +Navigate to the newly created ‘kit-app-template’: + +cd kit-app-template + +optional If you have VS Code installed, you can now open the Project template in VSCode: +code . + +Once completed, you should have a folder structure which looks like this. + +From either the integrated terminal in VSCode or from the command line, create a new Extension: + +repo template new + +This action will trigger a sequence of options. Make the following selections: + +What do you want to add : extension +Choose a template : python-extension-window +Enter a name: my_company.my_app.extension_name +Select a version, for instance: 0.1.0 + +The newly created Extension is located at: +kit-app-template/source/extensions/my_company.my_app.extension_name +You have now created an Extension template and are ready to begin development. + +Additional information + +The ‘repo’ command is a useful tool within an Omniverse Project. This command is both configurable and customizable to suit your requirements. To review the tools accessible within any Project, enter the following command: +repo -h + +More details on this tool can be found in the Repo Tools Documentation. + +If you prefer a comprehensive tutorial that guides you through Application and Extension development see the Kit App Template Tutorial. + +UI (Extension Manager) +With the Extension Manager UI, you have the ability to quickly create an extension directly within an existing application. Step-by-step instructions on creating an extension this way are available under Getting Started with Extensions in the Kit Manual . +You have now created an Extension template and are ready to begin development. + +## Apps + +Introduction +Omniverse Applications are simply a collection of Extensions. By configuring these collections, you can create high-performance, custom solutions suited to your organization’s needs without necessarily writing any code. NVIDIA develops and maintains a suite of Omniverse Applications to demonstrate what possible solutions you can create from these collections. +An Omniverse Application is a .kit configuration file that instructs the Kit executable to load a predetermined set of Extensions. Either a .bat file (for Windows) or a .sh file (for Linux) is employed to launch your Application, by passing your Application .kit file to the Kit executable. +Applications serve as an ideal option when you need tailor-made software with a unique layout and features. Omniverse Applications offer the flexibility to select from existing Extensions or create novel ones to add desired functionality. +For inspiration, you can reference additional applications on the Omniverse Launcher. Download those which appeal to you and explore their installation folders and related .kit files. + +Application Template +Requirements: Git, Command-Line +Optional: VS Code +A template for Omniverse Project development can be accessed via the following GitHub repository: + +Advanced Template Repository. + +Below we describe the procedure to create an Extension development Project using this template. + +Fork and/or Clone the Kit App Template repository link into a local directory using Git. The Windows/Linux command-line might resemble: + +From the chosen local directory: +git clone https://github.com/NVIDIA-Omniverse/kit-app-template + +This command will generate a subfolder named kit-app-template with multiple files and folders designed to help you customize your Omniverse Project including sample Extension and Application files. + +Navigate to the newly created ‘kit-app-template’: + +cd kit-app-template + +optional If you have VS Code installed, you can now open the Project template in VSCode: +code . + +Once completed, you should have a folder structure which looks like this. + +Navigate to /source/apps folder and examine the sample .kit files found there. + +You have now created an Application template and are ready to begin development and learn to manipulate your .kit files. +Additional information + +If you prefer a comprehensive tutorial that guides you through Application and Extension development see the Kit App Template Tutorial. + +## Connectors + +Introduction +Omniverse Connectors serve as middleware, enabling communication between Omniverse and various software applications. They allow for the import and export of 3D assets, data, and models between different workflows and tools through the use of Universal Scene Description (OpenUSD) as the interchange format. +Creating a Connector can be beneficial when connecting a third-party application to Omniverse, providing the ability to import, export, and synchronize 3D data via the USD format. A practical use case of this could involve generating a 3D model in Maya, then exporting it to an Omniverse Application like Omniverse USD Composer for rendering with our photo-realistic RTX or Path Tracing renderers. + +Connector Resources +To equip you with an understanding of creating Omniverse Connectors, we’ve compiled some beneficial resources below: +Video Overview +Gain insight into Omniverse Connectors with this concise overview. This video helps you understand the basics of Connectors and the unique value they bring. + +Omniverse Connectors overview + +Documentation +Learn about what you can create with Connectors following our samples using OpenUSD and Omniverse Client Library APIs + +Connect Sample + +Video Tutorial +Learn how to connect with the Omniverse platform by syncing data to it via OpenUSD. Establish a live sync session and get an OpenUSD 101 overview to get you started. + +Making a Connector for Omniverse + +## Services + +Introduction +Omniverse offers a Services framework based on its foundational Kit SDK. This framework is designed to simplify the construction of Services that can leverage the capabilities of custom Extensions. +Developers can choose to run their Services in various settings, such as local machines, virtual machines, or in the cloud. The framework is flexible, allowing Services to be migrated to different infrastructures easily without changing the Service’s code. +The framework promotes loose coupling, with its components serving as building blocks that foster scalability and resilience. These reusable components help accelerate the development of your tools and features for databases, logging, metrics collection, and progress monitoring. +Creating a Service project employs the same tools used for Extensions, with a similar development process. However, certain aspects, such as configuration and dependencies, are unique to Services. More information is available here + +Automated (Repo Tool) +Requirements: Git, Command-Line +Optional: VS Code +A template for Omniverse Project development can be accessed via the following GitHub repository: + +Advanced Template Repository. + +Below we describe the procedure to create an Extension development Project using this template. + +Fork and/or Clone the Kit App Template repository link into a local directory using Git. The Windows/Linux command-line might resemble: + +From the chosen local directory: +git clone https://github.com/NVIDIA-Omniverse/kit-app-template + +This command will generate a subfolder named kit-app-template with multiple files and folders designed to help you customize your Omniverse Project including sample Extension and Application files. + +Navigate to the newly created ‘kit-app-template’: + +cd kit-app-template + +optional If you have VS Code installed, you can now open the Project template in VSCode: +code . + +Once completed, you should have a folder structure which looks like this. + +From either integrated terminal in VSCode or from the command line, create a new Extension: + +repo template new + +This action will trigger a sequence of options. Make the following selections: + +What do you want to add : extension +Choose a template : python-extension-main +Enter a name: my_company.my_app.extension_name +Select a version, for instance: 0.1.0 + +The newly created Extension is located at: +kit-app-template/source/extensions/my_company.my_app.extension_name +You have now created an Extension template and are ready to begin +development of your Service. + +Additional information + +The ‘repo’ command is a useful tool within an Omniverse Project. This command is both configurable and customizable to suit your requirements. To review the tools accessible within any Project, enter the following command: +repo -h + +More details on this tool can be found in the Repo Tools Documentation. + +If you prefer a comprehensive tutorial that guides you through Application and Extension development see the Kit App Template Tutorial. + +UI (Extension Manager) +With the Extension Manager UI, you have the ability to quickly create an extension directly within an existing application. Step-by-step instructions on creating an extension this way are available under Getting Started with Extensions in the Kit Manual . +You have now created an Extension template and are ready to begin development of your Service. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/creating_kit_apps.md b/creating_kit_apps.md new file mode 100644 index 0000000000000000000000000000000000000000..57e7f7ceea96b999adce90875950e85b87a34383 --- /dev/null +++ b/creating_kit_apps.md @@ -0,0 +1,165 @@ + + +Building an App — kit-manual 105.1 documentation + +kit-manual + + » +Building an App + +  + +# Building an App + +A Kit file (ends in .kit) defines an Omniverse App. Kit files behave as a single-file extension. The format is the same as an extension.toml and all runtime behavior is the same. It can be published, downloaded, versioned, and it can have dependencies. +Building an Omniverse App is as simple as listing the extensions that it should contain (extension dependencies) and the default settings to apply. + +## Simple App + +Here is an example of a very simple app with a dependency and setting applied: repl.kit: +[dependencies] +"omni.kit.console" = {} + +[settings] +exts."omni.kit.console".autoRunREPL = true + +Pass the repl.kit file to the Kit executable: +> kit.exe repl.kit +and it will enable a few extensions (including dependencies) to run a simple REPL. + +## Application Dependencies Management + +There are conceptual differences when specifying dependencies for an extension vs an app, although the syntax is the same: + +For extensions, dependencies are specified as broadly as possible. Versions describe compatibility with other extensions. Your extension can be used in many different apps with different extensions included. +An app is the final leaf on a dependency chain, and is an end-product. All versions of dependencies must be locked in the final package, and in the version control system. That helps to guarantee reproducible builds for end users and developers. + +If you pass an app to the Kit executable, it will first resolve all extension versions (either locally or using the registry system), and will then enable the latest compatible versions. Next time you run the app, someone may have published a newer version of some extension and you may get a different result. +You also don’t often have a clear view of the versions chosen, because one extension brings in other extensions that they depend on, and so on. That builds a tree of N-order dependencies. +To lock all dependencies we want to write them back to the kit file. You can manually specify each version of each dependency with exact=true and lock all of them, but that would be very tedious to maintain. It would also make upgrading to newer versions very difficult. +To address this, Kit has a mode where it will write a dependency solution (of all the resolved versions) back to the tail of the kit file it was launched from. +It will look something like this: +######################################################################################################################## +# BEGIN GENERATED PART (Remove from 'BEGIN' to 'END' to regenerate) +######################################################################################################################## + +# Date: 09/15/21 15:50:53 (UTC) +# Kit SDK Version: 103.0+master.58543.0643d57a.teamcity +# Kit SDK dependencies: +# carb.audio-0.1.0 +# carb.windowing.plugins-1.0.0 +# ... + +# Version lock for all dependencies: +[settings.app.exts] +enabled = [ + "omni.kit.asset_converter-1.1.36", + "omni.kit.tool.asset_importer-2.3.12", + "omni.kit.widget.timeline_standalone-103.0.7", + "omni.kit.window.timeline-103.0.7", +] + +######################################################################################################################## +# END GENERATED PART +######################################################################################################################## + +On top of that, we have a repo tool: repo_precache_exts. You specify a list of kit files in repo.toml to run Kit in that mode on: +[repo_precache_exts] +# Apps to run and precache +apps = [ + "${root}/_build/$platform/$config/apps/omni.app.my_app.kit" +] + +Besides locking the versions of all extensions, it will also download/precache them. It is then packaged together, and the final app package is deployed into the Launcher. +Usually, that tool runs as the final step of the build process. To run it explicitly call: +> repo.bat precache_exts -c release +By default, extensions are cached into the _build/$platform/$config/extscache folder. +The version-lock is written at the tail of the kit file and the changed kit file can then be committed to version-control. + +### Updating Version Lock + +Short version: run: build.bat with -u flag. +Longer explanation: You can remove the generated part of the kit file and run the build or precache tool. That will write it again. But if you did run it before you already downloaded extensions in _build/$platform/$config/extscache, then those local versions of extensions will still be selected again, because local versions are preferred. Before doing that, this folder needs to be cleared. To automate this process, the precache tool has a -u / --update flag: +$ repo precache_exts -h +usage: repo precache_exts [-h] [-c CONFIG] [-v] [-x] [-u] + +Tool to precache kit apps. Downloads extensions without running. + +optional arguments: + -h, --help show this help message and exit + -c CONFIG, --config CONFIG + -v, --info + -x, --clean Reset version lock and cache: remove generated part + from kit files, clean cache path and exit. + -u, --update Update version lock: remove generated part from kit + files, clean cache path, then run ext precaching. + +The latest versions of repo_build and repo_kit_tools allow propagation of that flag to build.bat. So run build.bat -h to check if your project has the -u flag available. To use, run: +build.bat -u -r to build a new release with updated versions. + +### Version Specification Recommendations + +The general advice is to write the dependencies required-versions for apps the same way as for extensions, in an open-ended form, like: +[dependencies] +"omni.kit.tool.asset_importer" = {} + +or say, locking only to a major-version (Semantic Versioning is used): +[dependencies] +"omni.kit.tool.asset_importer" = { version = "2.0.0" } + +Then the automatic version lock will select 2.0.0, 2.0.1, 2.1.0, 2.99.99 for you, but never 3.0.0. +You can also review the git diff at that point, to see which versions actually changed when the selection process ran. + +### Windows or Linux only dependencies + +Version locks, and all versions, are by default defined as cross-platform. While we build them only on your current platform, we assume that the same app will run on other platforms. If you need to have an extension that is for a single platform only, you can explicitly specify the version in this way: +[dependencies."filter:platform"."windows-x86_64"] +"omni.kit.window.section" = { version = "102.1.6", exact = true } + +Dependencies specified as exact are not written into an automatic version lock. This way, you lock the version manually, and only for the selected platform. + +### Caching extensions disabled by default + +Often an app has extensions that are brought into the Launcher, but disabled by default. Create is an example of that. We still want to lock all the versions, and download them, but we can’t put them into the main app kit file, as it will enable them on startup. The solution is simple: use a separate kit file, which includes the main one. For instance, the Create project has: +omni.create.kit and omni.create.full.kit. The latter includes the former in its dependencies, but adds extra extensions. Both kit files are passed to the precache tool (specified in repo.toml). + +## Deploying an App + +Kit files fully describe how to run an app, and also are interpreted as an extension. This means that it can be versioned and published into the registry like any other extension. Any Kit app can be found in the extension manager. Click Launch, and the app will be run. +It can also just be shared as a file, and anyone can pass it to kit.exe or associate it with Kit and just use a mouse double-click to open it. +In practice, we deploy apps into the launcher with both Kit and all of the dependent extensions downloaded ahead of time. So an app in the launcher basically is: + +Kit file (1 or more) +Precached extensions +Kit SDK + +The Kit SDK is already shared between apps using the thin-package feature of Omniverse Launcher (downloaded from packman). In the future, we can get to a point where you only need to publish a single Kit file to define an Omniverse App of any complexity. This goal guides and explains certain decisions described in the guide. + +## Extensions without an App + +Many repositories contain only extensions without publishing an app. However, all their dependencies should be downloaded at build time and version locked. +You don’t have to create a kit file for them, precache tool will do it by default using generated_app_path = "${root}/source/apps/exts.deps.generated.kit" setting. In this location, a kit file with all extensions will be automatically generated. +exts.deps.generated.kit - is an app, that contains all extensions from the repo as dependencies. It is used to: + +Lock all versions of their dependencies (reproducible builds). +Precache (download) all dependencies before building. + +This file is regenerated if: + +Any extension is added or removed from the repo. +Any extension version is updated +This file is removed. + +To update version lock the same repo build -u flag can be used. +The same other kit files with version lock, it should be version controlled to produce reproducible builds. +To disable this feature set a generated app path to empty generated_app_path = "". + +## Other Precache Tool Settings + +As with any repo tool, to find more settings available for the precache tool, look into its repo_tools.toml file. Since it comes with Kit, this file is a part of the kit-sdk package and can be found at: _build/$platform/$config/kit/dev/repo_tools.toml + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/custom-protocol-commands.md b/custom-protocol-commands.md new file mode 100644 index 0000000000000000000000000000000000000000..030f060e3d1fed3ab837dd510dccdcb68754a13c --- /dev/null +++ b/custom-protocol-commands.md @@ -0,0 +1,127 @@ + + +Custom Protocol Commands — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Custom Protocol Commands + +  + +# Custom Protocol Commands + +Launcher supports deep linking which allows using custom URLs to point to specific Launcher screens or +run various Launcher commands. Deep linking is built on top of custom protocol URLs that start with omniverse-launcher://. +Such links can be used by emails, websites or messages to redirect users back to Launcher, +or can be used by system administrators to manage installed apps. +This document describes the list of all available custom protocol commands for Launcher. + +## Showing a Launcher Screen + +Launcher supports omniverse-launcher://navigate command to bring up the main window and +open a specific screen there. The screen is specified with the path query parameter, for example: +omniverse-launcher://navigate?path=/news +The list below defines all available screens supported by this command: + +News: omniverse-launcher://navigate?path=/news +Library: omniverse-launcher://navigate?path=/library + +Installed app in the library: omniverse-launcher://navigate?path=/library/:slug where :slug should be replaced with a unique application name. +Installed connectors: omniverse-launcher://navigate?path=/library/connectors/ + +Exchange: omniverse-launcher://navigate?path=/exchange + +Detailed app info: omniverse-launcher://navigate?path=/exchange/app/:slug where :slug should be replaced with a unique application name. +Detailed connector info: omniverse-launcher://navigate?path=/exchange/connector/:slug where :slug should be replaced with a unique connector name. + +Nucleus: omniverse-launcher://navigate?path=/collaboration + +## Installing Apps + +omniverse-launcher://install command can be used to start installing an application. This command requires +two query arguments: + +### Query Arguments + +slug - the unique name of the installed app or connector. +version - (optional) - the version that needs to be installed. If not specified, then the latest version is installed. +check - (optional) - defines if Launcher needs to throw an error if the same component is already installed. (true or false, true by default). + +### Example + +omniverse-launcher://install?slug=create&version=2020.3.0-rc.14 +The IT Managed Launcher supports only the path argument that must point to a zip archive downloaded from the +enterprise portal. + +### Example + +omniverse-launcher://install?path=C:Downloadscreate.zip + +## Uninstalling apps + +omniverse-launcher://uninstall command can be used to removed installed apps or connectors. This command requires two query +arguments: + +slug - the unique name of the installed app or connector. +version - the version that needs to be uninstalled. + +### Example + +omniverse-launcher://uninstall?slug=create^&version=2020.3.0-rc.14 + +## Launching apps + +omniverse-launcher://launch command allows users to start the specified application. The launch command will start the app with the specified slug and will use the version that is currently selected by user. +This command requires one query argument: + +slug - the unique name of the installed app that must be launched. + +### Example + +Starts the current version of Create. +omniverse-launcher://launch?slug=create + +Note +Users can change their current app versions in the library settings. + +## Close the Launcher + +omniverse-launcher://exit command can be used to close Launcher. This command requires no query arguments. + +### Example + +omniverse-launcher://exit + +## Open omniverse:// links + +Launcher is also registered as the default handler for omniverse:// links. +The first time when such link is opened by user, Launcher brings up the dialog to select an Omniverse application +that should be used to open omniverse:// links by default: + +### Example + +omniverse://rc.ov.nvidia.com/NVIDIA/Samples/Astronaut/Astronaut.usd + +## Run in kiosk mode + +omniverse-laucher://kiosk command can be used to run Launcher in kiosk mode. +In kiosk mode, Launcher is opened fullscreen on top of other applications. +This feature is only available on Windows. +To disable the kiosk mode, use omniverse-launcher://kiosk?enabled=false command. + +## Track start and exit data of apps + +omniverse-launcher://register-start command can be used to register a launch event when an app has been started. This command accepts two query arguments: +slug [required] - the unique name of the app or connector that has been launched +version [required] - the version of the app or connector that has been launched +omniverse-launcher://register-exit command can be used to register an exit event when an app has been closed. This command accepts two query arguments: +slug [required] - the unique name of the app or connector that has been closed +version [required] - the version of the app or connector that has been closed + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/data-collection-faq.md b/data-collection-faq.md new file mode 100644 index 0000000000000000000000000000000000000000..068a1761f03c28d3fa80eef3a50c98a03512f5bc --- /dev/null +++ b/data-collection-faq.md @@ -0,0 +1,80 @@ + + +Omniverse Data Collection & Use FAQ — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Omniverse Data Collection & Use FAQ + +  + +# Omniverse Data Collection & Use FAQ + +NVIDIA Omniverse Enterprise is a simple to deploy, end-to-end +collaboration and true-to-reality simulation platform that fundamentally +transforms complex design workflows for organizations of any scale. +In order to improve the product, Omniverse software collects usage +and performance behavior. When an enterprise manages Omniverse +deployment via IT managed launcher, IT admin is responsible to configure +the data collection setting. If consent is provided, data is collected +in an aggregate manner at enterprise account level. Individual user data +is completely anonymized. + +## Frequently Asked Questions + +Q: What data is being collected and how is it used? +A: Omniverse collects usage data when you install and start interacting +with our platform technologies. The data we collect and how we use it +are as follows. + +Installation and configuration details such as version of operating +system, applications installed - This information allows us to +recognize usage trends & patterns +Identifiers, such as your unique NVIDIA Enterprise Account +ID(org-name) and Session ID which allow us to recognize software +usage trends and patterns. +Hardware Details such as CPU, GPU, monitor information - This +information allows us to optimize settings in order to provide best +performance +Product session and feature usage - This information allows us to +understand user journey and product interaction to further enhance +workflows +Error and crash logs - This information allows to improve performance +& stability for troubleshooting and diagnostic purposes of our +software + +Q: Does NVIDIA collect personal information such as email id, name etc. ? +A: When an enterprise manages Omniverse deployment via IT managed +launcher, IT admin is responsible to configure the data collection +setting. If consent is provided, data is collected in an aggregate +manner at enterprise account level. Individual user data is completely +anonymized. +Q: How can I change my data collection setting - opt-in to data collection? +A: NVIDIA provides full flexibility for an enterprise to opt-in +to data collection. In the .config folder there is a privacy.toml file +which can be set to “true”. For detailed instructions, review the appropriate installation guide: + +Installation Guide for Windows +Installation Guide for Linux + +Q: How can I change my data collection setting - opt-out of data collection? +A: NVIDIA provides full flexibility for an enterprise to opt-out of data collection. In the .config folder there is a privacy.toml file which can be set to “false”. +For detailed instructions, review the appropriate installation guide: + +Installation Guide for Windows +Installation Guide for Linux + +Q: How can I request the data Omniverse Enterprise has collected? +A: If you are an Enterprise customer, please file a support +ticket on NVIDIA ENterprise Portal. If any data was collected, NVIDIA +will provide all data collected for your organization within 30 days. +Q: How will Omniverse collect data in a scenario where my enterprise is firewalled with no Internet access? +A: No data will be collected in a firewalled scenario. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/debug.md b/debug.md new file mode 100644 index 0000000000000000000000000000000000000000..34333fe55721fb272398cb6dcd41e496e2ff4bcc --- /dev/null +++ b/debug.md @@ -0,0 +1,30 @@ + + +Debug a Build — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Debug a Build + +  + +# Debug a Build + +Recognizing the critical role of debugging in development, Omniverse offers tools and automation to streamline and simplify debugging workflows. In combination with third-party tools, Omniverse accelerates bug and anomaly detection, aiming for steady increases in project stability throughout the development process. +Omniverse provides utilities for debugging via extensions both for use within a given Application or in conjunction with third-party tools such as VSCode. + +Console Extension : Allows the user to see log output and input commands directly from the Application interface. +Visual Studio Code Link Extension : Enables the connection of an Omniverse Application to VS Code’s python debugger. + +Additional Learning: + +Video Tutorial - How to Debug Your Kit Extension with Omniverse Code App. +Advanced Project Template Tutorial - Step-by-step instructions for debugging within the context of an Application development tutorial. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/develop.md b/develop.md new file mode 100644 index 0000000000000000000000000000000000000000..3e667d6677be659f374fdbaef25af5dd23056eeb --- /dev/null +++ b/develop.md @@ -0,0 +1,207 @@ + + +Develop a Project — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Develop a Project + +  + +# Develop a Project + +After creating a new Project, the development phase begins. In this phase, you configure and use an assortment of tools and extensions, along with automated documentation features to fit the needs of your project. + +As a reminder, you can find additional documentation in the left-hand menu, such as: + +Kit Manual for extensive information about programming using the Kit SDK. +Extensions for an extensive list of extensions you can include as dependencies in your project. + +Having followed the methods outlined in the Create section, you’ve produced configuration files and established a folder setup. Now you will transform this set of default files to enable new functionality. This stage of Omniverse Project Development is undeniably the most in-depth, offering numerous paths to achieve desired outcomes as a developer. +In this section, we’ll discuss tools and resources for project development, be it crafting an Extension (or multiple extensions), Application, Service, or Connector. + +## Configure TOML Files + +Introduction +Both Omniverse Applications and Extensions fundamentally rely on a configuration file in TOML format. This file dictates dependencies and settings that the Kit SDK loads and executes. Through this mechanism, Applications can include Extensions, which may further depend on other Extensions, forming a dependency tree. +For details on constructing this tree and the corresponding settings for each Extension, it’s essential to understand the specific configuration files. Applications utilize the .kit file, while Extensions are defined using .toml files. For more on each type of configuration file, please refer to the tabs above. + +Extension (extension.toml) + +Requirements: +Understanding TOML file format. +Text Editor (VS Code recommended) + +Extensions can contain many types of assets, such as images, python files, data files, C++ code/header files, documentation, and more. However, one thing all Extensions have in common is the extension.toml file. +Extension.toml should be located in the ./config folder of your project so that it can be found by various script tools. +Here is an example extension.toml file that can be found in the Advanced Template Repository: +[package] +version = "1.0.0" +title = "Simple UI Extension Template" +description = "The simplest python extension example. Use it as a starting point for your extensions." + +# One of categories for UI. +category = "Example" + +# Keywords for the extension +keywords = ["kit", "example"] + +# Path (relative to the root) or content of readme markdown file for UI. +readme = "docs/README.md" + +# Path (relative to the root) of changelog +changelog = "docs/CHANGELOG.md" + +# URL of the extension source repository. +repository = "https://github.com/NVIDIA-Omniverse/kit-project-template" + +# Icon to show in the extension manager +icon = "data/icon.png" + +# Preview to show in the extension manager +preview_image = "data/preview.png" + +# Use omni.ui to build simple UI +[dependencies] +"omni.kit.uiapp" = {} + +# Main python module this extension provides, it will be publicly available as "import my.hello.world". +[[python.module]] +name = "my.hello.world" + +Here we will break this down… +[package] +version = "1.0.0" + +This sets the version of your extension. It is critical that this version is set any time you produce a new release of your extension, as this version is most often used to differentiate releases of extensions in registries and databases. As a best practice, it is useful to maintain semantic versioning. +It is also best practice to ensure that you document changes you have made to your code. See the Documentation section for more information. +title = "Simple UI Extension Template" +description = "The simplest python extension example. Use it as a starting point for your extensions." +category = "Example" +keywords = ["kit", "example"] + +The title and description can be used in registries and publishing destinations to allow users more information on what your extension is used for. +The category sets an overall filter for where this extension should appear in various UIs. +The keywords property lists an array of searchable, filterable attributes for this extension. +[dependencies] +"omni.kit.uiapp" = {} + +This section is critical to the development of all aspects of your project. The dependencies section in your toml files specifies which extensions are required. As a best practice, you should ensure that you use the smallest list of dependencies that still accomplishes your goals. When setting dependencies for extensions, ensure you only add extensions that are dependencies of that extension. +The brackets {} in the dependency line allow for parameters such as the following: + +order=[ordernum] allows you to define by signed integer which order the dependencies are loaded. Lower integers are loaded first. (e.g. order=5000) +version=["version ID"] lets you specify which version of an extension is loaded. (e.g. version="1.0.1") +exact=true (default is false) - If set to true, parser will use only an exact match for the version, not just a partial match. + +[[python.module]] +name = "my.hello.world" + +This section should contain one or more named python modules that are used by the extension. The name is expected to also match a folder structure within the extension path. In this example, the extension named my.hello.world would have the following path. +my/hello/world. +These are the minimum required settings for extensions and apps. We will discuss more settings later in the Dev Guide, and you can find plenty of examples of these configuration files in the Developer Reference sections of the menu. + +Application ([appname].kit) + +Requirements: +Understanding TOML file format. +Text Editor (VS Code recommended) + +Applications are not much different than extensions. It is assumed that an application is the “root” of a dependency tree. It also often has settings in it related to the behavior of a particular workflow. Regardless, an App has the same TOML file configuration as extensions, but an App’s TOML file is called a .kit file. +.kit files should be located in the ./source/apps folder of your project so that it can be found by various script tools. +Here is an example kit file that provides some of the minimum settings you’ll need. Additional settings and options can be found later: +[package] +version = "1.0.0" +title = "My Minimum App" +description = "A very simple app." + +# One of categories for UI. +category = "Example" + +# Keywords for the extension +keywords = ["kit", "example"] + +# Path (relative to the root) or content of readme markdown file for UI. +readme = "docs/README.md" + +# Path (relative to the root) of changelog +changelog = "docs/CHANGELOG.md" + +# URL of the extension source repository. +repository = "https://github.com/NVIDIA-Omniverse/kit-project-template" + +# Icon to show in the extension manager +icon = "data/icon.png" + +# Preview to show in the extension manager +preview_image = "data/preview.png" + +# Use omni.ui to build simple UI +[dependencies] +"omni.kit.uiapp" = {} + +Here we will break this down… +[package] +version = "1.0.0" + +This sets the version of your extension or app. It is critical that this version is set any time you produce a new release of your extension, as this version is most often used to differentiate releases of extensions/apps in registries and databases. As a best practice, it is useful to maintain semantic versioning https://semver.org/. +It is also best practice to ensure that you document changes you have made in your docs show each version you’ve released. +title = "Simple UI Extension Template" +description = "A very simple app." +category = "Example" +keywords = ["kit", "example"] + +The title and description can be used in registries and publishing destinations to allow users more information on what your app or extension is used for. +The category sets an overall filter for where this project should appear in various UIs. +The keywords property lists an array of searchable, filterable attributes for this extension. +[dependencies] +"omni.kit.uiapp" = {} + +This section is critical to the development of all aspects of your project. The dependencies section in your toml files specifies which extensions are to be used by the app. As a best practice, you should ensure that you use the smallest list of dependencies that still accomplishes your goals. And, in extensions especially, you only add dependencies which THAT extension requires. +The brackets {} in the dependency line allow for parameters such as the following: + +order=[ordernum] allows you to define by signed integer which order the dependencies are loaded. Lower integers are loaded first. (e.g. order=5000) +version=["version ID"] lets you specify which version of an extension is loaded. (e.g. version="1.0.1") +exact=true (default is false) - If set and true, parser will use only an exact match for the version, not just a partial match. + +These are the minimum required settings for Apps. We will discuss more settings later in the Dev Guide, and you can find plenty of examples of these configuration files in the Developer Reference sections of the menu. + +## Available Extensions + +Virtually all user-facing elements in an Omniverse Application, such as Omniverse USD Composer or Omniverse USD Presenter, are created using Extensions. The very same extensions used in Omniverse Applications are also available to you for your own development. +The number of extensions provided by both the Community and NVIDIA is continually growing to support new features and use cases. However, a core set of extensions is provided alongside the Omniverse Kit SDK. These ensure basic functionality for your Extensions and Applications including: + +Omniverse UI Framework : A UI toolkit for creating beautiful and flexible graphical user interfaces within extensions. +Omni Kit Actions Core : A framework for creating, registering, and discovering programmable Actions in Omniverse. +Omni Scene UI : Provides tooling to create great-looking 3d manipulators and 3d helpers with as little code as possible. +And more. + +A list of available Extensions can be found via API Search. + +## Documentation + +If you are developing your project using Repo Tools, you also have the ability to create documentation from source files to be included in your build. This powerful feature helps automate html-based documentation from human-readable .md files. + +You can refer to the repo docs -h command to see more information on the docs tool and its parameters. + +By running +repo docs + +you will generate in the _build/docs/[project_name]/latest/ folder a set of files which represents the html version of your source documentation. The “home page” for your documentation will be the index.html file in that folder. +You can find latest information by reading the Omniverse Documentation System. + +Note +You may find that when running repo docs you receive an error message instead of the build proceeding. If this is the case it is likely that you are either using a project that does not contain the “docs” tool OR that your repo.toml file is not setup correctly. Please refer to the repo tools documentation linked to above for more information. + +## Additional Documentation + +Script Editor +Code Samples +Repo Tools + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/dictionary_settings.md b/dictionary_settings.md new file mode 100644 index 0000000000000000000000000000000000000000..f9ca52265273ecb0a597e7b1458fb6d40bb18a76 --- /dev/null +++ b/dictionary_settings.md @@ -0,0 +1,81 @@ + + +Dictionaries and Settings — kit-manual 105.1 documentation + +kit-manual + + » +Dictionaries and Settings + +  + +# Dictionaries and Settings + +Settings is a generalized subsystem designed to provide a simple to use interface to Kit’s various subsystems, which can be automated, enumerated, serialized and so on. It is accessible from both C++ and scripting bindings such as Python bindings. carb.settings is a Python namespace (and, coincidentally, a C++ plugin name) for the Settings subsystem. +Settings uses carb.dictionary under the hood, and is effectively a singleton dictionary with a specialized API to streamline access. +carb.dictionary is a Dictionary subsystem, which provides functionality to work with the data structure type known as dictionary, associative array, map, and so on. + +## Dictionaries + +For the low-level description of the design and general principles, please refer to the Carbonite documentation for the carb.dictionary interfaces. + +## Settings + +As mentioned above, the settings subsystem is using carb.dictionary under the hood, and to learn more about the low-level description of the design and general principles, please refer to the Carbonite documentation. +On a higher level, there are several important principles and guidelines for using settings infrastructure, and best practices for using settings within Omniverse Kit. + +### Default values + +Default values need to be set for settings at the initialization stage of the plugin, and in the extension configuration file. +A rule of thumb is that no setting should be read when there is no value for it. As always, there are exceptions to this rule, but in the vast majority of cases, settings should be read after the setting owner sets a default value for this particular setting. + +### Notifications + +To ensure optimal performance, it is recommended to use notifications instead of directly polling for settings, to avoid the costs of accessing the settings backend when the value didn’t change. +DON’T: This is an example of polling in a tight loop, and it is not recommended to do things this way: +while (m_settings->get("/snippet/app/isRunning")) +{ + doStuff(); + // Stop the loop via settings change + m_settings->set("/snippet/app/isRunning", false); +} + +DO: Instead, use the notification APIs, and available helpers that simplify the notification subscription code, to reduce the overhead significantly: +carb::settings::ThreadSafeLocalCache valueTracker; +valueTracker.startTracking("/snippet/app/isRunning"); +while (valueTracker.get()) +{ + doStuff(); + // Stop the loop via settings change + m_settings->set("/snippet/app/isRunning", false); +} +valueTracker.stopTracking(); + +With the bool value, getting and setting the value is cheap, but in cases of more complicated types, e.g. string, marking and clearing dirty marks could be used in the helper. +In case a helper is not sufficient for the task at hand - it is always possible to use the settings API in such a way as subscribeToNodeChangeEvents/subscribeToTreeChangeEvents and unsubscribeToChangeEvents to achieve what’s needed with greater flexibility. + +### Settings structure + +Settings are intended to be easily tweakable, serializable and human readable. One of the use-cases is automatic UI creation from the settings snapshot to help users view and tweak settings at run time. +DO: Simple and readable settings like /app/rendering/enabled +DON’T: Internal settings that don’t make sense to anyone outside the core developer group, things like: +/component/modelArray/0=23463214 +/component/modelArray/1=54636715 +/component/modelArray/2=23543205 +... +/component/modelArray/100=66587434 + +### Reacting to and consuming settings + +Ideally settings should be monitored for changes and plugin/extensions should be reacting to the changes accordingly. But exceptions are possible, and in these cases, the settings changes should still be monitored and user should be given a warning that the change in setting is not going to affect the behavior of a particular system. + +### Combining API and settings + +Often, there are at least two ways to modify behavior: via the designated API function call, or via changing the corresponding setting. The question is how to reconcile these two approaches. +One way to address this problem - API functions should only change settings, and the core logic tracks settings changes and react to them. Never change the core logic value directly when the corresponding setting value is present. By adding a small detour into the settings subsystem from API calls, you can make sure that the value stored in the core logic and corresponding setting value are never out of sync. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/documenting_exts.md b/documenting_exts.md new file mode 100644 index 0000000000000000000000000000000000000000..e6df373ca13b8638fe59cbb6778a371a3085b2ab --- /dev/null +++ b/documenting_exts.md @@ -0,0 +1,258 @@ + + +Documenting Extensions — kit-manual 105.1 documentation + +kit-manual + + » +Documenting Extensions + +  + +# Documenting Extensions + +This guide is for developers who write API documentation. To build the documentation, run: +repo.{sh|bat} docs +Add the -o flag to automatically open the resulting docs in the browser. If multiple projects of documentation are generated, each one will be opened. +Add the --project flag to specify a project to only generate those docs. Documentation generation can be long for some modules, so this may be important to reduce iteration time when testing your docs. e.g: +repo.bat docs --project kit-sdk / repo.bat docs --project omni.ui +Add the -v / -vv flags to repo docs invocations for additional debug information, particularly for low-level Sphinx events. + +Note +You must have successfully completed a debug build of the repo before you can build the docs for Python. +This is due to the documentation being extracted from the .pyd and .py files in the _build folder. +Run build --debug-only from the root of the repo if you haven’t done this already. + +As a result of running repo docs in the repo, and you will find the project-specific output under _build/docs/{project}/latest. +The generated index.html is what the -o flag will launch in the browser if specified. + +Warning +sphinx warnings will result in a non-zero exit code for repo docs, therefore will fail a CI build. +This means that it is important to maintain docstrings with the correct syntax (as described below) over the lifetime of a project. + +## Documenting Python API + +The best way to document our Python API is to do so directly in the code. That way it’s always extracted from a location where it’s closest to the actual code and most likely to be correct. We have two scenarios to consider: + +Python code +C++ code that is exposed to Python + +For both of these cases we need to write our documentation in the Python Docstring format (see PEP 257 for background). +In a perfect world we would be able to use exactly the same approach, regardless of whether the Python API was written in Python or coming from C++ code that is exposing Python bindings via pybind11. +Our world is unfortunately not perfect here but it’s quite close; most of the approach is the same - we will highlight when a different approach is required for the two cases of Python code and C++ code exposed to Python. +Instead of using the older and more cumbersome restructuredText Docstring specification, we have adopted the more streamlined Google Python Style Docstring format. This is how you would document an API function in Python: +from typing import Optional + +def answer_question(question: str) -> Optional[str]: + """This function can answer some questions. + + It currently only answers a limited set of questions so don't expect it to know everything. + + Args: + question: The question passed to the function, trailing question mark is not necessary and + casing is not important. + + Returns: + The answer to the question or ``None`` if it doesn't know the answer. + + """ + if question.lower().startswith("what is the answer to life, universe, and everything"): + return str(42) + else: + return None + +After running the documentation generation system we will get this as the output (assuming the above was in a module named carb): + +There are a few things you will notice: + +We use the Python type hints (introduced in Python 3.5) in the function signature so we don’t need to write any of that information in the docstring. +An additional benefit of this approach is that many Python IDEs can utilize this information and perform type checking when programming against the API. +Notice that we always do from typing import ... so that we never have to prefix with the typing namespace when referring to List, Union, Dict, and friends. +This is the common approach in the Python community. +The high-level structure is essentially in four parts: + +A one-liner describing the function (without details or corner cases), referred to by Sphinx as the “brief summary”. +A paragraph that gives more detail on the function behavior (if necessary). +An Args: section (if the function takes arguments, note that self is not considered an argument). +A Returns: section (if the function does return something other than None). + +Before we discuss the other bits to document (modules and module attributes), let’s examine how we would document the very same function if it was written in C++ and exposed to Python using pybind11. + m.def("answer_question", &answerQuestion, py::arg("question"), R"( + This function can answer some questions. + + It currently only answers a limited set of questions so don't expect it to know everything. + + Args: + question: The question passed to the function, trailing question mark is not necessary and + casing is not important. + + Returns: + The answer to the question or empty string if it doesn't know the answer.)"); + +The outcome is identical to what we saw from the Python source code, except that we cannot return optionally a string in C++. +The same docstring syntax rules must be obeyed because they will be propagated through the bindings. + +We want to draw your attention to the following: + +pybind11 generates the type information for you, based on the C++ types. +The py::arg object must be used to get properly named arguments into the function signature (see pybind11 documentation) - otherwise you just get arg0 and so forth in the documentation. +Indentation and whitespace are key when writing docstrings. +The documentation system is clever enough to remove uniform indentation. +That is, as long as all the lines have the same amount of padding, that padding will be ignored and not passed onto the RestructuredText processor. Fortunately clang-format leaves this funky formatting alone - respecting the raw string qualifier. +Sphinx warnings caused by non-uniform whitespace can be opaque (such as referring to nested blocks being ended without newlines, etc) + +Let’s now turn our attention to how we document modules and their attributes. +We should of course only document modules that are part of our API (not internal helper modules) and only public attributes. +Below is a detailed example: +"""Example of Google style docstrings for module. + +This module demonstrates documentation as specified by the `Google Python +Style Guide`_. Docstrings may extend over multiple lines. Sections are created +with a section header and a colon followed by a block of indented text. + +Example: + Examples can be given using either the ``Example`` or ``Examples`` + sections. Sections support any reStructuredText formatting, including + literal blocks:: + + $ python example.py + +Section breaks are created by resuming unindented text. Section breaks +are also implicitly created anytime a new section starts. + +Attributes: + module_level_variable1 (int): Module level variables may be documented in + either the ``Attributes`` section of the module docstring, or in an + inline docstring immediately following the variable. + + Either form is acceptable, but the two should not be mixed. Choose + one convention to document module level variables and be consistent + with it. + + module_level_variable2 (Optional[str]): Use objects from typing, + such as Optional, to annotate the type properly. + + module_level_variable4 (Optional[File]): We can resolve type references + to other objects that are built as part of the documentation. This will link + to `carb.filesystem.File`. + +Todo: + * For module TODOs if you want them + * These can be useful if you want to communicate any shortcomings in the module we plan to address + +.. _Google Python Style Guide: + http://google.github.io/styleguide/pyguide.html + +""" + +module_level_variable1 = 12345 +module_level_variable3 = 98765 +"""int: Module level variable documented inline. The type hint should be specified on the first line, separated by a +colon from the text. This approach may be preferable since it keeps the documentation closer to the code and the default +assignment is shown. A downside is that the variable will get alphabetically sorted among functions in the module +so won't have the same cohesion as the approach above.""" + +module_level_variable2 = None +module_level_variable4 = None + +This is what the documentation would look like: + +As we have mentioned we should not mix the Attributes: style of documentation with inline documentation of attributes. +Notice how module_level_variable3 appears in a separate block from all the other attributes that were documented. +It is even after the TODO section. +Choose one approach for your module and stick to it. +There are valid reasons to pick one style above the other, but don’t cross the streams! +As before, we use type hints from typing but we don’t use the typing syntax to attach them. +We write: +"""... +Attributes: + module_variable (Optional[str]): This is important ... +""" + +or +module_variable = None +"""Optional[str]: This is important ...""" + +But we don’t write: +from typing import Optional + +module_variable: Optional[str] = 12345 +"""This is important ...""" + +This is because the last form (which was introduced in Python 3.6) is still poorly supported by tools - including our documentation system. +It also doesn’t work with Python bindings generated from C++ code using pybind11. +For instructions on how to document classes, exceptions, etc please consult the Sphinx Napoleon Extension Guide. + +### Adding Extensions to the automatic-introspection documentation system + +It used to be necessary to maintain a ./docs/index.rst to write out automodule/autoclass/etc directives, as well as to include hand-written documentation about your extensions. +In order to facilitate rapid deployment of high-quality documentation out-of-the-box, a new system has been implemented. + +Warning +If your extension’s modules cannot be imported at documentation-generation time, they cannot be documented correctly by this system. +Check the logs for warnings/errors about any failures to import, and any errors propagated. + +In the Kit repo.toml, the [repo_docs.projects."kit-sdk"] section is responsible for targeting the old system, and the [repo_docs.kit] section is responsible for targeting the new. +Opt your extension in to the new system by: + +Adding the extension to the list of extensions. +In ./source/extensions/{ext_name}/docs/, Add or write an Overview.md if none exists. Users will land here first. +In ./source/extensions/{ext_name}/config/extension.toml, Add all markdown files - except README.md - to an entry per the example below. +In ./source/extensions/{ext_name}/config/extension.toml, Add any extension dependencies to which your documentation depends on links or Sphinx ref-targets existing. This syntax follows the repo_docs tools intersphinx syntax. The deps are a list of lists, where the inner list contains the name of the target intersphinx project, followed by the path to the folder containing that projects objects.inv file. http links to websites that host their objects.inv file online like python will work as well, if discoverable at docs build time. Apart from web paths, this will only work for projects inside of the kit repo for now. + +[documentation] +deps = [ + ["kit-sdk", "_build/docs/kit-sdk/latest"] +] +pages = [ + "docs/Overview.md", + "docs/CHANGELOG.md", +] + +The first item in the list will be treated as the “main page” for the documentation, and a user will land there first. +Changelogs are automatically bumped to the last entry regardless of their position in the list. + +### Dealing with Sphinx Warnings + +The introspection system ends up introducing many more objects to Sphinx than previously, and in a much more structured way. +It is therefore extremely common to come across many as-yet-undiscovered Sphinx warnings when migrating to this new system. +Here are some strategies for dealing with them. + +#### MyST-parser warnings + +These are common as we migrate away from the RecommonMark/m2r2 markdown Sphinx extensions, and towards MyST-parser, which is more extensible and stringent. +Common issues include: + +Header-level warnings. MyST does not tolerate jumping from h1 directly to h3, without first passing through h2, for example. +Links which fail to match a reference. MyST will flag these to be fixed (Consider it a QC check that your links are not broken). +Code block syntax - If the language of a code-block cannot be automatically determined, a highlighting-failure warning may be emitted. Specify the language directly after the first backticks. +General markdown syntax - Recommonmark/m2r2 were more forgiving of syntax failures. MyST can raise warnings where they would not previously. + +#### Docstring syntax warnings + +The biggest issue with the Sphinx autodoc extension’s module-introspection is that it is difficult to control which members to inspect, and doubly so when recursing or imported-members are being inspected. +Therefore, it is strongly advised that your python modules define __all__, which controls which objects are imported when from module import * syntax is used. It is also advised to do this step from the perspective of python modules acting as bindings for C++ modules. +__all__ is respected by multiple stages of the documentation generation process (introspection, autosummary stub generation, etc). +This has two notable effects: + +Items that your module imports will not be considered when determining the items to be documented. This speeds up documentation generation. +Prevents unnecessary or unwanted autosummary stubs from being generated and included in your docs. +Optimizes the import-time of your module when star-imports are used in other modules. +Unclutters imported namespaces for easier debugging. +Reduces “duplicate object” Sphinx warnings, because the number of imported targets with the same name is reduced to one. + +Other common sources of docstring syntax warnings: + +Indentation / whitespace mismatches in docstrings. +Improper usage or lack-of newlines where required. e.g. for an indented block. + +#### C++ docstring issues + +As a boon to users of the new system, and because default bindings-generated initialization docstrings typically make heavy use of asterisks and backticks, these are automatically escaped at docstring-parse time. +Please note that the pybind11_builtins.pybind11_object object Base is automatically hidden from class pages. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/embedded_kit_python.md b/embedded_kit_python.md new file mode 100644 index 0000000000000000000000000000000000000000..9a5b746bb7055f350106d3b7386d5640e0448808 --- /dev/null +++ b/embedded_kit_python.md @@ -0,0 +1,120 @@ + + +Embedded Python — kit-manual 105.1 documentation + +kit-manual + + » +Embedded Python + +  + +# Embedded Python + +Kit comes with embedded Python. Regular CPython 3.7 is used with no modifications. +Kit initializes the Python interpreter before any extension is started. Each extension can then add their own folders (or subfolders) to the sys.path (using [[python.module]] definitions). By subclassing as IExt, extensions get an entry point into Python code. They can then execute any code, import other extensions, use any API they provide. More info: Extensions. +For most applications this is all you need to know about Python in Kit. Examining sys.path at runtime is the most common way to debug most issues. This doc provides more advanced details on Python integration. + +## Hello Python + +Run > kit.exe --exec your_script.py to run your script using Kit Python. + +## Using system Python + +When the Python interpreter is initialized, system-defined environment variables (like PYTHONHOME, PYTHONPATH) are ignored. Instead, the following setting is used for python home: + +/plugins/carb.scripting-python.plugin/pythonHome instead of PYTHONHOME + +Note +You can find default values for this setting in kit-core.json file. + +To use a system-level Python installation, override PYTHONHOME, e.g.: --/plugins/carb.scripting-python.plugin/pythonHome="C:\Users\bob\AppData\Local\Programs\Python\Python310". +Changing PYTHONHOME won’t change the loaded Python library. This is platform specific, but for instance on Windows, Kit is linked with python.dll and loads the one that is in the package using standard dll search rules. However, the standard library, site-packages, and everything else will be used from the specified python path. + +## Add extra search paths + +To add search paths (to sys.path), the /app/python/extraPaths setting can be used. For example: +> kit.exe --/app/python/extraPaths/0="C:/temp" +or in a kit file: +[settings] +app.python.extraPaths = ["C:/temp"] + +To summarize, those are all the methods to extend sys.path: + +Create new extension with [python.module] definitions (recommended). +Explicitly in python code: sys.path.append(...) +The /app/python/extraPaths setting. + +## Other Python Configuration Tweaks + +Most python configuration variables can be changed using following settings: + +config variable +python flag documentation + +/plugins/carb.scripting-python.plugin/Py_VerboseFlag +Py_VerboseFlag + +/plugins/carb.scripting-python.plugin/Py_QuietFlag +Py_QuietFlag + +/plugins/carb.scripting-python.plugin/Py_NoSiteFlag +Py_NoSiteFlag + +/plugins/carb.scripting-python.plugin/Py_IgnoreEnvironmentFlag +Py_IgnoreEnvironmentFlag + +/plugins/carb.scripting-python.plugin/Py_NoUserSiteDirectory +Py_NoUserSiteDirectory + +/plugins/carb.scripting-python.plugin/Py_UnbufferedStdioFlag +Py_UnbufferedStdioFlag + +/plugins/carb.scripting-python.plugin/Py_IsolatedFlag +Py_IsolatedFlag + +## Using numpy, Pillow etc. + +Kit comes with omni.kit.pip_archive extension which has few popular Python modules bundled into it. Have a look inside of it on filesystem. +After this extension is started you can freely do import numpy. Declare a dependency on this extension in your extension, or enable it by any other means to use any of them. +E.g.: run > kit.exe --enable omni.kit.pip_archive --exec use_numpy.py to run your script that can import and use numpy. + +## Using Anaconda environment + +As a starting point change PYTHONHOME setting described above to point to Anaconda environment: --/plugins/carb.scripting-python.plugin/pythonHome="C:/Users/bob/anaconda3/envs/py37". It is known to work for some packages and fail for others, on a case by case basis. + +## Using other packages from pip + +For most Python packages (installed with any package manager or locally developed) it is enough to add them to the search path (sys.path). That makes them discoverable by the python import system. Any of the methods described above can be used for that. +Alternatively, Kit has the omni.kit.pipapi extension to install modules from the pip package manager at runtime. It will check if the package is not available, and will try to pip install it and cache it. Example of usage: omni.kit.pipapi.install("some_package"). After that call, import the installed package. +Enabling the omni.kit.pipapi extension will allow specification of pip dependencies by extensions loaded after it. Refer to omni.kit.pipapi doc. +At build-time, any Python module can be packaged into any extension, including packages from pip. That can be done using other Python installations or kit Python. This is the recommended way, so that when an extension is downloaded and installed, it is ready to use. There is also no requirement for connectivity to public registries, and no runtime cost during installation. + +## Why do some native Python modules not work in Kit? + +It is common for something that works out of the box as-installed from pip or Anaconda not to work in Kit. Or vice versa, the Kit Python module doesn’t load outside of Kit. +For pure Python modules (only *.py files), finding the root cause might be a matter of following import errors. However, when it involves loading native Python modules (*.pyd files on Windows and *.so files on Linux), errors are often not really helpful. +Native Python modules are just regular OS shared libraries, with a special C API that Python looks for. They also are often implicitly linked with other libraries. When loaded, they might not be able to find other libraries, or be in conflict with already loaded libraries. Those issues can be debugged as any other library loading issue, specific to the OS. Some examples are: + +Exploring PATH/LD_LIBRARY_PATH env vars. +Exploring libraries that are already loaded by the process. +Using tools like Dependency Walker. +Trying to isolate the issue, by loading in a simpler or more similar environment. + +Kit doesn’t do anything special in this regard, and can be treated as just another instance of Python, with a potentially different set of loaded modules. + +## Running Kit from Python + +Normally the kit.exe process starts and loads an embedded Python library. Kit provides Python bindings to its core runtime components. This allows you to start Python, and then start Kit from that Python. +It is an experimental feature, and not used often. An example can be found within the Kit package: example.pythonapp.bat. +Differences from running normally: + +A different Python library file is used (different python.dll). +There may be some GIL implications, because the call stack is different. +Allows explicit control over the update loop. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/enterprise-install.md b/enterprise-install.md new file mode 100644 index 0000000000000000000000000000000000000000..22cafa291f164f691bc3e34f1a7afa392012eba3 --- /dev/null +++ b/enterprise-install.md @@ -0,0 +1,48 @@ + + +Enterprise Install Guide — Omniverse Install Guide latest documentation + +Omniverse Install Guide + + » +Omniverse Install Guide » +Enterprise Install Guide + +  + +# Enterprise Install Guide + +Omniverse Enterprise accommodates and supports both on-premises and scalable virtual and cloud deployments. + +## Licensing + +Need walkthrough steps on setting up your Omniverse Enterprise account and getting your licenses in order? Review the Omniverse Enterprise Licensing Quick Start Guide for more information. + +## Enterprise Nucleus Server + +The following documentation is available to help you properly plan, deploy, and configure an Enterprise Nucleus Server: + +Hardware Sizing Guide - Information on server sizing for your environment +Planning Your Installation - Best practices, requirements, and prerequisites +Installing an Enterprise Nucleus Server - An easy step-by-step guide for successful installation + +## Launcher Deployment Options + +The Omniverse Launcher is available in two versions: the Workstation Launcher and the IT Managed Launcher. Omniverse Enterprise customers may choose either version depending on their deployment preference. + +The Workstation Launcher offers a complete experience and does not require IT management for application installation or updates. The Omniverse Workstation Launcher requires network connectivity and an NVIDIA account. +The IT Managed Launcher is designed to be used in an air-gapped or tightly controlled environment, and does not require network connectivity or an NVIDIA account. Installation and updates of Omniverse applications are managed by the IT administrator for end users. + +Both the Workstation Launcher and the IT Managed Launcher are available from the NVIDIA Licensing Portal. + +## Virtual Workstation Deployments + +Kit based apps (including USD Composer, USD Presenter, etc.) can be run in a virtualized environment using NVIDIA’s vGPU products. +The Virtual Deployment Guide provides an overview of how to set up a vGPU environment capable of hosting Omniverse. +Additionally, Omniverse Virtual Workstations can be run in a Cloud Service Provider (CSP) using the how-to guides here. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/event_streams.md b/event_streams.md new file mode 100644 index 0000000000000000000000000000000000000000..194ba5eba7bf47ade50f22a4f7c3c1c940c3bb7c --- /dev/null +++ b/event_streams.md @@ -0,0 +1,100 @@ + + +Event streams — kit-manual 105.1 documentation + +kit-manual + + » +Event streams + +  + +# Event streams + +Event streams are covered by the carb.events plugin and carb::events::IEvents Carbonite interface. The goal of event streams is to provide a means to move data around using the generalized interface in a thread-safe manner, and also act as a way to synchronize the logic. + +## API/design overview + +The singleton IEvents interface is used to create IEventStream objects. Whenever an event is being pushed into an event stream, the immediate callback is triggered, and the event stream stores the event in the internal event queue. Then, events can be popped from the queue one by one, or all at once (also called pump), and at this point deferred callbacks are triggered. The event stream owner typically controls where this pumping is happening. +Event consumers can subscribe to both immediate (push) and deferred (pop) callbacks. Subscription functions create ISubscription class, which usually unsubscribes automatically upon destruction. Callbacks are wrapped into IEventListener class that allows for context binding to the subscription, and upon triggering, the callback is triggered with the IEvent passed as parameter, this parameter describes the event which triggered the callback. IEvent contains event type, sender id and custom payload, which is stored as carb.dictionary item. + +## Recommended usage + +The events subsystem is flexible and there are several recommendations that are intended to help the most frequent use-cases, as well as provide clarifications on specific parts of the events logic. + +### Deferred callbacks + +As opposed to immediate callback invocation, the recommended way of using events streams is through the deferred callbacks mechanisms, unless using immediate callbacks are absolutely necessary. When an event is pushed into an event stream, it is fairly frequent that the subsequent immediate callback is not a safe place to modify or even read related data outside the event payload. To avoid corruptions, it is recommended to use the deferred callbacks, which will be triggered at some place that the event stream owner deemed safe. + +### Event types + +Each event contains an event type, which is set upon pushing the event into the stream, and can be specified when a consumer subscribes to an event stream. This can be used to narrow/decrease the number of callback invocations, which is especially important when listening to the event stream from the scripting language. +It is recommended to use string hashes as event types, as this will help avoid managing the event type allocation in case multiple sources can push events into an event stream. In C++, use CARB_EVENTS_TYPE_FROM_STR which provides a 64-bit FNV-1a hash computed in compile-time, or its run-time counterpart, carb::events::typeFromString. In Python, carb.events.type_from_string can be used. +Important event streams design choices: either multiple event streams with fairly limited number of event types served by each, or one single event stream can be created, serving many different event types. The latter approach is more akin to the event bus with many producers and consumers. Event buses are useful when designing a system that is easily extendable. + +### Transient subscriptions + +In case you want to implement a deferred-action triggered by some event - instead of subscribing to the event on startup and then checking the action queue on each callback trigger, consider doing the transient subscriptions. +This approach involves subscribing to the event stream only after you have a specific instance of action you want to execute in a deferred manner. When the event callback subscription is triggered, you execute the action and immediately unsubscribe, so you don’t introduce an empty callback ticking unconditionally each time the event happens. +The transient subscription can also include a simple counter, so you execute your code only on Nth event, not necessarily on the next one. + +## Code examples + +### Subscribe to Shutdown Events + +# App/Subscribe to Shutdown Events +import carb.events +import omni.kit.app + +# Stream where app sends shutdown events +shutdown_stream = omni.kit.app.get_app().get_shutdown_event_stream() + +def on_event(e: carb.events.IEvent): + if e.type == omni.kit.app.POST_QUIT_EVENT_TYPE: + print("We are about to shutdown") + +sub = shutdown_stream.create_subscription_to_pop(on_event, name="name of the subscriber for debugging", order=0) + +### Subscribe to Update Events + +# App/Subscribe to Update Events +import carb.events +import omni.kit.app + +update_stream = omni.kit.app.get_app().get_update_event_stream() + +def on_update(e: carb.events.IEvent): + print(f"Update: {e.payload['dt']}") + +sub = update_stream.create_subscription_to_pop(on_update, name="My Subscription Name") + +### Create custom event + +# App/Create Custom Event +import carb.events +import omni.kit.app + +# Event is unique integer id. Create it from string by hashing, using helper function. +# [ext name].[event name] is a recommended naming convention: +MY_CUSTOM_EVENT = carb.events.type_from_string("omni.my.extension.MY_CUSTOM_EVENT") + +# App provides common event bus. It is event queue which is popped every update (frame). +bus = omni.kit.app.get_app().get_message_bus_event_stream() + +def on_event(e): + print(e.type, e.type == MY_CUSTOM_EVENT, e.payload) + +# Subscribe to the bus. Keep subscription objects (sub1, sub2) alive for subscription to work. +# Push to queue is called immediately when pushed +sub1 = bus.create_subscription_to_push_by_type(MY_CUSTOM_EVENT, on_event) +# Pop is called on next update +sub2 = bus.create_subscription_to_pop_by_type(MY_CUSTOM_EVENT, on_event) + +# Push event the bus with custom payload +bus.push(MY_CUSTOM_EVENT, payload={"data": 2, "x": "y"}) + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/extensions_advanced.md b/extensions_advanced.md new file mode 100644 index 0000000000000000000000000000000000000000..68e2f98bed699ae6e74e58f6c252d230cb765006 --- /dev/null +++ b/extensions_advanced.md @@ -0,0 +1,938 @@ + + +Extensions in-depth — kit-manual 105.1 documentation + +kit-manual + + » +Extensions in-depth + +  + +# Extensions in-depth + +## What is an Extension? + +An extension is, in its simplest form, just a folder with a config file (extension.toml). The Extension system will find that extension and if it’s enabled it will do whatever the config file tells it to do, which may include loading python modules, Carbonite plugins, shared libraries, applying settings etc. +There are many variations, you can have an extension whose sole purpose is just to enable 10 other extensions for example, or just apply some settings. + +## Extension in a single folder + +Everything that an extension has should be contained or nested within its root folder. This is a convention we are trying to adhere to. Looking at other package managers, like those in the Linux ecosystem, the content of packages can be spread across the filesystem, which makes some things easier (like loading shared libraries), but also creates many other problems. +Following this convention makes the installation step very simple - we just have to unpack a single folder. +A typical extension might look like this: +[extensions-folder] +└── omni.appwindow + │──bin + │ └───windows-x86_64 + │ └───debug + │ └─── omni.appwindow.plugin.dll + │───config + │ └─── extension.toml + └───omni + └───appwindow + │─── _appwindow.cp37-win_amd64.pyd + └─── __init__.py + +This example contains a Carbonite plugin and a python module (which contains the bindings to this plugin). + +## Extension Id + +Extension id consists of 3 parts: [ext_name]-[ext_tag]-[ext_version]: + +[ext_name]: Extension name. Extension folder or kit file name. +[ext_tag]: Extension tag. Optional. Used to have different implementations of the same extension. Also part of folder or kit file name. +[ext_version]: Extension version. Defined in extension.toml. Can also be part of folder name, but ignored there. + +Extension id example: omni.kit.commands-1.2.3-beta.1. Extension name is omni.kit.commands. Version is 1.2.3-beta.1. Tag is empty. + +## Extension Version + +Version is defined in [package.version] config field. +Semantic Versioning is used. A good example of valid and invalid versions: link +In short, it is [major].[minor].[patch]-[prerelease]. Express compatibility with version change: + +For breaking change increment major version +For backwards compatible change increment minor version +For bugfixes increment patch version + +Use [prerelease] part to test a new version e.g. 1.2.3-beta.1 + +## Extension Package Id + +Extension package id is extension id plus build metadata. [ext_id]+[build_meta]. +One extension id can have 1 or multiple packages in order to support different targets. It is common for binary extensions to have packages like: + +[ext_id]+wx64.r - windows-x86_64, release config. +[ext_id]+lx64.r - linux-x86_64, release config. +[ext_id]+lx64.d - linux-x86_64, debug config. +… + +Python version or kit version can also denote different target. Refer to [package.target] section of extension config. + +## Single File Extensions + +Single file Extensions are supported - i.e. Extensions consisting only of a config file, without any code. In this case the name of the config will be used as the extension ID. This is used to make a top-level extension which we call an app. They are used as an application entry point, to unroll the whole extension tree. +The file extension can be anything (.toml for instance), but the recommendation is to name them with the .kit file extension, so that it can be associated with the kit.exe executable and launched with a single click. +[extensions-folder] +└── omni.exp.hello.kit + +## App Extensions + +When .kit files are passed to kit.exe they are treated specially: +This: > kit.exe C:/abc/omni.exp.hello.kit +Is the same as: > kit.exe --ext-path C:/abc/omni.exp.hello.kit --enable omni.exp.hello +It adds this .kit file as an extension and enables it, ignoring any default app configs, and effectively starting an app. +Single file (.kit file) extensions are considered apps, and a “launch” button is added to it in the UI of the extension browser. For regular extensions, specify the keyword: package.app = true in the config file to mark your extension as an app that users can launch. +App extensions can be published, versioned, etc. just like normal extensions. So for instance if the omni.exp.hello example from above is published, we can just run Kit as: +> kit.exe omni.exp.hello.kit +Kit will pull it from the registry and start. + +## Extension Search Paths + +Extensions are automatically searched for in specified folders. +Core Kit config kit-core.json specifies default search folders in /app/exts/foldersCore setting. This way Kit can find core extensions, it also looks for extensions in system-specific documents folders for user convenience. +To add more folders to search paths there are a few ways: + +Pass --ext-folder [PATH] CLI argument to kit. +Add to array in settings: /app/exts/folders +Use the omni::ext::ExtensionManager::addPath API to add more folders (also available in python). + +To specify direct path to a specific extension use the /app/exts/paths setting or the --ext-path [PATH] CLI argument. +Folders added last are searched first. This way they will be prioritized over others, allowing the user to override existing extensions. +Example of adding an extension seach path in a kit file: +[settings.app.exts] +folders.'++' = [ + "C:/hello/my_extensions" +] + +### Custom Search Paths Protocols + +Both folders and direct paths can be extended to support other url schemes. If no scheme is specified, they are assumed to be local filesystem. The extension system provides APIs to implement custom protocols. This way an extension can be written to enable searching for extensions in different locations, for example: git repos. +E.g. --ext-folder foo://abc/def – The extension manager will redirect this search path to the implementor of the foo scheme, if it was registered. + +### Git URL as Extension Search Paths + +Extension omni.kit.extpath.git implements following extension search path schemes: git, git+http, git+https, git+ssh. +Optional URL query params are supported: + +dir subdirectory of a git repo to use as a search path (or direct path). +branch git branch to checkout +tag git tag to checkout +sha git sha to checkout + +Example of usage with cmd arg: + +--ext-folder git://github.com/bob/somerepo.git?branch=main&dir=exts – Add exts subfolder and main branch of this git repo as extension search paths. + +Example of usage in kit file: +[settings.app.exts] +folders.'++' = [ + "git+https://gitlab-master.nvidia.com/bob/some-repo.git?dir=exts&branch=feature" +] + +After the first checkout, the git path is cached into global cache. To pull updates: + +use extension manager properties pages +setting: --/exts/omni.kit.extpath.git/autoUpdate=1 +API call omni.kit.extpath.git.update_all_git_paths() + +The Extension system automatically enables this extension if a path with a scheme is added. It enables extensions specified in a setting: app/extensions/pathProtocolExtensions, which by default is ["omni.kit.extpath.git"]. + +Note +Git installation is required for this functionality. It expects the git executable to be available in system shell. + +## Extension Discovery + +The Extension system monitors any specified extension search folders (or direct paths) for changes. It automatically syncs all changed/added/removed extensions. Any subfolder which contains an extension.toml in the root or config folder is considered to be an extension. +The subfolder name uniquely identifies the extension and is used to extract the extension name and tag: [ext_name]-[ext_tag] +[extensions-folder] +└── omni.kit.example-gpu-2.0.1-stable.3+cp37 + ├── extension.toml + └── ... + +In this example we have an extension omni.kit.example-gpu-2.0.1-stable.3+cp37, where: + +name: omni.kit.example +tag: gpu (optional, default is “”) + +The version and other information (like supported platforms) are queried in the extension config file (see below). They may also be included in the folder name, which is what the system does with packages downloaded from a remote registry, but that is not “the ground truth” for that data. So in this example anything could have been after the “gpu” tag, e.g. omni.kit.example-gpu-whatever. + +## Extension Dependencies + +When a Kit-based application starts, it discovers all extensions and does nothing with them until some of them are enabled, whether via config file or API. Each extension can depend on other extensions and this is where the whole application tree can unroll. The user may enable a high level extension like omni.usd_viewer which will bring in dozens of others. +An extension can express dependencies on other extensions using name, version and optionally tag. It is important to keep extensions versioned properly and express breaking changes using Semantic Versioning. +This is a good place to grasp what tag is for. If extension foo depends on bar, you might implement other versions of bar, like: bar-light, bar-prototype. If they still fulfill the same API contract and expected behavior, you can safely substitute bar without foo noticing. In other words if the extension is an interface, tag is the implementation. +The effect is that just enabling some high-level extensions like omni.kit.window.script_editor will expand the whole dependency tree in the correct order without the user having to specify all of them or worry about initialization order. +One can also substitute extensions in a tree with a different version or tag, towards the same end-user experience, but having swapped in-place a different low-level building block. +When an extension is enabled, the manager tries to satisfy all of its dependencies by recursively solving the dependency graph. This is a difficult problem - If dependency resolution succeeds the whole dependency tree is enabled in-order so that all dependents are enabled first. The opposite is true for disabling extensions. All extensions which depend on the target extension are disabled first. More details on the dependency system can be found in the C++ unit tests: source/tests/test.unit/ext/TestExtensions.cpp +A Dependency graph defines the order in which extensions are loaded - it is sorted topologically. There are however, many ways to sort the same graph (think of independent branches). To give finer control over startup order, the order parameters can be used. Each extension can use core.order config parameter to define its order and the order of dependencies can also be overriden with order param in [[dependencies]] section. Those with lower order will start sooner. If there are multiple extensions that depend on one extension and are trying to override this order then the one that is loaded last will be used (according to dependency tree). In summary - the dependency order is always satisfied (or extensions won’t be started at all, if the graph contains cycles) and soft ordering is applied on top using config params. + +## Extension configuration file (extension.toml) + +An Extension config file can specify: + +Dependencies to import +Settings +A variety of metadata/information which are used by the Extension Registry browser (for example) + +TOML is the format used. See this short toml tutorial. +Note in particular the [[]] TOML syntax for arrays of objects and quotes around keys which contain special symbols(e.g. "omni.physx"). +The config file should be placed in the root of the extension folder or in a config subfolder. + +Note +All relative paths in configs are relative to the extension folder. All paths accept tokens. (like ${platform}, ${config}, ${kit} etc). More info: Tokens. + +There are no mandatory fields in a config, so even with an empty config, the extension will be considered valid and can be enabled - without any effect. +Next we will list all the config fields the extension system uses, though a config file may contain more. The Extension system provides a mechanism to query config files and hook into itself. That allows us to extend the extension system itself and add new config sections. For instance omni.kit.pipapi allows extensions to specify pip packages to be installed before enabling them. More info on that: Hooks. That also means that typos or unknown config settings will be left as-is and no warning will be issued. + +### Config Fields + +#### [core] section + +For generic extension properties. Used directly by the Extension Manager core system. + +##### [core.reloadable] (default: true) + +Is the extension reloadable? The Extension system will monitor the extension’s files for changes and try to reload the extension when any of them change. If the extension is marked as non-reloadable, all other extensions that depend on it are also non-reloadable. + +##### [core.order] (default: 0) + +When extensions are independent of each other they are enabled in an undefined order. An extension can be ordered to be before (negative) or after (positive) other extensions + +#### [package] section + +Contains information used for publishing extensions and displaying user-facing details about the package. + +##### [package.version] (default: "0.0.0") + +Extension version. This setting is required in order to publish extensions to the remote registry. The Semantic Versioning concept is baked into the extension system, so make sure to follow the basic rules: + +Before you reach 1.0.0, anything goes, but if you make breaking changes, increment the minor version. +After 1.0.0, only make breaking changes when you increment the major version. +Incrementing the minor version implies a backward-compatible change. Let’s say extension bar depends on foo-1.2.0. That means that foo-1.3.0, foo-1.4.5, etc.. are also suitable and can be enabled by extension system. +Use version numbers with three numeric parts such as 1.0.0 rather than 1.0. +Prerelease labels can also be used like so: 1.3.4-beta, 1.3.4-rc1.test.1, or 1.3.4-stable. + +##### [package.title] default: "" + +User-facing package name, used for UI. + +##### [package.description] default: "" + +User facing package description, used for UI. + +##### [package.category] (default: "") + +Extension category, used for UI. One of: + +animation +graph +rendering +audio +simulation +example +internal +other + +##### [package.app] (default: false) + +Whether the extension is an App. Used to mark extension as an app in the UI. Adds a “Launch” button to run kit with only this extension (and its dependents) enabled. For single-file extensions (.kit files), it defaults to true. + +##### [package.feature] (default: false) + +Extension is a Feature. Used to show user-facing extensions, suitable to be enabled by the user from the UI. By default, the app can choose to show only those feature extensions. + +##### [package.toggleable] (default: true) + +Indicates whether an extension can be toggled (i.e enabled/disabled) by the user from the UI. There is another related setting: [core.reloadable], which can prevent the user from disabling an extension in the UI. + +##### [package.authors] (default: [""]) + +Lists people or organizations that are considered the “authors” of the package. Optionally include email addresses within angled brackets after each author. + +##### [package.repository] (default: "") + +URL of the extension source repository, used for display in the UI. + +##### [package.keywords] (default: [""]) + +Array of strings that describe this extension. Helpful when searching for it in an Extension registry. + +##### [package.changelog] (default: "") + +Location of a CHANGELOG.MD file in the target (final) folder of the Extension, relative to the root. The UI will load and show it. We can also insert the content of that file inline instead of specifying a filepath. It is important to keep the changelog updated when new versions of an extension are released and published. +For more info on writing changelogs refer to Keep a Changelog + +##### [package.readme] (default: "") + +Location of README file in the target (final) folder of an extension, relative to the root. The UI will load and show it. We can also insert the content of that file inline instead of specifying a filepath. + +##### [package.preview_image] (default: "") + +Location of a preview image in the target (final) folder of extension, relative to the root. The preview image is shown in the “Overview” of the extension in the Extensions window. A screenshot of your extension might make a good preview image. + +##### [package.icon] (default: "") + +Location of the icon in the target (final) folder of extension, relative to the root. Icon is shown in Extensions window. Recommended icon size is 256x256 pixels. + +##### [package.target] + +This section is used to describe the target platform this extension runs on - this is fairly arbitrary, but can include: + +Operating system +CPU architecture +Python version +Build configuration + +The Extension system will filter out extensions that doesn’t match the current environment/platform. This is particularly important for extensions published and downloaded from a remote Extension registry. +Normally you don’t need to fill this section in manually. When extensions are published, this will be automatically filled in with defaults, more in Publishing Extensions. But it can be overriden by setting: +package.target.kit (default: ["*"] – Kit version (major.minor), e.g. "101.0", "102.3". +package.target.kitHash (default: ["*"] – Kit git hash (8 symbols), e.g. "abcdabcd" +package.target.config (default: ["*"] – Build config, e.g. "debug", "release". +package.target.platform (default: ["*"] – Build platform, e.g. "windows-x86_64", "linux-aarch64". +package.target.python (default: ["*"] – Python version, e.g. "cp37" (cpython 3.7). Refer to PEP 0425. +Wildcards can be used. A full example: +[package.target] +config = ["debug"] +platform = ["linux-*", "windows"] +python = ["*"] + +##### [package.writeTarget] + +This section can be used to explicitly control if [package.target] should be written. By default it is written based on rules described in Extension Publishing. But if for some [target] a field is set, such as package.writeTarget.[target] = true/false, that tells explicitly whether it should automatically be filled in. +For example if you want to target a specific kit version to make the extension only work with that version, set: +[package] +writeTarget.kit = true + +Or if you want your extension to work for all python versions, write: +[package] +writeTarget.python = false + +The list of known targets is the same as in the [package.target] section: kit, config, platform, python. + +#### [dependencies] section + +This section is used to describe which extensions this extension depends on. The extension system will guarantee they are enabled before it loads your extension (assuming that it doesn’t fail to enable any component). One can optionally specify a version and tag per dependency, as well as make a dependency optional. +Each entry is a name of other extension. It may or may not additionally specify: tag, version, optional, exact: +"omni.physx" = { version="1.0", "tag"="gpu" } +"omni.foo" = { version="3.2" } +"omni.cool" = { optional = true } + +Note that it is highly recommended to use versions, as it will help maintain stability for extensions (and the whole application) - i.e if a breaking change happens in a dependency and dependents have not yet been updated, an older version can still be used instead. (only the major and minor parts are needed for this according to semver). +optional (default: false) – will mean that if the extension system can’t resolve this dependency the extension will still be enabled. So it is expected that the extension can handle the absence of this dependency. Optional dependencies are not enabled unless they are a non-optional dependency of some other extension which is enabled, or if they are enabled explicitly (using API, settings, CLI etc). +exact (default: false) – only an exact version match of extension will be used. This flag is experimental and may change. +order (default: None) – override the core.order parameter of an extension that it depends on. Only applied if set. + +#### [python] section + +If an extension contains python modules or scripts this is where to specify them. + +##### [[python.module]] + +Specifies python module(s) that are part of this extension. Multiple can be specified. Take notice the [[]] syntax. +When an extension is enabled, modules are imported in order. Here we specify 2 python modules to be imported (import omni.hello and import omni.calculator). +When modules are scheduled for import this way, they will be reloaded if the module is already present. +Example: +[[python.module]] +name = "omni.hello" + +[[python.module]] +name = "omni.calculator" +path = "." +public = true + +name (required) – python module name, can be empty. Think of it as what will be imported by other extensions that depend on you: +import omni.calculator + +public (default: true) – If public, a module will be available to be imported by other extensions (extension folder is added to sys.path). Non-public modules have limited support and their use is not recommended. +path (default: ".") – Path to the root folder where the python module is located. If written as relative, it is relative to extension root. Think of it as what gets added to sys.path. By default the extension root folder is added if any [[python.module]] directive is specified. +searchExt (default: true) – If true, imports said module and launches the extensions search routine within the module. If false, only the module is imported. +By default the extension system uses a custom fast importer. Fast importer only looks for python modules in extension root subfolders that correspond to the module namespace. In the example above it would only look in [ext root]/omni/**. If you have other subfolders that contain python modules you at least need to specify top level namespace. E.g. if you have also foo.bar in [ext root]/foo/bar.py: +[[python.module]] +name = "foo" + +Would make it discoverable by fast importer. You can also just specify empty name to make importer search all subfolders: +[[python.module]] +path = "." + +Example of that is in omni.kit.pip_archive which brings a lot of different modules, which would be tedious to list. + +##### [[python.scriptFolder]] + +Script folders can be added to IAppScripting, and they will be searched for when a script file path is specified to executed (with –exec or via API). +Example: +[[python.scriptFolder]] +path = "scripts" + +path (required) – Path to the script folder to be added. If the path is relative it is relative to the extension root. + +#### [native] section + +Used to specify Carbonite plugins to be loaded. + +##### [[native.plugin]] + +When an Extension is enabled, the Extension system will search for Carbonite plugins using path pattern and load all of them. It will also try to acquire the omni::ext::IExt interface if any of the plugins implements it. That provides an optional entry point in C++ code where your extension can be loaded. +When an extension is disabled it releases any acquired interfaces which may lead to plugins being unloaded. +Example: +[[native.plugin]] +path = "bin/${platform}/${config}/*.plugin" +recursive = false + +path (required) – Path to search for Carbonite plugins, may contain wildcards and Tokens). +recursive (default: false) – Search recursively in folders. + +##### [[native.library]] section + +Used to specify shared libraries to load when an Extension is enabled. +When an Extension is enabled the Extension system will search for native shared libraries using path and load them. This mechanism is useful to “preload” libraries needed later, avoid OS specific calls in your code, and the use of PATH/LD_LIBRARY_PATH etc to locate and load DSOs/DLLs. With this approach we just load the libraries needed directly. +When an extension is disabled it tries to unload those shared libraries. +Example: +[[native.library]] +path = "bin/${platform}/${config}/foo.dll" + +path (required) – Path to search for shared libraries, may contain wildcards and Tokens. + +#### [settings] section + +Everything under this section is applied to the root of the global Carbonite settings (carb.settings.plugin). In case of conflict, the original setting is kept. +It is good practice to namespace your settings with your extension name and put them all under the exts root key, e.g.: +[settings] +exts."omni.kit.renderer.core".compatibilityMode = true + +Note +Quotes are used here to distinguish between the . of a toml file and the . in the name of extension. + +An important detail is that settings are applied in reverse order of extension startup (before any extensions start) and they don’t override each other. Therefore a parent extension can specify settings for child extensions to use. + +#### [[env]] section + +This section is used to specify one or more environment variables to set when an extension is enabled. Just like settings, env vars are applied in reverse order of startup. +They don’t by default override if already set, but override behavior does allow parent extensions to override env vars of extensions they depend on. +Example: +[[env]] +name = "HELLO" +value = "123" +isPath = false +append = false +override = false +platform = "windows-x86_64" + +name (required) – Environment variable name. +value (required) – Environment variable value to set. +isPath (default: false) – Treat value as path. If relative it is relative to the extension root folder. Tokens can also be used as within any path. +append (default: false) – Append value to already set env var if any. Platform-specific separators will be used. +override (default: false) – Override value of already set env var if any. +platform (default: "") – Set only if platform matches pattern. Wildcards can be used. + +#### [fswatcher] section + +Used to specify file system watcher used by the Extension system to monitor for changes in extensions and auto reload. + +##### [fswatcher.patterns] + +Specify files that are monitored. +include (default: ["*.toml", "*.py"]) – File patterns to include. +exclude (default: []) – File patterns to exclude. +Example: +[fswatcher.patterns] +include = ["*.toml", "*.py", "*.txt"] +exclude = ["*.cache"] + +##### [fswatcher.paths] + +Specify folders that are monitored. FS watcher will use OS specific API to listen for changes on those folders. You can use that setting that limit amount of subscriptions if your extensions has too many folders inside. +Simple path as string pattern matching is used, where ‘*’ means any amount of symbols. Patterns like */123* will match abc/123/def, abc/123, abc/1234. +‘/’ path separator is used on all platforms. Matching paths are relative to extension root, they begin and end with ‘/’. +include (default: ["*/config/*", "*/./*"] and python modules) – Folder path patterns to include. +exclude (default: ["*/__pycache__/*", "*/.git/*"]) – Folder path patterns to exclude. +Example: +[fswatcher.paths] +include = ["*/config"] +exclude = ["*/data*"] + +#### [[test]] section + +This section is read only by the testing system (omni.kit.test extension) when running per-extension tests. Extension tests are run as a separate process where only the tested extension is enabled and runs all the tests that it has. Usually this section can be left empty, but extensions can specify additional extensions (which are not a part of their regular dependencies, or when the dependency is optional), additional cmd arguments, or filter out (or in) any additional stdout messages. +Each [[test]] entry will run a separate extension test process. +Extension tests run in the context of an app. An app can be empty, which makes extension test isolated and only its dependencies are enabled. Testing in an empty app is the minimal recommended test coverage. Extension developers can then opt-in to be tested in other apps and fine-tune their test settings per app. +Example: +[[test]] +name = "default" +enabled = true +apps = [""] +args = ["-v"] +dependencies = ["omni.kit.capture"] +pythonTests.include = ["omni.foo.*"] +pythonTests.exclude = [] +cppTests.libraries = ["bin/${lib_prefix}omni.appwindow.tests${lib_ext}"] +timeout = 180 +parallelizable = true +unreliable = false +profiling = false +pyCoverageEnabled = false +waiver = "" +stdoutFailPatterns.include = ["*[error]*", "*[fatal]*"] +stdoutFailPatterns.exclude = [ + "*Leaking graphics objects*", # Exclude grahics leaks until fixed +] + +name – Test process name. If there are multiple [[test]] entries, this name must be unique. +enabled – If tests are enabled. By default it is true. Useful to disable tests per platform. +apps – List of apps to use this test configuration for. Used in case there are multiple [[test]] entries. Wildcards are supported. Defaults to [""] which is an empty app. +args – Additional cmd arguments to pass into the extension test process. +dependencies – List of additional extensions to enable when running the extension tests. +pythonTests.include – List of tests to run. If empty, python modules are used instead ([[python.module]]), since all tests names start with module they are defined in. Can contain wildcards. +pythonTests.exclude – List of tests to exclude from running. Can contain wildcards. +cppTests.libraries – List of shared libraries with C++ doctests to load. +timeout (default: 180) – Test process timeout (in seconds). +parallelizable (default: true) – Whether the test processes can run in parallel relative to other test processes. +unreliable (default: false) – If marked as unreliable, test failures won’t fail a whole test run. +profiling (default: true) – Collects and outputs Chrome trace data via carb profiling for CPU events for the test process. +pyCoverageEnabled (default: false) – Collects python code coverage using Coverage.py. +waiver – String explaining why an extension contains no tests. +stdoutFailPatterns.include – List of additional patterns to search stdout for and mark as a failure. Can contain wildcards. +stdoutFailPatterns.exclude – List of additional patterns to search stdout for and exclude as a test failure. Can contain wildcards. + +#### [documentation] section + +This section is read by the omni.kit.documenation.builder extension, and is used to specify a list of markdown files for in-app API documentation and offline sphinx generation. +Example: +[documentation] +pages = ["docs/Overview.md"] +menu = "Help/API/omni.kit.documentation.builder" +title = "Omni UI Documentation Builder" + +pages – List of .md file paths, relative to the extension root. +menu – Menu item path to add to the popup in-app documentation window. +title – Title of the documentation window. + +### Config Filters + +Any part of a config can be filtered based on the current platform or build configuration. Use "filter:platform"."[platform_name]" or "filter:config"."[build_config]" pair of keys. Anything under those keys will be merged on top of the tree they are located in (or filtered out if it doesn’t apply). + +filter +values + +platform +windows-x86_64, linux-x86_64 + +config +debug, release + +To understand, here are some examples: +[dependencies] +"omni.foo" = {} +"filter:platform"."windows-x86_64"."omni.fox" = {} +"filter:platform"."linux-x86_64"."omni.owl" = {} +"filter:config"."debug"."omni.cat" = {} + +After loading that extension on a Windows debug build, it would resolve to: +[dependencies] +"omni.foo" = {} +"omni.fox" = {} +"omni.cat" = {} + +Note +You can debug this behavior by running in debug mode, with --/app/extensions/debugMode=1 setting and looking into the log file. + +### Example + +Here is a full example of an extension.toml file: +[core] +reloadable = true +order = 0 + +[package] +version = "0.1.0" +category = "Example" +feature = false +app = false +title = "The Best Package" +description = "long and boring text.." +authors = ["John Smith "] +repository = "https://gitlab-master.nvidia.com/omniverse/kit" +keywords = ["banana", "apple"] +changelog = "docs/CHANGELOG.md" +readme = "docs/README.md" +preview_image = "data/preview.png" +icon = "data/icon.png" + +# writeTarget.kit = true +# writeTarget.kitHash = true +# writeTarget.platform = true +# writeTarget.config = true +# writeTarget.python = true + +[dependencies] +"omni.physx" = { version="1.0", "tag"="gpu" } +"omni.foo" = {} + +# Modules are loaded in order. Here we specify 2 python modules to be imported (``import hello`` and ``import omni.physx``). +[[python.module]] +name = "hello" +path = "." +public = false + +[[python.module]] +name = "omni.physx" + +[[python.scriptFolder]] +path = "scripts" + +# Native section, used if extension contains any Carbonite plugins to be loaded +[[native.plugin]] +path = "bin/${platform}/${config}/*.plugin" +recursive = false # false is default, hence it is optional + +# Library section. Shared libraries will be loaded when the extension is enabled, note [[]] toml syntax for array of objects. +[[native.library]] +path = "bin/${platform}/${config}/foo.dll" + +# Settings. They are applied on the root of global settings. In case of conflict original settings are kept. +[settings] +exts."omni.kit.renderer.core".compatibilityMode = true + +# Environment variables. Example of adding "data" folder in extension root to PATH on Windows: +[[env]] +name = "PATH" +value = "data" +isPath = true +append = true +platform = "windows-x86_64" + +# Fs Watcher patterns and folders. Specify which files are monitored for changes to reload an extension. Use wildcard for string matching. +[fswatcher] +patterns.include = ["*.toml", "*.py"] +patterns.exclude = [] +paths.include = ["*"] +paths.exclude = ["*/__pycache__*", "*/.git*"] + +[documentation] +pages = ["docs/Overview.md"] +menu = "Help/API/omni.kit.documentation.builder" +title = "Omni UI Documentation Builder" + +## Extension Enabling/Disabling + +Extensions can be enabled and disabled at runtime using the provided API. The default Create application comes with an Extension Manager UI which shows all the available extensions and allows a user to toggle them. An App configuration file can also be used to control which extensions are to be enabled. +You may also use command-line arguments to the Kit executable (or any Omniverse App based on Kit) to enable specific extensions: +Example: > kit.exe --enable omni.kit.window.console --enable omni.kit.window.extensions +--enable adds the chosen extension to the “enabled list”. The command above will start only extensions needed to show those 2 windows. + +### Python Modules + +Enabling an extension loads the python modules specified and searches for children of :class:omni.ext.IExt class. They are instantiated and the on_startup method is called, e.g.: +hello.py +import omni.ext + +class MyExt(omni.ext.IExt): + def on_startup(self, ext_id): + pass + + def on_shutdown(self): + pass + +When an extension is disabled, on_shutdown is called and all references to the extension object are released. + +### Native Plugins + +Enabling an extension loads all Carbonite plugins specified by search masks in the native.plugin section. If one or more plugins implement the omni::ext::IExt interface, it is acquired and the onStartup method is called. +When an extension is disabled, onShutdown is called and the interface is released. + +### Settings + +Settings to be applied when an extension is enabled can be specified in the settings section. They are applied on the root of global settings. In case of any conflicts, the original settings are kept. It is recommended to use the path exts/[extension_name] for extension settings, but in general any path can be used. +It is also good practice to document each setting in the extension.toml file, for greater discoverability of which settings a particular extension supports. + +### Tokens + +When extension is enabled it sets tokens into the Carbonite ITokens interface with a path to the extension root folder. E.g. for the extension omni.foo-bar, the tokens ${omni.foo} and ${omni.foo-bar} are set. + +## Extensions Manager + +### Reloading + +Extensions can be hot reloaded. The Extension system monitors the file system for changes to enabled extensions. If it finds any, the extensions are disabled and enabled again (which can involve reloading large parts of the dependency tree). This allows live editing of python code and recompilation of C++ plugins. +Use the fswatcher.patterns and fswatcher.paths config settings (see above) to control which files change triggers reloading. +Use the reloadable config setting to disable reloading. This will also block the reloading of all extensions this extension depends on. The extension can still be unloaded directly using the API. +New extensions can also be added and removed at runtime. + +### Extension interfaces + +The Extension manager is implemented in omni.ext.plugin, with an interface: +omni::ext::IExtensions (for C++), and omni.ext module (for python) +It is loaded by omni.kit.app and you can get an extension manager instance using its interface: +omni::kit::IApp (for C++) and omni.kit.app (for python) + +### Runtime Information + +At runtime, a user can query various pieces of information about each extension. Use omni::ext::IExtensions::getExtensionDict() to get a dictionary for each extension with all the relevant information. +For python use omni.ext.ExtensionManager.get_extension_dict(). +This dictionary contains: + +Everything the extension.toml contains under the same path +An additional state section which contains: + +state/enabled (bool): Indicates if the extension is currently enabled. +state/reloadable (bool): Indicates if the extension can be reloaded (used in the UI to disable extension unloading/reloading) + +### Hooks + +Both the C++ and python APIs for the Extension system provide a way to hook into certain actions/phases of the Extension System to enable extending it. If you register a hook like this: +def on_before_ext_enabled(self, ext_id: str, *_): + pass + +manager = omni.kit.app.get_app_interface().get_extension_manager() +self._hook = self._manager.get_hooks().create_extension_state_change_hook( + self.on_before_ext_enabled, + omni.ext.ExtensionStateChangeType.BEFORE_EXTENSION_ENABLE, + ext_dict_path="python/pipapi", + hook_name="python.pipapi", +) + +…your callback will be called before each extension that contain the “python/pipapi” key in a config file is enabled. This allows us to write extension that extend the Extension system. They can define their own configuration settings and react to them when extensions which contain those settings get loaded. + +### Extension API Code Examples + +#### Enable Extension + +# Extensions/Enable Extension +import omni.kit.app + +manager = omni.kit.app.get_app().get_extension_manager() + +# enable immediately +manager.set_extension_enabled_immediate("omni.kit.window.about", True) +print(manager.is_extension_enabled("omni.kit.window.about")) + +# or next update (frame), multiple commands are be batched +manager.set_extension_enabled("omni.kit.window.about", True) +manager.set_extension_enabled("omni.kit.window.console", True) + +#### Get All Extensions + +# Extensions/Get All Extensions +import omni.kit.app + +# there are a lot of extensions, print only first N entries in each loop +PRINT_ONLY_N = 10 + +# get all registered local extensions (enabled and disabled) +manager = omni.kit.app.get_app().get_extension_manager() +for ext in manager.get_extensions()[:PRINT_ONLY_N]: + print(ext["id"], ext["package_id"], ext["name"], ext["version"], ext["path"], ext["enabled"]) + +# get all registered non-local extensions (from the registry) +# this call blocks to download registry (slow). You need to call it at least once, or use refresh_registry() for non-blocking. +manager.sync_registry() +for ext in manager.get_registry_extensions()[:PRINT_ONLY_N]: + print(ext["id"], ext["package_id"], ext["name"], ext["version"], ext["path"], ext["enabled"]) + +# functions above print all versions of each extension. There is other API to get them grouped by name (like in ext manager UI). +# "enabled_version" and "latest_version" contains the same dict as returned by functions above, e.g. with "id", "name", etc. +for summary in manager.fetch_extension_summaries()[:PRINT_ONLY_N]: + print(summary["fullname"], summary["flags"], summary["enabled_version"]["id"], summary["latest_version"]["id"]) + +# get all versions for particular extension +for ext in manager.fetch_extension_versions("omni.kit.window.script_editor"): + print(ext["id"]) + +#### Get Extension Config + +# Extensions/Get Extension Config +import omni.kit.app + +manager = omni.kit.app.get_app().get_extension_manager() + +# There could be multiple extensions with same name, but different version +# Extension id is: [ext name]-[ext version]. +# Many functions accept extension id: +ext_id = manager.get_enabled_extension_id("omni.kit.window.script_editor") +data = manager.get_extension_dict(ext_id) + +# Extension dict contains whole extension.toml as well as some runtime data: +# package section +print(data["package"]) +# is enabled? +print(data["state/enabled"]) +# resolved runtime dependencies +print(data["state/dependencies"]) +# time it took to start it (ms) +print(data["state/startupTime"]) + +# can be converted to python dict for convenience and to prolong lifetime +data = data.get_dict() +print(type(data)) + +#### Get Extension Path + +# Extensions/Get Extension Path +import omni.kit.app + +manager = omni.kit.app.get_app().get_extension_manager() + +# There could be multiple extensions with same name, but different version +# Extension id is: [ext name]-[ext version]. +# Many functions accept extension id. +# You can get extension of enabled extension by name or by python module name: +ext_id = manager.get_enabled_extension_id("omni.kit.window.script_editor") +print(ext_id) +ext_id = manager.get_extension_id_by_module("omni.kit.window.script_editor") +print(ext_id) + +# There are few ways to get fs path to extension: +print(manager.get_extension_path(ext_id)) +print(manager.get_extension_dict(ext_id)["path"]) +print(manager.get_extension_path_by_module("omni.kit.window.script_editor")) + +### Other Settings + +#### /app/extensions/disableStartup (default: false) + +Special mode where extensions are not started (the python and C++ startup functions are not called). Everything else will work as usual. One use-case might be to warm-up everything and get extensions downloaded. Another use case is getting python environment setup without starting anything. + +#### /app/extensions/precacheMode (default: false) + +Special mode where all dependencies are solved and extensions downloaded, then the app exits. It is useful for precaching all extensions before running an app to get everything downloaded and check that all dependencies are correct. + +#### /app/extensions/debugMode (default: false) + +Output more debug information into the info logging channel. + +#### /app/extensions/detailedSolverExplanation (default: false) + +Output more information after the solver finishes explaining why certain versions were chosen and what the available versions were (more costly). + +#### /app/extensions/registryEnabled (default: true) + +Disable falling back to the extension registry when the application couldn’t resolve all its dependencies, and fail immediately. + +#### /app/extensions/skipPublishVerification (default: false) + +Skip extension verification before publishing. Use wisely. + +#### /app/extensions/excluded (default: []) + +List of extensions to exclude from startup. Can be used with or without a version. Before solving the startup order, all of those extensions are removed from all dependencies. + +#### /app/extensions/preferLocalVersions (default: true) + +If true, prefer local extension versions over remote ones during dependency solving. Otherwise all are treated equally, so it can become likely that newer versions are selected and downloaded. + +#### /app/extensions/syncRegistryOnStartup (default: false) + +Force sync with the registry on startup. Otherwise the registry is only enabled if dependency solving fails (i.e. something is missing). The --update-exts command line switch enables this behavior. + +#### /app/extensions/publishExtraDict (default: {}) + +Extra data to write into the extension index root when published. + +#### /app/extensions/fsWatcherEnabled (default: true) + +Globally disable all filesystem watchers that the extension system creates. + +#### /app/extensions/mkdirExtFolders (default: true) + +Create non-existing extension folders when adding extension search path. + +#### /app/extensions/installUntrustedExtensions (default: false) + +Skip untrusted-extensions check when automatically installing dependencies and install anyway. + +#### /app/extensions/profileImportTime (default: false) + +Replace global import function with the one that sends events to carb.profiler. It makes all imported modules show up in a profiler. Similar to PYTHONPROFILEIMPORTTIME + +#### /app/extensions/fastImporter/enabled (default: true) + +Enable faster python importer, which doesn’t rely on sys.path and manually scan extensions instead. + +#### /app/extensions/fastImporter/searchInTopNamespaceOnly (default: true) + +If true fast importer will skip search for python files in subfolders of the extension root that doesn’t match module names defined in [[python.module]]. E.g. it won’t usually look in any folder other than [ext root]/omni. + +#### /app/extensions/fastImporter/fileCache (default: false) + +Cache file existence checks in the fast importer. This speeds up startup time, but extensions python code can’t be modified without cleaning the cache. + +#### /app/extensions/parallelPullEnabled (default: false) + +Enable parallel pulling of extensions from the registry. + +## Extension Registries + +The Extension system supports adding external registry providers for publishing extensions to, and pulling extensions from. By default Kit comes with the omni.kit.registry.nucleus extension which adds support for Nucleus as an extension registry. +When an extension is enabled, the dependency solver resolves all dependencies. If a dependency is missing in the local cache, it will ask the registry for a particular extension and it will be downloaded/installed at runtime. Installation is just unpacking of a zip archive into the cache folder (app/extensions/registryCache setting). +The Extension system will only enable the Extension registry when it can’t find all extensions locally. At that moment, it will try to enable any extensions specified in the setting: app/extensions/registryExtension, which by default is omni.kit.registry.nucleus. +The Registry system can be completely disabled with the app/extensions/registryEnabled setting. +The Extension manager provides an API to add other extension registries and query any existing ones (omni::ext::IExtensions::addRegistryProvider, omni::ext::IExtensions::getRegistryProviderCount etc). +Multiple registries can be configured to be used at the same time. They are uniquely identified with a name. Setting app/extensions/registryPublishDefault sets which one to use by default when publishing and unpublishing extensions. The API provides a way to explicitly pass the registry to use. + +### Publishing Extensions + +To properly publish your extension to the registry use publishing tool, refer to: Publishing Extensions Guide +Alternatively, kit.exe --publish CLI command can be used during development: +Example: > kit.exe --publish omni.my.ext-tag +If there is more than one version of this extension available, it will produce an error saying that you need to specify which one to publish. +Example: > kit.exe --publish omni.my.ext-tag-1.2.0 +To specify the registry to publish to, override the default registry name: +Example: > kit.exe --publish omni.my.ext-tag-1.2.0 --/app/extensions/registryPublishDefault="kit/mr" +If the extension already exists in the registry, it will fail. To force overwriting, use the additional --publish-overwrite argument: +Example: > kit.exe --publish omni.my.ext --publish-overwrite +The version must be specified in a config file for publishing to succeed. +All [package.target] config subfields are filled in automatically if unspecified: + +If the extension config has the [native] field [package.target.platform] or [package.target.config], they are filled with the current platform information. +If the extension config has the [native] and [python] fields, the field [package.target.python] is filled with the current python version. +If the /app/extensions/writeTarget/kitHash setting is true, the field [package.target.kitHash] is filled with the current kit githash. + +An Extension package name will look like this: [ext_name]-[ext_tag]-[major].[minor].[patch]-[prerelease]+[build]. Where: + +[ext_name]-[ext_tag] is the extension name (initially coming from the extension folder). +[ext_tag]-[major].[minor].[patch]-[prerelease] if [package.version] field of a config specifies. +[build] is composed from the [package.target]] field. + +### Pulling Extensions + +There are multiple ways to get Extensions (both new Extensions and updated versions of existing Extensions) from a registry: + +Use the UI provided by this extension: omni.kit.window.extensions +If any extensions are specified in the app config file - or required through dependencies - are missing from the local cache, the system will attempt to sync with the registry and pull them. That means, if you have version “1.2.0” of an Extension locally, it won’t be updated to “1.2.1” automatically, because “1.2.0” satisfies the dependencies. To force an update run Kit with --update-exts flag: + +Example: > kit.exe --update-exts + +### Pre-downloading Extensions + +You can also run Kit without starting any extensions. The benefit of doing this is that they will be downloaded and cached for the next run. To do that run Kit with --ext-precache-mode flag: +Example: > kit.exe --ext-precache-mode + +### Authentication and Users + +The Omniverse Client library is used to perform all operations with the nucleus registry. Syncing, downloading, and publishing extensions requires signing in. For automation, 2 separate accounts can be explicitly provided, for read and write operations. +User account read/write permissions can be set for the omni.kit.registry.nucleus extension. The “read” user account is used for syncing with registry and downloading extensions. The “write” user account is used for publishing or unpublishing extensions. If no user is set, it defaults to a regular sign-in using a browser. +By default, kit comes with a default read and write accounts set for the default registry. +Accounts setting example: +exts."omni.kit.registry.nucleus".accounts = [ + { url = "omniverse://kit-extensions.ov.nvidia.com", read = "[user]:[password]", write = "[user]:[password]" } +] + +Where read - is read user account, write - is write user account. Both are optional. Format is: “user:password”. + +## Building Extensions + +Extensions are a runtime concept. This guide doesn’t describe how to build them or how to build other extensions which mihht depend on another specific extension at build-time. One can use a variety of different tools and setups for that. We do however have some best-practice recommendations. The best sources of information on that topic are currently: +The example omni.example.hello extension (and many other extensions). Copy and rename it to create a new extension. +We also strive to use folder linking as much as possible. Meaning we don’t copy python files and configs from the source folder to the target (build) folder, but link them. This permits live changes to those files under version control to be immediately reflected, even at runtime. Unfortunately we can’t link files, because of Windows limitations, so folder linking is used. This adds some verbosity to the way the folder structure is organized. +For example, for a simple python-only extension, we link the whole python namespace subfolder: +source/extensions/omni.example.hello/omni – [linked to] –> _build/windows-x86_64/debug/exts/omni.example.hello/omni +For an extension with binary components we link python code parts and copy binary parts. +We specify other parts to link in the premake file: repo_build.prebuild_link { "folder", ext.target_dir.."/folder" } +When working with the build system it is always a good idea to look at what the final _build/windows-x86_64/debug/exts folder looks like, which folder links exist, where they point to, which files were copied, etc. Remember that the goal is to produce one extension folder which will potentially be zipped and published. Folder links are just zipped as-is, as if they were actual folders. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/extensions_basic.md b/extensions_basic.md new file mode 100644 index 0000000000000000000000000000000000000000..77363ff98470e5a4c5e27b0f73b45a30e1071ffc --- /dev/null +++ b/extensions_basic.md @@ -0,0 +1,75 @@ + + +Getting Started with Extensions — kit-manual 105.1 documentation + +kit-manual + + » +Getting Started with Extensions + +  + +# Getting Started with Extensions + +This guide will help you get started creating new extensions for Kit based apps and sharing them with other people. +While this guide can be followed from any Kit based app with a UI, it was written for and tested in Create. + +Note +For more comprehensive documentation on what an extension is and how it works, refer to :doc:Extensions (Advanced) . + +Note +We recommend installing and using Visual Studio Code as the main developer environment for the best experience. + +## 1. Open Extension Manager UI: Window -> Extensions + +This window shows all found extensions, regardless of whether they are enabled or disabled, local or remote. + +## 2. Create New Extension Project: Press “Plus” button on the top left + +It will ask you to select an empty folder to create a project in. You can create a new folder right in this dialog with a right-click. +It will then ask you to pick an extension name. It is good practice to match it with a python module that the extension will contain. +Save the extension folder to your own convenient location for development work. +A few things will happen next: + +The selected folder will be prepopulated with a new extension. +exts subfolder will be automatically added to extension search paths. +app subfolder will be linked (symlink) to the location of your Kit based app. +The folder gets opened in Visual Studio Code, configured and ready to hack! +The new extension is enabled and a new UI window pops up: + +The small “Gear” icon (on the right from the search bar) opens the extension preferences. There you can see and edit extension search paths. Notice your extension added at the end. +Have a look at the README.md file of created folder for more information on its content. +Try changing some python files in the new extension and observe changes immediately after saving. You can create new extensions by just cloning an existing one and renaming. You should be able to find it in the list of extensions immediately. + +## 3. Push to git + +When you are ready to share it with the world, push it to some public git repository host, for instance: GitHub +A link to your extension might look like: git://github.com/[user]/[your_repo].git?branch=main&dir=exts. +Notice that exts is repo subfolder with extensions. More information can be found in: Git URL as Extension Search Paths. +The repository link can be added right into the extension search paths in UI: + +To get new changes pulled in from the repository, click on the little sync button. + +Note +Git must already be installed (git command available in the shell) for this feature to work. + +## More Advanced Things To Try + +### Explore kit.exe + +From Visual Studio Code terminal in a newly created project you have easy access to Kit executable. +Try a few commands in the terminal: + +app\kit\kit.exe -h to get started +app\kit\kit.exe --ext-folder exts --enable company.hello.world to only start newly added extension. It has one dependency which will automatically start few more extensions. +app\kit\omni.app.mini.bat to run another Kit based app. More developer oriented, minimalistic and fast to start. + +### Explore other extensions + +Kit comes with a lot of bundled extensions. Look inside app/kit/exts, app/kit/extscore and app/exts. Most of them are written in python. All of the source to these extensions is available and can serve as an excellent reference to learn from. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/extensions_usd_schema.md b/extensions_usd_schema.md new file mode 100644 index 0000000000000000000000000000000000000000..bb5d8d3308d7dc4b7ce44a285dcbb8f7b3673793 --- /dev/null +++ b/extensions_usd_schema.md @@ -0,0 +1,52 @@ + + +USD Schema Extensions — kit-manual 105.1 documentation + +kit-manual + + » +USD Schema Extensions + +  + +# USD Schema Extensions + +USD libraries are part of omni.usd.libs extension and are loaded as one of the first extensions to ensure that USD dlls are available to other extensions. +USD schemas itself are each an individual extension that can be a part of any repository. USD schema extensions are loaded after omni.usd.libs and ideally before omni.usd. +Example of a schema extension config.toml file: +[core] +reloadable = false +# Load at the start, load all schemas with order -100 (with order -1000 the USD libs are loaded) +order = -100 + +[package] +category = "Simulation" +keywords = ["physics", "usd"] + +# pxr modules to load +[[python.module]] +name = "pxr.UsdPhysics" + +# python loader module +[[python.module]] +name = "usd.physics.schema" + +# pxr libraries to be preloaded +[[native.library]] +path = "bin/${lib_prefix}usdPhysics${lib_ext}" + +Schema extensions contain pxr::Schema, its plugin registry and config.toml definition file. Additionally it contains a loading module omni/schema/_schema_name that does have python init.py file containing the plugin registry code. +Example: +import os +from pxr import Plug + +pluginsRoot = os.path.join(os.path.dirname(__file__), '../../../plugins') +physicsSchemaPath = pluginsRoot + '/UsdPhysics/resources' + +Plug.Registry().RegisterPlugins(physicsSchemaPath) + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/faq.md b/faq.md new file mode 100644 index 0000000000000000000000000000000000000000..a9aa621c52cddbe35ba4ca0e045115a044524da6 --- /dev/null +++ b/faq.md @@ -0,0 +1,42 @@ + + +Frequently Asked Questions — kit-manual 105.1 documentation + +kit-manual + + » +Frequently Asked Questions + +  + +# Frequently Asked Questions + +## Where can I find the core Kit config file? + +It is kit-core.json located close to the Kit executable. + +## Can I debug python extensions and scripts? + +Yes! Use VS Code for that. + +Run Kit, open Window/Extensions Manager, find and enable the omni.kit.debug.vscode extension. You can now see the window called VS Code Link which shows you the status of the debugger connection. +Run VS Code with the Python extension installed. Open the Kit project folder with it. +Kit already has a proper .vscode/launch.json in the project. So select the Debugger tab in VS Code, select Python: Attach and press the Start Debugging button. +The status should now change to Connected in the Kit VS Code Link window. +Hit the Break button in this window, it shows an example of using the omni.kit.commands.execute("DebugBreak") command to break. You can debug your python code and add breakpoints. + +Note +Unfortunately folder linked scripts are not properly recognized in this setup, so you must add your breakpoints in the real source files, which can be found under the _build folder. + +Note +For non-UI configurations just use the omni.kit.debug.python extension instead. Look into its extension.toml for settings. + +## Random failures when loading omni.usd ? + +You can debug how USD loads its plugins with the environment variable TF_DEBUG. If you set TF_DEBUG=PLUG_INFO_SEARCH, it will print out all of the plugInfo.json files it finds. If you set TF_DEBUG=PLUG_REGISTRATION, it will print out all of the plugins it tries to register. Setting TF_DEBUG=PLUG_LOAD can also be useful, as it prints the plugins loaded. Kit mutes USD output by default. To unmute it, you need to set "/omni.kit.plugin/usdMuteDiagnosticMessage" to false. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/http-api.md b/http-api.md new file mode 100644 index 0000000000000000000000000000000000000000..e2c0b1495f451a4653cb0cc8dae8e5d8582de32f --- /dev/null +++ b/http-api.md @@ -0,0 +1,369 @@ + + +HTTP API — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +HTTP API + +  + +# HTTP API + +Launcher uses port 33480 to provide the HTTP API that can be used by other programs to retrieve information +about the current session or get the list of installed apps. +This document describes all available HTTP endpoints supported by Launcher. + +## Authentication + +### [GET] /auth + +Returns Starfleet information about the current user session. +Method: GET +Content type: application/json + +#### Response + +Property +Type +Description + +email +string + +Email used for authentication. Can be used to uniquely identify a user. + +username +string + +Preferred username displayed in the UI. This field should not be used for unique user identification. Use email field instead. + +accessToken +string + +The access token returned from Starfleet. + +idToken +string + +The ID token used in Starfleet for retrieving user’s information. + +expires +Date + +The access token expiration date in ISO format. + +#### Errors + +Status +Description + +HTTP401 +User is not authenticated. + +## Installed apps and connectors + +Launcher classifies all installed apps and connectors as _components_. + +### [GET] /components + +Returns the list of all installed apps and connectors. +Method: GET +Content type: application/json + +#### Response + +Returns a list with the following Component objects (? means that the property is optional): + +Property +Type +Description + +slug +string + +The unique component name. + +name +string + +The full displayed component name. + +version +string + +The latest version of this component available for download. Use installedVersions to check installed versions. + +shortName +string + +The short name used in the side menu. + +kind +string + +Specifies the component kind: apps or connectors. + +category +string + +The category used for grouping this component in the library. + +productArea +_string?_ + +Represents the product area – one product area can include multiple components that can be installed separately. Displayed in the component card title. + +installedVersions +InstalledVersions + +Lists versions of this component installed by the user. + +description +string[] + +Paragraphs with component description, supports markdown and HTML. + +platforms +string[] + +Represents OSs where this component can be installed. + +settings +Settings[] + +Represents settings used for installing this component. + +image +_URL?_ + +The image displayed on the detailed page. + +card +_URL?_ + +The image displayed on the card on the Exchange tab. + +icon +_URL?_ + +The icon displayed in the component card title. + +tags +string[] + +Tags shown below the component description. + +featured +boolean + +Defines if this component is shown in the featured section. + +featuredImage +_URL?_ + +The image displayed in the featured section. + +links +string[] + +Hyperlinks displayed in the library and in the component details. + +#### Installed Versions + +Property +Type +Description + +all +string[] + +All installed versions of this component. + +current +string + +The current installed version that is used for launching the component. + +latest +string + +The latest version of this component installed by the user. + +#### Settings + +Property +Type +Description + +slug +string + +The unique component name. + +version +string + +The installed component version associated with these settings. + +packages +Package[] + +Thin packages used by this version. + +path +string + +The path to the main package. + +base +string + +The base path for the component that contains all packages. + +showInLibrary +boolean + +Defines whether this component should be displayed in the library. + +sideBySide +boolean + +Defines whether this component supports side-by-side installations. If side-by-side installations are not supported, then Launcher removes all previous component versions on install. + +runWithLauncher +boolean + +Specifies whether this component should be started automatically with Launcher. + +launch +_Script?_ + +The script used for launching the component. + +open +_Script?_ + +The script used for opening omniverse:// links. + +preInstall +_Script?_ + +The script used before the installation starts. + +install +_Script?_ + +The main script for installing the component. + +postInstall +_Script?_ + +The script used after the installation. + +register +_Script?_ + +The script used when the user selects this component version. + +unregister +_Script?_ + +The script used to clean up the system when uses selects another component version. + +finalize +_Script?_ + +The script used after all previous versions of this component are unregistered and uninstalled from the system. Only runs if side-by-side installations are not supported. + +preUninstall +_Script?_ + +The script used before the uninstall. + +uninstall +_Script?_ + +The main script for uninstalling the component. + +postUninstall +_Script?_ + +The script used after the uninstall. + +#### Script + +Property +Type +Description + +path +string + +Path to the script. + +root +string + +Defines where the component is installed. + +args +_string[]?_ + +Specifies all command line arguments used for the script. + +environment +Map + +Specifies all predefined environment variables used for the script. + +#### Package + +Property +Type +Description + +name +string + +The unique package name. + +url +string + +The unsigned URL for downloading the package. Can’t be used directly, must be signed first. + +hash +string + +The package hash. Used to deduplicate installed packages. + +main +_boolean?_ + +Specifies if this package is the main package of the component. Main packages contain launcher.toml files and installation scripts. + +### [GET] /components/:slug + +Returns information about the installed component with the specified slug. +Method: GET +Content type: application/json +Response +Returns a Component object. See details in Installed apps and connectors . + +#### Errors + +Status +Description + +HTTP404 + +Component with the specified slug is not installed. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/index.md b/index.md new file mode 100644 index 0000000000000000000000000000000000000000..2b6939738a30173c322504ee242f2e6f969c056c --- /dev/null +++ b/index.md @@ -0,0 +1,22 @@ + + +pxr-usd-api: pxr USD API — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +pxr-usd-api: pxr USD API + +  + +# pxr-usd-api: pxr USD API + +pxr-usd-api + +Modules + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/install_guide_linux.md b/install_guide_linux.md new file mode 100644 index 0000000000000000000000000000000000000000..b7e1f39d4decf2c0a0ce214bc3fa4724574998ba --- /dev/null +++ b/install_guide_linux.md @@ -0,0 +1,366 @@ + + +Installation on Linux — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Installation Guide » +Installation on Linux + +  + +# Installation on Linux + +## Prerequisites for Installation + +There are two elements that you need to have prior to starting the installation process. Both components are available within the NVIDIA Licensing Portal (NLP). +It’s important to note that the entitlements themselves are provided to the person at the company who makes the purchase, and that person can add others (including the IT Managers) to the Licensing Portal so that they can grab the components listed below. You can read more about this process as part of Enterprise Quick Start Guide. + +Download the IT Managed Launcher Installer. +(.AppImage) AppImage since you’re running Linux + +Your Organization Name Identifier (org-name). + +To find the IT Managed Launcher executable on the NLP: + +Once you’ve logged into the Portal, go to the Software Downloads section and look for the NVIDIA Omniverse IT Managed Launcher for your platform of choice (Linux in this case). +Click Download to initiate the download process of the installer. + +Note +Once the installer is downloaded, you should place it onto your designated staging hardware inside of your company firewall. + +Next you’ll grab your Organization’s Name Identifier (org-name). + +To do this, at the top of the portal, hover your mouse over your user account until you see a View Settings message pop up. (See image below) +Within the resulting My Info dialog, under the Organization area, you will see an org-name section. The information that is presented there represents your Organization Name and will be required later. + +View Settings: + +Be sure to capture this information before you begin the installation process. You will need it to install the IT Managed Launcher as well as configure your enterprise enablement. +Organization Name + +Once you have this information, it’s time to install the IT Managed Launcher. +There are two ways to install the IT Managed Launcher on Linux. + +Manually: You can install the Launcher manually on a user’s workstation directly (e.g. Terminal / Bash) +Deployment: You can pre-configure the Launcher to be installed as part of a deployment software strategy (e.g. SaltStack). + +We will cover both options below. + +## Terminal / Bash + +### Deploying Launcher + +To install the IT Managed Launcher on Linux (Ubuntu 20.04 and 22.04), follow these steps: +Run the IT Managed Launcher by launching the AppImage you downloaded from the Licensing Portal locally on users workstations. + +Important +On Linux, instead of running the IT Managed Launcher installer, you first need to set the AppImage as an executable program and launch it. This will register the app as the default handler for omniverse-launcher:// custom URLs described elsewhere in this document that installs the applications themselves.. +For Ubuntu users, make sure you have done the following so that the AppImage will launch. +From the Terminal, first run: +> sudo apt install libfuse2 +Then make sure you check the permissions of the downloaded AppImage file to verify that it can be run as a program. +Using the UI, right-click on the AppImage and choose Properties. Go to the Permissions section and ensure that the Allow executing file as program checkbox is checked. +Or, from the Terminal, in the directory where the AppImage was saved: +> chmod +x omniverse-launcher-linux-enterprise.AppImage +Once those items are completed, you should be able to double-click on the AppImage package and have it run. Or, run it from the Terminal: +> ./omniverse-launcher-linux-enterprise.AppImage + +### Setting up TOML Files + +( Learn more about TOML syntax: https://toml.io/en/ ) +1) When the AppImage launches, you’ll immediately be prompted to set a number of default locations for Omniverse. These paths determine where Omniverse will place the installed applications (Library Path), data files (Data Path), content files (Content Path) and Cache information. + +All of the paths set here will be recorded and stored within an omniverse.toml file for later editing as needed. It’s important to note that all of the paths can be changed as per preference and/or IT Policy at a later time. By default, the installer takes all of your path preferences and stores them in the following folder structure: +~/Home/.nvidia-omniverse/config +2) Once you’ve set the default paths for Omniverse to use, click on the Continue Button. +You should now be presented with a blank Library window inside of the launcher. + +3) Close the IT Managed Launcher. +At this point, the IT Managed Launcher is installed. However, before you start to install Omniverse applications, you’ll need to add two additional, important configuration files. +When you look at the default configuration location in Linux (~/Home/.nvidia-omniverse/config), you should see the omniverse.toml file that the installer added as shown below. + +This omniverse.toml file is the primary configuration file for the IT Managed Launcher. Within this configuration file, the following paths are described, and they should match the selections you made in step 1. Be aware that you can set these after the installation to different paths as needed for security policy at any time. +[paths] +library_root = "/home/myuser/.local/share/ov/pkg" # Path where to install all applications +data_root = "/home/myuser/.local/share/ov/data" # Folder where Launcher and Omniverse apps store their data files +cache_root = "/home/myuser/.cache/ov" # Folder where Omniverse apps store their cache and temporary files +logs_root = "/home/myuser/.nvidia-omniverse/logs" # Folder where Launcher and Omniverse apps store their logs +extension_root = /home/myuser/Documents/kit/shared/exts # Folder where all Omniverse shared extensions are stored +content_root = "/home/myuser/Downloads" # Folder where Launcher saves downloaded content packs +confirmed = true # Confirmation that all paths are set correctly, must be set to `true` + +Note +If a system administrator doesn’t want to allow users to change these paths, the omniverse.toml file can be marked as read-only. +Also, if a System Administrator plans to install the IT Managed Launcher to a shared location like ~/Home/Shared on Linux, they need to specify a shared folder for library_root and logs_root path in the omniverse.toml file. + +You’re now going to add two additional files to this /config folder in addition to the omniverse.toml file. + +privacy.toml file to record consent choices for data collection and capture of crash logs. +license.toml to provide your license details. + +Important +By opting into telemetry, you can help improve the performance & stability of the software. For more details on what data is collected and how it is processed see this section. + +4) Within the /config folder, create a text file named privacy.toml, which is the configuration file for Omniverse telemetry. Within this privacy file, specify the following: +[privacy] +performance = true +personalization = true +usage = true + +Once this file contains these four lines, save the file. + +Note +If your IT or Security Policy prohibits the collection of telemetry, set all of these values to false. + +5) For the last file needed in this folder, create a text file named license.toml, which is the licensing configuration file for Omniverse. Within this licensing file, specify the Organization Name Identifier (org-name) you retrieved from the Licensing Portal: +[ovlicense] +org-name = "" + +Once this file contains these two lines, save the file. +When you’ve completed these steps, your ~/Home/.nvidia-omniverse/config folder should have the directory and .toml files like the screenshot below: + +That completes the IT Managed Launcher installation for Linux and Omniverse applications can now be installed to users’ workstations. + +### Setting Up Packages + +Once the Omniverse IT Managed Launcher is installed and configured, you’re ready to install the Omniverse foundation applications for your users. +As an IT Manager, you now need to download the various Omniverse foundation applications from the Omniverse Enterprise Web Portal. Each application will come in the form of an archived .zip file that you can take to a user’s machine and install either manually, or via your internal deployment framework. +1) To begin, log into the Omniverse Enterprise Web Portal. + +2) In the left-hand navigation area, select Apps, and from the resulting view, click on the tile of the Omniverse foundation application you want to install. + +3) Available releases are categorized by release channel. A release is classified as Beta, Release, or Enterprise, depending on its maturity and stability. + +Beta +Beta builds may or may not be feature complete or fully stable. These are good for testing new Omniverse functionality, but aren’t guaranteed to be ready for production. + +Release +Release builds (also known as GA or General Availability) are feature complete and stable builds ready for production. + +Enterprise +Enterprise builds are provided for Enterprise customers and represent supported production versions of Omniverse software. + +4) Select a package version in the dropdown list and click Download. + +5) Clicking the download button will prompt you to select the Windows or Linux version of the application to install. Choose the OS version that matches the user’s workstation’s OS. + +6) Once downloaded, the application archive must then be transferred to the user’s machine or hosted on your chosen local network staging hardware so it can be accessed and installed on a user’s workstation. +Once you’ve downloaded the various Omniverse foundation applications, you are ready to proceed to the installation. + +### Deploying the Apps + +Installation of the Omniverse applications is handled via a custom protocol URL on the user’s machine or using a deployment framework like SaltStack to manage the process and trigger the IT Managed Launcher to run and install the chosen application. +The most basic way to install Omniverse foundation applications is to open a custom protocol URL directly on the user’s machine. The simple command below will trigger the IT Managed Launcher to run the installation routine for the given Omniverse application .zip archive. +The format of the custom protocol can vary depending on the command line interface used, but as a general rule of thumb, the settings are as follows: +omniverse-launcher://install?path= +Where represents the name and path where the downloaded application archive is on the local workstation. Be aware that it does not matter where you place the archive, the custom protocol will install the application to its default location based on the library_root path in the omniverse.toml file that you configured earlier as part of the IT Managed Launcher installation process. + +Terminal + +Example: xdg-open omniverse-launcher://install?path=/var/packages/usd_explorer.zip +When the command is run, it will trigger the IT Managed Launcher to open and it will begin the installation process. You should see a screen similar to the one below that shows the progress bar for the application being installed in the upper right of the Launcher window. + +Once the installation is complete, the Omniverse application will appear in the Library section of the Launcher window and these steps can be repeated for any additional applications you want to make available to your users. + +## SaltStack + +To deploy the IT Managed Launcher executable file to users’ Linux workstations you will need to perform several tasks. + +You’ll need to download and stage the IT Managed Launcher .AppImage file and place it on the Salt master under the file storage location listed under files_roots in /etc/salt/master. For example: + +file_roots: +base: +- /srv/salt + +Next, you’ll create and pre-configure a user’s omniverse.toml, policy.toml and license.toml files and stage them in the same shared network location. +After that, you’ll create an omniverse.SLS template Salt file to control the installation process and reference .toml files you’ve set up. +Finally, you’ll configure the top.sls Salt file within the Windows Local Group Policy to execute at user logon to trigger the installation and configuration of the IT Managed Launcher for the user on their local workstation. + +As per the prerequisite section of this document, you should have already downloaded the Linux version of the IT Managed Launcher install file from the Enterprise Web Portal. If not, please do that first and place it in the Salt master under the file storage location as described above. + +### Setting up TOML Files + +The first step is to create and stage the three .toml files for deployment. + +omniverse.toml: Copy the following information into a new text document, replacing the path information with the location you want Omniverse and its data installed on each user’s workstation. Once done, save it to the Salt master file storage location (/srv/salt). + +[paths] +library_root = "/home/myuser/.local/share/ov/pkg" # Path where to install all applications +data_root = "/home/myuser/.local/share/ov/data" # Folder where Launcher and Omniverse apps store their data files +cache_root = "/home/myuser/.cache/ov" # Folder where Omniverse apps store their cache and temporary files +logs_root = "/home/myuser/.nvidia-omniverse/logs" # Folder where Launcher and Omniverse apps store their logs +extension_root = /home/myuser/Documents/kit/shared/exts # Folder where all Omniverse shared extensions are stored +content_root = "/home/myuser/Downloads" # Folder where Launcher saves downloaded content packs +confirmed = true # Confirmation that all paths are set correctly, must be set to `true` + +Where /myuser/ represents the local user’s account. + +privacy.toml: Copy the following information into a new text document. This is the configuration file for Omniverse telemetry capture for each user’s workstation. Once done, save it to the Salt master file storage location (/srv/salt). + +[privacy] +performance = true +personalization = true +usage = true + +Note +If your IT or Security Policy prohibits the collection of telemetry on a user’s workstation, set all of the values in the file to false. + +license.toml: This is the licensing configuration file for Omniverse. Within this licensing file, specify the Organization Name Identifier (org-name) you retrieved from the Licensing Portal in the prerequisites section. Once done, save it to the staging location (/srv/salt`). + +[ovlicense] +org-name = "" + +Once you’ve saved all three .toml files, it’s time to build the script file that will be used to help deploy the files to each user’s workstation. + +### Deploying Launcher + +1) Create a new omniverse.SLS Salt template in /srv/salt with the following information: +omniverse_enterprise_launcher: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/Omniverse/launcher.AppImage + - source: salt://Launcher.AppImage + +omniverse_config_toml: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/.nvidia-omniverse/config/omniverse.toml + - source: salt://omniverse.toml + +omniverse_privacy_toml: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/.nvidia-omniverse/config/privacy.toml + - source: salt://privacy.toml + +omniverse_license_toml: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/.nvidia-omniverse/config/license.toml + - source: salt://license.toml + +omniverse_dirs: + file.directory: + - user: ubuntu + - group: ubuntu + - mode: 777 + - names: + - /home/ubuntu/Omniverse + - /home/ubuntu/Omniverse/logs + - /home/ubuntu/Omniverse/data + - /home/ubuntu/Omniverse/cache + - /home/ubuntu/.nvidia-omniverse/logs + +2) With that ready, you now need to add this omniverse template to your top.sls file. +base: + 'omni*': # All minions with a minion_id that begins with "omni" + - omniverse + +3) Apply the Salt state: salt 'omni*' state.apply +4) When the user logs into their desktop, have them run ./Omniverse/launcher.AppImage from a terminal. This will open the IT Managed Launcher. + +### Setting up Packages + +Once the Omniverse IT Managed Launcher is installed and configured, you’re ready to install the Omniverse foundation applications for your users. +As an IT Manager, you now need to download the various Omniverse foundation applications from the Omniverse Enterprise Web Portal. Each application will come in the form of an archived .zip file that you can take to a user’s machine and install either manually, or via your internal deployment framework. +1) To begin, log into the Omniverse Enterprise Web Portal. + +2) In the left-hand navigation area, select Apps, and from the resulting view, click on the tile of the Omniverse foundation application you want to install. + +Available releases are categorized by release channel. A release is classified as Beta, Release, or Enterprise, depending on its maturity and stability. + +Beta +Beta builds may or may not be feature complete or fully stable. These are good for testing new Omniverse functionality, but aren’t guaranteed to be ready for production. + +Release +Release builds (also known as GA or General Availability) are feature complete and stable builds ready for production. + +Enterprise +Enterprise builds are provided for Enterprise customers and represent supported production versions of Omniverse software. + +3) Select a package version in the dropdown list and click Download. + +4) Clicking the download button will prompt you to select the Windows or Linux version of the application to install. Choose the OS version that matches the user’s workstation. + +5) Once downloaded, the application archive must then be transferred to the user’s machine or hosted on your chosen local network staging hardware so it can be accessed and installed on a user’s workstation. +Once you’ve downloaded the various Omniverse foundation applications, you are ready to proceed to the installation. + +### Deploying the Apps + +1) To deploy usd_explorer in your SaltStack, update your omniverse.SLS Salt template in /srv/salt to include the following information: +omniverse_enterprise_launcher: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/Omniverse/launcher.AppImage + - source: salt://Launcher.AppImage + +omniverse_usd_explorer_zip: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/Omniverse/usd_explorer.zip + - source: salt://usd_explorer.zip + +omniverse_config_toml: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/.nvidia-omniverse/config/omniverse.toml + - source: salt://omniverse.toml + +omniverse_privacy_toml: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/.nvidia-omniverse/config/privacy.toml + - source: salt://privacy.toml + +omniverse_license_toml: + file.managed: + - user: ubuntu + - group: ubuntu + - mode: 777 + - name: /home/ubuntu/.nvidia-omniverse/config/license.toml + - source: salt://license.toml + +omniverse_dirs: + file.directory: + - user: ubuntu + - group: ubuntu + - mode: 777 + - names: + - /home/ubuntu/Omniverse + - /home/ubuntu/Omniverse/logs + - /home/ubuntu/Omniverse/data + - /home/ubuntu/Omniverse/cache + - /home/ubuntu/.nvidia-omniverse/logs + +2) Apply the Salt state: salt ‘omni*’ state.apply. +3) When the user logs in to the desktop, have them run: +> ./Omniverse/launcher.AppImage +This will open the launcher. +4) From a separate terminal, have them run: +> xdg-open omniverse-launcher://install?path=./Omniverse/code.zip +When it completes, they will have the code extension installed in their launcher. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/install_guide_win.md b/install_guide_win.md new file mode 100644 index 0000000000000000000000000000000000000000..bdab90942b05396761b7e8afbfc009360ddb7e45 --- /dev/null +++ b/install_guide_win.md @@ -0,0 +1,402 @@ + + +Installation on Windows — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Installation Guide » +Installation on Windows + +  + +# Installation on Windows + +## Prerequisites for Installation + +There are two elements that you need to have prior to starting the installation process. Both components are available within the NVIDIA Licensing Portal (NLP). +It’s important to note that the entitlements themselves are provided to the person at the company who makes the purchase, and that person can add others (including the IT Managers) to the Licensing Portal so that they can grab the components listed below. You can read more about this process as part of our Enterprise Quick Start Guide. + +Download the IT Managed Launcher Installer. +(.exe) Executable since you’re running Windows. + +Your Organization Name Identifier (org-name). + +To find the IT Managed Launcher executable on the NLP: + +Once you’ve logged into the Portal, go to the Software Downloads section (left nav) and look for the NVIDIA Omniverse IT Managed Launcher for your platform of choice (Windows in this case). +Click Download to initiate the download process of the installer. + +Note +Once the installer is downloaded, you should place it onto your designated staging hardware inside of your company firewall. + +Next you’ll grab your Organization’s Name Identifier (org-name). + +To do this, at the top of the portal, hover your mouse over your user account until you see a View Settings message pop up. (See image below) +Within the resulting My Info dialog, under the Organization area, you will see an org-name section. The information that is presented there represents your Organization Name and will be required later. + +View Settings: + +Be sure to capture this information before you begin the installation process. You will need it to install the IT Managed Launcher as well as configure your enterprise enablement. +Organization Name + +Once you have this information, it’s time to install the IT Managed Launcher. +There are two ways to install the IT Managed Launcher on Windows: + +Manually: You can install the Launcher manually on a user’s workstation directly (e.g. using CMD or PowerShell). +Deployment: You can pre-configure the Launcher to be installed as part of a deployment software strategy (e.g. SCCM / Group Policy) + +We will cover both options below. + +## PowerShell + +### Deploying Launcher + +Run the IT Managed Launcher installer you downloaded from the Licensing Portal locally on a user’s workstation. This can be done in the UI by double-clicking omniverse-launcher-win-enterprise.exe or via the PowerShell terminal, by typing: ./omniverse-launcher-win-enterprise.exe +Follow the prompts until the installer finishes. At the end of the install process, the option to immediately run the IT Managed Launcher will be checked by default. +Leave that option checked, then click Finish to finish the install process. + +Note +You can install the IT Managed Launcher silently by adding the /S parameter to the end of the filename. Example: ./omniverse-launcher-win-enterprise.exe /S + +Note +You can install the IT Managed Launcher to a specific location by adding the /D parameter to the end of the filename. Example: ./omniverse-launcher-win-enterprise.exe /S /D="C:\Program Files\NVIDIA Corporation\NVIDIA Omniverse Launcher" + +### Setting Up TOML Files + +( Learn more about TOML syntax: https://toml.io/en/ ) +1) When the IT Managed Launcher first opens, you’ll immediately be prompted to set a number of default locations for Omniverse data. These paths determine where Omniverse will place the installed applications (Library Path), data files (Data Path), content files (Content Path) and Cache information. + +All of the paths set here will be recorded and stored within an omniverse.toml file for later editing as needed. It’s important to note that all of the paths set here can be changed as per preference and IT Policy at a later time. By default, the installer takes all of these path preferences and stores them in the omniverse.toml under the following folder structure: +c:\Users\[username]\.nvidia-omniverse\config +Where [username] represents the local user’s account. +2) Once you’ve set the default paths for Omniverse to use, click on the Continue Button. +You should now be presented with a blank Library window inside of the launcher. + +3) Close the IT Managed Launcher. +At this point, the IT Managed Launcher is installed. However, before you start to install Omniverse applications, you’ll need to add two additional, important configuration files. +When you look at the default configuration location in Windows (c:\Users\[username]\.nvidia-omniverse\config), you should see the omniverse.toml file that the installer added as shown below. + +This omniverse.toml file is the primary configuration file for the IT Managed Launcher. Within this configuration file, the following paths are described, and they should match the selections you made in step 1. Be aware that you can set these after the installation to different paths as needed for security policy at any time. +[paths] +library_root = "C:\\Omniverse\\library" # Path where to install all Omniverse applications +data_root = "C:\\Omniverse\\data" # Folder where Launcher and Omniverse apps store their data files +cache_root = "C:\\Omniverse\\cache" # Folder where Omniverse apps store their cache and temporary files +logs_root = "C:\\Users\\[username]\\.nvidia-omniverse\\logs" # Folder where Launcher and Omniverse apps store their logs +content_root = “C:\\Users\\[username]\\Downloads” # Folder where Launcher saves downloaded content packs +extension_root = “C:\\Users\\[username]\\Documents\\kit\\shared\\exts” # Folder where all Omniverse shared extensions are stored +confirmed = true # Confirmation that all paths are set correctly, must be set to `true` + +Important +Also be aware that all paths on Windows require a double backslash (\) for proper operation. + +Note +If a system administrator doesn’t want to allow users to change these paths, the omniverse.toml file can be marked as read-only. Also, if a System Administrator plans to install the IT Managed Launcher to a shared location like Program Files on Windows, they need to specify a shared folder for library_root and logs_root path in omniverse.toml file. + +You’re now going to add two additional files to this /config folder in addition to the omniverse.toml file. + +privacy.toml file to record consent choices for data collection and capture of crash logs. +license.toml to provide your license details. + +Note +When creating or editing these configuration files, use a text editor such as Windows Notepad. Do not use a rich-text editor such as Wordpad or Microsoft Word. + +Important +By opting into telemetry within the privacy.toml, you can help improve the performance & stability of the software. For more details on what data is collected and how it is processed see this section. + +4) Within the /config folder, create a text file named privacy.toml. This is the configuration file for Omniverse telemetry. Within this privacy file, copy the following information: +[privacy] +performance = true +personalization = true +usage = true + +Once this file contains these four lines, save the file. + +Note +If your IT or Security Policy prohibits the collection of telemetry on a user’s workstation, set all of the values in the file to false. + +5) For the last file needed in your /config folder, create a text file named license.toml This is the licensing configuration file for Omniverse. Within this licensing file, specify the Organization Name Identifier (org-name) you retrieved from the Licensing Portal in the prerequisites section: +[ovlicense] +org-name = "" + +Once this file contains these two lines, save the file. +Once you’ve completed these steps, your /.nvidia-omniverse/config folder should have the directory and required .toml files like the screenshot below: + +That completes the IT Managed Launcher manual installation for Windows and Omniverse applications can now be installed to users’ workstations. + +### Setting Up Packages + +Once the Omniverse IT Managed Launcher is installed and configured, you’re ready to install the Omniverse foundation applications for your users. +As an IT Manager, you now need to download the various Omniverse foundation applications from the Omniverse Enterprise Web Portal. Each application will come in the form of an archived .zip file that you can take to a user’s machine and install either manually, or via your internal deployment framework. +1) To begin, log into the Omniverse Enterprise Web Portal. + +2) In the left-hand navigation area, select Apps, and from the resulting view, click on the tile of the Omniverse foundation application you want to install. + +3) Available releases are categorized by release channel. A release is classified as Beta, Release, or Enterprise, depending on its maturity and stability. + +Beta +Beta builds may or may not be feature complete or fully stable. These are good for testing new Omniverse functionality, but aren’t guaranteed to be ready for production. + +Release +Release builds (also known as GA or General Availability) are feature complete and stable builds ready for production. + +Enterprise +Enterprise builds are provided for Enterprise customers and represent supported production versions of Omniverse software. + +4) Select a package version in the dropdown list and click Download. + +5) Clicking the download button will prompt you to select the Windows or Linux version of the application to install. Choose the OS version that matches the user’s workstation. + +6) Once downloaded, the application archive must then be transferred to the user’s machine or hosted on your chosen local network staging hardware so it can be accessed and installed on a user’s workstation. +Once you’ve downloaded the various Omniverse foundation applications, you are ready to proceed to the installation. + +### Deploying the Apps + +The most basic way to install Omniverse foundation applications is to open a custom protocol URL directly on the user’s machine. The simple command below will trigger the IT Managed Launcher to run the installation routine for the given Omniverse application .zip archive. +The format of the custom protocol can vary depending on the command line interface used, but as a general rule of thumb, the settings are as follows: +omniverse-launcher://install?path= +Where represents the name and path where the downloaded application archive is on the local workstation. Be aware that it does not matter where you place the archive, the custom protocol will install the application to its default location based on the library_root path in the omniverse.toml file that you configured earlier as part of the IT Managed Launcher installation process. +Example: start omniverse-launcher://install?path=C:/temp/usd_explorer.zip +Example: start omniverse-launcher://install?path=//Mainframe/temp/usd_explorer.zip +When the command is run, it will trigger the IT Managed Launcher to open and it will begin the installation process. You should see a screen similar to the one below that shows the progress bar for the application being installed in the upper right of the Launcher window. + +Once the installation is complete, the Omniverse application will appear in the Library section of the Launcher window and these steps can be repeated for any additional applications you want to make available to your users. + +## SCCM + +To deploy the IT Managed Launcher executable file to users’ Windows workstations you will need to perform several tasks. + +You’ll need to download and stage the IT Managed Launcher .EXE file to a shared network location inside your firewall that all of the users’ workstations can see and access. +Next, you’ll create and pre-configure a user’s omniverse.toml, policy.toml and license.toml files and stage them in the same shared network location. +After that, you’ll create a .bat file to control the installation process and reference .toml files you’ve set up. +Finally, you’ll configure another .bat file within the Windows Local Group Policy to execute at user logon to trigger the installation and configuration of the IT Managed Launcher for the user on their local workstation. + +As per the prerequisite section of this document, you should have already downloaded the Windows version of the IT Managed Launcher install file from the Enterprise Web Portal. If not, please do that first. + +### Setting up TOML Files + +(Learn more about TOML syntax: https://toml.io/en/) +The first step is to create and stage the three .toml files for deployment. + +omniverse.toml: Copy the following information into a new text document, replacing the path information with the location you want Omniverse and its data installed on each user’s workstation. Once done, save it to the staging location. + +[paths] +library_root = "C:\\Omniverse\\library" # Path where to install all Omniverse applications +data_root = "C:\\Omniverse\\data" # Folder where Launcher and Omniverse apps store their data files +cache_root = "C:\\Omniverse\\cache" # Folder where Omniverse apps store their cache and temporary files +logs_root = "C:\\Users\\[username]\\.nvidia-omniverse\\logs" # Folder where Launcher and Omniverse apps store their logs +content_root = "C:\\Users\\[username]\\Downloads" # Folder where Launcher saves downloaded content packs +extension_root = "C:\\Users\\[username]\\Documents\\kit\\shared\\exts" # Folder where all Omniverse shared extensions are stored +confirmed = true # Confirmation that all paths are set correctly, must be set to `true` + +Path +Description + +library_root = “C:\Omniverse\library” +Path where to install all Omniverse applications + +data_root = “C:\Omniverse\data” +Folder where Launcher and Omniverse apps store their data files + +cache_root = “C:\Omniverse\cache” +Folder where Omniverse apps store their cache and temporary files + +logs_root = “C:\Users\[username]\.nvidia-omniverse\logs” +Folder where Launcher and Omniverse apps store their logs + +content_root = “C:\Users\[username]\Downloads” +Folder where Launcher saves downloaded content packs + +extension_root = “C:\Users\[username]\Documents\kit\shared\exts” +Folder where all Omniverse shared extensions are stored + +confirmed = true +Confirmation that all paths are set correctly, must be set to true + +Important +Also be aware that all paths on Windows require a double backslash (\) for proper operation. + +privacy.toml: Copy the following information into a new text document. This is the configuration file for Omniverse telemetry capture for each user’s workstation. Once done, save it to the staging location. + +[privacy] +performance = true +personalization = true +usage = true + +Note +If your Security Policy prohibits the collection of telemetry on a user’s workstation, set all of the values in the file to false. + +license.toml: This is the licensing configuration file for Omniverse. Within this licensing file, specify the Organization Name Identifier (org-name) you retrieved from the Licensing Portal in the prerequisites section. Once done, save it to the staging location. +[ovlicense] +org-name = "" + +Once you’ve saved all three .toml files, it’s time to build a .bat file that will be used to help deploy the files to each user’s workstation. + +### Deploying Launcher + +1) Create a new .bat file (you can name the file as needed, e.g. deployment-omniverse.bat). In that batch file, add the following information: +@echo off +SETLOCAL EnableDelayedExpansion + +set CONFIG_PATH=%USERPROFILE%\.nvidia-omniverse\config\ +set INSTALL_PATH=%ProgramFiles%\NVIDIA Corporation\NVIDIA Omniverse Launcher\ + +set SCRIPT_PATH=%~dp0 +set REG_QUERY=Reg Query "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\ddd216ee-cf6c-55b0-9ca8-733b2ef622a0" /v "DisplayName" + +:CONFIGURATION + +:: Test for existing omniverse.toml config file. +if exist "%CONFIG_PATH%\omniverse.toml" GOTO INSTALLLAUNCHER + +:: Copy.toml files to user's configuration. +xcopy /y "%SCRIPT_PATH%\omniverse.toml" "%CONFIG_PATH%" +xcopy /y "%SCRIPT_PATH%\privacy.toml" "%CONFIG_PATH%" +xcopy /y "%SCRIPT_PATH%\license.toml" "%CONFIG_PATH%" + +:: Substitute [username] with %USERNAME%. +del "%CONFIG_PATH%\omniverse.txt" 2>NUL +for /f "usebackq tokens=*" %%a in ("%CONFIG_PATH%\omniverse.toml") do ( + set LINE=%%a + set LINE=!LINE:[username]=%USERNAME%! + echo !LINE! >> "%CONFIG_PATH%\omniverse.txt" +) +del "%CONFIG_PATH%\omniverse.toml" 2>NUL +ren "%CONFIG_PATH%\omniverse.txt" "omniverse.toml" + +:: Set the readonly flag to prevent users from changing the configured paths +attrib +r "%CONFIG_PATH%"\*.toml + +:INSTALLLAUNCHER + +:: Test if Launcher is already installed. +%REG_QUERY% 1>NUL 2>&1 +if %ERRORLEVEL%==0 GOTO STARTLAUNCHER + +:: Run the installer and wait until Launcher is installed (silent). +start /WAIT %SCRIPT_PATH%\omniverse-launcher-win-enterprise.exe /S /D="%INSTALL_PATH%" + +:STARTLAUNCHER + +:: Start the Launcher. +start "" "%INSTALL_PATH%\NVIDIA Omniverse Launcher.exe" +timeout /T 5 1>NUL 2>&1 + +:END +ENDLOCAL + +The .bat script above copies the .toml files and installs Launcher. +All files must be located in the root directory of the script. (.toml / omniverse-launcher-win-enterprise.exe). +Install into a public folder, example C:NVIDIA. + +2) Save this file to the same location as the pre-configured .toml files on the staging hardware. +In order to run the .bat file as part of a deployment strategy, you need to set up a local group policy for your users’ workstations. +3) Open the Local Group Policy Editor on the GPO manager machine. + +4) Double-click to choose Logon. +5) From the Logon Properties dialog, choose Add. +6) Then point to the .bat file you created earlier and click OK. +The file should appear in the Logon Properties dialog. + +7) Click OK to close the dialog +8) The scripts will run on the remote machines during the next Logon. + +### Setting Up Packages + +Once the Omniverse IT Managed Launcher is installed and configured, you’re ready to install the Omniverse foundation applications for your users. +As an IT Manager, you now need to download the various Omniverse foundation applications from the Omniverse Enterprise Web Portal. Each application will come in the form of an archived .zip file that you can take to a user’s machine and install either manually, or via your internal deployment framework. +1) To begin, log into the Omniverse Enterprise Web Portal. + +2) In the left-hand navigation area, select Apps, and from the resulting view, click on the tile of the Omniverse foundation application you want to install. + +Available releases are categorized by release channel. A release is classified as Beta, Release, or Enterprise, depending on its maturity and stability. + +Beta +Beta builds may or may not be feature complete or fully stable. These are good for testing new Omniverse functionality, but aren’t guaranteed to be ready for production. + +Release +Release builds (also known as GA or General Availability) are feature complete and stable builds ready for production. + +Enterprise +Enterprise builds are provided for Enterprise customers and represent supported production versions of Omniverse software. + +3) Select a package version in the dropdown list and click Download. + +4) Clicking the download button will prompt you to select the Windows or Linux version of the application to install. Choose the OS version that matches the user’s workstation. + +5) Once downloaded, the application archive must then be transferred to the user’s machine or hosted on your chosen local network staging hardware so it can be accessed and installed on a user’s workstation. +Once you’ve downloaded the various Omniverse foundation applications, you are ready to proceed to the installation. + +### Deploying the Apps + +To deploy the Omniverse Applications to users’ Windows workstations you will need to perform several tasks. + +You’ll need to download and stage the Omniverse Application .zip archive files you want to deploy to a shared network location inside your firewall that all of the users’ workstations can see and access. +After that, you’ll create a .bat file to control the installation process that you’ve downloaded. +Finally, you’ll configure another .bat file within the Windows Local Group Policy to execute at user logon to trigger the installation and configuration of the Omniverse Applications for the user on their local workstation. + +As per the prerequisite section of this document, you should have already downloaded the Windows .zip archive files for each Omniverse Application you want to deploy from the Enterprise Web Portal. If not, please do that first. +The next step is to create the .bat file that will handle the installation process on the local user’s workstation. +1) Create a new .bat file for the app installation (you can name the file as needed, e.g. deploy_OV.bat). In that batch file, add the following information: +@echo off +SETLOCAL EnableDelayedExpansion + +set CONFIG_PATH=%USERPROFILE%\.nvidia-omniverse\config\ + +set SCRIPT_PATH=%~dp0 + +:INSTALLAPPS + +:: Find library_root from omniverse.toml +for /f "usebackq tokens=*" %%a in ("%CONFIG_PATH%\omniverse.toml") do ( + set LINE=%%a + echo !LINE!|find "library_root" 1>NUL 2>&1 + if !ERRORLEVEL!==0 ( + for /f tokens^=^2^ delims^=^" %%i in ("!LINE!") do set LIBRARY_ROOT_PATH=%%i + set LIBRARY_ROOT_PATH=!LIBRARY_ROOT_PATH:\\=\! + ) +) + +:: Find .zip files +for /f "tokens=*" %%a in ('dir /B "%SCRIPT_PATH%\*.zip"') do ( + set ZIP_FILE=%%a + set ZIP_FILE_SUB=!ZIP_FILE:.windows-x86_64-ent-package.zip=! + + :: Check if ZIP_FILE_SUB is a folder in LIBRARY_ROOT_PATH. If not, install. + dir /B "!LIBRARY_ROOT_PATH!"| findstr "!ZIP_FILE_SUB!" 1>NUL 2>&1 + if !ERRORLEVEL!==1 ( + start omniverse-launcher://install?path="%SCRIPT_PATH%\!ZIP_FILE!" + timeout /T 600 1>NUL 2>&1 + ) +) + +:END +ENDLOCAL + +You are welcome to string together as many of the Custom Protocol Commands as needed to cover all of the Omniverse Applications you want to install. + +Note +You can also choose to add this information to the existing .bat file that was used to install the IT Managed Launcher. + +The .bat script above installs the Apps from a .zip +All files must be located in the root directory of the script. ( “App”.zip). +Install into the same directory that launcher was previously installed. + +2) Save this .bat file to the staging hardware. +In order to run the .bat file as part of a deployment strategy, you need to get up a local group policy for your users’ workstations. +3) Open the Local Group Policy Editor on the GPO manager machine. + +4) Double-click to choose Logon. +5) From the Logon Properties dialog, choose Add. +6) Then point to the .bat file you created earlier and click OK. +The file should appear in the Logon Properties dialog. + +7) Click OK to close the dialog +8) The scripts will run on the remote machines during the next Logon. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/installing_launcher.md b/installing_launcher.md new file mode 100644 index 0000000000000000000000000000000000000000..b70b0ae13fa4749a31bb2599e4817980e6e7788c --- /dev/null +++ b/installing_launcher.md @@ -0,0 +1,58 @@ + + +Installing Launcher — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Installing Launcher + +  + +# Installing Launcher + +Please watch the following video for instructions on installing Omniverse Launcher. + +## Administrator Rights + +Local Admin Rights on the installed computer is recommended for full use and capability of the Omniverse Launcher. Though the launcher will install without admin rights, some tools, connectors, apps, etc. may require admin rights (UAC) to complete the installation. + +## First Run + +When first running the launcher after install, you will be presented with a series of options. + +### Data Collection + +Users must agree to allow NVIDIA to collect data regarding usage of the Omniverse Platform. + +### Paths + +Next you will be presented with a series of path selections. + +Option +Description + +Library Path + +This location specifies where apps, connectors and tools are installed when installed from Launcher. + +Data Path + +Displays and allows selection of the Data Path. The data path is where all content on the local Nucleus is stored. + +Cache Path + +This is the location the Cache Database will use to store its cache files. (if installed) + +### Install cache + +Though Omniverse Cache is optional, it is highly recommended for users who plan to collaborate with other Omniverse users on your network. This option does require Administrator Privileges on the installed machine and can be installed at a later time if necessary. + +Once the installation is complete, please refer to the User Guide for additional help and information on using Launcher. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/it-managed-installation-overview.md b/it-managed-installation-overview.md new file mode 100644 index 0000000000000000000000000000000000000000..ff2613fce97c9bf5e9b55f5db756b49e085c210d --- /dev/null +++ b/it-managed-installation-overview.md @@ -0,0 +1,105 @@ + + +IT Managed Launcher Overview — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +IT Managed Launcher Overview + +  + +# IT Managed Launcher Overview + +The IT Managed Launcher is an enterprise user’s front end to all of the Omniverse applications that their company makes available to them on their local workstation. +Its main use is to allow a company more control over deployment of Omniverse to its users. Some of the features included + +Support for deployment tools such as PowerShell, Group Policy, SCCM, as well as Linux deployment tools. +Does not require an Nvidia Account login for the end users. +Can be used in an a firewalled environment. +End users cannot download, install, or update Apps. + +It is designed to be installed by IT department personnel given many corporate networks have strict security policies in place. The IT Managed Launcher is available for both Windows and Linux operating systems. +IT Managed Launcher + +Omniverse Workstation Launcher + +This launcher and its interface differ from the standard Omniverse Workstation Launcher in that it is not designed to allow an end user to install anything directly on their own workstation or update installed applications themselves. It is therefore missing the top-level Exchange and Nucleus sections of the Workstation Launcher by design. +These sections are not present within the IT Managed Launcher as these elements are intended to be installed and configured by the IT Managers and Systems Administrators within your organization. +The other major difference between the IT Managed Launcher and the normal Workstation Launcher is that the IT Managed Launcher does not require a developer account login for it to function. +The IT Managed Launcher is a critical component for accessing the Omniverse foundation apps for your organization and users, so as a first step, your initial task is to install this component to your local users’ workstations. + +## IT Managed Launcher components + +### IT Managed Launcher Installer + +This is the main application that will be installed on each users machine. Installers are available for Windows and Linux. + +### TOML File + +The TOML ml files control the setting for the install. There are three TOML files. +Omniverse.toml +Used to define all the main path and options for the launcher. file is the primary configuration file for the IT Managed Launcher. Within this configuration file, the following paths are described, and they should match the selections you made in step 1. Be aware that you can set these after the installation to different paths as needed for security policy at any time. + +Path +Description + +library_root = “C:\Omniverse\library” +Path where to install all Omniverse applications + +data_root = “C:\Omniverse\data” +Folder where Launcher and Omniverse apps store their data files + +cache_root = “C:\Omniverse\cache” +Folder where Omniverse apps store their cache and temporary files + +logs_root = “C:\Users\[username]\.nvidia-omniverse\logs” +Folder where Launcher and Omniverse apps store their logs + +content_root = “C:\Users\[username]\Downloads” +Folder where Launcher saves downloaded content packs + +extension_root = “C:\Users\[username]\Documents\kit\shared\exts” +Folder where all Omniverse shared extensions are stored + +confirmed = true +Confirmation that all paths are set correctly, must be set to true + +Important +Also be aware that all paths on Windows require a double backslash (\) for proper operation. + +Note +If a system administrator doesn’t want to allow users to change these paths, the omniverse.toml file can be marked as read-only. Also, if a System Administrator plans to install the IT Managed Launcher to a shared location like Program Files on Windows, they need to specify a shared folder for library_root and logs_root path in omniverse.toml file. + +You’re now going to add two additional files to this /config folder in addition to the omniverse.toml file. + +### Auth.toml + +### License.toml + +File to provide your license details and Customer ID. +[ovlicense] +org-name = "" + +### Privacy.toml + +file to record consent choices for data collection and capture of crash logs +Within the /config folder, then create a text file named privacy.toml. This is the configuration file for Omniverse telemetry. The file contains following information: +[privacy] +performance = true +personalization = true +usage = true + +Important +By opting into telemetry within the privacy.toml, you can help improve the performance & stability of the software. For more details on what data is collected and how it is processed see this section. + +### Packages + +Packages are what get deployed to each user. The packages are available here (Omniverse Launcher - Exchange (nvidia.com)) . Applications and Contents Packs are vavaible to download for linux and windows to deploy to users. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/it-managed-launcher.md b/it-managed-launcher.md new file mode 100644 index 0000000000000000000000000000000000000000..0347b217042bd16aa486d7e228dac7187ddc1781 --- /dev/null +++ b/it-managed-launcher.md @@ -0,0 +1,36 @@ + + +Installation Guide — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Installation Guide + +  + +# Installation Guide + +This guide is designed for IT Managers and Systems Administrators who need to install and configure Omniverse Enterprise within a firewalled, air-gapped environment (i.e., limited or no Internet access), or want to prevent users from installing unapproved Omniverse applications. +The instructions and information provided covers the installation and functional use of Omniverse Foundation applications and 3D sample content. + +There are four primary steps involved in setting up a user’s workstation in a firewalled environment, and we encourage you to fully read the instructions before proceeding. + +Downloading, installing, and configuring the IT Managed Launcher on a user’s workstation. +Downloading and Installing one or more Omniverse Foundation Applications on a user’s workstation. +Optional download Installation and configuration of Omniverse Sample 3D Content which can be stored in one of two locations: + +Users’ workstations local hard disk. +Stored on a shared Enterprise Nucleus Server that the users’ workstations can access through a local network. + +Planning Your Installation +Installation on Windows +Installation on Linux +Uninstalling Apps (Win & Linux) + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/kit_architecture.md b/kit_architecture.md new file mode 100644 index 0000000000000000000000000000000000000000..f0077c5ae7a81dc7147ccbe6c124b0b0b48ffe44 --- /dev/null +++ b/kit_architecture.md @@ -0,0 +1,100 @@ + + +Architecture — kit-manual 105.1 documentation + +kit-manual + + » +Architecture + +  + +# Architecture + +Kit is a platform for building applications and experiences. They may or may not have much in common. Some of these may use RTX, omni.ui or other libraries to create rich applications, others may be cut-down windowless services (e.g one to process USD files offline for example). To achieve this goal, Kit aims to be extremely modular: everything is an extension. + +## Extensions + +An Extension is a uniquely named and versioned package loaded at runtime. It can have any or all of the following properties: + +Contain python code. +Contain shared libraries and/or Carbonite plugins. +Provide a C++ API. +Provide a python API. +Depend on other extensions. +Be reloadable (can be unloaded, changed and loaded again at runtime). + +It is the basic building block of Kit-based Applications like Create. More info in the Extensions part of the guide. + +## Kit Kernel (kit.exe/IApp) + +Is a minimal core required to run an extension. It is an entry point for any Kit-based Application. It includes extension manager and basic interface. It is the core which holds everything together. + +## omni.kit.app (omni::kit::IApp) + +omni.kit.app is the basic interface that can be used by any extension, and provides a minimal set of Carbonite plugins to load and set up extensions. It is the main front part of Kit Kernel. +C++: omni::kit::IApp +python: omni.kit.app +It contains: + +Carbonite framework startup +Extension manager +Event system +Update loop +Settings +Python context / runtime (edited) + +It can run from either a Kit executable (kit.exe / kit) or from python. + +## Bundled Extensions + +The Kit SDK comes with a lot of included extensions. Even more extensions are developed outside of Kit SDK and delivered using Extension Registry. + +Note +Try kit.exe --list-exts and then enable one of them, e.g. kit.exe --enable omni.usd + +## Different Modes Example + +### CLI utility + + graph RL + usd[omni.kit.usd] -.- app(omni.kit.app) + con[omni.kit.connection] -.- app + user[user.tool] --> usd + usd --> con + user --> con + user -.- app + +Note +Arrows are extension dependencies. + +User writes an extension user.tool, which depends only on omni.kit.usd and omni.kit.app. +User runs Kit kit.exe --enable user.tool + +Notice that only one extension is specified. omni.kit.app will automatically figure out which extensions are required by resolving dependencies and will load and start them up in the correct order. +user.tool can for instance parse command-line args, do some processing and then exit. + +### GUI CLI utility + + graph RL + ren[omni.kit.rendering] --> win[omni.kit.window] + ui[omni.kit.ui] --> ren + user[user.tool] --> usd + usd[omni.kit.usd] --> con[omni.kit.connection] + user --> con + userui[user.tool.ui] --> ui + userui --> user + user -.- app(omni.kit.app) + userui -.- app + con -.- app + ren -.- app + usd -.- app + win -.- app + + The dependency on the UI unrolls the whole tree of required extensions. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/kit_core_iapp_interface.md b/kit_core_iapp_interface.md new file mode 100644 index 0000000000000000000000000000000000000000..d683454f5d7ea405bde0ecf15b4e3f553da6a4f6 --- /dev/null +++ b/kit_core_iapp_interface.md @@ -0,0 +1,82 @@ + + +Omniverse Kit Core IApp interface — kit-manual 105.1 documentation + +kit-manual + + » +Omniverse Kit Core IApp interface + +  + +# Omniverse Kit Core IApp interface + +The omni.kit.app subsystem is a Kit core plugin that defines the minimal set of functionality that Kit Core provides, specifically: + +Loop runner entry point +Extension manager +Scripting support +General message bus +Shutdown sequence management +Hang detector + +From the external extension point of view, the only wires that extension gets initially - are just the startup and shutdown functions. In order for the extension to be updated in the Kit environment, the extension is supposed to subscribe to the event stream updates that are served by the Kit application’s loop runner. + +## Loop runners + +Loop runner is something that drives the application loop, more specifically - pushes update events into corresponding update event streams and pumps the event streams, thus allowing the modular bits and pieces to tick. +In the simplest scenario, the loop runner is a piece of logic that ensures that core event streams are being pumped periodically. Pseudocode of the simplest loop runner: +void update() +{ + preUpdateEventStream->push(...); + preUpdateEventStream->pump(); + + updateEventStream->push(...); + updateEventStream->pump(); + + postUpdateEventStream->push(...); + postUpdateEventStream->pump(); + + messageBus->pump(); +} + +This is the most straightforward way to drive the Kit app, and it is possible to implement a custom version of IRunLoopRunner and provide it for the app to use. The default loop runner is close to the straightforward implementation outlined in the pseudocode with the small additions of rate limiter logic and other minor pieces of maintenance logic. + +## Extension manager + +Extension manager controls the extensions execution flow, maintains the extension registry, and does other related things. Extensions subsystem will be detailed separately, as this is the main entry point for all the modular pieces that make up the Kit app. The extension manager interface can be accessed via the Kit Core app interface. + +## Scripting + +The Kit Core app sets up Python scripting environment required to support Python extensions and execute custom Python scripts and code snippets. IAppScripting provides a simple interface to this scripting environment, which can be used to execute files and strings, as well as manage script search folders, and subscribe to the event stream that will broadcast all the scripting events (such as script command events, script output events and script error events, all bucketed into corresponding event types). + +## General message bus + +General message bus is a simple yet powerful concept. This is simply an event stream, which is pumped once a frame after all updates, and anybody can use the bus to send and listen to events. This is useful in cases where event stream ownership is inconvenient, or when app-wide events are established (for example, displaying a popup, or things like that) - which can be used by many consumers across all the extensions. According to the event stream guidelines, it is recommended to derive an event type from a string hash. Simple example of message bus usage: +import carb.events +import omni.kit.app + +BUS_EVENT_TYPE = carb.events.type_from_string("my_ext.SOME_EVENT") + +message_bus = omni.kit.app.get_app().get_message_bus_event_stream() + +subscription = message_bus.create_subscription_to_pop_by_type(BUS_EVENT_TYPE, on_change) + +# Store subscription somewhere so it doesn't get deleted immediately +subs.append(subscription) + +## Shutdown sequence + +The application receives shutdown requests via the post quit queries. Queries will be recorded and the app will proceed as usual, until the shutdown query will be processed at a defined place in the update logic. +Prior to the real shutdown initiation, the post query event will be injected into the shutdown event stream. Consumers subscribed to the event stream will have a chance to request a shutdown request cancellation. If it will be requested, the shutdown will not happen. This is needed for example to show the dialog popups confirming exit when there is unsaved work pending. If the shutdown wasn’t cancelled - another event will be injected into the shutdown event stream, this time telling it that the real shutdown is about to start. +However, it is possible to post an uncancellable quit request - as an emergency measure in case the application needs to be shut down without interruptions. + +## Hang detector + +The app core also incorporates a simple hang detector, which is designed to receive periodic nudges, and if there are no nudges for some defined amount of time - it will notify the user that a hang is detected and can crash the application if user chooses. This is helpful because crashes generates crash dumps, allowing developers understand what happened, and what the callstack was at the time of this hang. Things like the timeout, if it is enabled - and other things - can be tweaked via the settings. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/kit_overview.md b/kit_overview.md new file mode 100644 index 0000000000000000000000000000000000000000..323082519e6d6e4aefef59be4d7b02db8c013f42 --- /dev/null +++ b/kit_overview.md @@ -0,0 +1,113 @@ + + +Overview — kit-manual 105.1 documentation + +kit-manual + + » +Overview + +  + +# Overview + +## Omniverse Kit + +Omniverse Kit is the SDK for building Omniverse applications like Create and View. It can also be used to develop your own Omniverse applications. +It brings together a few major components: + +USD/Hydra (see also omni.usd) +Omniverse (via Omniverse client library) +Carbonite +Omniverse RTX Renderer +Scripting +A UI Toolkit (omni.ui) + +As a developer you can use any combination of those to build your own application or just extend or modify what’s already there. + +### USD/Hydra + +USD is the primary Scene Description used by Kit, both for in-memory/authoring/runtime use, and as the serialisation format. +USD can be accessed directly via an external shared library. If your plugin uses USD through C++ it must link to this library. You can also use USD from python using USD’s own python bindings, which cover the whole USD API (but not all of it’s dependencies like Tf, SDF etc). We generated reference documentation for it, see the Modules. +Hydra allows USD to stream it’s content to any Renderer which has a Hydra Scene Delegate - these include Pixar’s HDStorm (currently shipped with the USD package shipped as part of Kit) as well as the Omniverse RTX Renderer and IRay (both of which ship with Kit) + +### Omni.USD + +Omni.USD (See the omni.usd module for API docs) is an API written in C++ which sits on top of USD, Kit’s core, and the OmniClient library, and provides application-related services such as: + +Events/Listeners +Selection handling +Access to the Omniverse USD Audio subsystem +Access to the Omniverse Client Library, and handling of Omniverse Assets/URIs +USD Layer handling +A USDContext which provides convenient access to the main USDStage and its layers, as well as various Hydra, Renderer and Viewport related services +MDL support +Python bindings to all of the above, using the Python-3 async API in most cases + +### Omniverse Client Library + +This is the library that Omniverse clients such as Kit use to communicate with both Omniverse servers and with local filesystems when loading and saving Assets (such as USD, MDL and textures). +It contains: + +a USD AssetResolver for parsing omniverse:// URIs +some SDF FileFormat plugins to support specialised use cases, including Omniverse’s Live Edit mode +an API to read/write/copy data/files and filesystem-like queries on Omniverse Nucleus servers +Support for managing connections with Omniverse servers +Python bindings to all of the above, using Python-3 async API in most cases + +### Carbonite + +The Carbonite SDK provides the core functionality of all Omniverse apps. This is a C++ based SDK that provides features such as: + +Plugin management +Input handling +File access +Persistent settings management +Audio +Asset loading and management +Thread and task management +Image loading +Localization +Synchronization +Basic windowing + +All of this is provided with a single platform independent API. + +#### Plugins + +Carbonite Plugins are basically shared libraries with C-style interfaces, which can be dynamically loaded and unloaded. Interfaces are semantically versioned and backward compatibility is supported. +Most plugin interfaces have python bindings, i.e they are accessible from python. The pybind11 library is used. +For your own plugins you can also write python bindings and make them directly accessible from python. + +### Omniverse RTX Renderer + +As mentioned above, Pixar’s Hydra is used to interface between USD and RTX. This is an area of high architectural complexity, as Kit is required to support a large number of Renderers, multiple custom Scene delegates, multiple Hydra Engines (to support GL, Vulkan, DX12) and a host of other requirements, providing a Viewport inside Kit Applications with Gizmos and other controls, all rendering asynchronously at high frame rates + +### Scripting + +Kit comes with a version of python (currently 3.7) . You can run arbitrary python scripts in Kit based apps which can: + +Access all plugins that are exposed via python bindings +Access the USD python API +Access Kit python-only modules +Load and access your C++ Carbonite plugins + +Currently there are 3 ways to run scripts: + +At app startup time by passing cmd arguments. E.g.: kit.exe --exec "some_script.py" +Using the Console window +Using the Script Editor Window + +### Kit Extensions + +Building on top of scripting and Carbonite Plugins there is the highest-level and probably most crucial building block: Kit Extensions. You can think of Extensions as versioned packages with a runtime enabled/disabled state. These extensions can depend on other extensions. + +### omni.ui + +Omni.ui, our UI framework, is built on top of Dear Imgui. and written in C++, but exposes only a Python API. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/known-issues.md b/known-issues.md new file mode 100644 index 0000000000000000000000000000000000000000..17331e440edbd41ed6c40adb5b67364dfffbcdcb --- /dev/null +++ b/known-issues.md @@ -0,0 +1,31 @@ + + +Known issues — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Known issues + +  + +# Known issues + +## CentOS and Red Hat Enterprise Linux + +There is a known issue using CentOS and Red Hat Enterprise Linux using Omniverse Launcher. +Include the --no-sandbox flag when launching from the terminal. + +## Launcher (General) + +Internet Access is required to use the Workstation Launcher (Internet Access is not required when using the IT Managed Launcher.) +Occasional graphical artifacts and errors in Launcher UI for certain driver OS combinations +Some Connectors may be installed without the associated Application on Linux systems +Launcher may show errors after downloading content on Linux systems + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/linux-troubleshooting.md b/linux-troubleshooting.md new file mode 100644 index 0000000000000000000000000000000000000000..e20b9845fe75c248e62eb415a19d9b9b1f189a2f --- /dev/null +++ b/linux-troubleshooting.md @@ -0,0 +1,238 @@ + + +Linux Troubleshooting — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Linux Troubleshooting + +  + +# Linux Troubleshooting + +Instructions for resolving issues when running Omniverse-kit or +Omniverse-Create on Linux. + +## Q1) How to install a driver. + +Always install .run executable driver files. e.g. downloaded +from: https://www.nvidia.com/Download/Find.aspx +Do NOT install PPA drivers. PPA drivers are packaged with +Linux distribution, and installed with add-apt or +Software & Updates. These drivers are not easy to uninstall or +clean up. It requires purging them and cleaning up Vulkan ICD files +manually. +Driver installation steps: + +Go to TTYs mode (CRL + ALT + F3), or use systemctl +approach. +Uninstall all previous drivers: +sudo nvidia-uninstall + +The following clean-up steps are only required if you have leftovers from PPA drivers: +sudo apt-get remove --purge nvidia-* +sudo apt autoremove +sudo apt autoclean + +Reboot your machine and then go to TTYs mode from the login +screen: +sudo chmod +x NVIDIA-Linux-x86_64-460.67.run +sudo ./NVIDIA-Linux-x86_64-460.67.run + +If the kernel could not be compiled, make sure to download headers +and image files related to your Linux kernel before the driver +installation. +Ignore errors related to missing 32-bit libraries, and build any +missing library if it required a confirmation. + +Driver installation over SSH on remote machines: + +Stop X, install the driver with NVIDIA driver installer, and +restart X. +On Ubuntu 18.04 to stop X, run the following command, then wait a +bit, and ensure X is not running. e.g.: run ps auxfw and +verify no X or Window manager process is running. +sudo systemctl isolate multi-user.target + +To restart X, run: +sudo systemctl isolate graphical.target + +Installing a driver on a system with HP Anyware already configured +should work just the same. Installing HP Anyware however requires +following their instructions the first time around, before installing +the NVIDIA driver. + +## Q2) Omniverse kit logs only listed one of my GPUs, but nvidia-smi shows multiple GPUs. + +How to support enumeration of multiple GPUs in Vulkan + +xserver-xorg-core 1.20.7 or newer is required for multi-GPU +systems. Otherwise, Vulkan applications cannot see multiple GPUs. +Ubuntu 20.04 ships with Xorg 1.20.8 by default. Ubuntu 20 is known to work, but not exhaustively tested by Omniverse QA +Ubuntu 16 is not supported. +How to update xorg: + +Update Ubuntu 18.04.x LTS through software update to the +latest Ubuntu 18.04.5 LTS. +Install LTS Enablement Stacks to upgrade xorg: +https://wiki.ubuntu.com/Kernel/LTSEnablementStack + +## Q3) How to verify a correct Vulkan setup with vulkaninfo or vulkaninfoSDK utility + +Download the latest Vulkan SDK tar.gz from +https://vulkan.lunarg.com/sdk/home and unzip it. +Do NOT install Vulkan SDK through apt-install, unless you +know what exact version Omniverse supports and you need validation +layers for debugging (refer to readme.md). Just simply download +the zip file. +Execute the following utility from the unzipped pack. +bin/vulkaninfo + +It should enumerate all the GPUs. If it failed, your driver or the +required xorg is not installed properly. Do NOT install +vulkan-utils or other MESA tools to fix your driver, as they +might install old incompatible validation layers. +nvidia-smi GPU table is unrelated to the list of GPUs that Vulkan +driver reports. + +## Q4) I have a single GPU, but I see multiple GPUs of the same type reported in Omniverse kit logs. + +You likely have leftover components from other PPA drivers in +addition to the one you installed from the .run driver packages. +You can confirm this by checking that vulkaninfo only shows a +single GPU. These extra ICD files should be cleaned up. +These extra files will not affect the output of nvidia-smi, as it +is a Vulkan driver issue. +Steps to clean up duplicate ICD files: + +If you see both of the following folders have some json files, +such as nvidia_icd.json, then delete the duplicate icd.d +folder from /usr/share/vulkan/ path. +"/etc/vulkan/icd.d": Location of ICDs installed from non-Linux-distribution-provided packages +"/usr/share/vulkan/icd.d": Location of ICDs installed from Linux-distribution-provided packages + +Run vulkaninfo to verify the fix, instead of nvidia-smi. + +## Q5) Startup failure with: VkResult: ERROR_DEVICE_LOST + +A startup device lost is typically a system setup bug. Potential bugs: + +A bad driver installation. + +Uninstall and re-install it. + +Driver bugs prior to the 460.67 driver when you have different GPU models. e.g. Turing + Ampere GPUs. + +Solution: Install driver 460.67 or higher, which has the bug fix. +Workaround on older drivers: Remove non-RTX cards, and re-install the driver after removing any GPU. +This issue has been known to crash other raytracing applications. However, regular raster vulkan applications won’t be affected. +If you have multiple GPUs, --/renderer/activeGpu=1 setting cannot change this behavior. + +Old Shader caches are left in the folder + +Delete the contents of folder /home/USERNAME/.cache/ov/Kit/101.0/rendering +It is known with omniverse-kit SDK packages that are not built +from the source, or not using the omniverse installer to remove +the caches. + +## Q6) Startup failure with: GLFW initialization failed + +This is a driver or display issue: + +A physical display must be connected to your GPU, unless you are running kit/Create headless with --no-window for streaming. No visual rendering can happen on the X11 window without a display and presentable swapchain. +Test the display setup with the following command. +echo $DISPLAY +If nothing is returned, set the environment. +Set the display environment as following persistently +export DISPLAY=:0.0 +Reboot upon completion. +echo $DISPLAY to verify again after the reboot. +Re-install the driver if above steps did not help. + +## Q7) Startup failure with: Failed to find a graphics and/or presenting queue. + +Your GPU is not connected to a physical display. Required, except +when running Kit/Create headless in --no-windows mode +Your GPU is connected to a physical display, however, it is not set +as the default GPU in xorg for Ubuntu’s GUI rendering: + +Choose what GPU to use for both Ubuntu UI and Omniverse rendering to present the output to the screen. +Set its busid as follows and reboot: sudo nvidia-xconfig --busid PCI:103:0:0 +busid is in decimal format, taken from NVIDIA X Server Settings +Connect the physical display to that GPU and boot up. +If you have multiple GPUs, --/renderer/activeGpu=1 setting cannot change what GPU to run on. busid must be set in the xorg config, and then activeGpu should be set to the same device if it is not zero. +NVIDIA Colossus involves a lot more work. Refer to Issac setup. + +## Q8) Startup failure for carb::glinterop with X Error of failed request:  GLXBadFBConfig + +OpenGL Interop support is optional for RTX renderer in the latest build, +and is only needed for Storm renderer. However, such failures typically +reveals other system setup issues that might also affect Vulkan +applications. + +A few potential issues: + +Unsupported driver or hardware. Currently, OpenGL 4.6 is the minimum required. +Uninstall OpenGL utilities such as Mesa-utils and re-install your NVIDIA driver. + +## Q9) How to specify what GPUs to run Omniverse apps on + +Single-GPU mode: Follow Q8 instructions to set the desired main GPU for presentation, and then set index of that GPU with the following option during launch if it is not zero. +--/renderer/activeGpu=1 +Multi-GPU mode: Follow Q8 instructions and then set indices of the desired GPUs with the following option during launch. The first device in the list performs the presentation and should be set in Xorg config. +--/renderer/multiGpu/activeGpus='1,2' + +Note + +Always verify that your desired GPUs are set as Active with a +“Yes” in the GPU table of omniverse .log file under +[gpu.foundation]. GPU index in above options are from this table +and not from nvidia-smi. +CUDA_VISIBLE_DEVICES and other CUDA commands cannot change +what GPUs to run on for Vulkan applications. + +## Q10) Viewport is gray and nothing is rendered. + +This means that RTX renderer has failed and the reason of the failure will be printed in the full .log file as errors, such as an unsupported driver, hardware or etc. The log file is typically located at /home/USERNAME/**/logs/**/*.log + +## Q11) Getting many failures similar to: Failed to create change watch for xxx: errno=28, No space left on device + +This is a file change watcher limitation on Linux which is usually set to 8k. Either close other applications that use watchers, or increase max_user_watches to 512k. Note that this will increase your system RAM usage. + +### To view the current watcher limit: + +cat /proc/sys/fs/inotify/max_user_watches + +### To update the watcher limit: + +Edit /etc/sysctl.conf and add +fs.inotify.max_user_watches=524288 line. +Load the new value: sudo sysctl -p + +You may follow the full instructions listed for Visual Studio Code Watcher limit + +## Q12) How to increase the file descriptor limit on Linux to render on more than 2 GPUs + +If you are rendering with multiple GPUs, file descriptor limit is +required to be increased. The default limit is 1024, but we +recommend a higher value, like 65535, for systems with more than 2 +GPUs. Without that, Omniverse applications will fail during the creation +of shared resources, such as Vulkan fences, and will lead to crash at +startup. + +### To increase the file descriptor limit + +Modify /etc/systemd/user.conf and /etc/systemd/system.conf with the following line. This takes care of graphical login: +DefaultLimitNOFILE=65535 +Modify /etc/security/limits.conf with the following lines. This takes care of non-GUI console login: +hard nofile 65535 +soft nofile 65535 +Reboot your computer for changes to take effect. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/linux_troubleshooting.md b/linux_troubleshooting.md new file mode 100644 index 0000000000000000000000000000000000000000..abb1ac309e2c20810903e031d56d814921e65c10 --- /dev/null +++ b/linux_troubleshooting.md @@ -0,0 +1,237 @@ + + +Linux Troubleshooting — kit-manual 105.1 documentation + +kit-manual + + » +Linux Troubleshooting + +  + +# Linux Troubleshooting + +Instructions for resolving issues when running Omniverse-kit or +Omniverse-Create on Linux. + +## Q1) How to install a driver. + +Always install .run executable driver files. e.g. downloaded +from: https://www.nvidia.com/Download/Find.aspx +Do NOT install PPA drivers. PPA drivers are packaged with +Linux distribution, and installed with add-apt or +Software & Updates. These drivers are not easy to uninstall or +clean up. It requires purging them and cleaning up Vulkan ICD files +manually. +Driver installation steps: + +Go to TTYs mode (CRL + ALT + F3), or use systemctl +approach. +Uninstall all previous drivers: +sudo nvidia-uninstall + +The following clean-up steps are only required if you have leftovers from PPA drivers: +sudo apt-get remove --purge nvidia-* +sudo apt autoremove +sudo apt autoclean + +Reboot your machine and then go to TTYs mode from the login +screen: +sudo chmod +x NVIDIA-Linux-x86_64-460.67.run +sudo ./NVIDIA-Linux-x86_64-460.67.run + +If the kernel could not be compiled, make sure to download headers +and image files related to your Linux kernel before the driver +installation. +Ignore errors related to missing 32-bit libraries, and build any +missing library if it required a confirmation. + +Driver installation over SSH on remote machines: + +Stop X, install the driver with NVIDIA driver installer, and +restart X. +On Ubuntu 18.04 to stop X, run the following command, then wait a +bit, and ensure X is not running. e.g.: run ps auxfw and +verify no X or Window manager process is running. +sudo systemctl isolate multi-user.target + +To restart X, run: +sudo systemctl isolate graphical.target + +Installing a driver on a system with Teradici already configured +should work just the same. Installing Teradici however requires +following their instructions the first time around, before installing +the NVIDIA driver. + +## Q2) Omniverse kit logs only listed one of my GPUs, but nvidia-smi shows multiple GPUs. + +How to support enumeration of multiple GPUs in Vulkan + +xserver-xorg-core 1.20.7 or newer is required for multi-GPU +systems. Otherwise, Vulkan applications cannot see multiple GPUs. +Ubuntu 20.04 ships with Xorg 1.20.8 by default. Ubuntu 20 is known to work, but not exhaustively tested by Omniverse QA +Ubuntu 16 is not supported. +How to update xorg: + +Update Ubuntu 18.04.x LTS through software update to the +latest Ubuntu 18.04.5 LTS. +Install LTS Enablement Stacks to upgrade xorg: +https://wiki.ubuntu.com/Kernel/LTSEnablementStack + +## Q3) How to verify a correct Vulkan setup with vulkaninfo or vulkaninfoSDK utility + +Download the latest Vulkan SDK tar.gz from +https://vulkan.lunarg.com/sdk/home and unzip it. +Do NOT install Vulkan SDK through apt-install, unless you +know what exact version Omniverse supports and you need validation +layers for debugging (refer to readme.md). Just simply download +the zip file. +Execute the following utility from the unzipped pack. +bin/vulkaninfo + +It should enumerate all the GPUs. If it failed, your driver or the +required xorg is not installed properly. Do NOT install +vulkan-utils or other MESA tools to fix your driver, as they +might install old incompatible validation layers. +nvidia-smi GPU table is unrelated to the list of GPUs that Vulkan +driver reports. + +## Q4) I have a single GPU, but I see multiple GPUs of the same type reported in Omniverse kit logs. + +You likely have leftover components from other PPA drivers in +addition to the one you installed from the .run driver packages. +You can confirm this by checking that vulkaninfo only shows a +single GPU. These extra ICD files should be cleaned up. +These extra files will not affect the output of nvidia-smi, as it +is a Vulkan driver issue. +Steps to clean up duplicate ICD files: + +If you see both of the following folders have some json files, +such as nvidia_icd.json, then delete the duplicate icd.d +folder from /usr/share/vulkan/ path. +"/etc/vulkan/icd.d": Location of ICDs installed from non-Linux-distribution-provided packages +"/usr/share/vulkan/icd.d": Location of ICDs installed from Linux-distribution-provided packages + +Run vulkaninfo to verify the fix, instead of nvidia-smi. + +## Q5) Startup failure with: VkResult: ERROR_DEVICE_LOST + +A startup device lost is typically a system setup bug. Potential bugs: + +A bad driver installation. + +Uninstall and re-install it. + +Driver bugs prior to the 460.67 driver when you have different GPU models. e.g. Turing + Ampere GPUs. + +Solution: Install driver 460.67 or higher, which has the bug fix. +Workaround on older drivers: Remove Non-rtx cards, and re-install the driver after removing any GPU. +This issue has been known to crash other raytracing applications. However, regular raster vulkan applications won’t be affected. +If you have multiple GPUs, --/renderer/activeGpu=1 setting cannot change this behavior. + +Old Shader caches are left in the folder + +Delete the contents of folder /home/USERNAME/.cache/ov/Kit/101.0/rendering +It is known with omniverse-kit SDK packages that are not built +from the source, or not using the omniverse installer to remove +the caches. + +## Q6) Startup failure with: GLFW initialization failed + +This is a driver or display issue: + +A physical display must be connected to your GPU, unless you are running kit/Create headless with --no-window for streaming. No visual rendering can happen on the X11 window without a display and presentable swapchain. +Test the display setup with the following command. +echo $DISPLAY +If nothing is returned, set the environment. +Set the display environment as following persistently +export DISPLAY=:0.0 +Reboot upon completion. +echo $DISPLAY to verify again after the reboot. +Re-install the driver if above steps did not help. + +## Q7) Startup failure with: Failed to find a graphics and/or presenting queue. + +Your GPU is not connected to a physical display. Required, except +when running Kit/Create headless in --no-windows mode +Your GPU is connected to a physical display, however, it is not set +as the default GPU in xorg for Ubuntu’s GUI rendering: + +Choose what GPU to use for both Ubuntu UI and Omniverse rendering to present the output to the screen. +Set its busid as follows and reboot: sudo nvidia-xconfig --busid PCI:103:0:0 +busid is in decimal format, taken from NVIDIA X Server Settings +Connect the physical display to that GPU and boot up. +If you have multiple GPUs, --/renderer/activeGpu=1 setting cannot change what GPU to run on. busid must be set in the xorg config, and then activeGpu should be set to the same device if it is not zero. +NVIDIA Colossus involves a lot more work. Refer to Issac setup. + +## Q8) Startup failure for carb::glinterop with X Error of failed request:  GLXBadFBConfig + +OpenGL Interop support is optional for RTX renderer in the latest build, +and is only needed for Storm renderer. However, such failures typically +reveals other system setup issues that might also affect Vulkan +applications. + +A few potential issues: + +Unsupported driver or hardware. Currently, OpenGL 4.6 is the minimum required. +Uninstall OpenGL utilities such as Mesa-utils and re-install your NVIDIA driver. + +## Q9) How to specify what GPUs to run Omniverse apps on + +Single-GPU mode: Follow Q8 instructions to set the desired main GPU for presentation, and then set index of that GPU with the following option during launch if it is not zero. +--/renderer/activeGpu=1 +Multi-GPU mode: Follow Q8 instructions and then set indices of the desired GPUs with the following option during launch. The first device in the list performs the presentation and should be set in Xorg config. +--/renderer/multiGpu/activeGpus='1,2' + +Note + +Always verify that your desired GPUs are set as Active with a +“Yes” in the GPU table of omniverse .log file under +[gpu.foundation]. GPU index in above options are from this table +and not from nvidia-smi. +CUDA_VISIBLE_DEVICES and other CUDA commands cannot change +what GPUs to run on for Vulkan applications. + +## Q10) Viewport is gray and nothing is rendered. + +This means that RTX renderer has failed and the reason of the failure will be printed in the full .log file as errors, such as an unsupported driver, hardware or etc. The log file is typically located at /home/USERNAME/**/logs/**/*.log + +## Q11) Getting spam of failures: Failed to create change watch for xxx: errno=28, No space left on device + +This is a file change watcher limitation on Linux which is usually set to 8k. Either close other applications that use watchers, or increase max_user_watches to 512k. Note that this will increase your system RAM usage. + +### To view the current watcher limit: + +cat/proc/sys/fs/inotify/max_user_watches + +### To update the watcher limit: + +Edit /etc/sysctl.conf and add +fs.inotify.max_user_watches=524288 line. +Load the new value: sudo sysctl -p + +You may follow the full instructions listed for Visual Studio Code Watcher limit + +## Q12) How to increase the file descriptor limit on Linux to render on more than 2 GPUs + +If you are rendering with multiple GPUs, file descriptor limit is +required to be increased. The default limit is 1024, but we +recommend a higher value, like 65535, for systems with more than 2 +GPUs. Without that, Omniverse applications will fail during the creation +of shared resources, such as Vulkan fences, and will lead to crash at +startup. + +### To increase the file descriptor limit + +Modify /etc/systemd/user.conf and /etc/systemd/system.conf with the following line. This takes care of graphical login: +DefaultLimitNOFILE=65535 +Modify /etc/security/limits.conf with the following lines. This takes care of non-GUI console login: +hard nofile 65535 +soft nofile 65535 +Reboot your computer for changes to take effect. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/logging.md b/logging.md new file mode 100644 index 0000000000000000000000000000000000000000..4c5e4e9b871d10fc82cd658628651c6fda7f8a3e --- /dev/null +++ b/logging.md @@ -0,0 +1,54 @@ + + +Logging — kit-manual 105.1 documentation + +kit-manual + + » +Logging + +  + +# Logging + +For logging Carbonite is used. +By default info level logging is written to a file. Path to log file is written to stdout among the first lines when Kit starts. +At runtime path to a log file can be found in setting: /log/file or using ${logs} token. + +## Python Logging + +Python standard logging is redirected to Carbonite logger and it is recommended to use it instead. + +## Code Examples + +### Logging with python + +# Logging/Log + +# Carbonite logger is used both for python and C++: +import carb +carb.log_info("123") +carb.log_warn("456") +carb.log_error("789") + +# For python it is recommended to use std python logging, which also redirected to Carbonite +# It also captures file path and loc +import logging +logger = logging.getLogger(__name__) +logger.info("123") +logger.warning("456") +logger.error("789") + +### Logging with C++ + +#include + +CARB_LOG_INFO("123") +CARB_LOG_WARN("456") +CARB_LOG_ERROR("789") + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/migration.md b/migration.md new file mode 100644 index 0000000000000000000000000000000000000000..46def9720de6eb6e85d1f74b723847a1541d6730 --- /dev/null +++ b/migration.md @@ -0,0 +1,2714 @@ + + +Kit 105 Upgrade Migration Guide — kit-manual 105.1 documentation + +kit-manual + + » +Kit 105 Upgrade Migration Guide + +  + +# Kit 105 Upgrade Migration Guide + +Welcome! + +Kit Extensions Upgrade + +Visual Studio 2019 +Issues with USD +Kit SDK + +Update premake.lua +Update Python Include Paths or Links +Update Boost Links +Common Errors +Usd 22.11 and Python 3.10 Updates + +Python 3.10 Upgrade + +Breaking Change: must call super __init__ function +Breaking Change: DLL load behavior +Breaking Change: Boost upgrade to version 1_76 + +Schema Development + +Introduction +What’s Changed? (Relevant Release Notes) + +22.11 + +22.08 + +22.05 + +22.03 + +21.11 + +21.08 + +21.05 + +21.02 + +Breaking Change: Applied API Schemas, Inheritance, and Built-Ins + +Inheriting and Applying Built-Ins To Represent Dependencies + +What do I need to change? + +Accessing API Schema Attributes + +Breaking Change: Schema Kind +Breaking Change: Retrieving Schema Type Names +New Feature: Auto-Applied API Schemas +New Feature: Abstract Typed Schemas and the Schema Registry +New Feature: Codeless Schemas +New Feature: Additional GLOBAL Schema Metadata to Define Use of Literal Identifier Names +New Feature: Defining Sparse Overrides From Built-Ins + +Ar 2.0 (Asset Resolution Re-architecture) + +Introduction +Breaking Change: IsSearchPath() Removed +Breaking Change: IsRelativePath() Removed +Breaking Change: AnchorRelativePath() Renamed +Breaking Change: ComputeNormalizedPath() Removed +Breaking Change: ComputeRepositoryPath() Removed +Breaking Change: ComputeLocalPath() Removed +Breaking Change: Resolve() Signature Changed +Breaking Change: ResolveWithAssetInfo() Removed +Breaking Change: GetModificationTimestamp() Signature Changed +Breaking Change: OpenAsset() / ArAsset Signature Changed +New Feature: OpenAssetForWrite() / ArWritableAsset +New Feature: ArAsset Detached Assets + +API Breaking Changes + +Base + +Arch + +Arch.Filesystem + +● ArchFile removed + +Tf + +pxr.Tf Python Module + +● PrepareModule to PreparePythonModule + +Usd + +Ar + +Ar.Resolver + +● IsSearchPath() Removed + +● IsRelativePath() Removed + +● AnchorRelativePath() to CreateIdentifier() + +● ComputeNormalizedPath() Removed + +● ComputeRepositoryPath() Removed + +● ComputeLocalPath() Removed + +● Resolve() Signature Changed + +● ResolveWithAssetInfo() Removed + +● GetModificationTimestamp() Signature Changed + +● OpenAsset() / ArAsset Signature Changes + +Sdf + +Sdf.ChangeBlock + +● Sdf.ChangeBlock(fastUpdates) to Sdf.ChangeBlock() + +Sdf.Layer + +● GetResolvedPath return type changed + +Usd + +Usd.CollectionAPI + +● ApplyCollection to Apply + +Usd.Prim + +● “Master” to “Prototype” + +● GetAppliedSchemas: Now filters out non-existent schemas + +Usd.SchemaRegistry + +● SchemaType to SchemaKind + +● Property Names of MultipleApply Schemas now namespaced in schema spec + +Usd.Stage + +● GetMasters to GetPrototypes + +UsdGeom + +UsdGeom.Imageable + +UsdLux + +● All properties now prefixed with “inputs:” + +UsdLux.Light + +● UsdLux.Light to UsdLuxLightAPI + +● UsdLux.LightPortal to UsdLux.PortalLight + +● UsdLuxLight.ComputeBaseEmission() removed + +● UsdLux.LightFilterAPI removed + +UsdRender + +UsdRender.SettingsAPI + +UsdShade + +UsdShade.ConnectableAPI + +● IsNodeGraph replaced with IsContainer + +UsdShade.MaterialBindingAPI + +● Material bindings require UsdShadeMaterialBindingAPI to be applied + +UsdSkel + +UsdSkel.Cache + +● Populate/ComputeSkelBinding/ComputeSkelBindings now require a predicate parameter + +Imaging + +Glf + +● Removed glew dependency + +Other Breaking Changes + +Schemas + +pluginInfo.json + +● plugInfo.json now requires schemaKind field + +Non-Breaking Changes + +Imaging + +Hdx + +Hdx.TaskController + +● Added HdxTaskController::SetPresentationOutput, i.e., for AOV buffering 0 + +Dumping Ground + +● Schemas removed in 20.08 to 22.11 +● Schemas added in 20.08 to 22.11 + +## Welcome! + +It’s no easy feat to roll out 2+ years of contributions to Python, +Visual Studio, and the USD Ecosystem in Omniverse– thank you for taking +the time to use this guide to navigate the myriad incompatibilities +introduced in this massive upgrade. +For the latest Omniverse Forum posts related to Kit 105 migration, please go [here] + +## Kit Extensions Upgrade + +This section on upgrading Kit extensions contains information +about breaking changes necessary to get building. +A fair amount of the toolset that we build on has been upgraded. This +includes a new version of Visual Studio (2019), Boost 1.76, Python 3.10 +and USD 22.11. These changes do impact Kit Extension developers and this +next section will walk through some of the changes needed to upgrade an +Extension to support all these changes. +The following steps assume that your Kit Extension is based on the Kit +Extensions Template. The steps here should help the upgrade process but +might be different depending on how the repository is set up to build. + +### Visual Studio 2019 + +The first step is to make sure your Extension is compatible with Visual +Studio 2019. + +Update your host-deps.packman.xml + +Change your premake dependency to a more recent version. +Currently, this is “5.0.0-beta1+nv1-${platform}” +Make your msvc dependency compatible with Visual Studio 2019. +Currently, this is “2019-16.11.17-2” +Also use an updated version of winsdk which is “10.0.19608.0” + +Next, you’ll need to update your version of repo_kit_tools in +repo-deps.packman.xml. This updated version is needed so that +premake will use the Visual Studio 2019 generator during the build +process. This will require repo_kit-tools version 0.9.4 or later + +These updated dependencies should get the Extension repository pulling +in the necessary dependencies for a Windows build using Visual Studio +2019 +NOTE: An issue was encountered where the Extension(s) would still +issue Windows build errors if built from a normal Windows Command +Prompt. Switching to a Visual Studio 2019 Command Prompt fixed the +issue. The exact build error was: +TRACKER : error TRK0005: Failed to locate: \"CL.exe\". The system cannot find the file specified. +C:\\omniverse\\kit-ext-tpl-cpp-int\\\_compiler\\vs2019\\omni.example.cpp.commands.tests\\omni.example.cpp.commands.tests.vcxproj + +TRACKER : error TRK0005: Failed to locate: \"CL.exe\". The system cannot find the file specified. +C:\\omniverse\\kit-ext-tpl-cpp-int\\\_compiler\\vs2019\\omni.example.cpp.commands.plugin\\omni.example.cpp.commands.plugin.vcxproj + +#### Issues with USD + +The main issue that we are aware of when building a USD plugin, such as +a SdfFileFormat plugin, against Visual Studio 2019 is an optimization +that the compiler makes with release builds. Visual Studio 2019 enables +the “/Zc:inline” option by default, we need to make sure that this +option is disabled otherwise USD will not be able to construct your USD +plugin in a release build. + +In premake.lua make sure that you add the ”/Zc:inline-” +buildoption for release builds to disable that +behavior +If you are curious about why this needs to be done you can read +more about the issue +[here] + +### Kit SDK + +Next, we’ll need to point our Extension at a kit-sdk dependency that +includes all the changes necessary for Usd 22.11 and Python 3.10: + +The kit-sdk dependency is usually declared within kit-sdk.packman.xml if using the Kit Extension Template + +kit-sdk@105.0.1 + +105.0.1+release.109439.ed961c5c.tc.${platform}.${config} + +kit-sdk@105.1 + +105.1+master.121139.5d3cfe78.tc.${platform}.${config} + +We will also need to correctly import these new upstream dependencies +from our kit-sdk dependency: + +In target-deps.packman.xml (or kit-sdk-deps.packman.xml) make sure that you are importing both the python and nv_usd dependencies from kit-sdk + +Make sure that your import path is pulling from all-deps.packman.xml in Kit +filter to include “python” +filter to include “nv_usd_py310_${config}” + +This only needs to be added or changed if you extension depends on nv_usd. So if you see a dependency like nv_usd_py37_${config} make sure that it is updated to nv_usd_py310_${config} + +At a minimum, your target-deps.packman.xml should be updated to look something like: + + + + + + + + + + +If you are pulling your nv_usd or python dependencies directly, it might be a good time to update your dependencies +and import directly from Kit’s all-deps.packman.xml. This will help align versions of Python and USD with the supported version of Kit for your Extension. +For example, if you are declaring your python and nv_usd dependencies like the following: + + + + + + + + + + + + + + +Both python and nv_usd dependencies should be updated to use importing, i.e: + + + + + + + + + + +### Update premake lua + +We should have all of the necessary dependencies for MSVC 2019, Python +3.10, Boost 1.76 and USD 22.11 correctly set up. The next part of the +process is updating the premake.lua scripts for each extension. +Unfortunately, each one of these premake.lua scripts can be different +depending on what’s required to build the extension. For example, if +your extension is purely Python no changes to premake.lua should be +necessary. But if your extension depends on USD and links against Boost +for Python bindings it’s very likely that premake.lua will need to be +updated + +#### Update Python Include Paths or Links + +If you have an Extension that creates Python bindings for a Native +Extension, you’ll more than likely need to tweak some include paths and +links in premake.lua. + +In premake.lua for each Extension search for usages of “python3.7” +and update to “python3.10”. Typically, these will be limited to +“includedirs” and “links” in premake. + +This should be as simple as search and replace but YMMV with +complex build scripts. +The important part is that the Python 3.10 headers and binaries +can be found when you go to build / link your Extension. + +#### Update Boost Links + +If the Extension you are building depends on Boost, include paths and +links might need to change. This is definitely the case with Windows as the DLL +includes the MSVC toolset along with the Boost version number in its name. +These values are now vc142 and 1_76, respectively. + +For convenience, the link_boost_for_windows function can be used. +When calling “link_boost_for_windows({“boost_python310”})” that should +correctly link against Boost for Python 3.10 using the vc142 toolset. + +#### Common Errors + +The location of the omni.usd binary has changed. To properly link +against omni.usd you will need to change the library path to find +it: + +libdirs {“%{kit_sdk}/extscore/omni.usd.core/bin”} -> libdirs +{“%{kit_sdk}/exts/omni.usd.core/bin”} + +Unable to find Python headers / library for building Python bindings + +The following error usually means that an include directory +within a premake5.lua build script might be misconfigured and +not set to the correct directory + +../../../_build/target-deps/nv_usd/debug/include/boost/python/detail/wrap_python.hpp:57:11: +fatal error: pyconfig.h: No such file or directory + +Within your premake5.lua scripts a couple examples of incorrect +paths: + +includedirs { target_deps.."/python/include/python3.10**m**" } + +includedirs { target_deps.."/python/include/python3.7m" } + +includedirs { target_deps.."/python/include/python3.7" } + +These include directories should be set to the following now that +Kit is using Python 3.10 + +includedirs { target_deps.."/python/include/python3.10" } + +### Usd 22.11 and Python 3.10 Updates + +From here, the Extension repository should at least be able to find all +the necessary dependencies, build and link against them. The next part +will be to make any necessary changes for Python 3.10, such as calling +super().__init__(), and USD 22.11. These changes can vary wildly +between repositories and developers should refer to all the +documentation in this guide on how to properly migrate their repository. + +## Python 3.10 Upgrade + +### Breaking Change: must call super __init__ function + +All derived classes that override __init__ must call the super +__init__ function. This does not limit only to omni.ext.IExt, +but any class, the following example will also fail: + +class A: + + def __init__(self): + + self.x = 0 + +class B(A): + + def __init__(self): + + self.y = 0 + +b = B() +print(b.x, b.y) + +Omitting this is now an error in 3.10. The simplest way is to call +super().__init__() with arguments if there are any. + +### Breaking Change: DLL load behavior + +DLL load behavior changed on Windows in Python 3.8+. +The PATH environment variable is no longer used for directories to +load DLLs from. Anything outside of the script dir/python exe dir +must be added in code now. There’s a new function in the os module +called add_dll_directory that takes a string path arg. + +### Breaking Change: Boost upgrade to version 1_76 + +Boost has an auto linker for Windows that is enabled by default. The +lib names for Windows vary based on compiler, config, and mt or +not. The auto linker handles determining the correct version based +on the active build tooling. Boost 1_76 is aware of the VS 2019 +build tools, unlike version 1_68 that was being used previously. +There’s a premake helper function in Kit called link_boost_for_windows +that takes a list of the short names and links the full ones. + +## Schema Development + +### Introduction + +Between 20.08 and 22.08, schema extensions have undergone a number of +changes that include new features (such as codeless and auto-applied +schemas) and breaking changes (such as API schemas no longer supporting +inheritance). This section discusses both, along with examples of +changes that need to be made for schema extensions to be compliant with +USD 22.11. + +### What’s Changed? (Relevant Release Notes) + +#### 22.11 + +Added "GetAll" method for multi-apply schemas in codegenTemplates. + +#### 22.08 + +Added the apiSchemaOverride feature to usdGenSchema that allows a +schema definition to explicitly define sparse overrides to +properties it expects to be included from a built-in API schema. +See: https://graphics.pixar.com/usd/release/api/_usd__page__generating_schemas.html#Usd_APISchemaPropertyOverride + +#### 22.05 + +Changes for usdGenSchema: + +Disabled inheritance for multiple apply API schemas, now that +built-in API schemas are supported for multiple apply schemas. +Fixed issue where schema tokens with invalid C++ identifiers +would be generated. These tokens will now be converted into a +valid identifier. Tokens beginning with a numeral are now +prefixed with ‘_’. +Added ability to generate C++ identifiers using property names +and values exactly as authored in schema.usda instead of +camel-casing them by specifying useLiteralIdentifier in the +GLOBAL schema metadata. This is helpful in scenarios where +schema.usda is generated using utilities like +usdgenschemafromsdr instead of being hand authored. +Fixed Python 3 compatibility by explicitly included the None +keyword in reserved list. + +#### 22.03 + +Changes for applied API schemas: + +Multiple-apply API schemas can now include other multiple-apply +API schemas as built-ins. +"prepend apiSchemas" must be used in schema.usda to set +built-in API schemas on another schema. +Applied API schemas authored on a prim can no longer change the +type of a property defined by that prim’s type or built-in +API schemas. + +#### 21.11 + +Updated connectedAPIBehavior so that APISchemas can now provide +connectableAPIBehavior by explicitly registering a new behavior +associated with the APISchemaType or by providing plug metadata to +configure the connectability behavior. Note that the latter can be +used for codeless schemas. +Single apply API schemas can now include built-in API schemas and +can auto apply to other single apply API schemas. API schemas are +now only allowed to inherit directly from UsdAPISchemaBase. +Applied API schemas can no longer inherit from other other applied +API schemas, which allows UsdPrim::HasAPI() to be a much faster +query. Non-applied schemas may still inherit from other +non-applied schemas. + +#### 21.08 + +Added support for “codeless” USD schemas that do not have any C++ +or Python code. Changes to these schemas’ definitions do not +require any code to be recompiled; instead, the +generatedSchema.usda just needs to be regenerated via usdGenSchema +and reinstalled. +Added ability to specify allowed prim types for API schemas in the +customData dictionary for the schema in schema.usda. +Added UsdPrim::CanApplyAPI and CanApply to all API schema classes to +check if an API schema can be applied to a prim based on the +restrictions above. +API schemas can now provide connectability behavior, which can +override behavior based on prim type. + +#### 21.05 + +Updated usdGenSchema to not error when generating a dynamic schema +and libraryPath is not specified. +Fixed usdGenSchema to honor apiName metadata for auto generated +tokens.h. This results in correct doxygen documentation for the +correct API names. +usdGenSchema now adds a type alias for abstract typed schemas, which +means abstract typed schemas now have an official USD type name +which is registered with the UsdSchemaRegistry. +Auto apply API schemas in USD can now specify abstract typed schemas +to auto apply to, indicating that the API should be applied to all +schemas that derive from the abstract schema type. + +#### 21.02 + +Added support for auto-apply API schemas. This allows single-apply +API schemas to be automatically applied to prims using one of a +list of associated concrete schema types instead of requiring the +user to manually apply the API schema. +Renamed UsdSchemaType to UsdSchemaKind to disambiguate between the +schema type (e.g. UsdGeomSphere) and kind (e.g. non-applied, +single-apply, etc). +Deprecated functions using the "schema type" terminology in favor +of "schema kind". + +### Breaking Change: Applied API Schemas, Inheritance, and Built-Ins + +As of v21.11, USD no longer supports inheritance chains for API schemas +(although still fully supported for IsA schemas). The primary reason for +this breaking change was the need to make +UsdPrim::HasAPI() more efficient by not continuously +checking derivation chains. To that end, support for inheritance was +removed from API schemas. Instead, API schemas have the ability to +define built-ins, which are semantically similar to defining inheritance +chains, but more performant from a USD run-time perspective. +Unfortunately, this has a significant impact to our own custom schema +definitions (particularly physics) and requires that these schemas be +migrated to conform to the new requirements. + +#### Inheriting and Applying Built-Ins To Represent Dependencies + +All API schema types (both single and multiple-apply) are now required +to inherit . This means that any derivation chains +that exist in applied API schemas must be converted such that the +inherits attribute of the schema type is : +class "MyAppliedAPI" ( + +inherits = + +) { + +} + +To simulate inheritance and define a dependency chain, USD has +introduced the concept of built-ins. This is the inverse of the +auto-applied API schema feature - when an applied API schema is applied +to a prim instance, all applied API schemas declared as built-ins are +applied as well. Built-ins work recursively such that if SchemaType1API +declared built-ins of SchemaType2API and SchemaType3API, and +SchemaType2API declared built-ins of SchemaType4API, then applying +SchemaType1API to a prim instance will also apply SchemaType2API, +SchemaType3API, and SchemaType4API. +All built-ins specified must be either single-apply API or named +instances of multiple-apply API schemas (IsA schemas cannot be +built-ins). +Declaring an applied API schema type as a built-in involves placing it’s +schema type name in the prepend apiSchemas attribute of the schema type +that uses it as a built-in: +class "ExampleSchema1API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + + prepend apiSchemas = ["ExampleSchema2API"] + +) { + +} + +This definition states that when ExampleSchema1API is applied to a prim +instance, ExampleSchema2API will also be applied as a schema built-in to +ExampleSchemaAPI. This mimics inheritance in the sense that applying +ExampleSchema1API will always also apply ExampleSchema2API, so all +attributes from both will be present on the prim (as you would expect in +the normal inheritance chain). +Note: A schema can have a stronger opinion on a property that may come +from one of its built-ins if it declares the property itself. This is +useful to override the default value of the property. Be careful not to +do this unintentionally and do things like e.g. change the type of the +property! +Multiple-apply schemas have an additional set of consequences since they +must always be applied to a prim instance using the same instance name. +This results in the following: + +If a multiple-apply API schema is listed as a built-in without an +instance name, it is always applied to the prim instance using the +same instance name as the schema type declaring the built-in. +If a multiple-apply API schema is listed as a built-in with an +instance name, it will be applied with a suffixed instance name +that combines the built-in instance name and the instance name of +the schema type declaring the built-in. + +For example, consider the following definition: +class "MultipleApplySchema1API" ( + + inherits = + + customData = { + + token apiSchemaType = "multipleApply" + + } + + prepend apiSchemas = ["MultipleApplySchema2API"] + +) { + +} + +Applying MultipleApplySchema1API to a prim instance with the instance +name foo will also result in MultipleApplySchema2API being applied to +the prim instance with the instance name foo. Now consider a slight +modification to this definition: +class "MultipleApplySchema1API" ( + + inherits = + + customData = { + + token apiSchemaType = "multipleApply" + + } + + prepend apiSchemas = ["MultipleApplySchema2API:bar"] +) +{ + +} + +In this case, applying MultipleApplySchema1API to a prim instance with +the instance name foo will result in MultipleApplySchemaAPI2 being +applied with the suffixed instance name foo:bar. +Note that built-ins apply to IsA schema types as well (that is, you can +define a list of built-in API schema types that are applied to a prim +instance of the IsA type). In this case, inherited types will inherit +the built-ins from their base types. + +##### What do I need to change? + +Based on this breaking change, there are two things that must be done in +existing schemas: + +All applied API schemas must be changed to inherit from + +The existing inheritance hierarchy must be converted to a set of +built-ins (see examples below) + +As an example, consider three applied API schemas Schema1API, +Schema2API, and Schema3API, each currently inheriting from the one +before as so: +class "Schema1API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + +) { + +} + +class "Schema2API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + +) { + +} + +class "Schema3API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + +) { + +} + +To convert these, each would be modified to inherit APISchemaBase and to +prepend the schema type they inherit as follows: +class "Schema1API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + +) { + +} + +class "Schema2API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + + prepend apiSchemas = ["Schema1API"] + +) { + +} + +class "Schema3API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + + prepend apiSchemas = ["Schema2API"] + +) { + +} + +Since built-ins are recursive, we get the properties that we would +expect from all three applied schemas when applying Schema3API to a +prim, just as we would in the inheritance scenario. + +#### Accessing API Schema Attributes + +Unfortunately, using the API schemas becomes a bit more burdensome than +it is with inheritance. Prior to this change, a developer could modify +any of the inherited attributes via the most-derived type: +Schema3API schema3API = Schema3API::Apply(prim); + +int x = schema3API.GetSchema3Attr1().Get(); + +double y = schema3API.GetSchema2Attr1().Get(); + +This same approach does not work with built-ins, and so it is necessary +at the current time to acquire the different API schemas in the +built-ins set to set the attributes on each appropriately: +Schema3API schema3API = Schema3API::Apply(prim); + +int x = schema3API.GetSchema3Attr1().Get(); + +Schema2API schema2API = Schema2API(prim); + +double y = schema2API.GetSchema2Attr1().Get(); + +This requires (extensively) refactoring existing code, especially for +schemas like physics that have API schemas that are heavily inheritance +based. The expectation is that this will be addressed by USD to make +this more developer friendly. + +### Breaking Change: Schema Kind + +From v21.02 onward, what used to be schema type is now referred to as +schema kind. This change was made to disambiguate the schema type name +(e.g. Schema1API) and what kind of schema it is (e.g. single-apply, +multiple-apply, etc.). While the impact is small, it does require: + +Regeneration of the schema classes such that the GetSchemaKind +method is generated over the GetSchemaType method (which will +return a UsdSchemaKind not a UsdSchemaType +Code changes in any code that uses those methods of the schema (or +associated methods of the UsdSchemaRegistry to reflect on schema +types). + +In practice, since the values of UsdSchemaKind are the same as the old +UsdSchemaType enumeration, this means replacing any code that calls +GetSchemaType with calls to GetSchemaKind and using UsdSchemaKind as the +return value, on both schema types themselves and any code involving the +UsdSchemaRegistry. +Also, if your plugInfo.json is missing the schemaKind field, it may +silently fail to load. +For details on API breakage, see: +[Other Breaking Changes: Schemas: pugInfo.json: plugInfo.json now requires schemaKind field] + +### Breaking Change: Retrieving Schema Type Names + +From v21.02 onward, the GetSchemaPrimSpec method on UsdPrimDefinition +has been removed. This method was used to get the “schema prim spec”, +from which the schema type name of an e.g., C++ type could be retrieved. +While there is no direct replacement on UsdPrimDefinition, similar +functionality can be found in the UsdSchemaRegistry singleton object via +the method GetSchemaTypeName: +/// Return the type name in the USD schema for prims or API schemas of +the + +/// given registered \\p SchemaType. + +template + +static TfToken GetSchemaTypeName() { + + return GetSchemaTypeName(SchemaType::_GetStaticTfType()); + +} + +### New Feature: Auto-Applied API Schemas + +An auto-applied API schema refers to a single-apply API schema that will +be automatically attached to a set of prim instances of one or more +defined schema types. This is a new feature that requires no migration +of existing schema content and has two advantages: + +An existing schema set can be extended with additional attributes +without having to modify the original schema. That is, if a schema +Schema1 supplied a set of attributes, and a developer decides that +there is an additional set of attributes that are directly +relevant to prims that have Schema1 applied, then they can create +a new schema Schema2API containing those new attributes and +declare that it should be auto-applied to all prim instances of +type Schema1 (in the case of typed schemas) or for which Schema1 +is applied (in the case of API schemas), without modifying Schema1 +itself. In the case of IsA schemas, the auto-apply rule would +trigger on the specified schema being applied to a prim instance +as well as any inherited type of that schema being applied. +All prim instances that satisfy the auto apply to criteria +automatically get the new schema applied without developers having +to explicitly call Apply on each prim they want the schema to +apply to. + +The mechanism for defining this in a schema definition is via the +apiSchemaAutoApplyTo attribute of the API schema type’s customData +dictionary. This is an array of token strings defining the names of the +schemas applied to a prim instance that trigger the auto-apply rule. +Note this is an or set, not an and set (only one of the listed schemas +need be applied to a prim instance for the auto-apply rule to trigger). +For example, if a developer wanted to auto-apply a new schema type +Schema1API to all prim instances of type UsdGeomMesh, their definition +would look as follows: +class "Schema1API" { + +inherits = + +customData = { + + token[] apiSchemaAutoApplyTo = ["UsdGeomMesh"] + + } + +} + +Note that this functionality only applies to single-apply API schemas +(as multiple-apply API schemas require an instance name to be specified +on application). +The above technique is applied at schema generation time, which is +sufficient for a broad number of use cases. USD also has an additional +mechanism for supplying this information which applies later in the +pipeline (i.e. after schema generation has occurred and is distributed). +This is referred to as plugin defined auto-applied API schemas. This +allows developers to specify additional auto-apply rules that may only +affect a subset of schema consumers. While an uncommon use case, USD +allows this type of auto-apply schema to be specified directly in the +plugInfo.json file via the AutoApplyApiSchemas key contained in the +Plugins.Info key. Representing the example above in the plugInfo.json +file would look as follows: +{ + + "Plugins": [ + + "Info": { + + "AutoApplyAPISchemas": { + + "Schema1API" : { + + "apiSchemaAutoApplyTo": [ + + "UsdGeomMesh" + + ] + + } + + } + + } + + ] + +} + +### New Feature: Abstract Typed Schemas and the Schema Registry + +Prior to v21.05, USD did not record abstract typed schemas as official +USD type names in the schema registry. This effectively meant that +developers could not refer to these abstract typed schemas in scenarios +such as auto-apply of API schemas. This minor change makes abstract +typed schemas first class citizens in the schema registry, and their +type names can be used in auto-apply scenarios to capture a large number +of prims who’s schemas are derived from the abstract schema. That is, +consider the scenario below: + +Figure 1: Abstract Typed Schemas with Auto-Apply +In this case, AppliedSchema1API will be auto-applied to all prims of +type ConcreteSchema1, ConcreteSchema2, or ConcreteSchema3. Prior to this +change, AppliedSchema1API would only have been allowed to specify one +(or more) of the concrete schema types to auto-apply to. + +### New Feature: Codeless Schemas + +v21.08 introduced the concept of codeless schemas. These schemas have no +generated code - only the type definition. This makes them easy to +distribute, use, and iterate; providing a data contract without binary +distribution issues (although codeless schemas are still discovered +through the standard USD plug-in system). You may already be taking +advantage of this feature - it was cherry picked into NVIDIA’s v20.08 +USD source and made available to usdgenschema. Codeless schemas can be +declared by adding the skipCodeGeneration attribute to the GLOBAL schema +metadata. Note that this will cause all schemas defined in the +schema.usda file to be codeless, so if you want both codeful and +codeless schemas be sure to separate out their definitions into +different schema.usda files. +As an example, let’s define a codeless schema for the following simple +scenario: + +Figure 2: Codeless Schema Example +over "GLOBAL" ( + + customData = { + + bool skipCodeGeneration = true + + } + +) { + +} + +class "Schema1API" ( + + inherits = + + customData = { + + token apiSchemaType = "singleApply" + + } + +) + +{ + +int schema1:property1 = 5 ( + +) + +int schema1:property2 = 2 ( + +) + +} + +The downside to codeless schemas is that you don’t get the nice wrappers +for accessing properties on a prim associated with that schema that are +available through the code generation. All property access must go +through the generic API’s available on UsdPrim. +TfType schemaType = +UsdSchemaRegistry::GetAPITypeFromSchemaTypeName("Schema1API"); + +bool hasApi = prim.HasAPI(schemaType); + +if (hasApi) + +{ + + int schema1APIProperty1Value = 0; + + int schema1APIProperty2Value = 0; + + prim.GetAttribute("schema1:property1").Get(&schema1APIProperty1Value); + + prim.GetAttribute("schema1:property2").Get(&schema1APIProperty2Value); + + assert(schema1APIProperty2Value == 2); + + prim.GetAttribute("schema1:property2").Set(schema1APIProperty1Value); + + prim.GetAttribute("schema1:property2").Get(&schemaAPIProperty2Value); + + assert(schema1APIProperty2Value == 5); + +} + +### New Feature: Additional GLOBAL Schema Metadata to Define Use of Literal Identifier Names + +In v22.05, USD added the ability for schema authors to specify that +property names should be generated verbatim as written rather than the +normal behavior of camel-casing them. This is a minor change, but +helpful in scenarios where the schema.usda file is auto-generated by a +tool rather than hand authored (e.g. usdgenschemafromsdr). To invoke +this behavior, a new metadata key was added to the GLOBAL schema +metadata: +over "GLOBAL" ( + + customData = { + + string libraryName = "exampleLibrary" + + string libraryPath = "." + + bool useLiteralIdentifier = true + + } + +) + +} + +Adding this metadata informs usdgenschema to attempt to use the written +property names verbatim. Note that normal rules still apply for +identifiers, and usdgenschema will make the property name a valid +identifier (via TfMakeValidIdentifier) if it is invalid, even in cases +where useLiteralIdentifier is set in the GLOBAL metadata. + +### New Feature: Defining Sparse Overrides From Built-Ins + +In v22.08, USD introduced the ability for an API schema to perform a +sparse override of a built-in’s property. In this scenario, an API +schema may have an opinion on the default value of a property from one +of its built-ins, without defining or owning the property itself. This +is functionally similar to an over for the property, where the API +schema defines a stronger opinion of the default value. Consider the +following: + +Figure 3: Sparse Overrides on Built-Ins +This new functionality can be taken advantage of by adding the +apiSchemaOverride to the customData dictionary of the property. +class "Schema1API" ( + +) { + + uniform int schema1:property = 5 ( + +) + +} + +class "Schema2API" ( + + prepend apiSchemas = ["Schema1API"] + +) { + + uniform int schema1:property = 2 ( + + customData = { + + bool apiSchemaOverride = true + + } + +) + +} + +In this scenario, Schema2API has declared Schema1API a built-in and +provided a sparse override of the schema1:property default value. Note +that when doing this, the property must be declared with the exact same +type and variability (e.g., uniform int in the above example), otherwise +the override is ignored. Also note that this functionality is only +available to API schemas and does not apply to overriding properties via +IsA schema inheritance. + +## Ar 2 (Asset Resolution Re-architecture) + +### Introduction + +The public interface to Ar (Asset Resolution) has changed significantly, +hence the version change from 1.0 to 2.0. While it is a significant +change, the functionality is mostly the same but provides better hooks +for cloud-based asset backends such as Nucleus. The parts of Ar that +changed mostly relate to removed and renamed methods. In most +circumstances, methods were removed since they really only applied to +Pixar’s way of resolving assets. Other methods were renamed to more +accurately convey their intent. + +### Breaking Change: IsSearchPath() Removed + +Search paths are no longer a part of the public interface of Ar 2.0. +This was done for good reason as not all asset management systems +support search paths. Internally, an implementation of Ar 2.0 can +support search paths but there is no publicly available method such as +ArGetResolver().IsSearchPath(). Originally, this method was made a part +of the public Ar interface so Sdf could perform the “look here first” +approach when resolving an SdfAssetPath that fit the criteria of a +search path. If you are using ArGetResolver().IsSearchPath() it might be +a good time to assess why you are using it before migrating your code as +there is not an out-of-the-box solution. If +ArGetResolver().IsSearchPath() is used in a lot of places we could add a +utility function to mimic it’s behavior. +In order to migrate your code to check if an asset path is a search path +it will need to pass the following checks: + +It is not a URL prefixed with a scheme such as omniverse:// or +https:// +It is not an absolute file path i.e starting with / or \ +It is not a file relative path: +a. Does not start with ./ or ../ +b. Does not start with .\ or ..\ + +A C++ implementation would be: +// Add the C++ Implementation similar to what we are using in +OmniUsdResolver_Ar1.cpp +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: IsSearchPath() Removed + +### Breaking Change: IsRelativePath() Removed + +As a part of the process to decouple assets from the filesystem, +ArGetResolver().IsRelativePath() was also removed. While sometimes +useful, it also made for a confusing API when paired with +ArGetResolver().AnchorRelativePath(). It would make the caller think +that you need to check if the asset path was relative before calling +ArGetResolver().AnchorRelativePath() which was not always the case. If +you find that you’re calling ArGetResolver().IsRelativePath() on asset +paths before ArGetResolver().AnchorRelativePath() a better way to +migrate your code would be to use a utility from Sdf: +auto stage = UsdStage::Open(“omniverse://some/asset.usd”); +const std::string assetPath = “./geom.usd”; +// SdfComputeAssetPathRelativeToLayer works for both Ar 1.0 and Ar 2.0 +// It will also handle all the edge cases dealing with things like +anonymous layers, +// package relative paths, etc. +const std::string assetId = SdfComputeAssetPathRelativeToLayer(stage->GetRootLayer(), assetPath); +If you find that you do need to check if some string is relative, +TfIsRelativePath() could be used. But it’s important to understand that +TfIsRelativePath() will only work with filesystem paths. For example, +TfIsRelativePath(“omniverse://some/asset.usd”) would return true. So +only use TfIsRelativePath() if you’re sure it’s a filesystem path and +not a URL. +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: IsRelativePath() Removed + +### Breaking Change: AnchorRelativePath() Renamed + +ArGetResolver().AnchorRelativePath() was correctly renamed to +ArGetResolver().CreateIdentifier(). The reason for this method being +renamed is to clarify its intent which is to create an identifier for an +incoming asset path. The incoming asset path may or may not be relative, +but ArGetResolver().AnchorRelativePath() was always called to make sure +the returned result was a valid identifier that could be consistently +resolved. +const std::string anchor = "omniverse://some/asset.usd"; + +const std::string assetPath = "./geom.usd"; + +##if !defined(AR_VERSION) || AR_VERSION < 2 + +// Ar 1.0 + +const std::string identifierAr1 = +ArGetResolver().AnchorRelativePath(anchor, assetPath); + +##else + +// Ar 2.0 - The ArResolvedPath is required for the anchor to indicate to +the ArResolver plugin + +// implementing _CreateIdentifier that the anchor has already been +resolved + +const ArResolvedPath resolvedAnchor(anchor); + +// Ar 2.0 - Note how the anchor and asset path order are switched + +const std::string identifierAr2 = +ArGetResolver().CreateIdentifier(assetPath, resolvedAnchor); + +##endif + +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: AnchorRelativePath() to CreateIdentifier() + +### Breaking Change: ComputeNormalizedPath() Removed + +ArGetResolver().ComputeNormalizedPath() has been removed since in most +cases it was a redundant call. Most ArResolver plugins would return the +normalized form of an incoming asset path in +ArGetResolver().AnchorRelativePath(). However, +ArGetResolver().AnchorRelativePath() was vague as to the expected +result. ArGetResolver().CreateIdentifier() clarifies that its returned +result should be in its final normalized form. +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: ComputeNormalizedPath() Removed + +### Breaking Change: ComputeRepositoryPath() Removed + +ArGetResolver().ComputeRepositoryPath() has been removed. A repository +path, or repoPath, was a very Pixar specific way of identifying their +assets within Perforce. For the majority of their assets they could +compute the resolved path or local path to a repository path +(identifier) in Perforce. In some ArResolver plugins a resolved path can +not be computed to its repository path (identifier). For this reason, an +ArResolver plugin would just return the incoming path as-is and adds to +a confusing ArResolver interface. +In order to migrate your code the call to +ArGetResolver().ComputeRepositoryPath() should just be removed. The +OmniUsdResolver would just return the incoming path, nothing was +actually computed since client-library does not support converting a +resolved cached path to the URL it was resolved from. +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: ComputeRepositoryPath() Removed + +### Breaking Change: ComputeLocalPath() Removed + +ComputeLocalPath() has been removed and replaced with more accurately +named methods. In Ar 1.0, ComputeLocalPath() was called in +SdfLayer::CreateNew to redirect a new layer to some local path on disk +so it could still resolve. Ar 2.0 clarifies the interface by adding +CreateIdentifierForNewAsset / ResolveForNewAsset methods +const std::string assetPath = "omniverse://some/new/asset.usd"; +// Not completely necessary but makes sure the assetPath is absolute + +normalized +const std::string identifier = ArGetResolver().CreateIdentifierForNewAsset(assetPath); +const ArResolvedPath resolvedPath = ArGetResolver().ResolveForNewAsset(identifier); +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: ComputeLocalPath() Removed + +### Breaking Change: Resolve() Signature Changed + +Resolve() has changed the return type from std::string to +ArResolvedPath. The ArResolvedPath type is just a shim around +std::string to clarify the interface when an ArResolver plugin can +expect to receive a resolved path. One of the confusing aspects of Ar +1.0 for an ArResolver plugin implementation was when you were receiving +an unresolved asset path or a fully resolved path. This led to numerous +subtle bugs when the plugin would assume a resolved path but would +actually be receiving an asset path since everything was just typed from +std::string. +The code required to support this change can be done in a few different +ways and should be handled according to preference or coding style: +const std::string assetPath = "omniverse://some/asset.usd"; +// In Ar 1.0 +const std::string resolvedPath = ArGetResolver().Resolve(assetPath); +// In Ar 2.0 +const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath); +// or to support Ar 1.0 + Ar 2.0 +auto resolvedPath = ArGetResolver().Resolve(assetPath); +Another very important aspect of Resolve() is that USD no longer assumes +that the returned result will point to a normal file path on disk! It is +expected that Resolve() can return things such as URIs where any file +system calls, i.e ArchOpenFile() and ArchGetFileLength(), will not work +correctly and more than likely fail. If you are currently using any file +system operations on a resolved asset path your code should be updated +to use the ArAsset / ArWritableAsset abstractions so you can properly +read / write data. See the sections on OpenAsset() / OpenAssetForWrite() +for examples on reading / writing. +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: Resolve() Signature Changed + +### Breaking Change: ResolveWithAssetInfo() Removed + +ResolveWithAssetInfo() has been removed and separated into two methods; +Resolve() and GetAssetInfo(). GetAssetInfo() accepts an asset path and +an ArResolvedPath as input to accurately find all the information +related to the asset. The ArResolvedPath can help with asset management +systems that might need the identifier, along with the resolved result +of that identifier to accurately return the ArAssetInfo with all the +correct information. +// In Ar 1.0 +// Note that assetPath would typically be the identifier returned from +AnchorRelativePath() +const std::string assetPath = "omniverse://some/asset.usd"; + +ArAssetInfo assetInfo; + +const std::string resolvedPath = ArGetResolver().ResolveWithAssetInfo(assetPath, &assetInfo); + +// In Ar 2.0 +const std::string assetPath = "omniverse://some/asset.usd"; + +const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath); + +ArAssetInfo assetInfo = ArGetResolver().GetAssetInfo(assetPath, +resolvedPath); + +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: ResolveWithAssetInfo() Removed + +### Breaking Change: GetModificationTimestamp() Signature Changed + +GetModificationTimestamp() is another method that changes the return +type to clarify what was expected to be returned for ArResolver plugin +implementations. The return type for GetModificationTimestamp() changed +from a VtValue to an ArTimestamp. The ArTimestamp is a more suitable +type for external APIs to correctly sort and compare an asset’s +modification timestamp due to its guaranteed comparison overload +operators. These operators are important for a library such as Sdf to +correctly reload layers, since the asset representing the SdfLayer needs +to be sorted and compared based on the time the asset was last modified. +// In Ar 1.0 +// Note that assetPath would typically be the identifier returned from +AnchorRelativePath() +const std::string assetPath = "omniverse://some/asset.usd"; + +const std::string resolvedPath = ArGetResolver().Resolve(assetPath); + +VtValue timestamp = ArGetResolver().GetModificationTimestamp(assetPath, +resolvedPath); + +// In Ar 2.0 +const std::string assetPath = "omniverse://some/asset.usd"; + +const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath); + +ArTimestamp ts = ArGetResolver().GetModificationTimestamp(assetPath, +resolvedPath); + +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: GetModificationTimestamp() Signature Changed + +### Breaking Change: OpenAsset() and ArAsset Signature Changes + +The change will mostly affect ArResolver plugin implementations, but is +still a breaking change. OpenAsset() has changed its signature to ensure +const-correctness. In Ar 1.0 this seemed like a bug, or oversight, where +an ArResolver plugin would modify its own state when opening an asset +for reading. This has been corrected in Ar 2.0 to guarantee that +OpenAsset() is indeed const and will not modify its own state. The only +required change here is for ArResolver plugin implementations to update +their function signatures to mark it as const-qualified. This change +also allows a const-qualified function to call +ArGetResolver().OpenAsset() along with the virtual methods exposed by +ArAsset such as GetSize(), GetBuffer(), Read(), etc. +Additionally, the type of resolvedPath has changed from a std::string to +an ArResolvedPath. +Using OpenAsset() for reading assets has been supported since Ar 1.0. +But now that ArGetResolver().Resolve() no longer assumes a file path on +disk being returned, it’s very important to use OpenAsset() when data +needs to be read from an asset path. Typical usage can look like the +following: +// In Ar 2.0 +const std::string assetPath = "omniverse://some/asset.usd"; + +const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath); + +auto asset = ArGetResolver().OpenAsset(resolvedPath); + +if (asset) { + + // get the buffer to read data into + + std::shared_ptr buffer = asset->GetBuffer(); + + if (!buffer) { + + TF_RUNTIME_ERROR("Failed to GetBuffer()"); + + return; + + } + + size_t bytesRead = asset->Read(buffer.get(), asset->GetSize(), 0); + + if (bytesRead == 0) { + + TF_RUNTIME_ERROR("Failed to read asset"); + + return; + + } + +// buffer should now contain bytesRead chars read from resolvedPath + +} + +For details on API breakage, see: +API Breaking Changes: Ar.Resolver: OpenAsset() / ArAsset Signature Changes + +### New Feature: OpenAssetForWrite() and ArWritableAsset + +One of the big features of Ar 2.0 is the ability to write data directly +to the underlying asset management system in an abstracted, and +extendable, way. ArGetResolver().OpenAssetForWrite() is a hook in an +ArResolver plugin implementation to assist and control how something is +written to the asset management system. This new feature allows for +things like streaming writes without the need to directly link against +custom libraries like client-library. This greatly simplifies the +process of getting new assets into asset management systems such as +Nucleus, and is natively supported across all of USD through facilities +like SdfFileFormat plugins. A very naive implementation could look +something like the following: +// In Ar 2.0 +const std::string assetPath = "omniverse://some/asset.usd"; + +// if writing to an existing asset + +const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath); + +// or if writing to a new asset + +const ArResolvedPath resolvedPath = ArGetResolver().ResolveForNewAsset(assetPath); + +// create a buffer that contains the data we want to write + +const size_t bufferSize = 4096; + +std::unique_ptr buffer(new char[bufferSize]); + +// put some data into the buffer + +const std::string data = "some asset data"; + +memcpy(buffer.get(), data.c_str(), data.length()); + +// open the asset for writing + +auto writableAsset = ArGetResolver().OpenAssetForWrite(resolvedPath, ArResolver::WriteMode::Replace); + +if (writableAsset) { + + const size_t bytesWritten = writabelAsset->Write(buffer.get(), + data.length(), 0); + + if (bytesWritten == 0) { + + TF_RUNTIME_ERROR(\"Failed to write asset\"); + + return; + + } + + // close out the asset to indicate that all data has been written + + asset->Close(); + +} + +### New Feature: ArAsset Detached Assets + +Detached assets are a new way to completely separate an ArAsset from the underlying asset management system. In some +asset management systems its possible for assets to continuously receive updates. Updates like this can cause +instability if the asset is in the process of being read into memory and the asset changes from underneath it. +GetDetachedAsset() on ArAsset is a place for an ArResolver plugin to perform any necessary steps to ensure that the +returned ArAsset will be consistent for reads throughout its lifetime. + +## API Breaking Changes + +## Base + +### Arch + +### Arch Filesystem + +#### ArchFile removed + +TODO + +## Tf + +### pxr Tf Python Module + +Reference Commits: +Centralize Python module initialization logic + +Python Find Regex: +from +. +import +(.*)[\r\n+]from +pxr +import +Tf[\r\n]+Tf.PrepareModule \( \1 , *locals\(\) *\)[\r\n]+del Tf(?:((?:[\r\n]+.))[\r\n]*try:[\r\n]+([ \t]+)import +__DOC(?:.|\r|\n)*[\r\n]except +Exception:(?:[r\n]+\3.)+)? + +Python Replace Regex: +from pxr import Tf\nTf.PreparePythonModule()\ndel Tf + +Python Example Before: +from . import _usdMdlfrom pxr import TfTf.PrepareModule(_usdMdl, locals())del Tftry:   import __DOC   __DOC.Execute(locals())   del __DOCexcept Exception:   try:       import __tmpDoc       __tmpDoc.Execute(locals())       del __tmpDocfailed   except:       pass + +Python Example After (22.11+ only): +from pxr import TfTf.PreparePythonModule()del Tf + +Python Example After (branched): +from pxr import Tfif hasattr(Tf, “PreparePythonModule”):    Tf.PreparePythonModule()    del Tfelse:    from . import _usdMdl    Tf.PrepareModule(_usdMdl, locals())    del Tf    try:        import __DOC        __DOC.Execute(locals())        del __DOC    except Exception:        try:            import __tmpDoc            __tmpDoc.Execute(locals())            del __tmpDocfailed        except:            pass + +Python Error Strings: +ImportError: DLL load  while importing {MODULE}: The specified module could not be found.WARNING The above is a very general error, and could also be triggered by other issues unrelated to this PrepareModule to PreparePythonModule change + +#### PrepareModule to PreparePythonModule + +## Usd + +### Ar + +#### Ar Resolver + +##### IsSearchPath() Removed + +For a detailed explanation, see: Breaking Change: IsSearchPath() Removed + +Reference Commits: +* [ar 2.0] Add identifier API to ArResolver* [ar 2.0] Remove filesystem path operations during layer lookup* [ar 2.0] Deprecate ArResolver functions slated for removal* [ar 2.0] Remove deprecated relative/search path API from ArResolver* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf* [ar 2.0] Remove Ar 1.0 support from pcp* [ar 2.0] Remove Ar 1.0 support from usdUtils + +C++ Find Regex: +(?<=\W)IsSearchPath(?=\W)NOTE: IsSearchPath was never wrapped in python, so no python changes are necessary + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘IsSearchPath’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “IsSearchPath”* C2039        ‘IsSearchPath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’ + +##### IsRelativePath() Removed + +For a detailed explanation, see: Breaking Change: IsRelativePath() Removed + +Reference Commits: +* [ar 2.0] Add identifier API to ArResolver* [ar 2.0] Remove deprecated relative/search path API from ArResolver* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf* [ar 2.0] Remove Ar 1.0 support from usdUtils + +C++/Python Find Regex: +(?<=\W)IsRelativePath(?=\W) + +C++ Example Before: +SdfLayerHandle layer = stage->GetRootLayer();    std::string assetId(“my/path.foo”);    ArResolver& resolver = ArGetResolver();    if (resolver.IsRelativePath(assetId)) {        std::string anchorPath = layer->GetIdentifier();        assetId = resolver.AnchorRelativePath(anchorPath, assetId);    }    std::string resolvedPath = resolver.Resolve(assetId); + +C++ Example After (all versions): +SdfLayerHandle layer = stage->GetRootLayer();    std::string assetId(“my/path.foo”);    assetId = SdfComputeAssetPathRelativeToLayer(layer, assetId);    std::string resolvedPath = ArGetResolver().Resolve(assetId); + +Python Example Before: +from pxr import Ar, Usdstage = Usd.Stage.CreateInMemory()layer = stage.GetRootLayer()assetId = “my/path.foo”resolver = Ar.GetResolver()if resolver.IsRelativePath(assetId):    anchorPath = layer.identifier    assetId = resolver.AnchorRelativePath(anchorPath, assetId)resolvedPath = resolver.Resolve(assetId) + +Python Example After (all versions): +from pxr import Ar, Usdstage = Usd.Stage.CreateInMemory()layer = stage.GetRootLayer()assetId = “my/path.foo”resolver = Ar.GetResolver()if resolver.IsRelativePath(assetId):    anchorPath = layer.identifier    assetId = resolver.AnchorRelativePath(anchorPath, assetId)resolvedPath = resolver.Resolve(assetId) + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘IsRelativePath’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “IsRelativePath”* C2039        ‘IsRelativePath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’ + +Python Error Strings: +* AttributeError: ‘Resolver’ object has no attribute ‘IsRelativePath’ + +##### AnchorRelativePath() to CreateIdentifier() + +For a detailed explanation, see: Breaking Change: AnchorRelativePath() Renamed + +Reference Commits: +* [ar 2.0] Add identifier API to ArResolver* [ar 2.0] Remove deprecated relative/search path API from ArResolver* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf + +C++/Python Find Regex: +(?<=\W)AnchorRelativePath(?=\W) + +C++ Example Before: +const std::string anchor = “omniverse://some/asset.usd”;const std::string assetPath = “./geom.usd”;// Ar 1.0const std::string identifier = ArGetResolver().AnchorRelativePath(anchor, assetPath); + +C++ Example After (AR2 only): +const std::string anchor = “omniverse://some/asset.usd”;const std::string assetPath = “./geom.usd”;// Ar 2.0 - The ArResolvedPath is required for the anchor to indicate to the ArResolver// plugin implementing _CreateIdentifier that the anchor has already been resolvedconst ArResolvedPath resolvedAnchor(anchor);// Ar 2.0 - Note how the anchor and asset path order are switchedconst std::string identifier = ArGetResolver().CreateIdentifier(assetPath, resolvedAnchor); + +C++ Example After (branched): +const std::string anchor = “omniverse://some/asset.usd”;const std::string assetPath = “./geom.usd”;#if defined(AR_VERSION) && AR_VERSION > 1// Ar 2.0 - The ArResolvedPath is required for the anchor to indicate to the ArResolver// plugin implementing _CreateIdentifier that the anchor has already been resolvedconst ArResolvedPath resolvedAnchor(anchor);// Ar 2.0 - Note how the anchor and asset path order are switchedconst std::string identifier = ArGetResolver().CreateIdentifier(assetPath, resolvedAnchor);#else// Ar 1.0const std::string identifier = ArGetResolver().AnchorRelativePath(anchor, assetPath);#endif + +Python Example Before: +from pxr import Aranchor = “omniverse://some/asset.usd”assetPath = “./geom.usd”# Ar 1.0identifier = Ar.GetResolver().AnchorRelativePath(anchor, assetPath) + +Python Example After (AR2 only): +from pxr import Aranchor = “omniverse://some/asset.usd”assetPath = “./geom.usd”# Ar 2.0 - The Ar.ResolvedPath is required for the anchor to indicate to the ArResolver# plugin implementing _CreateIdentifier that the anchor has already been resolvedresolvedAnchor = Ar.ResolvedPath(anchor)# Ar 2.0 - Note how the anchor and asset path order are switchedidentifier = Ar.GetResolver().CreateIdentifier(assetPath, resolvedAnchor) + +Python Example After (branched): +from pxr import Aranchor = “omniverse://some/asset.usd”assetPath = “./geom.usd”resolver = Ar.GetResolver()if hasattr(resolver, “CreateIdentifier”):    # Ar 2.0 - The Ar.ResolvedPath is required for the anchor to indicate to the ArResolver    # plugin implementing _CreateIdentifier that the anchor has already been resolved    resolvedAnchor = Ar.ResolvedPath(anchor)    # Ar 2.0 - Note how the anchor and asset path order are switched    identifier = resolver.CreateIdentifier(assetPath, resolvedAnchor)else:    # Ar 1.0    identifier = resolver.AnchorRelativePath(anchor, assetPath) + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘AnchorRelativePath’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “AnchorRelativePath”* C2039        ‘AnchorRelativePath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’ + +Python Error Strings: +* AttributeError: ‘Resolver’ object has no attribute ‘AnchorRelativePath’ + +##### ComputeNormalizedPath() Removed + +For a detailed explanation, see: Breaking Change: ComputeNormalizedPath() Removed + +Reference Commits: +* [ar 2.0] Remove ArResolver::ComputeNormalizedPath* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf* [ar 2.0] Remove Ar 1.0 support from usdUtils + +C++ Find Regex: +(?<=\W)ComputeNormalizedPath(?=\W)NOTE: ComputeNormalizedPath was never wrapped in python, so no python changes are necessary + +C++ Example Before: +const std::string assetPath = “./geom.usd”;    const std::string anchor = “omniverse://some/asset.usd”;    ArResolver& resolver = ArGetResolver();    // Ar 1.0 - in theory, AnchorRelativePath might not return final normalized form    const std::string normalized_id = resolver.ComputeNormalizedPath(        resolver.AnchorRelativePath(anchor, assetPath)); + +C++ Example After (AR2 only): +const std::string assetPath = “./geom.usd”;    const ArResolvedPath anchor(“omniverse://some/asset.usd”);    ArResolver& resolver = ArGetResolver();    // Ar 2.0 - CreateIdentifier should always return final normalized form    const std::string normalized_id = resolver.CreateIdentifier(assetPath, anchor); + +C++ Example After (branched): +const std::string assetPath = “./geom.usd”;    ArResolver& resolver = ArGetResolver();#if defined(AR_VERSION) && AR_VERSION > 1    // Ar 2.0 - CreateIdentifier should always return final normalized form    const ArResolvedPath anchor(“omniverse://some/asset.usd”);    const std::string normalized_id = resolver.CreateIdentifier(assetPath, anchor);#else    // Ar 1.0 - in theory, AnchorRelativePath might not return final normalized form    const std::string anchor = “omniverse://some/asset.usd”;    const std::string normalized_id = resolver.ComputeNormalizedPath(        resolver.AnchorRelativePath(anchor, assetPath));#endif + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘ComputeNormalizedPath’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “ComputeNormalizedPath”* C2039        ‘ComputeNormalizedPath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’ + +##### ComputeRepositoryPath() Removed + +For a detailed explanation, see: Breaking Change: ComputeRepositoryPath() Removed + +Reference Commits: +* [ar 2.0] Remove ArResolver::ComputeNormalizedPath* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf* [ar 2.0] Remove Ar 1.0 support from usdUtils + +C++ Find Regex: +(?<=\W)ComputeNormalizedPath(?=\W)NOTE: ComputeNormalizedPath was never wrapped in python, so no python changes are necessary + +C++ Example Before: +const std::string assetPath = “./geom.usd”;    const std::string anchor = “omniverse://some/asset.usd”;    ArResolver& resolver = ArGetResolver();    // Ar 1.0 - in theory, AnchorRelativePath might not return final normalized form    const std::string normalized_id = resolver.ComputeNormalizedPath(        resolver.AnchorRelativePath(anchor, assetPath)); + +C++ Example After (AR2 only): +const std::string assetPath = “./geom.usd”;    const ArResolvedPath anchor(“omniverse://some/asset.usd”);    ArResolver& resolver = ArGetResolver();    // Ar 2.0 - CreateIdentifier should always return final normalized form    const std::string normalized_id = resolver.CreateIdentifier(assetPath, anchor); + +C++ Example After (branched): +const std::string assetPath = “./geom.usd”;    ArResolver& resolver = ArGetResolver();#if defined(AR_VERSION) && AR_VERSION > 1    // Ar 2.0 - CreateIdentifier should always return final normalized form    const ArResolvedPath anchor(“omniverse://some/asset.usd”);    const std::string normalized_id = resolver.CreateIdentifier(assetPath, anchor);#else    // Ar 1.0 - in theory, AnchorRelativePath might not return final normalized form    const std::string anchor = “omniverse://some/asset.usd”;    const std::string normalized_id = resolver.ComputeNormalizedPath(        resolver.AnchorRelativePath(anchor, assetPath));#endif + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘ComputeNormalizedPath’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “ComputeNormalizedPath”* C2039        ‘ComputeNormalizedPath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’ + +##### ComputeLocalPath() Removed + +For a detailed explanation, see: Breaking Change: ComputeLocalPath() Removed + +Reference Commits: +* [ar 2.0] Introduce ArResolver::ResolveForNewAsset* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf + +C++ Find Regex: +(?<=\W)ComputeLocalPath(?=\W)NOTE: ComputeRepositoryPath was never wrapped in python, so no python changes are necessary + +C++ Example Before: +const std::string assetPath = “omniverse://some/new/asset.usd”;    const std::string resolvedPath = ArGetResolver().ComputeLocalPath(assetPath); + +C++ Example After (AR2 only): +const std::string assetPath = “omniverse://some/new/asset.usd”;    ArResolver& resolver = ArGetResolver();    // Not completely necessary but makes sure the assetPath is absolute + normalized    const std::string identifier = resolver.CreateIdentifierForNewAsset(assetPath);    const ArResolvedPath resolvedPath = resolver.ResolveForNewAsset(identifier); + +C++ Example After (branched): +const std::string assetPath = “omniverse://some/new/asset.usd”;#if defined(AR_VERSION) && AR_VERSION > 1    ArResolver& resolver = ArGetResolver();    // Not completely necessary but makes sure the assetPath is absolute + normalized    const std::string identifier = resolver.CreateIdentifierForNewAsset(assetPath);    const ArResolvedPath resolvedPath = resolver.ResolveForNewAsset(identifier);#else    const std::string resolvedPath = ArGetResolver().ComputeLocalPath(assetPath);#endif + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘ComputeLocalPath’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “ComputeLocalPath”* C2039        ‘ComputeLocalPath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’ + +##### Resolve() Signature Changed + +For a detailed explanation, see: Breaking Change: Resolve() Signature Changed +Also see: GetResolvedPath return type changed + +Reference Commits: +* [ar 2.0] Update Resolve API on ArResolver* [ar 2.0] Add identifier API to ArResolver* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf* [ar 2.0] Remove Ar 1.0 support from pcp + +C++/Python Find Regex: +(?<=\W)Resolve\( + +C++ Example Before: +const std::string assetPath = “omniverse://some/new/asset.usd”;ArResolver& resolver = ArGetResolver();const std::string resolvedPath = resolver.Resolve(assetPath);auto myAsset = resolver.OpenAsset(resolvedPath); + +C++ Example After (AR2 only): +const std::string assetPath = “omniverse://some/new/asset.usd”;ArResolver& resolver = ArGetResolver();const ArResolvedPath resolvedPath = resolver.Resolve(assetPath);auto myAsset = resolver.OpenAsset(resolvedPath); + +C++ Example After (all versions): +const std::string assetPath = “omniverse://some/new/asset.usd”;ArResolver& resolver = ArGetResolver();auto resolvedPath = resolver.Resolve(assetPath);auto myAsset = resolver.OpenAsset(resolvedPath); + +Python Example Before: +NOTE: in most contexts, you will feed the resolves of Resolve() to a function that now expects an Ar.ResolvedPath object, such as ArResolver.CreateIdentifier, so NO CHANGES are neededHowever, if you formerly attempted to use the resolved path as a string, changes will be required:from pxr import ArassetPath = “omniverse://some/new/asset.usd”resolvedPath = Ar.GetResolver().Resolve(assetPath)resolvedPath.split(“/”) + +Python Example After (all versions): +from pxr import ArassetPath = “omniverse://some/new/asset.usd”resolvedPath = str(Ar.GetResolver().Resolve(assetPath))resolvedPath.split(“/”) + +C++ Error Strings (Linux): +* cannot convert ‘const string’ {aka ‘const std::__cxx11::basic_string’} to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath&’ + +C++ Error Strings (Windows): +* E0312        no suitable user-defined conversion from “const std::string” to “const pxrInternal_v0_22__pxrReserved__::ArResolvedPath” exists* C2664        ‘std::shared_ptr pxrInternal_v0_22__pxrReserved__::ArResolver::OpenAsset(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &) const’: cannot convert argument 1 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘pxrInternal_v0_22__pxrReserved__::ArTimestamp pxrInternal_v0_22__pxrReserved__::ArResolver::GetModificationTimestamp(const std::string &,const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &) const’: cannot convert argument 2 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘std::shared_ptr pxrInternal_v0_22__pxrReserved__::ArFilesystemAsset::Open(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &)’: cannot convert argument 1 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘pxrInternal_v0_22__pxrReserved__::ArTimestamp pxrInternal_v0_22__pxrReserved__::ArFilesystemAsset::GetModificationTimestamp(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &)’: cannot convert argument 1 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘std::shared_ptr pxrInternal_v0_22__pxrReserved__::ArFilesystemWritableAsset::Create(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &,pxrInternal_v0_22__pxrReserved__::ArResolver::WriteMode)’: cannot convert argument 1 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘std::string pxrInternal_v0_22__pxrReserved__::ArResolver::CreateIdentifier(const std::string &,const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &) const’: cannot convert argument 2 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘std::string pxrInternal_v0_22__pxrReserved__::ArResolver::CreateIdentifierForNewAsset(const std::string &,const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &) const’: cannot convert argument 2 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘pxrInternal_v0_22__pxrReserved__::ArAssetInfo pxrInternal_v0_22__pxrReserved__::ArResolver::GetAssetInfo(const std::string &,const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &) const’: cannot convert argument 2 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘std::shared_ptr pxrInternal_v0_22__pxrReserved__::ArResolver::OpenAssetForWrite(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &,pxrInternal_v0_22__pxrReserved__::ArResolver::WriteMode) const’: cannot convert argument 1 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::ArResolver::CanWriteAssetToPath(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &,std::string *) const’: cannot convert argument 1 from ‘const std::string’ to ‘const pxrInternal_v0_22__pxrReserved__::ArResolvedPath &’ + +Python Error Strings: +* AttributeError: ‘ResolvedPath’ object has no attribute ‘capitalize’* AttributeError: ‘ResolvedPath’ object has no attribute ‘casefold’* AttributeError: ‘ResolvedPath’ object has no attribute ‘center’* AttributeError: ‘ResolvedPath’ object has no attribute ‘count’* AttributeError: ‘ResolvedPath’ object has no attribute ‘encode’* AttributeError: ‘ResolvedPath’ object has no attribute ‘endswith’* AttributeError: ‘ResolvedPath’ object has no attribute ‘expandtabs’* AttributeError: ‘ResolvedPath’ object has no attribute ‘find’* AttributeError: ‘ResolvedPath’ object has no attribute ‘format’* AttributeError: ‘ResolvedPath’ object has no attribute ‘format_map’* AttributeError: ‘ResolvedPath’ object has no attribute ‘index’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isalnum’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isalpha’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isascii’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isdecimal’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isdigit’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isidentifier’* AttributeError: ‘ResolvedPath’ object has no attribute ‘islower’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isnumeric’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isprintable’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isspace’* AttributeError: ‘ResolvedPath’ object has no attribute ‘istitle’* AttributeError: ‘ResolvedPath’ object has no attribute ‘isupper’* AttributeError: ‘ResolvedPath’ object has no attribute ‘join’* AttributeError: ‘ResolvedPath’ object has no attribute ‘ljust’* AttributeError: ‘ResolvedPath’ object has no attribute ‘lower’* AttributeError: ‘ResolvedPath’ object has no attribute ‘lstrip’* AttributeError: ‘ResolvedPath’ object has no attribute ‘maketrans’* AttributeError: ‘ResolvedPath’ object has no attribute ‘partition’* AttributeError: ‘ResolvedPath’ object has no attribute ‘replace’* AttributeError: ‘ResolvedPath’ object has no attribute ‘rfind’* AttributeError: ‘ResolvedPath’ object has no attribute ‘rindex’* AttributeError: ‘ResolvedPath’ object has no attribute ‘rjust’* AttributeError: ‘ResolvedPath’ object has no attribute ‘rpartition’* AttributeError: ‘ResolvedPath’ object has no attribute ‘rsplit’* AttributeError: ‘ResolvedPath’ object has no attribute ‘rstrip’* AttributeError: ‘ResolvedPath’ object has no attribute ‘split’* AttributeError: ‘ResolvedPath’ object has no attribute ‘splitlines’* AttributeError: ‘ResolvedPath’ object has no attribute ‘startswith’* AttributeError: ‘ResolvedPath’ object has no attribute ‘strip’* AttributeError: ‘ResolvedPath’ object has no attribute ‘swapcase’* AttributeError: ‘ResolvedPath’ object has no attribute ‘title’* AttributeError: ‘ResolvedPath’ object has no attribute ‘translate’* AttributeError: ‘ResolvedPath’ object has no attribute ‘upper’* AttributeError: ‘ResolvedPath’ object has no attribute ‘zfill’ + +##### ResolveWithAssetInfo() Removed + +For a detailed explanation, see: Breaking Change: ResolveWithAssetInfo() Removed + +Reference Commits: +* [ar 2.0] Update Resolve API on ArResolver* [ar 2.0] (Re)introduce API for computing asset info* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf + +C++/Python Find Regex: +(?<=\W)ResolveWithAssetInfo(?=\W)NOTE: ResolveWithAssetInfo was never wrapped in python, so no python changes are necessary + +C++ Example Before: +const std::string assetPath = “omniverse://some/asset.usd”;    ArResolver& resolver = ArGetResolver();    // In Ar 1.0    ArAssetInfo assetInfo;    const std::string resolvedPath = ArGetResolver().ResolveWithAssetInfo(assetPath, &assetInfo); + +C++ Example After (AR2 only): +const std::string assetPath = “omniverse://some/asset.usd”;    ArResolver& resolver = ArGetResolver();    // In Ar 2.0    const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath);    ArAssetInfo assetInfo = ArGetResolver().GetAssetInfo(assetPath, resolvedPath); + +C++ Example After (branched): +const std::string assetPath = “omniverse://some/asset.usd”;    ArResolver& resolver = ArGetResolver();#if defined(AR_VERSION) && AR_VERSION > 1    // In Ar 2.0    const ArResolvedPath resolvedPath = ArGetResolver().Resolve(assetPath);    ArAssetInfo assetInfo = ArGetResolver().GetAssetInfo(assetPath, resolvedPath);#else    // In Ar 1.0    ArAssetInfo assetInfo;    const std::string resolvedPath = ArGetResolver().ResolveWithAssetInfo(assetPath, &assetInfo);#endif + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::ArResolver’ has no member named ‘ResolveWithAssetInfo’ + +C++ Error Strings (Windows): +* C2039        ‘ResolveWithAssetInfo’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::ArResolver’* E0135        class “pxrInternal_v0_22__pxrReserved__::ArResolver” has no member “ResolveWithAssetInfo” + +##### GetModificationTimestamp() Signature Changed + +For a detailed explanation, see: Breaking Change: GetModificationTimestamp() Signature Changed + +Reference Commits: +* [ar 2.0] Require Unix time for asset modification times* [ar 2.0] Add ArFilesystemAsset::GetModificationTimestamp* [ar 2.0] Make ArResolver::GetModificationTimestamp optional* [ar 2.0] Remove Ar 1.0 implementation* [ar 2.0] Remove Ar 1.0 support from sdf + +C++ Find Regex: +(?<=\W)GetModificationTimestamp(?=\W)NOTE: GetModificationTimestamp was never wrapped in python, so no python changes are necessary + +C++ Example Before: +const std::string assetPath = “omniverse://some/asset.usd”;ArResolver& resolver = ArGetResolver();auto resolvedPath = resolver.Resolve(assetPath);// In Ar 1.0VtValue timestamp = resolver.GetModificationTimestamp(assetPath, resolvedPath); + +C++ Example After (AR2 only): +const std::string assetPath = “omniverse://some/asset.usd”;ArResolver& resolver = ArGetResolver();auto resolvedPath = resolver.Resolve(assetPath);// In Ar 2.0ArTimestamp timestamp = resolver.GetModificationTimestamp(assetPath, resolvedPath); + +C++ Example After (all versions): +const std::string assetPath = “omniverse://some/asset.usd”;ArResolver& resolver = ArGetResolver();auto resolvedPath = resolver.Resolve(assetPath);// Ar 1.0 or 2.0auto timestamp = resolver.GetModificationTimestamp(assetPath, resolvedPath); + +C++ Error Strings (Linux): +* conversion from ‘pxrInternal_v0_22__pxrReserved__::ArTimestamp’ to non-scalar type ‘pxrInternal_v0_22__pxrReserved__::VtValue’ requested + +C++ Error Strings (Windows): +* C2440        ‘initializing’: cannot convert from ‘pxrInternal_v0_22__pxrReserved__::ArTimestamp’ to ‘pxrInternal_v0_22__pxrReserved__::VtValue’* E0312        no suitable user-defined conversion from “pxrInternal_v0_22__pxrReserved__::ArTimestamp” to “pxrInternal_v0_22__pxrReserved__::VtValue” exists + +##### OpenAsset() and ArAsset Signature Changes + +For a detailed explanation, see: Breaking Change: OpenAsset() / ArAsset Signature Changes + +Reference Commits: +* [ar 2.0] Conform ArResolver::OpenAsset for Ar 2.0* [ar 2.0] General cleanup + +C++ Find Regex: +(?<=\W)OpenAsset(?=\W)NOTE: const signature change not relevant to python + +C++ Example Before: +class MyResolver    : public ArResolver{…    AR_API    virtual std::shared_ptr OpenAsset(        const std::string& resolvedPath) override; + +C++ Example After (AR2 only): +class MyResolver    : public ArResolver{…    AR_API    std::shared_ptr _OpenAsset(        const ArResolvedPath& resolvedPath) const override; + +C++ Error Strings (Linux): +* cannot declare variable ‘resolver’ to be of abstract type ‘RESOLVER_SUBCLASS’* invalid cast to abstract class type ‘RESOLVER_SUBCLASS’* ‘virtual std::shared_ptr RESOLVER_SUBCLASS::OpenAsset(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath&) const’ marked ‘override’, but does not override* ‘virtual std::shared_ptr RESOLVER_SUBCLASS::OpenAsset(const string&)’ marked ‘override’, but does not override* ‘virtual std::shared_ptr RESOLVER_SUBCLASS::_OpenAsset(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath&)’ marked ‘override’, but does not override* ‘virtual std::shared_ptr RESOLVER_SUBCLASS::_OpenAsset(const string&) const’ marked ‘override’, but does not override* ‘std::shared_ptr RESOLVER_SUBCLASS::OpenAsset(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath&) const’ marked ‘override’, but does not override* ‘std::shared_ptr RESOLVER_SUBCLASS::OpenAsset(const string&)’ marked ‘override’, but does not override* ‘std::shared_ptr RESOLVER_SUBCLASS::_OpenAsset(const pxrInternal_v0_22__pxrReserved__::ArResolvedPath&)’ marked ‘override’, but does not override* ‘std::shared_ptr RESOLVER_SUBCLASS::_OpenAsset(const string&) const’ marked ‘override’, but does not override + +C++ Error Strings (Windows): +* E0322        object of abstract class type “RESOLVER_SUBCLASS” is not allowed:* E0389        a cast to abstract class “RESOLVER_SUBCLASS” is not allowed:* E1455        member function declared with ‘override’ does not override a base class member* C2259        ‘RESOLVER_SUBCLASS’: cannot instantiate abstract class* C3668        ‘RESOLVER_SUBCLASS::_OpenAsset’: method with override specifier ‘override’ did not override any base class methods* C3668        ‘RESOLVER_SUBCLASS::OpenAsset’: method with override specifier ‘override’ did not override any base class methods + +## Sdf + +### Sdf.ChangeBlock + +#### Sdf.ChangeBlock(fastUpdates) to Sdf.ChangeBlock() + +OMNIVERSE ONLY +‘fastUpdates’ is an early OV-only prototype and has long been +deprecated, and has been removed from the API in nv-usd 22.05, to +avoid conflicting with the “enabled” parameter added by Pixar in USD +v22.03 + +Reference Commits: +* sdf: Rework SdfChangeBlock so that we can avoid tls lookup & atomic ops when closing change blocks that are not the innermost* OM-48922 First pass at forward-compatible changes for upgrade to nv-usd 22.05b + +Python Find Regex: +(?<=\W)Sdf.ChangeBlock\([^\)]+\) + +Python Replace Regex: +Sdf.ChangeBlock() + +C++ Example Before: +SdfChangeBlock changeBlock(true /* fastUpdates /);// ORSdfChangeBlock changeBlock(false / fastUpdates */); + +C++ Example After (all versions): +SdfChangeBlock changeBlock; + +Python Example Before: +from pxr import SdffastUpdates = Truewith Sdf.ChangeBlock(fastUpdates):    doStuff() + +Python Example After (all versions): +from pxr import Sdfwith Sdf.ChangeBlock():    doStuff() + +C++ Error Strings (Linux): +no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::SdfChangeBlock::SdfChangeBlock(bool)’ + +C++ Error Strings (Windows): +* E0289        no instance of constructor “pxrInternal_v0_22__pxrReserved__::SdfChangeBlock::SdfChangeBlock” matches the argument list* C2664        ‘pxrInternal_v0_22__pxrReserved__::SdfChangeBlock::SdfChangeBlock(const pxrInternal_v0_22__pxrReserved__::SdfChangeBlock &)’: cannot convert argument 1 from ‘bool’ to ‘const pxrInternal_v0_22__pxrReserved__::SdfChangeBlock &’* warning C4930: ‘pxrInternal_v0_22__pxrReserved__::SdfChangeBlock changeBlock(void)’: prototyped function not called (was a variable definition intended?) + +Python Error Strings: +WARNINGIn general, if you do:Sdf.ChangeBlock(fastUpdates)…then NO errors will be raised, as it will interpret this asSdf.ChangeBlock(enabled=fastUpdates)…which will not error, but not behave as expected!It will error if you do, ie:Sdf.ChangeBlock(fastUpdates=True)Traceback (most recent call last):  File “”, line 1, in Boost.Python.ArgumentError: Python argument types in    ChangeBlock.__init__(ChangeBlock)did not match C++ signature:    __init__(struct _object * __ptr64, bool enabled=True) + +### Sdf Layer + +#### GetResolvedPath return type changed + +Also see: Resolve() Signature Changed +TODO + +## Usd + +### Usd.CollectionAPI + +Reference Commits: +* UsdCollectionAPI is no longer generated using ‘isPrivateApply = true’* Converting all uses of UsdCollectionAPI::ApplyCollection to use UsdCollectionAPI::Apply instead* Remove Deprecated UsdCollectionAPI::ApplyCollection API* Integrate with pxr usd v21.11 (c7306cb4) · Commits · omniverse / usd-rels / kit · GitLab (nvidia.com) + +Python Find Regex: +(?<=\W)Usd.CollectionAPI.ApplyCollection(?=\W) + +Python Replace Regex: +Usd.CollectionAPI.Apply + +Python Example Before: +from pxr import Usdstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/myPrim”, “Transform”)coll = Usd.CollectionAPI.ApplyCollection(prim, “MyCollection”) + +Python Example After (20.11+ only): +from pxr import Usdstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/myPrim”, “Transform”)coll = Usd.CollectionAPI.Apply(prim, “MyCollection”) + +Python Example After (branched): +from pxr import Usdstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/myPrim”, “Transform”)if hasattr(Usd.CollectionAPI, “Apply”):  # >= 20.11   coll = Usd.CollectionAPI.Apply(prim, “MyCollection”)else:   coll = Usd.CollectionAPI.ApplyCollection(prim, “MyCollection”) + +C++ Error Strings (Linux): +‘ApplyCollection’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI” has no member “ApplyCollection”* C2039        ‘ApplyCollection’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI’* C3861        ‘ApplyCollection’: identifier not found + +Python Error Strings: +AttributeError: type object ‘CollectionAPI’ has no attribute ‘ApplyCollection’. Did you mean: ‘BlockCollection’? + +#### ApplyCollection to Apply + +### Usd Prim + +#### “Master” to “Prototype” + +IsMasterPath to IsPrototypePath +IsPathInMaster to IsPathInPrototype +IsMaster to IsPrototype +IsInMaster to IsInPrototype +GetMaster to GetPrototype +GetPrimInMaster to GetPrimInPrototype + +Reference Commits: +* Deprecate “master” API in favor of new “prototype” API on UsdPrim* Remove deprecated USD instancing “master” API + +Python/C++ Find Regex: +(?<=\W)(?:(IsPathIn|Is|IsIn|Get|GetPrimIn)Master|(Is)Master(Path))(?=\W) + +Python/C++ Replace Regex: +$1$2Prototype$3 + +C++ Example Before: +if (UsdPrim::IsMasterPath(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (UsdPrim::IsPathInMaster(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (prim.IsMaster()) { TF_WARN(”…”);}if (prim.IsInMaster()) { TF_WARN(”…”);}if (prim.GetMaster()) { TF_WARN(”…”);}if (prim.GetPrimInMaster()) { TF_WARN(”…”);} + +C++ Example After (22.11+ only): +if (UsdPrim::IsPrototypePath(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (UsdPrim::IsPathInPrototype(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (prim.IsPrototype()) { TF_WARN(”…”);}if (prim.IsInPrototype()) { TF_WARN(”…”);}if (prim.GetPrototype()) { TF_WARN(”…”);}if (prim.GetPrimInPrototype()) { TF_WARN(”…”);} + +C++ Example After (branched): +#if PXR_VERSION >= 2011if (UsdPrim::IsPrototypePath(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (UsdPrim::IsPathInPrototype(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (prim.IsPrototype()) { TF_WARN(”…”);}if (prim.IsInPrototype()) { TF_WARN(”…”);}if (prim.GetPrototype()) { TF_WARN(”…”);}if (prim.GetPrimInPrototype()) { TF_WARN(”…”);}#elseif (UsdPrim::IsMasterPath(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (UsdPrim::IsPathInMaster(SdfPath(“/myPath”))) { TF_WARN(”…”);}if (prim.IsMaster()) { TF_WARN(”…”);}if (prim.IsInMaster()) { TF_WARN(”…”);}if (prim.GetMaster()) { TF_WARN(”…”);}if (prim.GetPrimInMaster()) { TF_WARN(”…”);}#endif + +Python Example Before: +from pxr import Usdstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/myPrim”, “Transform”)if Usd.Prim.IsMasterPath(“/myPrim”):    print(“is master path”)if Usd.Prim.IsPathInMaster(“/myPrim”):    print(“path is in master”)if prim.IsMaster():    print(“is master”)if prim.IsInMaster():    print(“is in master”)master = prim.GetMaster()primInMaster = prim.GetPrimInMaster() + +Python Example After (20.11+ only): +from pxr import Usdstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/myPrim”, “Transform”)if Usd.Prim.IsPrototypePath(“/myPrim”):    print(“is prototype path”)if Usd.Prim.IsPathInPrototype(“/myPrim”):    print(“path is in prototype”)if prim.IsPrototype():    print(“is prototype”)if prim.IsInPrototype():    print(“is in prototype”)prototype = prim.GetPrototype()primInPrototype = prim.GetPrimInPrototype() + +Python Example After (branched): +from pxr import Usdstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/myPrim”, “Transform”)if hasattr(Usd.Prim, “IsPrototypePath”):  # >= 20.11    if Usd.Prim.IsPrototypePath(“/myPrim”):        print(“is prototype path”)    if Usd.Prim.IsPathInPrototype(“/myPrim”):        print(“path is in prototype”)if prim.IsPrototype():        print(“is prototype”)    if prim.IsInPrototype():        print(“is in prototype”)    prototype = prim.GetPrototype()    primInPrototype = prim.GetPrimInPrototype()else:    if Usd.Prim.IsPrototypePath(“/myPrim”):    print(“is prototype path”)if Usd.Prim.IsPathInPrototype(“/myPrim”):    print(“path is in prototype”)if prim.IsPrototype():    print(“is prototype”)if prim.IsInPrototype():    print(“is in prototype”)    prototype = prim.GetPrototype()    primInPrototype = prim.GetPrimInPrototype() + +C++ Error Strings (Linux): +* ‘IsMasterPath’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* ‘IsPathInMaster’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* ‘const class pxrInternal_v0_22__pxrReserved__::UsdPrim’ has no member named ‘IsMaster’; did you mean ‘IsModel’\?* ‘const class pxrInternal_v0_22__pxrReserved__::UsdPrim’ has no member named ‘IsInMaster’; did you mean ‘IsInstance’\?* ‘const class pxrInternal_v0_22__pxrReserved__::UsdPrim’ has no member named ‘GetMaster’; did you mean ‘GetName’\?* ‘const class pxrInternal_v0_22__pxrReserved__::UsdPrim’ has no member named ‘GetPrimInMaster’; did you mean ‘GetPrimIndex’\? + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdPrim” has no member “IsMasterPath”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdPrim” has no member “IsPathInMaster”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdPrim” has no member “IsMaster”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdPrim” has no member “IsInMaster”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdPrim” has no member “GetMaster”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdPrim” has no member “GetPrimInMaster”* C2039        ‘IsMasterPath’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* C3861        ‘IsMasterPath’: identifier not found* C2039        ‘IsPathInMaster’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* C3861        ‘IsPathInMaster’: identifier not found* C2039        ‘IsMaster’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* C2039        ‘IsInMaster’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* C2039        ‘GetMaster’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’* C2039        ‘GetPrimInMaster’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdPrim’ + +Python Error Strings: +* AttributeError: type object ‘Prim’ has no attribute ‘IsMasterPath’* AttributeError: type object ‘Prim’ has no attribute ‘IsPathInMaster’* AttributeError: ‘Prim’ object has no attribute ‘IsMaster’* AttributeError: ‘Prim’ object has no attribute ‘IsInMaster’* AttributeError: ‘Prim’ object has no attribute ‘GetMaster’* AttributeError: ‘Prim’ object has no attribute ‘GetPrimInMaster’ + +#### GetAppliedSchemas: Now filters out non-existent schemas + +To get the list of apiSchema tokens that are authored on the prim +(whether they exists or not), use +GetPrimTypeInfo().GetAppliedAPISchemas() + +Reference Commits: +* Refactoring some of the functionality in UsdPrimDefinition for how we build prim definitions…  There’s also one minor functional change in that API schema names that can’t be mapped to a valid prim definition are no longer included in the composed API schema list of a UsdPrimDefinition that is built with them* GetAppliedSchemas no longer will return old schemas + +Python/C++ Find Regex: +.GetAppliedAPISchemas\(\) + +Python/C++ Replace Regex: +.GetPrimTypeInfo().GetAppliedAPISchemas()WARNINGYou will likely not want to indiscriminately replace all occurrences of GetAppliedSchemas() with GetPrimTypeInfo().GetAppliedAPISchemas()Instead, you must decide on a case-by-case basis whether the intent was to:* get all “successfully applied schemas” - including “auto apply schemas”:* GetAppliedSchemas()* ie, do not change* This will likely be most use cases* get all authored “potentially applied schemas” - including possibly non-existent ones* GetPrimTypeInfo().GetAppliedAPISchemas()* ie, replace* This is useful in situations where you want to, ie, update outdated assets + +C++ Example Before: +auto appliedSchemas = usdPrim.GetAppliedSchemas(); + +C++ Example After: +auto appliedSchemas = usdPrim.GetPrimTypeInfo().GetAppliedAPISchemas(); + +Python Example Before: +# In v21.08, this will print# [‘ShadowAPI’, ‘NoExistAPI’]# In v21.11, this will print# [‘ShadowAPI’]from pxr import Usd, UsdLuxstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/World”, “Cube”)prim.ApplyAPI(UsdLux.ShadowAPI)prim.AddAppliedSchema(“NoExistAPI”)print(prim.GetAppliedSchemas()) + +Python Example After (all versions): +# In both v21.08 + v21.11, this will print# [‘ShadowAPI’, ‘NoExistAPI’]from pxr import Usd, UsdLuxstage = Usd.Stage.CreateInMemory()prim = stage.DefinePrim(“/World”, “Cube”)prim.ApplyAPI(UsdLux.ShadowAPI)prim.AddAppliedSchema(“NoExistAPI”)print(prim.GetPrimTypeInfo().GetAppliedAPISchemas()) + +### Usd SchemaRegistry + +#### SchemaType to SchemaKind + +For a detailed explanation, see: Breaking Change: Schema Kind + +Reference Commits: +* UsdSchemaRegistry can now query about schema kind from the schemaKind plugInfo metadata that is generated by usdGenSchema for schema types. This is directly exposed through the new GetSchemaKind functions added to UsdSchemaRegistry.* Intermediary release work for the transition to schemaKind nomenclature from schemaType.* Removing the deprecated GetSchemaType and static schemaType from UsdSchemaBase.* Updating usdGenSchema to no longer generate the deprecated schemaType* Removing the backward compatibility in UsdSchemaRegistry for schemas that have not been regenerated to include schemaKind in their pluginInfo metadata. + +C++/Python Find Regex: +SchemaType + +C++/Python Replace Regex: +SchemaKind + +Python Example Before: +from pxr import Usd, UsdGeommyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Xform”)myXform = UsdGeom.Xform(myPrim)myUsdModel = Usd.ModelAPI(myPrim)myUsdGeomModel = UsdGeom.ModelAPI(myPrim)myCollection = Usd.CollectionAPI(myPrim, “MyCollection”)assert myXform.GetSchemaType() == Usd.SchemaType.ConcreteTypedassert myXform.GetSchemaType() != Usd.SchemaType.AbstractBaseassert myXform.GetSchemaType() != Usd.SchemaType.AbstractTypedassert myUsdModel.GetSchemaType() == Usd.SchemaType.NonAppliedAPIassert myUsdGeomModel.GetSchemaType() == Usd.SchemaType.SingleApplyAPIassert myCollection.GetSchemaType() == Usd.SchemaType.MultipleApplyAPI + +Python Example After (21.02+ only): +from pxr import Usd, UsdGeommyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Xform”)myXform = UsdGeom.Xform(myPrim)myUsdModel = Usd.ModelAPI(myPrim)myUsdGeomModel = UsdGeom.ModelAPI(myPrim)myCollection = Usd.CollectionAPI(myPrim, “MyCollection”)assert myXform.GetSchemaKind() == Usd.SchemaKind.ConcreteTypedassert myXform.GetSchemaKind() != Usd.SchemaKind.AbstractBaseassert myXform.GetSchemaKind() != Usd.SchemaKind.AbstractTypedassert myUsdModel.GetSchemaKind() == Usd.SchemaKind.NonAppliedAPIassert myUsdGeomModel.GetSchemaKind() == Usd.SchemaKind.SingleApplyAPIassert myCollection.GetSchemaKind() == Usd.SchemaKind.MultipleApplyAPI + +Python Example After (branched): +from pxr import Usd, UsdGeommyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Xform”)myXform = UsdGeom.Xform(myPrim)myUsdModel = Usd.ModelAPI(myPrim)myUsdGeomModel = UsdGeom.ModelAPI(myPrim)myCollection = Usd.CollectionAPI(myPrim, “MyCollection”)if hasattr(Usd.SchemaBase, “GetSchemaKind”):  # 21.02+    assert myXform.GetSchemaKind() == Usd.SchemaKind.ConcreteTyped    assert myXform.GetSchemaKind() != Usd.SchemaKind.AbstractBase    assert myXform.GetSchemaKind() != Usd.SchemaKind.AbstractTyped    assert myUsdModel.GetSchemaKind() == Usd.SchemaKind.NonAppliedAPI    assert myUsdGeomModel.GetSchemaKind() == Usd.SchemaKind.SingleApplyAPI    assert myCollection.GetSchemaKind() == Usd.SchemaKind.MultipleApplyAPIelse:    assert myXform.GetSchemaType() == Usd.SchemaType.ConcreteTyped    assert myXform.GetSchemaType() != Usd.SchemaType.AbstractBase    assert myXform.GetSchemaType() != Usd.SchemaType.AbstractTyped    assert myUsdModel.GetSchemaType() == Usd.SchemaType.NonAppliedAPI    assert myUsdGeomModel.GetSchemaType() == Usd.SchemaType.SingleApplyAPI    assert myCollection.GetSchemaType() == Usd.SchemaType.MultipleApplyAPI + +C++ Error Strings (Linux): +* ‘UsdSchemaType’ has not been declared* ‘class pxrInternal_v0_22__pxrReserved__::UsdClipsAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomBasisCurves’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomBoundable’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomCamera’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomCapsule’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomCone’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomCube’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomCurves’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomCylinder’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomHermiteCurves’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomImageable’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomMesh’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomModelAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomMotionAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsCurves’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsPatch’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomPointBased’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomPointInstancer’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomPoints’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomPrimvarsAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomScope’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomSphere’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomSubset’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomXformCommonAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomXformable’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdGeomXform’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxLightFilter’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxListAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxShadowAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxShapingAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdMediaSpatialAudio’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdModelAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdRenderProduct’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdRenderSettingsBase’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdRenderSettings’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdRenderVar’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSchemaBase’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeCoordSysAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeMaterialBindingAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSkelAnimation’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSkelBindingAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSkelBlendShape’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSkelPackedJointAnimation’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSkelRoot’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdTyped’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdUIBackdrop’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdUINodeGraphNodeAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdUISceneGraphPrimAPI’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdVolField3DAsset’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdVolFieldAsset’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdVolFieldBase’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdVolOpenVDBAsset’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘class pxrInternal_v0_22__pxrReserved__::UsdVolVolume’ has no member named ‘GetSchemaType’; did you mean ‘_GetSchemaType’?* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdAPISchemaBase’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdClipsAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomBasisCurves’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomBoundable’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCamera’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCapsule’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCone’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCube’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCurves’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCylinder’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomHermiteCurves’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomImageable’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomMesh’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomModelAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomMotionAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsCurves’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsPatch’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPointBased’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPointInstancer’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPoints’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPrimvarsAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomScope’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomSphere’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomSubset’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXformCommonAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXformable’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXform’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxLightFilter’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxListAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxShadowAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxShapingAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdMediaSpatialAudio’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdModelAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderProduct’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderSettingsBase’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderSettings’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderVar’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSchemaBase’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeCoordSysAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterialBindingAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelAnimation’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelBindingAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelBlendShape’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelPackedJointAnimation’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelRoot’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdTyped’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUIBackdrop’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUINodeGraphNodeAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUISceneGraphPrimAPI’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolField3DAsset’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolFieldAsset’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolFieldBase’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolOpenVDBAsset’* ‘schemaType’ is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolVolume’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdAPISchemaBase” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdClipsAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdClipsAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomBasisCurves” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomBasisCurves” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomBoundable” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomBoundable” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCamera” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCamera” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCapsule” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCapsule” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCone” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCone” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCube” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCube” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCurves” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCurves” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCylinder” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomCylinder” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomGprim” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomGprim” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomHermiteCurves” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomHermiteCurves” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomImageable” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomImageable” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomMesh” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomMesh” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomModelAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomModelAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomMotionAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomMotionAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsCurves” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsCurves” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsPatch” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsPatch” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPointBased” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPointBased” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPointInstancer” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPointInstancer” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPoints” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPoints” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPrimvarsAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomPrimvarsAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomScope” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomScope” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomSphere” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomSphere” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomSubset” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomSubset” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomXform” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomXform” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomXformable” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomXformable” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomXformCommonAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdGeomXformCommonAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxLightFilter” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxLightFilter” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxListAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxListAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxShadowAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxShadowAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxShapingAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxShapingAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdMediaSpatialAudio” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdMediaSpatialAudio” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdModelAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdModelAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderProduct” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderProduct” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderSettings” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderSettings” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderSettingsBase” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderSettingsBase” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderVar” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdRenderVar” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSchemaBase” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSchemaBase” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeCoordSysAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeCoordSysAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeMaterialBindingAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeMaterialBindingAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeShader” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeShader” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelAnimation” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelAnimation” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelBindingAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelBindingAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelBlendShape” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelBlendShape” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelPackedJointAnimation” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelPackedJointAnimation” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelRoot” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelRoot” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdTyped” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdTyped” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdUIBackdrop” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdUIBackdrop” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdUINodeGraphNodeAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdUINodeGraphNodeAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdUISceneGraphPrimAPI” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdUISceneGraphPrimAPI” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolField3DAsset” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolField3DAsset” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolFieldAsset” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolFieldAsset” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolFieldBase” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolFieldBase” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolOpenVDBAsset” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolOpenVDBAsset” has no member “schemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolVolume” has no member “GetSchemaType”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdVolVolume” has no member “schemaType”* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdClipsAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomBasisCurves’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomBoundable’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCamera’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCapsule’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCone’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCube’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCurves’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCylinder’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomHermiteCurves’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomImageable’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomMesh’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomModelAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomMotionAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsCurves’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsPatch’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPointBased’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPointInstancer’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPoints’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPrimvarsAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomScope’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomSphere’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomSubset’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXform’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXformable’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXformCommonAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxLightFilter’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxListAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxShadowAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxShapingAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdMediaSpatialAudio’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdModelAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderProduct’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderSettings’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderSettingsBase’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderVar’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSchemaBase’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeCoordSysAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterialBindingAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelAnimation’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelBindingAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelBlendShape’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelPackedJointAnimation’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelRoot’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdTyped’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUIBackdrop’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUINodeGraphNodeAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUISceneGraphPrimAPI’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolField3DAsset’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolFieldAsset’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolFieldBase’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolOpenVDBAsset’* C2039        ‘GetSchemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolVolume’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdAPISchemaBase’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdClipsAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdCollectionAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomBasisCurves’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomBoundable’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCamera’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCapsule’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCone’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCube’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCurves’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomCylinder’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomHermiteCurves’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomImageable’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomMesh’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomModelAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomMotionAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsCurves’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomNurbsPatch’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPointBased’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPointInstancer’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPoints’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomPrimvarsAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomScope’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomSphere’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomSubset’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXform’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXformable’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomXformCommonAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxLightFilter’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxListAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxShadowAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxShapingAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdMediaSpatialAudio’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdModelAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderProduct’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderSettings’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderSettingsBase’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdRenderVar’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSchemaBase’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeCoordSysAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterialBindingAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelAnimation’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelBindingAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelBlendShape’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelPackedJointAnimation’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelRoot’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdTyped’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUIBackdrop’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUINodeGraphNodeAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdUISceneGraphPrimAPI’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolField3DAsset’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolFieldAsset’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolFieldBase’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolOpenVDBAsset’* C2039        ‘schemaType’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdVolVolume’* C2065        ‘AbstractBase’: undeclared identifier* C2065        ‘AbstractTyped’: undeclared identifier* C2065        ‘ConcreteTyped’: undeclared identifier* C2065        ‘MultipleApplyAPI’: undeclared identifier* C2065        ‘NonAppliedAPI’: undeclared identifier* C2065        ‘schemaType’: undeclared identifier* C2065        ‘SingleApplyAPI’: undeclared identifier* C2653        ‘UsdSchemaType’: is not a class or namespace name + +Python Error Strings: +* AttributeError: ‘Animation’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Backdrop’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘BasisCurves’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘BindingAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘BlendShape’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Boundable’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Camera’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Capsule’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘ClipsAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘CollectionAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Cone’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘ConnectableAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘CoordSysAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Cube’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Curves’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Cylinder’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘CylinderLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘DiskLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘DistantLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘DomeLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Field3DAsset’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘FieldAsset’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘FieldBase’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘GeometryLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Gprim’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘HermiteCurves’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Imageable’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘LightFilter’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘ListAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Material’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘MaterialBindingAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘MdlAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Mesh’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘ModelAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘MotionAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘NodeGraph’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘NodeGraphNodeAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘NurbsCurves’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘NurbsPatch’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘OpenVDBAsset’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘PackedJointAnimation’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘PointBased’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘PointInstancer’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Points’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘PrimvarsAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Product’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘RectLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Root’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘SceneGraphPrimAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘SchemaBase’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Scope’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Settings’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘SettingsBase’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Shader’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘ShadowAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘ShapingAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Skeleton’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘SpatialAudio’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Sphere’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘SphereLight’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Subset’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Typed’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Var’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Volume’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Xform’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘XformCommonAPI’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: ‘Xformable’ object has no attribute ‘GetSchemaType’. Did you mean: ‘GetSchemaKind’?* AttributeError: module ‘pxr.Usd’ has no attribute ‘SchemaType’. Did you mean: ‘SchemaBase’? + +#### Property Names of MultipleApply Schemas now namespaced in schema spec + +ie, the schema spec for CollectionAPI’s “includes” relationship was formerly just includes +Now, it includes a template for the instance name, and is: +collection:__INSTANCE_NAME__:includes +Use +Usd.SchemaRegistry.GetMultipleApplyNameTemplateBaseName(propertySpec.name) +to return just the “includes” portion, as before. +Functions for dealing with the new templated names can be found in +[UsdSchemaRegistry]: + +[GetMultipleApplyNameTemplateBaseName] +[IsMultipleApplyNameTemplate] +[MakeMultipleApplyNameInstance] +[MakeMultipleApplyNameTemplate] + +Reference Commits: +* Changing how we specify properties in multiple apply API schemas to make the namespacing more explicit. + +Python Example Before: +from pxr import UsdmyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)myCollection = Usd.CollectionAPI.ApplyCollection(myPrim, “MyCollection”)primDef = myPrim.GetPrimDefinition()propertySpec = primDef.GetSchemaPropertySpec(“collection:MyCollection:expansionRule”)baseSpecName = propertySpec.nameassert baseSpecName == “expansionRule” + +Python Example After (22.03+ only): +from pxr import UsdmyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)myCollection = Usd.CollectionAPI.Apply(myPrim, “MyCollection”)primDef = myPrim.GetPrimDefinition()propertySpec = primDef.GetSchemaPropertySpec(“collection:MyCollection:expansionRule”)assert propertySpec.name == “collection:__INSTANCE_NAME__:expansionRule”baseSpecName = Usd.SchemaRegistry.GetMultipleApplyNameTemplateBaseName(propertySpec.name)assert baseSpecName == “expansionRule” + +Python Example After (branching): +from pxr import UsdmyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)if hasattr(Usd.CollectionAPI, “Apply”):    myCollection = Usd.CollectionAPI.Apply(myPrim, “MyCollection”)else:    myCollection = Usd.CollectionAPI.ApplyCollection(myPrim, “MyCollection”)primDef = myPrim.GetPrimDefinition()propertySpec = primDef.GetSchemaPropertySpec(“collection:MyCollection:expansionRule”)if hasattr(Usd.SchemaRegistry, “GetMultipleApplyNameTemplateBaseName”):  # 22.03+    assert propertySpec.name == “collection:__INSTANCE_NAME__:expansionRule”    baseSpecName = Usd.SchemaRegistry.GetMultipleApplyNameTemplateBaseName(propertySpec.name)else:    baseSpecName = propertySpec.nameassert baseSpecName == “expansionRule” + +### Usd.Stage + +#### GetMasters to GetPrototypes + +Reference Commits: +* Deprecate “master” API in favor of new “prototype” API on UsdStage* Remove deprecated USD instancing “master” API + +C++/Python Find Regex: +(?<=\W)GetMasters(?=\W) + +C++/Python Replace Regex: +GetPrototypes + +C++ Example Before: +for (auto const& master : myStage->GetMasters()) + +C++ Example After (20.11+ only): +for (auto const& prototype : myStage->GetPrototypes()) + +C++ Example After (branched): +#if PXR_VERSION >= 2011for (auto const& prototype : myStage->GetPrototypes())#elsefor (auto const& master : myStage->GetMasters())#endif + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::UsdStage’ has no member named ‘GetMasters’* ‘pxrInternal_v0_22__pxrReserved__::TfWeakPtrFacade::DataType {aka class pxrInternal_v0_22__pxrReserved__::UsdStage}’ has no member named ‘GetMasters’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdStage” has no member “GetMasters”* C2039        ‘GetMasters’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdStage’ + +Python Error Strings: +AttributeError: ‘Stage’ object has no attribute ‘GetMasters’ + +## UsdGeom + +### UsdGeom.Imageable + +UsdGeomImageable has removed convenience APIs for accessing primvars +Primvars for derived types of UsdGeomImageage, such as UsdGeomMesh, +must be accessed through the UsdGeomPrimvarsAPI + +Reference Commits: +* Deleting deprecated primvar methods from UsdGeomImageable + +C++ Example Before: +PXR_NS::UsdStageRefPtr stage = PXR_NS::UsdStage::Open(boxUrl);PXR_NS::UsdPrim prim = stage->GetPrimAtPath(PXR_NS::SdfPath(“/Cube”));PXR_NS::UsdGeomMesh mesh(prim);PXR_NS::TfToken name(“pv”);mesh.HasPrimvar(name);mesh.GetPrimvar(name);mesh.CreatePrimvar(name, PXR_NS::SdfValueTypeNames->Float); + +C++ Example After: +PXR_NS::UsdStageRefPtr stage = PXR_NS::UsdStage::Open(boxUrl);PXR_NS::UsdPrim prim = stage->GetPrimAtPath(PXR_NS::SdfPath(“/Cube”));PXR_NS::UsdGeomPrimvarsAPI primvarsAPI(prim);primvarsAPI.HasPrimvar(name);primvarsAPI.GetPrimvar(name);primvarsAPI.CreatePrimvar(name, PXR_NS::SdfValueTypeNames->Float); + +C++ Error Strings (Windows): +* error C2039: ‘HasPrimvar’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* error C2039: ‘GetPrimvar’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* error C2039: ‘CreatePrimvar’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’ + +C++ Error Strings (Linux): +* ‘HasPrimvar’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* ‘GetPrimvar’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’* ‘CreatePrimvar’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdGeomGprim’ + +### UsdGeom Subset + +Material bindings authored on GeomSubsets are honored by renderers +only if their familyName is UsdShadeTokens->materialBind. This +allows robust interchange of subset bindings between multiple DCC +apps. See more at +[OM-32124]. +Assets can be repaired via the Asset Validator extension, see +[UsdMaterialBindingApi]. + +Reference Commits: +* Update UsdShadeMaterialBinding::ComputeBoundMaterial + +## UsdLux + +### All properties now prefixed with "inputs:" + +… including shaping and shadow attributes +Assets can be repaired via the Asset Validator extension, see +[UsdLuxSchemaChecker] +Property Name Changes, By Schema: + +Light: + +intensity to inputs:intensity +exposure to inputs:exposure +diffuse to inputs:diffuse +specular to inputs:specular +normalize to inputs:normalize +color to inputs:color +enableColorTemperature to inputs:enableColorTemperature +colorTemperature to inputs:colorTemperature + +DistantLight: + +angle to inputs:angle + +DiskLight: + +radius to inputs:radius + +RectLight: + +width to inputs:width +height to inputs:height +texture:file to inputs:texture:file + +SphereLight: + +radius to inputs:radius + +CylinderLight: + +length to inputs:length +radius to inputs:radius + +DomeLight: + +texture:file to inputs:texture:file +texture:format to inputs:texture:format + +ShapingAPI: + +shaping:focus to inputs:shaping:focus +shaping:focusTint to inputs:shaping:focusTint +shaping:cone:angle to inputs:shaping:cone:angle +shaping:cone:softness to inputs:shaping:cone:softness +shaping:ies:file to inputs:shaping:ies:file +shaping:ies:angleScale to inputs:shaping:ies:angleScale +shaping:ies:normalize to inputs:shaping:ies:normalize + +ShadowAPI: + +shadow:enable to inputs:shadow:enable +shadow:color to inputs:shadow:color +shadow:distance to inputs:shadow:distance +shadow:falloff to inputs:shadow:falloff +shadow:falloffGamma to inputs:shadow:falloffGamma + +UsdLuxTokens name changes: + +angle to inputsAngle +color to inputsColor +colorTemperature to inputsColorTemperature +diffuse to inputsDiffuse +enableColorTemperature to inputsEnableColorTemperature +exposure to inputsExposure +height to inputsHeight +intensity to inputsIntensity +length to inputsLength +normalize to inputsNormalize +radius to inputsRadius +shadowColor to inputsShadowColor +shadowDistance to inputsShadowDistance +shadowEnable to inputsShadowEnable +shadowFalloff to inputsShadowFalloff +shadowFalloffGamma to inputsShadowFalloffGamma +shapingConeAngle to inputsShapingConeAngle +shapingConeSoftness to inputsShapingConeSoftness +shapingFocus to inputsShapingFocus +shapingFocusTint to inputsShapingFocusTint +shapingIesAngleScale to inputsShapingIesAngleScale +shapingIesFile to inputsShapingIesFile +shapingIesNormalize to inputsShapingIesNormalize +specular to inputsSpecular +textureFile to inputsTextureFile +textureFormat to inputsTextureFormat +width to inputsWidth + +Reference Commits: +* Updated the schema in usdLux to have all attributes of Light and its inherited types use the “inputs:” prefix (with the exception of treatAsLine and treatAsPoint)* Shadow and Shaping APIs are now connectable. All attributes on these APIs have been given the “inputs:” prefix + +C++/Python Find Regex: +(?<=UsdLux.Tokens.|UsdLuxTokens->)(angle|color|colorTemperature|diffuse|enableColorTemperature|exposure|height|intensity|length|normalize|radius|shadowColor|shadowDistance|shadowEnable|shadowFalloff|shadowFalloffGamma|shapingConeAngle|shapingConeSoftness|shapingFocus|shapingFocusTint|shapingIesAngleScale|shapingIesFile|shapingIesNormalize|specular|textureFile|textureFormat|width)(?=\W) + +Python Example Before: +print(UsdLux.Tokens.angle)print(UsdLux.Tokens.color)print(UsdLux.Tokens.colorTemperature)print(UsdLux.Tokens.diffuse)print(UsdLux.Tokens.enableColorTemperature)print(UsdLux.Tokens.exposure)print(UsdLux.Tokens.height)print(UsdLux.Tokens.intensity)print(UsdLux.Tokens.length)print(UsdLux.Tokens.normalize)print(UsdLux.Tokens.radius)print(UsdLux.Tokens.shadowColor)print(UsdLux.Tokens.shadowDistance)print(UsdLux.Tokens.shadowEnable)print(UsdLux.Tokens.shadowFalloff)print(UsdLux.Tokens.shadowFalloffGamma)print(UsdLux.Tokens.shapingConeAngle)print(UsdLux.Tokens.shapingConeSoftness)print(UsdLux.Tokens.shapingFocus)print(UsdLux.Tokens.shapingFocusTint)print(UsdLux.Tokens.shapingIesAngleScale)print(UsdLux.Tokens.shapingIesFile)print(UsdLux.Tokens.shapingIesNormalize)print(UsdLux.Tokens.specular)print(UsdLux.Tokens.textureFile)print(UsdLux.Tokens.textureFormat)print(UsdLux.Tokens.width) + +Python Example After (21.02+ only): +from pxr import UsdLuxprint(UsdLux.Tokens.inputsAngle)print(UsdLux.Tokens.inputsColor)print(UsdLux.Tokens.inputsColorTemperature)print(UsdLux.Tokens.inputsDiffuse)print(UsdLux.Tokens.inputsEnableColorTemperature)print(UsdLux.Tokens.inputsExposure)print(UsdLux.Tokens.inputsHeight)print(UsdLux.Tokens.inputsIntensity)print(UsdLux.Tokens.inputsLength)print(UsdLux.Tokens.inputsNormalize)print(UsdLux.Tokens.inputsRadius)print(UsdLux.Tokens.inputsShadowColor)print(UsdLux.Tokens.inputsShadowDistance)print(UsdLux.Tokens.inputsShadowEnable)print(UsdLux.Tokens.inputsShadowFalloff)print(UsdLux.Tokens.inputsShadowFalloffGamma)print(UsdLux.Tokens.inputsShapingConeAngle)print(UsdLux.Tokens.inputsShapingConeSoftness)print(UsdLux.Tokens.inputsShapingFocus)print(UsdLux.Tokens.inputsShapingFocusTint)print(UsdLux.Tokens.inputsShapingIesAngleScale)print(UsdLux.Tokens.inputsShapingIesFile)print(UsdLux.Tokens.inputsShapingIesNormalize)print(UsdLux.Tokens.inputsSpecular)print(UsdLux.Tokens.inputsTextureFile)print(UsdLux.Tokens.inputsTextureFormat)print(UsdLux.Tokens.inputsWidth) + +Python Example After (branched): +from pxr import UsdLuxif hasattr(UsdLux.Tokens, “inputsAngle”):  # >= 21.02    print(UsdLux.Tokens.inputsAngle)    print(UsdLux.Tokens.inputsColor)    print(UsdLux.Tokens.inputsColorTemperature)    print(UsdLux.Tokens.inputsDiffuse)    print(UsdLux.Tokens.inputsEnableColorTemperature)    print(UsdLux.Tokens.inputsExposure)    print(UsdLux.Tokens.inputsHeight)    print(UsdLux.Tokens.inputsIntensity)    print(UsdLux.Tokens.inputsLength)    print(UsdLux.Tokens.inputsNormalize)    print(UsdLux.Tokens.inputsRadius)    print(UsdLux.Tokens.inputsShadowColor)    print(UsdLux.Tokens.inputsShadowDistance)    print(UsdLux.Tokens.inputsShadowEnable)    print(UsdLux.Tokens.inputsShadowFalloff)    print(UsdLux.Tokens.inputsShadowFalloffGamma)    print(UsdLux.Tokens.inputsShapingConeAngle)    print(UsdLux.Tokens.inputsShapingConeSoftness)    print(UsdLux.Tokens.inputsShapingFocus)    print(UsdLux.Tokens.inputsShapingFocusTint)    print(UsdLux.Tokens.inputsShapingIesAngleScale)    print(UsdLux.Tokens.inputsShapingIesFile)    print(UsdLux.Tokens.inputsShapingIesNormalize)    print(UsdLux.Tokens.inputsSpecular)    print(UsdLux.Tokens.inputsTextureFile)    print(UsdLux.Tokens.inputsTextureFormat)    print(UsdLux.Tokens.inputsWidth)else:    print(UsdLux.Tokens.angle)    print(UsdLux.Tokens.color)    print(UsdLux.Tokens.colorTemperature)    print(UsdLux.Tokens.diffuse)    print(UsdLux.Tokens.enableColorTemperature)    print(UsdLux.Tokens.exposure)    print(UsdLux.Tokens.height)    print(UsdLux.Tokens.intensity)    print(UsdLux.Tokens.length)    print(UsdLux.Tokens.normalize)    print(UsdLux.Tokens.radius)    print(UsdLux.Tokens.shadowColor)    print(UsdLux.Tokens.shadowDistance)    print(UsdLux.Tokens.shadowEnable)    print(UsdLux.Tokens.shadowFalloff)    print(UsdLux.Tokens.shadowFalloffGamma)    print(UsdLux.Tokens.shapingConeAngle)    print(UsdLux.Tokens.shapingConeSoftness)    print(UsdLux.Tokens.shapingFocus)    print(UsdLux.Tokens.shapingFocusTint)    print(UsdLux.Tokens.shapingIesAngleScale)    print(UsdLux.Tokens.shapingIesFile)    print(UsdLux.Tokens.shapingIesNormalize)    print(UsdLux.Tokens.specular)    print(UsdLux.Tokens.textureFile)    print(UsdLux.Tokens.textureFormat)    print(UsdLux.Tokens.width) + +C++ Error Strings (Linux): +* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘angle’; did you mean ‘angular’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘color’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘colorTemperature’; did you mean ‘inputsColorTemperature’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘diffuse’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘enableColorTemperature’; did you mean ‘inputsColorTemperature’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘exposure’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘height’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘intensity’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘length’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘normalize’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘radius’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shadowColor’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shadowDistance’; did you mean ‘inputsShadowDistance’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shadowEnable’; did you mean ‘inputsShadowEnable’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shadowFalloff’; did you mean ‘inputsShadowFalloff’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shadowFalloffGamma’; did you mean ‘inputsShadowFalloffGamma’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingConeAngle’; did you mean ‘inputsShapingConeAngle’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingConeSoftness’; did you mean ‘inputsShapingConeSoftness’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingFocus’; did you mean ‘inputsShapingFocus’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingFocusTint’; did you mean ‘inputsShapingFocusTint’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingIesAngleScale’; did you mean ‘inputsShapingIesAngleScale’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingIesFile’; did you mean ‘inputsShapingIesFile’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘shapingIesNormalize’; did you mean ‘inputsShapingIesNormalize’\?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘specular’* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘textureFile’; did you mean ‘inputsTextureFile’?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘textureFormat’; did you mean ‘inputsTextureFormat’?* ‘struct pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ has no member named ‘width’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “angle”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “color”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “colorTemperature”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “diffuse”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “enableColorTemperature”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “exposure”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “height”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “intensity”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “length”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “normalize”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “radius”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shadowColor”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shadowDistance”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shadowEnable”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shadowFalloff”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shadowFalloffGamma”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingConeAngle”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingConeSoftness”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingFocus”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingFocusTint”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingIesAngleScale”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingIesFile”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “shapingIesNormalize”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “specular”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “textureFile”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “textureFormat”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType” has no member “width”* C2039        ‘angle’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘color’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘colorTemperature’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘diffuse’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘enableColorTemperature’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘exposure’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘height’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘intensity’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘length’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘normalize’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘radius’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shadowColor’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shadowDistance’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shadowEnable’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shadowFalloff’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shadowFalloffGamma’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingConeAngle’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingConeSoftness’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingFocus’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingFocusTint’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingIesAngleScale’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingIesFile’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘shapingIesNormalize’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘specular’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘textureFile’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘textureFormat’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’* C2039        ‘width’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxTokensType’ + +Python Error Strings: +* AttributeError: type object ‘Tokens’ has no attribute ‘angle’* AttributeError: type object ‘Tokens’ has no attribute ‘color’* AttributeError: type object ‘Tokens’ has no attribute ‘colorTemperature’* AttributeError: type object ‘Tokens’ has no attribute ‘diffuse’* AttributeError: type object ‘Tokens’ has no attribute ‘enableColorTemperature’* AttributeError: type object ‘Tokens’ has no attribute ‘exposure’* AttributeError: type object ‘Tokens’ has no attribute ‘height’* AttributeError: type object ‘Tokens’ has no attribute ‘intensity’* AttributeError: type object ‘Tokens’ has no attribute ‘length’* AttributeError: type object ‘Tokens’ has no attribute ‘normalize’* AttributeError: type object ‘Tokens’ has no attribute ‘radius’* AttributeError: type object ‘Tokens’ has no attribute ‘shadowColor’* AttributeError: type object ‘Tokens’ has no attribute ‘shadowDistance’* AttributeError: type object ‘Tokens’ has no attribute ‘shadowEnable’* AttributeError: type object ‘Tokens’ has no attribute ‘shadowFalloff’* AttributeError: type object ‘Tokens’ has no attribute ‘shadowFalloffGamma’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingConeAngle’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingConeSoftness’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingFocus’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingFocusTint’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingIesAngleScale’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingIesFile’* AttributeError: type object ‘Tokens’ has no attribute ‘shapingIesNormalize’* AttributeError: type object ‘Tokens’ has no attribute ‘specular’* AttributeError: type object ‘Tokens’ has no attribute ‘textureFile’* AttributeError: type object ‘Tokens’ has no attribute ‘textureFormat’* AttributeError: type object ‘Tokens’ has no attribute ‘width’ + +### UsdLux.Light + +#### UsdLux Light to UsdLuxLightAPI + +Reference Commits: +* Creates the new single apply UsdLuxLightAPI applied API schema in preparation for migrating lights to having an applied LightAPI* Updates in usdLux to replace references to UsdLuxLight* Deleting UsdLuxLight and UsdLuxLightPortal + +C++/Python Find Regex: +(?<=\W)Usd(?:.)LuxLight(?=\W) + +C++ Example Before: +auto myStage = UsdStage::CreateInMemory();auto sphereLight = UsdLuxSphereLight::Define(myStage, SdfPath(“/sphereLight”));auto sphereLightPrim = sphereLight.GetPrim();if (sphereLightPrim.IsA()) {    std::cout << “It’s a light!” << std::endl;}if (sphereLightPrim.IsA()) {    std::cout << “It’s a light!” << std::endl;}sphereLight.GetLightLinkCollectionAPI();sphereLight.GetShadowLinkCollectionAPI(); + +C++ Example After (21.11+ only): +auto myStage = UsdStage::CreateInMemory();auto sphereLight = UsdLuxSphereLight::Define(myStage, SdfPath(“/sphereLight”));auto sphereLightPrim = sphereLight.GetPrim();if (sphereLightPrim.HasAPI()) {    std::cout << “It’s a light!” << std::endl;}if (sphereLightPrim.HasAPI()) {    std::cout << “It’s a light!” << std::endl;}UsdLuxLightAPI(sphereLight).GetLightLinkCollectionAPI();UsdLuxLightAPI(sphereLight).GetShadowLinkCollectionAPI(); + +C++ Example After (branched): +auto myStage = UsdStage::CreateInMemory();auto sphereLight = UsdLuxSphereLight::Define(myStage, SdfPath(“/sphereLight”));auto sphereLightPrim = sphereLight.GetPrim();#if PXR_VERSION >= 2111if (sphereLightPrim.HasAPI()) {    std::cout << “It’s a light!” << std::endl;}if (sphereLightPrim.HasAPI()) {    std::cout << “It’s a light!” << std::endl;}UsdLuxLightAPI(sphereLight).GetLightLinkCollectionAPI();UsdLuxLightAPI(sphereLight).GetShadowLinkCollectionAPI();#elseif (sphereLightPrim.IsA()) {    std::cout << “It’s a light!” << std::endl;}if (sphereLightPrim.IsA()) {    std::cout << “It’s a light!” << std::endl;}sphereLight.GetLightLinkCollectionAPI();sphereLight.GetShadowLinkCollectionAPI();#endif + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’ has no member named ‘GetLightLinkCollectionAPI’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’ has no member named ‘GetShadowLinkCollectionAPI’* ‘UsdLuxLight’ is not a member of ‘pxr’* ‘UsdLuxLight’ was not declared in this scope + +C++ Error Strings (Windows): +* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’* C2039        ‘GetLightLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’* C2039        ‘GetShadowLinkCollectionAPI’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’* C2039        ‘UsdLuxLight’: is not a member of ‘pxr’* C2065        ‘UsdLuxLight’: undeclared identifier* C2065        ‘UsdLuxLight’: undeclared identifier* C2672        ‘pxrInternal_v0_22__pxrReserved__::UsdPrim::IsA’: no matching overloaded function found* C2672        ‘pxrInternal_v0_22__pxrReserved__::UsdPrim::IsA’: no matching overloaded function found* C2974        ‘pxrInternal_v0_22__pxrReserved__::UsdPrim::IsA’: invalid template argument for ‘T’, type expected* C2974        ‘pxrInternal_v0_22__pxrReserved__::UsdPrim::IsA’: invalid template argument for ‘T’, type expected* E0020        identifier “UsdLuxLight” is undefined* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight” has no member “GetShadowLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight” has no member “GetShadowLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight” has no member “GetShadowLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight” has no member “GetShadowLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight” has no member “GetShadowLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight” has no member “GetShadowLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight” has no member “GetLightLinkCollectionAPI”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight” has no member “GetShadowLinkCollectionAPI”* E0135        namespace “pxr” has no member “UsdLuxLight” + +Python Error Strings: +* AttributeError: module ‘pxr.UsdLux’ has no attribute ‘Light’* AttributeError: ‘SphereLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘SphereLight’ object has no attribute ‘GetShadowLinkCollectionAPI’* AttributeError: ‘CylinderLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘CylinderLight’ object has no attribute ‘GetShadowLinkCollectionAPI’* AttributeError: ‘DiskLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘DiskLight’ object has no attribute ‘GetShadowLinkCollectionAPI’* AttributeError: ‘DistantLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘DistantLight’ object has no attribute ‘GetShadowLinkCollectionAPI’* AttributeError: ‘DomeLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘DomeLight’ object has no attribute ‘GetShadowLinkCollectionAPI’* AttributeError: ‘GeometryLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘GeometryLight’ object has no attribute ‘GetShadowLinkCollectionAPI’* AttributeError: ‘RectLight’ object has no attribute ‘GetLightLinkCollectionAPI’* AttributeError: ‘RectLight’ object has no attribute ‘GetShadowLinkCollectionAPI’ + +#### UsdLux LightPortal to UsdLux PortalLight + +TODO + +#### UsdLuxLight.ComputeBaseEmission() removed + +This function existed “solely as a reference example implementation of +how to interpret [UsdLuxLight’s] parameters.” It has been removed, +and there is no replacement. If you were making use of it, you will +have to add your own implementation - this function would duplicate +the old behavior: +GfVec3f ComputeBaseEmission(const UsdLuxLightAPI& light) + +{ + + GfVec3f e(1.0); + + float intensity = 1.0; + + light.GetIntensityAttr().Get(&intensity); + + e *= intensity; + + float exposure = 0.0; + + light.GetExposureAttr().Get(&exposure); + + e *= exp2(exposure); + + GfVec3f color(1.0); + + light.GetColorAttr().Get(&color); + + e = GfCompMult(e, color); + + bool enableColorTemp = false; + + light.GetEnableColorTemperatureAttr().Get(&enableColorTemp); + + if (enableColorTemp) { + + float colorTemp = 6500; + + if (light.GetColorTemperatureAttr().Get(&colorTemp)) { + + e = GfCompMult(e, UsdLuxBlackbodyTemperatureAsRgb(colorTemp)); + + } + + } + + return e; + +} + +Reference Commits: +Deleting UsdLuxLight and UsdLuxLightPortal + +C++/Python Find Regex: +(?<=\W)ComputeBaseEmission(?=\W) + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’ has no member named ‘ComputeBaseEmission’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’ has no member named ‘ComputeBaseEmission’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’ has no member named ‘ComputeBaseEmission’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’ has no member named ‘ComputeBaseEmission’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’ has no member named ‘ComputeBaseEmission’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’ has no member named ‘ComputeBaseEmission’* ‘class pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’ has no member named ‘ComputeBaseEmission’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight” has no member “ComputeBaseEmission”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight” has no member “ComputeBaseEmission”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight” has no member “ComputeBaseEmission”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight” has no member “ComputeBaseEmission”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight” has no member “ComputeBaseEmission”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight” has no member “ComputeBaseEmission”* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight” has no member “ComputeBaseEmission”* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxCylinderLight’* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDiskLight’* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDistantLight’* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxDomeLight’* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxGeometryLight’* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxRectLight’* C2039        ‘ComputeBaseEmission’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdLuxSphereLight’ + +Python Error Strings: +* AttributeError: ‘CylinderLight’ object has no attribute ‘ComputeBaseEmission’* AttributeError: ‘DiskLight’ object has no attribute ‘ComputeBaseEmission’* AttributeError: ‘DistantLight’ object has no attribute ‘ComputeBaseEmission’* AttributeError: ‘DomeLight’ object has no attribute ‘ComputeBaseEmission’* AttributeError: ‘GeometryLight’ object has no attribute ‘ComputeBaseEmission’* AttributeError: ‘RectLight’ object has no attribute ‘ComputeBaseEmission’* AttributeError: ‘SphereLight’ object has no attribute ‘ComputeBaseEmission’ + +#### UsdLux.LightFilterAPI removed + +## UsdPhysics + +### UsdPhysics Schema Changes + +#### UsdPhysics uses USD stock schema. + +Reference Commits: +* UsdPhysics API + +C++ Example Before: +#include + +C++ Example After (all versions): +#include + +C++ Error Strings +* Cannot open include file: ‘usdPhyiscs/articulationRootAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/collisionAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/meshCollisionAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/collisionGroup.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/distanceJoint.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/driveAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/filteredPairsAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/joint.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/limitAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/massAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/metrics.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/rigidBodyAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/materialAPI.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/scene.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/prismaticJoint.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/revoluteJoint.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/sphericalJoint.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/fixedJoint.h’: No such file or directory* Cannot open include file: ‘usdPhyiscs/tokens.h’: No such file or directory + +#### UsdRender + +##### UsdRender.SettingsAPI + +###### UsdRender SettingsAPI removed + +TODO + +#### UsdShade + +##### UsdShade.ConnectableAPI + +###### Explicit ctor required for shaders and nodegraphs + +See also: https://groups.google.com/g/usd-interest/c/I7gY7LpNkjw/m/Zjm7gFVUBgAJ + +Reference Commits: +* UsdShade API concept separation + +Python Example Before: +material.CreateSurfaceOutput().ConnectToSource(shader, “out”) + +Python Example After (all versions): +material.CreateSurfaceOutput().ConnectToSource(shader.ConnectableAPI(), “out”) + +C++ Error Strings (Linux): +* no known conversion for argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI&’* no known conversion for argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI&’* no known conversion for argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI&’* no known conversion for argument 2 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI&’* no known conversion for argument 2 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI&’* no known conversion for argument 2 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI&’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdAttribute&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeInput&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeOutput&, pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, const pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph&, pxrInternal_v0_22__pxrReserved__::TfToken&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType, const pxrInternal_v0_22__pxrReserved__::SdfValueTypeName&)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&, pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(pxrInternal_v0_22__pxrReserved__::UsdShadeShader&, pxrInternal_v0_22__pxrReserved__::TfToken&)’ + +C++ Error Strings (Windows): +* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* E0304        no instance of overloaded function “pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource” matches the argument list* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2665        ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI::ConnectToSource’: none of the 15 overloads could convert all the argument types* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &,const pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectionModification) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &,const pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectionModification) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &,const pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectionModification) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeOutput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &,const pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectionModification) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &,const pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectionModification) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &,const pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectionModification) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectionSourceInfo &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeShader’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeMaterial’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’* C2664        ‘bool pxrInternal_v0_22__pxrReserved__::UsdShadeInput::ConnectToSource(const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &,const pxrInternal_v0_22__pxrReserved__::TfToken &,const pxrInternal_v0_22__pxrReserved__::UsdShadeAttributeType,pxrInternal_v0_22__pxrReserved__::SdfValueTypeName) const’: cannot convert argument 1 from ‘pxrInternal_v0_22__pxrReserved__::UsdShadeNodeGraph’ to ‘const pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI &’ + +Python Error Strings: +* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, Material, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, Material, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, Material, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, NodeGraph, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, NodeGraph, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, NodeGraph, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, Shader, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, Shader, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Attribute, Shader, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, Material, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, Material, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, Material, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, NodeGraph, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, NodeGraph, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, NodeGraph, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, Shader, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, Shader, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Input, Shader, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, Material, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, Material, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, Material, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, NodeGraph, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, NodeGraph, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, NodeGraph, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, Shader, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, Shader, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    ConnectableAPI.ConnectToSource(Output, Shader, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, Material, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, Material, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, Material, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, NodeGraph, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, NodeGraph, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, NodeGraph, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, Shader, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, Shader, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Input.ConnectToSource(Input, Shader, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, Material, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, Material, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, Material, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, NodeGraph, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, NodeGraph, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, NodeGraph, str, AttributeType, ValueTypeName)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, Shader, str)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, Shader, str, AttributeType)did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Output.ConnectToSource(Output, Shader, str, AttributeType, ValueTypeName) did not match C++ signature: + +#### IsNodeGraph replaced with IsContainer + +Reference Commits: +* UsdShade: Add a concept of “containers” for connectable nodes.* Remove already-deprecated API IsShader() / IsNodeGraph(). + +C++/Python Find Regex: +(?<=\W)IsNodeGraph(?=\W) + +C++/Python Replace Regex: +IsContainer + +Python Example Before: +from pxr import Usd, UsdShademyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)material = UsdShade.Material.Define(myStage, “/myPrim/myMaterial”)shader = UsdShade.Shader.Define(myStage, “/myPrim/myMaterial/myShader”)nodeGraph = UsdShade.NodeGraph.Define(myStage, “/myPrim/myMaterial/nodeGraph”)assert material.ConnectableAPI().IsNodeGraph()assert not shader.ConnectableAPI().IsNodeGraph()assert nodeGraph.ConnectableAPI().IsNodeGraph() + +Python Example After (21.02+ only): +from pxr import Usd, UsdShademyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)material = UsdShade.Material.Define(myStage, “/myPrim/myMaterial”)shader = UsdShade.Shader.Define(myStage, “/myPrim/myMaterial/myShader”)nodeGraph = UsdShade.NodeGraph.Define(myStage, “/myPrim/myMaterial/nodeGraph”)assert material.ConnectableAPI().IsContainer()assert not shader.ConnectableAPI().IsContainer()assert nodeGraph.ConnectableAPI().IsContainer() + +Python Example After (branched): +from pxr import Usd, UsdShademyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)material = UsdShade.Material.Define(myStage, “/myPrim/myMaterial”)shader = UsdShade.Shader.Define(myStage, “/myPrim/myMaterial/myShader”)nodeGraph = UsdShade.NodeGraph.Define(myStage, “/myPrim/myMaterial/nodeGraph”)if hasattr(UsdShade.ConnectableAPI, “IsContainer”):  # >= 21.02    assert material.ConnectableAPI().IsContainer()    assert not shader.ConnectableAPI().IsContainer()    assert nodeGraph.ConnectableAPI().IsContainer()else:    assert material.ConnectableAPI().IsNodeGraph()    assert not shader.ConnectableAPI().IsNodeGraph()    assert nodeGraph.ConnectableAPI().IsNodeGraph() + +C++ Error Strings (Linux): +* ‘class pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI’ has no member named ‘IsNodeGraph’ + +C++ Error Strings (Windows): +* E0135        class “pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI” has no member “IsNodeGraph”* C2039        ‘IsNodeGraph’: is not a member of ‘pxrInternal_v0_22__pxrReserved__::UsdShadeConnectableAPI’ + +Python Error Strings: +* AttributeError: ‘ConnectableAPI’ object has no attribute ‘IsNodeGraph’ + +### UsdShade.MaterialBindingAPI + +#### Material bindings require UsdShadeMaterialBindingAPI to be applied + +All code which authors material bindings should Apply() +UsdShadeMaterialBindingAPI to the prim upon which the binding is +to be authored +Current default is to post warnings at runtime, but still apply +material bindings if is not applied +May set USD_SHADE_MATERIAL_BINDING_API_CHECK env var to change +behavior: + +allowMissingAPI + +silence warnings and apply materials even if +MaterialBindingAPI not applied + +warnOnMissingAPI + +current default +print warnings, but still apply materials even if +MaterialBindingAPI not applied + +strict + +future default +only apply material bindings if MaterialBindingAPI applied + +Assets can be repaired via the Asset Validator extension, see +UsdMaterialBindingApi. + +Reference Commits: +* BindingAtPrim should return early if the prim doesn’t have a MaterialBindingAPI Applied.* Change USD_SHADE_MATERIAL_BINDING_API_CHECK to “warnOnMissingAPI”. + +Runtime Warning Strings: +* Found material bindings on prim at path (%s) but MaterialBindingAPI is not applied on the prim + +## UsdSkel + +### UsdSkel Cache + +#### Populate/ComputeSkelBinding/ComputeSkelBindings now require a predicate parameter + +To maintain the same behavior, pass UsdPrimDefaultPredicate as the +predicate; if you wish to allow instancing of skeletons, use +UsdTraverseInstanceProxies instead + +Reference Commits: +* Adding UsdImagingPrimAdapter::ShouldIgnoreNativeInstanceSubtrees(), which allows an adapter to disable instancing of itself and its descendants… Adding `predicate` flag to Populate, ComputeBinding and ComputeBindings methods of UsdSkelCache. + +C++/Python Find Regex: +(?<=.|->)(Populate|ComputeSkelBindings?)\( + +Python Example Before: +from pxr import Usd, UsdSkelmyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)mySkel = myStage.DefinePrim(“/myPrim/skelRoot”, “SkelRoot”)skelCache = UsdSkel.Cache()mySkelRoot = UsdSkel.Root.Define(myStage, “/myPrim/skelRoot”)mySkel = UsdSkel.Skeleton.Define(myStage, “/myPrim/skelRoot/mySkel”)skelCache.Populate(mySkelRoot)binding = skelCache.ComputeSkelBinding(mySkelRoot, mySkel)bindings = skelCache.ComputeSkelBindings(mySkelRoot) + +Python Example After (21.02+ only): +from pxr import Usd, UsdSkelmyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)mySkel = myStage.DefinePrim(“/myPrim/skelRoot”, “SkelRoot”)skelCache = UsdSkel.Cache()mySkelRoot = UsdSkel.Root.Define(myStage, “/myPrim/skelRoot”)mySkel = UsdSkel.Skeleton.Define(myStage, “/myPrim/skelRoot/mySkel”)skelCache.Populate(mySkelRoot, Usd.PrimDefaultPredicate)binding = skelCache.ComputeSkelBinding(mySkelRoot, mySkel, Usd.PrimDefaultPredicate)bindings = skelCache.ComputeSkelBindings(mySkelRoot, Usd.PrimDefaultPredicate) + +Python Example After (branched): +from pxr import Usd, UsdSkelmyStage = Usd.Stage.CreateInMemory()myPrim = myStage.DefinePrim(“/myPrim”, “Transform”)mySkel = myStage.DefinePrim(“/myPrim/skelRoot”, “SkelRoot”)skelCache = UsdSkel.Cache()mySkelRoot = UsdSkel.Root.Define(myStage, “/myPrim/skelRoot”)mySkel = UsdSkel.Skeleton.Define(myStage, “/myPrim/skelRoot/mySkel”)if Usd.GetVersion() >= (0,20,11):    skelCache.Populate(mySkelRoot, Usd.PrimDefaultPredicate)    binding = skelCache.ComputeSkelBinding(mySkelRoot, mySkel, Usd.PrimDefaultPredicate)    bindings = skelCache.ComputeSkelBindings(mySkelRoot, Usd.PrimDefaultPredicate)else:    skelCache.Populate(mySkelRoot)    binding = skelCache.ComputeSkelBinding(mySkelRoot, mySkel)    bindings = skelCache.ComputeSkelBindings(mySkelRoot) + +C++ Error Strings (Linux): +* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdSkelCache::ComputeSkelBinding(pxrInternal_v0_22__pxrReserved__::UsdSkelRoot&, pxrInternal_v0_22__pxrReserved__::UsdSkelSkeleton&, pxrInternal_v0_22__pxrReserved__::UsdSkelBinding*)’* no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdSkelCache::ComputeSkelBindings(pxrInternal_v0_22__pxrReserved__::UsdSkelRoot&, std::vector)’ no matching function for call to ‘pxrInternal_v0_22__pxrReserved__::UsdSkelCache::Populate(pxrInternal_v0_22__pxrReserved__::UsdSkelRoot&)’ + +C++ Error Strings (Windows): +* C2660        ‘pxrInternal_v0_22__pxrReserved__::UsdSkelCache::Populate’: function does not take 1 arguments* C2660        ‘pxrInternal_v0_22__pxrReserved__::UsdSkelCache::ComputeSkelBinding’: function does not take 3 arguments* C2660        ‘pxrInternal_v0_22__pxrReserved__::UsdSkelCache::ComputeSkelBindings’: function does not take 2 arguments + +Python Error Strings: +* Boost.Python.ArgumentError: Python argument types in    Cache.Populate(Cache, Root) did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Cache.ComputeSkelBinding(Cache, Root, Skeleton) did not match C++ signature:* Boost.Python.ArgumentError: Python argument types in    Cache.ComputeSkelBindings(Cache, Root) did not match C++ signature: + +## Imaging + +### Glf + +#### Removed glew dependency + +Reference Commits: +* [Glf] Removed glf/glew + +C++ Find Regex: +(?<=\W)(GLEW|Glew|glew)(?=\W|_) + +C++ Example Before: +// Generally code will include one or the other of these, not both - they are// both replaced by garch/glApi.h#include “pxr/imaging/glf/glew.h”#include “pxr/imaging/garch/gl.h”PXR_NAMESPACE_USING_DIRECTIVEvoid gl_functionality_example() {    GlfGlewInit();    if (GLEW_KHR_debug) {}    if (GLEW_ARB_bindless_texture) {}    if (glewIsSupported(“GL_NV_conservative_raster”)) {}#if defined(GLEW_VERSION_4_5)    if (GLEW_VERSION_4_5 | GLEW_ARB_direct_state_access) {}#endif} + +C++ Example After (21.02+ only): +#include “pxr/imaging/garch/glApi.h”PXR_NAMESPACE_USING_DIRECTIVEvoid gl_functionality_example() {    GarchGLApiLoad();    if (GARCH_GLAPI_HAS(KHR_debug)) {}    if (GARCH_GLAPI_HAS(ARB_bindless_texture))    if (GARCH_GLAPI_HAS(NV_conservative_raster)) {}#if defined(GL_VERSION_4_5)    if (GARCH_GLAPI_HAS(VERSION_4_5) | GARCH_GLAPI_HAS(ARB_direct_state_access)) {}#endif} + +C++ Example After (branched): +#if PXR_VERSION >= 2102#include “pxr/imaging/garch/glApi.h”#else// Generally code will include one or the other of these, not both - they are// both replaced by garch/glApi.h#include “pxr/imaging/glf/glew.h”#include “pxr/imaging/garch/gl.h”#endifPXR_NAMESPACE_USING_DIRECTIVEvoid gl_functionality_example() {#if PXR_VERSION >= 2102    GarchGLApiLoad();    if (GARCH_GLAPI_HAS(KHR_debug)) {}    if (GARCH_GLAPI_HAS(ARB_bindless_texture))    if (GARCH_GLAPI_HAS(NV_conservative_raster)) {}#if defined(GL_VERSION_4_5)    if (GARCH_GLAPI_HAS(VERSION_4_5) | GARCH_GLAPI_HAS(ARB_direct_state_access)) {}#endif#else    GlfGlewInit();    if (GLEW_KHR_debug) {}    if (GLEW_ARB_bindless_texture) {}    if (glewIsSupported(“GL_NV_conservative_raster”)) {}#if defined(GLEW_VERSION_4_5)    if (GLEW_VERSION_4_5 | GLEW_ARB_direct_state_access) {}#endif#endif} + +C++ Error Strings (Linux): +* pxr/imaging/glf/glew.h: No such file or directory* GL/glew.h: No such file or directory* ‘glewIsSupported’ was not declared in this scope* ‘GlfGlewInit’ was not declared in this scope* ‘GLEW_3DFX_multisample’ was not declared in this scope* ‘GLEW_3DFX_tbuffer’ was not declared in this scope* ‘GLEW_3DFX_texture_compression_FXT1’ was not declared in this scope* ‘GLEW_AMD_blend_minmax_factor’ was not declared in this scope* ‘GLEW_AMD_compressed_3DC_texture’ was not declared in this scope* ‘GLEW_AMD_compressed_ATC_texture’ was not declared in this scope* ‘GLEW_AMD_conservative_depth’ was not declared in this scope* ‘GLEW_AMD_debug_output’ was not declared in this scope* ‘GLEW_AMD_depth_clamp_separate’ was not declared in this scope* ‘GLEW_AMD_draw_buffers_blend’ was not declared in this scope* ‘GLEW_AMD_framebuffer_sample_positions’ was not declared in this scope* ‘GLEW_AMD_gcn_shader’ was not declared in this scope* ‘GLEW_AMD_gpu_shader_half_float’ was not declared in this scope* ‘GLEW_AMD_gpu_shader_int16’ was not declared in this scope* ‘GLEW_AMD_gpu_shader_int64’ was not declared in this scope* ‘GLEW_AMD_interleaved_elements’ was not declared in this scope* ‘GLEW_AMD_multi_draw_indirect’ was not declared in this scope* ‘GLEW_AMD_name_gen_delete’ was not declared in this scope* ‘GLEW_AMD_occlusion_query_event’ was not declared in this scope* ‘GLEW_AMD_performance_monitor’ was not declared in this scope* ‘GLEW_AMD_pinned_memory’ was not declared in this scope* ‘GLEW_AMD_program_binary_Z400’ was not declared in this scope* ‘GLEW_AMD_query_buffer_object’ was not declared in this scope* ‘GLEW_AMD_sample_positions’ was not declared in this scope* ‘GLEW_AMD_seamless_cubemap_per_texture’ was not declared in this scope* ‘GLEW_AMD_shader_atomic_counter_ops’ was not declared in this scope* ‘GLEW_AMD_shader_ballot’ was not declared in this scope* ‘GLEW_AMD_shader_explicit_vertex_parameter’ was not declared in this scope* ‘GLEW_AMD_shader_stencil_export’ was not declared in this scope* ‘GLEW_AMD_shader_stencil_value_export’ was not declared in this scope* ‘GLEW_AMD_shader_trinary_minmax’ was not declared in this scope* ‘GLEW_AMD_sparse_texture’ was not declared in this scope* ‘GLEW_AMD_stencil_operation_extended’ was not declared in this scope* ‘GLEW_AMD_texture_gather_bias_lod’ was not declared in this scope* ‘GLEW_AMD_texture_texture4’ was not declared in this scope* ‘GLEW_AMD_transform_feedback3_lines_triangles’ was not declared in this scope* ‘GLEW_AMD_transform_feedback4’ was not declared in this scope* ‘GLEW_AMD_vertex_shader_layer’ was not declared in this scope* ‘GLEW_AMD_vertex_shader_tessellator’ was not declared in this scope* ‘GLEW_AMD_vertex_shader_viewport_index’ was not declared in this scope* ‘GLEW_ANDROID_extension_pack_es31a’ was not declared in this scope* ‘GLEW_ANGLE_depth_texture’ was not declared in this scope* ‘GLEW_ANGLE_framebuffer_blit’ was not declared in this scope* ‘GLEW_ANGLE_framebuffer_multisample’ was not declared in this scope* ‘GLEW_ANGLE_instanced_arrays’ was not declared in this scope* ‘GLEW_ANGLE_pack_reverse_row_order’ was not declared in this scope* ‘GLEW_ANGLE_program_binary’ was not declared in this scope* ‘GLEW_ANGLE_texture_compression_dxt1’ was not declared in this scope* ‘GLEW_ANGLE_texture_compression_dxt3’ was not declared in this scope* ‘GLEW_ANGLE_texture_compression_dxt5’ was not declared in this scope* ‘GLEW_ANGLE_texture_usage’ was not declared in this scope* ‘GLEW_ANGLE_timer_query’ was not declared in this scope* ‘GLEW_ANGLE_translated_shader_source’ was not declared in this scope* ‘GLEW_APPLE_aux_depth_stencil’ was not declared in this scope* ‘GLEW_APPLE_client_storage’ was not declared in this scope* ‘GLEW_APPLE_clip_distance’ was not declared in this scope* ‘GLEW_APPLE_color_buffer_packed_float’ was not declared in this scope* ‘GLEW_APPLE_copy_texture_levels’ was not declared in this scope* ‘GLEW_APPLE_element_array’ was not declared in this scope* ‘GLEW_APPLE_fence’ was not declared in this scope* ‘GLEW_APPLE_float_pixels’ was not declared in this scope* ‘GLEW_APPLE_flush_buffer_range’ was not declared in this scope* ‘GLEW_APPLE_framebuffer_multisample’ was not declared in this scope* ‘GLEW_APPLE_object_purgeable’ was not declared in this scope* ‘GLEW_APPLE_pixel_buffer’ was not declared in this scope* ‘GLEW_APPLE_rgb_422’ was not declared in this scope* ‘GLEW_APPLE_row_bytes’ was not declared in this scope* ‘GLEW_APPLE_specular_vector’ was not declared in this scope* ‘GLEW_APPLE_sync’ was not declared in this scope* ‘GLEW_APPLE_texture_2D_limited_npot’ was not declared in this scope* ‘GLEW_APPLE_texture_format_BGRA8888’ was not declared in this scope* ‘GLEW_APPLE_texture_max_level’ was not declared in this scope* ‘GLEW_APPLE_texture_packed_float’ was not declared in this scope* ‘GLEW_APPLE_texture_range’ was not declared in this scope* ‘GLEW_APPLE_transform_hint’ was not declared in this scope* ‘GLEW_APPLE_vertex_array_object’ was not declared in this scope* ‘GLEW_APPLE_vertex_array_range’ was not declared in this scope* ‘GLEW_APPLE_vertex_program_evaluators’ was not declared in this scope* ‘GLEW_APPLE_ycbcr_422’ was not declared in this scope* ‘GLEW_ARB_ES2_compatibility’ was not declared in this scope* ‘GLEW_ARB_ES3_1_compatibility’ was not declared in this scope* ‘GLEW_ARB_ES3_2_compatibility’ was not declared in this scope* ‘GLEW_ARB_ES3_compatibility’ was not declared in this scope* ‘GLEW_ARB_arrays_of_arrays’ was not declared in this scope* ‘GLEW_ARB_base_instance’ was not declared in this scope* ‘GLEW_ARB_bindless_texture’ was not declared in this scope* ‘GLEW_ARB_blend_func_extended’ was not declared in this scope* ‘GLEW_ARB_buffer_storage’ was not declared in this scope* ‘GLEW_ARB_cl_event’ was not declared in this scope* ‘GLEW_ARB_clear_buffer_object’ was not declared in this scope* ‘GLEW_ARB_clear_texture’ was not declared in this scope* ‘GLEW_ARB_clip_control’ was not declared in this scope* ‘GLEW_ARB_color_buffer_float’ was not declared in this scope* ‘GLEW_ARB_compatibility’ was not declared in this scope* ‘GLEW_ARB_compressed_texture_pixel_storage’ was not declared in this scope* ‘GLEW_ARB_compute_shader’ was not declared in this scope* ‘GLEW_ARB_compute_variable_group_size’ was not declared in this scope* ‘GLEW_ARB_conditional_render_inverted’ was not declared in this scope* ‘GLEW_ARB_conservative_depth’ was not declared in this scope* ‘GLEW_ARB_copy_buffer’ was not declared in this scope* ‘GLEW_ARB_copy_image’ was not declared in this scope* ‘GLEW_ARB_cull_distance’ was not declared in this scope* ‘GLEW_ARB_debug_output’ was not declared in this scope* ‘GLEW_ARB_depth_buffer_float’ was not declared in this scope* ‘GLEW_ARB_depth_clamp’ was not declared in this scope* ‘GLEW_ARB_depth_texture’ was not declared in this scope* ‘GLEW_ARB_derivative_control’ was not declared in this scope* ‘GLEW_ARB_direct_state_access’ was not declared in this scope* ‘GLEW_ARB_draw_buffers_blend’ was not declared in this scope* ‘GLEW_ARB_draw_buffers’ was not declared in this scope* ‘GLEW_ARB_draw_elements_base_vertex’ was not declared in this scope* ‘GLEW_ARB_draw_indirect’ was not declared in this scope* ‘GLEW_ARB_draw_instanced’ was not declared in this scope* ‘GLEW_ARB_enhanced_layouts’ was not declared in this scope* ‘GLEW_ARB_explicit_attrib_location’ was not declared in this scope* ‘GLEW_ARB_explicit_uniform_location’ was not declared in this scope* ‘GLEW_ARB_fragment_coord_conventions’ was not declared in this scope* ‘GLEW_ARB_fragment_layer_viewport’ was not declared in this scope* ‘GLEW_ARB_fragment_program_shadow’ was not declared in this scope* ‘GLEW_ARB_fragment_program’ was not declared in this scope* ‘GLEW_ARB_fragment_shader_interlock’ was not declared in this scope* ‘GLEW_ARB_fragment_shader’ was not declared in this scope* ‘GLEW_ARB_framebuffer_no_attachments’ was not declared in this scope* ‘GLEW_ARB_framebuffer_object’ was not declared in this scope* ‘GLEW_ARB_framebuffer_sRGB’ was not declared in this scope* ‘GLEW_ARB_geometry_shader4’ was not declared in this scope* ‘GLEW_ARB_get_program_binary’ was not declared in this scope* ‘GLEW_ARB_get_texture_sub_image’ was not declared in this scope* ‘GLEW_ARB_gl_spirv’ was not declared in this scope* ‘GLEW_ARB_gpu_shader5’ was not declared in this scope* ‘GLEW_ARB_gpu_shader_fp64’ was not declared in this scope* ‘GLEW_ARB_gpu_shader_int64’ was not declared in this scope* ‘GLEW_ARB_half_float_pixel’ was not declared in this scope* ‘GLEW_ARB_half_float_vertex’ was not declared in this scope* ‘GLEW_ARB_imaging’ was not declared in this scope* ‘GLEW_ARB_indirect_parameters’ was not declared in this scope* ‘GLEW_ARB_instanced_arrays’ was not declared in this scope* ‘GLEW_ARB_internalformat_query2’ was not declared in this scope* ‘GLEW_ARB_internalformat_query’ was not declared in this scope* ‘GLEW_ARB_invalidate_subdata’ was not declared in this scope* ‘GLEW_ARB_map_buffer_alignment’ was not declared in this scope* ‘GLEW_ARB_map_buffer_range’ was not declared in this scope* ‘GLEW_ARB_matrix_palette’ was not declared in this scope* ‘GLEW_ARB_multi_bind’ was not declared in this scope* ‘GLEW_ARB_multi_draw_indirect’ was not declared in this scope* ‘GLEW_ARB_multisample’ was not declared in this scope* ‘GLEW_ARB_multitexture’ was not declared in this scope* ‘GLEW_ARB_occlusion_query2’ was not declared in this scope* ‘GLEW_ARB_occlusion_query’ was not declared in this scope* ‘GLEW_ARB_parallel_shader_compile’ was not declared in this scope* ‘GLEW_ARB_pipeline_statistics_query’ was not declared in this scope* ‘GLEW_ARB_pixel_buffer_object’ was not declared in this scope* ‘GLEW_ARB_point_parameters’ was not declared in this scope* ‘GLEW_ARB_point_sprite’ was not declared in this scope* ‘GLEW_ARB_polygon_offset_clamp’ was not declared in this scope* ‘GLEW_ARB_post_depth_coverage’ was not declared in this scope* ‘GLEW_ARB_program_interface_query’ was not declared in this scope* ‘GLEW_ARB_provoking_vertex’ was not declared in this scope* ‘GLEW_ARB_query_buffer_object’ was not declared in this scope* ‘GLEW_ARB_robust_buffer_access_behavior’ was not declared in this scope* ‘GLEW_ARB_robustness_application_isolation’ was not declared in this scope* ‘GLEW_ARB_robustness_share_group_isolation’ was not declared in this scope* ‘GLEW_ARB_robustness’ was not declared in this scope* ‘GLEW_ARB_sample_locations’ was not declared in this scope* ‘GLEW_ARB_sample_shading’ was not declared in this scope* ‘GLEW_ARB_sampler_objects’ was not declared in this scope* ‘GLEW_ARB_seamless_cube_map’ was not declared in this scope* ‘GLEW_ARB_seamless_cubemap_per_texture’ was not declared in this scope* ‘GLEW_ARB_separate_shader_objects’ was not declared in this scope* ‘GLEW_ARB_shader_atomic_counter_ops’ was not declared in this scope* ‘GLEW_ARB_shader_atomic_counters’ was not declared in this scope* ‘GLEW_ARB_shader_ballot’ was not declared in this scope* ‘GLEW_ARB_shader_bit_encoding’ was not declared in this scope* ‘GLEW_ARB_shader_clock’ was not declared in this scope* ‘GLEW_ARB_shader_draw_parameters’ was not declared in this scope* ‘GLEW_ARB_shader_group_vote’ was not declared in this scope* ‘GLEW_ARB_shader_image_load_store’ was not declared in this scope* ‘GLEW_ARB_shader_image_size’ was not declared in this scope* ‘GLEW_ARB_shader_objects’ was not declared in this scope* ‘GLEW_ARB_shader_precision’ was not declared in this scope* ‘GLEW_ARB_shader_stencil_export’ was not declared in this scope* ‘GLEW_ARB_shader_storage_buffer_object’ was not declared in this scope* ‘GLEW_ARB_shader_subroutine’ was not declared in this scope* ‘GLEW_ARB_shader_texture_image_samples’ was not declared in this scope* ‘GLEW_ARB_shader_texture_lod’ was not declared in this scope* ‘GLEW_ARB_shader_viewport_layer_array’ was not declared in this scope* ‘GLEW_ARB_shading_language_100’ was not declared in this scope* ‘GLEW_ARB_shading_language_420pack’ was not declared in this scope* ‘GLEW_ARB_shading_language_include’ was not declared in this scope* ‘GLEW_ARB_shading_language_packing’ was not declared in this scope* ‘GLEW_ARB_shadow_ambient’ was not declared in this scope* ‘GLEW_ARB_shadow’ was not declared in this scope* ‘GLEW_ARB_sparse_buffer’ was not declared in this scope* ‘GLEW_ARB_sparse_texture2’ was not declared in this scope* ‘GLEW_ARB_sparse_texture_clamp’ was not declared in this scope* ‘GLEW_ARB_sparse_texture’ was not declared in this scope* ‘GLEW_ARB_spirv_extensions’ was not declared in this scope* ‘GLEW_ARB_stencil_texturing’ was not declared in this scope* ‘GLEW_ARB_sync’ was not declared in this scope* ‘GLEW_ARB_tessellation_shader’ was not declared in this scope* ‘GLEW_ARB_texture_barrier’ was not declared in this scope* ‘GLEW_ARB_texture_border_clamp’ was not declared in this scope* ‘GLEW_ARB_texture_buffer_object_rgb32’ was not declared in this scope* ‘GLEW_ARB_texture_buffer_object’ was not declared in this scope* ‘GLEW_ARB_texture_buffer_range’ was not declared in this scope* ‘GLEW_ARB_texture_compression_bptc’ was not declared in this scope* ‘GLEW_ARB_texture_compression_rgtc’ was not declared in this scope* ‘GLEW_ARB_texture_compression’ was not declared in this scope* ‘GLEW_ARB_texture_cube_map_array’ was not declared in this scope* ‘GLEW_ARB_texture_cube_map’ was not declared in this scope* ‘GLEW_ARB_texture_env_add’ was not declared in this scope* ‘GLEW_ARB_texture_env_combine’ was not declared in this scope* ‘GLEW_ARB_texture_env_crossbar’ was not declared in this scope* ‘GLEW_ARB_texture_env_dot3’ was not declared in this scope* ‘GLEW_ARB_texture_filter_anisotropic’ was not declared in this scope* ‘GLEW_ARB_texture_filter_minmax’ was not declared in this scope* ‘GLEW_ARB_texture_float’ was not declared in this scope* ‘GLEW_ARB_texture_gather’ was not declared in this scope* ‘GLEW_ARB_texture_mirror_clamp_to_edge’ was not declared in this scope* ‘GLEW_ARB_texture_mirrored_repeat’ was not declared in this scope* ‘GLEW_ARB_texture_multisample’ was not declared in this scope* ‘GLEW_ARB_texture_non_power_of_two’ was not declared in this scope* ‘GLEW_ARB_texture_query_levels’ was not declared in this scope* ‘GLEW_ARB_texture_query_lod’ was not declared in this scope* ‘GLEW_ARB_texture_rectangle’ was not declared in this scope* ‘GLEW_ARB_texture_rgb10_a2ui’ was not declared in this scope* ‘GLEW_ARB_texture_rg’ was not declared in this scope* ‘GLEW_ARB_texture_stencil8’ was not declared in this scope* ‘GLEW_ARB_texture_storage_multisample’ was not declared in this scope* ‘GLEW_ARB_texture_storage’ was not declared in this scope* ‘GLEW_ARB_texture_swizzle’ was not declared in this scope* ‘GLEW_ARB_texture_view’ was not declared in this scope* ‘GLEW_ARB_timer_query’ was not declared in this scope* ‘GLEW_ARB_transform_feedback2’ was not declared in this scope* ‘GLEW_ARB_transform_feedback3’ was not declared in this scope* ‘GLEW_ARB_transform_feedback_instanced’ was not declared in this scope* ‘GLEW_ARB_transform_feedback_overflow_query’ was not declared in this scope* ‘GLEW_ARB_transpose_matrix’ was not declared in this scope* ‘GLEW_ARB_uniform_buffer_object’ was not declared in this scope* ‘GLEW_ARB_vertex_array_bgra’ was not declared in this scope* ‘GLEW_ARB_vertex_array_object’ was not declared in this scope* ‘GLEW_ARB_vertex_attrib_64bit’ was not declared in this scope* ‘GLEW_ARB_vertex_attrib_binding’ was not declared in this scope* ‘GLEW_ARB_vertex_blend’ was not declared in this scope* ‘GLEW_ARB_vertex_buffer_object’ was not declared in this scope* ‘GLEW_ARB_vertex_program’ was not declared in this scope* ‘GLEW_ARB_vertex_shader’ was not declared in this scope* ‘GLEW_ARB_vertex_type_10f_11f_11f_rev’ was not declared in this scope* ‘GLEW_ARB_vertex_type_2_10_10_10_rev’ was not declared in this scope* ‘GLEW_ARB_viewport_array’ was not declared in this scope* ‘GLEW_ARB_window_pos’ was not declared in this scope* ‘GLEW_ARM_mali_program_binary’ was not declared in this scope* ‘GLEW_ARM_mali_shader_binary’ was not declared in this scope* ‘GLEW_ARM_rgba8’ was not declared in this scope* ‘GLEW_ARM_shader_framebuffer_fetch_depth_stencil’ was not declared in this scope* ‘GLEW_ARM_shader_framebuffer_fetch’ was not declared in this scope* ‘GLEW_ATIX_point_sprites’ was not declared in this scope* ‘GLEW_ATIX_texture_env_combine3’ was not declared in this scope* ‘GLEW_ATIX_texture_env_route’ was not declared in this scope* ‘GLEW_ATIX_vertex_shader_output_point_size’ was not declared in this scope* ‘GLEW_ATI_draw_buffers’ was not declared in this scope* ‘GLEW_ATI_element_array’ was not declared in this scope* ‘GLEW_ATI_envmap_bumpmap’ was not declared in this scope* ‘GLEW_ATI_fragment_shader’ was not declared in this scope* ‘GLEW_ATI_map_object_buffer’ was not declared in this scope* ‘GLEW_ATI_meminfo’ was not declared in this scope* ‘GLEW_ATI_pn_triangles’ was not declared in this scope* ‘GLEW_ATI_separate_stencil’ was not declared in this scope* ‘GLEW_ATI_shader_texture_lod’ was not declared in this scope* ‘GLEW_ATI_text_fragment_shader’ was not declared in this scope* ‘GLEW_ATI_texture_compression_3dc’ was not declared in this scope* ‘GLEW_ATI_texture_env_combine3’ was not declared in this scope* ‘GLEW_ATI_texture_float’ was not declared in this scope* ‘GLEW_ATI_texture_mirror_once’ was not declared in this scope* ‘GLEW_ATI_vertex_array_object’ was not declared in this scope* ‘GLEW_ATI_vertex_attrib_array_object’ was not declared in this scope* ‘GLEW_ATI_vertex_streams’ was not declared in this scope* ‘GLEW_EGL_KHR_context_flush_control’ was not declared in this scope* ‘GLEW_EGL_NV_robustness_video_memory_purge’ was not declared in this scope* ‘GLEW_ERROR_GLX_VERSION_11_ONLY’ was not declared in this scope* ‘GLEW_ERROR_GL_VERSION_10_ONLY’ was not declared in this scope* ‘GLEW_ERROR_NO_GLX_DISPLAY’ was not declared in this scope* ‘GLEW_ERROR_NO_GL_VERSION’ was not declared in this scope* ‘GLEW_EXT_422_pixels’ was not declared in this scope* ‘GLEW_EXT_Cg_shader’ was not declared in this scope* ‘GLEW_EXT_EGL_image_array’ was not declared in this scope* ‘GLEW_EXT_YUV_target’ was not declared in this scope* ‘GLEW_EXT_abgr’ was not declared in this scope* ‘GLEW_EXT_base_instance’ was not declared in this scope* ‘GLEW_EXT_bgra’ was not declared in this scope* ‘GLEW_EXT_bindable_uniform’ was not declared in this scope* ‘GLEW_EXT_blend_color’ was not declared in this scope* ‘GLEW_EXT_blend_equation_separate’ was not declared in this scope* ‘GLEW_EXT_blend_func_extended’ was not declared in this scope* ‘GLEW_EXT_blend_func_separate’ was not declared in this scope* ‘GLEW_EXT_blend_logic_op’ was not declared in this scope* ‘GLEW_EXT_blend_minmax’ was not declared in this scope* ‘GLEW_EXT_blend_subtract’ was not declared in this scope* ‘GLEW_EXT_buffer_storage’ was not declared in this scope* ‘GLEW_EXT_clear_texture’ was not declared in this scope* ‘GLEW_EXT_clip_cull_distance’ was not declared in this scope* ‘GLEW_EXT_clip_volume_hint’ was not declared in this scope* ‘GLEW_EXT_cmyka’ was not declared in this scope* ‘GLEW_EXT_color_buffer_float’ was not declared in this scope* ‘GLEW_EXT_color_buffer_half_float’ was not declared in this scope* ‘GLEW_EXT_color_subtable’ was not declared in this scope* ‘GLEW_EXT_compiled_vertex_array’ was not declared in this scope* ‘GLEW_EXT_compressed_ETC1_RGB8_sub_texture’ was not declared in this scope* ‘GLEW_EXT_conservative_depth’ was not declared in this scope* ‘GLEW_EXT_convolution’ was not declared in this scope* ‘GLEW_EXT_coordinate_frame’ was not declared in this scope* ‘GLEW_EXT_copy_image’ was not declared in this scope* ‘GLEW_EXT_copy_texture’ was not declared in this scope* ‘GLEW_EXT_cull_vertex’ was not declared in this scope* ‘GLEW_EXT_debug_label’ was not declared in this scope* ‘GLEW_EXT_debug_marker’ was not declared in this scope* ‘GLEW_EXT_depth_bounds_test’ was not declared in this scope* ‘GLEW_EXT_direct_state_access’ was not declared in this scope* ‘GLEW_EXT_discard_framebuffer’ was not declared in this scope* ‘GLEW_EXT_draw_buffers2’ was not declared in this scope* ‘GLEW_EXT_draw_buffers_indexed’ was not declared in this scope* ‘GLEW_EXT_draw_buffers’ was not declared in this scope* ‘GLEW_EXT_draw_elements_base_vertex’ was not declared in this scope* ‘GLEW_EXT_draw_instanced’ was not declared in this scope* ‘GLEW_EXT_draw_range_elements’ was not declared in this scope* ‘GLEW_EXT_external_buffer’ was not declared in this scope* ‘GLEW_EXT_float_blend’ was not declared in this scope* ‘GLEW_EXT_fog_coord’ was not declared in this scope* ‘GLEW_EXT_frag_depth’ was not declared in this scope* ‘GLEW_EXT_fragment_lighting’ was not declared in this scope* ‘GLEW_EXT_framebuffer_blit’ was not declared in this scope* ‘GLEW_EXT_framebuffer_multisample_blit_scaled’ was not declared in this scope* ‘GLEW_EXT_framebuffer_multisample’ was not declared in this scope* ‘GLEW_EXT_framebuffer_object’ was not declared in this scope* ‘GLEW_EXT_framebuffer_sRGB’ was not declared in this scope* ‘GLEW_EXT_geometry_point_size’ was not declared in this scope* ‘GLEW_EXT_geometry_shader4’ was not declared in this scope* ‘GLEW_EXT_geometry_shader’ was not declared in this scope* ‘GLEW_EXT_gpu_program_parameters’ was not declared in this scope* ‘GLEW_EXT_gpu_shader4’ was not declared in this scope* ‘GLEW_EXT_gpu_shader5’ was not declared in this scope* ‘GLEW_EXT_histogram’ was not declared in this scope* ‘GLEW_EXT_index_array_formats’ was not declared in this scope* ‘GLEW_EXT_index_func’ was not declared in this scope* ‘GLEW_EXT_index_material’ was not declared in this scope* ‘GLEW_EXT_index_texture’ was not declared in this scope* ‘GLEW_EXT_instanced_arrays’ was not declared in this scope* ‘GLEW_EXT_light_texture’ was not declared in this scope* ‘GLEW_EXT_map_buffer_range’ was not declared in this scope* ‘GLEW_EXT_memory_object_fd’ was not declared in this scope* ‘GLEW_EXT_memory_object_win32’ was not declared in this scope* ‘GLEW_EXT_memory_object’ was not declared in this scope* ‘GLEW_EXT_misc_attribute’ was not declared in this scope* ‘GLEW_EXT_multi_draw_arrays’ was not declared in this scope* ‘GLEW_EXT_multi_draw_indirect’ was not declared in this scope* ‘GLEW_EXT_multiple_textures’ was not declared in this scope* ‘GLEW_EXT_multisample_compatibility’ was not declared in this scope* ‘GLEW_EXT_multisampled_render_to_texture2’ was not declared in this scope* ‘GLEW_EXT_multisampled_render_to_texture’ was not declared in this scope* ‘GLEW_EXT_multisample’ was not declared in this scope* ‘GLEW_EXT_multiview_draw_buffers’ was not declared in this scope* ‘GLEW_EXT_packed_depth_stencil’ was not declared in this scope* ‘GLEW_EXT_packed_float’ was not declared in this scope* ‘GLEW_EXT_packed_pixels’ was not declared in this scope* ‘GLEW_EXT_paletted_texture’ was not declared in this scope* ‘GLEW_EXT_pixel_buffer_object’ was not declared in this scope* ‘GLEW_EXT_pixel_transform_color_table’ was not declared in this scope* ‘GLEW_EXT_pixel_transform’ was not declared in this scope* ‘GLEW_EXT_point_parameters’ was not declared in this scope* ‘GLEW_EXT_polygon_offset_clamp’ was not declared in this scope* ‘GLEW_EXT_polygon_offset’ was not declared in this scope* ‘GLEW_EXT_post_depth_coverage’ was not declared in this scope* ‘GLEW_EXT_provoking_vertex’ was not declared in this scope* ‘GLEW_EXT_pvrtc_sRGB’ was not declared in this scope* ‘GLEW_EXT_raster_multisample’ was not declared in this scope* ‘GLEW_EXT_read_format_bgra’ was not declared in this scope* ‘GLEW_EXT_render_snorm’ was not declared in this scope* ‘GLEW_EXT_rescale_normal’ was not declared in this scope* ‘GLEW_EXT_sRGB_write_control’ was not declared in this scope* ‘GLEW_EXT_sRGB’ was not declared in this scope* ‘GLEW_EXT_scene_marker’ was not declared in this scope* ‘GLEW_EXT_secondary_color’ was not declared in this scope* ‘GLEW_EXT_semaphore_fd’ was not declared in this scope* ‘GLEW_EXT_semaphore_win32’ was not declared in this scope* ‘GLEW_EXT_semaphore’ was not declared in this scope* ‘GLEW_EXT_separate_shader_objects’ was not declared in this scope* ‘GLEW_EXT_separate_specular_color’ was not declared in this scope* ‘GLEW_EXT_shader_framebuffer_fetch’ was not declared in this scope* ‘GLEW_EXT_shader_group_vote’ was not declared in this scope* ‘GLEW_EXT_shader_image_load_formatted’ was not declared in this scope* ‘GLEW_EXT_shader_image_load_store’ was not declared in this scope* ‘GLEW_EXT_shader_implicit_conversions’ was not declared in this scope* ‘GLEW_EXT_shader_integer_mix’ was not declared in this scope* ‘GLEW_EXT_shader_io_blocks’ was not declared in this scope* ‘GLEW_EXT_shader_non_constant_global_initializers’ was not declared in this scope* ‘GLEW_EXT_shader_pixel_local_storage2’ was not declared in this scope* ‘GLEW_EXT_shader_pixel_local_storage’ was not declared in this scope* ‘GLEW_EXT_shader_texture_lod’ was not declared in this scope* ‘GLEW_EXT_shadow_funcs’ was not declared in this scope* ‘GLEW_EXT_shadow_samplers’ was not declared in this scope* ‘GLEW_EXT_shared_texture_palette’ was not declared in this scope* ‘GLEW_EXT_sparse_texture2’ was not declared in this scope* ‘GLEW_EXT_sparse_texture’ was not declared in this scope* ‘GLEW_EXT_stencil_clear_tag’ was not declared in this scope* ‘GLEW_EXT_stencil_two_side’ was not declared in this scope* ‘GLEW_EXT_stencil_wrap’ was not declared in this scope* ‘GLEW_EXT_subtexture’ was not declared in this scope* ‘GLEW_EXT_texture3D’ was not declared in this scope* ‘GLEW_EXT_texture_array’ was not declared in this scope* ‘GLEW_EXT_texture_buffer_object’ was not declared in this scope* ‘GLEW_EXT_texture_compression_astc_decode_mode_rgb9e5’ was not declared in this scope* ‘GLEW_EXT_texture_compression_astc_decode_mode’ was not declared in this scope* ‘GLEW_EXT_texture_compression_bptc’ was not declared in this scope* ‘GLEW_EXT_texture_compression_dxt1’ was not declared in this scope* ‘GLEW_EXT_texture_compression_latc’ was not declared in this scope* ‘GLEW_EXT_texture_compression_rgtc’ was not declared in this scope* ‘GLEW_EXT_texture_compression_s3tc’ was not declared in this scope* ‘GLEW_EXT_texture_cube_map_array’ was not declared in this scope* ‘GLEW_EXT_texture_cube_map’ was not declared in this scope* ‘GLEW_EXT_texture_edge_clamp’ was not declared in this scope* ‘GLEW_EXT_texture_env_add’ was not declared in this scope* ‘GLEW_EXT_texture_env_combine’ was not declared in this scope* ‘GLEW_EXT_texture_env_dot3’ was not declared in this scope* ‘GLEW_EXT_texture_env’ was not declared in this scope* ‘GLEW_EXT_texture_filter_anisotropic’ was not declared in this scope* ‘GLEW_EXT_texture_filter_minmax’ was not declared in this scope* ‘GLEW_EXT_texture_format_BGRA8888’ was not declared in this scope* ‘GLEW_EXT_texture_integer’ was not declared in this scope* ‘GLEW_EXT_texture_lod_bias’ was not declared in this scope* ‘GLEW_EXT_texture_mirror_clamp’ was not declared in this scope* ‘GLEW_EXT_texture_norm16’ was not declared in this scope* ‘GLEW_EXT_texture_object’ was not declared in this scope* ‘GLEW_EXT_texture_perturb_normal’ was not declared in this scope* ‘GLEW_EXT_texture_rectangle’ was not declared in this scope* ‘GLEW_EXT_texture_rg’ was not declared in this scope* ‘GLEW_EXT_texture_sRGB_R8’ was not declared in this scope* ‘GLEW_EXT_texture_sRGB_RG8’ was not declared in this scope* ‘GLEW_EXT_texture_sRGB_decode’ was not declared in this scope* ‘GLEW_EXT_texture_sRGB’ was not declared in this scope* ‘GLEW_EXT_texture_shared_exponent’ was not declared in this scope* ‘GLEW_EXT_texture_snorm’ was not declared in this scope* ‘GLEW_EXT_texture_storage’ was not declared in this scope* ‘GLEW_EXT_texture_swizzle’ was not declared in this scope* ‘GLEW_EXT_texture_type_2_10_10_10_REV’ was not declared in this scope* ‘GLEW_EXT_texture_view’ was not declared in this scope* ‘GLEW_EXT_texture’ was not declared in this scope* ‘GLEW_EXT_timer_query’ was not declared in this scope* ‘GLEW_EXT_transform_feedback’ was not declared in this scope* ‘GLEW_EXT_unpack_subimage’ was not declared in this scope* ‘GLEW_EXT_vertex_array_bgra’ was not declared in this scope* ‘GLEW_EXT_vertex_array_setXXX’ was not declared in this scope* ‘GLEW_EXT_vertex_array’ was not declared in this scope* ‘GLEW_EXT_vertex_attrib_64bit’ was not declared in this scope* ‘GLEW_EXT_vertex_shader’ was not declared in this scope* ‘GLEW_EXT_vertex_weighting’ was not declared in this scope* ‘GLEW_EXT_win32_keyed_mutex’ was not declared in this scope* ‘GLEW_EXT_window_rectangles’ was not declared in this scope* ‘GLEW_EXT_x11_sync_object’ was not declared in this scope* ‘GLEW_GET_VAR’ was not declared in this scope* ‘GLEW_GET_FUN’ was not declared in this scope* ‘GLEW_GREMEDY_frame_terminator’ was not declared in this scope* ‘GLEW_GREMEDY_string_marker’ was not declared in this scope* ‘GLEW_HP_convolution_border_modes’ was not declared in this scope* ‘GLEW_HP_image_transform’ was not declared in this scope* ‘GLEW_HP_occlusion_test’ was not declared in this scope* ‘GLEW_HP_texture_lighting’ was not declared in this scope* ‘GLEW_IBM_cull_vertex’ was not declared in this scope* ‘GLEW_IBM_multimode_draw_arrays’ was not declared in this scope* ‘GLEW_IBM_rasterpos_clip’ was not declared in this scope* ‘GLEW_IBM_static_data’ was not declared in this scope* ‘GLEW_IBM_texture_mirrored_repeat’ was not declared in this scope* ‘GLEW_IBM_vertex_array_lists’ was not declared in this scope* ‘GLEW_INGR_color_clamp’ was not declared in this scope* ‘GLEW_INGR_interlace_read’ was not declared in this scope* ‘GLEW_INTEL_conservative_rasterization’ was not declared in this scope* ‘GLEW_INTEL_fragment_shader_ordering’ was not declared in this scope* ‘GLEW_INTEL_framebuffer_CMAA’ was not declared in this scope* ‘GLEW_INTEL_map_texture’ was not declared in this scope* ‘GLEW_INTEL_parallel_arrays’ was not declared in this scope* ‘GLEW_INTEL_performance_query’ was not declared in this scope* ‘GLEW_INTEL_texture_scissor’ was not declared in this scope* ‘GLEW_KHR_blend_equation_advanced_coherent’ was not declared in this scope* ‘GLEW_KHR_blend_equation_advanced’ was not declared in this scope* ‘GLEW_KHR_context_flush_control’ was not declared in this scope* ‘GLEW_KHR_debug’ was not declared in this scope* ‘GLEW_KHR_no_error’ was not declared in this scope* ‘GLEW_KHR_parallel_shader_compile’ was not declared in this scope* ‘GLEW_KHR_robust_buffer_access_behavior’ was not declared in this scope* ‘GLEW_KHR_robustness’ was not declared in this scope* ‘GLEW_KHR_texture_compression_astc_hdr’ was not declared in this scope* ‘GLEW_KHR_texture_compression_astc_ldr’ was not declared in this scope* ‘GLEW_KHR_texture_compression_astc_sliced_3d’ was not declared in this scope* ‘GLEW_KTX_buffer_region’ was not declared in this scope* ‘GLEW_MESAX_texture_stack’ was not declared in this scope* ‘GLEW_MESA_pack_invert’ was not declared in this scope* ‘GLEW_MESA_resize_buffers’ was not declared in this scope* ‘GLEW_MESA_shader_integer_functions’ was not declared in this scope* ‘GLEW_MESA_window_pos’ was not declared in this scope* ‘GLEW_MESA_ycbcr_texture’ was not declared in this scope* ‘GLEW_NO_ERROR’ was not declared in this scope* ‘GLEW_NVX_blend_equation_advanced_multi_draw_buffers’ was not declared in this scope* ‘GLEW_NVX_conditional_render’ was not declared in this scope* ‘GLEW_NVX_gpu_memory_info’ was not declared in this scope* ‘GLEW_NVX_linked_gpu_multicast’ was not declared in this scope* ‘GLEW_NV_3dvision_settings’ was not declared in this scope* ‘GLEW_NV_EGL_stream_consumer_external’ was not declared in this scope* ‘GLEW_NV_alpha_to_coverage_dither_control’ was not declared in this scope* ‘GLEW_NV_bgr’ was not declared in this scope* ‘GLEW_NV_bindless_multi_draw_indirect_count’ was not declared in this scope* ‘GLEW_NV_bindless_multi_draw_indirect’ was not declared in this scope* ‘GLEW_NV_bindless_texture’ was not declared in this scope* ‘GLEW_NV_blend_equation_advanced_coherent’ was not declared in this scope* ‘GLEW_NV_blend_equation_advanced’ was not declared in this scope* ‘GLEW_NV_blend_minmax_factor’ was not declared in this scope* ‘GLEW_NV_blend_square’ was not declared in this scope* ‘GLEW_NV_clip_space_w_scaling’ was not declared in this scope* ‘GLEW_NV_command_list’ was not declared in this scope* ‘GLEW_NV_compute_program5’ was not declared in this scope* ‘GLEW_NV_conditional_render’ was not declared in this scope* ‘GLEW_NV_conservative_raster_dilate’ was not declared in this scope* ‘GLEW_NV_conservative_raster_pre_snap_triangles’ was not declared in this scope* ‘GLEW_NV_conservative_raster’ was not declared in this scope* ‘GLEW_NV_copy_buffer’ was not declared in this scope* ‘GLEW_NV_copy_depth_to_color’ was not declared in this scope* ‘GLEW_NV_copy_image’ was not declared in this scope* ‘GLEW_NV_deep_texture3D’ was not declared in this scope* ‘GLEW_NV_depth_buffer_float’ was not declared in this scope* ‘GLEW_NV_depth_clamp’ was not declared in this scope* ‘GLEW_NV_depth_range_unclamped’ was not declared in this scope* ‘GLEW_NV_draw_buffers’ was not declared in this scope* ‘GLEW_NV_draw_instanced’ was not declared in this scope* ‘GLEW_NV_draw_texture’ was not declared in this scope* ‘GLEW_NV_draw_vulkan_image’ was not declared in this scope* ‘GLEW_NV_evaluators’ was not declared in this scope* ‘GLEW_NV_explicit_attrib_location’ was not declared in this scope* ‘GLEW_NV_explicit_multisample’ was not declared in this scope* ‘GLEW_NV_fbo_color_attachments’ was not declared in this scope* ‘GLEW_NV_fence’ was not declared in this scope* ‘GLEW_NV_fill_rectangle’ was not declared in this scope* ‘GLEW_NV_float_buffer’ was not declared in this scope* ‘GLEW_NV_fog_distance’ was not declared in this scope* ‘GLEW_NV_fragment_coverage_to_color’ was not declared in this scope* ‘GLEW_NV_fragment_program2’ was not declared in this scope* ‘GLEW_NV_fragment_program4’ was not declared in this scope* ‘GLEW_NV_fragment_program_option’ was not declared in this scope* ‘GLEW_NV_fragment_program’ was not declared in this scope* ‘GLEW_NV_fragment_shader_interlock’ was not declared in this scope* ‘GLEW_NV_framebuffer_blit’ was not declared in this scope* ‘GLEW_NV_framebuffer_mixed_samples’ was not declared in this scope* ‘GLEW_NV_framebuffer_multisample_coverage’ was not declared in this scope* ‘GLEW_NV_framebuffer_multisample’ was not declared in this scope* ‘GLEW_NV_generate_mipmap_sRGB’ was not declared in this scope* ‘GLEW_NV_geometry_program4’ was not declared in this scope* ‘GLEW_NV_geometry_shader4’ was not declared in this scope* ‘GLEW_NV_geometry_shader_passthrough’ was not declared in this scope* ‘GLEW_NV_gpu_multicast’ was not declared in this scope* ‘GLEW_NV_gpu_program4’ was not declared in this scope* ‘GLEW_NV_gpu_program5_mem_extended’ was not declared in this scope* ‘GLEW_NV_gpu_program5’ was not declared in this scope* ‘GLEW_NV_gpu_program_fp64’ was not declared in this scope* ‘GLEW_NV_gpu_shader5’ was not declared in this scope* ‘GLEW_NV_half_float’ was not declared in this scope* ‘GLEW_NV_image_formats’ was not declared in this scope* ‘GLEW_NV_instanced_arrays’ was not declared in this scope* ‘GLEW_NV_internalformat_sample_query’ was not declared in this scope* ‘GLEW_NV_light_max_exponent’ was not declared in this scope* ‘GLEW_NV_multisample_coverage’ was not declared in this scope* ‘GLEW_NV_multisample_filter_hint’ was not declared in this scope* ‘GLEW_NV_non_square_matrices’ was not declared in this scope* ‘GLEW_NV_occlusion_query’ was not declared in this scope* ‘GLEW_NV_pack_subimage’ was not declared in this scope* ‘GLEW_NV_packed_depth_stencil’ was not declared in this scope* ‘GLEW_NV_packed_float_linear’ was not declared in this scope* ‘GLEW_NV_packed_float’ was not declared in this scope* ‘GLEW_NV_parameter_buffer_object2’ was not declared in this scope* ‘GLEW_NV_parameter_buffer_object’ was not declared in this scope* ‘GLEW_NV_path_rendering_shared_edge’ was not declared in this scope* ‘GLEW_NV_path_rendering’ was not declared in this scope* ‘GLEW_NV_pixel_buffer_object’ was not declared in this scope* ‘GLEW_NV_pixel_data_range’ was not declared in this scope* ‘GLEW_NV_platform_binary’ was not declared in this scope* ‘GLEW_NV_point_sprite’ was not declared in this scope* ‘GLEW_NV_polygon_mode’ was not declared in this scope* ‘GLEW_NV_present_video’ was not declared in this scope* ‘GLEW_NV_primitive_restart’ was not declared in this scope* ‘GLEW_NV_read_depth_stencil’ was not declared in this scope* ‘GLEW_NV_read_depth’ was not declared in this scope* ‘GLEW_NV_read_stencil’ was not declared in this scope* ‘GLEW_NV_register_combiners2’ was not declared in this scope* ‘GLEW_NV_register_combiners’ was not declared in this scope* ‘GLEW_NV_robustness_video_memory_purge’ was not declared in this scope* ‘GLEW_NV_sRGB_formats’ was not declared in this scope* ‘GLEW_NV_sample_locations’ was not declared in this scope* ‘GLEW_NV_sample_mask_override_coverage’ was not declared in this scope* ‘GLEW_NV_shader_atomic_counters’ was not declared in this scope* ‘GLEW_NV_shader_atomic_float64’ was not declared in this scope* ‘GLEW_NV_shader_atomic_float’ was not declared in this scope* ‘GLEW_NV_shader_atomic_fp16_vector’ was not declared in this scope* ‘GLEW_NV_shader_atomic_int64’ was not declared in this scope* ‘GLEW_NV_shader_buffer_load’ was not declared in this scope* ‘GLEW_NV_shader_noperspective_interpolation’ was not declared in this scope* ‘GLEW_NV_shader_storage_buffer_object’ was not declared in this scope* ‘GLEW_NV_shader_thread_group’ was not declared in this scope* ‘GLEW_NV_shader_thread_shuffle’ was not declared in this scope* ‘GLEW_NV_shadow_samplers_array’ was not declared in this scope* ‘GLEW_NV_shadow_samplers_cube’ was not declared in this scope* ‘GLEW_NV_stereo_view_rendering’ was not declared in this scope* ‘GLEW_NV_tessellation_program5’ was not declared in this scope* ‘GLEW_NV_texgen_emboss’ was not declared in this scope* ‘GLEW_NV_texgen_reflection’ was not declared in this scope* ‘GLEW_NV_texture_array’ was not declared in this scope* ‘GLEW_NV_texture_barrier’ was not declared in this scope* ‘GLEW_NV_texture_border_clamp’ was not declared in this scope* ‘GLEW_NV_texture_compression_latc’ was not declared in this scope* ‘GLEW_NV_texture_compression_s3tc_update’ was not declared in this scope* ‘GLEW_NV_texture_compression_s3tc’ was not declared in this scope* ‘GLEW_NV_texture_compression_vtc’ was not declared in this scope* ‘GLEW_NV_texture_env_combine4’ was not declared in this scope* ‘GLEW_NV_texture_expand_normal’ was not declared in this scope* ‘GLEW_NV_texture_multisample’ was not declared in this scope* ‘GLEW_NV_texture_npot_2D_mipmap’ was not declared in this scope* ‘GLEW_NV_texture_rectangle_compressed’ was not declared in this scope* ‘GLEW_NV_texture_rectangle’ was not declared in this scope* ‘GLEW_NV_texture_shader2’ was not declared in this scope* ‘GLEW_NV_texture_shader3’ was not declared in this scope* ‘GLEW_NV_texture_shader’ was not declared in this scope* ‘GLEW_NV_transform_feedback2’ was not declared in this scope* ‘GLEW_NV_transform_feedback’ was not declared in this scope* ‘GLEW_NV_uniform_buffer_unified_memory’ was not declared in this scope* ‘GLEW_NV_vdpau_interop’ was not declared in this scope* ‘GLEW_NV_vertex_array_range2’ was not declared in this scope* ‘GLEW_NV_vertex_array_range’ was not declared in this scope* ‘GLEW_NV_vertex_attrib_integer_64bit’ was not declared in this scope* ‘GLEW_NV_vertex_buffer_unified_memory’ was not declared in this scope* ‘GLEW_NV_vertex_program1_1’ was not declared in this scope* ‘GLEW_NV_vertex_program2_option’ was not declared in this scope* ‘GLEW_NV_vertex_program2’ was not declared in this scope* ‘GLEW_NV_vertex_program3’ was not declared in this scope* ‘GLEW_NV_vertex_program4’ was not declared in this scope* ‘GLEW_NV_vertex_program’ was not declared in this scope* ‘GLEW_NV_video_capture’ was not declared in this scope* ‘GLEW_NV_viewport_array2’ was not declared in this scope* ‘GLEW_NV_viewport_array’ was not declared in this scope* ‘GLEW_NV_viewport_swizzle’ was not declared in this scope* ‘GLEW_OES_byte_coordinates’ was not declared in this scope* ‘GLEW_OK’ was not declared in this scope; did you mean ‘W_OK’?* ‘GLEW_OML_interlace’ was not declared in this scope* ‘GLEW_OML_resample’ was not declared in this scope* ‘GLEW_OML_subsample’ was not declared in this scope* ‘GLEW_OVR_multiview2’ was not declared in this scope* ‘GLEW_OVR_multiview_multisampled_render_to_texture’ was not declared in this scope* ‘GLEW_OVR_multiview’ was not declared in this scope* ‘GLEW_PGI_misc_hints’ was not declared in this scope* ‘GLEW_PGI_vertex_hints’ was not declared in this scope* ‘GLEW_QCOM_alpha_test’ was not declared in this scope* ‘GLEW_QCOM_binning_control’ was not declared in this scope* ‘GLEW_QCOM_driver_control’ was not declared in this scope* ‘GLEW_QCOM_extended_get2’ was not declared in this scope* ‘GLEW_QCOM_extended_get’ was not declared in this scope* ‘GLEW_QCOM_framebuffer_foveated’ was not declared in this scope* ‘GLEW_QCOM_perfmon_global_mode’ was not declared in this scope* ‘GLEW_QCOM_shader_framebuffer_fetch_noncoherent’ was not declared in this scope* ‘GLEW_QCOM_tiled_rendering’ was not declared in this scope* ‘GLEW_QCOM_writeonly_rendering’ was not declared in this scope* ‘GLEW_REGAL_ES1_0_compatibility’ was not declared in this scope* ‘GLEW_REGAL_ES1_1_compatibility’ was not declared in this scope* ‘GLEW_REGAL_enable’ was not declared in this scope* ‘GLEW_REGAL_error_string’ was not declared in this scope* ‘GLEW_REGAL_extension_query’ was not declared in this scope* ‘GLEW_REGAL_log’ was not declared in this scope* ‘GLEW_REGAL_proc_address’ was not declared in this scope* ‘GLEW_REND_screen_coordinates’ was not declared in this scope* ‘GLEW_S3_s3tc’ was not declared in this scope* ‘GLEW_SGIS_clip_band_hint’ was not declared in this scope* ‘GLEW_SGIS_color_range’ was not declared in this scope* ‘GLEW_SGIS_detail_texture’ was not declared in this scope* ‘GLEW_SGIS_fog_function’ was not declared in this scope* ‘GLEW_SGIS_generate_mipmap’ was not declared in this scope* ‘GLEW_SGIS_line_texgen’ was not declared in this scope* ‘GLEW_SGIS_multisample’ was not declared in this scope* ‘GLEW_SGIS_multitexture’ was not declared in this scope* ‘GLEW_SGIS_pixel_texture’ was not declared in this scope* ‘GLEW_SGIS_point_line_texgen’ was not declared in this scope* ‘GLEW_SGIS_shared_multisample’ was not declared in this scope* ‘GLEW_SGIS_sharpen_texture’ was not declared in this scope* ‘GLEW_SGIS_texture4D’ was not declared in this scope* ‘GLEW_SGIS_texture_border_clamp’ was not declared in this scope* ‘GLEW_SGIS_texture_edge_clamp’ was not declared in this scope* ‘GLEW_SGIS_texture_filter4’ was not declared in this scope* ‘GLEW_SGIS_texture_lod’ was not declared in this scope* ‘GLEW_SGIS_texture_select’ was not declared in this scope* ‘GLEW_SGIX_async_histogram’ was not declared in this scope* ‘GLEW_SGIX_async_pixel’ was not declared in this scope* ‘GLEW_SGIX_async’ was not declared in this scope* ‘GLEW_SGIX_bali_g_instruments’ was not declared in this scope* ‘GLEW_SGIX_bali_r_instruments’ was not declared in this scope* ‘GLEW_SGIX_bali_timer_instruments’ was not declared in this scope* ‘GLEW_SGIX_blend_alpha_minmax’ was not declared in this scope* ‘GLEW_SGIX_blend_cadd’ was not declared in this scope* ‘GLEW_SGIX_blend_cmultiply’ was not declared in this scope* ‘GLEW_SGIX_calligraphic_fragment’ was not declared in this scope* ‘GLEW_SGIX_clipmap’ was not declared in this scope* ‘GLEW_SGIX_color_matrix_accuracy’ was not declared in this scope* ‘GLEW_SGIX_color_table_index_mode’ was not declared in this scope* ‘GLEW_SGIX_complex_polar’ was not declared in this scope* ‘GLEW_SGIX_convolution_accuracy’ was not declared in this scope* ‘GLEW_SGIX_cube_map’ was not declared in this scope* ‘GLEW_SGIX_cylinder_texgen’ was not declared in this scope* ‘GLEW_SGIX_datapipe’ was not declared in this scope* ‘GLEW_SGIX_decimation’ was not declared in this scope* ‘GLEW_SGIX_depth_pass_instrument’ was not declared in this scope* ‘GLEW_SGIX_depth_texture’ was not declared in this scope* ‘GLEW_SGIX_dvc’ was not declared in this scope* ‘GLEW_SGIX_flush_raster’ was not declared in this scope* ‘GLEW_SGIX_fog_blend’ was not declared in this scope* ‘GLEW_SGIX_fog_factor_to_alpha’ was not declared in this scope* ‘GLEW_SGIX_fog_layers’ was not declared in this scope* ‘GLEW_SGIX_fog_offset’ was not declared in this scope* ‘GLEW_SGIX_fog_patchy’ was not declared in this scope* ‘GLEW_SGIX_fog_scale’ was not declared in this scope* ‘GLEW_SGIX_fog_texture’ was not declared in this scope* ‘GLEW_SGIX_fragment_lighting_space’ was not declared in this scope* ‘GLEW_SGIX_fragment_specular_lighting’ was not declared in this scope* ‘GLEW_SGIX_fragments_instrument’ was not declared in this scope* ‘GLEW_SGIX_framezoom’ was not declared in this scope* ‘GLEW_SGIX_icc_texture’ was not declared in this scope* ‘GLEW_SGIX_igloo_interface’ was not declared in this scope* ‘GLEW_SGIX_image_compression’ was not declared in this scope* ‘GLEW_SGIX_impact_pixel_texture’ was not declared in this scope* ‘GLEW_SGIX_instrument_error’ was not declared in this scope* ‘GLEW_SGIX_interlace’ was not declared in this scope* ‘GLEW_SGIX_ir_instrument1’ was not declared in this scope* ‘GLEW_SGIX_line_quality_hint’ was not declared in this scope* ‘GLEW_SGIX_list_priority’ was not declared in this scope* ‘GLEW_SGIX_mpeg1’ was not declared in this scope* ‘GLEW_SGIX_mpeg2’ was not declared in this scope* ‘GLEW_SGIX_nonlinear_lighting_pervertex’ was not declared in this scope* ‘GLEW_SGIX_nurbs_eval’ was not declared in this scope* ‘GLEW_SGIX_occlusion_instrument’ was not declared in this scope* ‘GLEW_SGIX_packed_6bytes’ was not declared in this scope* ‘GLEW_SGIX_pixel_texture_bits’ was not declared in this scope* ‘GLEW_SGIX_pixel_texture_lod’ was not declared in this scope* ‘GLEW_SGIX_pixel_texture’ was not declared in this scope* ‘GLEW_SGIX_pixel_tiles’ was not declared in this scope* ‘GLEW_SGIX_polynomial_ffd’ was not declared in this scope* ‘GLEW_SGIX_quad_mesh’ was not declared in this scope* ‘GLEW_SGIX_reference_plane’ was not declared in this scope* ‘GLEW_SGIX_resample’ was not declared in this scope* ‘GLEW_SGIX_scalebias_hint’ was not declared in this scope* ‘GLEW_SGIX_shadow_ambient’ was not declared in this scope* ‘GLEW_SGIX_shadow’ was not declared in this scope* ‘GLEW_SGIX_slim’ was not declared in this scope* ‘GLEW_SGIX_spotlight_cutoff’ was not declared in this scope* ‘GLEW_SGIX_sprite’ was not declared in this scope* ‘GLEW_SGIX_subdiv_patch’ was not declared in this scope* ‘GLEW_SGIX_subsample’ was not declared in this scope* ‘GLEW_SGIX_tag_sample_buffer’ was not declared in this scope* ‘GLEW_SGIX_texture_add_env’ was not declared in this scope* ‘GLEW_SGIX_texture_coordinate_clamp’ was not declared in this scope* ‘GLEW_SGIX_texture_lod_bias’ was not declared in this scope* ‘GLEW_SGIX_texture_mipmap_anisotropic’ was not declared in this scope* ‘GLEW_SGIX_texture_multi_buffer’ was not declared in this scope* ‘GLEW_SGIX_texture_phase’ was not declared in this scope* ‘GLEW_SGIX_texture_range’ was not declared in this scope* ‘GLEW_SGIX_texture_scale_bias’ was not declared in this scope* ‘GLEW_SGIX_texture_supersample’ was not declared in this scope* ‘GLEW_SGIX_vector_ops’ was not declared in this scope* ‘GLEW_SGIX_vertex_array_object’ was not declared in this scope* ‘GLEW_SGIX_vertex_preclip_hint’ was not declared in this scope* ‘GLEW_SGIX_vertex_preclip’ was not declared in this scope* ‘GLEW_SGIX_ycrcb_subsample’ was not declared in this scope* ‘GLEW_SGIX_ycrcba’ was not declared in this scope* ‘GLEW_SGIX_ycrcb’ was not declared in this scope* ‘GLEW_SGI_color_matrix’ was not declared in this scope* ‘GLEW_SGI_color_table’ was not declared in this scope* ‘GLEW_SGI_complex_type’ was not declared in this scope* ‘GLEW_SGI_complex’ was not declared in this scope* ‘GLEW_SGI_fft’ was not declared in this scope* ‘GLEW_SGI_texture_color_table’ was not declared in this scope* ‘GLEW_SUNX_constant_data’ was not declared in this scope* ‘GLEW_SUN_convolution_border_modes’ was not declared in this scope* ‘GLEW_SUN_global_alpha’ was not declared in this scope* ‘GLEW_SUN_mesh_array’ was not declared in this scope* ‘GLEW_SUN_read_video_pixels’ was not declared in this scope* ‘GLEW_SUN_slice_accum’ was not declared in this scope* ‘GLEW_SUN_triangle_list’ was not declared in this scope* ‘GLEW_SUN_vertex’ was not declared in this scope* ‘GLEW_VERSION_1_1’ was not declared in this scope* ‘GLEW_VERSION_1_2_1’ was not declared in this scope* ‘GLEW_VERSION_1_2’ was not declared in this scope* ‘GLEW_VERSION_1_3’ was not declared in this scope* ‘GLEW_VERSION_1_4’ was not declared in this scope* ‘GLEW_VERSION_1_5’ was not declared in this scope* ‘GLEW_VERSION_2_0’ was not declared in this scope* ‘GLEW_VERSION_2_1’ was not declared in this scope* ‘GLEW_VERSION_3_0’ was not declared in this scope* ‘GLEW_VERSION_3_1’ was not declared in this scope* ‘GLEW_VERSION_3_2’ was not declared in this scope* ‘GLEW_VERSION_3_3’ was not declared in this scope* ‘GLEW_VERSION_4_0’ was not declared in this scope* ‘GLEW_VERSION_4_1’ was not declared in this scope* ‘GLEW_VERSION_4_2’ was not declared in this scope* ‘GLEW_VERSION_4_3’ was not declared in this scope* ‘GLEW_VERSION_4_4’ was not declared in this scope* ‘GLEW_VERSION_4_5’ was not declared in this scope* ‘GLEW_VERSION_4_6’ was not declared in this scope* ‘GLEW_VERSION_MAJOR’ was not declared in this scope; did you mean ‘TBB_VERSION_MAJOR’?* ‘GLEW_VERSION_MICRO’ was not declared in this scope; did you mean ‘TBB_VERSION_MINOR’?* ‘GLEW_VERSION_MINOR’ was not declared in this scope; did you mean ‘TBB_VERSION_MINOR’?* ‘GLEW_VERSION’ was not declared in this scope; did you mean ‘PSTL_VERSION’?* ‘GLEW_WIN_phong_shading’ was not declared in this scope* ‘GLEW_WIN_scene_markerXXX’ was not declared in this scope* ‘GLEW_WIN_specular_fog’ was not declared in this scope* ‘GLEW_WIN_swap_hint’ was not declared in this scope + +C++ Error Strings (Windows): +* E1696        cannot open source file “pxr/imaging/glf/glew.h”* E0020        identifier “glewIsSupported” is undefined* E0020        identifier “GlfGlewInit” is undefined* C1083        Cannot open include file: ‘pxr/imaging/glf/glew.h’: No such file or directory* C3861        ‘glewIsSupported’: identifier not found* C3861        ‘GlfGlewInit’: identifier not found* E0020        identifier “GLEW_3DFX_multisample” is undefined* E0020        identifier “GLEW_3DFX_tbuffer” is undefined* E0020        identifier “GLEW_3DFX_texture_compression_FXT1” is undefined* E0020        identifier “GLEW_AMD_blend_minmax_factor” is undefined* E0020        identifier “GLEW_AMD_compressed_3DC_texture” is undefined* E0020        identifier “GLEW_AMD_compressed_ATC_texture” is undefined* E0020        identifier “GLEW_AMD_conservative_depth” is undefined* E0020        identifier “GLEW_AMD_debug_output” is undefined* E0020        identifier “GLEW_AMD_depth_clamp_separate” is undefined* E0020        identifier “GLEW_AMD_draw_buffers_blend” is undefined* E0020        identifier “GLEW_AMD_framebuffer_sample_positions” is undefined* E0020        identifier “GLEW_AMD_gcn_shader” is undefined* E0020        identifier “GLEW_AMD_gpu_shader_half_float” is undefined* E0020        identifier “GLEW_AMD_gpu_shader_int16” is undefined* E0020        identifier “GLEW_AMD_gpu_shader_int64” is undefined* E0020        identifier “GLEW_AMD_interleaved_elements” is undefined* E0020        identifier “GLEW_AMD_multi_draw_indirect” is undefined* E0020        identifier “GLEW_AMD_name_gen_delete” is undefined* E0020        identifier “GLEW_AMD_occlusion_query_event” is undefined* E0020        identifier “GLEW_AMD_performance_monitor” is undefined* E0020        identifier “GLEW_AMD_pinned_memory” is undefined* E0020        identifier “GLEW_AMD_program_binary_Z400” is undefined* E0020        identifier “GLEW_AMD_query_buffer_object” is undefined* E0020        identifier “GLEW_AMD_sample_positions” is undefined* E0020        identifier “GLEW_AMD_seamless_cubemap_per_texture” is undefined* E0020        identifier “GLEW_AMD_shader_atomic_counter_ops” is undefined* E0020        identifier “GLEW_AMD_shader_ballot” is undefined* E0020        identifier “GLEW_AMD_shader_explicit_vertex_parameter” is undefined* E0020        identifier “GLEW_AMD_shader_stencil_export” is undefined* E0020        identifier “GLEW_AMD_shader_stencil_value_export” is undefined* E0020        identifier “GLEW_AMD_shader_trinary_minmax” is undefined* E0020        identifier “GLEW_AMD_sparse_texture” is undefined* E0020        identifier “GLEW_AMD_stencil_operation_extended” is undefined* E0020        identifier “GLEW_AMD_texture_gather_bias_lod” is undefined* E0020        identifier “GLEW_AMD_texture_texture4” is undefined* E0020        identifier “GLEW_AMD_transform_feedback3_lines_triangles” is undefined* E0020        identifier “GLEW_AMD_transform_feedback4” is undefined* E0020        identifier “GLEW_AMD_vertex_shader_layer” is undefined* E0020        identifier “GLEW_AMD_vertex_shader_tessellator” is undefined* E0020        identifier “GLEW_AMD_vertex_shader_viewport_index” is undefined* E0020        identifier “GLEW_ANDROID_extension_pack_es31a” is undefined* E0020        identifier “GLEW_ANGLE_depth_texture” is undefined* E0020        identifier “GLEW_ANGLE_framebuffer_blit” is undefined* E0020        identifier “GLEW_ANGLE_framebuffer_multisample” is undefined* E0020        identifier “GLEW_ANGLE_instanced_arrays” is undefined* E0020        identifier “GLEW_ANGLE_pack_reverse_row_order” is undefined* E0020        identifier “GLEW_ANGLE_program_binary” is undefined* E0020        identifier “GLEW_ANGLE_texture_compression_dxt1” is undefined* E0020        identifier “GLEW_ANGLE_texture_compression_dxt3” is undefined* E0020        identifier “GLEW_ANGLE_texture_compression_dxt5” is undefined* E0020        identifier “GLEW_ANGLE_texture_usage” is undefined* E0020        identifier “GLEW_ANGLE_timer_query” is undefined* E0020        identifier “GLEW_ANGLE_translated_shader_source” is undefined* E0020        identifier “GLEW_APPLE_aux_depth_stencil” is undefined* E0020        identifier “GLEW_APPLE_client_storage” is undefined* E0020        identifier “GLEW_APPLE_clip_distance” is undefined* E0020        identifier “GLEW_APPLE_color_buffer_packed_float” is undefined* E0020        identifier “GLEW_APPLE_copy_texture_levels” is undefined* E0020        identifier “GLEW_APPLE_element_array” is undefined* E0020        identifier “GLEW_APPLE_fence” is undefined* E0020        identifier “GLEW_APPLE_float_pixels” is undefined* E0020        identifier “GLEW_APPLE_flush_buffer_range” is undefined* E0020        identifier “GLEW_APPLE_framebuffer_multisample” is undefined* E0020        identifier “GLEW_APPLE_object_purgeable” is undefined* E0020        identifier “GLEW_APPLE_pixel_buffer” is undefined* E0020        identifier “GLEW_APPLE_rgb_422” is undefined* E0020        identifier “GLEW_APPLE_row_bytes” is undefined* E0020        identifier “GLEW_APPLE_specular_vector” is undefined* E0020        identifier “GLEW_APPLE_sync” is undefined* E0020        identifier “GLEW_APPLE_texture_2D_limited_npot” is undefined* E0020        identifier “GLEW_APPLE_texture_format_BGRA8888” is undefined* E0020        identifier “GLEW_APPLE_texture_max_level” is undefined* E0020        identifier “GLEW_APPLE_texture_packed_float” is undefined* E0020        identifier “GLEW_APPLE_texture_range” is undefined* E0020        identifier “GLEW_APPLE_transform_hint” is undefined* E0020        identifier “GLEW_APPLE_vertex_array_object” is undefined* E0020        identifier “GLEW_APPLE_vertex_array_range” is undefined* E0020        identifier “GLEW_APPLE_vertex_program_evaluators” is undefined* E0020        identifier “GLEW_APPLE_ycbcr_422” is undefined* E0020        identifier “GLEW_ARB_arrays_of_arrays” is undefined* E0020        identifier “GLEW_ARB_base_instance” is undefined* E0020        identifier “GLEW_ARB_bindless_texture” is undefined* E0020        identifier “GLEW_ARB_blend_func_extended” is undefined* E0020        identifier “GLEW_ARB_buffer_storage” is undefined* E0020        identifier “GLEW_ARB_cl_event” is undefined* E0020        identifier “GLEW_ARB_clear_buffer_object” is undefined* E0020        identifier “GLEW_ARB_clear_texture” is undefined* E0020        identifier “GLEW_ARB_clip_control” is undefined* E0020        identifier “GLEW_ARB_color_buffer_float” is undefined* E0020        identifier “GLEW_ARB_compatibility” is undefined* E0020        identifier “GLEW_ARB_compressed_texture_pixel_storage” is undefined* E0020        identifier “GLEW_ARB_compute_shader” is undefined* E0020        identifier “GLEW_ARB_compute_variable_group_size” is undefined* E0020        identifier “GLEW_ARB_conditional_render_inverted” is undefined* E0020        identifier “GLEW_ARB_conservative_depth” is undefined* E0020        identifier “GLEW_ARB_copy_buffer” is undefined* E0020        identifier “GLEW_ARB_copy_image” is undefined* E0020        identifier “GLEW_ARB_cull_distance” is undefined* E0020        identifier “GLEW_ARB_debug_output” is undefined* E0020        identifier “GLEW_ARB_depth_buffer_float” is undefined* E0020        identifier “GLEW_ARB_depth_clamp” is undefined* E0020        identifier “GLEW_ARB_depth_texture” is undefined* E0020        identifier “GLEW_ARB_derivative_control” is undefined* E0020        identifier “GLEW_ARB_direct_state_access” is undefined* E0020        identifier “GLEW_ARB_draw_buffers” is undefined* E0020        identifier “GLEW_ARB_draw_buffers_blend” is undefined* E0020        identifier “GLEW_ARB_draw_elements_base_vertex” is undefined* E0020        identifier “GLEW_ARB_draw_indirect” is undefined* E0020        identifier “GLEW_ARB_draw_instanced” is undefined* E0020        identifier “GLEW_ARB_enhanced_layouts” is undefined* E0020        identifier “GLEW_ARB_ES2_compatibility” is undefined* E0020        identifier “GLEW_ARB_ES3_1_compatibility” is undefined* E0020        identifier “GLEW_ARB_ES3_2_compatibility” is undefined* E0020        identifier “GLEW_ARB_ES3_compatibility” is undefined* E0020        identifier “GLEW_ARB_explicit_attrib_location” is undefined* E0020        identifier “GLEW_ARB_explicit_uniform_location” is undefined* E0020        identifier “GLEW_ARB_fragment_coord_conventions” is undefined* E0020        identifier “GLEW_ARB_fragment_layer_viewport” is undefined* E0020        identifier “GLEW_ARB_fragment_program” is undefined* E0020        identifier “GLEW_ARB_fragment_program_shadow” is undefined* E0020        identifier “GLEW_ARB_fragment_shader” is undefined* E0020        identifier “GLEW_ARB_fragment_shader_interlock” is undefined* E0020        identifier “GLEW_ARB_framebuffer_no_attachments” is undefined* E0020        identifier “GLEW_ARB_framebuffer_object” is undefined* E0020        identifier “GLEW_ARB_framebuffer_sRGB” is undefined* E0020        identifier “GLEW_ARB_geometry_shader4” is undefined* E0020        identifier “GLEW_ARB_get_program_binary” is undefined* E0020        identifier “GLEW_ARB_get_texture_sub_image” is undefined* E0020        identifier “GLEW_ARB_gl_spirv” is undefined* E0020        identifier “GLEW_ARB_gpu_shader5” is undefined* E0020        identifier “GLEW_ARB_gpu_shader_fp64” is undefined* E0020        identifier “GLEW_ARB_gpu_shader_int64” is undefined* E0020        identifier “GLEW_ARB_half_float_pixel” is undefined* E0020        identifier “GLEW_ARB_half_float_vertex” is undefined* E0020        identifier “GLEW_ARB_imaging” is undefined* E0020        identifier “GLEW_ARB_indirect_parameters” is undefined* E0020        identifier “GLEW_ARB_instanced_arrays” is undefined* E0020        identifier “GLEW_ARB_internalformat_query2” is undefined* E0020        identifier “GLEW_ARB_internalformat_query” is undefined* E0020        identifier “GLEW_ARB_invalidate_subdata” is undefined* E0020        identifier “GLEW_ARB_map_buffer_alignment” is undefined* E0020        identifier “GLEW_ARB_map_buffer_range” is undefined* E0020        identifier “GLEW_ARB_matrix_palette” is undefined* E0020        identifier “GLEW_ARB_multi_bind” is undefined* E0020        identifier “GLEW_ARB_multi_draw_indirect” is undefined* E0020        identifier “GLEW_ARB_multisample” is undefined* E0020        identifier “GLEW_ARB_multitexture” is undefined* E0020        identifier “GLEW_ARB_occlusion_query2” is undefined* E0020        identifier “GLEW_ARB_occlusion_query” is undefined* E0020        identifier “GLEW_ARB_parallel_shader_compile” is undefined* E0020        identifier “GLEW_ARB_pipeline_statistics_query” is undefined* E0020        identifier “GLEW_ARB_pixel_buffer_object” is undefined* E0020        identifier “GLEW_ARB_point_parameters” is undefined* E0020        identifier “GLEW_ARB_point_sprite” is undefined* E0020        identifier “GLEW_ARB_polygon_offset_clamp” is undefined* E0020        identifier “GLEW_ARB_post_depth_coverage” is undefined* E0020        identifier “GLEW_ARB_program_interface_query” is undefined* E0020        identifier “GLEW_ARB_provoking_vertex” is undefined* E0020        identifier “GLEW_ARB_query_buffer_object” is undefined* E0020        identifier “GLEW_ARB_robust_buffer_access_behavior” is undefined* E0020        identifier “GLEW_ARB_robustness” is undefined* E0020        identifier “GLEW_ARB_robustness_application_isolation” is undefined* E0020        identifier “GLEW_ARB_robustness_share_group_isolation” is undefined* E0020        identifier “GLEW_ARB_sample_locations” is undefined* E0020        identifier “GLEW_ARB_sample_shading” is undefined* E0020        identifier “GLEW_ARB_sampler_objects” is undefined* E0020        identifier “GLEW_ARB_seamless_cube_map” is undefined* E0020        identifier “GLEW_ARB_seamless_cubemap_per_texture” is undefined* E0020        identifier “GLEW_ARB_separate_shader_objects” is undefined* E0020        identifier “GLEW_ARB_shader_atomic_counter_ops” is undefined* E0020        identifier “GLEW_ARB_shader_atomic_counters” is undefined* E0020        identifier “GLEW_ARB_shader_ballot” is undefined* E0020        identifier “GLEW_ARB_shader_bit_encoding” is undefined* E0020        identifier “GLEW_ARB_shader_clock” is undefined* E0020        identifier “GLEW_ARB_shader_draw_parameters” is undefined* E0020        identifier “GLEW_ARB_shader_group_vote” is undefined* E0020        identifier “GLEW_ARB_shader_image_load_store” is undefined* E0020        identifier “GLEW_ARB_shader_image_size” is undefined* E0020        identifier “GLEW_ARB_shader_objects” is undefined* E0020        identifier “GLEW_ARB_shader_precision” is undefined* E0020        identifier “GLEW_ARB_shader_stencil_export” is undefined* E0020        identifier “GLEW_ARB_shader_storage_buffer_object” is undefined* E0020        identifier “GLEW_ARB_shader_subroutine” is undefined* E0020        identifier “GLEW_ARB_shader_texture_image_samples” is undefined* E0020        identifier “GLEW_ARB_shader_texture_lod” is undefined* E0020        identifier “GLEW_ARB_shader_viewport_layer_array” is undefined* E0020        identifier “GLEW_ARB_shading_language_100” is undefined* E0020        identifier “GLEW_ARB_shading_language_420pack” is undefined* E0020        identifier “GLEW_ARB_shading_language_include” is undefined* E0020        identifier “GLEW_ARB_shading_language_packing” is undefined* E0020        identifier “GLEW_ARB_shadow” is undefined* E0020        identifier “GLEW_ARB_shadow_ambient” is undefined* E0020        identifier “GLEW_ARB_sparse_buffer” is undefined* E0020        identifier “GLEW_ARB_sparse_texture2” is undefined* E0020        identifier “GLEW_ARB_sparse_texture” is undefined* E0020        identifier “GLEW_ARB_sparse_texture_clamp” is undefined* E0020        identifier “GLEW_ARB_spirv_extensions” is undefined* E0020        identifier “GLEW_ARB_stencil_texturing” is undefined* E0020        identifier “GLEW_ARB_sync” is undefined* E0020        identifier “GLEW_ARB_tessellation_shader” is undefined* E0020        identifier “GLEW_ARB_texture_barrier” is undefined* E0020        identifier “GLEW_ARB_texture_border_clamp” is undefined* E0020        identifier “GLEW_ARB_texture_buffer_object” is undefined* E0020        identifier “GLEW_ARB_texture_buffer_object_rgb32” is undefined* E0020        identifier “GLEW_ARB_texture_buffer_range” is undefined* E0020        identifier “GLEW_ARB_texture_compression” is undefined* E0020        identifier “GLEW_ARB_texture_compression_bptc” is undefined* E0020        identifier “GLEW_ARB_texture_compression_rgtc” is undefined* E0020        identifier “GLEW_ARB_texture_cube_map” is undefined* E0020        identifier “GLEW_ARB_texture_cube_map_array” is undefined* E0020        identifier “GLEW_ARB_texture_env_add” is undefined* E0020        identifier “GLEW_ARB_texture_env_combine” is undefined* E0020        identifier “GLEW_ARB_texture_env_crossbar” is undefined* E0020        identifier “GLEW_ARB_texture_env_dot3” is undefined* E0020        identifier “GLEW_ARB_texture_filter_anisotropic” is undefined* E0020        identifier “GLEW_ARB_texture_filter_minmax” is undefined* E0020        identifier “GLEW_ARB_texture_float” is undefined* E0020        identifier “GLEW_ARB_texture_gather” is undefined* E0020        identifier “GLEW_ARB_texture_mirror_clamp_to_edge” is undefined* E0020        identifier “GLEW_ARB_texture_mirrored_repeat” is undefined* E0020        identifier “GLEW_ARB_texture_multisample” is undefined* E0020        identifier “GLEW_ARB_texture_non_power_of_two” is undefined* E0020        identifier “GLEW_ARB_texture_query_levels” is undefined* E0020        identifier “GLEW_ARB_texture_query_lod” is undefined* E0020        identifier “GLEW_ARB_texture_rectangle” is undefined* E0020        identifier “GLEW_ARB_texture_rg” is undefined* E0020        identifier “GLEW_ARB_texture_rgb10_a2ui” is undefined* E0020        identifier “GLEW_ARB_texture_stencil8” is undefined* E0020        identifier “GLEW_ARB_texture_storage” is undefined* E0020        identifier “GLEW_ARB_texture_storage_multisample” is undefined* E0020        identifier “GLEW_ARB_texture_swizzle” is undefined* E0020        identifier “GLEW_ARB_texture_view” is undefined* E0020        identifier “GLEW_ARB_timer_query” is undefined* E0020        identifier “GLEW_ARB_transform_feedback2” is undefined* E0020        identifier “GLEW_ARB_transform_feedback3” is undefined* E0020        identifier “GLEW_ARB_transform_feedback_instanced” is undefined* E0020        identifier “GLEW_ARB_transform_feedback_overflow_query” is undefined* E0020        identifier “GLEW_ARB_transpose_matrix” is undefined* E0020        identifier “GLEW_ARB_uniform_buffer_object” is undefined* E0020        identifier “GLEW_ARB_vertex_array_bgra” is undefined* E0020        identifier “GLEW_ARB_vertex_array_object” is undefined* E0020        identifier “GLEW_ARB_vertex_attrib_64bit” is undefined* E0020        identifier “GLEW_ARB_vertex_attrib_binding” is undefined* E0020        identifier “GLEW_ARB_vertex_blend” is undefined* E0020        identifier “GLEW_ARB_vertex_buffer_object” is undefined* E0020        identifier “GLEW_ARB_vertex_program” is undefined* E0020        identifier “GLEW_ARB_vertex_shader” is undefined* E0020        identifier “GLEW_ARB_vertex_type_2_10_10_10_rev” is undefined* E0020        identifier “GLEW_ARB_vertex_type_10f_11f_11f_rev” is undefined* E0020        identifier “GLEW_ARB_viewport_array” is undefined* E0020        identifier “GLEW_ARB_window_pos” is undefined* E0020        identifier “GLEW_ARM_mali_program_binary” is undefined* E0020        identifier “GLEW_ARM_mali_shader_binary” is undefined* E0020        identifier “GLEW_ARM_rgba8” is undefined* E0020        identifier “GLEW_ARM_shader_framebuffer_fetch” is undefined* E0020        identifier “GLEW_ARM_shader_framebuffer_fetch_depth_stencil” is undefined* E0020        identifier “GLEW_ATI_draw_buffers” is undefined* E0020        identifier “GLEW_ATI_element_array” is undefined* E0020        identifier “GLEW_ATI_envmap_bumpmap” is undefined* E0020        identifier “GLEW_ATI_fragment_shader” is undefined* E0020        identifier “GLEW_ATI_map_object_buffer” is undefined* E0020        identifier “GLEW_ATI_meminfo” is undefined* E0020        identifier “GLEW_ATI_pn_triangles” is undefined* E0020        identifier “GLEW_ATI_separate_stencil” is undefined* E0020        identifier “GLEW_ATI_shader_texture_lod” is undefined* E0020        identifier “GLEW_ATI_text_fragment_shader” is undefined* E0020        identifier “GLEW_ATI_texture_compression_3dc” is undefined* E0020        identifier “GLEW_ATI_texture_env_combine3” is undefined* E0020        identifier “GLEW_ATI_texture_float” is undefined* E0020        identifier “GLEW_ATI_texture_mirror_once” is undefined* E0020        identifier “GLEW_ATI_vertex_array_object” is undefined* E0020        identifier “GLEW_ATI_vertex_attrib_array_object” is undefined* E0020        identifier “GLEW_ATI_vertex_streams” is undefined* E0020        identifier “GLEW_ATIX_point_sprites” is undefined* E0020        identifier “GLEW_ATIX_texture_env_combine3” is undefined* E0020        identifier “GLEW_ATIX_texture_env_route” is undefined* E0020        identifier “GLEW_ATIX_vertex_shader_output_point_size” is undefined* E0020        identifier “GLEW_EGL_KHR_context_flush_control” is undefined* E0020        identifier “GLEW_EGL_NV_robustness_video_memory_purge” is undefined* E0020        identifier “GLEW_ERROR_GL_VERSION_10_ONLY” is undefined* E0020        identifier “GLEW_ERROR_GLX_VERSION_11_ONLY” is undefined* E0020        identifier “GLEW_ERROR_NO_GL_VERSION” is undefined* E0020        identifier “GLEW_ERROR_NO_GLX_DISPLAY” is undefined* E0020        identifier “GLEW_EXT_422_pixels” is undefined* E0020        identifier “GLEW_EXT_abgr” is undefined* E0020        identifier “GLEW_EXT_base_instance” is undefined* E0020        identifier “GLEW_EXT_bgra” is undefined* E0020        identifier “GLEW_EXT_bindable_uniform” is undefined* E0020        identifier “GLEW_EXT_blend_color” is undefined* E0020        identifier “GLEW_EXT_blend_equation_separate” is undefined* E0020        identifier “GLEW_EXT_blend_func_extended” is undefined* E0020        identifier “GLEW_EXT_blend_func_separate” is undefined* E0020        identifier “GLEW_EXT_blend_logic_op” is undefined* E0020        identifier “GLEW_EXT_blend_minmax” is undefined* E0020        identifier “GLEW_EXT_blend_subtract” is undefined* E0020        identifier “GLEW_EXT_buffer_storage” is undefined* E0020        identifier “GLEW_EXT_Cg_shader” is undefined* E0020        identifier “GLEW_EXT_clear_texture” is undefined* E0020        identifier “GLEW_EXT_clip_cull_distance” is undefined* E0020        identifier “GLEW_EXT_clip_volume_hint” is undefined* E0020        identifier “GLEW_EXT_cmyka” is undefined* E0020        identifier “GLEW_EXT_color_buffer_float” is undefined* E0020        identifier “GLEW_EXT_color_buffer_half_float” is undefined* E0020        identifier “GLEW_EXT_color_subtable” is undefined* E0020        identifier “GLEW_EXT_compiled_vertex_array” is undefined* E0020        identifier “GLEW_EXT_compressed_ETC1_RGB8_sub_texture” is undefined* E0020        identifier “GLEW_EXT_conservative_depth” is undefined* E0020        identifier “GLEW_EXT_convolution” is undefined* E0020        identifier “GLEW_EXT_coordinate_frame” is undefined* E0020        identifier “GLEW_EXT_copy_image” is undefined* E0020        identifier “GLEW_EXT_copy_texture” is undefined* E0020        identifier “GLEW_EXT_cull_vertex” is undefined* E0020        identifier “GLEW_EXT_debug_label” is undefined* E0020        identifier “GLEW_EXT_debug_marker” is undefined* E0020        identifier “GLEW_EXT_depth_bounds_test” is undefined* E0020        identifier “GLEW_EXT_direct_state_access” is undefined* E0020        identifier “GLEW_EXT_discard_framebuffer” is undefined* E0020        identifier “GLEW_EXT_draw_buffers2” is undefined* E0020        identifier “GLEW_EXT_draw_buffers” is undefined* E0020        identifier “GLEW_EXT_draw_buffers_indexed” is undefined* E0020        identifier “GLEW_EXT_draw_elements_base_vertex” is undefined* E0020        identifier “GLEW_EXT_draw_instanced” is undefined* E0020        identifier “GLEW_EXT_draw_range_elements” is undefined* E0020        identifier “GLEW_EXT_EGL_image_array” is undefined* E0020        identifier “GLEW_EXT_external_buffer” is undefined* E0020        identifier “GLEW_EXT_float_blend” is undefined* E0020        identifier “GLEW_EXT_fog_coord” is undefined* E0020        identifier “GLEW_EXT_frag_depth” is undefined* E0020        identifier “GLEW_EXT_fragment_lighting” is undefined* E0020        identifier “GLEW_EXT_framebuffer_blit” is undefined* E0020        identifier “GLEW_EXT_framebuffer_multisample” is undefined* E0020        identifier “GLEW_EXT_framebuffer_multisample_blit_scaled” is undefined* E0020        identifier “GLEW_EXT_framebuffer_object” is undefined* E0020        identifier “GLEW_EXT_framebuffer_sRGB” is undefined* E0020        identifier “GLEW_EXT_geometry_point_size” is undefined* E0020        identifier “GLEW_EXT_geometry_shader4” is undefined* E0020        identifier “GLEW_EXT_geometry_shader” is undefined* E0020        identifier “GLEW_EXT_gpu_program_parameters” is undefined* E0020        identifier “GLEW_EXT_gpu_shader4” is undefined* E0020        identifier “GLEW_EXT_gpu_shader5” is undefined* E0020        identifier “GLEW_EXT_histogram” is undefined* E0020        identifier “GLEW_EXT_index_array_formats” is undefined* E0020        identifier “GLEW_EXT_index_func” is undefined* E0020        identifier “GLEW_EXT_index_material” is undefined* E0020        identifier “GLEW_EXT_index_texture” is undefined* E0020        identifier “GLEW_EXT_instanced_arrays” is undefined* E0020        identifier “GLEW_EXT_light_texture” is undefined* E0020        identifier “GLEW_EXT_map_buffer_range” is undefined* E0020        identifier “GLEW_EXT_memory_object” is undefined* E0020        identifier “GLEW_EXT_memory_object_fd” is undefined* E0020        identifier “GLEW_EXT_memory_object_win32” is undefined* E0020        identifier “GLEW_EXT_misc_attribute” is undefined* E0020        identifier “GLEW_EXT_multi_draw_arrays” is undefined* E0020        identifier “GLEW_EXT_multi_draw_indirect” is undefined* E0020        identifier “GLEW_EXT_multiple_textures” is undefined* E0020        identifier “GLEW_EXT_multisample” is undefined* E0020        identifier “GLEW_EXT_multisample_compatibility” is undefined* E0020        identifier “GLEW_EXT_multisampled_render_to_texture2” is undefined* E0020        identifier “GLEW_EXT_multisampled_render_to_texture” is undefined* E0020        identifier “GLEW_EXT_multiview_draw_buffers” is undefined* E0020        identifier “GLEW_EXT_packed_depth_stencil” is undefined* E0020        identifier “GLEW_EXT_packed_float” is undefined* E0020        identifier “GLEW_EXT_packed_pixels” is undefined* E0020        identifier “GLEW_EXT_paletted_texture” is undefined* E0020        identifier “GLEW_EXT_pixel_buffer_object” is undefined* E0020        identifier “GLEW_EXT_pixel_transform” is undefined* E0020        identifier “GLEW_EXT_pixel_transform_color_table” is undefined* E0020        identifier “GLEW_EXT_point_parameters” is undefined* E0020        identifier “GLEW_EXT_polygon_offset” is undefined* E0020        identifier “GLEW_EXT_polygon_offset_clamp” is undefined* E0020        identifier “GLEW_EXT_post_depth_coverage” is undefined* E0020        identifier “GLEW_EXT_provoking_vertex” is undefined* E0020        identifier “GLEW_EXT_pvrtc_sRGB” is undefined* E0020        identifier “GLEW_EXT_raster_multisample” is undefined* E0020        identifier “GLEW_EXT_read_format_bgra” is undefined* E0020        identifier “GLEW_EXT_render_snorm” is undefined* E0020        identifier “GLEW_EXT_rescale_normal” is undefined* E0020        identifier “GLEW_EXT_scene_marker” is undefined* E0020        identifier “GLEW_EXT_secondary_color” is undefined* E0020        identifier “GLEW_EXT_semaphore” is undefined* E0020        identifier “GLEW_EXT_semaphore_fd” is undefined* E0020        identifier “GLEW_EXT_semaphore_win32” is undefined* E0020        identifier “GLEW_EXT_separate_shader_objects” is undefined* E0020        identifier “GLEW_EXT_separate_specular_color” is undefined* E0020        identifier “GLEW_EXT_shader_framebuffer_fetch” is undefined* E0020        identifier “GLEW_EXT_shader_group_vote” is undefined* E0020        identifier “GLEW_EXT_shader_image_load_formatted” is undefined* E0020        identifier “GLEW_EXT_shader_image_load_store” is undefined* E0020        identifier “GLEW_EXT_shader_implicit_conversions” is undefined* E0020        identifier “GLEW_EXT_shader_integer_mix” is undefined* E0020        identifier “GLEW_EXT_shader_io_blocks” is undefined* E0020        identifier “GLEW_EXT_shader_non_constant_global_initializers” is undefined* E0020        identifier “GLEW_EXT_shader_pixel_local_storage2” is undefined* E0020        identifier “GLEW_EXT_shader_pixel_local_storage” is undefined* E0020        identifier “GLEW_EXT_shader_texture_lod” is undefined* E0020        identifier “GLEW_EXT_shadow_funcs” is undefined* E0020        identifier “GLEW_EXT_shadow_samplers” is undefined* E0020        identifier “GLEW_EXT_shared_texture_palette” is undefined* E0020        identifier “GLEW_EXT_sparse_texture2” is undefined* E0020        identifier “GLEW_EXT_sparse_texture” is undefined* E0020        identifier “GLEW_EXT_sRGB” is undefined* E0020        identifier “GLEW_EXT_sRGB_write_control” is undefined* E0020        identifier “GLEW_EXT_stencil_clear_tag” is undefined* E0020        identifier “GLEW_EXT_stencil_two_side” is undefined* E0020        identifier “GLEW_EXT_stencil_wrap” is undefined* E0020        identifier “GLEW_EXT_subtexture” is undefined* E0020        identifier “GLEW_EXT_texture3D” is undefined* E0020        identifier “GLEW_EXT_texture” is undefined* E0020        identifier “GLEW_EXT_texture_array” is undefined* E0020        identifier “GLEW_EXT_texture_buffer_object” is undefined* E0020        identifier “GLEW_EXT_texture_compression_astc_decode_mode” is undefined* E0020        identifier “GLEW_EXT_texture_compression_astc_decode_mode_rgb9e5” is undefined* E0020        identifier “GLEW_EXT_texture_compression_bptc” is undefined* E0020        identifier “GLEW_EXT_texture_compression_dxt1” is undefined* E0020        identifier “GLEW_EXT_texture_compression_latc” is undefined* E0020        identifier “GLEW_EXT_texture_compression_rgtc” is undefined* E0020        identifier “GLEW_EXT_texture_compression_s3tc” is undefined* E0020        identifier “GLEW_EXT_texture_cube_map” is undefined* E0020        identifier “GLEW_EXT_texture_cube_map_array” is undefined* E0020        identifier “GLEW_EXT_texture_edge_clamp” is undefined* E0020        identifier “GLEW_EXT_texture_env” is undefined* E0020        identifier “GLEW_EXT_texture_env_add” is undefined* E0020        identifier “GLEW_EXT_texture_env_combine” is undefined* E0020        identifier “GLEW_EXT_texture_env_dot3” is undefined* E0020        identifier “GLEW_EXT_texture_filter_anisotropic” is undefined* E0020        identifier “GLEW_EXT_texture_filter_minmax” is undefined* E0020        identifier “GLEW_EXT_texture_format_BGRA8888” is undefined* E0020        identifier “GLEW_EXT_texture_integer” is undefined* E0020        identifier “GLEW_EXT_texture_lod_bias” is undefined* E0020        identifier “GLEW_EXT_texture_mirror_clamp” is undefined* E0020        identifier “GLEW_EXT_texture_norm16” is undefined* E0020        identifier “GLEW_EXT_texture_object” is undefined* E0020        identifier “GLEW_EXT_texture_perturb_normal” is undefined* E0020        identifier “GLEW_EXT_texture_rectangle” is undefined* E0020        identifier “GLEW_EXT_texture_rg” is undefined* E0020        identifier “GLEW_EXT_texture_shared_exponent” is undefined* E0020        identifier “GLEW_EXT_texture_snorm” is undefined* E0020        identifier “GLEW_EXT_texture_sRGB” is undefined* E0020        identifier “GLEW_EXT_texture_sRGB_decode” is undefined* E0020        identifier “GLEW_EXT_texture_sRGB_R8” is undefined* E0020        identifier “GLEW_EXT_texture_sRGB_RG8” is undefined* E0020        identifier “GLEW_EXT_texture_storage” is undefined* E0020        identifier “GLEW_EXT_texture_swizzle” is undefined* E0020        identifier “GLEW_EXT_texture_type_2_10_10_10_REV” is undefined* E0020        identifier “GLEW_EXT_texture_view” is undefined* E0020        identifier “GLEW_EXT_timer_query” is undefined* E0020        identifier “GLEW_EXT_transform_feedback” is undefined* E0020        identifier “GLEW_EXT_unpack_subimage” is undefined* E0020        identifier “GLEW_EXT_vertex_array” is undefined* E0020        identifier “GLEW_EXT_vertex_array_bgra” is undefined* E0020        identifier “GLEW_EXT_vertex_array_setXXX” is undefined* E0020        identifier “GLEW_EXT_vertex_attrib_64bit” is undefined* E0020        identifier “GLEW_EXT_vertex_shader” is undefined* E0020        identifier “GLEW_EXT_vertex_weighting” is undefined* E0020        identifier “GLEW_EXT_win32_keyed_mutex” is undefined* E0020        identifier “GLEW_EXT_window_rectangles” is undefined* E0020        identifier “GLEW_EXT_x11_sync_object” is undefined* E0020        identifier “GLEW_EXT_YUV_target” is undefined* E0020        identifier “GLEW_GET_FUN” is undefined* E0020        identifier “GLEW_GET_VAR” is undefined* E0020        identifier “GLEW_GREMEDY_frame_terminator” is undefined* E0020        identifier “GLEW_GREMEDY_string_marker” is undefined* E0020        identifier “GLEW_HP_convolution_border_modes” is undefined* E0020        identifier “GLEW_HP_image_transform” is undefined* E0020        identifier “GLEW_HP_occlusion_test” is undefined* E0020        identifier “GLEW_HP_texture_lighting” is undefined* E0020        identifier “GLEW_IBM_cull_vertex” is undefined* E0020        identifier “GLEW_IBM_multimode_draw_arrays” is undefined* E0020        identifier “GLEW_IBM_rasterpos_clip” is undefined* E0020        identifier “GLEW_IBM_static_data” is undefined* E0020        identifier “GLEW_IBM_texture_mirrored_repeat” is undefined* E0020        identifier “GLEW_IBM_vertex_array_lists” is undefined* E0020        identifier “GLEW_INGR_color_clamp” is undefined* E0020        identifier “GLEW_INGR_interlace_read” is undefined* E0020        identifier “GLEW_INTEL_conservative_rasterization” is undefined* E0020        identifier “GLEW_INTEL_fragment_shader_ordering” is undefined* E0020        identifier “GLEW_INTEL_framebuffer_CMAA” is undefined* E0020        identifier “GLEW_INTEL_map_texture” is undefined* E0020        identifier “GLEW_INTEL_parallel_arrays” is undefined* E0020        identifier “GLEW_INTEL_performance_query” is undefined* E0020        identifier “GLEW_INTEL_texture_scissor” is undefined* E0020        identifier “GLEW_KHR_blend_equation_advanced” is undefined* E0020        identifier “GLEW_KHR_blend_equation_advanced_coherent” is undefined* E0020        identifier “GLEW_KHR_context_flush_control” is undefined* E0020        identifier “GLEW_KHR_debug” is undefined* E0020        identifier “GLEW_KHR_no_error” is undefined* E0020        identifier “GLEW_KHR_parallel_shader_compile” is undefined* E0020        identifier “GLEW_KHR_robust_buffer_access_behavior” is undefined* E0020        identifier “GLEW_KHR_robustness” is undefined* E0020        identifier “GLEW_KHR_texture_compression_astc_hdr” is undefined* E0020        identifier “GLEW_KHR_texture_compression_astc_ldr” is undefined* E0020        identifier “GLEW_KHR_texture_compression_astc_sliced_3d” is undefined* E0020        identifier “GLEW_KTX_buffer_region” is undefined* E0020        identifier “GLEW_MESA_pack_invert” is undefined* E0020        identifier “GLEW_MESA_resize_buffers” is undefined* E0020        identifier “GLEW_MESA_shader_integer_functions” is undefined* E0020        identifier “GLEW_MESA_window_pos” is undefined* E0020        identifier “GLEW_MESA_ycbcr_texture” is undefined* E0020        identifier “GLEW_MESAX_texture_stack” is undefined* E0020        identifier “GLEW_NO_ERROR” is undefined* E0020        identifier “GLEW_NV_3dvision_settings” is undefined* E0020        identifier “GLEW_NV_alpha_to_coverage_dither_control” is undefined* E0020        identifier “GLEW_NV_bgr” is undefined* E0020        identifier “GLEW_NV_bindless_multi_draw_indirect” is undefined* E0020        identifier “GLEW_NV_bindless_multi_draw_indirect_count” is undefined* E0020        identifier “GLEW_NV_bindless_texture” is undefined* E0020        identifier “GLEW_NV_blend_equation_advanced” is undefined* E0020        identifier “GLEW_NV_blend_equation_advanced_coherent” is undefined* E0020        identifier “GLEW_NV_blend_minmax_factor” is undefined* E0020        identifier “GLEW_NV_blend_square” is undefined* E0020        identifier “GLEW_NV_clip_space_w_scaling” is undefined* E0020        identifier “GLEW_NV_command_list” is undefined* E0020        identifier “GLEW_NV_compute_program5” is undefined* E0020        identifier “GLEW_NV_conditional_render” is undefined* E0020        identifier “GLEW_NV_conservative_raster” is undefined* E0020        identifier “GLEW_NV_conservative_raster_dilate” is undefined* E0020        identifier “GLEW_NV_conservative_raster_pre_snap_triangles” is undefined* E0020        identifier “GLEW_NV_copy_buffer” is undefined* E0020        identifier “GLEW_NV_copy_depth_to_color” is undefined* E0020        identifier “GLEW_NV_copy_image” is undefined* E0020        identifier “GLEW_NV_deep_texture3D” is undefined* E0020        identifier “GLEW_NV_depth_buffer_float” is undefined* E0020        identifier “GLEW_NV_depth_clamp” is undefined* E0020        identifier “GLEW_NV_depth_range_unclamped” is undefined* E0020        identifier “GLEW_NV_draw_buffers” is undefined* E0020        identifier “GLEW_NV_draw_instanced” is undefined* E0020        identifier “GLEW_NV_draw_texture” is undefined* E0020        identifier “GLEW_NV_draw_vulkan_image” is undefined* E0020        identifier “GLEW_NV_EGL_stream_consumer_external” is undefined* E0020        identifier “GLEW_NV_evaluators” is undefined* E0020        identifier “GLEW_NV_explicit_attrib_location” is undefined* E0020        identifier “GLEW_NV_explicit_multisample” is undefined* E0020        identifier “GLEW_NV_fbo_color_attachments” is undefined* E0020        identifier “GLEW_NV_fence” is undefined* E0020        identifier “GLEW_NV_fill_rectangle” is undefined* E0020        identifier “GLEW_NV_float_buffer” is undefined* E0020        identifier “GLEW_NV_fog_distance” is undefined* E0020        identifier “GLEW_NV_fragment_coverage_to_color” is undefined* E0020        identifier “GLEW_NV_fragment_program2” is undefined* E0020        identifier “GLEW_NV_fragment_program4” is undefined* E0020        identifier “GLEW_NV_fragment_program” is undefined* E0020        identifier “GLEW_NV_fragment_program_option” is undefined* E0020        identifier “GLEW_NV_fragment_shader_interlock” is undefined* E0020        identifier “GLEW_NV_framebuffer_blit” is undefined* E0020        identifier “GLEW_NV_framebuffer_mixed_samples” is undefined* E0020        identifier “GLEW_NV_framebuffer_multisample” is undefined* E0020        identifier “GLEW_NV_framebuffer_multisample_coverage” is undefined* E0020        identifier “GLEW_NV_generate_mipmap_sRGB” is undefined* E0020        identifier “GLEW_NV_geometry_program4” is undefined* E0020        identifier “GLEW_NV_geometry_shader4” is undefined* E0020        identifier “GLEW_NV_geometry_shader_passthrough” is undefined* E0020        identifier “GLEW_NV_gpu_multicast” is undefined* E0020        identifier “GLEW_NV_gpu_program4” is undefined* E0020        identifier “GLEW_NV_gpu_program5” is undefined* E0020        identifier “GLEW_NV_gpu_program5_mem_extended” is undefined* E0020        identifier “GLEW_NV_gpu_program_fp64” is undefined* E0020        identifier “GLEW_NV_gpu_shader5” is undefined* E0020        identifier “GLEW_NV_half_float” is undefined* E0020        identifier “GLEW_NV_image_formats” is undefined* E0020        identifier “GLEW_NV_instanced_arrays” is undefined* E0020        identifier “GLEW_NV_internalformat_sample_query” is undefined* E0020        identifier “GLEW_NV_light_max_exponent” is undefined* E0020        identifier “GLEW_NV_multisample_coverage” is undefined* E0020        identifier “GLEW_NV_multisample_filter_hint” is undefined* E0020        identifier “GLEW_NV_non_square_matrices” is undefined* E0020        identifier “GLEW_NV_occlusion_query” is undefined* E0020        identifier “GLEW_NV_pack_subimage” is undefined* E0020        identifier “GLEW_NV_packed_depth_stencil” is undefined* E0020        identifier “GLEW_NV_packed_float” is undefined* E0020        identifier “GLEW_NV_packed_float_linear” is undefined* E0020        identifier “GLEW_NV_parameter_buffer_object2” is undefined* E0020        identifier “GLEW_NV_parameter_buffer_object” is undefined* E0020        identifier “GLEW_NV_path_rendering” is undefined* E0020        identifier “GLEW_NV_path_rendering_shared_edge” is undefined* E0020        identifier “GLEW_NV_pixel_buffer_object” is undefined* E0020        identifier “GLEW_NV_pixel_data_range” is undefined* E0020        identifier “GLEW_NV_platform_binary” is undefined* E0020        identifier “GLEW_NV_point_sprite” is undefined* E0020        identifier “GLEW_NV_polygon_mode” is undefined* E0020        identifier “GLEW_NV_present_video” is undefined* E0020        identifier “GLEW_NV_primitive_restart” is undefined* E0020        identifier “GLEW_NV_read_depth” is undefined* E0020        identifier “GLEW_NV_read_depth_stencil” is undefined* E0020        identifier “GLEW_NV_read_stencil” is undefined* E0020        identifier “GLEW_NV_register_combiners2” is undefined* E0020        identifier “GLEW_NV_register_combiners” is undefined* E0020        identifier “GLEW_NV_robustness_video_memory_purge” is undefined* E0020        identifier “GLEW_NV_sample_locations” is undefined* E0020        identifier “GLEW_NV_sample_mask_override_coverage” is undefined* E0020        identifier “GLEW_NV_shader_atomic_counters” is undefined* E0020        identifier “GLEW_NV_shader_atomic_float64” is undefined* E0020        identifier “GLEW_NV_shader_atomic_float” is undefined* E0020        identifier “GLEW_NV_shader_atomic_fp16_vector” is undefined* E0020        identifier “GLEW_NV_shader_atomic_int64” is undefined* E0020        identifier “GLEW_NV_shader_buffer_load” is undefined* E0020        identifier “GLEW_NV_shader_noperspective_interpolation” is undefined* E0020        identifier “GLEW_NV_shader_storage_buffer_object” is undefined* E0020        identifier “GLEW_NV_shader_thread_group” is undefined* E0020        identifier “GLEW_NV_shader_thread_shuffle” is undefined* E0020        identifier “GLEW_NV_shadow_samplers_array” is undefined* E0020        identifier “GLEW_NV_shadow_samplers_cube” is undefined* E0020        identifier “GLEW_NV_sRGB_formats” is undefined* E0020        identifier “GLEW_NV_stereo_view_rendering” is undefined* E0020        identifier “GLEW_NV_tessellation_program5” is undefined* E0020        identifier “GLEW_NV_texgen_emboss” is undefined* E0020        identifier “GLEW_NV_texgen_reflection” is undefined* E0020        identifier “GLEW_NV_texture_array” is undefined* E0020        identifier “GLEW_NV_texture_barrier” is undefined* E0020        identifier “GLEW_NV_texture_border_clamp” is undefined* E0020        identifier “GLEW_NV_texture_compression_latc” is undefined* E0020        identifier “GLEW_NV_texture_compression_s3tc” is undefined* E0020        identifier “GLEW_NV_texture_compression_s3tc_update” is undefined* E0020        identifier “GLEW_NV_texture_compression_vtc” is undefined* E0020        identifier “GLEW_NV_texture_env_combine4” is undefined* E0020        identifier “GLEW_NV_texture_expand_normal” is undefined* E0020        identifier “GLEW_NV_texture_multisample” is undefined* E0020        identifier “GLEW_NV_texture_npot_2D_mipmap” is undefined* E0020        identifier “GLEW_NV_texture_rectangle” is undefined* E0020        identifier “GLEW_NV_texture_rectangle_compressed” is undefined* E0020        identifier “GLEW_NV_texture_shader2” is undefined* E0020        identifier “GLEW_NV_texture_shader3” is undefined* E0020        identifier “GLEW_NV_texture_shader” is undefined* E0020        identifier “GLEW_NV_transform_feedback2” is undefined* E0020        identifier “GLEW_NV_transform_feedback” is undefined* E0020        identifier “GLEW_NV_uniform_buffer_unified_memory” is undefined* E0020        identifier “GLEW_NV_vdpau_interop” is undefined* E0020        identifier “GLEW_NV_vertex_array_range2” is undefined* E0020        identifier “GLEW_NV_vertex_array_range” is undefined* E0020        identifier “GLEW_NV_vertex_attrib_integer_64bit” is undefined* E0020        identifier “GLEW_NV_vertex_buffer_unified_memory” is undefined* E0020        identifier “GLEW_NV_vertex_program1_1” is undefined* E0020        identifier “GLEW_NV_vertex_program2” is undefined* E0020        identifier “GLEW_NV_vertex_program2_option” is undefined* E0020        identifier “GLEW_NV_vertex_program3” is undefined* E0020        identifier “GLEW_NV_vertex_program4” is undefined* E0020        identifier “GLEW_NV_vertex_program” is undefined* E0020        identifier “GLEW_NV_video_capture” is undefined* E0020        identifier “GLEW_NV_viewport_array2” is undefined* E0020        identifier “GLEW_NV_viewport_array” is undefined* E0020        identifier “GLEW_NV_viewport_swizzle” is undefined* E0020        identifier “GLEW_NVX_blend_equation_advanced_multi_draw_buffers” is undefined* E0020        identifier “GLEW_NVX_conditional_render” is undefined* E0020        identifier “GLEW_NVX_gpu_memory_info” is undefined* E0020        identifier “GLEW_NVX_linked_gpu_multicast” is undefined* E0020        identifier “GLEW_OES_byte_coordinates” is undefined* E0020        identifier “GLEW_OK” is undefined* E0020        identifier “GLEW_OML_interlace” is undefined* E0020        identifier “GLEW_OML_resample” is undefined* E0020        identifier “GLEW_OML_subsample” is undefined* E0020        identifier “GLEW_OVR_multiview2” is undefined* E0020        identifier “GLEW_OVR_multiview” is undefined* E0020        identifier “GLEW_OVR_multiview_multisampled_render_to_texture” is undefined* E0020        identifier “GLEW_PGI_misc_hints” is undefined* E0020        identifier “GLEW_PGI_vertex_hints” is undefined* E0020        identifier “GLEW_QCOM_alpha_test” is undefined* E0020        identifier “GLEW_QCOM_binning_control” is undefined* E0020        identifier “GLEW_QCOM_driver_control” is undefined* E0020        identifier “GLEW_QCOM_extended_get2” is undefined* E0020        identifier “GLEW_QCOM_extended_get” is undefined* E0020        identifier “GLEW_QCOM_framebuffer_foveated” is undefined* E0020        identifier “GLEW_QCOM_perfmon_global_mode” is undefined* E0020        identifier “GLEW_QCOM_shader_framebuffer_fetch_noncoherent” is undefined* E0020        identifier “GLEW_QCOM_tiled_rendering” is undefined* E0020        identifier “GLEW_QCOM_writeonly_rendering” is undefined* E0020        identifier “GLEW_REGAL_enable” is undefined* E0020        identifier “GLEW_REGAL_error_string” is undefined* E0020        identifier “GLEW_REGAL_ES1_0_compatibility” is undefined* E0020        identifier “GLEW_REGAL_ES1_1_compatibility” is undefined* E0020        identifier “GLEW_REGAL_extension_query” is undefined* E0020        identifier “GLEW_REGAL_log” is undefined* E0020        identifier “GLEW_REGAL_proc_address” is undefined* E0020        identifier “GLEW_REND_screen_coordinates” is undefined* E0020        identifier “GLEW_S3_s3tc” is undefined* E0020        identifier “GLEW_SGI_color_matrix” is undefined* E0020        identifier “GLEW_SGI_color_table” is undefined* E0020        identifier “GLEW_SGI_complex” is undefined* E0020        identifier “GLEW_SGI_complex_type” is undefined* E0020        identifier “GLEW_SGI_fft” is undefined* E0020        identifier “GLEW_SGI_texture_color_table” is undefined* E0020        identifier “GLEW_SGIS_clip_band_hint” is undefined* E0020        identifier “GLEW_SGIS_color_range” is undefined* E0020        identifier “GLEW_SGIS_detail_texture” is undefined* E0020        identifier “GLEW_SGIS_fog_function” is undefined* E0020        identifier “GLEW_SGIS_generate_mipmap” is undefined* E0020        identifier “GLEW_SGIS_line_texgen” is undefined* E0020        identifier “GLEW_SGIS_multisample” is undefined* E0020        identifier “GLEW_SGIS_multitexture” is undefined* E0020        identifier “GLEW_SGIS_pixel_texture” is undefined* E0020        identifier “GLEW_SGIS_point_line_texgen” is undefined* E0020        identifier “GLEW_SGIS_shared_multisample” is undefined* E0020        identifier “GLEW_SGIS_sharpen_texture” is undefined* E0020        identifier “GLEW_SGIS_texture4D” is undefined* E0020        identifier “GLEW_SGIS_texture_border_clamp” is undefined* E0020        identifier “GLEW_SGIS_texture_edge_clamp” is undefined* E0020        identifier “GLEW_SGIS_texture_filter4” is undefined* E0020        identifier “GLEW_SGIS_texture_lod” is undefined* E0020        identifier “GLEW_SGIS_texture_select” is undefined* E0020        identifier “GLEW_SGIX_async” is undefined* E0020        identifier “GLEW_SGIX_async_histogram” is undefined* E0020        identifier “GLEW_SGIX_async_pixel” is undefined* E0020        identifier “GLEW_SGIX_bali_g_instruments” is undefined* E0020        identifier “GLEW_SGIX_bali_r_instruments” is undefined* E0020        identifier “GLEW_SGIX_bali_timer_instruments” is undefined* E0020        identifier “GLEW_SGIX_blend_alpha_minmax” is undefined* E0020        identifier “GLEW_SGIX_blend_cadd” is undefined* E0020        identifier “GLEW_SGIX_blend_cmultiply” is undefined* E0020        identifier “GLEW_SGIX_calligraphic_fragment” is undefined* E0020        identifier “GLEW_SGIX_clipmap” is undefined* E0020        identifier “GLEW_SGIX_color_matrix_accuracy” is undefined* E0020        identifier “GLEW_SGIX_color_table_index_mode” is undefined* E0020        identifier “GLEW_SGIX_complex_polar” is undefined* E0020        identifier “GLEW_SGIX_convolution_accuracy” is undefined* E0020        identifier “GLEW_SGIX_cube_map” is undefined* E0020        identifier “GLEW_SGIX_cylinder_texgen” is undefined* E0020        identifier “GLEW_SGIX_datapipe” is undefined* E0020        identifier “GLEW_SGIX_decimation” is undefined* E0020        identifier “GLEW_SGIX_depth_pass_instrument” is undefined* E0020        identifier “GLEW_SGIX_depth_texture” is undefined* E0020        identifier “GLEW_SGIX_dvc” is undefined* E0020        identifier “GLEW_SGIX_flush_raster” is undefined* E0020        identifier “GLEW_SGIX_fog_blend” is undefined* E0020        identifier “GLEW_SGIX_fog_factor_to_alpha” is undefined* E0020        identifier “GLEW_SGIX_fog_layers” is undefined* E0020        identifier “GLEW_SGIX_fog_offset” is undefined* E0020        identifier “GLEW_SGIX_fog_patchy” is undefined* E0020        identifier “GLEW_SGIX_fog_scale” is undefined* E0020        identifier “GLEW_SGIX_fog_texture” is undefined* E0020        identifier “GLEW_SGIX_fragment_lighting_space” is undefined* E0020        identifier “GLEW_SGIX_fragment_specular_lighting” is undefined* E0020        identifier “GLEW_SGIX_fragments_instrument” is undefined* E0020        identifier “GLEW_SGIX_framezoom” is undefined* E0020        identifier “GLEW_SGIX_icc_texture” is undefined* E0020        identifier “GLEW_SGIX_igloo_interface” is undefined* E0020        identifier “GLEW_SGIX_image_compression” is undefined* E0020        identifier “GLEW_SGIX_impact_pixel_texture” is undefined* E0020        identifier “GLEW_SGIX_instrument_error” is undefined* E0020        identifier “GLEW_SGIX_interlace” is undefined* E0020        identifier “GLEW_SGIX_ir_instrument1” is undefined* E0020        identifier “GLEW_SGIX_line_quality_hint” is undefined* E0020        identifier “GLEW_SGIX_list_priority” is undefined* E0020        identifier “GLEW_SGIX_mpeg1” is undefined* E0020        identifier “GLEW_SGIX_mpeg2” is undefined* E0020        identifier “GLEW_SGIX_nonlinear_lighting_pervertex” is undefined* E0020        identifier “GLEW_SGIX_nurbs_eval” is undefined* E0020        identifier “GLEW_SGIX_occlusion_instrument” is undefined* E0020        identifier “GLEW_SGIX_packed_6bytes” is undefined* E0020        identifier “GLEW_SGIX_pixel_texture” is undefined* E0020        identifier “GLEW_SGIX_pixel_texture_bits” is undefined* E0020        identifier “GLEW_SGIX_pixel_texture_lod” is undefined* E0020        identifier “GLEW_SGIX_pixel_tiles” is undefined* E0020        identifier “GLEW_SGIX_polynomial_ffd” is undefined* E0020        identifier “GLEW_SGIX_quad_mesh” is undefined* E0020        identifier “GLEW_SGIX_reference_plane” is undefined* E0020        identifier “GLEW_SGIX_resample” is undefined* E0020        identifier “GLEW_SGIX_scalebias_hint” is undefined* E0020        identifier “GLEW_SGIX_shadow” is undefined* E0020        identifier “GLEW_SGIX_shadow_ambient” is undefined* E0020        identifier “GLEW_SGIX_slim” is undefined* E0020        identifier “GLEW_SGIX_spotlight_cutoff” is undefined* E0020        identifier “GLEW_SGIX_sprite” is undefined* E0020        identifier “GLEW_SGIX_subdiv_patch” is undefined* E0020        identifier “GLEW_SGIX_subsample” is undefined* E0020        identifier “GLEW_SGIX_tag_sample_buffer” is undefined* E0020        identifier “GLEW_SGIX_texture_add_env” is undefined* E0020        identifier “GLEW_SGIX_texture_coordinate_clamp” is undefined* E0020        identifier “GLEW_SGIX_texture_lod_bias” is undefined* E0020        identifier “GLEW_SGIX_texture_mipmap_anisotropic” is undefined* E0020        identifier “GLEW_SGIX_texture_multi_buffer” is undefined* E0020        identifier “GLEW_SGIX_texture_phase” is undefined* E0020        identifier “GLEW_SGIX_texture_range” is undefined* E0020        identifier “GLEW_SGIX_texture_scale_bias” is undefined* E0020        identifier “GLEW_SGIX_texture_supersample” is undefined* E0020        identifier “GLEW_SGIX_vector_ops” is undefined* E0020        identifier “GLEW_SGIX_vertex_array_object” is undefined* E0020        identifier “GLEW_SGIX_vertex_preclip” is undefined* E0020        identifier “GLEW_SGIX_vertex_preclip_hint” is undefined* E0020        identifier “GLEW_SGIX_ycrcb” is undefined* E0020        identifier “GLEW_SGIX_ycrcb_subsample” is undefined* E0020        identifier “GLEW_SGIX_ycrcba” is undefined* E0020        identifier “GLEW_SUN_convolution_border_modes” is undefined* E0020        identifier “GLEW_SUN_global_alpha” is undefined* E0020        identifier “GLEW_SUN_mesh_array” is undefined* E0020        identifier “GLEW_SUN_read_video_pixels” is undefined* E0020        identifier “GLEW_SUN_slice_accum” is undefined* E0020        identifier “GLEW_SUN_triangle_list” is undefined* E0020        identifier “GLEW_SUN_vertex” is undefined* E0020        identifier “GLEW_SUNX_constant_data” is undefined* E0020        identifier “GLEW_VERSION” is undefined* E0020        identifier “GLEW_VERSION_1_1” is undefined* E0020        identifier “GLEW_VERSION_1_2” is undefined* E0020        identifier “GLEW_VERSION_1_2_1” is undefined* E0020        identifier “GLEW_VERSION_1_3” is undefined* E0020        identifier “GLEW_VERSION_1_4” is undefined* E0020        identifier “GLEW_VERSION_1_5” is undefined* E0020        identifier “GLEW_VERSION_2_0” is undefined* E0020        identifier “GLEW_VERSION_2_1” is undefined* E0020        identifier “GLEW_VERSION_3_0” is undefined* E0020        identifier “GLEW_VERSION_3_1” is undefined* E0020        identifier “GLEW_VERSION_3_2” is undefined* E0020        identifier “GLEW_VERSION_3_3” is undefined* E0020        identifier “GLEW_VERSION_4_0” is undefined* E0020        identifier “GLEW_VERSION_4_1” is undefined* E0020        identifier “GLEW_VERSION_4_2” is undefined* E0020        identifier “GLEW_VERSION_4_3” is undefined* E0020        identifier “GLEW_VERSION_4_4” is undefined* E0020        identifier “GLEW_VERSION_4_5” is undefined* E0020        identifier “GLEW_VERSION_4_6” is undefined* E0020        identifier “GLEW_VERSION_MAJOR” is undefined* E0020        identifier “GLEW_VERSION_MICRO” is undefined* E0020        identifier “GLEW_VERSION_MINOR” is undefined* E0020        identifier “GLEW_WIN_phong_shading” is undefined* E0020        identifier “GLEW_WIN_scene_markerXXX” is undefined* E0020        identifier “GLEW_WIN_specular_fog” is undefined* E0020        identifier “GLEW_WIN_swap_hint” is undefined* C2065        ‘GLEW_3DFX_multisample’: undeclared identifier* C2065        ‘GLEW_3DFX_tbuffer’: undeclared identifier* C2065        ‘GLEW_3DFX_texture_compression_FXT1’: undeclared identifier* C2065        ‘GLEW_AMD_blend_minmax_factor’: undeclared identifier* C2065        ‘GLEW_AMD_compressed_3DC_texture’: undeclared identifier* C2065        ‘GLEW_AMD_compressed_ATC_texture’: undeclared identifier* C2065        ‘GLEW_AMD_conservative_depth’: undeclared identifier* C2065        ‘GLEW_AMD_debug_output’: undeclared identifier* C2065        ‘GLEW_AMD_depth_clamp_separate’: undeclared identifier* C2065        ‘GLEW_AMD_draw_buffers_blend’: undeclared identifier* C2065        ‘GLEW_AMD_framebuffer_sample_positions’: undeclared identifier* C2065        ‘GLEW_AMD_gcn_shader’: undeclared identifier* C2065        ‘GLEW_AMD_gpu_shader_half_float’: undeclared identifier* C2065        ‘GLEW_AMD_gpu_shader_int16’: undeclared identifier* C2065        ‘GLEW_AMD_gpu_shader_int64’: undeclared identifier* C2065        ‘GLEW_AMD_interleaved_elements’: undeclared identifier* C2065        ‘GLEW_AMD_multi_draw_indirect’: undeclared identifier* C2065        ‘GLEW_AMD_name_gen_delete’: undeclared identifier* C2065        ‘GLEW_AMD_occlusion_query_event’: undeclared identifier* C2065        ‘GLEW_AMD_performance_monitor’: undeclared identifier* C2065        ‘GLEW_AMD_pinned_memory’: undeclared identifier* C2065        ‘GLEW_AMD_program_binary_Z400’: undeclared identifier* C2065        ‘GLEW_AMD_query_buffer_object’: undeclared identifier* C2065        ‘GLEW_AMD_sample_positions’: undeclared identifier* C2065        ‘GLEW_AMD_seamless_cubemap_per_texture’: undeclared identifier* C2065        ‘GLEW_AMD_shader_atomic_counter_ops’: undeclared identifier* C2065        ‘GLEW_AMD_shader_ballot’: undeclared identifier* C2065        ‘GLEW_AMD_shader_explicit_vertex_parameter’: undeclared identifier* C2065        ‘GLEW_AMD_shader_stencil_export’: undeclared identifier* C2065        ‘GLEW_AMD_shader_stencil_value_export’: undeclared identifier* C2065        ‘GLEW_AMD_shader_trinary_minmax’: undeclared identifier* C2065        ‘GLEW_AMD_sparse_texture’: undeclared identifier* C2065        ‘GLEW_AMD_stencil_operation_extended’: undeclared identifier* C2065        ‘GLEW_AMD_texture_gather_bias_lod’: undeclared identifier* C2065        ‘GLEW_AMD_texture_texture4’: undeclared identifier* C2065        ‘GLEW_AMD_transform_feedback3_lines_triangles’: undeclared identifier* C2065        ‘GLEW_AMD_transform_feedback4’: undeclared identifier* C2065        ‘GLEW_AMD_vertex_shader_layer’: undeclared identifier* C2065        ‘GLEW_AMD_vertex_shader_tessellator’: undeclared identifier* C2065        ‘GLEW_AMD_vertex_shader_viewport_index’: undeclared identifier* C2065        ‘GLEW_ANDROID_extension_pack_es31a’: undeclared identifier* C2065        ‘GLEW_ANGLE_depth_texture’: undeclared identifier* C2065        ‘GLEW_ANGLE_framebuffer_blit’: undeclared identifier* C2065        ‘GLEW_ANGLE_framebuffer_multisample’: undeclared identifier* C2065        ‘GLEW_ANGLE_instanced_arrays’: undeclared identifier* C2065        ‘GLEW_ANGLE_pack_reverse_row_order’: undeclared identifier* C2065        ‘GLEW_ANGLE_program_binary’: undeclared identifier* C2065        ‘GLEW_ANGLE_texture_compression_dxt1’: undeclared identifier* C2065        ‘GLEW_ANGLE_texture_compression_dxt3’: undeclared identifier* C2065        ‘GLEW_ANGLE_texture_compression_dxt5’: undeclared identifier* C2065        ‘GLEW_ANGLE_texture_usage’: undeclared identifier* C2065        ‘GLEW_ANGLE_timer_query’: undeclared identifier* C2065        ‘GLEW_ANGLE_translated_shader_source’: undeclared identifier* C2065        ‘GLEW_APPLE_aux_depth_stencil’: undeclared identifier* C2065        ‘GLEW_APPLE_client_storage’: undeclared identifier* C2065        ‘GLEW_APPLE_clip_distance’: undeclared identifier* C2065        ‘GLEW_APPLE_color_buffer_packed_float’: undeclared identifier* C2065        ‘GLEW_APPLE_copy_texture_levels’: undeclared identifier* C2065        ‘GLEW_APPLE_element_array’: undeclared identifier* C2065        ‘GLEW_APPLE_fence’: undeclared identifier* C2065        ‘GLEW_APPLE_float_pixels’: undeclared identifier* C2065        ‘GLEW_APPLE_flush_buffer_range’: undeclared identifier* C2065        ‘GLEW_APPLE_framebuffer_multisample’: undeclared identifier* C2065        ‘GLEW_APPLE_object_purgeable’: undeclared identifier* C2065        ‘GLEW_APPLE_pixel_buffer’: undeclared identifier* C2065        ‘GLEW_APPLE_rgb_422’: undeclared identifier* C2065        ‘GLEW_APPLE_row_bytes’: undeclared identifier* C2065        ‘GLEW_APPLE_specular_vector’: undeclared identifier* C2065        ‘GLEW_APPLE_sync’: undeclared identifier* C2065        ‘GLEW_APPLE_texture_2D_limited_npot’: undeclared identifier* C2065        ‘GLEW_APPLE_texture_format_BGRA8888’: undeclared identifier* C2065        ‘GLEW_APPLE_texture_max_level’: undeclared identifier* C2065        ‘GLEW_APPLE_texture_packed_float’: undeclared identifier* C2065        ‘GLEW_APPLE_texture_range’: undeclared identifier* C2065        ‘GLEW_APPLE_transform_hint’: undeclared identifier* C2065        ‘GLEW_APPLE_vertex_array_object’: undeclared identifier* C2065        ‘GLEW_APPLE_vertex_array_range’: undeclared identifier* C2065        ‘GLEW_APPLE_vertex_program_evaluators’: undeclared identifier* C2065        ‘GLEW_APPLE_ycbcr_422’: undeclared identifier* C2065        ‘GLEW_ARB_arrays_of_arrays’: undeclared identifier* C2065        ‘GLEW_ARB_base_instance’: undeclared identifier* C2065        ‘GLEW_ARB_bindless_texture’: undeclared identifier* C2065        ‘GLEW_ARB_blend_func_extended’: undeclared identifier* C2065        ‘GLEW_ARB_buffer_storage’: undeclared identifier* C2065        ‘GLEW_ARB_cl_event’: undeclared identifier* C2065        ‘GLEW_ARB_clear_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_clear_texture’: undeclared identifier* C2065        ‘GLEW_ARB_clip_control’: undeclared identifier* C2065        ‘GLEW_ARB_color_buffer_float’: undeclared identifier* C2065        ‘GLEW_ARB_compatibility’: undeclared identifier* C2065        ‘GLEW_ARB_compressed_texture_pixel_storage’: undeclared identifier* C2065        ‘GLEW_ARB_compute_shader’: undeclared identifier* C2065        ‘GLEW_ARB_compute_variable_group_size’: undeclared identifier* C2065        ‘GLEW_ARB_conditional_render_inverted’: undeclared identifier* C2065        ‘GLEW_ARB_conservative_depth’: undeclared identifier* C2065        ‘GLEW_ARB_copy_buffer’: undeclared identifier* C2065        ‘GLEW_ARB_copy_image’: undeclared identifier* C2065        ‘GLEW_ARB_cull_distance’: undeclared identifier* C2065        ‘GLEW_ARB_debug_output’: undeclared identifier* C2065        ‘GLEW_ARB_depth_buffer_float’: undeclared identifier* C2065        ‘GLEW_ARB_depth_clamp’: undeclared identifier* C2065        ‘GLEW_ARB_depth_texture’: undeclared identifier* C2065        ‘GLEW_ARB_derivative_control’: undeclared identifier* C2065        ‘GLEW_ARB_direct_state_access’: undeclared identifier* C2065        ‘GLEW_ARB_draw_buffers’: undeclared identifier* C2065        ‘GLEW_ARB_draw_buffers_blend’: undeclared identifier* C2065        ‘GLEW_ARB_draw_elements_base_vertex’: undeclared identifier* C2065        ‘GLEW_ARB_draw_indirect’: undeclared identifier* C2065        ‘GLEW_ARB_draw_instanced’: undeclared identifier* C2065        ‘GLEW_ARB_enhanced_layouts’: undeclared identifier* C2065        ‘GLEW_ARB_ES2_compatibility’: undeclared identifier* C2065        ‘GLEW_ARB_ES3_1_compatibility’: undeclared identifier* C2065        ‘GLEW_ARB_ES3_2_compatibility’: undeclared identifier* C2065        ‘GLEW_ARB_ES3_compatibility’: undeclared identifier* C2065        ‘GLEW_ARB_explicit_attrib_location’: undeclared identifier* C2065        ‘GLEW_ARB_explicit_uniform_location’: undeclared identifier* C2065        ‘GLEW_ARB_fragment_coord_conventions’: undeclared identifier* C2065        ‘GLEW_ARB_fragment_layer_viewport’: undeclared identifier* C2065        ‘GLEW_ARB_fragment_program’: undeclared identifier* C2065        ‘GLEW_ARB_fragment_program_shadow’: undeclared identifier* C2065        ‘GLEW_ARB_fragment_shader’: undeclared identifier* C2065        ‘GLEW_ARB_fragment_shader_interlock’: undeclared identifier* C2065        ‘GLEW_ARB_framebuffer_no_attachments’: undeclared identifier* C2065        ‘GLEW_ARB_framebuffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_framebuffer_sRGB’: undeclared identifier* C2065        ‘GLEW_ARB_geometry_shader4’: undeclared identifier* C2065        ‘GLEW_ARB_get_program_binary’: undeclared identifier* C2065        ‘GLEW_ARB_get_texture_sub_image’: undeclared identifier* C2065        ‘GLEW_ARB_gl_spirv’: undeclared identifier* C2065        ‘GLEW_ARB_gpu_shader5’: undeclared identifier* C2065        ‘GLEW_ARB_gpu_shader_fp64’: undeclared identifier* C2065        ‘GLEW_ARB_gpu_shader_int64’: undeclared identifier* C2065        ‘GLEW_ARB_half_float_pixel’: undeclared identifier* C2065        ‘GLEW_ARB_half_float_vertex’: undeclared identifier* C2065        ‘GLEW_ARB_imaging’: undeclared identifier* C2065        ‘GLEW_ARB_indirect_parameters’: undeclared identifier* C2065        ‘GLEW_ARB_instanced_arrays’: undeclared identifier* C2065        ‘GLEW_ARB_internalformat_query2’: undeclared identifier* C2065        ‘GLEW_ARB_internalformat_query’: undeclared identifier* C2065        ‘GLEW_ARB_invalidate_subdata’: undeclared identifier* C2065        ‘GLEW_ARB_map_buffer_alignment’: undeclared identifier* C2065        ‘GLEW_ARB_map_buffer_range’: undeclared identifier* C2065        ‘GLEW_ARB_matrix_palette’: undeclared identifier* C2065        ‘GLEW_ARB_multi_bind’: undeclared identifier* C2065        ‘GLEW_ARB_multi_draw_indirect’: undeclared identifier* C2065        ‘GLEW_ARB_multisample’: undeclared identifier* C2065        ‘GLEW_ARB_multitexture’: undeclared identifier* C2065        ‘GLEW_ARB_occlusion_query2’: undeclared identifier* C2065        ‘GLEW_ARB_occlusion_query’: undeclared identifier* C2065        ‘GLEW_ARB_parallel_shader_compile’: undeclared identifier* C2065        ‘GLEW_ARB_pipeline_statistics_query’: undeclared identifier* C2065        ‘GLEW_ARB_pixel_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_point_parameters’: undeclared identifier* C2065        ‘GLEW_ARB_point_sprite’: undeclared identifier* C2065        ‘GLEW_ARB_polygon_offset_clamp’: undeclared identifier* C2065        ‘GLEW_ARB_post_depth_coverage’: undeclared identifier* C2065        ‘GLEW_ARB_program_interface_query’: undeclared identifier* C2065        ‘GLEW_ARB_provoking_vertex’: undeclared identifier* C2065        ‘GLEW_ARB_query_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_robust_buffer_access_behavior’: undeclared identifier* C2065        ‘GLEW_ARB_robustness’: undeclared identifier* C2065        ‘GLEW_ARB_robustness_application_isolation’: undeclared identifier* C2065        ‘GLEW_ARB_robustness_share_group_isolation’: undeclared identifier* C2065        ‘GLEW_ARB_sample_locations’: undeclared identifier* C2065        ‘GLEW_ARB_sample_shading’: undeclared identifier* C2065        ‘GLEW_ARB_sampler_objects’: undeclared identifier* C2065        ‘GLEW_ARB_seamless_cube_map’: undeclared identifier* C2065        ‘GLEW_ARB_seamless_cubemap_per_texture’: undeclared identifier* C2065        ‘GLEW_ARB_separate_shader_objects’: undeclared identifier* C2065        ‘GLEW_ARB_shader_atomic_counter_ops’: undeclared identifier* C2065        ‘GLEW_ARB_shader_atomic_counters’: undeclared identifier* C2065        ‘GLEW_ARB_shader_ballot’: undeclared identifier* C2065        ‘GLEW_ARB_shader_bit_encoding’: undeclared identifier* C2065        ‘GLEW_ARB_shader_clock’: undeclared identifier* C2065        ‘GLEW_ARB_shader_draw_parameters’: undeclared identifier* C2065        ‘GLEW_ARB_shader_group_vote’: undeclared identifier* C2065        ‘GLEW_ARB_shader_image_load_store’: undeclared identifier* C2065        ‘GLEW_ARB_shader_image_size’: undeclared identifier* C2065        ‘GLEW_ARB_shader_objects’: undeclared identifier* C2065        ‘GLEW_ARB_shader_precision’: undeclared identifier* C2065        ‘GLEW_ARB_shader_stencil_export’: undeclared identifier* C2065        ‘GLEW_ARB_shader_storage_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_shader_subroutine’: undeclared identifier* C2065        ‘GLEW_ARB_shader_texture_image_samples’: undeclared identifier* C2065        ‘GLEW_ARB_shader_texture_lod’: undeclared identifier* C2065        ‘GLEW_ARB_shader_viewport_layer_array’: undeclared identifier* C2065        ‘GLEW_ARB_shading_language_100’: undeclared identifier* C2065        ‘GLEW_ARB_shading_language_420pack’: undeclared identifier* C2065        ‘GLEW_ARB_shading_language_include’: undeclared identifier* C2065        ‘GLEW_ARB_shading_language_packing’: undeclared identifier* C2065        ‘GLEW_ARB_shadow’: undeclared identifier* C2065        ‘GLEW_ARB_shadow_ambient’: undeclared identifier* C2065        ‘GLEW_ARB_sparse_buffer’: undeclared identifier* C2065        ‘GLEW_ARB_sparse_texture2’: undeclared identifier* C2065        ‘GLEW_ARB_sparse_texture’: undeclared identifier* C2065        ‘GLEW_ARB_sparse_texture_clamp’: undeclared identifier* C2065        ‘GLEW_ARB_spirv_extensions’: undeclared identifier* C2065        ‘GLEW_ARB_stencil_texturing’: undeclared identifier* C2065        ‘GLEW_ARB_sync’: undeclared identifier* C2065        ‘GLEW_ARB_tessellation_shader’: undeclared identifier* C2065        ‘GLEW_ARB_texture_barrier’: undeclared identifier* C2065        ‘GLEW_ARB_texture_border_clamp’: undeclared identifier* C2065        ‘GLEW_ARB_texture_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_texture_buffer_object_rgb32’: undeclared identifier* C2065        ‘GLEW_ARB_texture_buffer_range’: undeclared identifier* C2065        ‘GLEW_ARB_texture_compression’: undeclared identifier* C2065        ‘GLEW_ARB_texture_compression_bptc’: undeclared identifier* C2065        ‘GLEW_ARB_texture_compression_rgtc’: undeclared identifier* C2065        ‘GLEW_ARB_texture_cube_map’: undeclared identifier* C2065        ‘GLEW_ARB_texture_cube_map_array’: undeclared identifier* C2065        ‘GLEW_ARB_texture_env_add’: undeclared identifier* C2065        ‘GLEW_ARB_texture_env_combine’: undeclared identifier* C2065        ‘GLEW_ARB_texture_env_crossbar’: undeclared identifier* C2065        ‘GLEW_ARB_texture_env_dot3’: undeclared identifier* C2065        ‘GLEW_ARB_texture_filter_anisotropic’: undeclared identifier* C2065        ‘GLEW_ARB_texture_filter_minmax’: undeclared identifier* C2065        ‘GLEW_ARB_texture_float’: undeclared identifier* C2065        ‘GLEW_ARB_texture_gather’: undeclared identifier* C2065        ‘GLEW_ARB_texture_mirror_clamp_to_edge’: undeclared identifier* C2065        ‘GLEW_ARB_texture_mirrored_repeat’: undeclared identifier* C2065        ‘GLEW_ARB_texture_multisample’: undeclared identifier* C2065        ‘GLEW_ARB_texture_non_power_of_two’: undeclared identifier* C2065        ‘GLEW_ARB_texture_query_levels’: undeclared identifier* C2065        ‘GLEW_ARB_texture_query_lod’: undeclared identifier* C2065        ‘GLEW_ARB_texture_rectangle’: undeclared identifier* C2065        ‘GLEW_ARB_texture_rg’: undeclared identifier* C2065        ‘GLEW_ARB_texture_rgb10_a2ui’: undeclared identifier* C2065        ‘GLEW_ARB_texture_stencil8’: undeclared identifier* C2065        ‘GLEW_ARB_texture_storage’: undeclared identifier* C2065        ‘GLEW_ARB_texture_storage_multisample’: undeclared identifier* C2065        ‘GLEW_ARB_texture_swizzle’: undeclared identifier* C2065        ‘GLEW_ARB_texture_view’: undeclared identifier* C2065        ‘GLEW_ARB_timer_query’: undeclared identifier* C2065        ‘GLEW_ARB_transform_feedback2’: undeclared identifier* C2065        ‘GLEW_ARB_transform_feedback3’: undeclared identifier* C2065        ‘GLEW_ARB_transform_feedback_instanced’: undeclared identifier* C2065        ‘GLEW_ARB_transform_feedback_overflow_query’: undeclared identifier* C2065        ‘GLEW_ARB_transpose_matrix’: undeclared identifier* C2065        ‘GLEW_ARB_uniform_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_array_bgra’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_array_object’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_attrib_64bit’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_attrib_binding’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_blend’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_buffer_object’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_program’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_shader’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_type_2_10_10_10_rev’: undeclared identifier* C2065        ‘GLEW_ARB_vertex_type_10f_11f_11f_rev’: undeclared identifier* C2065        ‘GLEW_ARB_viewport_array’: undeclared identifier* C2065        ‘GLEW_ARB_window_pos’: undeclared identifier* C2065        ‘GLEW_ARM_mali_program_binary’: undeclared identifier* C2065        ‘GLEW_ARM_mali_shader_binary’: undeclared identifier* C2065        ‘GLEW_ARM_rgba8’: undeclared identifier* C2065        ‘GLEW_ARM_shader_framebuffer_fetch’: undeclared identifier* C2065        ‘GLEW_ARM_shader_framebuffer_fetch_depth_stencil’: undeclared identifier* C2065        ‘GLEW_ATI_draw_buffers’: undeclared identifier* C2065        ‘GLEW_ATI_element_array’: undeclared identifier* C2065        ‘GLEW_ATI_envmap_bumpmap’: undeclared identifier* C2065        ‘GLEW_ATI_fragment_shader’: undeclared identifier* C2065        ‘GLEW_ATI_map_object_buffer’: undeclared identifier* C2065        ‘GLEW_ATI_meminfo’: undeclared identifier* C2065        ‘GLEW_ATI_pn_triangles’: undeclared identifier* C2065        ‘GLEW_ATI_separate_stencil’: undeclared identifier* C2065        ‘GLEW_ATI_shader_texture_lod’: undeclared identifier* C2065        ‘GLEW_ATI_text_fragment_shader’: undeclared identifier* C2065        ‘GLEW_ATI_texture_compression_3dc’: undeclared identifier* C2065        ‘GLEW_ATI_texture_env_combine3’: undeclared identifier* C2065        ‘GLEW_ATI_texture_float’: undeclared identifier* C2065        ‘GLEW_ATI_texture_mirror_once’: undeclared identifier* C2065        ‘GLEW_ATI_vertex_array_object’: undeclared identifier* C2065        ‘GLEW_ATI_vertex_attrib_array_object’: undeclared identifier* C2065        ‘GLEW_ATI_vertex_streams’: undeclared identifier* C2065        ‘GLEW_ATIX_point_sprites’: undeclared identifier* C2065        ‘GLEW_ATIX_texture_env_combine3’: undeclared identifier* C2065        ‘GLEW_ATIX_texture_env_route’: undeclared identifier* C2065        ‘GLEW_ATIX_vertex_shader_output_point_size’: undeclared identifier* C2065        ‘GLEW_EGL_KHR_context_flush_control’: undeclared identifier* C2065        ‘GLEW_EGL_NV_robustness_video_memory_purge’: undeclared identifier* C2065        ‘GLEW_ERROR_GL_VERSION_10_ONLY’: undeclared identifier* C2065        ‘GLEW_ERROR_GLX_VERSION_11_ONLY’: undeclared identifier* C2065        ‘GLEW_ERROR_NO_GL_VERSION’: undeclared identifier* C2065        ‘GLEW_ERROR_NO_GLX_DISPLAY’: undeclared identifier* C2065        ‘GLEW_EXT_422_pixels’: undeclared identifier* C2065        ‘GLEW_EXT_abgr’: undeclared identifier* C2065        ‘GLEW_EXT_base_instance’: undeclared identifier* C2065        ‘GLEW_EXT_bgra’: undeclared identifier* C2065        ‘GLEW_EXT_bindable_uniform’: undeclared identifier* C2065        ‘GLEW_EXT_blend_color’: undeclared identifier* C2065        ‘GLEW_EXT_blend_equation_separate’: undeclared identifier* C2065        ‘GLEW_EXT_blend_func_extended’: undeclared identifier* C2065        ‘GLEW_EXT_blend_func_separate’: undeclared identifier* C2065        ‘GLEW_EXT_blend_logic_op’: undeclared identifier* C2065        ‘GLEW_EXT_blend_minmax’: undeclared identifier* C2065        ‘GLEW_EXT_blend_subtract’: undeclared identifier* C2065        ‘GLEW_EXT_buffer_storage’: undeclared identifier* C2065        ‘GLEW_EXT_Cg_shader’: undeclared identifier* C2065        ‘GLEW_EXT_clear_texture’: undeclared identifier* C2065        ‘GLEW_EXT_clip_cull_distance’: undeclared identifier* C2065        ‘GLEW_EXT_clip_volume_hint’: undeclared identifier* C2065        ‘GLEW_EXT_cmyka’: undeclared identifier* C2065        ‘GLEW_EXT_color_buffer_float’: undeclared identifier* C2065        ‘GLEW_EXT_color_buffer_half_float’: undeclared identifier* C2065        ‘GLEW_EXT_color_subtable’: undeclared identifier* C2065        ‘GLEW_EXT_compiled_vertex_array’: undeclared identifier* C2065        ‘GLEW_EXT_compressed_ETC1_RGB8_sub_texture’: undeclared identifier* C2065        ‘GLEW_EXT_conservative_depth’: undeclared identifier* C2065        ‘GLEW_EXT_convolution’: undeclared identifier* C2065        ‘GLEW_EXT_coordinate_frame’: undeclared identifier* C2065        ‘GLEW_EXT_copy_image’: undeclared identifier* C2065        ‘GLEW_EXT_copy_texture’: undeclared identifier* C2065        ‘GLEW_EXT_cull_vertex’: undeclared identifier* C2065        ‘GLEW_EXT_debug_label’: undeclared identifier* C2065        ‘GLEW_EXT_debug_marker’: undeclared identifier* C2065        ‘GLEW_EXT_depth_bounds_test’: undeclared identifier* C2065        ‘GLEW_EXT_direct_state_access’: undeclared identifier* C2065        ‘GLEW_EXT_discard_framebuffer’: undeclared identifier* C2065        ‘GLEW_EXT_draw_buffers2’: undeclared identifier* C2065        ‘GLEW_EXT_draw_buffers’: undeclared identifier* C2065        ‘GLEW_EXT_draw_buffers_indexed’: undeclared identifier* C2065        ‘GLEW_EXT_draw_elements_base_vertex’: undeclared identifier* C2065        ‘GLEW_EXT_draw_instanced’: undeclared identifier* C2065        ‘GLEW_EXT_draw_range_elements’: undeclared identifier* C2065        ‘GLEW_EXT_EGL_image_array’: undeclared identifier* C2065        ‘GLEW_EXT_external_buffer’: undeclared identifier* C2065        ‘GLEW_EXT_float_blend’: undeclared identifier* C2065        ‘GLEW_EXT_fog_coord’: undeclared identifier* C2065        ‘GLEW_EXT_frag_depth’: undeclared identifier* C2065        ‘GLEW_EXT_fragment_lighting’: undeclared identifier* C2065        ‘GLEW_EXT_framebuffer_blit’: undeclared identifier* C2065        ‘GLEW_EXT_framebuffer_multisample’: undeclared identifier* C2065        ‘GLEW_EXT_framebuffer_multisample_blit_scaled’: undeclared identifier* C2065        ‘GLEW_EXT_framebuffer_object’: undeclared identifier* C2065        ‘GLEW_EXT_framebuffer_sRGB’: undeclared identifier* C2065        ‘GLEW_EXT_geometry_point_size’: undeclared identifier* C2065        ‘GLEW_EXT_geometry_shader4’: undeclared identifier* C2065        ‘GLEW_EXT_geometry_shader’: undeclared identifier* C2065        ‘GLEW_EXT_gpu_program_parameters’: undeclared identifier* C2065        ‘GLEW_EXT_gpu_shader4’: undeclared identifier* C2065        ‘GLEW_EXT_gpu_shader5’: undeclared identifier* C2065        ‘GLEW_EXT_histogram’: undeclared identifier* C2065        ‘GLEW_EXT_index_array_formats’: undeclared identifier* C2065        ‘GLEW_EXT_index_func’: undeclared identifier* C2065        ‘GLEW_EXT_index_material’: undeclared identifier* C2065        ‘GLEW_EXT_index_texture’: undeclared identifier* C2065        ‘GLEW_EXT_instanced_arrays’: undeclared identifier* C2065        ‘GLEW_EXT_light_texture’: undeclared identifier* C2065        ‘GLEW_EXT_map_buffer_range’: undeclared identifier* C2065        ‘GLEW_EXT_memory_object’: undeclared identifier* C2065        ‘GLEW_EXT_memory_object_fd’: undeclared identifier* C2065        ‘GLEW_EXT_memory_object_win32’: undeclared identifier* C2065        ‘GLEW_EXT_misc_attribute’: undeclared identifier* C2065        ‘GLEW_EXT_multi_draw_arrays’: undeclared identifier* C2065        ‘GLEW_EXT_multi_draw_indirect’: undeclared identifier* C2065        ‘GLEW_EXT_multiple_textures’: undeclared identifier* C2065        ‘GLEW_EXT_multisample’: undeclared identifier* C2065        ‘GLEW_EXT_multisample_compatibility’: undeclared identifier* C2065        ‘GLEW_EXT_multisampled_render_to_texture2’: undeclared identifier* C2065        ‘GLEW_EXT_multisampled_render_to_texture’: undeclared identifier* C2065        ‘GLEW_EXT_multiview_draw_buffers’: undeclared identifier* C2065        ‘GLEW_EXT_packed_depth_stencil’: undeclared identifier* C2065        ‘GLEW_EXT_packed_float’: undeclared identifier* C2065        ‘GLEW_EXT_packed_pixels’: undeclared identifier* C2065        ‘GLEW_EXT_paletted_texture’: undeclared identifier* C2065        ‘GLEW_EXT_pixel_buffer_object’: undeclared identifier* C2065        ‘GLEW_EXT_pixel_transform’: undeclared identifier* C2065        ‘GLEW_EXT_pixel_transform_color_table’: undeclared identifier* C2065        ‘GLEW_EXT_point_parameters’: undeclared identifier* C2065        ‘GLEW_EXT_polygon_offset’: undeclared identifier* C2065        ‘GLEW_EXT_polygon_offset_clamp’: undeclared identifier* C2065        ‘GLEW_EXT_post_depth_coverage’: undeclared identifier* C2065        ‘GLEW_EXT_provoking_vertex’: undeclared identifier* C2065        ‘GLEW_EXT_pvrtc_sRGB’: undeclared identifier* C2065        ‘GLEW_EXT_raster_multisample’: undeclared identifier* C2065        ‘GLEW_EXT_read_format_bgra’: undeclared identifier* C2065        ‘GLEW_EXT_render_snorm’: undeclared identifier* C2065        ‘GLEW_EXT_rescale_normal’: undeclared identifier* C2065        ‘GLEW_EXT_scene_marker’: undeclared identifier* C2065        ‘GLEW_EXT_secondary_color’: undeclared identifier* C2065        ‘GLEW_EXT_semaphore’: undeclared identifier* C2065        ‘GLEW_EXT_semaphore_fd’: undeclared identifier* C2065        ‘GLEW_EXT_semaphore_win32’: undeclared identifier* C2065        ‘GLEW_EXT_separate_shader_objects’: undeclared identifier* C2065        ‘GLEW_EXT_separate_specular_color’: undeclared identifier* C2065        ‘GLEW_EXT_shader_framebuffer_fetch’: undeclared identifier* C2065        ‘GLEW_EXT_shader_group_vote’: undeclared identifier* C2065        ‘GLEW_EXT_shader_image_load_formatted’: undeclared identifier* C2065        ‘GLEW_EXT_shader_image_load_store’: undeclared identifier* C2065        ‘GLEW_EXT_shader_implicit_conversions’: undeclared identifier* C2065        ‘GLEW_EXT_shader_integer_mix’: undeclared identifier* C2065        ‘GLEW_EXT_shader_io_blocks’: undeclared identifier* C2065        ‘GLEW_EXT_shader_non_constant_global_initializers’: undeclared identifier* C2065        ‘GLEW_EXT_shader_pixel_local_storage2’: undeclared identifier* C2065        ‘GLEW_EXT_shader_pixel_local_storage’: undeclared identifier* C2065        ‘GLEW_EXT_shader_texture_lod’: undeclared identifier* C2065        ‘GLEW_EXT_shadow_funcs’: undeclared identifier* C2065        ‘GLEW_EXT_shadow_samplers’: undeclared identifier* C2065        ‘GLEW_EXT_shared_texture_palette’: undeclared identifier* C2065        ‘GLEW_EXT_sparse_texture2’: undeclared identifier* C2065        ‘GLEW_EXT_sparse_texture’: undeclared identifier* C2065        ‘GLEW_EXT_sRGB’: undeclared identifier* C2065        ‘GLEW_EXT_sRGB_write_control’: undeclared identifier* C2065        ‘GLEW_EXT_stencil_clear_tag’: undeclared identifier* C2065        ‘GLEW_EXT_stencil_two_side’: undeclared identifier* C2065        ‘GLEW_EXT_stencil_wrap’: undeclared identifier* C2065        ‘GLEW_EXT_subtexture’: undeclared identifier* C2065        ‘GLEW_EXT_texture3D’: undeclared identifier* C2065        ‘GLEW_EXT_texture’: undeclared identifier* C2065        ‘GLEW_EXT_texture_array’: undeclared identifier* C2065        ‘GLEW_EXT_texture_buffer_object’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_astc_decode_mode’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_astc_decode_mode_rgb9e5’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_bptc’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_dxt1’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_latc’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_rgtc’: undeclared identifier* C2065        ‘GLEW_EXT_texture_compression_s3tc’: undeclared identifier* C2065        ‘GLEW_EXT_texture_cube_map’: undeclared identifier* C2065        ‘GLEW_EXT_texture_cube_map_array’: undeclared identifier* C2065        ‘GLEW_EXT_texture_edge_clamp’: undeclared identifier* C2065        ‘GLEW_EXT_texture_env’: undeclared identifier* C2065        ‘GLEW_EXT_texture_env_add’: undeclared identifier* C2065        ‘GLEW_EXT_texture_env_combine’: undeclared identifier* C2065        ‘GLEW_EXT_texture_env_dot3’: undeclared identifier* C2065        ‘GLEW_EXT_texture_filter_anisotropic’: undeclared identifier* C2065        ‘GLEW_EXT_texture_filter_minmax’: undeclared identifier* C2065        ‘GLEW_EXT_texture_format_BGRA8888’: undeclared identifier* C2065        ‘GLEW_EXT_texture_integer’: undeclared identifier* C2065        ‘GLEW_EXT_texture_lod_bias’: undeclared identifier* C2065        ‘GLEW_EXT_texture_mirror_clamp’: undeclared identifier* C2065        ‘GLEW_EXT_texture_norm16’: undeclared identifier* C2065        ‘GLEW_EXT_texture_object’: undeclared identifier* C2065        ‘GLEW_EXT_texture_perturb_normal’: undeclared identifier* C2065        ‘GLEW_EXT_texture_rectangle’: undeclared identifier* C2065        ‘GLEW_EXT_texture_rg’: undeclared identifier* C2065        ‘GLEW_EXT_texture_shared_exponent’: undeclared identifier* C2065        ‘GLEW_EXT_texture_snorm’: undeclared identifier* C2065        ‘GLEW_EXT_texture_sRGB’: undeclared identifier* C2065        ‘GLEW_EXT_texture_sRGB_decode’: undeclared identifier* C2065        ‘GLEW_EXT_texture_sRGB_R8’: undeclared identifier* C2065        ‘GLEW_EXT_texture_sRGB_RG8’: undeclared identifier* C2065        ‘GLEW_EXT_texture_storage’: undeclared identifier* C2065        ‘GLEW_EXT_texture_swizzle’: undeclared identifier* C2065        ‘GLEW_EXT_texture_type_2_10_10_10_REV’: undeclared identifier* C2065        ‘GLEW_EXT_texture_view’: undeclared identifier* C2065        ‘GLEW_EXT_timer_query’: undeclared identifier* C2065        ‘GLEW_EXT_transform_feedback’: undeclared identifier* C2065        ‘GLEW_EXT_unpack_subimage’: undeclared identifier* C2065        ‘GLEW_EXT_vertex_array’: undeclared identifier* C2065        ‘GLEW_EXT_vertex_array_bgra’: undeclared identifier* C2065        ‘GLEW_EXT_vertex_array_setXXX’: undeclared identifier* C2065        ‘GLEW_EXT_vertex_attrib_64bit’: undeclared identifier* C2065        ‘GLEW_EXT_vertex_shader’: undeclared identifier* C2065        ‘GLEW_EXT_vertex_weighting’: undeclared identifier* C2065        ‘GLEW_EXT_win32_keyed_mutex’: undeclared identifier* C2065        ‘GLEW_EXT_window_rectangles’: undeclared identifier* C2065        ‘GLEW_EXT_x11_sync_object’: undeclared identifier* C2065        ‘GLEW_EXT_YUV_target’: undeclared identifier* C2065        ‘GLEW_GET_FUN’: undeclared identifier* C2065        ‘GLEW_GREMEDY_frame_terminator’: undeclared identifier* C2065        ‘GLEW_GREMEDY_string_marker’: undeclared identifier* C2065        ‘GLEW_HP_convolution_border_modes’: undeclared identifier* C2065        ‘GLEW_HP_image_transform’: undeclared identifier* C2065        ‘GLEW_HP_occlusion_test’: undeclared identifier* C2065        ‘GLEW_HP_texture_lighting’: undeclared identifier* C2065        ‘GLEW_IBM_cull_vertex’: undeclared identifier* C2065        ‘GLEW_IBM_multimode_draw_arrays’: undeclared identifier* C2065        ‘GLEW_IBM_rasterpos_clip’: undeclared identifier* C2065        ‘GLEW_IBM_static_data’: undeclared identifier* C2065        ‘GLEW_IBM_texture_mirrored_repeat’: undeclared identifier* C2065        ‘GLEW_IBM_vertex_array_lists’: undeclared identifier* C2065        ‘GLEW_INGR_color_clamp’: undeclared identifier* C2065        ‘GLEW_INGR_interlace_read’: undeclared identifier* C2065        ‘GLEW_INTEL_conservative_rasterization’: undeclared identifier* C2065        ‘GLEW_INTEL_fragment_shader_ordering’: undeclared identifier* C2065        ‘GLEW_INTEL_framebuffer_CMAA’: undeclared identifier* C2065        ‘GLEW_INTEL_map_texture’: undeclared identifier* C2065        ‘GLEW_INTEL_parallel_arrays’: undeclared identifier* C2065        ‘GLEW_INTEL_performance_query’: undeclared identifier* C2065        ‘GLEW_INTEL_texture_scissor’: undeclared identifier* C2065        ‘GLEW_KHR_blend_equation_advanced’: undeclared identifier* C2065        ‘GLEW_KHR_blend_equation_advanced_coherent’: undeclared identifier* C2065        ‘GLEW_KHR_context_flush_control’: undeclared identifier* C2065        ‘GLEW_KHR_debug’: undeclared identifier* C2065        ‘GLEW_KHR_no_error’: undeclared identifier* C2065        ‘GLEW_KHR_parallel_shader_compile’: undeclared identifier* C2065        ‘GLEW_KHR_robust_buffer_access_behavior’: undeclared identifier* C2065        ‘GLEW_KHR_robustness’: undeclared identifier* C2065        ‘GLEW_KHR_texture_compression_astc_hdr’: undeclared identifier* C2065        ‘GLEW_KHR_texture_compression_astc_ldr’: undeclared identifier* C2065        ‘GLEW_KHR_texture_compression_astc_sliced_3d’: undeclared identifier* C2065        ‘GLEW_KTX_buffer_region’: undeclared identifier* C2065        ‘GLEW_MESA_pack_invert’: undeclared identifier* C2065        ‘GLEW_MESA_resize_buffers’: undeclared identifier* C2065        ‘GLEW_MESA_shader_integer_functions’: undeclared identifier* C2065        ‘GLEW_MESA_window_pos’: undeclared identifier* C2065        ‘GLEW_MESA_ycbcr_texture’: undeclared identifier* C2065        ‘GLEW_MESAX_texture_stack’: undeclared identifier* C2065        ‘GLEW_NO_ERROR’: undeclared identifier* C2065        ‘GLEW_NV_3dvision_settings’: undeclared identifier* C2065        ‘GLEW_NV_alpha_to_coverage_dither_control’: undeclared identifier* C2065        ‘GLEW_NV_bgr’: undeclared identifier* C2065        ‘GLEW_NV_bindless_multi_draw_indirect’: undeclared identifier* C2065        ‘GLEW_NV_bindless_multi_draw_indirect_count’: undeclared identifier* C2065        ‘GLEW_NV_bindless_texture’: undeclared identifier* C2065        ‘GLEW_NV_blend_equation_advanced’: undeclared identifier* C2065        ‘GLEW_NV_blend_equation_advanced_coherent’: undeclared identifier* C2065        ‘GLEW_NV_blend_minmax_factor’: undeclared identifier* C2065        ‘GLEW_NV_blend_square’: undeclared identifier* C2065        ‘GLEW_NV_clip_space_w_scaling’: undeclared identifier* C2065        ‘GLEW_NV_command_list’: undeclared identifier* C2065        ‘GLEW_NV_compute_program5’: undeclared identifier* C2065        ‘GLEW_NV_conditional_render’: undeclared identifier* C2065        ‘GLEW_NV_conservative_raster’: undeclared identifier* C2065        ‘GLEW_NV_conservative_raster_dilate’: undeclared identifier* C2065        ‘GLEW_NV_conservative_raster_pre_snap_triangles’: undeclared identifier* C2065        ‘GLEW_NV_copy_buffer’: undeclared identifier* C2065        ‘GLEW_NV_copy_depth_to_color’: undeclared identifier* C2065        ‘GLEW_NV_copy_image’: undeclared identifier* C2065        ‘GLEW_NV_deep_texture3D’: undeclared identifier* C2065        ‘GLEW_NV_depth_buffer_float’: undeclared identifier* C2065        ‘GLEW_NV_depth_clamp’: undeclared identifier* C2065        ‘GLEW_NV_depth_range_unclamped’: undeclared identifier* C2065        ‘GLEW_NV_draw_buffers’: undeclared identifier* C2065        ‘GLEW_NV_draw_instanced’: undeclared identifier* C2065        ‘GLEW_NV_draw_texture’: undeclared identifier* C2065        ‘GLEW_NV_draw_vulkan_image’: undeclared identifier* C2065        ‘GLEW_NV_EGL_stream_consumer_external’: undeclared identifier* C2065        ‘GLEW_NV_evaluators’: undeclared identifier* C2065        ‘GLEW_NV_explicit_attrib_location’: undeclared identifier* C2065        ‘GLEW_NV_explicit_multisample’: undeclared identifier* C2065        ‘GLEW_NV_fbo_color_attachments’: undeclared identifier* C2065        ‘GLEW_NV_fence’: undeclared identifier* C2065        ‘GLEW_NV_fill_rectangle’: undeclared identifier* C2065        ‘GLEW_NV_float_buffer’: undeclared identifier* C2065        ‘GLEW_NV_fog_distance’: undeclared identifier* C2065        ‘GLEW_NV_fragment_coverage_to_color’: undeclared identifier* C2065        ‘GLEW_NV_fragment_program2’: undeclared identifier* C2065        ‘GLEW_NV_fragment_program4’: undeclared identifier* C2065        ‘GLEW_NV_fragment_program’: undeclared identifier* C2065        ‘GLEW_NV_fragment_program_option’: undeclared identifier* C2065        ‘GLEW_NV_fragment_shader_interlock’: undeclared identifier* C2065        ‘GLEW_NV_framebuffer_blit’: undeclared identifier* C2065        ‘GLEW_NV_framebuffer_mixed_samples’: undeclared identifier* C2065        ‘GLEW_NV_framebuffer_multisample’: undeclared identifier* C2065        ‘GLEW_NV_framebuffer_multisample_coverage’: undeclared identifier* C2065        ‘GLEW_NV_generate_mipmap_sRGB’: undeclared identifier* C2065        ‘GLEW_NV_geometry_program4’: undeclared identifier* C2065        ‘GLEW_NV_geometry_shader4’: undeclared identifier* C2065        ‘GLEW_NV_geometry_shader_passthrough’: undeclared identifier* C2065        ‘GLEW_NV_gpu_multicast’: undeclared identifier* C2065        ‘GLEW_NV_gpu_program4’: undeclared identifier* C2065        ‘GLEW_NV_gpu_program5’: undeclared identifier* C2065        ‘GLEW_NV_gpu_program5_mem_extended’: undeclared identifier* C2065        ‘GLEW_NV_gpu_program_fp64’: undeclared identifier* C2065        ‘GLEW_NV_gpu_shader5’: undeclared identifier* C2065        ‘GLEW_NV_half_float’: undeclared identifier* C2065        ‘GLEW_NV_image_formats’: undeclared identifier* C2065        ‘GLEW_NV_instanced_arrays’: undeclared identifier* C2065        ‘GLEW_NV_internalformat_sample_query’: undeclared identifier* C2065        ‘GLEW_NV_light_max_exponent’: undeclared identifier* C2065        ‘GLEW_NV_multisample_coverage’: undeclared identifier* C2065        ‘GLEW_NV_multisample_filter_hint’: undeclared identifier* C2065        ‘GLEW_NV_non_square_matrices’: undeclared identifier* C2065        ‘GLEW_NV_occlusion_query’: undeclared identifier* C2065        ‘GLEW_NV_pack_subimage’: undeclared identifier* C2065        ‘GLEW_NV_packed_depth_stencil’: undeclared identifier* C2065        ‘GLEW_NV_packed_float’: undeclared identifier* C2065        ‘GLEW_NV_packed_float_linear’: undeclared identifier* C2065        ‘GLEW_NV_parameter_buffer_object2’: undeclared identifier* C2065        ‘GLEW_NV_parameter_buffer_object’: undeclared identifier* C2065        ‘GLEW_NV_path_rendering’: undeclared identifier* C2065        ‘GLEW_NV_path_rendering_shared_edge’: undeclared identifier* C2065        ‘GLEW_NV_pixel_buffer_object’: undeclared identifier* C2065        ‘GLEW_NV_pixel_data_range’: undeclared identifier* C2065        ‘GLEW_NV_platform_binary’: undeclared identifier* C2065        ‘GLEW_NV_point_sprite’: undeclared identifier* C2065        ‘GLEW_NV_polygon_mode’: undeclared identifier* C2065        ‘GLEW_NV_present_video’: undeclared identifier* C2065        ‘GLEW_NV_primitive_restart’: undeclared identifier* C2065        ‘GLEW_NV_read_depth’: undeclared identifier* C2065        ‘GLEW_NV_read_depth_stencil’: undeclared identifier* C2065        ‘GLEW_NV_read_stencil’: undeclared identifier* C2065        ‘GLEW_NV_register_combiners2’: undeclared identifier* C2065        ‘GLEW_NV_register_combiners’: undeclared identifier* C2065        ‘GLEW_NV_robustness_video_memory_purge’: undeclared identifier* C2065        ‘GLEW_NV_sample_locations’: undeclared identifier* C2065        ‘GLEW_NV_sample_mask_override_coverage’: undeclared identifier* C2065        ‘GLEW_NV_shader_atomic_counters’: undeclared identifier* C2065        ‘GLEW_NV_shader_atomic_float64’: undeclared identifier* C2065        ‘GLEW_NV_shader_atomic_float’: undeclared identifier* C2065        ‘GLEW_NV_shader_atomic_fp16_vector’: undeclared identifier* C2065        ‘GLEW_NV_shader_atomic_int64’: undeclared identifier* C2065        ‘GLEW_NV_shader_buffer_load’: undeclared identifier* C2065        ‘GLEW_NV_shader_noperspective_interpolation’: undeclared identifier* C2065        ‘GLEW_NV_shader_storage_buffer_object’: undeclared identifier* C2065        ‘GLEW_NV_shader_thread_group’: undeclared identifier* C2065        ‘GLEW_NV_shader_thread_shuffle’: undeclared identifier* C2065        ‘GLEW_NV_shadow_samplers_array’: undeclared identifier* C2065        ‘GLEW_NV_shadow_samplers_cube’: undeclared identifier* C2065        ‘GLEW_NV_sRGB_formats’: undeclared identifier* C2065        ‘GLEW_NV_stereo_view_rendering’: undeclared identifier* C2065        ‘GLEW_NV_tessellation_program5’: undeclared identifier* C2065        ‘GLEW_NV_texgen_emboss’: undeclared identifier* C2065        ‘GLEW_NV_texgen_reflection’: undeclared identifier* C2065        ‘GLEW_NV_texture_array’: undeclared identifier* C2065        ‘GLEW_NV_texture_barrier’: undeclared identifier* C2065        ‘GLEW_NV_texture_border_clamp’: undeclared identifier* C2065        ‘GLEW_NV_texture_compression_latc’: undeclared identifier* C2065        ‘GLEW_NV_texture_compression_s3tc’: undeclared identifier* C2065        ‘GLEW_NV_texture_compression_s3tc_update’: undeclared identifier* C2065        ‘GLEW_NV_texture_compression_vtc’: undeclared identifier* C2065        ‘GLEW_NV_texture_env_combine4’: undeclared identifier* C2065        ‘GLEW_NV_texture_expand_normal’: undeclared identifier* C2065        ‘GLEW_NV_texture_multisample’: undeclared identifier* C2065        ‘GLEW_NV_texture_npot_2D_mipmap’: undeclared identifier* C2065        ‘GLEW_NV_texture_rectangle’: undeclared identifier* C2065        ‘GLEW_NV_texture_rectangle_compressed’: undeclared identifier* C2065        ‘GLEW_NV_texture_shader2’: undeclared identifier* C2065        ‘GLEW_NV_texture_shader3’: undeclared identifier* C2065        ‘GLEW_NV_texture_shader’: undeclared identifier* C2065        ‘GLEW_NV_transform_feedback2’: undeclared identifier* C2065        ‘GLEW_NV_transform_feedback’: undeclared identifier* C2065        ‘GLEW_NV_uniform_buffer_unified_memory’: undeclared identifier* C2065        ‘GLEW_NV_vdpau_interop’: undeclared identifier* C2065        ‘GLEW_NV_vertex_array_range2’: undeclared identifier* C2065        ‘GLEW_NV_vertex_array_range’: undeclared identifier* C2065        ‘GLEW_NV_vertex_attrib_integer_64bit’: undeclared identifier* C2065        ‘GLEW_NV_vertex_buffer_unified_memory’: undeclared identifier* C2065        ‘GLEW_NV_vertex_program1_1’: undeclared identifier* C2065        ‘GLEW_NV_vertex_program2’: undeclared identifier* C2065        ‘GLEW_NV_vertex_program2_option’: undeclared identifier* C2065        ‘GLEW_NV_vertex_program3’: undeclared identifier* C2065        ‘GLEW_NV_vertex_program4’: undeclared identifier* C2065        ‘GLEW_NV_vertex_program’: undeclared identifier* C2065        ‘GLEW_NV_video_capture’: undeclared identifier* C2065        ‘GLEW_NV_viewport_array2’: undeclared identifier* C2065        ‘GLEW_NV_viewport_array’: undeclared identifier* C2065        ‘GLEW_NV_viewport_swizzle’: undeclared identifier* C2065        ‘GLEW_NVX_blend_equation_advanced_multi_draw_buffers’: undeclared identifier* C2065        ‘GLEW_NVX_conditional_render’: undeclared identifier* C2065        ‘GLEW_NVX_gpu_memory_info’: undeclared identifier* C2065        ‘GLEW_NVX_linked_gpu_multicast’: undeclared identifier* C2065        ‘GLEW_OES_byte_coordinates’: undeclared identifier* C2065        ‘GLEW_OK’: undeclared identifier* C2065        ‘GLEW_OML_interlace’: undeclared identifier* C2065        ‘GLEW_OML_resample’: undeclared identifier* C2065        ‘GLEW_OML_subsample’: undeclared identifier* C2065        ‘GLEW_OVR_multiview2’: undeclared identifier* C2065        ‘GLEW_OVR_multiview’: undeclared identifier* C2065        ‘GLEW_OVR_multiview_multisampled_render_to_texture’: undeclared identifier* C2065        ‘GLEW_PGI_misc_hints’: undeclared identifier* C2065        ‘GLEW_PGI_vertex_hints’: undeclared identifier* C2065        ‘GLEW_QCOM_alpha_test’: undeclared identifier* C2065        ‘GLEW_QCOM_binning_control’: undeclared identifier* C2065        ‘GLEW_QCOM_driver_control’: undeclared identifier* C2065        ‘GLEW_QCOM_extended_get2’: undeclared identifier* C2065        ‘GLEW_QCOM_extended_get’: undeclared identifier* C2065        ‘GLEW_QCOM_framebuffer_foveated’: undeclared identifier* C2065        ‘GLEW_QCOM_perfmon_global_mode’: undeclared identifier* C2065        ‘GLEW_QCOM_shader_framebuffer_fetch_noncoherent’: undeclared identifier* C2065        ‘GLEW_QCOM_tiled_rendering’: undeclared identifier* C2065        ‘GLEW_QCOM_writeonly_rendering’: undeclared identifier* C2065        ‘GLEW_REGAL_enable’: undeclared identifier* C2065        ‘GLEW_REGAL_error_string’: undeclared identifier* C2065        ‘GLEW_REGAL_ES1_0_compatibility’: undeclared identifier* C2065        ‘GLEW_REGAL_ES1_1_compatibility’: undeclared identifier* C2065        ‘GLEW_REGAL_extension_query’: undeclared identifier* C2065        ‘GLEW_REGAL_log’: undeclared identifier* C2065        ‘GLEW_REGAL_proc_address’: undeclared identifier* C2065        ‘GLEW_REND_screen_coordinates’: undeclared identifier* C2065        ‘GLEW_S3_s3tc’: undeclared identifier* C2065        ‘GLEW_SGI_color_matrix’: undeclared identifier* C2065        ‘GLEW_SGI_color_table’: undeclared identifier* C2065        ‘GLEW_SGI_complex’: undeclared identifier* C2065        ‘GLEW_SGI_complex_type’: undeclared identifier* C2065        ‘GLEW_SGI_fft’: undeclared identifier* C2065        ‘GLEW_SGI_texture_color_table’: undeclared identifier* C2065        ‘GLEW_SGIS_clip_band_hint’: undeclared identifier* C2065        ‘GLEW_SGIS_color_range’: undeclared identifier* C2065        ‘GLEW_SGIS_detail_texture’: undeclared identifier* C2065        ‘GLEW_SGIS_fog_function’: undeclared identifier* C2065        ‘GLEW_SGIS_generate_mipmap’: undeclared identifier* C2065        ‘GLEW_SGIS_line_texgen’: undeclared identifier* C2065        ‘GLEW_SGIS_multisample’: undeclared identifier* C2065        ‘GLEW_SGIS_multitexture’: undeclared identifier* C2065        ‘GLEW_SGIS_pixel_texture’: undeclared identifier* C2065        ‘GLEW_SGIS_point_line_texgen’: undeclared identifier* C2065        ‘GLEW_SGIS_shared_multisample’: undeclared identifier* C2065        ‘GLEW_SGIS_sharpen_texture’: undeclared identifier* C2065        ‘GLEW_SGIS_texture4D’: undeclared identifier* C2065        ‘GLEW_SGIS_texture_border_clamp’: undeclared identifier* C2065        ‘GLEW_SGIS_texture_edge_clamp’: undeclared identifier* C2065        ‘GLEW_SGIS_texture_filter4’: undeclared identifier* C2065        ‘GLEW_SGIS_texture_lod’: undeclared identifier* C2065        ‘GLEW_SGIS_texture_select’: undeclared identifier* C2065        ‘GLEW_SGIX_async’: undeclared identifier* C2065        ‘GLEW_SGIX_async_histogram’: undeclared identifier* C2065        ‘GLEW_SGIX_async_pixel’: undeclared identifier* C2065        ‘GLEW_SGIX_bali_g_instruments’: undeclared identifier* C2065        ‘GLEW_SGIX_bali_r_instruments’: undeclared identifier* C2065        ‘GLEW_SGIX_bali_timer_instruments’: undeclared identifier* C2065        ‘GLEW_SGIX_blend_alpha_minmax’: undeclared identifier* C2065        ‘GLEW_SGIX_blend_cadd’: undeclared identifier* C2065        ‘GLEW_SGIX_blend_cmultiply’: undeclared identifier* C2065        ‘GLEW_SGIX_calligraphic_fragment’: undeclared identifier* C2065        ‘GLEW_SGIX_clipmap’: undeclared identifier* C2065        ‘GLEW_SGIX_color_matrix_accuracy’: undeclared identifier* C2065        ‘GLEW_SGIX_color_table_index_mode’: undeclared identifier* C2065        ‘GLEW_SGIX_complex_polar’: undeclared identifier* C2065        ‘GLEW_SGIX_convolution_accuracy’: undeclared identifier* C2065        ‘GLEW_SGIX_cube_map’: undeclared identifier* C2065        ‘GLEW_SGIX_cylinder_texgen’: undeclared identifier* C2065        ‘GLEW_SGIX_datapipe’: undeclared identifier* C2065        ‘GLEW_SGIX_decimation’: undeclared identifier* C2065        ‘GLEW_SGIX_depth_pass_instrument’: undeclared identifier* C2065        ‘GLEW_SGIX_depth_texture’: undeclared identifier* C2065        ‘GLEW_SGIX_dvc’: undeclared identifier* C2065        ‘GLEW_SGIX_flush_raster’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_blend’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_factor_to_alpha’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_layers’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_offset’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_patchy’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_scale’: undeclared identifier* C2065        ‘GLEW_SGIX_fog_texture’: undeclared identifier* C2065        ‘GLEW_SGIX_fragment_lighting_space’: undeclared identifier* C2065        ‘GLEW_SGIX_fragment_specular_lighting’: undeclared identifier* C2065        ‘GLEW_SGIX_fragments_instrument’: undeclared identifier* C2065        ‘GLEW_SGIX_framezoom’: undeclared identifier* C2065        ‘GLEW_SGIX_icc_texture’: undeclared identifier* C2065        ‘GLEW_SGIX_igloo_interface’: undeclared identifier* C2065        ‘GLEW_SGIX_image_compression’: undeclared identifier* C2065        ‘GLEW_SGIX_impact_pixel_texture’: undeclared identifier* C2065        ‘GLEW_SGIX_instrument_error’: undeclared identifier* C2065        ‘GLEW_SGIX_interlace’: undeclared identifier* C2065        ‘GLEW_SGIX_ir_instrument1’: undeclared identifier* C2065        ‘GLEW_SGIX_line_quality_hint’: undeclared identifier* C2065        ‘GLEW_SGIX_list_priority’: undeclared identifier* C2065        ‘GLEW_SGIX_mpeg1’: undeclared identifier* C2065        ‘GLEW_SGIX_mpeg2’: undeclared identifier* C2065        ‘GLEW_SGIX_nonlinear_lighting_pervertex’: undeclared identifier* C2065        ‘GLEW_SGIX_nurbs_eval’: undeclared identifier* C2065        ‘GLEW_SGIX_occlusion_instrument’: undeclared identifier* C2065        ‘GLEW_SGIX_packed_6bytes’: undeclared identifier* C2065        ‘GLEW_SGIX_pixel_texture’: undeclared identifier* C2065        ‘GLEW_SGIX_pixel_texture_bits’: undeclared identifier* C2065        ‘GLEW_SGIX_pixel_texture_lod’: undeclared identifier* C2065        ‘GLEW_SGIX_pixel_tiles’: undeclared identifier* C2065        ‘GLEW_SGIX_polynomial_ffd’: undeclared identifier* C2065        ‘GLEW_SGIX_quad_mesh’: undeclared identifier* C2065        ‘GLEW_SGIX_reference_plane’: undeclared identifier* C2065        ‘GLEW_SGIX_resample’: undeclared identifier* C2065        ‘GLEW_SGIX_scalebias_hint’: undeclared identifier* C2065        ‘GLEW_SGIX_shadow’: undeclared identifier* C2065        ‘GLEW_SGIX_shadow_ambient’: undeclared identifier* C2065        ‘GLEW_SGIX_slim’: undeclared identifier* C2065        ‘GLEW_SGIX_spotlight_cutoff’: undeclared identifier* C2065        ‘GLEW_SGIX_sprite’: undeclared identifier* C2065        ‘GLEW_SGIX_subdiv_patch’: undeclared identifier* C2065        ‘GLEW_SGIX_subsample’: undeclared identifier* C2065        ‘GLEW_SGIX_tag_sample_buffer’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_add_env’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_coordinate_clamp’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_lod_bias’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_mipmap_anisotropic’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_multi_buffer’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_phase’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_range’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_scale_bias’: undeclared identifier* C2065        ‘GLEW_SGIX_texture_supersample’: undeclared identifier* C2065        ‘GLEW_SGIX_vector_ops’: undeclared identifier* C2065        ‘GLEW_SGIX_vertex_array_object’: undeclared identifier* C2065        ‘GLEW_SGIX_vertex_preclip’: undeclared identifier* C2065        ‘GLEW_SGIX_vertex_preclip_hint’: undeclared identifier* C2065        ‘GLEW_SGIX_ycrcb’: undeclared identifier* C2065        ‘GLEW_SGIX_ycrcb_subsample’: undeclared identifier* C2065        ‘GLEW_SGIX_ycrcba’: undeclared identifier* C2065        ‘GLEW_SUN_convolution_border_modes’: undeclared identifier* C2065        ‘GLEW_SUN_global_alpha’: undeclared identifier* C2065        ‘GLEW_SUN_mesh_array’: undeclared identifier* C2065        ‘GLEW_SUN_read_video_pixels’: undeclared identifier* C2065        ‘GLEW_SUN_slice_accum’: undeclared identifier* C2065        ‘GLEW_SUN_triangle_list’: undeclared identifier* C2065        ‘GLEW_SUN_vertex’: undeclared identifier* C2065        ‘GLEW_SUNX_constant_data’: undeclared identifier* C2065        ‘GLEW_VERSION’: undeclared identifier* C2065        ‘GLEW_VERSION_1_1’: undeclared identifier* C2065        ‘GLEW_VERSION_1_2’: undeclared identifier* C2065        ‘GLEW_VERSION_1_2_1’: undeclared identifier* C2065        ‘GLEW_VERSION_1_3’: undeclared identifier* C2065        ‘GLEW_VERSION_1_4’: undeclared identifier* C2065        ‘GLEW_VERSION_1_5’: undeclared identifier* C2065        ‘GLEW_VERSION_2_0’: undeclared identifier* C2065        ‘GLEW_VERSION_2_1’: undeclared identifier* C2065        ‘GLEW_VERSION_3_0’: undeclared identifier* C2065        ‘GLEW_VERSION_3_1’: undeclared identifier* C2065        ‘GLEW_VERSION_3_2’: undeclared identifier* C2065        ‘GLEW_VERSION_3_3’: undeclared identifier* C2065        ‘GLEW_VERSION_4_0’: undeclared identifier* C2065        ‘GLEW_VERSION_4_1’: undeclared identifier* C2065        ‘GLEW_VERSION_4_2’: undeclared identifier* C2065        ‘GLEW_VERSION_4_3’: undeclared identifier* C2065        ‘GLEW_VERSION_4_4’: undeclared identifier* C2065        ‘GLEW_VERSION_4_5’: undeclared identifier* C2065        ‘GLEW_VERSION_4_6’: undeclared identifier* C2065        ‘GLEW_VERSION_MAJOR’: undeclared identifier* C2065        ‘GLEW_VERSION_MICRO’: undeclared identifier* C2065        ‘GLEW_VERSION_MINOR’: undeclared identifier* C2065        ‘GLEW_WIN_phong_shading’: undeclared identifier* C2065        ‘GLEW_WIN_scene_markerXXX’: undeclared identifier* C2065        ‘GLEW_WIN_specular_fog’: undeclared identifier* C2065        ‘GLEW_WIN_swap_hint’: undeclared identifier* C3861        ‘GLEW_GET_FUN’: identifier not found* C3861        ‘GLEW_GET_VAR’: identifier not found + +Python Error Strings: +* AttributeError: module ‘pxr.Glf’ has no attribute ‘GlewInit’ + +## Other Breaking Changes + +## Schemas + +### pluginInfo.json + +#### plugInfo json now requires schemaKind field + +Without it, schemas may silently fail to load. +For more information on schemaKind, see: [Breaking Change: Schema +Kind] +TODO: more investigation / details +https://nvidia.slack.com/archives/C04190ZMT6U/p1677673185286159 +https://nvidia.slack.com/archives/C04190ZMT6U/p1678264560240499 + +Python Error Strings: +* ‘ApplyAPI: Provided schema type ‘’ is not a single-apply API schema type.’ + +## Non-Breaking Changes + +## Imaging + +### Hdx + +#### Hdx TaskController + +##### Added HdxTaskController SetPresentationOutput + +It seems that when SetPresentationOutput was originally added in +22.05, calling it from UsdImagingGLEngine / omni.hydra.pxr’s +SimpleUsdGLEngine.cpp may have been required, but in 22.08 the +functionality was moved to HgiInteropOpenGL + +Reference Commits: +* Adding SetPresentationOutput to HdxPresentTask, HdxTaskController.* Adding UsdImagingGLEngine::SetPresentationOutput.* [UsdImagingGL] Removed most direct use of GL from UsdImagingGL… Also, we no longer explicitly set the current draw framebuffer binding as the presentation output in the task controller since the fallback behavior in HgiInteropOpenGL is to present to the current draw framebuffer. + +## Upgrading assets and test files + +The previous sections cover most of the changes you need to perform to +your code base, i.e. C++, Python files, as well as compilation and +interpretation errors. After following the previous fixes you may still +find that your assets or test files (i.e. your USDs) have stopped +working. +We have implemented forward compatibility tests in Omni Asset +Validation. This is an extension implemented in Kit, at the moment of +writing this document (03/23/2023) the latest version is 0.3.2. Please +refer to the documentation on how to quickly use it with the graphical user interface. +For the scope of this document, please select the Rules of the category +USD Schema. +Those rules will help you out to fix all your documents. Below you will +find some of the common problem: + +### UsdGeomSubsetChecker + +Problems +* GeomSubset has a material binding but no valid family name attribute. + +See +* UsdGeom.Subset + +Resolution +* Enable USD Schema / UsdGeomSubsetChecker.* Adds the family name attribute. + +### UsdLuxSchemaChecker + +Problems +* UsdLux attribute has been renamed to USD 21.02 and should be prefixed with ‘inputs:’. + +See +* All properties now prefixed with “inputs:” + +Resolution +* Enable USD Schema / UsdLuxSchemaChecker.* Asset Validator will create a new attribute with the prefix “inputs:” for backward and forward compatibility. + +### UsdMaterialBindingApi + +Problems +* Prim has a material binding but does not have the MaterialBindingApi. + +See +* Material bindings require UsdShadeMaterialBindingAPI to be applied + +Resolution +* Enable USD Schema / UsdMaterialBindingApi.* Asset Validator will apply UsdShadeMaterialBindingAPI to your prim. + +### UsdDanglingMaterialBindingApi + +Problems +* Prim has a material binding but the material binding is not found in the stage. The stage may not render properly. Example: https://nvidia-omniverse.atlassian.net/browse/OM-87439 + +See +* Material bindings require UsdShadeMaterialBindingAPI to be applied + +Resolution +* Enable USD Schema / UsdDanglingMaterialBindingApi.* Asset Validator will unbind all bindings to your prim. + +## Dumping Ground + +A place for extra notes / incomplete items that we don’t want to forget + +### Schemas removed + +UsdLuxLight + +UsdLux.Light to UsdLux.LightAPI + +UsdLuxLightPortal + +UsdLux.LightPortal to UsdLux.PortalLight + +UsdMdlMdlAPI +UsdRenderSettingsAPI +UsdRiLightAPI +UsdRiLightFilterAPI +UsdRiLightPortalAPI +UsdRiPxrAovLight +UsdRiPxrBarnLightFilter +UsdRiPxrCookieLightFilter +UsdRiPxrEnvDayLight +UsdRiPxrIntMultLightFilter +UsdRiPxrRampLightFilter +UsdRiPxrRodLightFilter +UsdRiRiLightFilterAPI +UsdRiRisBxdf +UsdRiRisIntegrator +UsdRiRisObject +UsdRiRisOslPattern +UsdRiRisPattern +UsdRiRslShader +UsdRiTextureAPI + +### Schemas added + +UsdGeomPlane +UsdGeomVisibilityAPI +UsdHydraGenerativeProceduralAPI +UsdLuxBoundableLightBase +UsdLuxLightAPI + +UsdLux.Light to> UsdLux.LightAPI + +UsdLuxLightListAPI +UsdLuxMeshLightAPI +UsdLuxNonboundableLightBase +UsdLuxPluginLight +UsdLuxPluginLightFilter +UsdLuxPortalLight + +UsdLux.LightPortal to UsdLux.PortalLight + +UsdLuxVolumeLightAPI +UsdMdlAPIMdlAPI +UsdPhysicsArticulationRootAPI +UsdPhysicsCollisionAPI +UsdPhysicsCollisionGroup +UsdPhysicsDistanceJoint +UsdPhysicsDriveAPI +UsdPhysicsFilteredPairsAPI +UsdPhysicsFixedJoint +UsdPhysicsJoint +UsdPhysicsMassAPI +UsdPhysicsMaterialAPI +UsdPhysicsMeshCollisionAPI +UsdPhysicsPrismaticJoint +UsdPhysicsRevoluteJoint +UsdPhysicsRigidBodyAPI +UsdPhysicsScene +UsdPhysicsSphericalJoint +UsdRenderDenoisePass +UsdRenderPass +UsdShadeNodeDefAPI + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/omni.ui.AbstractField.md b/omni.ui.AbstractField.md new file mode 100644 index 0000000000000000000000000000000000000000..6447bec237c6844ccfbfab430f4b26ae720c9448 --- /dev/null +++ b/omni.ui.AbstractField.md @@ -0,0 +1,41 @@ + + +AbstractField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractField + +  + +# AbstractField + +class omni.ui.AbstractField +Bases: Widget, ValueModelHelper +The abstract widget that is base for any field, which is a one-line text editor. +A field allows the user to enter and edit a single line of plain text. It’s implemented using the model-view pattern and uses AbstractValueModel as the central component of the system. +Methods + +__init__(*args, **kwargs) + +focus_keyboard(self[, focus]) +Puts cursor to this field or removes focus if focus + +Attributes + +__init__(*args, **kwargs) + +focus_keyboard(self: omni.ui._ui.AbstractField, focus: bool = True) → None +Puts cursor to this field or removes focus if +focus + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.AbstractItem.md b/omni.ui.AbstractItem.md new file mode 100644 index 0000000000000000000000000000000000000000..49c159bf1672b42aeaa9e8a3da11ba145e9ab8b4 --- /dev/null +++ b/omni.ui.AbstractItem.md @@ -0,0 +1,31 @@ + + +AbstractItem — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractItem + +  + +# AbstractItem + +class omni.ui.AbstractItem +Bases: pybind11_object +The object that is associated with the data entity of the AbstractItemModel. +Methods + +__init__(self) + +__init__(self: omni.ui._ui.AbstractItem) → None + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.AbstractItemDelegate.md b/omni.ui.AbstractItemDelegate.md new file mode 100644 index 0000000000000000000000000000000000000000..f0f202b56ff7a30cd685b41f8df571f93e736e12 --- /dev/null +++ b/omni.ui.AbstractItemDelegate.md @@ -0,0 +1,55 @@ + + +AbstractItemDelegate — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractItemDelegate + +  + +# AbstractItemDelegate + +class omni.ui.AbstractItemDelegate +Bases: pybind11_object +AbstractItemDelegate is used to generate widgets that display and edit data items from a model. +Methods + +__init__(self) +Constructs AbstractItemDelegate. + +build_branch(self, model[, item, column_id, ...]) +This pure abstract method must be reimplemented to generate custom collapse/expand button. + +build_header(self[, column_id]) +This pure abstract method must be reimplemented to generate custom widgets for the header table. + +build_widget(self, model[, item, index, ...]) +This pure abstract method must be reimplemented to generate custom widgets for specific item in the model. + +__init__(self: omni.ui._ui.AbstractItemDelegate) → None +Constructs AbstractItemDelegate. + +`kwargsdict`See below + +### Keyword Arguments: + +build_branch(self: omni.ui._ui.AbstractItemDelegate, model: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, column_id: int = 0, level: int = 0, expanded: bool = False) → None +This pure abstract method must be reimplemented to generate custom collapse/expand button. + +build_header(self: omni.ui._ui.AbstractItemDelegate, column_id: int = 0) → None +This pure abstract method must be reimplemented to generate custom widgets for the header table. + +build_widget(self: omni.ui._ui.AbstractItemDelegate, model: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, index: int = 0, level: int = 0, expanded: bool = False) → None +This pure abstract method must be reimplemented to generate custom widgets for specific item in the model. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.AbstractItemModel.md b/omni.ui.AbstractItemModel.md new file mode 100644 index 0000000000000000000000000000000000000000..c98594e4a6703f8188849a72e8c62e7d00b00a4e --- /dev/null +++ b/omni.ui.AbstractItemModel.md @@ -0,0 +1,209 @@ + + +AbstractItemModel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractItemModel + +  + +# AbstractItemModel + +class omni.ui.AbstractItemModel +Bases: pybind11_object +The central component of the item widget. It is the application’s dynamic data structure, independent of the user interface, and it directly manages the nested data. It follows closely model-view pattern. It’s abstract, and it defines the standard interface to be able to interoperate with the components of the model-view architecture. It is not supposed to be instantiated directly. Instead, the user should subclass it to create a new model. +The item model doesn’t return the data itself. Instead, it returns the value model that can contain any data type and supports callbacks. Thus the client of the model can track the changes in both the item model and any value it holds. +From any item, the item model can get both the value model and the nested items. Therefore, the model is flexible to represent anything from color to complicated tree-table construction. +Methods + +__init__(self) +Constructs AbstractItemModel. + +add_begin_edit_fn(self, arg0) +Adds the function that will be called every time the user starts the editing. + +add_end_edit_fn(self, arg0) +Adds the function that will be called every time the user finishes the editing. + +add_item_changed_fn(self, arg0) +Adds the function that will be called every time the value changes. + +append_child_item(self, parentItem, model) +Creates a new item from the value model and appends it to the list of the children of the given item. + +begin_edit(self, item) +Called when the user starts the editing. + +can_item_have_children(self[, parentItem]) +Returns true if the item can have children. + +drop(*args, **kwargs) +Overloaded function. + +drop_accepted(*args, **kwargs) +Overloaded function. + +end_edit(self, item) +Called when the user finishes the editing. + +get_drag_mime_data(self[, item]) +Returns Multipurpose Internet Mail Extensions (MIME) for drag and drop. + +get_item_children(self[, parentItem]) +Returns the vector of items that are nested to the given parent item. + +get_item_value_model(self[, item, column_id]) +Get the value model associated with this item. + +get_item_value_model_count(self[, item]) +Returns the number of columns this model item contains. + +remove_begin_edit_fn(self, arg0) +Remove the callback by its id. + +remove_end_edit_fn(self, arg0) +Remove the callback by its id. + +remove_item(self, item) +Removes the item from the model. + +remove_item_changed_fn(self, arg0) +Remove the callback by its id. + +subscribe_begin_edit_fn(self, arg0) +Adds the function that will be called every time the user starts the editing. + +subscribe_end_edit_fn(self, arg0) +Adds the function that will be called every time the user finishes the editing. + +subscribe_item_changed_fn(self, arg0) +Adds the function that will be called every time the value changes. + +__init__(self: omni.ui._ui.AbstractItemModel) → None +Constructs AbstractItemModel. + +`kwargsdict`See below + +### Keyword Arguments: + +add_begin_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None]) → int +Adds the function that will be called every time the user starts the editing. +The id of the callback that is used to remove the callback. + +add_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None]) → int +Adds the function that will be called every time the user finishes the editing. +The id of the callback that is used to remove the callback. + +add_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None]) → int +Adds the function that will be called every time the value changes. +The id of the callback that is used to remove the callback. + +append_child_item(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem, model: omni.ui._ui.AbstractValueModel) → omni.ui._ui.AbstractItem +Creates a new item from the value model and appends it to the list of the children of the given item. + +begin_edit(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem) → None +Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. + +can_item_have_children(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem = None) → bool +Returns true if the item can have children. In this way the delegate usually draws +/- icon. +### Arguments: + +`id :`The item to request children from. If it’s null, the children of root will be returned. + +drop(*args, **kwargs) +Overloaded function. + +drop(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, item_source: omni.ui._ui.AbstractItem, drop_location: int = -1) -> None + +Called when the user droped one item to another. +Small explanation why the same default value is declared in multiple places. We use the default value to be compatible with the previous API and especially with Stage 2.0. Thr signature in the old Python API is: +def drop(self, target_item, source) +drop(self, target_item, source) +PyAbstractItemModel::drop +AbstractItemModel.drop +pybind11::class_.def(“drop”) +AbstractItemModel + +drop(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, source: str, drop_location: int = -1) -> None + +Called when the user droped a string to the item. + +drop_accepted(*args, **kwargs) +Overloaded function. + +drop_accepted(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, item_source: omni.ui._ui.AbstractItem, drop_location: int = -1) -> bool + +Called to determine if the model can perform drag and drop to the given item. If this method returns false, the widget shouldn’t highlight the visual element that represents this item. + +drop_accepted(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, source: str, drop_location: int = -1) -> bool + +Called to determine if the model can perform drag and drop of the given string to the given item. If this method returns false, the widget shouldn’t highlight the visual element that represents this item. + +end_edit(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem) → None +Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. + +get_drag_mime_data(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None) → str +Returns Multipurpose Internet Mail Extensions (MIME) for drag and drop. + +get_item_children(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem = None) → List[omni.ui._ui.AbstractItem] +Returns the vector of items that are nested to the given parent item. +### Arguments: + +`id :`The item to request children from. If it’s null, the children of root will be returned. + +get_item_value_model(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, column_id: int = 0) → omni.ui._ui.AbstractValueModel +Get the value model associated with this item. +### Arguments: + +`item :`The item to request the value model from. If it’s null, the root value model will be returned. + +`index :`The column number to get the value model. + +get_item_value_model_count(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None) → int +Returns the number of columns this model item contains. + +remove_begin_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: int) → None +Remove the callback by its id. +### Arguments: + +`id :`The id that addBeginEditFn returns. + +remove_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: int) → None +Remove the callback by its id. +### Arguments: + +`id :`The id that addEndEditFn returns. + +remove_item(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem) → None +Removes the item from the model. +There is no parent here because we assume that the reimplemented model deals with its data and can figure out how to remove this item. + +remove_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: int) → None +Remove the callback by its id. +### Arguments: + +`id :`The id that addValueChangedFn returns. + +subscribe_begin_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None]) → carb._carb.Subscription +Adds the function that will be called every time the user starts the editing. +The id of the callback that is used to remove the callback. + +subscribe_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None]) → carb._carb.Subscription +Adds the function that will be called every time the user finishes the editing. +The id of the callback that is used to remove the callback. + +subscribe_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem], None]) → carb._carb.Subscription +Adds the function that will be called every time the value changes. +The id of the callback that is used to remove the callback. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.AbstractMultiField.md b/omni.ui.AbstractMultiField.md new file mode 100644 index 0000000000000000000000000000000000000000..02eaa7014e73e84e813bf4def983238eae23ca9c --- /dev/null +++ b/omni.ui.AbstractMultiField.md @@ -0,0 +1,52 @@ + + +AbstractMultiField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractMultiField + +  + +# AbstractMultiField + +class omni.ui.AbstractMultiField +Bases: Widget, ItemModelHelper +AbstractMultiField is the abstract class that has everything to create a custom widget per model item. +The class that wants to create multiple widgets per item needs to reimplement the method _createField. +Methods + +__init__(*args, **kwargs) + +Attributes + +column_count +The max number of fields in a line. + +h_spacing +Sets a non-stretchable horizontal space in pixels between child fields. + +v_spacing +Sets a non-stretchable vertical space in pixels between child fields. + +__init__(*args, **kwargs) + +property column_count +The max number of fields in a line. + +property h_spacing +Sets a non-stretchable horizontal space in pixels between child fields. + +property v_spacing +Sets a non-stretchable vertical space in pixels between child fields. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.AbstractSlider.md b/omni.ui.AbstractSlider.md new file mode 100644 index 0000000000000000000000000000000000000000..94cb03c42b9338b0526601b3258f51b7f5f21887 --- /dev/null +++ b/omni.ui.AbstractSlider.md @@ -0,0 +1,33 @@ + + +AbstractSlider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractSlider + +  + +# AbstractSlider + +class omni.ui.AbstractSlider +Bases: Widget, ValueModelHelper +The abstract widget that is base for drags and sliders. +Methods + +__init__(*args, **kwargs) + +Attributes + +__init__(*args, **kwargs) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.AbstractValueModel.md b/omni.ui.AbstractValueModel.md new file mode 100644 index 0000000000000000000000000000000000000000..54398e1966b64e9358ea6a3ef5e0c62deffafdb2 --- /dev/null +++ b/omni.ui.AbstractValueModel.md @@ -0,0 +1,193 @@ + + +AbstractValueModel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +AbstractValueModel + +  + +# AbstractValueModel + +class omni.ui.AbstractValueModel +Bases: pybind11_object +Methods + +__init__(self) +Constructs AbstractValueModel. + +add_begin_edit_fn(self, arg0) +Adds the function that will be called every time the user starts the editing. + +add_end_edit_fn(self, arg0) +Adds the function that will be called every time the user finishes the editing. + +add_value_changed_fn(self, arg0) +Adds the function that will be called every time the value changes. + +begin_edit(self) +Called when the user starts the editing. + +end_edit(self) +Called when the user finishes the editing. + +get_value_as_bool(self) +Return the bool representation of the value. + +get_value_as_float(self) +Return the float representation of the value. + +get_value_as_int(self) +Return the int representation of the value. + +get_value_as_string(self) +Return the string representation of the value. + +remove_begin_edit_fn(self, arg0) +Remove the callback by its id. + +remove_end_edit_fn(self, arg0) +Remove the callback by its id. + +remove_value_changed_fn(self, arg0) +Remove the callback by its id. + +set_value(*args, **kwargs) +Overloaded function. + +subscribe_begin_edit_fn(self, arg0) +Adds the function that will be called every time the user starts the editing. + +subscribe_end_edit_fn(self, arg0) +Adds the function that will be called every time the user finishes the editing. + +subscribe_item_changed_fn(self, arg0) + +subscribe_value_changed_fn(self, arg0) +Adds the function that will be called every time the value changes. + +Attributes + +as_bool +Return the bool representation of the value. + +as_float +Return the float representation of the value. + +as_int +Return the int representation of the value. + +as_string +Return the string representation of the value. + +__init__(self: omni.ui._ui.AbstractValueModel) → None +Constructs AbstractValueModel. + +`kwargsdict`See below + +### Keyword Arguments: + +add_begin_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → int +Adds the function that will be called every time the user starts the editing. +The id of the callback that is used to remove the callback. + +add_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → int +Adds the function that will be called every time the user finishes the editing. +The id of the callback that is used to remove the callback. + +add_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → int +Adds the function that will be called every time the value changes. +The id of the callback that is used to remove the callback. + +begin_edit(self: omni.ui._ui.AbstractValueModel) → None +Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. This method should be reimplemented. + +end_edit(self: omni.ui._ui.AbstractValueModel) → None +Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. This method should be reimplemented. + +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_int(self: omni.ui._ui.AbstractValueModel) → int +Return the int representation of the value. + +get_value_as_string(self: omni.ui._ui.AbstractValueModel) → str +Return the string representation of the value. + +remove_begin_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: int) → None +Remove the callback by its id. +### Arguments: + +`id :`The id that addBeginEditFn returns. + +remove_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: int) → None +Remove the callback by its id. +### Arguments: + +`id :`The id that addEndEditFn returns. + +remove_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: int) → None +Remove the callback by its id. +### Arguments: + +`id :`The id that addValueChangedFn returns. + +set_value(*args, **kwargs) +Overloaded function. + +set_value(self: omni.ui._ui.AbstractValueModel, value: bool) -> None + +Set the value. + +set_value(self: omni.ui._ui.AbstractValueModel, value: int) -> None + +Set the value. + +set_value(self: omni.ui._ui.AbstractValueModel, value: float) -> None + +Set the value. + +set_value(self: omni.ui._ui.AbstractValueModel, value: str) -> None + +Set the value. + +subscribe_begin_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → carb._carb.Subscription +Adds the function that will be called every time the user starts the editing. +The id of the callback that is used to remove the callback. + +subscribe_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → carb._carb.Subscription +Adds the function that will be called every time the user finishes the editing. +The id of the callback that is used to remove the callback. + +subscribe_item_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → carb._carb.Subscription + +subscribe_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) → carb._carb.Subscription +Adds the function that will be called every time the value changes. +The id of the callback that is used to remove the callback. + +property as_bool +Return the bool representation of the value. + +property as_float +Return the float representation of the value. + +property as_int +Return the int representation of the value. + +property as_string +Return the string representation of the value. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Alignment.md b/omni.ui.Alignment.md new file mode 100644 index 0000000000000000000000000000000000000000..ff486b0d2c303447b2fd61b9d77baede03cb089f --- /dev/null +++ b/omni.ui.Alignment.md @@ -0,0 +1,89 @@ + + +Alignment — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Alignment + +  + +# Alignment + +class omni.ui.Alignment +Bases: pybind11_object +Members: + +UNDEFINED +LEFT_TOP +LEFT_CENTER +LEFT_BOTTOM +CENTER_TOP +CENTER +CENTER_BOTTOM +RIGHT_TOP +RIGHT_CENTER +RIGHT_BOTTOM +LEFT +RIGHT +H_CENTER +TOP +BOTTOM +V_CENTER + +Methods + +__init__(self, value) + +Attributes + +BOTTOM + +CENTER + +CENTER_BOTTOM + +CENTER_TOP + +H_CENTER + +LEFT + +LEFT_BOTTOM + +LEFT_CENTER + +LEFT_TOP + +RIGHT + +RIGHT_BOTTOM + +RIGHT_CENTER + +RIGHT_TOP + +TOP + +UNDEFINED + +V_CENTER + +name + +value + +__init__(self: omni.ui._ui.Alignment, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ArrowHelper.md b/omni.ui.ArrowHelper.md new file mode 100644 index 0000000000000000000000000000000000000000..2183bc7a621612e2f174b5bd59b0eb6c51c527ac --- /dev/null +++ b/omni.ui.ArrowHelper.md @@ -0,0 +1,69 @@ + + +ArrowHelper — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ArrowHelper + +  + +# ArrowHelper + +class omni.ui.ArrowHelper +Bases: pybind11_object +The ArrowHelper widget provides a colored rectangle to display. +Methods + +__init__(*args, **kwargs) + +Attributes + +begin_arrow_height +This property holds the height of the begin arrow. + +begin_arrow_type +This property holds the type of the begin arrow can only be eNone or eRrrow. + +begin_arrow_width +This property holds the width of the begin arrow. + +end_arrow_height +This property holds the height of the end arrow. + +end_arrow_type +This property holds the type of the end arrow can only be eNone or eRrrow. + +end_arrow_width +This property holds the width of the end arrow. + +__init__(*args, **kwargs) + +property begin_arrow_height +This property holds the height of the begin arrow. + +property begin_arrow_type +This property holds the type of the begin arrow can only be eNone or eRrrow. By default, the arrow type is eNone. + +property begin_arrow_width +This property holds the width of the begin arrow. + +property end_arrow_height +This property holds the height of the end arrow. + +property end_arrow_type +This property holds the type of the end arrow can only be eNone or eRrrow. By default, the arrow type is eNone. + +property end_arrow_width +This property holds the width of the end arrow. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ArrowType.md b/omni.ui.ArrowType.md new file mode 100644 index 0000000000000000000000000000000000000000..9f339dcff4c9bac1eb9cd4ddb67d917ade9c5da6 --- /dev/null +++ b/omni.ui.ArrowType.md @@ -0,0 +1,47 @@ + + +ArrowType — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ArrowType + +  + +# ArrowType + +class omni.ui.ArrowType +Bases: pybind11_object +Members: + +NONE +ARROW + +Methods + +__init__(self, value) + +Attributes + +ARROW + +NONE + +name + +value + +__init__(self: omni.ui._ui.ArrowType, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Axis.md b/omni.ui.Axis.md new file mode 100644 index 0000000000000000000000000000000000000000..15aafd40402fc19103650f8a569fea28c1b24f8f --- /dev/null +++ b/omni.ui.Axis.md @@ -0,0 +1,51 @@ + + +Axis — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Axis + +  + +# Axis + +class omni.ui.Axis +Bases: pybind11_object +Members: +None +X +Y +XY +Methods + +__init__(self, value) + +Attributes + +None + +X + +XY + +Y + +name + +value + +__init__(self: omni.ui._ui.Axis, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.BezierCurve.md b/omni.ui.BezierCurve.md new file mode 100644 index 0000000000000000000000000000000000000000..e571228f5a61585c15556938a3cf57adaa42ffef --- /dev/null +++ b/omni.ui.BezierCurve.md @@ -0,0 +1,157 @@ + + +BezierCurve — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +BezierCurve + +  + +# BezierCurve + +class omni.ui.BezierCurve +Bases: Shape, ArrowHelper, ShapeAnchorHelper +Smooth curve that can be scaled infinitely. +Methods + +__init__(self, **kwargs) +Initialize the curve. + +call_mouse_hovered_fn(self, arg0) +Sets the function that will be called when the user use mouse enter/leave on the line. + +has_mouse_hovered_fn(self) +Sets the function that will be called when the user use mouse enter/leave on the line. + +set_mouse_hovered_fn(self, fn) +Sets the function that will be called when the user use mouse enter/leave on the line. + +Attributes + +end_tangent_height +This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. + +end_tangent_width +This property holds the X coordinate of the end of the curve relative to the width bound of the curve. + +start_tangent_height +This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. + +start_tangent_width +This property holds the X coordinate of the start of the curve relative to the width bound of the curve. + +__init__(self: omni.ui._ui.BezierCurve, **kwargs) → None +Initialize the curve. + +`kwargsdict`See below + +### Keyword Arguments: +`start_tangent_width: ` +This property holds the X coordinate of the start of the curve relative to the width bound of the curve. +`start_tangent_height: ` +This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. +`end_tangent_width: ` +This property holds the X coordinate of the end of the curve relative to the width bound of the curve. +`end_tangent_height: ` +This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. +`set_mouse_hovered_fn: ` +Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +`anchor_position: `This property holds the parametric value of the curve anchor. + +`anchor_alignment: `This property holds the Alignment of the curve anchor. + +`set_anchor_fn: Callable`Sets the function that will be called for the curve anchor. + +`invalidate_anchor: `Function that causes the anchor frame to be redrawn. + +`get_closest_parametric_position: `Function that returns the closest parametric T value to a given x,y position. + +call_mouse_hovered_fn(self: omni.ui._ui.BezierCurve, arg0: bool) → None +Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) + +has_mouse_hovered_fn(self: omni.ui._ui.BezierCurve) → bool +Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) + +set_mouse_hovered_fn(self: omni.ui._ui.BezierCurve, fn: Callable[[bool], None]) → None +Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) + +property end_tangent_height +This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. + +property end_tangent_width +This property holds the X coordinate of the end of the curve relative to the width bound of the curve. + +property start_tangent_height +This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. + +property start_tangent_width +This property holds the X coordinate of the start of the curve relative to the width bound of the curve. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Button.md b/omni.ui.Button.md new file mode 100644 index 0000000000000000000000000000000000000000..e4dd94e5605c6a039fa76d5671c3514f425260e4 --- /dev/null +++ b/omni.ui.Button.md @@ -0,0 +1,141 @@ + + +Button — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Button + +  + +# Button + +class omni.ui.Button +Bases: InvisibleButton +The Button widget provides a command button. +The command button, is perhaps the most commonly used widget in any graphical user interface. Click a button to execute a command. It is rectangular and typically displays a text label describing its action. +Methods + +__init__(self[, text]) +Construct a button with a text on it. + +Attributes + +image_height +This property holds the height of the image widget. + +image_url +This property holds the button's optional image URL. + +image_width +This property holds the width of the image widget. + +spacing +Sets a non-stretchable space in points between image and text. + +text +This property holds the button's text. + +__init__(self: omni.ui._ui.Button, text: str = '', **kwargs) → None +Construct a button with a text on it. +### Arguments: + +`text :`The text for the button to use. + +`kwargsdict`See below + +### Keyword Arguments: + +`textstr`This property holds the button’s text. + +`image_urlstr`This property holds the button’s optional image URL. + +`image_widthfloat`This property holds the width of the image widget. Do not use this function to find the width of the image. + +`image_heightfloat`This property holds the height of the image widget. Do not use this function to find the height of the image. + +`spacingfloat`Sets a non-stretchable space in points between image and text. + +`clicked_fnCallable[[], None]`Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property image_height +This property holds the height of the image widget. Do not use this function to find the height of the image. + +property image_url +This property holds the button’s optional image URL. + +property image_width +This property holds the width of the image widget. Do not use this function to find the width of the image. + +property spacing +Sets a non-stretchable space in points between image and text. + +property text +This property holds the button’s text. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ByteImageProvider.md b/omni.ui.ByteImageProvider.md new file mode 100644 index 0000000000000000000000000000000000000000..aaf1920999da71bab8dfdb14f913f4d6bb1fe831 --- /dev/null +++ b/omni.ui.ByteImageProvider.md @@ -0,0 +1,71 @@ + + +ByteImageProvider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ByteImageProvider + +  + +# ByteImageProvider + +class omni.ui.ByteImageProvider +Bases: ImageProvider +doc +Methods + +__init__(*args, **kwargs) +Overloaded function. + +set_bytes_data(self, bytes, sizes, format, ...) +Sets Python sequence as byte data. + +set_bytes_data_from_gpu(self, gpu_bytes, ...) +Sets byte data from a copy of gpu memory at gpuBytes. + +set_data(self, arg0, arg1) +[DEPRECATED FUNCTION] + +set_data_array(self, arg0, arg1) + +set_raw_bytes_data(self, raw_bytes, sizes, ...) +Sets byte data that the image provider will turn raw pointer array into an image. + +Attributes + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.ByteImageProvider) -> None + +doc + +__init__(self: omni.ui._ui.ByteImageProvider, bytes: sequence, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = , stride: int = -1) -> None + +doc + +set_bytes_data(self: omni.ui._ui.ByteImageProvider, bytes: sequence, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = , stride: int = -1) → None +Sets Python sequence as byte data. The image provider will recognize flattened color values, or sequence within sequence and convert it into an image. + +set_bytes_data_from_gpu(self: omni.ui._ui.ByteImageProvider, gpu_bytes: int, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = , stride: int = -1) → None +Sets byte data from a copy of gpu memory at gpuBytes. + +set_data(self: omni.ui._ui.ByteImageProvider, arg0: List[int], arg1: List[int]) → None +[DEPRECATED FUNCTION] + +set_data_array(self: omni.ui._ui.ByteImageProvider, arg0: numpy.ndarray[numpy.uint8], arg1: List[int]) → None + +set_raw_bytes_data(self: omni.ui._ui.ByteImageProvider, raw_bytes: capsule, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = , stride: int = -1) → None +Sets byte data that the image provider will turn raw pointer array into an image. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.CanvasFrame.md b/omni.ui.CanvasFrame.md new file mode 100644 index 0000000000000000000000000000000000000000..dd2a8c90b57da458e71efc054afe67c03f524d8b --- /dev/null +++ b/omni.ui.CanvasFrame.md @@ -0,0 +1,221 @@ + + +CanvasFrame — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +CanvasFrame + +  + +# CanvasFrame + +class omni.ui.CanvasFrame +Bases: Frame +CanvasFrame is the widget that allows the user to pan and zoom its children with a mouse. It has the layout that can be infinitely moved in any direction. +Methods + +__init__(self, **kwargs) +Constructs CanvasFrame. + +screen_to_canvas(self, x, y) +Transforms screen-space coordinates to canvas-space + +screen_to_canvas_x(self, x) +Transforms screen-space X to canvas-space X. + +screen_to_canvas_y(self, y) +Transforms screen-space Y to canvas-space Y. + +set_pan_key_shortcut(self, mouse_button, ...) +Specify the mouse button and key to pan the canvas. + +set_pan_x_changed_fn(self, fn) +The horizontal offset of the child item. + +set_pan_y_changed_fn(self, fn) +The vertical offset of the child item. + +set_zoom_changed_fn(self, fn) +The zoom level of the child item. + +set_zoom_key_shortcut(self, mouse_button, ...) +Specify the mouse button and key to zoom the canvas. + +Attributes + +compatibility +This boolean property controls the behavior of CanvasFrame. + +draggable +Provides a convenient way to make the content draggable and zoomable. + +pan_x +The horizontal offset of the child item. + +pan_y +The vertical offset of the child item. + +smooth_zoom +When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn't provide smooth scrolling. + +zoom +The zoom level of the child item. + +zoom_max +The zoom maximum of the child item. + +zoom_min +The zoom minimum of the child item. + +__init__(self: omni.ui._ui.CanvasFrame, **kwargs) → None +Constructs CanvasFrame. + +`kwargsdict`See below + +### Keyword Arguments: + +`pan_x`The horizontal offset of the child item. + +`pan_y`The vertical offset of the child item. + +`zoom`The zoom minimum of the child item. + +`zoom_min`The zoom maximum of the child item. + +`zoom_max`The zoom level of the child item. + +`compatibility`This boolean property controls the behavior of CanvasFrame. When set to true, the widget will function in the old way. When set to false, the widget will use a newer and faster implementation. This variable is included as a transition period to ensure that the update does not break any existing functionality. Please be aware that the old behavior may be deprecated in the future, so it is recommended to set this variable to false once you have thoroughly tested the new implementation. + +`pan_x_changed_fn`The horizontal offset of the child item. + +`pan_y_changed_fn`The vertical offset of the child item. + +`zoom_changed_fn`The zoom level of the child item. + +`draggable`Provides a convenient way to make the content draggable and zoomable. + +`horizontal_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. + +`vertical_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. + +`separate_window`A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. + +`raster_policy`Determine how the content of the frame should be rasterized. + +`build_fn`Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +screen_to_canvas(self: omni.ui._ui.CanvasFrame, x: float, y: float) → Tuple[float, float] +Transforms screen-space coordinates to canvas-space + +screen_to_canvas_x(self: omni.ui._ui.CanvasFrame, x: float) → float +Transforms screen-space X to canvas-space X. + +screen_to_canvas_y(self: omni.ui._ui.CanvasFrame, y: float) → float +Transforms screen-space Y to canvas-space Y. + +set_pan_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int) → None +Specify the mouse button and key to pan the canvas. + +set_pan_x_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None]) → None +The horizontal offset of the child item. + +set_pan_y_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None]) → None +The vertical offset of the child item. + +set_zoom_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None]) → None +The zoom level of the child item. + +set_zoom_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int) → None +Specify the mouse button and key to zoom the canvas. + +property compatibility +This boolean property controls the behavior of CanvasFrame. When set to true, the widget will function in the old way. When set to false, the widget will use a newer and faster implementation. This variable is included as a transition period to ensure that the update does not break any existing functionality. Please be aware that the old behavior may be deprecated in the future, so it is recommended to set this variable to false once you have thoroughly tested the new implementation. + +property draggable +Provides a convenient way to make the content draggable and zoomable. + +property pan_x +The horizontal offset of the child item. + +property pan_y +The vertical offset of the child item. + +property smooth_zoom +When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn’t provide smooth scrolling. + +property zoom +The zoom level of the child item. + +property zoom_max +The zoom maximum of the child item. + +property zoom_min +The zoom minimum of the child item. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.CheckBox.md b/omni.ui.CheckBox.md new file mode 100644 index 0000000000000000000000000000000000000000..60d38bb777606da5af5bf349cd69279d2b00ee65 --- /dev/null +++ b/omni.ui.CheckBox.md @@ -0,0 +1,96 @@ + + +CheckBox — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +CheckBox + +  + +# CheckBox + +class omni.ui.CheckBox +Bases: Widget, ValueModelHelper +A CheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. +The checkbox is implemented using the model-view pattern. The model is the central component of this system. It is the application’s dynamic data structure independent of the widget. It directly manages the data, logic, and rules of the checkbox. If the model is not specified, the simple one is created automatically when the object is constructed. +Methods + +__init__(self[, model]) +CheckBox with specified model. + +Attributes + +__init__(self: omni.ui._ui.CheckBox, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +CheckBox with specified model. If model is not specified, it’s using the default one. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Circle.md b/omni.ui.Circle.md new file mode 100644 index 0000000000000000000000000000000000000000..967897fa788ee25a0a3463dccfbfaad61e2337da --- /dev/null +++ b/omni.ui.Circle.md @@ -0,0 +1,127 @@ + + +Circle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Circle + +  + +# Circle + +class omni.ui.Circle +Bases: Shape +The Circle widget provides a colored circle to display. +Methods + +__init__(self, **kwargs) +Constructs Circle. + +Attributes + +alignment +This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. + +arc +This property is the way to draw a half or a quarter of the circle. + +radius +This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. + +size_policy +Define what happens when the source image has a different size than the item. + +__init__(self: omni.ui._ui.Circle, **kwargs) → None +Constructs Circle. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment :`This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered. + +`radius :`This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0. + +`arc :`This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered. + +`size_policy :`Define what happens when the source image has a different size than the item. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property alignment +This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered. + +property arc +This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered. + +property radius +This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0. + +property size_policy +Define what happens when the source image has a different size than the item. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.CircleSizePolicy.md b/omni.ui.CircleSizePolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..bcc2601c1ac3b916b89330ff43ce584e9713eac0 --- /dev/null +++ b/omni.ui.CircleSizePolicy.md @@ -0,0 +1,48 @@ + + +CircleSizePolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +CircleSizePolicy + +  + +# CircleSizePolicy + +class omni.ui.CircleSizePolicy +Bases: pybind11_object +Define what happens when the source image has a different size than the item. +Members: + +STRETCH +FIXED + +Methods + +__init__(self, value) + +Attributes + +FIXED + +STRETCH + +name + +value + +__init__(self: omni.ui._ui.CircleSizePolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.CollapsableFrame.md b/omni.ui.CollapsableFrame.md new file mode 100644 index 0000000000000000000000000000000000000000..f2963e7f0f362825a6330ff98a3414c818fc910d --- /dev/null +++ b/omni.ui.CollapsableFrame.md @@ -0,0 +1,160 @@ + + +CollapsableFrame — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +CollapsableFrame + +  + +# CollapsableFrame + +class omni.ui.CollapsableFrame +Bases: Frame +CollapsableFrame is a frame widget that can hide or show its content. It has two states expanded and collapsed. When it’s collapsed, it looks like a button. If it’s expanded, it looks like a button and a frame with the content. It’s handy to group properties, and temporarily hide them to get more space for something else. +Methods + +__init__(self[, title]) +Constructs CollapsableFrame. + +call_build_header_fn(self, arg0, arg1) +Set dynamic header that will be created dynamiclly when it is needed. + +has_build_header_fn(self) +Set dynamic header that will be created dynamiclly when it is needed. + +set_build_header_fn(self, fn) +Set dynamic header that will be created dynamiclly when it is needed. + +set_collapsed_changed_fn(self, fn) +The state of the CollapsableFrame. + +Attributes + +alignment +This property holds the alignment of the label in the default header. + +collapsed +The state of the CollapsableFrame. + +title +The header text. + +__init__(self: omni.ui._ui.CollapsableFrame, title: str = '', **kwargs) → None +Constructs CollapsableFrame. +### Arguments: + +`text :`The text for the caption of the frame. + +`kwargsdict`See below + +### Keyword Arguments: + +`collapsed`The state of the CollapsableFrame. + +`title`The header text. + +`alignment`This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered. + +`build_header_fn`Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. + +`collapsed_changed_fn`The state of the CollapsableFrame. + +`horizontal_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. + +`vertical_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. + +`separate_window`A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. + +`raster_policy`Determine how the content of the frame should be rasterized. + +`build_fn`Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +call_build_header_fn(self: omni.ui._ui.CollapsableFrame, arg0: bool, arg1: str) → None +Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. + +has_build_header_fn(self: omni.ui._ui.CollapsableFrame) → bool +Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. + +set_build_header_fn(self: omni.ui._ui.CollapsableFrame, fn: Callable[[bool, str], None]) → None +Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. + +set_collapsed_changed_fn(self: omni.ui._ui.CollapsableFrame, fn: Callable[[bool], None]) → None +The state of the CollapsableFrame. + +property alignment +This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered. + +property collapsed +The state of the CollapsableFrame. + +property title +The header text. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ColorStore.md b/omni.ui.ColorStore.md new file mode 100644 index 0000000000000000000000000000000000000000..db52009e8e5b6e6b8c649d7306210427184ea125 --- /dev/null +++ b/omni.ui.ColorStore.md @@ -0,0 +1,43 @@ + + +ColorStore — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ColorStore + +  + +# ColorStore + +class omni.ui.ColorStore +Bases: pybind11_object +A singleton that stores all the UI Style color properties of omni.ui. +Methods + +__init__(*args, **kwargs) + +find(name) +Return the index of the color with specific name. + +store(name, color) +Save the color by name. + +__init__(*args, **kwargs) + +static find(name: str) → int +Return the index of the color with specific name. + +static store(name: str, color: int) → None +Save the color by name. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ColorWidget.md b/omni.ui.ColorWidget.md new file mode 100644 index 0000000000000000000000000000000000000000..be45753a18b669b27fb846092d7bcc3f6b9135ce --- /dev/null +++ b/omni.ui.ColorWidget.md @@ -0,0 +1,102 @@ + + +ColorWidget — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ColorWidget + +  + +# ColorWidget + +class omni.ui.ColorWidget +Bases: Widget, ItemModelHelper +The ColorWidget widget is a button that displays the color from the item model and can open a picker window to change the color. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.ColorWidget, **kwargs) -> None +__init__(self: omni.ui._ui.ColorWidget, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None +__init__(self: omni.ui._ui.ColorWidget, arg0: float, arg1: float, arg2: float, **kwargs) -> None +__init__(self: omni.ui._ui.ColorWidget, arg0: float, arg1: float, arg2: float, arg3: float, **kwargs) -> None + +Construct ColorWidget. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ComboBox.md b/omni.ui.ComboBox.md new file mode 100644 index 0000000000000000000000000000000000000000..03ffaa302c84311679c62eff6d74000a1de87a1d --- /dev/null +++ b/omni.ui.ComboBox.md @@ -0,0 +1,102 @@ + + +ComboBox — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ComboBox + +  + +# ComboBox + +class omni.ui.ComboBox +Bases: Widget, ItemModelHelper +The ComboBox widget is a combined button and a drop-down list. +A combo box is a selection widget that displays the current item and can pop up a list of selectable items. +The ComboBox is implemented using the model-view pattern. The model is the central component of this system. The root of the item model should contain the index of currently selected items, and the children of the root include all the items of the combo box. +Methods + +__init__(self, *args, **kwargs) +Construct ComboBox. + +Attributes + +__init__(self: omni.ui._ui.ComboBox, *args, **kwargs) → None +Construct ComboBox. +### Arguments: + +`model :`The model that determines if the button is checked. + +`kwargsdict`See below + +### Keyword Arguments: + +`arrow_onlybool`Determines if it’s necessary to hide the text of the ComboBox. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Container.md b/omni.ui.Container.md new file mode 100644 index 0000000000000000000000000000000000000000..86a7f4b93a69e667c802c4b05fee8fb22a125b7d --- /dev/null +++ b/omni.ui.Container.md @@ -0,0 +1,45 @@ + + +Container — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Container + +  + +# Container + +class omni.ui.Container +Bases: Widget +Base class for all UI containers. Container can hold one or many other omni.ui.Widget s +Methods + +__init__(*args, **kwargs) + +add_child(self, arg0) +Adds widget to this container in a manner specific to the container. + +clear(self) +Removes the container items from the container. + +Attributes + +__init__(*args, **kwargs) + +add_child(self: omni.ui._ui.Container, arg0: omni.ui._ui.Widget) → None +Adds widget to this container in a manner specific to the container. If it’s allowed to have one sub-widget only, it will be overwriten. + +clear(self: omni.ui._ui.Container) → None +Removes the container items from the container. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.CornerFlag.md b/omni.ui.CornerFlag.md new file mode 100644 index 0000000000000000000000000000000000000000..4758528aa9418616822cb336488eb377beb8a369 --- /dev/null +++ b/omni.ui.CornerFlag.md @@ -0,0 +1,71 @@ + + +CornerFlag — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +CornerFlag + +  + +# CornerFlag + +class omni.ui.CornerFlag +Bases: pybind11_object +Members: + +NONE +TOP_LEFT +TOP_RIGHT +BOTTOM_LEFT +BOTTOM_RIGHT +TOP +BOTTOM +LEFT +RIGHT +ALL + +Methods + +__init__(self, value) + +Attributes + +ALL + +BOTTOM + +BOTTOM_LEFT + +BOTTOM_RIGHT + +LEFT + +NONE + +RIGHT + +TOP + +TOP_LEFT + +TOP_RIGHT + +name + +value + +__init__(self: omni.ui._ui.CornerFlag, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Direction.md b/omni.ui.Direction.md new file mode 100644 index 0000000000000000000000000000000000000000..92ae6d22b0b9db0e61fc321b774716067c0f0ab6 --- /dev/null +++ b/omni.ui.Direction.md @@ -0,0 +1,59 @@ + + +Direction — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Direction + +  + +# Direction + +class omni.ui.Direction +Bases: pybind11_object +Members: + +LEFT_TO_RIGHT +RIGHT_TO_LEFT +TOP_TO_BOTTOM +BOTTOM_TO_TOP +BACK_TO_FRONT +FRONT_TO_BACK + +Methods + +__init__(self, value) + +Attributes + +BACK_TO_FRONT + +BOTTOM_TO_TOP + +FRONT_TO_BACK + +LEFT_TO_RIGHT + +RIGHT_TO_LEFT + +TOP_TO_BOTTOM + +name + +value + +__init__(self: omni.ui._ui.Direction, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.DockPolicy.md b/omni.ui.DockPolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..53332695f5845dba508fc47c803ade869f685e79 --- /dev/null +++ b/omni.ui.DockPolicy.md @@ -0,0 +1,48 @@ + + +DockPolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +DockPolicy + +  + +# DockPolicy + +class omni.ui.DockPolicy +Bases: pybind11_object +Members: +DO_NOTHING +CURRENT_WINDOW_IS_ACTIVE +TARGET_WINDOW_IS_ACTIVE +Methods + +__init__(self, value) + +Attributes + +CURRENT_WINDOW_IS_ACTIVE + +DO_NOTHING + +TARGET_WINDOW_IS_ACTIVE + +name + +value + +__init__(self: omni.ui._ui.DockPolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.DockPosition.md b/omni.ui.DockPosition.md new file mode 100644 index 0000000000000000000000000000000000000000..de8a08af63ab024606a4849ff6f6cc31e8dd679d --- /dev/null +++ b/omni.ui.DockPosition.md @@ -0,0 +1,54 @@ + + +DockPosition — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +DockPosition + +  + +# DockPosition + +class omni.ui.DockPosition +Bases: pybind11_object +Members: +RIGHT +LEFT +TOP +BOTTOM +SAME +Methods + +__init__(self, value) + +Attributes + +BOTTOM + +LEFT + +RIGHT + +SAME + +TOP + +name + +value + +__init__(self: omni.ui._ui.DockPosition, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.DockPreference.md b/omni.ui.DockPreference.md new file mode 100644 index 0000000000000000000000000000000000000000..aaa20edd7f55cdd77c15e9ad2be4422d2b3029fc --- /dev/null +++ b/omni.ui.DockPreference.md @@ -0,0 +1,60 @@ + + +DockPreference — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +DockPreference + +  + +# DockPreference + +class omni.ui.DockPreference +Bases: pybind11_object +Members: +DISABLED +MAIN +RIGHT +LEFT +RIGHT_TOP +RIGHT_BOTTOM +LEFT_BOTTOM +Methods + +__init__(self, value) + +Attributes + +DISABLED + +LEFT + +LEFT_BOTTOM + +MAIN + +RIGHT + +RIGHT_BOTTOM + +RIGHT_TOP + +name + +value + +__init__(self: omni.ui._ui.DockPreference, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.DockSpace.md b/omni.ui.DockSpace.md new file mode 100644 index 0000000000000000000000000000000000000000..21bbfcb6510d8e775c46d50cdfaa42ee54d3e033 --- /dev/null +++ b/omni.ui.DockSpace.md @@ -0,0 +1,45 @@ + + +DockSpace — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +DockSpace + +  + +# DockSpace + +class omni.ui.DockSpace +Bases: pybind11_object +The DockSpace class represents Dock Space for the OS Window. +Methods + +__init__(self, arg0, **kwargs) +Construct the main window, add it to the underlying windowing system, and makes it appear. + +Attributes + +dock_frame +This represents Styling opportunity for the Window background. + +__init__(self: omni.ui._ui.DockSpace, arg0: object, **kwargs) → None +Construct the main window, add it to the underlying windowing system, and makes it appear. + +`kwargsdict`See below + +### Keyword Arguments: + +property dock_frame +This represents Styling opportunity for the Window background. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.DynamicTextureProvider.md b/omni.ui.DynamicTextureProvider.md new file mode 100644 index 0000000000000000000000000000000000000000..e085441efc6ebd49c75166946f5b2a1728f1e7d5 --- /dev/null +++ b/omni.ui.DynamicTextureProvider.md @@ -0,0 +1,35 @@ + + +DynamicTextureProvider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +DynamicTextureProvider + +  + +# DynamicTextureProvider + +class omni.ui.DynamicTextureProvider +Bases: ByteImageProvider +doc +Methods + +__init__(self, arg0) +doc + +Attributes + +__init__(self: omni.ui._ui.DynamicTextureProvider, arg0: str) → None +doc + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Ellipse.md b/omni.ui.Ellipse.md new file mode 100644 index 0000000000000000000000000000000000000000..b686f1ec40e375dbac392af0a738692c9ced7ba3 --- /dev/null +++ b/omni.ui.Ellipse.md @@ -0,0 +1,94 @@ + + +Ellipse — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Ellipse + +  + +# Ellipse + +class omni.ui.Ellipse +Bases: Shape +Constructs Ellipse. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +Methods + +__init__(self, **kwargs) + +Attributes + +__init__(self: omni.ui._ui.Ellipse, **kwargs) → None + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FillPolicy.md b/omni.ui.FillPolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..d5efc6df77b5a64914bea7d7148f60251bf93a65 --- /dev/null +++ b/omni.ui.FillPolicy.md @@ -0,0 +1,50 @@ + + +FillPolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FillPolicy + +  + +# FillPolicy + +class omni.ui.FillPolicy +Bases: pybind11_object +Members: + +STRETCH +PRESERVE_ASPECT_FIT +PRESERVE_ASPECT_CROP + +Methods + +__init__(self, value) + +Attributes + +PRESERVE_ASPECT_CROP + +PRESERVE_ASPECT_FIT + +STRETCH + +name + +value + +__init__(self: omni.ui._ui.FillPolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FloatDrag.md b/omni.ui.FloatDrag.md new file mode 100644 index 0000000000000000000000000000000000000000..9205692194943f9c3d46a6fa880fcc21f9d95692 --- /dev/null +++ b/omni.ui.FloatDrag.md @@ -0,0 +1,105 @@ + + +FloatDrag — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FloatDrag + +  + +# FloatDrag + +class omni.ui.FloatDrag +Bases: FloatSlider +The drag widget that looks like a field but it’s possible to change the value with dragging. +Methods + +__init__(self[, model]) +Construct FloatDrag. + +Attributes + +__init__(self: omni.ui._ui.FloatDrag, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Construct FloatDrag. + +`kwargsdict`See below + +### Keyword Arguments: + +`minfloat`This property holds the slider’s minimum value. + +`maxfloat`This property holds the slider’s maximum value. + +`stepfloat`This property controls the steping speed on the drag. + +`formatstr`This property overrides automatic formatting if needed. + +`precisionuint32_t`This property holds the slider value’s float precision. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FloatField.md b/omni.ui.FloatField.md new file mode 100644 index 0000000000000000000000000000000000000000..d1f6adb4f178cf9e3017c97348d9a7800c79d1b9 --- /dev/null +++ b/omni.ui.FloatField.md @@ -0,0 +1,103 @@ + + +FloatField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FloatField + +  + +# FloatField + +class omni.ui.FloatField +Bases: AbstractField +The FloatField widget is a one-line text editor with a string model. +Methods + +__init__(self[, model]) +Construct FloatField. + +Attributes + +precision +This property holds the field value's float precision. + +__init__(self: omni.ui._ui.FloatField, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Construct FloatField. + +`kwargsdict`See below + +### Keyword Arguments: + +`precisionuint32_t`This property holds the field value’s float precision. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property precision +This property holds the field value’s float precision. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FloatSlider.md b/omni.ui.FloatSlider.md new file mode 100644 index 0000000000000000000000000000000000000000..2300e36a0bb0b9bc9a33aa826c95704ab7729bca --- /dev/null +++ b/omni.ui.FloatSlider.md @@ -0,0 +1,135 @@ + + +FloatSlider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FloatSlider + +  + +# FloatSlider + +class omni.ui.FloatSlider +Bases: AbstractSlider +The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into a float value within the legal range. +Methods + +__init__(self[, model]) +Construct FloatSlider. + +Attributes + +format +This property overrides automatic formatting if needed. + +max +This property holds the slider's maximum value. + +min +This property holds the slider's minimum value. + +precision +This property holds the slider value's float precision. + +step +This property controls the steping speed on the drag. + +__init__(self: omni.ui._ui.FloatSlider, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Construct FloatSlider. + +`kwargsdict`See below + +### Keyword Arguments: + +`minfloat`This property holds the slider’s minimum value. + +`maxfloat`This property holds the slider’s maximum value. + +`stepfloat`This property controls the steping speed on the drag. + +`formatstr`This property overrides automatic formatting if needed. + +`precisionuint32_t`This property holds the slider value’s float precision. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property format +This property overrides automatic formatting if needed. + +property max +This property holds the slider’s maximum value. + +property min +This property holds the slider’s minimum value. + +property precision +This property holds the slider value’s float precision. + +property step +This property controls the steping speed on the drag. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FloatStore.md b/omni.ui.FloatStore.md new file mode 100644 index 0000000000000000000000000000000000000000..13139dde266799a33f040c1bfe5080601c3b91b8 --- /dev/null +++ b/omni.ui.FloatStore.md @@ -0,0 +1,43 @@ + + +FloatStore — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FloatStore + +  + +# FloatStore + +class omni.ui.FloatStore +Bases: pybind11_object +A singleton that stores all the UI Style float properties of omni.ui. +Methods + +__init__(*args, **kwargs) + +find(name) +Return the index of the color with specific name. + +store(name, value) +Save the color by name. + +__init__(*args, **kwargs) + +static find(name: str) → float +Return the index of the color with specific name. + +static store(name: str, value: float) → None +Save the color by name. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FocusPolicy.md b/omni.ui.FocusPolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..ffcb0432cb7e2becf00f37965202cddb570365db --- /dev/null +++ b/omni.ui.FocusPolicy.md @@ -0,0 +1,51 @@ + + +FocusPolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FocusPolicy + +  + +# FocusPolicy + +class omni.ui.FocusPolicy +Bases: pybind11_object +Members: +DEFAULT +FOCUS_ON_LEFT_MOUSE_DOWN +FOCUS_ON_ANY_MOUSE_DOWN +FOCUS_ON_HOVER +Methods + +__init__(self, value) + +Attributes + +DEFAULT + +FOCUS_ON_ANY_MOUSE_DOWN + +FOCUS_ON_HOVER + +FOCUS_ON_LEFT_MOUSE_DOWN + +name + +value + +__init__(self: omni.ui._ui.FocusPolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FontStyle.md b/omni.ui.FontStyle.md new file mode 100644 index 0000000000000000000000000000000000000000..a54c3a338c2c5272c3ab300960ada7c10a6902f2 --- /dev/null +++ b/omni.ui.FontStyle.md @@ -0,0 +1,75 @@ + + +FontStyle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FontStyle + +  + +# FontStyle + +class omni.ui.FontStyle +Bases: pybind11_object +Supported font styles. +Members: + +NONE +NORMAL +LARGE +SMALL +EXTRA_LARGE +XXL +XXXL +EXTRA_SMALL +XXS +XXXS +ULTRA + +Methods + +__init__(self, value) + +Attributes + +EXTRA_LARGE + +EXTRA_SMALL + +LARGE + +NONE + +NORMAL + +SMALL + +ULTRA + +XXL + +XXS + +XXXL + +XXXS + +name + +value + +__init__(self: omni.ui._ui.FontStyle, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Fraction.md b/omni.ui.Fraction.md new file mode 100644 index 0000000000000000000000000000000000000000..c11141c303ac2b0c75df305629828fae0aa96760 --- /dev/null +++ b/omni.ui.Fraction.md @@ -0,0 +1,39 @@ + + +Fraction — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Fraction + +  + +# Fraction + +class omni.ui.Fraction +Bases: Length +Fraction length is made to take the space of the parent widget, divides it up into a row of boxes, and makes each child widget fill one box. +Methods + +__init__(self, value) +Construct Fraction. + +Attributes + +__init__(self: omni.ui._ui.Fraction, value: float) → None +Construct Fraction. + +`kwargsdict`See below + +### Keyword Arguments: + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Frame.md b/omni.ui.Frame.md new file mode 100644 index 0000000000000000000000000000000000000000..7b69225f4c09f7e043e45106a6257caac99db699 --- /dev/null +++ b/omni.ui.Frame.md @@ -0,0 +1,166 @@ + + +Frame — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Frame + +  + +# Frame + +class omni.ui.Frame +Bases: Container +The Frame is a widget that can hold one child widget. +Frame is used to crop the contents of a child widget or to draw small widget in a big view. The child widget must be specified with addChild(). +Methods + +__init__(self, **kwargs) +Constructs Frame. + +call_build_fn(self) +Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. + +has_build_fn(self) +Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. + +invalidate_raster(self) +This method regenerates the raster image of the widget, even if the widget's content has not changed. + +rebuild(self) +After this method is called, the next drawing cycle build_fn will be called again to rebuild everything. + +set_build_fn(self, fn) +Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. + +Attributes + +frozen +A special mode where the child is placed to the transparent borderless window. + +horizontal_clipping +When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. + +raster_policy +Determine how the content of the frame should be rasterized. + +separate_window +A special mode where the child is placed to the transparent borderless window. + +vertical_clipping +When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. + +__init__(self: omni.ui._ui.Frame, **kwargs) → None +Constructs Frame. + +`kwargsdict`See below + +### Keyword Arguments: + +`horizontal_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. + +`vertical_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. + +`separate_window`A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. + +`raster_policy`Determine how the content of the frame should be rasterized. + +`build_fn`Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +call_build_fn(self: omni.ui._ui.Frame) → None +Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +has_build_fn(self: omni.ui._ui.Frame) → bool +Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +invalidate_raster(self: omni.ui._ui.Frame) → None +This method regenerates the raster image of the widget, even if the widget’s content has not changed. This can be used with both the eOnDemand and eAuto raster policies, and is used to update the content displayed in the widget. Note that this operation may be resource-intensive, and should be used sparingly. + +rebuild(self: omni.ui._ui.Frame) → None +After this method is called, the next drawing cycle build_fn will be called again to rebuild everything. + +set_build_fn(self: omni.ui._ui.Frame, fn: Callable[[], None]) → None +Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +property frozen +A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. + +property horizontal_clipping +When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. + +property raster_policy +Determine how the content of the frame should be rasterized. + +property separate_window +A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. + +property vertical_clipping +When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FreeBezierCurve.md b/omni.ui.FreeBezierCurve.md new file mode 100644 index 0000000000000000000000000000000000000000..de52b79d4f8fbbf9b5b2662e11619cac599e6a28 --- /dev/null +++ b/omni.ui.FreeBezierCurve.md @@ -0,0 +1,121 @@ + + +FreeBezierCurve — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FreeBezierCurve + +  + +# FreeBezierCurve + +class omni.ui.FreeBezierCurve +Bases: BezierCurve +Smooth curve that can be scaled infinitely. +The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. +Methods + +__init__(self, arg0, arg1, **kwargs) +Initialize the shape with bounds limited to the positions of the given widgets. + +Attributes + +__init__(self: omni.ui._ui.FreeBezierCurve, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None +Initialize the shape with bounds limited to the positions of the given widgets. +### Arguments: + +`start :`The bound corner is in the center of this given widget. + +`end :`The bound corner is in the center of this given widget. + +`kwargsdict`See below + +### Keyword Arguments: +`start_tangent_width: ` +This property holds the X coordinate of the start of the curve relative to the width bound of the curve. +`start_tangent_height: ` +This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. +`end_tangent_width: ` +This property holds the X coordinate of the end of the curve relative to the width bound of the curve. +`end_tangent_height: ` +This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. +`set_mouse_hovered_fn: ` +Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +`anchor_position: `This property holds the parametric value of the curve anchor. + +`anchor_alignment: `This property holds the Alignment of the curve anchor. + +`set_anchor_fn: Callable`Sets the function that will be called for the curve anchor. + +`invalidate_anchor: `Function that causes the anchor frame to be redrawn. + +`get_closest_parametric_position: `Function that returns the closest parametric T value to a given x,y position. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FreeCircle.md b/omni.ui.FreeCircle.md new file mode 100644 index 0000000000000000000000000000000000000000..7815e951714506abc0b86342eb42754c4848f0cb --- /dev/null +++ b/omni.ui.FreeCircle.md @@ -0,0 +1,109 @@ + + +FreeCircle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FreeCircle + +  + +# FreeCircle + +class omni.ui.FreeCircle +Bases: Circle +The Circle widget provides a colored circle to display. +The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. +Methods + +__init__(self, arg0, arg1, **kwargs) +Initialize the shape with bounds limited to the positions of the given widgets. + +Attributes + +__init__(self: omni.ui._ui.FreeCircle, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None +Initialize the shape with bounds limited to the positions of the given widgets. +### Arguments: + +`start :`The bound corner is in the center of this given widget. + +`end :`The bound corner is in the center of this given widget. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment :`This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered. + +`radius :`This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0. + +`arc :`This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered. + +`size_policy :`Define what happens when the source image has a different size than the item. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FreeEllipse.md b/omni.ui.FreeEllipse.md new file mode 100644 index 0000000000000000000000000000000000000000..0f9073d9d5f3e275c0238aadba4c487b7e67834d --- /dev/null +++ b/omni.ui.FreeEllipse.md @@ -0,0 +1,101 @@ + + +FreeEllipse — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FreeEllipse + +  + +# FreeEllipse + +class omni.ui.FreeEllipse +Bases: Ellipse +The Ellipse widget provides a colored ellipse to display. +The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. +Methods + +__init__(self, arg0, arg1, **kwargs) +Initialize the shape with bounds limited to the positions of the given widgets. + +Attributes + +__init__(self: omni.ui._ui.FreeEllipse, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None +Initialize the shape with bounds limited to the positions of the given widgets. +### Arguments: + +`start :`The bound corner is in the center of this given widget. + +`end :`The bound corner is in the center of this given widget. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FreeLine.md b/omni.ui.FreeLine.md new file mode 100644 index 0000000000000000000000000000000000000000..40e0f8f7fd8f343e2f28b26bce3ff6a7e39d4fb1 --- /dev/null +++ b/omni.ui.FreeLine.md @@ -0,0 +1,113 @@ + + +FreeLine — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FreeLine + +  + +# FreeLine + +class omni.ui.FreeLine +Bases: Line +The Line widget provides a colored line to display. +The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. +Methods + +__init__(self, arg0, arg1, **kwargs) +Initialize the shape with bounds limited to the positions of the given widgets. + +Attributes + +__init__(self: omni.ui._ui.FreeLine, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None +Initialize the shape with bounds limited to the positions of the given widgets. +### Arguments: + +`start :`The bound corner is in the center of this given widget. + +`end :`The bound corner is in the center of this given widget. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property that holds the alignment of the Line can only be LEFT, RIGHT, V_CENTER, H_CENTER , BOTTOM, TOP. By default, the Line is H_Center. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +`anchor_position: `This property holds the parametric value of the curve anchor. + +`anchor_alignment: `This property holds the Alignment of the curve anchor. + +`set_anchor_fn: Callable`Sets the function that will be called for the curve anchor. + +`invalidate_anchor: `Function that causes the anchor frame to be redrawn. + +`get_closest_parametric_position: `Function that returns the closest parametric T value to a given x,y position. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FreeRectangle.md b/omni.ui.FreeRectangle.md new file mode 100644 index 0000000000000000000000000000000000000000..59668f87145974a82dedad1e073a2cc2f9be687e --- /dev/null +++ b/omni.ui.FreeRectangle.md @@ -0,0 +1,101 @@ + + +FreeRectangle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FreeRectangle + +  + +# FreeRectangle + +class omni.ui.FreeRectangle +Bases: Rectangle +The Rectangle widget provides a colored rectangle to display. +The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. +Methods + +__init__(self, arg0, arg1, **kwargs) +Initialize the shape with bounds limited to the positions of the given widgets. + +Attributes + +__init__(self: omni.ui._ui.FreeRectangle, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None +Initialize the shape with bounds limited to the positions of the given widgets. +### Arguments: + +`start :`The bound corner is in the center of this given widget. + +`end :`The bound corner is in the center of this given widget. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.FreeTriangle.md b/omni.ui.FreeTriangle.md new file mode 100644 index 0000000000000000000000000000000000000000..3b639961155274a837ef817d32609c7fb640c67b --- /dev/null +++ b/omni.ui.FreeTriangle.md @@ -0,0 +1,103 @@ + + +FreeTriangle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +FreeTriangle + +  + +# FreeTriangle + +class omni.ui.FreeTriangle +Bases: Triangle +The Triangle widget provides a colored triangle to display. +The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. +Methods + +__init__(self, arg0, arg1, **kwargs) +Initialize the shape with bounds limited to the positions of the given widgets. + +Attributes + +__init__(self: omni.ui._ui.FreeTriangle, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None +Initialize the shape with bounds limited to the positions of the given widgets. +### Arguments: + +`start :`The bound corner is in the center of this given widget. + +`end :`The bound corner is in the center of this given widget. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property holds the alignment of the triangle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the triangle is centered. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Grid.md b/omni.ui.Grid.md new file mode 100644 index 0000000000000000000000000000000000000000..020c4ea3fbe61cce8b706acf15e22e1ece6c1699 --- /dev/null +++ b/omni.ui.Grid.md @@ -0,0 +1,138 @@ + + +Grid — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Grid + +  + +# Grid + +class omni.ui.Grid +Bases: Stack +Grid is a container that arranges its child views in a grid. The grid vertical/horizontal direction is the direction the grid size growing with creating more children. +Methods + +__init__(self, arg0, **kwargs) +Constructor. + +Attributes + +column_count +The number of columns. + +column_width +The width of the column. + +row_count +The number of rows. + +row_height +The height of the row. + +__init__(self: omni.ui._ui.Grid, arg0: omni.ui._ui.Direction, **kwargs) → None +Constructor. +### Arguments: + +`direction :`Determines the direction the widget grows when adding more children. + +`kwargsdict`See below + +### Keyword Arguments: + +`column_width`The width of the column. It’s only possible to set it if the grid is vertical. Once it’s set, the column count depends on the size of the widget. + +`row_height`The height of the row. It’s only possible to set it if the grid is horizontal. Once it’s set, the row count depends on the size of the widget. + +`column_count`The number of columns. It’s only possible to set it if the grid is vertical. Once it’s set, the column width depends on the widget size. + +`row_count`The number of rows. It’s only possible to set it if the grid is horizontal. Once it’s set, the row height depends on the widget size. + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property column_count +The number of columns. It’s only possible to set it if the grid is vertical. Once it’s set, the column width depends on the widget size. + +property column_width +The width of the column. It’s only possible to set it if the grid is vertical. Once it’s set, the column count depends on the size of the widget. + +property row_count +The number of rows. It’s only possible to set it if the grid is horizontal. Once it’s set, the row height depends on the widget size. + +property row_height +The height of the row. It’s only possible to set it if the grid is horizontal. Once it’s set, the row count depends on the size of the widget. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.HGrid.md b/omni.ui.HGrid.md new file mode 100644 index 0000000000000000000000000000000000000000..5d39c0e8a41d6494160e00e82a335a573434d964 --- /dev/null +++ b/omni.ui.HGrid.md @@ -0,0 +1,111 @@ + + +HGrid — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +HGrid + +  + +# HGrid + +class omni.ui.HGrid +Bases: Grid +Shortcut for Grid{eLeftToRight}. The grid grows from left to right with the widgets placed. +Methods + +__init__(self, **kwargs) +Construct a grid that grow from left to right with the widgets placed. + +Attributes + +__init__(self: omni.ui._ui.HGrid, **kwargs) → None +Construct a grid that grow from left to right with the widgets placed. + +`kwargsdict`See below + +### Keyword Arguments: + +`column_width`The width of the column. It’s only possible to set it if the grid is vertical. Once it’s set, the column count depends on the size of the widget. + +`row_height`The height of the row. It’s only possible to set it if the grid is horizontal. Once it’s set, the row count depends on the size of the widget. + +`column_count`The number of columns. It’s only possible to set it if the grid is vertical. Once it’s set, the column width depends on the widget size. + +`row_count`The number of rows. It’s only possible to set it if the grid is horizontal. Once it’s set, the row height depends on the widget size. + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.HStack.md b/omni.ui.HStack.md new file mode 100644 index 0000000000000000000000000000000000000000..a606a28d9d84040dd19e2bc68672cb1dfb553390 --- /dev/null +++ b/omni.ui.HStack.md @@ -0,0 +1,103 @@ + + +HStack — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +HStack + +  + +# HStack + +class omni.ui.HStack +Bases: Stack +Shortcut for Stack{eLeftToRight}. The widgets are placed in a row, with suitable sizes. +Methods + +__init__(self, **kwargs) +Construct a stack with the widgets placed in a row from left to right. + +Attributes + +__init__(self: omni.ui._ui.HStack, **kwargs) → None +Construct a stack with the widgets placed in a row from left to right. + +`kwargsdict`See below + +### Keyword Arguments: + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Image.md b/omni.ui.Image.md new file mode 100644 index 0000000000000000000000000000000000000000..e0cfb586c102c6dd7bbc80056df3bb936f37d659 --- /dev/null +++ b/omni.ui.Image.md @@ -0,0 +1,212 @@ + + +Image — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Image + +  + +# Image + +class omni.ui.Image +Bases: Widget +The Image widget displays an image. +The source of the image is specified as a URL using the source property. By default, specifying the width and height of the item causes the image to be scaled to that size. This behavior can be changed by setting the fill_mode property, allowing the image to be stretched or scaled instead. The property alignment controls where to align the scaled image. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +set_progress_changed_fn(self, fn) +The progress of the image loading. + +Attributes + +alignment +This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. + +fill_policy +Define what happens when the source image has a different size than the item. + +pixel_aligned +Prevents image blurring when it's placed to fractional position (like x=0.5, y=0.5) + +source_url +This property holds the image URL. + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.Image, arg0: str, **kwargs) -> None + +Construct image with given url. If the url is empty, it gets the image URL from styling. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered. + +`fill_policy`Define what happens when the source image has a different size than the item. + +`pixel_aligned`Prevents image blurring when it’s placed to fractional position (like x=0.5, y=0.5) + +`progress_changed_fn`The progress of the image loading. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +__init__(self: omni.ui._ui.Image, **kwargs) -> None + +Construct image with given url. If the url is empty, it gets the image URL from styling. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered. + +`fill_policy`Define what happens when the source image has a different size than the item. + +`pixel_aligned`Prevents image blurring when it’s placed to fractional position (like x=0.5, y=0.5) + +`progress_changed_fn`The progress of the image loading. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +set_progress_changed_fn(self: omni.ui._ui.Image, fn: Callable[[float], None]) → None +The progress of the image loading. + +property alignment +This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered. + +property fill_policy +Define what happens when the source image has a different size than the item. + +property pixel_aligned +Prevents image blurring when it’s placed to fractional position (like x=0.5, y=0.5) + +property source_url +This property holds the image URL. It can be an +omni: +file: + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ImageProvider.md b/omni.ui.ImageProvider.md new file mode 100644 index 0000000000000000000000000000000000000000..e07985812085f82c22ea87987dced80b454105c8 --- /dev/null +++ b/omni.ui.ImageProvider.md @@ -0,0 +1,70 @@ + + +ImageProvider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ImageProvider + +  + +# ImageProvider + +class omni.ui.ImageProvider +Bases: pybind11_object +ImageProvider class, the goal of this class is to provide ImGui reference for the image to be rendered. +Methods + +__init__(self, **kwargs) +doc + +destroy(self) + +get_managed_resource(self) + +set_image_data(*args, **kwargs) +Overloaded function. + +Attributes + +height +Gets image height. + +is_reference_valid +Returns true if ImGui reference is valid, false otherwise. + +width +Gets image width. + +__init__(self: omni.ui._ui.ImageProvider, **kwargs) → None +doc + +destroy(self: omni.ui._ui.ImageProvider) → None + +get_managed_resource(self: omni.ui._ui.ImageProvider) → omni.gpu_foundation_factory._gpu_foundation_factory.RpResource + +set_image_data(*args, **kwargs) +Overloaded function. + +set_image_data(self: omni.ui._ui.ImageProvider, arg0: capsule, arg1: int, arg2: int, arg3: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat) -> None +set_image_data(self: omni.ui._ui.ImageProvider, rp_resource: omni.gpu_foundation_factory._gpu_foundation_factory.RpResource, presentation_key: int = 0) -> None + +property height +Gets image height. + +property is_reference_valid +Returns true if ImGui reference is valid, false otherwise. + +property width +Gets image width. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ImageWithProvider.md b/omni.ui.ImageWithProvider.md new file mode 100644 index 0000000000000000000000000000000000000000..795686a16261c6dab7bb9a61e4f155eea3a327ce --- /dev/null +++ b/omni.ui.ImageWithProvider.md @@ -0,0 +1,132 @@ + + +ImageWithProvider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ImageWithProvider + +  + +# ImageWithProvider + +class omni.ui.ImageWithProvider +Bases: Widget +The Image widget displays an image. +The source of the image is specified as a URL using the source property. By default, specifying the width and height of the item causes the image to be scaled to that size. This behavior can be changed by setting the fill_mode property, allowing the image to be stretched or scaled instead. The property alignment controls where to align the scaled image. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +prepare_draw(self, width, height) +Force call `ImageProvider::prepareDraw` to ensure the next draw call the image is loaded. + +Attributes + +alignment +This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. + +fill_policy +Define what happens when the source image has a different size than the item. + +pixel_aligned +Prevents image blurring when it's placed to fractional position (like x=0.5, y=0.5) + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.ImageWithProvider, arg0: ImageProvider, **kwargs) -> None +__init__(self: omni.ui._ui.ImageWithProvider, arg0: str, **kwargs) -> None +__init__(self: omni.ui._ui.ImageWithProvider, **kwargs) -> None + +Construct image with given ImageProvider. If the ImageProvider is nullptr, it gets the image URL from styling. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered. + +`fill_policy`Define what happens when the source image has a different size than the item. + +`pixel_aligned`Prevents image blurring when it’s placed to fractional position (like x=0.5, y=0.5) + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +prepare_draw(self: omni.ui._ui.ImageWithProvider, width: float, height: float) → None +Force call `ImageProvider::prepareDraw` to ensure the next draw call the image is loaded. It can be used to load the image for a hidden widget or to set the rasterization resolution. + +property alignment +This property holds the alignment of the image when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the image is centered. + +property fill_policy +Define what happens when the source image has a different size than the item. + +property pixel_aligned +Prevents image blurring when it’s placed to fractional position (like x=0.5, y=0.5) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Inspector.md b/omni.ui.Inspector.md new file mode 100644 index 0000000000000000000000000000000000000000..a79259538b9cc41092777a6ca566d24b5d3c59bf --- /dev/null +++ b/omni.ui.Inspector.md @@ -0,0 +1,73 @@ + + +Inspector — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Inspector + +  + +# Inspector + +class omni.ui.Inspector +Bases: pybind11_object +Inspector is the helper to check the internal state of the widget. It’s not recommended to use it for the routine UI. +Methods + +__init__(*args, **kwargs) + +begin_computed_height_metric() +Start counting how many times Widget::setComputedHeight is called + +begin_computed_width_metric() +Start counting how many times Widget::setComputedWidth is called + +end_computed_height_metric() +Start counting how many times Widget::setComputedHeight is called and return the number + +end_computed_width_metric() +Start counting how many times Widget::setComputedWidth is called and return the number + +get_children(widget) +Get the children of the given Widget. + +get_resolved_style(widget) +Get the resolved style of the given Widget. + +get_stored_font_atlases() +Provides the information about font atlases + +__init__(*args, **kwargs) + +static begin_computed_height_metric() → None +Start counting how many times Widget::setComputedHeight is called + +static begin_computed_width_metric() → None +Start counting how many times Widget::setComputedWidth is called + +static end_computed_height_metric() → int +Start counting how many times Widget::setComputedHeight is called and return the number + +static end_computed_width_metric() → int +Start counting how many times Widget::setComputedWidth is called and return the number + +static get_children(widget: omni.ui._ui.Widget) → List[omni.ui._ui.Widget] +Get the children of the given Widget. + +static get_resolved_style(widget: omni.ui._ui.Widget) → omni::ui::StyleContainer +Get the resolved style of the given Widget. + +static get_stored_font_atlases() → List[Tuple[str, int]] +Provides the information about font atlases + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.IntDrag.md b/omni.ui.IntDrag.md new file mode 100644 index 0000000000000000000000000000000000000000..f4d672336ec29cd297dc1be707baac825df281b9 --- /dev/null +++ b/omni.ui.IntDrag.md @@ -0,0 +1,110 @@ + + +IntDrag — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +IntDrag + +  + +# IntDrag + +class omni.ui.IntDrag +Bases: IntSlider +The drag widget that looks like a field but it’s possible to change the value with dragging. +Methods + +__init__(self[, model]) +Constructs IntDrag. + +Attributes + +step +This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. + +__init__(self: omni.ui._ui.IntDrag, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Constructs IntDrag. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`step`This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. + +`min`This property holds the slider’s minimum value. + +`max`This property holds the slider’s maximum value. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property step +This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.IntField.md b/omni.ui.IntField.md new file mode 100644 index 0000000000000000000000000000000000000000..929749f327e09370c9eb9d40389b919dee6c8346 --- /dev/null +++ b/omni.ui.IntField.md @@ -0,0 +1,95 @@ + + +IntField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +IntField + +  + +# IntField + +class omni.ui.IntField +Bases: AbstractField +The IntField widget is a one-line text editor with a string model. +Methods + +__init__(self[, model]) +Construct IntField. + +Attributes + +__init__(self: omni.ui._ui.IntField, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Construct IntField. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.IntSlider.md b/omni.ui.IntSlider.md new file mode 100644 index 0000000000000000000000000000000000000000..2da913b187256b80117ef650afd28f687da488be --- /dev/null +++ b/omni.ui.IntSlider.md @@ -0,0 +1,114 @@ + + +IntSlider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +IntSlider + +  + +# IntSlider + +class omni.ui.IntSlider +Bases: AbstractSlider +The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range. +Methods + +__init__(self[, model]) +Constructs IntSlider. + +Attributes + +max +This property holds the slider's maximum value. + +min +This property holds the slider's minimum value. + +__init__(self: omni.ui._ui.IntSlider, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Constructs IntSlider. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`min`This property holds the slider’s minimum value. + +`max`This property holds the slider’s maximum value. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property max +This property holds the slider’s maximum value. + +property min +This property holds the slider’s minimum value. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.InvisibleButton.md b/omni.ui.InvisibleButton.md new file mode 100644 index 0000000000000000000000000000000000000000..ce06e7c2407453d76a5fb1cb5a3cf56f94ce3dfb --- /dev/null +++ b/omni.ui.InvisibleButton.md @@ -0,0 +1,115 @@ + + +InvisibleButton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +InvisibleButton + +  + +# InvisibleButton + +class omni.ui.InvisibleButton +Bases: Widget +The InvisibleButton widget provides a transparent command button. +Methods + +__init__(self, **kwargs) +Constructor. + +call_clicked_fn(self) +Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +has_clicked_fn(self) +Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +set_clicked_fn(self, fn) +Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +Attributes + +__init__(self: omni.ui._ui.InvisibleButton, **kwargs) → None +Constructor. + +`kwargsdict`See below + +### Keyword Arguments: + +`clicked_fnCallable[[], None]`Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +call_clicked_fn(self: omni.ui._ui.InvisibleButton) → None +Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +has_clicked_fn(self: omni.ui._ui.InvisibleButton) → bool +Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +set_clicked_fn(self: omni.ui._ui.InvisibleButton, fn: Callable[[], None]) → None +Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ItemModelHelper.md b/omni.ui.ItemModelHelper.md new file mode 100644 index 0000000000000000000000000000000000000000..fc87368a6a1a878b09d0951ce573fe3881ec47eb --- /dev/null +++ b/omni.ui.ItemModelHelper.md @@ -0,0 +1,39 @@ + + +ItemModelHelper — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ItemModelHelper + +  + +# ItemModelHelper + +class omni.ui.ItemModelHelper +Bases: pybind11_object +The ItemModelHelper class provides the basic functionality for item widget classes. +Methods + +__init__(*args, **kwargs) + +Attributes + +model +Returns the current model. + +__init__(*args, **kwargs) + +property model +Returns the current model. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.IwpFillPolicy.md b/omni.ui.IwpFillPolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..2b5bae52f52e62eb4d1864f933e96f2edc7d87e4 --- /dev/null +++ b/omni.ui.IwpFillPolicy.md @@ -0,0 +1,50 @@ + + +IwpFillPolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +IwpFillPolicy + +  + +# IwpFillPolicy + +class omni.ui.IwpFillPolicy +Bases: pybind11_object +Members: + +IWP_STRETCH +IWP_PRESERVE_ASPECT_FIT +IWP_PRESERVE_ASPECT_CROP + +Methods + +__init__(self, value) + +Attributes + +IWP_PRESERVE_ASPECT_CROP + +IWP_PRESERVE_ASPECT_FIT + +IWP_STRETCH + +name + +value + +__init__(self: omni.ui._ui.IwpFillPolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Label.md b/omni.ui.Label.md new file mode 100644 index 0000000000000000000000000000000000000000..8afbd8b417813b05d671a44b8b34b0d4750dca2e --- /dev/null +++ b/omni.ui.Label.md @@ -0,0 +1,157 @@ + + +Label — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Label + +  + +# Label + +class omni.ui.Label +Bases: Widget +The Label widget provides a text to display. +Label is used for displaying text. No additional to Widget user interaction functionality is provided. +Methods + +__init__(self, arg0, **kwargs) +Create a label with the given text. + +Attributes + +alignment +This property holds the alignment of the label's contents. + +elided_text +When the text of a big length has to be displayed in a small area, it can be useful to give the user a visual hint that not all text is visible. + +elided_text_str +Customized elidedText string when elidedText is True, default is .... + +exact_content_height +Return the exact height of the content of this label. + +exact_content_width +Return the exact width of the content of this label. + +hide_text_after_hash +Hide anything after a '##' string or not + +text +This property holds the label's text. + +word_wrap +This property holds the label's word-wrapping policy If this property is true then label text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. + +__init__(self: omni.ui._ui.Label, arg0: str, **kwargs) → None +Create a label with the given text. +### Arguments: + +`text :`The text for the label. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property holds the alignment of the label’s contents. By default, the contents of the label are left-aligned and vertically-centered. + +`word_wrap`This property holds the label’s word-wrapping policy If this property is true then label text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. By default, word wrap is disabled. + +`elided_text`When the text of a big length has to be displayed in a small area, it can be useful to give the user a visual hint that not all text is visible. Label can elide text that doesn’t fit in the area. When this property is true, Label elides the middle of the last visible line and replaces it with “…”. + +`elided_text_str`Customized elidedText string when elidedText is True, default is …. + +`hide_text_after_hash`Hide anything after a ‘##’ string or not + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property alignment +This property holds the alignment of the label’s contents. By default, the contents of the label are left-aligned and vertically-centered. + +property elided_text +When the text of a big length has to be displayed in a small area, it can be useful to give the user a visual hint that not all text is visible. Label can elide text that doesn’t fit in the area. When this property is true, Label elides the middle of the last visible line and replaces it with “…”. + +property elided_text_str +Customized elidedText string when elidedText is True, default is …. + +property exact_content_height +Return the exact height of the content of this label. Computed content height is a size hint and may be bigger than the text in the label. + +property exact_content_width +Return the exact width of the content of this label. Computed content width is a size hint and may be bigger than the text in the label. + +property hide_text_after_hash +Hide anything after a ‘##’ string or not + +property text +This property holds the label’s text. + +property word_wrap +This property holds the label’s word-wrapping policy If this property is true then label text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. By default, word wrap is disabled. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Length.md b/omni.ui.Length.md new file mode 100644 index 0000000000000000000000000000000000000000..a71b1248fc70c4200b60ab7d4c98182a1a0f5489 --- /dev/null +++ b/omni.ui.Length.md @@ -0,0 +1,58 @@ + + +Length — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Length + +  + +# Length + +class omni.ui.Length +Bases: pybind11_object +OMNI.UI has several different units for expressing a length. +Many widget properties take “Length” values, such as width, height, minWidth, minHeight, etc. Pixel is the absolute length unit. Percent and Fraction are relative length units, and they specify a length relative to the parent length. Relative length units are scaled with the parent. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +unit +(UnitType.) Unit. + +value +(float) Value + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.Length, arg0: float, arg1: omni::ui::UnitType) -> None +__init__(self: omni.ui._ui.Length, arg0: float) -> None +__init__(self: omni.ui._ui.Length, arg0: int) -> None + +Construct Length. + +`kwargsdict`See below + +### Keyword Arguments: + +property unit +(UnitType.) Unit. + +property value +(float) Value + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Line.md b/omni.ui.Line.md new file mode 100644 index 0000000000000000000000000000000000000000..5de65fa019cf9f058a8bfd2bac015082c6146d25 --- /dev/null +++ b/omni.ui.Line.md @@ -0,0 +1,113 @@ + + +Line — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Line + +  + +# Line + +class omni.ui.Line +Bases: Shape, ArrowHelper, ShapeAnchorHelper +The Line widget provides a colored line to display. +Methods + +__init__(self, **kwargs) +Constructs Line. + +Attributes + +alignment +This property that holds the alignment of the Line can only be LEFT, RIGHT, V_CENTER, H_CENTER , BOTTOM, TOP. + +__init__(self: omni.ui._ui.Line, **kwargs) → None +Constructs Line. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property that holds the alignment of the Line can only be LEFT, RIGHT, V_CENTER, H_CENTER , BOTTOM, TOP. By default, the Line is H_Center. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +`anchor_position: `This property holds the parametric value of the curve anchor. + +`anchor_alignment: `This property holds the Alignment of the curve anchor. + +`set_anchor_fn: Callable`Sets the function that will be called for the curve anchor. + +`invalidate_anchor: `Function that causes the anchor frame to be redrawn. + +`get_closest_parametric_position: `Function that returns the closest parametric T value to a given x,y position. + +property alignment +This property that holds the alignment of the Line can only be LEFT, RIGHT, V_CENTER, H_CENTER , BOTTOM, TOP. By default, the Line is H_Center. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MainWindow.md b/omni.ui.MainWindow.md new file mode 100644 index 0000000000000000000000000000000000000000..882b8120f38aacc421aa3e5fba5d189bc276943d --- /dev/null +++ b/omni.ui.MainWindow.md @@ -0,0 +1,69 @@ + + +MainWindow — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MainWindow + +  + +# MainWindow + +class omni.ui.MainWindow +Bases: pybind11_object +The MainWindow class represents Main Window for the Application, draw optional MainMenuBar and StatusBar. +Methods + +__init__(self[, show_foreground]) +Construct the main window, add it to the underlying windowing system, and makes it appear. + +Attributes + +cpp_status_bar_enabled +Workaround to reserve space for C++ status bar. + +main_frame +This represents Styling opportunity for the Window background. + +main_menu_bar +The main MenuBar for the application. + +show_foreground +When show_foreground is True, MainWindow prevents other windows from showing. + +status_bar_frame +The StatusBar Frame is empty by default and is meant to be filled by other part of the system. + +__init__(self: omni.ui._ui.MainWindow, show_foreground: bool = False, **kwargs) → None +Construct the main window, add it to the underlying windowing system, and makes it appear. + +`kwargsdict`See below + +### Keyword Arguments: + +property cpp_status_bar_enabled +Workaround to reserve space for C++ status bar. + +property main_frame +This represents Styling opportunity for the Window background. + +property main_menu_bar +The main MenuBar for the application. + +property show_foreground +When show_foreground is True, MainWindow prevents other windows from showing. + +property status_bar_frame +The StatusBar Frame is empty by default and is meant to be filled by other part of the system. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Menu.md b/omni.ui.Menu.md new file mode 100644 index 0000000000000000000000000000000000000000..16d3897d9ecaa8a17d1a4f252ebaa6a1c2acbfb9 --- /dev/null +++ b/omni.ui.Menu.md @@ -0,0 +1,211 @@ + + +Menu — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Menu + +  + +# Menu + +class omni.ui.Menu +Bases: Stack, MenuHelper +The Menu class provides a menu widget for use in menu bars, context menus, and other popup menus. +It can be either a pull-down menu in a menu bar or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item. Context menus are usually invoked by some special keyboard key or by right-clicking. +Methods + +__init__(self[, text]) +Construct Menu. + +call_on_build_fn(self) +Called to re-create new children. + +get_current() +Return the menu that is currently shown. + +has_on_build_fn(self) +Called to re-create new children. + +hide(self) +Close the menu window. + +invalidate(self) +Make Menu dirty so onBuild will be executed to replace the children. + +set_on_build_fn(self, fn) +Called to re-create new children. + +set_shown_changed_fn(self, fn) +If the pulldown menu is shown on the screen. + +set_teared_changed_fn(self, fn) +If the window is teared off. + +show(self) +Create a popup window and show the menu in it. + +show_at(self, arg0, arg1) +Create a popup window and show the menu in it. + +tear_at(self, arg0, arg1) +Create a popup window and show the menu in it. + +Attributes + +shown +If the pulldown menu is shown on the screen. + +tearable +The ability to tear the window off. + +teared +If the window is teared off. + +__init__(self: omni.ui._ui.Menu, text: str = '', **kwargs) → None +Construct Menu. +### Arguments: + +`text :`The text for the menu. + +`kwargsdict`See below + +### Keyword Arguments: + +`tearablebool`The ability to tear the window off. + +`shown_changed_fn`If the pulldown menu is shown on the screen. + +`teared_changed_fn`If the window is teared off. + +`on_build_fn`Called to re-create new children. + +`textstr`This property holds the menu’s text. + +`hotkey_textstr`This property holds the menu’s hotkey text. + +`checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. + +`hide_on_clickbool`Hide or keep the window when the user clicked this item. + +`delegateMenuDelegate`The delegate that generates a widget per menu item. + +`triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +call_on_build_fn(self: omni.ui._ui.Menu) → None +Called to re-create new children. + +static get_current() → omni.ui._ui.Menu +Return the menu that is currently shown. + +has_on_build_fn(self: omni.ui._ui.Menu) → bool +Called to re-create new children. + +hide(self: omni.ui._ui.Menu) → None +Close the menu window. It only works for pop-up context menu and for teared off menu. + +invalidate(self: omni.ui._ui.Menu) → None +Make Menu dirty so onBuild will be executed to replace the children. + +set_on_build_fn(self: omni.ui._ui.Menu, fn: Callable[[], None]) → None +Called to re-create new children. + +set_shown_changed_fn(self: omni.ui._ui.Menu, fn: Callable[[bool], None]) → None +If the pulldown menu is shown on the screen. + +set_teared_changed_fn(self: omni.ui._ui.Menu, fn: Callable[[bool], None]) → None +If the window is teared off. + +show(self: omni.ui._ui.Menu) → None +Create a popup window and show the menu in it. It’s usually used for context menus that are typically invoked by some special keyboard key or by right-clicking. + +show_at(self: omni.ui._ui.Menu, arg0: float, arg1: float) → None +Create a popup window and show the menu in it. This enable to popup the menu at specific position. X and Y are in points to make it easier to the Python users. + +tear_at(self: omni.ui._ui.Menu, arg0: float, arg1: float) → None +Create a popup window and show the menu in it. This tear the menu at specific position. X and Y are in points to make it easier to the Python users. + +property shown +If the pulldown menu is shown on the screen. + +property tearable +The ability to tear the window off. + +property teared +If the window is teared off. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MenuBar.md b/omni.ui.MenuBar.md new file mode 100644 index 0000000000000000000000000000000000000000..d225fa4fd0d68131804940cb51bc23bef628832b --- /dev/null +++ b/omni.ui.MenuBar.md @@ -0,0 +1,124 @@ + + +MenuBar — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MenuBar + +  + +# MenuBar + +class omni.ui.MenuBar +Bases: Menu +The MenuBar class provides a MenuBar at the top of the Window, could also be the MainMenuBar of the MainWindow. +it can only contain Menu, at the moment there is no way to remove item appart from clearing it all together +Methods + +__init__(self, **kwargs) +Construct MenuBar. + +Attributes + +__init__(self: omni.ui._ui.MenuBar, **kwargs) → None +Construct MenuBar. + +`kwargsdict`See below + +### Keyword Arguments: + +`tearablebool`The ability to tear the window off. + +`shown_changed_fn`If the pulldown menu is shown on the screen. + +`teared_changed_fn`If the window is teared off. + +`on_build_fn`Called to re-create new children. + +`textstr`This property holds the menu’s text. + +`hotkey_textstr`This property holds the menu’s hotkey text. + +`checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. + +`hide_on_clickbool`Hide or keep the window when the user clicked this item. + +`delegateMenuDelegate`The delegate that generates a widget per menu item. + +`triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MenuDelegate.md b/omni.ui.MenuDelegate.md new file mode 100644 index 0000000000000000000000000000000000000000..173fc45e324280a21a389d663abf6403e7ddf72c --- /dev/null +++ b/omni.ui.MenuDelegate.md @@ -0,0 +1,127 @@ + + +MenuDelegate — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MenuDelegate + +  + +# MenuDelegate + +class omni.ui.MenuDelegate +Bases: pybind11_object +MenuDelegate is used to generate widgets that represent the menu item. +Methods + +__init__(self, **kwargs) +Constructor. + +build_item(self, item) +This method must be reimplemented to generate custom item. + +build_status(self, item) +This method must be reimplemented to generate custom widgets on the bottom of the window. + +build_title(self, item) +This method must be reimplemented to generate custom title. + +call_on_build_item_fn(self, arg0) +Called to create a new item. + +call_on_build_status_fn(self, arg0) +Called to create a new widget on the bottom of the window. + +call_on_build_title_fn(self, arg0) +Called to create a new title. + +has_on_build_item_fn(self) +Called to create a new item. + +has_on_build_status_fn(self) +Called to create a new widget on the bottom of the window. + +has_on_build_title_fn(self) +Called to create a new title. + +set_default_delegate(delegate) +Set the default delegate to use it when the item doesn't have a delegate. + +set_on_build_item_fn(self, fn, None]) +Called to create a new item. + +set_on_build_status_fn(self, fn, None]) +Called to create a new widget on the bottom of the window. + +set_on_build_title_fn(self, fn, None]) +Called to create a new title. + +Attributes + +propagate + +__init__(self: omni.ui._ui.MenuDelegate, **kwargs) → None +Constructor. + +`kwargsdict`See below + +### Keyword Arguments: + +`on_build_item`Called to create a new item. + +`on_build_title`Called to create a new title. + +`on_build_status`Called to create a new widget on the bottom of the window. + +`propagate`Determine if Menu children should use this delegate when they don’t have the own one. + +build_item(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) → None +This method must be reimplemented to generate custom item. + +build_status(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) → None +This method must be reimplemented to generate custom widgets on the bottom of the window. + +build_title(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) → None +This method must be reimplemented to generate custom title. + +call_on_build_item_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper) → None +Called to create a new item. + +call_on_build_status_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper) → None +Called to create a new widget on the bottom of the window. + +call_on_build_title_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper) → None +Called to create a new title. + +has_on_build_item_fn(self: omni.ui._ui.MenuDelegate) → bool +Called to create a new item. + +has_on_build_status_fn(self: omni.ui._ui.MenuDelegate) → bool +Called to create a new widget on the bottom of the window. + +has_on_build_title_fn(self: omni.ui._ui.MenuDelegate) → bool +Called to create a new title. + +static set_default_delegate(delegate: MenuDelegate) → None +Set the default delegate to use it when the item doesn’t have a delegate. + +set_on_build_item_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None +Called to create a new item. + +set_on_build_status_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None +Called to create a new widget on the bottom of the window. + +set_on_build_title_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None +Called to create a new title. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MenuHelper.md b/omni.ui.MenuHelper.md new file mode 100644 index 0000000000000000000000000000000000000000..5108098e7b11d9509efea84fddfbb6caefff9ca3 --- /dev/null +++ b/omni.ui.MenuHelper.md @@ -0,0 +1,79 @@ + + +MenuHelper — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MenuHelper + +  + +# MenuHelper + +class omni.ui.MenuHelper +Bases: pybind11_object +The helper class for the menu that draws the menu line. +Methods + +__init__(*args, **kwargs) + +call_triggered_fn(self) +Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination. + +has_triggered_fn(self) +Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination. + +set_triggered_fn(self, fn) +Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination. + +Attributes + +checkable +This property holds whether this menu item is checkable. + +delegate + +hide_on_click +Hide or keep the window when the user clicked this item. + +hotkey_text +This property holds the menu's hotkey text. + +menu_compatibility + +text +This property holds the menu's text. + +__init__(*args, **kwargs) + +call_triggered_fn(self: omni.ui._ui.MenuHelper) → None +Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +has_triggered_fn(self: omni.ui._ui.MenuHelper) → bool +Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +set_triggered_fn(self: omni.ui._ui.MenuHelper, fn: Callable[[], None]) → None +Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +property checkable +This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. + +property hide_on_click +Hide or keep the window when the user clicked this item. + +property hotkey_text +This property holds the menu’s hotkey text. + +property text +This property holds the menu’s text. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MenuItem.md b/omni.ui.MenuItem.md new file mode 100644 index 0000000000000000000000000000000000000000..e04bd37056121c1dda3ec5bf6acadc7e48289df6 --- /dev/null +++ b/omni.ui.MenuItem.md @@ -0,0 +1,108 @@ + + +MenuItem — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MenuItem + +  + +# MenuItem + +class omni.ui.MenuItem +Bases: Widget, MenuHelper +A MenuItem represents the items the Menu consists of. +MenuItem can be inserted only once in the menu. +Methods + +__init__(self, arg0, **kwargs) +Construct MenuItem. + +Attributes + +__init__(self: omni.ui._ui.MenuItem, arg0: str, **kwargs) → None +Construct MenuItem. + +`kwargsdict`See below + +### Keyword Arguments: + +`textstr`This property holds the menu’s text. + +`hotkey_textstr`This property holds the menu’s hotkey text. + +`checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. + +`hide_on_clickbool`Hide or keep the window when the user clicked this item. + +`delegateMenuDelegate`The delegate that generates a widget per menu item. + +`triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MenuItemCollection.md b/omni.ui.MenuItemCollection.md new file mode 100644 index 0000000000000000000000000000000000000000..1a86b5adc6f436a3ca8d6758f96ecdec518024e7 --- /dev/null +++ b/omni.ui.MenuItemCollection.md @@ -0,0 +1,123 @@ + + +MenuItemCollection — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MenuItemCollection + +  + +# MenuItemCollection + +class omni.ui.MenuItemCollection +Bases: Menu +The MenuItemCollection is the menu that unchecks children when one of them is checked. +Methods + +__init__(self[, text]) +Construct MenuItemCollection. + +Attributes + +__init__(self: omni.ui._ui.MenuItemCollection, text: str = '', **kwargs) → None +Construct MenuItemCollection. + +`kwargsdict`See below + +### Keyword Arguments: + +`tearablebool`The ability to tear the window off. + +`shown_changed_fn`If the pulldown menu is shown on the screen. + +`teared_changed_fn`If the window is teared off. + +`on_build_fn`Called to re-create new children. + +`textstr`This property holds the menu’s text. + +`hotkey_textstr`This property holds the menu’s hotkey text. + +`checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. + +`hide_on_clickbool`Hide or keep the window when the user clicked this item. + +`delegateMenuDelegate`The delegate that generates a widget per menu item. + +`triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MultiFloatDragField.md b/omni.ui.MultiFloatDragField.md new file mode 100644 index 0000000000000000000000000000000000000000..f7fbe600b5be05b186f54e5918d6932aca8d7045 --- /dev/null +++ b/omni.ui.MultiFloatDragField.md @@ -0,0 +1,135 @@ + + +MultiFloatDragField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MultiFloatDragField + +  + +# MultiFloatDragField + +class omni.ui.MultiFloatDragField +Bases: AbstractMultiField +MultiFloatDragField is the widget that has a sub widget (FloatDrag) per model item. +It’s handy to use it for multi-component data, like for example, float3 or color. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +max +This property holds the drag's maximum value. + +min +This property holds the drag's minimum value. + +step +This property controls the steping speed on the drag. + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.MultiFloatDragField, **kwargs) -> None +__init__(self: omni.ui._ui.MultiFloatDragField, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None +__init__(self: omni.ui._ui.MultiFloatDragField, *args, **kwargs) -> None + +Constructs MultiFloatDragField. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`min`This property holds the drag’s minimum value. + +`max`This property holds the drag’s maximum value. + +`step`This property controls the steping speed on the drag. + +`column_count`The max number of fields in a line. + +`h_spacing`Sets a non-stretchable horizontal space in pixels between child fields. + +`v_spacing`Sets a non-stretchable vertical space in pixels between child fields. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property max +This property holds the drag’s maximum value. + +property min +This property holds the drag’s minimum value. + +property step +This property controls the steping speed on the drag. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MultiFloatField.md b/omni.ui.MultiFloatField.md new file mode 100644 index 0000000000000000000000000000000000000000..d55c1d17bfc94036177b8442e738c53a48a02e8d --- /dev/null +++ b/omni.ui.MultiFloatField.md @@ -0,0 +1,108 @@ + + +MultiFloatField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MultiFloatField + +  + +# MultiFloatField + +class omni.ui.MultiFloatField +Bases: AbstractMultiField +MultiFloatField is the widget that has a sub widget (FloatField) per model item. +It’s handy to use it for multi-component data, like for example, float3 or color. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.MultiFloatField, **kwargs) -> None +__init__(self: omni.ui._ui.MultiFloatField, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None +__init__(self: omni.ui._ui.MultiFloatField, *args, **kwargs) -> None + +Constructor. + +`kwargsdict`See below + +### Keyword Arguments: + +`column_count`The max number of fields in a line. + +`h_spacing`Sets a non-stretchable horizontal space in pixels between child fields. + +`v_spacing`Sets a non-stretchable vertical space in pixels between child fields. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MultiIntDragField.md b/omni.ui.MultiIntDragField.md new file mode 100644 index 0000000000000000000000000000000000000000..7ad4c59e8d711165be2d06c19433787070f32821 --- /dev/null +++ b/omni.ui.MultiIntDragField.md @@ -0,0 +1,135 @@ + + +MultiIntDragField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MultiIntDragField + +  + +# MultiIntDragField + +class omni.ui.MultiIntDragField +Bases: AbstractMultiField +MultiIntDragField is the widget that has a sub widget (IntDrag) per model item. +It’s handy to use it for multi-component data, like for example, int3. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +max +This property holds the drag's maximum value. + +min +This property holds the drag's minimum value. + +step +This property controls the steping speed on the drag. + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.MultiIntDragField, **kwargs) -> None +__init__(self: omni.ui._ui.MultiIntDragField, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None +__init__(self: omni.ui._ui.MultiIntDragField, *args, **kwargs) -> None + +Constructs MultiIntDragField. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`min`This property holds the drag’s minimum value. + +`max`This property holds the drag’s maximum value. + +`step`This property controls the steping speed on the drag. + +`column_count`The max number of fields in a line. + +`h_spacing`Sets a non-stretchable horizontal space in pixels between child fields. + +`v_spacing`Sets a non-stretchable vertical space in pixels between child fields. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property max +This property holds the drag’s maximum value. + +property min +This property holds the drag’s minimum value. + +property step +This property controls the steping speed on the drag. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MultiIntField.md b/omni.ui.MultiIntField.md new file mode 100644 index 0000000000000000000000000000000000000000..f1bf0c5979ce6bbe0830117cd598db95a78af751 --- /dev/null +++ b/omni.ui.MultiIntField.md @@ -0,0 +1,108 @@ + + +MultiIntField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MultiIntField + +  + +# MultiIntField + +class omni.ui.MultiIntField +Bases: AbstractMultiField +MultiIntField is the widget that has a sub widget (IntField) per model item. +It’s handy to use it for multi-component data, like for example, int3. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.MultiIntField, **kwargs) -> None +__init__(self: omni.ui._ui.MultiIntField, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None +__init__(self: omni.ui._ui.MultiIntField, *args, **kwargs) -> None + +Constructor. + +`kwargsdict`See below + +### Keyword Arguments: + +`column_count`The max number of fields in a line. + +`h_spacing`Sets a non-stretchable horizontal space in pixels between child fields. + +`v_spacing`Sets a non-stretchable vertical space in pixels between child fields. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.MultiStringField.md b/omni.ui.MultiStringField.md new file mode 100644 index 0000000000000000000000000000000000000000..b58e08281b43508527048cbfb5b9897e3b3aae7b --- /dev/null +++ b/omni.ui.MultiStringField.md @@ -0,0 +1,108 @@ + + +MultiStringField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +MultiStringField + +  + +# MultiStringField + +class omni.ui.MultiStringField +Bases: AbstractMultiField +MultiStringField is the widget that has a sub widget (StringField) per model item. +It’s handy to use it for string arrays. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +Attributes + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.MultiStringField, **kwargs) -> None +__init__(self: omni.ui._ui.MultiStringField, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None +__init__(self: omni.ui._ui.MultiStringField, *args, **kwargs) -> None + +Constructor. + +`kwargsdict`See below + +### Keyword Arguments: + +`column_count`The max number of fields in a line. + +`h_spacing`Sets a non-stretchable horizontal space in pixels between child fields. + +`v_spacing`Sets a non-stretchable vertical space in pixels between child fields. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.OffsetLine.md b/omni.ui.OffsetLine.md new file mode 100644 index 0000000000000000000000000000000000000000..586c470baf629665b76fa2e18c0a1233c8f69c1b --- /dev/null +++ b/omni.ui.OffsetLine.md @@ -0,0 +1,45 @@ + + +OffsetLine — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +OffsetLine + +  + +# OffsetLine + +class omni.ui.OffsetLine +Bases: FreeLine +The free widget is the widget that is independent of the layout. It draws the line stuck to the bounds of other widgets. +Methods + +__init__(self, arg0, arg1, **kwargs) + +Attributes + +bound_offset +The offset from the bounds of the widgets this line is stuck to. + +offset +The offset to the direction of the line normal. + +__init__(self: omni.ui._ui.OffsetLine, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None + +property bound_offset +The offset from the bounds of the widgets this line is stuck to. + +property offset +The offset to the direction of the line normal. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Percent.md b/omni.ui.Percent.md new file mode 100644 index 0000000000000000000000000000000000000000..44b1ad1f5ae2531ab714a43a8411582ac74a73b4 --- /dev/null +++ b/omni.ui.Percent.md @@ -0,0 +1,39 @@ + + +Percent — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Percent + +  + +# Percent + +class omni.ui.Percent +Bases: Length +Percent is the length in percents from the parent widget. +Methods + +__init__(self, value) +Construct Percent. + +Attributes + +__init__(self: omni.ui._ui.Percent, value: float) → None +Construct Percent. + +`kwargsdict`See below + +### Keyword Arguments: + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Pixel.md b/omni.ui.Pixel.md new file mode 100644 index 0000000000000000000000000000000000000000..0b64177c2fd4a3fdc1bba5ad4598ee5b8fa3deef --- /dev/null +++ b/omni.ui.Pixel.md @@ -0,0 +1,39 @@ + + +Pixel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Pixel + +  + +# Pixel + +class omni.ui.Pixel +Bases: Length +Pixel length is exact length in pixels. +Methods + +__init__(self, value) +Construct Pixel. + +Attributes + +__init__(self: omni.ui._ui.Pixel, value: float) → None +Construct Pixel. + +`kwargsdict`See below + +### Keyword Arguments: + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Placer.md b/omni.ui.Placer.md new file mode 100644 index 0000000000000000000000000000000000000000..ccc229b5ec5d3637bd00ddf225155ae302f575f4 --- /dev/null +++ b/omni.ui.Placer.md @@ -0,0 +1,171 @@ + + +Placer — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Placer + +  + +# Placer + +class omni.ui.Placer +Bases: Container +The Placer class place a single widget to a particular position based on the offet. +Methods + +__init__(self, **kwargs) +Construct Placer. + +invalidate_raster(self) +This method regenerates the raster image of the widget, even if the widget's content has not changed. + +set_offset_x_changed_fn(self, arg0) +offsetX defines the offset placement for the child widget relative to the Placer + +set_offset_y_changed_fn(self, arg0) +offsetY defines the offset placement for the child widget relative to the Placer + +Attributes + +drag_axis +Sets if dragging can be horizontally or vertically. + +draggable +Provides a convenient way to make an item draggable. + +frames_to_start_drag +The placer size depends on the position of the child when false. + +offset_x +offsetX defines the offset placement for the child widget relative to the Placer + +offset_y +offsetY defines the offset placement for the child widget relative to the Placer + +raster_policy +Determine how the content of the frame should be rasterized. + +stable_size +The placer size depends on the position of the child when false. + +__init__(self: omni.ui._ui.Placer, **kwargs) → None +Construct Placer. + +`kwargsdict`See below + +### Keyword Arguments: + +`offset_xtoLength`offsetX defines the offset placement for the child widget relative to the Placer + +`offset_ytoLength`offsetY defines the offset placement for the child widget relative to the Placer + +`draggablebool`Provides a convenient way to make an item draggable. + +`drag_axisAxis`Sets if dragging can be horizontally or vertically. + +`stable_sizebool`The placer size depends on the position of the child when false. + +`raster_policy`Determine how the content of the frame should be rasterized. + +`offset_x_changed_fnCallable[[ui.Length], None]`offsetX defines the offset placement for the child widget relative to the Placer + +`offset_y_changed_fnCallable[[ui.Length], None]`offsetY defines the offset placement for the child widget relative to the Placer + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +invalidate_raster(self: omni.ui._ui.Placer) → None +This method regenerates the raster image of the widget, even if the widget’s content has not changed. This can be used with both the eOnDemand and eAuto raster policies, and is used to update the content displayed in the widget. Note that this operation may be resource-intensive, and should be used sparingly. + +set_offset_x_changed_fn(self: omni.ui._ui.Placer, arg0: Callable[[omni.ui._ui.Length], None]) → None +offsetX defines the offset placement for the child widget relative to the Placer + +set_offset_y_changed_fn(self: omni.ui._ui.Placer, arg0: Callable[[omni.ui._ui.Length], None]) → None +offsetY defines the offset placement for the child widget relative to the Placer + +property drag_axis +Sets if dragging can be horizontally or vertically. + +property draggable +Provides a convenient way to make an item draggable. + +property frames_to_start_drag +The placer size depends on the position of the child when false. + +property offset_x +offsetX defines the offset placement for the child widget relative to the Placer + +property offset_y +offsetY defines the offset placement for the child widget relative to the Placer + +property raster_policy +Determine how the content of the frame should be rasterized. + +property stable_size +The placer size depends on the position of the child when false. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Plot.md b/omni.ui.Plot.md new file mode 100644 index 0000000000000000000000000000000000000000..7cda43d004c22006f34f088c287e6f2034f89484 --- /dev/null +++ b/omni.ui.Plot.md @@ -0,0 +1,162 @@ + + +Plot — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Plot + +  + +# Plot + +class omni.ui.Plot +Bases: Widget +The Plot widget provides a line/histogram to display. +Methods + +__init__(self, type, scale_min, scale_max, ...) +Construct Plot. + +set_data(self, *args) +Sets the image data value. + +set_data_provider_fn(self, arg0, arg1) +Sets the function that will be called when when data required. + +set_xy_data(self, arg0) + +Attributes + +scale_max +This property holds the max scale values. + +scale_min +This property holds the min scale values. + +title +This property holds the title of the image. + +type +This property holds the type of the image, can only be line or histogram. + +value_offset +This property holds the value offset. + +value_stride +This property holds the stride to get value list. + +__init__(self: omni.ui._ui.Plot, type: omni.ui._ui.Type = , scale_min: float = 3.4028234663852886e+38, scale_max: float = 3.4028234663852886e+38, *args, **kwargs) → None +Construct Plot. +### Arguments: + +`type :`The type of the image, can be line or histogram. + +`scaleMin :`The minimal scale value. + +`scaleMax :`The maximum scale value. + +`valueList :`The list of values to draw the image. + +`kwargsdict`See below + +### Keyword Arguments: + +`value_offsetint`This property holds the value offset. By default, the value is 0. + +`value_strideint`This property holds the stride to get value list. By default, the value is 1. + +`titlestr`This property holds the title of the image. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +set_data(self: omni.ui._ui.Plot, *args) → None +Sets the image data value. + +set_data_provider_fn(self: omni.ui._ui.Plot, arg0: Callable[[int], float], arg1: int) → None +Sets the function that will be called when when data required. + +set_xy_data(self: omni.ui._ui.Plot, arg0: List[Tuple[float, float]]) → None + +property scale_max +This property holds the max scale values. By default, the value is FLT_MAX. + +property scale_min +This property holds the min scale values. By default, the value is FLT_MAX. + +property title +This property holds the title of the image. + +property type +This property holds the type of the image, can only be line or histogram. By default, the type is line. + +property value_offset +This property holds the value offset. By default, the value is 0. + +property value_stride +This property holds the stride to get value list. By default, the value is 1. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ProgressBar.md b/omni.ui.ProgressBar.md new file mode 100644 index 0000000000000000000000000000000000000000..ee115a4abdc19511f03fb2ae78f2135b54653abb --- /dev/null +++ b/omni.ui.ProgressBar.md @@ -0,0 +1,98 @@ + + +ProgressBar — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ProgressBar + +  + +# ProgressBar + +class omni.ui.ProgressBar +Bases: Widget, ValueModelHelper +A progressbar is a classic widget for showing the progress of an operation. +Methods + +__init__(self[, model]) +Construct ProgressBar. + +Attributes + +__init__(self: omni.ui._ui.ProgressBar, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Construct ProgressBar. +### Arguments: + +`model :`The model that determines if the button is checked. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.RadioButton.md b/omni.ui.RadioButton.md new file mode 100644 index 0000000000000000000000000000000000000000..35293244361f89d7e733766f2db898586626cbd7 --- /dev/null +++ b/omni.ui.RadioButton.md @@ -0,0 +1,116 @@ + + +RadioButton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +RadioButton + +  + +# RadioButton + +class omni.ui.RadioButton +Bases: Button +RadioButton is the widget that allows the user to choose only one of a predefined set of mutually exclusive options. +RadioButtons are arranged in collections of two or more with the class RadioCollection, which is the central component of the system and controls the behavior of all the RadioButtons in the collection. +Methods + +__init__(self, **kwargs) +Constructs RadioButton. + +Attributes + +radio_collection +This property holds the button's text. + +__init__(self: omni.ui._ui.RadioButton, **kwargs) → None +Constructs RadioButton. + +`kwargsdict`See below + +### Keyword Arguments: + +`radio_collection`This property holds the button’s text. + +`textstr`This property holds the button’s text. + +`image_urlstr`This property holds the button’s optional image URL. + +`image_widthfloat`This property holds the width of the image widget. Do not use this function to find the width of the image. + +`image_heightfloat`This property holds the height of the image widget. Do not use this function to find the height of the image. + +`spacingfloat`Sets a non-stretchable space in points between image and text. + +`clicked_fnCallable[[], None]`Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property radio_collection +This property holds the button’s text. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.RadioCollection.md b/omni.ui.RadioCollection.md new file mode 100644 index 0000000000000000000000000000000000000000..f72a92993a18d29e892581dae5c58784ec4e063e --- /dev/null +++ b/omni.ui.RadioCollection.md @@ -0,0 +1,40 @@ + + +RadioCollection — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +RadioCollection + +  + +# RadioCollection + +class omni.ui.RadioCollection +Bases: ValueModelHelper +Radio Collection is a class that groups RadioButtons and coordinates their state. +It makes sure that the choice is mutually exclusive, it means when the user selects a radio button, any previously selected radio button in the same collection becomes deselected. +Methods + +__init__(self[, model]) +Constructs RadioCollection. + +Attributes + +__init__(self: omni.ui._ui.RadioCollection, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Constructs RadioCollection. + +`kwargsdict`See below + +### Keyword Arguments: + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.RasterImageProvider.md b/omni.ui.RasterImageProvider.md new file mode 100644 index 0000000000000000000000000000000000000000..567e60c78de7527c3e2b48d44304540f730097d6 --- /dev/null +++ b/omni.ui.RasterImageProvider.md @@ -0,0 +1,47 @@ + + +RasterImageProvider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +RasterImageProvider + +  + +# RasterImageProvider + +class omni.ui.RasterImageProvider +Bases: ImageProvider +doc +Methods + +__init__(self[, source_url]) +doc + +Attributes + +max_mip_levels +Maximum number of mip map levels allowed + +source_url +Sets byte data that the image provider will turn into an image. + +__init__(self: omni.ui._ui.RasterImageProvider, source_url: str = None, **kwargs) → None +doc + +property max_mip_levels +Maximum number of mip map levels allowed + +property source_url +Sets byte data that the image provider will turn into an image. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.RasterPolicy.md b/omni.ui.RasterPolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..ff75a18e66e6d1f7baedd5334c7ff2b90085fb24 --- /dev/null +++ b/omni.ui.RasterPolicy.md @@ -0,0 +1,51 @@ + + +RasterPolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +RasterPolicy + +  + +# RasterPolicy + +class omni.ui.RasterPolicy +Bases: pybind11_object +Used to set the rasterization behaviour. +Members: + +NEVER : Do not rasterize the widget at any time. +ON_DEMAND : Rasterize the widget as soon as possible and always use the rasterized version. This means that the widget will only be updated when the user called invalidateRaster. +AUTO : Automatically determine whether to rasterize the widget based on performance considerations. If necessary, the widget will be rasterized and updated when its content changes. + +Methods + +__init__(self, value) + +Attributes + +AUTO + +NEVER + +ON_DEMAND + +name + +value + +__init__(self: omni.ui._ui.RasterPolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Rectangle.md b/omni.ui.Rectangle.md new file mode 100644 index 0000000000000000000000000000000000000000..3cbb88dacc24cd60b6b41d272cecfaf5808c3a9b --- /dev/null +++ b/omni.ui.Rectangle.md @@ -0,0 +1,95 @@ + + +Rectangle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Rectangle + +  + +# Rectangle + +class omni.ui.Rectangle +Bases: Shape +The Rectangle widget provides a colored rectangle to display. +Methods + +__init__(self, **kwargs) +Constructs Rectangle. + +Attributes + +__init__(self: omni.ui._ui.Rectangle, **kwargs) → None +Constructs Rectangle. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ScrollBarPolicy.md b/omni.ui.ScrollBarPolicy.md new file mode 100644 index 0000000000000000000000000000000000000000..04ec321cabbb7d14f2a418370a0e6ae4ad8ba0cf --- /dev/null +++ b/omni.ui.ScrollBarPolicy.md @@ -0,0 +1,50 @@ + + +ScrollBarPolicy — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ScrollBarPolicy + +  + +# ScrollBarPolicy + +class omni.ui.ScrollBarPolicy +Bases: pybind11_object +Members: + +SCROLLBAR_AS_NEEDED +SCROLLBAR_ALWAYS_OFF +SCROLLBAR_ALWAYS_ON + +Methods + +__init__(self, value) + +Attributes + +SCROLLBAR_ALWAYS_OFF + +SCROLLBAR_ALWAYS_ON + +SCROLLBAR_AS_NEEDED + +name + +value + +__init__(self: omni.ui._ui.ScrollBarPolicy, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ScrollingFrame.md b/omni.ui.ScrollingFrame.md new file mode 100644 index 0000000000000000000000000000000000000000..32ef709ec4b36e11d6044998440f93bcc38a7151 --- /dev/null +++ b/omni.ui.ScrollingFrame.md @@ -0,0 +1,170 @@ + + +ScrollingFrame — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ScrollingFrame + +  + +# ScrollingFrame + +class omni.ui.ScrollingFrame +Bases: Frame +The ScrollingFrame class provides the ability to scroll onto another widget. +ScrollingFrame is used to display the contents of a child widget within a frame. If the widget exceeds the size of the frame, the frame can provide scroll bars so that the entire area of the child widget can be viewed. The child widget must be specified with addChild(). +Methods + +__init__(self, **kwargs) +Construct ScrollingFrame. + +set_scroll_x_changed_fn(self, arg0) +The horizontal position of the scroll bar. + +set_scroll_y_changed_fn(self, arg0) +The vertical position of the scroll bar. + +Attributes + +horizontal_scrollbar_policy +This property holds the policy for the horizontal scroll bar. + +scroll_x +The horizontal position of the scroll bar. + +scroll_x_max +The max position of the horizontal scroll bar. + +scroll_y +The vertical position of the scroll bar. + +scroll_y_max +The max position of the vertical scroll bar. + +vertical_scrollbar_policy +This property holds the policy for the vertical scroll bar. + +__init__(self: omni.ui._ui.ScrollingFrame, **kwargs) → None +Construct ScrollingFrame. + +`kwargsdict`See below + +### Keyword Arguments: + +`scroll_xfloat`The horizontal position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +`scroll_x_maxfloat`The max position of the horizontal scroll bar. + +`scroll_x_changed_fnCallable[[float], None]`The horizontal position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +`scroll_yfloat`The vertical position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +`scroll_y_maxfloat`The max position of the vertical scroll bar. + +`scroll_y_changed_fnCallable[[float], None]`The vertical position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +`horizontal_scrollbar_policyui.ScrollBarPolicy`This property holds the policy for the horizontal scroll bar. + +`vertical_scrollbar_policyui.ScrollBarPolicy`This property holds the policy for the vertical scroll bar. + +`horizontal_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. + +`vertical_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. + +`separate_window`A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. + +`raster_policy`Determine how the content of the frame should be rasterized. + +`build_fn`Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +set_scroll_x_changed_fn(self: omni.ui._ui.ScrollingFrame, arg0: Callable[[float], None]) → None +The horizontal position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +set_scroll_y_changed_fn(self: omni.ui._ui.ScrollingFrame, arg0: Callable[[float], None]) → None +The vertical position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +property horizontal_scrollbar_policy +This property holds the policy for the horizontal scroll bar. + +property scroll_x +The horizontal position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +property scroll_x_max +The max position of the horizontal scroll bar. + +property scroll_y +The vertical position of the scroll bar. When it’s changed, the contents will be scrolled accordingly. + +property scroll_y_max +The max position of the vertical scroll bar. + +property vertical_scrollbar_policy +This property holds the policy for the vertical scroll bar. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Separator.md b/omni.ui.Separator.md new file mode 100644 index 0000000000000000000000000000000000000000..f7b90f3c210633c4e6e6c9527dcbee5abd43afa2 --- /dev/null +++ b/omni.ui.Separator.md @@ -0,0 +1,108 @@ + + +Separator — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Separator + +  + +# Separator + +class omni.ui.Separator +Bases: Widget, MenuHelper +The Separator class provides blank space. +Normally, it’s used to create separator line in the UI elements +Methods + +__init__(self[, text]) +Construct Separator. + +Attributes + +__init__(self: omni.ui._ui.Separator, text: str = '', **kwargs) → None +Construct Separator. + +`kwargsdict`See below + +### Keyword Arguments: + +`textstr`This property holds the menu’s text. + +`hotkey_textstr`This property holds the menu’s hotkey text. + +`checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. + +`hide_on_clickbool`Hide or keep the window when the user clicked this item. + +`delegateMenuDelegate`The delegate that generates a widget per menu item. + +`triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ShadowFlag.md b/omni.ui.ShadowFlag.md new file mode 100644 index 0000000000000000000000000000000000000000..620c97408bd76ee08043e26214712ee4762fc307 --- /dev/null +++ b/omni.ui.ShadowFlag.md @@ -0,0 +1,47 @@ + + +ShadowFlag — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ShadowFlag + +  + +# ShadowFlag + +class omni.ui.ShadowFlag +Bases: pybind11_object +Members: + +NONE +CUT_OUT_SHAPE_BACKGROUND + +Methods + +__init__(self, value) + +Attributes + +CUT_OUT_SHAPE_BACKGROUND + +NONE + +name + +value + +__init__(self: omni.ui._ui.ShadowFlag, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Shape.md b/omni.ui.Shape.md new file mode 100644 index 0000000000000000000000000000000000000000..9498048e2e7a2a8086e414aed047b2004db2d5b6 --- /dev/null +++ b/omni.ui.Shape.md @@ -0,0 +1,33 @@ + + +Shape — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Shape + +  + +# Shape + +class omni.ui.Shape +Bases: Widget +The Shape widget provides a base class for all the Shape Widget. Currently implemented are Rectangle, Circle, Triangle, Line, Ellipse and BezierCurve. +Methods + +__init__(*args, **kwargs) + +Attributes + +__init__(*args, **kwargs) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ShapeAnchorHelper.md b/omni.ui.ShapeAnchorHelper.md new file mode 100644 index 0000000000000000000000000000000000000000..6534ad2dfbf1ab3d13081eb59f92a028b4fd1d64 --- /dev/null +++ b/omni.ui.ShapeAnchorHelper.md @@ -0,0 +1,75 @@ + + +ShapeAnchorHelper — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ShapeAnchorHelper + +  + +# ShapeAnchorHelper + +class omni.ui.ShapeAnchorHelper +Bases: pybind11_object +The ShapeAnchorHelper provides common functionality for Shape Anchors. +Methods + +__init__(*args, **kwargs) + +call_anchor_fn(self) +Sets the function that will be called for the curve anchor. + +get_closest_parametric_position(self, ...) +Function that returns the closest parametric T value to a given x,y position. + +has_anchor_fn(self) +Sets the function that will be called for the curve anchor. + +invalidate_anchor(self) +Function that causes the anchor frame to be redrawn. + +set_anchor_fn(self, fn) +Sets the function that will be called for the curve anchor. + +Attributes + +anchor_alignment +This property holds the Alignment of the curve anchor. + +anchor_position +This property holds the parametric value of the curve anchor. + +__init__(*args, **kwargs) + +call_anchor_fn(self: omni.ui._ui.ShapeAnchorHelper) → None +Sets the function that will be called for the curve anchor. + +get_closest_parametric_position(self: omni.ui._ui.ShapeAnchorHelper, position_x: float, position_y: float) → float +Function that returns the closest parametric T value to a given x,y position. + +has_anchor_fn(self: omni.ui._ui.ShapeAnchorHelper) → bool +Sets the function that will be called for the curve anchor. + +invalidate_anchor(self: omni.ui._ui.ShapeAnchorHelper) → None +Function that causes the anchor frame to be redrawn. + +set_anchor_fn(self: omni.ui._ui.ShapeAnchorHelper, fn: Callable[[], None]) → None +Sets the function that will be called for the curve anchor. + +property anchor_alignment +This property holds the Alignment of the curve anchor. + +property anchor_position +This property holds the parametric value of the curve anchor. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.SimpleBoolModel.md b/omni.ui.SimpleBoolModel.md new file mode 100644 index 0000000000000000000000000000000000000000..95505ca82fea89c32da404d236051f89ce2fdeb7 --- /dev/null +++ b/omni.ui.SimpleBoolModel.md @@ -0,0 +1,61 @@ + + +SimpleBoolModel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +SimpleBoolModel + +  + +# SimpleBoolModel + +class omni.ui.SimpleBoolModel +Bases: AbstractValueModel +A very simple bool model. +Methods + +__init__(self[, default_value]) + +get_max(self) + +get_min(self) + +set_max(self, arg0) + +set_min(self, arg0) + +Attributes + +max +This property holds the model's maximum value. + +min +This property holds the model's minimum value. + +__init__(self: omni.ui._ui.SimpleBoolModel, default_value: bool = False, **kwargs) → None + +get_max(self: omni.ui._ui.SimpleBoolModel) → bool + +get_min(self: omni.ui._ui.SimpleBoolModel) → bool + +set_max(self: omni.ui._ui.SimpleBoolModel, arg0: bool) → None + +set_min(self: omni.ui._ui.SimpleBoolModel, arg0: bool) → None + +property max +This property holds the model’s maximum value. + +property min +This property holds the model’s minimum value. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.SimpleFloatModel.md b/omni.ui.SimpleFloatModel.md new file mode 100644 index 0000000000000000000000000000000000000000..87e14f050bf9abe17f4cc4e83cbde3223d12fb1d --- /dev/null +++ b/omni.ui.SimpleFloatModel.md @@ -0,0 +1,61 @@ + + +SimpleFloatModel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +SimpleFloatModel + +  + +# SimpleFloatModel + +class omni.ui.SimpleFloatModel +Bases: AbstractValueModel +A very simple double model. +Methods + +__init__(self[, default_value]) + +get_max(self) + +get_min(self) + +set_max(self, arg0) + +set_min(self, arg0) + +Attributes + +max +This property holds the model's minimum value. + +min +This property holds the model's minimum value. + +__init__(self: omni.ui._ui.SimpleFloatModel, default_value: float = 0.0, **kwargs) → None + +get_max(self: omni.ui._ui.SimpleFloatModel) → float + +get_min(self: omni.ui._ui.SimpleFloatModel) → float + +set_max(self: omni.ui._ui.SimpleFloatModel, arg0: float) → None + +set_min(self: omni.ui._ui.SimpleFloatModel, arg0: float) → None + +property max +This property holds the model’s minimum value. + +property min +This property holds the model’s minimum value. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.SimpleIntModel.md b/omni.ui.SimpleIntModel.md new file mode 100644 index 0000000000000000000000000000000000000000..7c2a4298a3bea2651a0106eec0b3c50271e05fc2 --- /dev/null +++ b/omni.ui.SimpleIntModel.md @@ -0,0 +1,61 @@ + + +SimpleIntModel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +SimpleIntModel + +  + +# SimpleIntModel + +class omni.ui.SimpleIntModel +Bases: AbstractValueModel +A very simple Int model. +Methods + +__init__(self[, default_value]) + +get_max(self) + +get_min(self) + +set_max(self, arg0) + +set_min(self, arg0) + +Attributes + +max +This property holds the model's minimum value. + +min +This property holds the model's minimum value. + +__init__(self: omni.ui._ui.SimpleIntModel, default_value: int = 0, **kwargs) → None + +get_max(self: omni.ui._ui.SimpleIntModel) → int + +get_min(self: omni.ui._ui.SimpleIntModel) → int + +set_max(self: omni.ui._ui.SimpleIntModel, arg0: int) → None + +set_min(self: omni.ui._ui.SimpleIntModel, arg0: int) → None + +property max +This property holds the model’s minimum value. + +property min +This property holds the model’s minimum value. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.SimpleStringModel.md b/omni.ui.SimpleStringModel.md new file mode 100644 index 0000000000000000000000000000000000000000..f2f1381bf737da21584ff9178a639cbaef4dd503 --- /dev/null +++ b/omni.ui.SimpleStringModel.md @@ -0,0 +1,33 @@ + + +SimpleStringModel — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +SimpleStringModel + +  + +# SimpleStringModel + +class omni.ui.SimpleStringModel +Bases: AbstractValueModel +A very simple value model that holds a single string. +Methods + +__init__(self[, defaultValue]) + +Attributes + +__init__(self: omni.ui._ui.SimpleStringModel, defaultValue: str = '') → None + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.SliderDrawMode.md b/omni.ui.SliderDrawMode.md new file mode 100644 index 0000000000000000000000000000000000000000..0e9e40c3c5c4cee6bec3186ff6cf0a27dacb187e --- /dev/null +++ b/omni.ui.SliderDrawMode.md @@ -0,0 +1,50 @@ + + +SliderDrawMode — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +SliderDrawMode + +  + +# SliderDrawMode + +class omni.ui.SliderDrawMode +Bases: pybind11_object +Members: + +FILLED +HANDLE +DRAG + +Methods + +__init__(self, value) + +Attributes + +DRAG + +FILLED + +HANDLE + +name + +value + +__init__(self: omni.ui._ui.SliderDrawMode, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Spacer.md b/omni.ui.Spacer.md new file mode 100644 index 0000000000000000000000000000000000000000..b9fc57c761290ce61b3e11069612222cc517e602 --- /dev/null +++ b/omni.ui.Spacer.md @@ -0,0 +1,96 @@ + + +Spacer — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Spacer + +  + +# Spacer + +class omni.ui.Spacer +Bases: Widget +The Spacer class provides blank space. +Normally, it’s used to place other widgets correctly in a layout. +Methods + +__init__(self, **kwargs) +Construct Spacer. + +Attributes + +__init__(self: omni.ui._ui.Spacer, **kwargs) → None +Construct Spacer. + +`kwargsdict`See below + +### Keyword Arguments: + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Stack.md b/omni.ui.Stack.md new file mode 100644 index 0000000000000000000000000000000000000000..6a345f8c55b56cd914430fd8ab20df3331f8b6a6 --- /dev/null +++ b/omni.ui.Stack.md @@ -0,0 +1,130 @@ + + +Stack — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Stack + +  + +# Stack + +class omni.ui.Stack +Bases: Container +The Stack class lines up child widgets horizontally, vertically or sorted in a Z-order. +Methods + +__init__(self, arg0, **kwargs) +Constructor. + +Attributes + +content_clipping +Determines if the child widgets should be clipped by the rectangle of this Stack. + +direction +This type is used to determine the direction of the layout. + +send_mouse_events_to_back +When children of a Z-based stack overlap mouse events are normally sent to the topmost one. + +spacing +Sets a non-stretchable space in pixels between child items of this layout. + +__init__(self: omni.ui._ui.Stack, arg0: omni.ui._ui.Direction, **kwargs) → None +Constructor. +### Arguments: + +`direction :`Determines the orientation of the Stack. + +`kwargsdict`See below + +### Keyword Arguments: + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property content_clipping +Determines if the child widgets should be clipped by the rectangle of this Stack. + +property direction +This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +property send_mouse_events_to_back +When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +property spacing +Sets a non-stretchable space in pixels between child items of this layout. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.StringField.md b/omni.ui.StringField.md new file mode 100644 index 0000000000000000000000000000000000000000..4e77835ce6db5f98201f6d3a2edc72bb2533817f --- /dev/null +++ b/omni.ui.StringField.md @@ -0,0 +1,130 @@ + + +StringField — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +StringField + +  + +# StringField + +class omni.ui.StringField +Bases: AbstractField +The StringField widget is a one-line text editor with a string model. +Methods + +__init__(self[, model]) +Constructs StringField. + +Attributes + +allow_tab_input +This property holds if the field allows Tab input. + +multiline +Multiline allows to press enter and create a new line. + +password_mode +This property holds the password mode. + +read_only +This property holds if the field is read-only. + +__init__(self: omni.ui._ui.StringField, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Constructs StringField. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`password_mode`This property holds the password mode. If the field is in the password mode when the entered text is obscured. + +`read_only`This property holds if the field is read-only. + +`multiline`Multiline allows to press enter and create a new line. + +`allow_tab_input`This property holds if the field allows Tab input. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property allow_tab_input +This property holds if the field allows Tab input. + +property multiline +Multiline allows to press enter and create a new line. + +property password_mode +This property holds the password mode. If the field is in the password mode when the entered text is obscured. + +property read_only +This property holds if the field is read-only. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.StringStore.md b/omni.ui.StringStore.md new file mode 100644 index 0000000000000000000000000000000000000000..1234e436a7df2f7c8f0bf98e526af2c385539368 --- /dev/null +++ b/omni.ui.StringStore.md @@ -0,0 +1,43 @@ + + +StringStore — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +StringStore + +  + +# StringStore + +class omni.ui.StringStore +Bases: pybind11_object +A singleton that stores all the UI Style string properties of omni.ui. +Methods + +__init__(*args, **kwargs) + +find(name) +Return the index of the color with specific name. + +store(name, string) +Save the color by name. + +__init__(*args, **kwargs) + +static find(name: str) → str +Return the index of the color with specific name. + +static store(name: str, string: str) → None +Save the color by name. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Style.md b/omni.ui.Style.md new file mode 100644 index 0000000000000000000000000000000000000000..0556ea31017798d4038a0fe46a78d479d457e17a --- /dev/null +++ b/omni.ui.Style.md @@ -0,0 +1,45 @@ + + +Style — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Style + +  + +# Style + +class omni.ui.Style +Bases: pybind11_object +A singleton that controls the global style of the session. +Methods + +__init__(*args, **kwargs) + +get_instance() +Get the instance of this singleton object. + +Attributes + +default +Set the default root style. + +__init__(*args, **kwargs) + +static get_instance() → omni.ui._ui.Style +Get the instance of this singleton object. + +property default +Set the default root style. It’s the style that is preselected when no alternative is specified. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.TextureFormat.md b/omni.ui.TextureFormat.md new file mode 100644 index 0000000000000000000000000000000000000000..1659741e10a308d7f71780ffb6fabd45d94b9966 --- /dev/null +++ b/omni.ui.TextureFormat.md @@ -0,0 +1,255 @@ + + +TextureFormat — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +TextureFormat + +  + +# TextureFormat + +class omni.ui.TextureFormat +Bases: pybind11_object +Members: +R8_UNORM +R8_SNORM +R8_UINT +R8_SINT +RG8_UNORM +RG8_SNORM +RG8_UINT +RG8_SINT +BGRA8_UNORM +BGRA8_SRGB +RGBA8_UNORM +RGBA8_SNORM +RGBA8_UINT +RGBA8_SINT +RGBA8_SRGB +R16_UNORM +R16_SNORM +R16_UINT +R16_SINT +R16_SFLOAT +RG16_UNORM +RG16_SNORM +RG16_UINT +RG16_SINT +RG16_SFLOAT +RGBA16_UNORM +RGBA16_SNORM +RGBA16_UINT +RGBA16_SINT +RGBA16_SFLOAT +R32_UINT +R32_SINT +R32_SFLOAT +RG32_UINT +RG32_SINT +RG32_SFLOAT +RGB32_UINT +RGB32_SINT +RGB32_SFLOAT +RGBA32_UINT +RGBA32_SINT +RGBA32_SFLOAT +R10_G10_B10_A2_UNORM +R10_G10_B10_A2_UINT +R11_G11_B10_UFLOAT +R9_G9_B9_E5_UFLOAT +B5_G6_R5_UNORM +B5_G5_R5_A1_UNORM +BC1_RGBA_UNORM +BC1_RGBA_SRGB +BC2_RGBA_UNORM +BC2_RGBA_SRGB +BC3_RGBA_UNORM +BC3_RGBA_SRGB +BC4_R_UNORM +BC4_R_SNORM +BC5_RG_UNORM +BC5_RG_SNORM +BC6H_RGB_UFLOAT +BC6H_RGB_SFLOAT +BC7_RGBA_UNORM +BC7_RGBA_SRGB +D16_UNORM +D24_UNORM_S8_UINT +D32_SFLOAT +D32_SFLOAT_S8_UINT_X24 +R24_UNORM_X8 +X24_R8_UINT +X32_R8_UINT_X24 +R32_SFLOAT_X8_X24 +SAMPLER_FEEDBACK_MIN_MIP +SAMPLER_FEEDBACK_MIP_REGION_USED +Methods + +__init__(self, value) + +Attributes + +B5_G5_R5_A1_UNORM + +B5_G6_R5_UNORM + +BC1_RGBA_SRGB + +BC1_RGBA_UNORM + +BC2_RGBA_SRGB + +BC2_RGBA_UNORM + +BC3_RGBA_SRGB + +BC3_RGBA_UNORM + +BC4_R_SNORM + +BC4_R_UNORM + +BC5_RG_SNORM + +BC5_RG_UNORM + +BC6H_RGB_SFLOAT + +BC6H_RGB_UFLOAT + +BC7_RGBA_SRGB + +BC7_RGBA_UNORM + +BGRA8_SRGB + +BGRA8_UNORM + +D16_UNORM + +D24_UNORM_S8_UINT + +D32_SFLOAT + +D32_SFLOAT_S8_UINT_X24 + +R10_G10_B10_A2_UINT + +R10_G10_B10_A2_UNORM + +R11_G11_B10_UFLOAT + +R16_SFLOAT + +R16_SINT + +R16_SNORM + +R16_UINT + +R16_UNORM + +R24_UNORM_X8 + +R32_SFLOAT + +R32_SFLOAT_X8_X24 + +R32_SINT + +R32_UINT + +R8_SINT + +R8_SNORM + +R8_UINT + +R8_UNORM + +R9_G9_B9_E5_UFLOAT + +RG16_SFLOAT + +RG16_SINT + +RG16_SNORM + +RG16_UINT + +RG16_UNORM + +RG32_SFLOAT + +RG32_SINT + +RG32_UINT + +RG8_SINT + +RG8_SNORM + +RG8_UINT + +RG8_UNORM + +RGB32_SFLOAT + +RGB32_SINT + +RGB32_UINT + +RGBA16_SFLOAT + +RGBA16_SINT + +RGBA16_SNORM + +RGBA16_UINT + +RGBA16_UNORM + +RGBA32_SFLOAT + +RGBA32_SINT + +RGBA32_UINT + +RGBA8_SINT + +RGBA8_SNORM + +RGBA8_SRGB + +RGBA8_UINT + +RGBA8_UNORM + +SAMPLER_FEEDBACK_MIN_MIP + +SAMPLER_FEEDBACK_MIP_REGION_USED + +X24_R8_UINT + +X32_R8_UINT_X24 + +name + +value + +__init__(self: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ToolBar.md b/omni.ui.ToolBar.md new file mode 100644 index 0000000000000000000000000000000000000000..567cc994373c7bdfe0fa5a3853f840bec62d438f --- /dev/null +++ b/omni.ui.ToolBar.md @@ -0,0 +1,81 @@ + + +ToolBar — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ToolBar + +  + +# ToolBar + +class omni.ui.ToolBar +Bases: Window +The ToolBar class represents a window in the underlying windowing system that as some fixed size property. +Methods + +__init__(self, title, **kwargs) +Construct ToolBar. + +set_axis_changed_fn(self, arg0) + +Attributes + +axis + +__init__(self: omni.ui._ui.ToolBar, title: str, **kwargs) → None +Construct ToolBar. + +`kwargsdict`See below + +### Keyword Arguments: + +`axisui.Axis`@breif axis for the toolbar + +`axis_changed_fnCallable[[ui.Axis], None]`@breif axis for the toolbar + +`flags`This property set the Flags for the Window. + +`visible`This property holds whether the window is visible. + +`title`This property holds the window’s title. + +`padding_x`This property set the padding to the frame on the X axis. + +`padding_y`This property set the padding to the frame on the Y axis. + +`width`This property holds the window Width. + +`height`This property holds the window Height. + +`position_x`This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +`position_y`This property set/get the position of the window in the Y Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +`auto_resize`setup the window to resize automatically based on its content + +`noTabBar`setup the visibility of the TabBar Handle, this is the small triangle at the corner of the view If it is not shown then it is not possible to undock that window and it need to be closed/moved programatically + +`tabBarTooltip`This property sets the tooltip when hovering over window’s tabbar. + +`raster_policy`Determine how the content of the window should be rastered. + +`width_changed_fn`This property holds the window Width. + +`height_changed_fn`This property holds the window Height. + +`visibility_changed_fn`This property holds whether the window is visible. + +set_axis_changed_fn(self: omni.ui._ui.ToolBar, arg0: Callable[[omni.ui._ui.ToolBarAxis], None]) → None + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ToolBarAxis.md b/omni.ui.ToolBarAxis.md new file mode 100644 index 0000000000000000000000000000000000000000..80cc5fd448c258c0c654ec045f15bc0038740c61 --- /dev/null +++ b/omni.ui.ToolBarAxis.md @@ -0,0 +1,45 @@ + + +ToolBarAxis — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ToolBarAxis + +  + +# ToolBarAxis + +class omni.ui.ToolBarAxis +Bases: pybind11_object +Members: +X +Y +Methods + +__init__(self, value) + +Attributes + +X + +Y + +name + +value + +__init__(self: omni.ui._ui.ToolBarAxis, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ToolButton.md b/omni.ui.ToolButton.md new file mode 100644 index 0000000000000000000000000000000000000000..e31ec328273eb7babdacd614e7c3094d2e1eb00e --- /dev/null +++ b/omni.ui.ToolButton.md @@ -0,0 +1,110 @@ + + +ToolButton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ToolButton + +  + +# ToolButton + +class omni.ui.ToolButton +Bases: Button, ValueModelHelper +ToolButton is functionally similar to Button, but provides a model that determines if the button is checked. This button toggles between checked (on) and unchecked (off) when the user clicks it. +Methods + +__init__(self[, model]) +Construct a checkable button with the model. + +Attributes + +__init__(self: omni.ui._ui.ToolButton, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Construct a checkable button with the model. If the bodel is not provided, then the default model is created. +### Arguments: + +`model :`The model that determines if the button is checked. + +`kwargsdict`See below + +### Keyword Arguments: + +`textstr`This property holds the button’s text. + +`image_urlstr`This property holds the button’s optional image URL. + +`image_widthfloat`This property holds the width of the image widget. Do not use this function to find the width of the image. + +`image_heightfloat`This property holds the height of the image widget. Do not use this function to find the height of the image. + +`spacingfloat`Sets a non-stretchable space in points between image and text. + +`clicked_fnCallable[[], None]`Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.TreeView.md b/omni.ui.TreeView.md new file mode 100644 index 0000000000000000000000000000000000000000..a880400aab29732fccc83f751417094632750c57 --- /dev/null +++ b/omni.ui.TreeView.md @@ -0,0 +1,278 @@ + + +TreeView — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +TreeView + +  + +# TreeView + +class omni.ui.TreeView +Bases: Widget, ItemModelHelper +TreeView is a widget that presents a hierarchical view of information. Each item can have a number of subitems. An indentation often visualizes this in a list. An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems. +TreeView can be used in file manager applications, where it allows the user to navigate the file system directories. They are also used to present hierarchical data, such as the scene object hierarchy. +TreeView uses a model/view pattern to manage the relationship between data and the way it is presented. The separation of functionality gives developers greater flexibility to customize the presentation of items and provides a standard interface to allow a wide range of data sources to be used with other widgets. +TreeView is responsible for the presentation of model data to the user and processing user input. To allow some flexibility in the way the data is presented, the creation of the sub-widgets is performed by the delegate. It provides the ability to customize any sub-item of TreeView. +Methods + +__init__(*args, **kwargs) +Overloaded function. + +call_hover_changed_fn(self, arg0, arg1) +Set the callback that is called when the item hover status is changed. + +call_selection_changed_fn(self, arg0) +Set the callback that is called when the selection is changed. + +clear_selection(self) +Deselects all selected items. + +dirty_widgets(self) +When called, it will make the delegate to regenerate all visible widgets the next frame. + +extend_selection(self, item) +Extends the current selection selecting all the items between currently selected nodes and the given item. + +has_hover_changed_fn(self) +Set the callback that is called when the item hover status is changed. + +has_selection_changed_fn(self) +Set the callback that is called when the selection is changed. + +is_expanded(self, item) +Returns true if the given item is expanded. + +set_expanded(self, item, expanded, recursive) +Sets the given item expanded or collapsed. + +set_hover_changed_fn(self, fn) +Set the callback that is called when the item hover status is changed. + +set_selection_changed_fn(self, fn) +Set the callback that is called when the selection is changed. + +toggle_selection(self, item) +Switches the selection state of the given item. + +Attributes + +column_widths +Widths of the columns. + +columns_resizable +When true, the columns can be resized with the mouse. + +drop_between_items +When true, the tree nodes can be dropped between items. + +expand_on_branch_click +This flag allows to prevent expanding when the user clicks the plus icon. + +header_visible +This property holds if the header is shown or not. + +keep_alive +When true, the tree nodes are never destroyed even if they are disappeared from the model. + +keep_expanded +Expand all the nodes and keep them expanded regardless their state. + +min_column_widths +Minimum widths of the columns. + +root_expanded +The expanded state of the root item. + +root_visible +This property holds if the root is shown. + +selection +Set current selection. + +__init__(*args, **kwargs) +Overloaded function. + +__init__(self: omni.ui._ui.TreeView, **kwargs) -> None + +Create TreeView with default model. + +__init__(self: omni.ui._ui.TreeView, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None + +Create TreeView with the given model. +### Arguments: + +`model :`The given model. + +`kwargsdict`See below + +### Keyword Arguments: + +`delegate`The Item delegate that generates a widget per item. + +`header_visible`This property holds if the header is shown or not. + +`selection`Set current selection. + +`expand_on_branch_click`This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed. + +`keep_alive`When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes. + +`keep_expanded`Expand all the nodes and keep them expanded regardless their state. + +`drop_between_items`When true, the tree nodes can be dropped between items. + +`column_widths`Widths of the columns. If not set, the width is Fraction(1). + +`min_column_widths`Minimum widths of the columns. If not set, the width is Pixel(0). + +`columns_resizable`When true, the columns can be resized with the mouse. + +`selection_changed_fn`Set the callback that is called when the selection is changed. + +`root_expanded`The expanded state of the root item. Changing this flag doesn’t make the children repopulated. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +call_hover_changed_fn(self: omni.ui._ui.TreeView, arg0: omni.ui._ui.AbstractItem, arg1: bool) → None +Set the callback that is called when the item hover status is changed. + +call_selection_changed_fn(self: omni.ui._ui.TreeView, arg0: List[omni.ui._ui.AbstractItem]) → None +Set the callback that is called when the selection is changed. + +clear_selection(self: omni.ui._ui.TreeView) → None +Deselects all selected items. + +dirty_widgets(self: omni.ui._ui.TreeView) → None +When called, it will make the delegate to regenerate all visible widgets the next frame. + +extend_selection(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem) → None +Extends the current selection selecting all the items between currently selected nodes and the given item. It’s when user does shift+click. + +has_hover_changed_fn(self: omni.ui._ui.TreeView) → bool +Set the callback that is called when the item hover status is changed. + +has_selection_changed_fn(self: omni.ui._ui.TreeView) → bool +Set the callback that is called when the selection is changed. + +is_expanded(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem) → bool +Returns true if the given item is expanded. + +set_expanded(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem, expanded: bool, recursive: bool) → None +Sets the given item expanded or collapsed. +### Arguments: + +`item :`The item to expand or collapse. + +`expanded :`True if it’s necessary to expand, false to collapse. + +`recursive :`True if it’s necessary to expand children. + +set_hover_changed_fn(self: omni.ui._ui.TreeView, fn: Callable[[omni.ui._ui.AbstractItem, bool], None]) → None +Set the callback that is called when the item hover status is changed. + +set_selection_changed_fn(self: omni.ui._ui.TreeView, fn: Callable[[List[omni.ui._ui.AbstractItem]], None]) → None +Set the callback that is called when the selection is changed. + +toggle_selection(self: omni.ui._ui.TreeView, item: omni.ui._ui.AbstractItem) → None +Switches the selection state of the given item. + +property column_widths +Widths of the columns. If not set, the width is Fraction(1). + +property columns_resizable +When true, the columns can be resized with the mouse. + +property drop_between_items +When true, the tree nodes can be dropped between items. + +property expand_on_branch_click +This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed. + +property header_visible +This property holds if the header is shown or not. + +property keep_alive +When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes. + +property keep_expanded +Expand all the nodes and keep them expanded regardless their state. + +property min_column_widths +Minimum widths of the columns. If not set, the width is Pixel(0). + +property root_expanded +The expanded state of the root item. Changing this flag doesn’t make the children repopulated. + +property root_visible +This property holds if the root is shown. It can be used to make a single level tree appear like a simple list. + +property selection +Set current selection. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Triangle.md b/omni.ui.Triangle.md new file mode 100644 index 0000000000000000000000000000000000000000..d904cd920f764f71a95fb510bb59e50963df81c6 --- /dev/null +++ b/omni.ui.Triangle.md @@ -0,0 +1,103 @@ + + +Triangle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Triangle + +  + +# Triangle + +class omni.ui.Triangle +Bases: Shape +The Triangle widget provides a colored triangle to display. +Methods + +__init__(self, **kwargs) +Constructs Triangle. + +Attributes + +alignment +This property holds the alignment of the triangle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. + +__init__(self: omni.ui._ui.Triangle, **kwargs) → None +Constructs Triangle. + +`kwargsdict`See below + +### Keyword Arguments: + +`alignment`This property holds the alignment of the triangle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the triangle is centered. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property alignment +This property holds the alignment of the triangle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the triangle is centered. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Type.md b/omni.ui.Type.md new file mode 100644 index 0000000000000000000000000000000000000000..6a9b106ce3eb82467c780c270fbdfc2f2bd30f9e --- /dev/null +++ b/omni.ui.Type.md @@ -0,0 +1,50 @@ + + +Type — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Type + +  + +# Type + +class omni.ui.Type +Bases: pybind11_object +Members: + +LINE +HISTOGRAM +LINE2D + +Methods + +__init__(self, value) + +Attributes + +HISTOGRAM + +LINE + +LINE2D + +name + +value + +__init__(self: omni.ui._ui.Type, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.UIPreferencesExtension.md b/omni.ui.UIPreferencesExtension.md new file mode 100644 index 0000000000000000000000000000000000000000..5cac2244c8cd09ba79e9f3061bfd47a90bef1db1 --- /dev/null +++ b/omni.ui.UIPreferencesExtension.md @@ -0,0 +1,32 @@ + + +UIPreferencesExtension — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +UIPreferencesExtension + +  + +# UIPreferencesExtension + +class omni.ui.UIPreferencesExtension +Bases: IExt +Methods + +on_shutdown() + +on_startup(ext_id) + +__init__(self: omni.ext._extensions.IExt) → None + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.UIntDrag.md b/omni.ui.UIntDrag.md new file mode 100644 index 0000000000000000000000000000000000000000..0f190e035318e71d623bbb071be70b57057cfcd7 --- /dev/null +++ b/omni.ui.UIntDrag.md @@ -0,0 +1,109 @@ + + +UIntDrag — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +UIntDrag + +  + +# UIntDrag + +class omni.ui.UIntDrag +Bases: UIntSlider +Methods + +__init__(self[, model]) +Constructs UIntDrag. + +Attributes + +step +This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. + +__init__(self: omni.ui._ui.UIntDrag, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Constructs UIntDrag. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`step`This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. + +`min`This property holds the slider’s minimum value. + +`max`This property holds the slider’s maximum value. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property step +This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.UIntSlider.md b/omni.ui.UIntSlider.md new file mode 100644 index 0000000000000000000000000000000000000000..7f731dfd8798e7f478cdc2f09dadbc6b3e515c06 --- /dev/null +++ b/omni.ui.UIntSlider.md @@ -0,0 +1,115 @@ + + +UIntSlider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +UIntSlider + +  + +# UIntSlider + +class omni.ui.UIntSlider +Bases: AbstractSlider +The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range. +The difference with IntSlider is that UIntSlider has unsigned min/max. +Methods + +__init__(self[, model]) +Constructs UIntSlider. + +Attributes + +max +This property holds the slider's maximum value. + +min +This property holds the slider's minimum value. + +__init__(self: omni.ui._ui.UIntSlider, model: omni.ui._ui.AbstractValueModel = None, **kwargs) → None +Constructs UIntSlider. +### Arguments: + +`model :`The widget’s model. If the model is not assigned, the default model is created. + +`kwargsdict`See below + +### Keyword Arguments: + +`min`This property holds the slider’s minimum value. + +`max`This property holds the slider’s maximum value. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +property max +This property holds the slider’s maximum value. + +property min +This property holds the slider’s minimum value. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.UnitType.md b/omni.ui.UnitType.md new file mode 100644 index 0000000000000000000000000000000000000000..d393e708bfbc1c583cabad073024e556074c2a42 --- /dev/null +++ b/omni.ui.UnitType.md @@ -0,0 +1,54 @@ + + +UnitType — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +UnitType + +  + +# UnitType + +class omni.ui.UnitType +Bases: pybind11_object + +Unit types. +Widths, heights or other UI length can be specified in pixels or relative to window (or child window) size. + +Members: + +PIXEL +PERCENT +FRACTION + +Methods + +__init__(self, value) + +Attributes + +FRACTION + +PERCENT + +PIXEL + +name + +value + +__init__(self: omni.ui._ui.UnitType, value: int) → None + +property name + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.VGrid.md b/omni.ui.VGrid.md new file mode 100644 index 0000000000000000000000000000000000000000..16b38e299378150fb8ddc029edc4a52e7ba8b075 --- /dev/null +++ b/omni.ui.VGrid.md @@ -0,0 +1,111 @@ + + +VGrid — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +VGrid + +  + +# VGrid + +class omni.ui.VGrid +Bases: Grid +Shortcut for Grid{eTopToBottom}. The grid grows from top to bottom with the widgets placed. +Methods + +__init__(self, **kwargs) +Construct a grid that grows from top to bottom with the widgets placed. + +Attributes + +__init__(self: omni.ui._ui.VGrid, **kwargs) → None +Construct a grid that grows from top to bottom with the widgets placed. + +`kwargsdict`See below + +### Keyword Arguments: + +`column_width`The width of the column. It’s only possible to set it if the grid is vertical. Once it’s set, the column count depends on the size of the widget. + +`row_height`The height of the row. It’s only possible to set it if the grid is horizontal. Once it’s set, the row count depends on the size of the widget. + +`column_count`The number of columns. It’s only possible to set it if the grid is vertical. Once it’s set, the column width depends on the widget size. + +`row_count`The number of rows. It’s only possible to set it if the grid is horizontal. Once it’s set, the row height depends on the widget size. + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.VStack.md b/omni.ui.VStack.md new file mode 100644 index 0000000000000000000000000000000000000000..073b9bb53bad6188c4494784d1b928f7bff1d19a --- /dev/null +++ b/omni.ui.VStack.md @@ -0,0 +1,103 @@ + + +VStack — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +VStack + +  + +# VStack + +class omni.ui.VStack +Bases: Stack +Shortcut for Stack{eTopToBottom}. The widgets are placed in a column, with suitable sizes. +Methods + +__init__(self, **kwargs) +Construct a stack with the widgets placed in a column from top to bottom. + +Attributes + +__init__(self: omni.ui._ui.VStack, **kwargs) → None +Construct a stack with the widgets placed in a column from top to bottom. + +`kwargsdict`See below + +### Keyword Arguments: + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ValueModelHelper.md b/omni.ui.ValueModelHelper.md new file mode 100644 index 0000000000000000000000000000000000000000..4f91338d207817ed4f3c9684b4ce614ba64152aa --- /dev/null +++ b/omni.ui.ValueModelHelper.md @@ -0,0 +1,35 @@ + + +ValueModelHelper — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ValueModelHelper + +  + +# ValueModelHelper + +class omni.ui.ValueModelHelper +Bases: pybind11_object +The ValueModelHelper class provides the basic functionality for value widget classes. ValueModelHelper class is the base class for every standard widget that uses a AbstractValueModel. ValueModelHelper is an abstract class and itself cannot be instantiated. It provides a standard interface for interoperating with models. +Methods + +__init__(*args, **kwargs) + +Attributes + +model + +__init__(*args, **kwargs) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.VectorImageProvider.md b/omni.ui.VectorImageProvider.md new file mode 100644 index 0000000000000000000000000000000000000000..34bc43fad735ff6339a8fe4344b79cc978fcc4c5 --- /dev/null +++ b/omni.ui.VectorImageProvider.md @@ -0,0 +1,47 @@ + + +VectorImageProvider — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +VectorImageProvider + +  + +# VectorImageProvider + +class omni.ui.VectorImageProvider +Bases: ImageProvider +doc +Methods + +__init__(self[, source_url]) +doc + +Attributes + +max_mip_levels +Maximum number of mip map levels allowed + +source_url +Sets the vector image URL. + +__init__(self: omni.ui._ui.VectorImageProvider, source_url: str = None, **kwargs) → None +doc + +property max_mip_levels +Maximum number of mip map levels allowed + +property source_url +Sets the vector image URL. Asset loading doesn’t happen immediately, but rather is started the next time widget is visible, in prepareDraw call. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Widget.md b/omni.ui.Widget.md new file mode 100644 index 0000000000000000000000000000000000000000..a640e934e12a40f0df0c367ee848fcd40d55bb50 --- /dev/null +++ b/omni.ui.Widget.md @@ -0,0 +1,462 @@ + + +Widget — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Widget + +  + +# Widget + +class omni.ui.Widget +Bases: pybind11_object +The Widget class is the base class of all user interface objects. +The widget is the atom of the user interface: it receives mouse, keyboard and other events, and paints a representation of itself on the screen. Every widget is rectangular. A widget is clipped by its parent and by the widgets in front of it. +Methods + +__init__(self, **kwargs) + +call_accept_drop_fn(self, arg0) +Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +call_computed_content_size_changed_fn(self) +Called when the size of the widget is changed. + +call_drag_fn(self) +Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +call_drop_fn(self, arg0) +Specify that this Widget accepts drops and set the callback to the drop operation. + +call_key_pressed_fn(self, arg0, arg1, arg2) +Sets the function that will be called when the user presses the keyboard key when the mouse clicks the widget. + +call_mouse_double_clicked_fn(self, arg0, ...) +Sets the function that will be called when the user presses the mouse button twice inside the widget. + +call_mouse_hovered_fn(self, arg0) +Sets the function that will be called when the user use mouse enter/leave on the focused window. + +call_mouse_moved_fn(self, arg0, arg1, arg2, arg3) +Sets the function that will be called when the user moves the mouse inside the widget. + +call_mouse_pressed_fn(self, arg0, arg1, ...) +Sets the function that will be called when the user presses the mouse button inside the widget. + +call_mouse_released_fn(self, arg0, arg1, ...) +Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. + +call_mouse_wheel_fn(self, arg0, arg1, arg2) +Sets the function that will be called when the user uses mouse wheel on the focused window. + +call_tooltip_fn(self) +Set dynamic tooltip that will be created dynamiclly the first time it is needed. + +destroy(self) +Removes all the callbacks and circular references. + +has_accept_drop_fn(self) +Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +has_computed_content_size_changed_fn(self) +Called when the size of the widget is changed. + +has_drag_fn(self) +Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +has_drop_fn(self) +Specify that this Widget accepts drops and set the callback to the drop operation. + +has_key_pressed_fn(self) +Sets the function that will be called when the user presses the keyboard key when the mouse clicks the widget. + +has_mouse_double_clicked_fn(self) +Sets the function that will be called when the user presses the mouse button twice inside the widget. + +has_mouse_hovered_fn(self) +Sets the function that will be called when the user use mouse enter/leave on the focused window. + +has_mouse_moved_fn(self) +Sets the function that will be called when the user moves the mouse inside the widget. + +has_mouse_pressed_fn(self) +Sets the function that will be called when the user presses the mouse button inside the widget. + +has_mouse_released_fn(self) +Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. + +has_mouse_wheel_fn(self) +Sets the function that will be called when the user uses mouse wheel on the focused window. + +has_tooltip_fn(self) +Set dynamic tooltip that will be created dynamiclly the first time it is needed. + +scroll_here(self[, center_ratio_x, ...]) +Adjust scrolling amount in two axes to make current item visible. + +scroll_here_x(self[, center_ratio]) +Adjust scrolling amount to make current item visible. + +scroll_here_y(self[, center_ratio]) +Adjust scrolling amount to make current item visible. + +set_accept_drop_fn(self, fn) +Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +set_checked_changed_fn(self, fn) +This property holds a flag that specifies the widget has to use eChecked state of the style. + +set_computed_content_size_changed_fn(self, fn) +Called when the size of the widget is changed. + +set_drag_fn(self, fn) +Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +set_drop_fn(self, fn) +Specify that this Widget accepts drops and set the callback to the drop operation. + +set_key_pressed_fn(self, fn) +Sets the function that will be called when the user presses the keyboard key when the mouse clicks the widget. + +set_mouse_double_clicked_fn(self, fn) +Sets the function that will be called when the user presses the mouse button twice inside the widget. + +set_mouse_hovered_fn(self, fn) +Sets the function that will be called when the user use mouse enter/leave on the focused window. + +set_mouse_moved_fn(self, fn) +Sets the function that will be called when the user moves the mouse inside the widget. + +set_mouse_pressed_fn(self, fn) +Sets the function that will be called when the user presses the mouse button inside the widget. + +set_mouse_released_fn(self, fn) +Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. + +set_mouse_wheel_fn(self, fn) +Sets the function that will be called when the user uses mouse wheel on the focused window. + +set_style(self, arg0) +Set the current style. + +set_tooltip(self, tooltip_label) +Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +set_tooltip_fn(self, fn) +Set dynamic tooltip that will be created dynamiclly the first time it is needed. + +Attributes + +FLAG_WANT_CAPTURE_KEYBOARD + +checked +This property holds a flag that specifies the widget has to use eChecked state of the style. + +computed_content_height +Returns the final computed height of the content of the widget. + +computed_content_width +Returns the final computed width of the content of the widget. + +computed_height +Returns the final computed height of the widget. + +computed_width +Returns the final computed width of the widget. + +dragging +This property holds if the widget is being dragged. + +enabled +This property holds whether the widget is enabled. + +height +This property holds the height of the widget relative to its parent. + +identifier +An optional identifier of the widget we can use to refer to it in queries. + +name +The name of the widget that user can set. + +opaque_for_mouse_events +If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don't get routed to the child widgets either + +screen_position_x +Returns the X Screen coordinate the widget was last draw. + +screen_position_y +Returns the Y Screen coordinate the widget was last draw. + +scroll_only_window_hovered +When it's false, the scroll callback is called even if other window is hovered. + +selected +This property holds a flag that specifies the widget has to use eSelected state of the style. + +skip_draw_when_clipped +The flag that specifies if it's necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. + +style +The local style. + +style_type_name_override +By default, we use typeName to look up the style. + +tooltip +Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +tooltip_offset_x +Set the X tooltip offset in points. + +tooltip_offset_y +Set the Y tooltip offset in points. + +visible +This property holds whether the widget is visible. + +visible_max +If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +visible_min +If the current zoom factor and DPI is less than this value, the widget is not visible. + +width +This property holds the width of the widget relative to its parent. + +__init__(self: omni.ui._ui.Widget, **kwargs) → None + +call_accept_drop_fn(self: omni.ui._ui.Widget, arg0: str) → bool +Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +call_computed_content_size_changed_fn(self: omni.ui._ui.Widget) → None +Called when the size of the widget is changed. + +call_drag_fn(self: omni.ui._ui.Widget) → str +Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +call_drop_fn(self: omni.ui._ui.Widget, arg0: omni.ui._ui.WidgetMouseDropEvent) → None +Specify that this Widget accepts drops and set the callback to the drop operation. + +call_key_pressed_fn(self: omni.ui._ui.Widget, arg0: int, arg1: int, arg2: bool) → None +Sets the function that will be called when the user presses the keyboard key when the mouse clicks the widget. + +call_mouse_double_clicked_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: int) → None +Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +call_mouse_hovered_fn(self: omni.ui._ui.Widget, arg0: bool) → None +Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +call_mouse_moved_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: bool) → None +Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +call_mouse_pressed_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: int) → None +Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +call_mouse_released_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int, arg3: int) → None +Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +call_mouse_wheel_fn(self: omni.ui._ui.Widget, arg0: float, arg1: float, arg2: int) → None +Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +call_tooltip_fn(self: omni.ui._ui.Widget) → None +Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +destroy(self: omni.ui._ui.Widget) → None +Removes all the callbacks and circular references. + +has_accept_drop_fn(self: omni.ui._ui.Widget) → bool +Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +has_computed_content_size_changed_fn(self: omni.ui._ui.Widget) → bool +Called when the size of the widget is changed. + +has_drag_fn(self: omni.ui._ui.Widget) → bool +Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +has_drop_fn(self: omni.ui._ui.Widget) → bool +Specify that this Widget accepts drops and set the callback to the drop operation. + +has_key_pressed_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user presses the keyboard key when the mouse clicks the widget. + +has_mouse_double_clicked_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +has_mouse_hovered_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +has_mouse_moved_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +has_mouse_pressed_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +has_mouse_released_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +has_mouse_wheel_fn(self: omni.ui._ui.Widget) → bool +Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +has_tooltip_fn(self: omni.ui._ui.Widget) → bool +Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +scroll_here(self: omni.ui._ui.Widget, center_ratio_x: float = 0.0, center_ratio_y: float = 0.0) → None +Adjust scrolling amount in two axes to make current item visible. +### Arguments: + +`centerRatioX :`0.0: left, 0.5: center, 1.0: right + +`centerRatioY :`0.0: top, 0.5: center, 1.0: bottom + +scroll_here_x(self: omni.ui._ui.Widget, center_ratio: float = 0.0) → None +Adjust scrolling amount to make current item visible. +### Arguments: + +`centerRatio :`0.0: left, 0.5: center, 1.0: right + +scroll_here_y(self: omni.ui._ui.Widget, center_ratio: float = 0.0) → None +Adjust scrolling amount to make current item visible. +### Arguments: + +`centerRatio :`0.0: top, 0.5: center, 1.0: bottom + +set_accept_drop_fn(self: omni.ui._ui.Widget, fn: Callable[[str], bool]) → None +Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +set_checked_changed_fn(self: omni.ui._ui.Widget, fn: Callable[[bool], None]) → None +This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +set_computed_content_size_changed_fn(self: omni.ui._ui.Widget, fn: Callable[[], None]) → None +Called when the size of the widget is changed. + +set_drag_fn(self: omni.ui._ui.Widget, fn: Callable[[], str]) → None +Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +set_drop_fn(self: omni.ui._ui.Widget, fn: Callable[[omni.ui._ui.WidgetMouseDropEvent], None]) → None +Specify that this Widget accepts drops and set the callback to the drop operation. + +set_key_pressed_fn(self: omni.ui._ui.Widget, fn: Callable[[int, int, bool], None]) → None +Sets the function that will be called when the user presses the keyboard key when the mouse clicks the widget. + +set_mouse_double_clicked_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, int], None]) → None +Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +set_mouse_hovered_fn(self: omni.ui._ui.Widget, fn: Callable[[bool], None]) → None +Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +set_mouse_moved_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, bool], None]) → None +Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +set_mouse_pressed_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, int], None]) → None +Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +set_mouse_released_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int, int], None]) → None +Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +set_mouse_wheel_fn(self: omni.ui._ui.Widget, fn: Callable[[float, float, int], None]) → None +Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +set_style(self: omni.ui._ui.Widget, arg0: handle) → None +Set the current style. The style contains a description of customizations to the widget’s style. + +set_tooltip(self: omni.ui._ui.Widget, tooltip_label: str) → None +Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +set_tooltip_fn(self: omni.ui._ui.Widget, fn: Callable[[], None]) → None +Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +property checked +This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +property computed_content_height +Returns the final computed height of the content of the widget. +It’s in puplic section. For the explanation why please see the draw() method. + +property computed_content_width +Returns the final computed width of the content of the widget. +It’s in puplic section. For the explanation why please see the draw() method. + +property computed_height +Returns the final computed height of the widget. It includes margins. +It’s in puplic section. For the explanation why please see the draw() method. + +property computed_width +Returns the final computed width of the widget. It includes margins. +It’s in puplic section. For the explanation why please see the draw() method. + +property dragging +This property holds if the widget is being dragged. + +property enabled +This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +property height +This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +property identifier +An optional identifier of the widget we can use to refer to it in queries. + +property name +The name of the widget that user can set. + +property opaque_for_mouse_events +If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +property screen_position_x +Returns the X Screen coordinate the widget was last draw. This is in Screen Pixel size. +It’s a float because we need negative numbers and precise position considering DPI scale factor. + +property screen_position_y +Returns the Y Screen coordinate the widget was last draw. This is in Screen Pixel size. +It’s a float because we need negative numbers and precise position considering DPI scale factor. + +property scroll_only_window_hovered +When it’s false, the scroll callback is called even if other window is hovered. + +property selected +This property holds a flag that specifies the widget has to use eSelected state of the style. + +property skip_draw_when_clipped +The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +property style +The local style. When the user calls +setStyle() + +property style_type_name_override +By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +property tooltip +Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +property tooltip_offset_x +Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +property tooltip_offset_y +Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +property visible +This property holds whether the widget is visible. + +property visible_max +If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +property visible_min +If the current zoom factor and DPI is less than this value, the widget is not visible. + +property width +This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.WidgetMouseDropEvent.md b/omni.ui.WidgetMouseDropEvent.md new file mode 100644 index 0000000000000000000000000000000000000000..4c2dde6ebe411cc95f10c9a39be791b469165acf --- /dev/null +++ b/omni.ui.WidgetMouseDropEvent.md @@ -0,0 +1,51 @@ + + +WidgetMouseDropEvent — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +WidgetMouseDropEvent + +  + +# WidgetMouseDropEvent + +class omni.ui.WidgetMouseDropEvent +Bases: pybind11_object +Holds the data which is sent when a drag and drop action is completed. +Methods + +__init__(*args, **kwargs) + +Attributes + +mime_data +The data that was dropped on the widget. + +x +Position where the drop was made. + +y +Position where the drop was made. + +__init__(*args, **kwargs) + +property mime_data +The data that was dropped on the widget. + +property x +Position where the drop was made. + +property y +Position where the drop was made. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Window.md b/omni.ui.Window.md new file mode 100644 index 0000000000000000000000000000000000000000..ec5760c8d857bab099a8d41529a4094a167c35ac --- /dev/null +++ b/omni.ui.Window.md @@ -0,0 +1,337 @@ + + +Window — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Window + +  + +# Window + +class omni.ui.Window +Bases: WindowHandle +The Window class represents a window in the underlying windowing system. +This window is a child window of main Kit window. And it can be docked. +Rasterization +omni.ui generates vertices every frame to render UI elements. One of the features of the framework is the ability to bake a DrawList per window and reuse it if the content has not changed, which can significantly improve performance. However, in some cases, such as the Viewport window and Console window, it may not be possible to detect whether the window content has changed, leading to a frozen window. To address this problem, you can control the rasterization behavior by adjusting RasterPolicy. The RasterPolicy is an enumeration class that defines the rasterization behavior of a window. It has three possible values: +NEVER: Do not rasterize the widget at any time. ON_DEMAND: Rasterize the widget as soon as possible and always use the rasterized version. The widget will only be updated when the user calls invalidateRaster. AUTO: Automatically determine whether to rasterize the widget based on performance considerations. If necessary, the widget will be rasterized and updated when its content changes. +To resolve the frozen window issue, you can manually set the RasterPolicy of the problematic window to Never. This will force the window to rasterize its content and use the rasterized version until the user explicitly calls invalidateRaster to request an update. +window = ui.Window(“Test window”, raster_policy=ui.RasterPolicy.NEVER) +Methods + +__init__(self, title, dockPreference, **kwargs) +Construct the window, add it to the underlying windowing system, and makes it appear. + +call_key_pressed_fn(self, arg0, arg1, arg2) +Sets the function that will be called when the user presses the keyboard key on the focused window. + +deferred_dock_in(self, target_window, ...) +Deferred docking. + +destroy(self) +Removes all the callbacks and circular references. + +dock_in_window(self, title, dockPosition[, ...]) +place the window in a specific docking position based on a target window name. + +get_window_callback(self) +Returns window set draw callback pointer for the given UI window. + +has_key_pressed_fn(self) +Sets the function that will be called when the user presses the keyboard key on the focused window. + +move_to_app_window(self, arg0) +Moves the window to the specific OS window. + +move_to_main_os_window(self) +Bring back the Window callback to the Main Window and destroy the Current OS Window. + +move_to_new_os_window(self) +Move the Window Callback to a new OS Window. + +notify_app_window_change(self, arg0) +Notifies the window that window set has changed. + +setPosition(self, x, y) +This property set/get the position of the window in both axis calling the property. + +set_docked_changed_fn(self, arg0) +Has true if this window is docked. + +set_focused_changed_fn(self, arg0) +Read only property that is true when the window is focused. + +set_height_changed_fn(self, arg0) +This property holds the window Height. + +set_key_pressed_fn(self, fn) +Sets the function that will be called when the user presses the keyboard key on the focused window. + +set_position_x_changed_fn(self, arg0) +This property set/get the position of the window in the X Axis. + +set_position_y_changed_fn(self, arg0) +This property set/get the position of the window in the Y Axis. + +set_selected_in_dock_changed_fn(self, arg0) +Has true if this window is currently selected in the dock. + +set_top_modal(self) +Brings this window to the top level of modal windows. + +set_visibility_changed_fn(self, arg0) +This property holds whether the window is visible. + +set_width_changed_fn(self, arg0) +This property holds the window Width. + +Attributes + +app_window + +auto_resize +setup the window to resize automatically based on its content + +detachable +If the window is able to be separated from the main application window. + +docked +Has true if this window is docked. + +exclusive_keyboard +When true, only the current window will receive keyboard events when it's focused. + +flags +This property set the Flags for the Window. + +focus_policy +How the Window gains focus. + +focused +Read only property that is true when the window is focused. + +frame +The main layout of this window. + +height +This property holds the window Height. + +menu_bar + +noTabBar +setup the visibility of the TabBar Handle, this is the small triangle at the corner of the view If it is not shown then it is not possible to undock that window and it need to be closed/moved programatically + +padding_x +This property set the padding to the frame on the X axis. + +padding_y +This property set the padding to the frame on the Y axis. + +position_x +This property set/get the position of the window in the X Axis. + +position_y +This property set/get the position of the window in the Y Axis. + +raster_policy +Determine how the content of the window should be rastered. + +selected_in_dock +Has true if this window is currently selected in the dock. + +tabBar_tooltip +This property sets the tooltip when hovering over window's tabbar. + +title +This property holds the window's title. + +visible +This property holds whether the window is visible. + +width +This property holds the window Width. + +__init__(self: omni.ui._ui.Window, title: str, dockPreference: omni.ui._ui.DockPreference = , **kwargs) → None +Construct the window, add it to the underlying windowing system, and makes it appear. +### Arguments: + +`title :`The window title. It’s also used as an internal window ID. + +`dockPrefence :`In the old Kit determines where the window should be docked. In Kit Next it’s unused. + +`kwargsdict`See below + +### Keyword Arguments: + +`flags`This property set the Flags for the Window. + +`visible`This property holds whether the window is visible. + +`title`This property holds the window’s title. + +`padding_x`This property set the padding to the frame on the X axis. + +`padding_y`This property set the padding to the frame on the Y axis. + +`width`This property holds the window Width. + +`height`This property holds the window Height. + +`position_x`This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +`position_y`This property set/get the position of the window in the Y Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +`auto_resize`setup the window to resize automatically based on its content + +`noTabBar`setup the visibility of the TabBar Handle, this is the small triangle at the corner of the view If it is not shown then it is not possible to undock that window and it need to be closed/moved programatically + +`tabBarTooltip`This property sets the tooltip when hovering over window’s tabbar. + +`raster_policy`Determine how the content of the window should be rastered. + +`width_changed_fn`This property holds the window Width. + +`height_changed_fn`This property holds the window Height. + +`visibility_changed_fn`This property holds whether the window is visible. + +call_key_pressed_fn(self: omni.ui._ui.Window, arg0: int, arg1: int, arg2: bool) → None +Sets the function that will be called when the user presses the keyboard key on the focused window. + +deferred_dock_in(self: omni.ui._ui.Window, target_window: str, active_window: omni.ui._ui.DockPolicy = ) → None +Deferred docking. We need it when we want to dock windows before they were actually created. It’s helpful when extension initialization, before any window is created. +### Arguments: + +`targetWindowTitle :`Dock to window with this title when it appears. + +`activeWindow :`Make target or this window active when docked. + +destroy(self: omni.ui._ui.Window) → None +Removes all the callbacks and circular references. + +dock_in_window(self: omni.ui._ui.Window, title: str, dockPosition: omni.ui._ui.DockPosition, ratio: float = 0.5) → bool +place the window in a specific docking position based on a target window name. We will find the target window dock node and insert this window in it, either by spliting on ratio or on top if the window is not found false is return, otherwise true + +get_window_callback(self: omni.ui._ui.Window) → omni::ui::windowmanager::IWindowCallback +Returns window set draw callback pointer for the given UI window. + +has_key_pressed_fn(self: omni.ui._ui.Window) → bool +Sets the function that will be called when the user presses the keyboard key on the focused window. + +move_to_app_window(self: omni.ui._ui.Window, arg0: omni::kit::IAppWindow) → None +Moves the window to the specific OS window. + +move_to_main_os_window(self: omni.ui._ui.Window) → None +Bring back the Window callback to the Main Window and destroy the Current OS Window. + +move_to_new_os_window(self: omni.ui._ui.Window) → None +Move the Window Callback to a new OS Window. + +notify_app_window_change(self: omni.ui._ui.Window, arg0: omni::kit::IAppWindow) → None +Notifies the window that window set has changed. + +setPosition(self: omni.ui._ui.Window, x: float, y: float) → None +This property set/get the position of the window in both axis calling the property. + +set_docked_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None]) → None +Has true if this window is docked. False otherwise. It’s a read-only property. + +set_focused_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None]) → None +Read only property that is true when the window is focused. + +set_height_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None]) → None +This property holds the window Height. + +set_key_pressed_fn(self: omni.ui._ui.Window, fn: Callable[[int, int, bool], None]) → None +Sets the function that will be called when the user presses the keyboard key on the focused window. + +set_position_x_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None]) → None +This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +set_position_y_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None]) → None +This property set/get the position of the window in the Y Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +set_selected_in_dock_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None]) → None +Has true if this window is currently selected in the dock. False otherwise. It’s a read-only property. + +set_top_modal(self: omni.ui._ui.Window) → None +Brings this window to the top level of modal windows. + +set_visibility_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[bool], None]) → None +This property holds whether the window is visible. + +set_width_changed_fn(self: omni.ui._ui.Window, arg0: Callable[[float], None]) → None +This property holds the window Width. + +property auto_resize +setup the window to resize automatically based on its content + +property detachable +If the window is able to be separated from the main application window. + +property docked +Has true if this window is docked. False otherwise. It’s a read-only property. + +property exclusive_keyboard +When true, only the current window will receive keyboard events when it’s focused. It’s useful to override the global key bindings. + +property flags +This property set the Flags for the Window. + +property focus_policy +How the Window gains focus. + +property focused +Read only property that is true when the window is focused. + +property frame +The main layout of this window. + +property height +This property holds the window Height. + +property noTabBar +setup the visibility of the TabBar Handle, this is the small triangle at the corner of the view If it is not shown then it is not possible to undock that window and it need to be closed/moved programatically + +property padding_x +This property set the padding to the frame on the X axis. + +property padding_y +This property set the padding to the frame on the Y axis. + +property position_x +This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +property position_y +This property set/get the position of the window in the Y Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. + +property raster_policy +Determine how the content of the window should be rastered. + +property selected_in_dock +Has true if this window is currently selected in the dock. False otherwise. It’s a read-only property. + +property tabBar_tooltip +This property sets the tooltip when hovering over window’s tabbar. + +property title +This property holds the window’s title. + +property visible +This property holds whether the window is visible. + +property width +This property holds the window Width. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.WindowHandle.md b/omni.ui.WindowHandle.md new file mode 100644 index 0000000000000000000000000000000000000000..0e78b2bd5741584dd99d75df7f5d35ca26ce093c --- /dev/null +++ b/omni.ui.WindowHandle.md @@ -0,0 +1,129 @@ + + +WindowHandle — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +WindowHandle + +  + +# WindowHandle + +class omni.ui.WindowHandle +Bases: pybind11_object +WindowHandle is a handle object to control any of the windows in Kit. It can be created any time, and if it’s destroyed, the source window doesn’t disappear. +Methods + +__init__(*args, **kwargs) + +dock_in(self, window, dock_position[, ratio]) +Dock the window to the existing window. + +focus(self) +Brings the window to the top. + +is_selected_in_dock(self) +Return true is the window is the current window in the docking area. + +notify_app_window_change(self, arg0) +Notifies the UI window that the AppWindow it attached to has changed. + +undock(self) +Undock the window and make it floating. + +Attributes + +dock_id +Returns ID of the dock node this window is docked to. + +dock_order +The position of the window in the dock. + +dock_tab_bar_enabled +Checks if the current docking space is disabled. + +dock_tab_bar_visible +Checks if the current docking space has the tab bar. + +docked +True if this window is docked. + +height +The height of the window in points. + +position_x +The position of the window in points. + +position_y +The position of the window in points. + +title +The title of the window. + +visible +Returns whether the window is visible. + +width +The width of the window in points. + +__init__(*args, **kwargs) + +dock_in(self: omni.ui._ui.WindowHandle, window: omni.ui._ui.WindowHandle, dock_position: omni.ui._ui.DockPosition, ratio: float = 0.5) → None +Dock the window to the existing window. It can split the window to two parts or it can convert the window to a docking tab. + +focus(self: omni.ui._ui.WindowHandle) → None +Brings the window to the top. If it’s a docked window, it makes the window currently visible in the dock. + +is_selected_in_dock(self: omni.ui._ui.WindowHandle) → bool +Return true is the window is the current window in the docking area. + +notify_app_window_change(self: omni.ui._ui.WindowHandle, arg0: omni::kit::IAppWindow) → None +Notifies the UI window that the AppWindow it attached to has changed. + +undock(self: omni.ui._ui.WindowHandle) → None +Undock the window and make it floating. + +property dock_id +Returns ID of the dock node this window is docked to. + +property dock_order +The position of the window in the dock. + +property dock_tab_bar_enabled +Checks if the current docking space is disabled. The disabled docking tab bar can’t be shown by the user. + +property dock_tab_bar_visible +Checks if the current docking space has the tab bar. + +property docked +True if this window is docked. False otherwise. + +property height +The height of the window in points. + +property position_x +The position of the window in points. + +property position_y +The position of the window in points. + +property title +The title of the window. + +property visible +Returns whether the window is visible. + +property width +The width of the window in points. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.Workspace.md b/omni.ui.Workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..0833bc69ba11034abf8dbc104f8f478ba1565160 --- /dev/null +++ b/omni.ui.Workspace.md @@ -0,0 +1,230 @@ + + +Workspace — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +Workspace + +  + +# Workspace + +class omni.ui.Workspace +Bases: pybind11_object +Workspace object provides access to the windows in Kit. +Methods + +__init__(*args, **kwargs) + +clear() +Undock all. + +compare_workspace([compare_delegate]) +Compare current docked windows according to the workspace description. + +dump_workspace() +Capture current workspace and return the dict with the description of the docking state and window size. + +get_dock_children_id(dock_id) +Get two dock children of the given dock ID. + +get_dock_id_height(dock_id) +Returns the height of the docking node. + +get_dock_id_width(dock_id) +Returns the width of the docking node. + +get_dock_position(dock_id) +Returns the position of the given dock ID. + +get_docked_neighbours(member) +Get all the windows that docked with the given widow. + +get_docked_windows(dock_id) +Get all the windows of the given dock ID. + +get_dpi_scale() +Returns current DPI Scale. + +get_main_window_height() +Get the height in points of the current main window. + +get_main_window_width() +Get the width in points of the current main window. + +get_parent_dock_id(dock_id) +Return the parent Dock Node ID. + +get_selected_window_index(dock_id) +Get currently selected window inedx from the given dock id. + +get_window(title) +Find Window by name. + +get_window_from_callback(callback) +Find Window by window callback. + +get_windows() +Returns the list of windows ordered from back to front. + +remove_window_visibility_changed_callback(fn) +Remove the callback that is triggered when window's visibility changed. + +restore_workspace([keep_windows_open]) +Dock the windows according to the workspace description. + +set_dock_id_height(dock_id, height) +Set the height of the dock node. + +set_dock_id_width(dock_id, width) +Set the width of the dock node. + +set_show_window_fn(title, fn) +Add the callback to create a window with the given title. + +set_window_created_callback(fn) +Addd the callback that is triggered when a new window is created. + +set_window_visibility_changed_callback(fn) +Add the callback that is triggered when window's visibility changed. + +show_window(title[, show]) +Makes the window visible or create the window with the callback provided with set_show_window_fn. + +__init__(*args, **kwargs) + +static clear() → None +Undock all. + +compare_workspace(compare_delegate: ~omni.ui.workspace_utils.CompareDelegate = ) +Compare current docked windows according to the workspace description. +### Arguments + +`workspace_dumpList[Any]`The dictionary with the description of the layout. It’s the dict +received from `dump_workspace`. + +dump_workspace() +Capture current workspace and return the dict with the description of the +docking state and window size. + +static get_dock_children_id(dock_id: int) → object +Get two dock children of the given dock ID. +true if the given dock ID has children +### Arguments: + +`dockId :`the given dock ID + +`first :`output. the first child dock ID + +`second :`output. the second child dock ID + +static get_dock_id_height(dock_id: int) → float +Returns the height of the docking node. +It’s different from the window height because it considers dock tab bar. +### Arguments: + +`dockId :`the given dock ID + +static get_dock_id_width(dock_id: int) → float +Returns the width of the docking node. +### Arguments: + +`dockId :`the given dock ID + +static get_dock_position(dock_id: int) → omni.ui._ui.DockPosition +Returns the position of the given dock ID. Left/Right/Top/Bottom. + +static get_docked_neighbours(member: omni.ui._ui.WindowHandle) → List[omni.ui._ui.WindowHandle] +Get all the windows that docked with the given widow. + +static get_docked_windows(dock_id: int) → List[omni.ui._ui.WindowHandle] +Get all the windows of the given dock ID. + +static get_dpi_scale() → float +Returns current DPI Scale. + +static get_main_window_height() → float +Get the height in points of the current main window. + +static get_main_window_width() → float +Get the width in points of the current main window. + +static get_parent_dock_id(dock_id: int) → int +Return the parent Dock Node ID. +### Arguments: + +`dockId :`the child Dock Node ID to get parent + +static get_selected_window_index(dock_id: int) → int +Get currently selected window inedx from the given dock id. + +static get_window(title: str) → omni.ui._ui.WindowHandle +Find Window by name. + +static get_window_from_callback(callback: omni::ui::windowmanager::IWindowCallback) → omni.ui._ui.WindowHandle +Find Window by window callback. + +static get_windows() → List[omni.ui._ui.WindowHandle] +Returns the list of windows ordered from back to front. +If the window is a Omni::UI window, it can be upcasted. + +static remove_window_visibility_changed_callback(fn: int) → None +Remove the callback that is triggered when window’s visibility changed. + +restore_workspace(keep_windows_open=False) +Dock the windows according to the workspace description. +### Arguments + +`workspace_dumpList[Any]`The dictionary with the description of the layout. It’s the dict +received from `dump_workspace`. + +`keep_windows_openbool`Determines if it’s necessary to hide the already opened windows that +are not present in `workspace_dump`. + +static set_dock_id_height(dock_id: int, height: float) → None +Set the height of the dock node. +It also sets the height of parent nodes if necessary and modifies the height of siblings. +### Arguments: + +`dockId :`the given dock ID + +`height :`the given height + +static set_dock_id_width(dock_id: int, width: float) → None +Set the width of the dock node. +It also sets the width of parent nodes if necessary and modifies the width of siblings. +### Arguments: + +`dockId :`the given dock ID + +`width :`the given width + +static set_show_window_fn(title: str, fn: Callable[[bool], None]) → None +Add the callback to create a window with the given title. When the callback’s argument is true, it’s necessary to create the window. Otherwise remove. + +static set_window_created_callback(fn: Callable[[omni.ui._ui.WindowHandle], None]) → None +Addd the callback that is triggered when a new window is created. + +static set_window_visibility_changed_callback(fn: Callable[[str, bool], None]) → int +Add the callback that is triggered when window’s visibility changed. + +static show_window(title: str, show: bool = True) → bool +Makes the window visible or create the window with the callback provided with set_show_window_fn. +true if the window is already created, otherwise it’s necessary to wait one frame +### Arguments: + +`title :`the given window title + +`show :`true to show, false to hide + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.ZStack.md b/omni.ui.ZStack.md new file mode 100644 index 0000000000000000000000000000000000000000..2e624e84b23117274ed8c3f0305bd05816f350fe --- /dev/null +++ b/omni.ui.ZStack.md @@ -0,0 +1,103 @@ + + +ZStack — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Classes » +ZStack + +  + +# ZStack + +class omni.ui.ZStack +Bases: Stack +Shortcut for Stack{eBackToFront}. The widgets are placed sorted in a Z-order in top right corner with suitable sizes. +Methods + +__init__(self, **kwargs) +Construct a stack with the widgets placed in a Z-order with sorting from background to foreground. + +Attributes + +__init__(self: omni.ui._ui.ZStack, **kwargs) → None +Construct a stack with the widgets placed in a Z-order with sorting from background to foreground. + +`kwargsdict`See below + +### Keyword Arguments: + +`direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. + +`content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. + +`spacing`Sets a non-stretchable space in pixels between child items of this layout. + +`send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. + +`widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. + +`heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. + +`namestr`The name of the widget that user can set. + +`style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. + +`identifierstr`An optional identifier of the widget we can use to refer to it in queries. + +`visiblebool`This property holds whether the widget is visible. + +`visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. + +`visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. + +`tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style + +`tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. + +`tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. + +`enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. + +`selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. + +`checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. + +`draggingbool`This property holds if the widget is being dragged. + +`opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either + +`skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. + +`mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) + +`mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. + +`mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) + +`mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) + +`mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) + +`drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. + +`accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. + +`drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. + +`computed_content_size_changed_fnCallable`Called when the size of the widget is changed. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.abstract_shade.AbstractShade.md b/omni.ui.abstract_shade.AbstractShade.md new file mode 100644 index 0000000000000000000000000000000000000000..d8f2a458d7d9f613284979446c2790a91f187213 --- /dev/null +++ b/omni.ui.abstract_shade.AbstractShade.md @@ -0,0 +1,47 @@ + + +AbstractShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.abstract_shade » +omni.ui.abstract_shade Classes » +AbstractShade + +  + +# AbstractShade + +class omni.ui.abstract_shade.AbstractShade +Bases: object +The implementation of shades for custom style parameter type. +The user has to reimplement methods _store and _find to set/get the value +in the specific store. +Methods + +__init__() + +set_shade([name]) +Set the default shade. + +shade([default]) +Save the given shade, pick the color and apply it to ui.ColorStore. + +__init__() + +set_shade(name: Optional[str] = None) +Set the default shade. + +shade(default: Optional[Any] = None, **kwargs) → str +Save the given shade, pick the color and apply it to ui.ColorStore. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.add_to_namespace.md b/omni.ui.add_to_namespace.md new file mode 100644 index 0000000000000000000000000000000000000000..a1399ae25913ded8c85a79c9e08a3d403800fa81 --- /dev/null +++ b/omni.ui.add_to_namespace.md @@ -0,0 +1,24 @@ + + +add_to_namespace — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +add_to_namespace + +  + +# add_to_namespace + +omni.ui.add_to_namespace(module=None, module_locals={'AbstractField': , 'AbstractItem': , 'AbstractItemDelegate': , 'AbstractItemModel': , 'AbstractMultiField': , 'AbstractSlider': , 'AbstractValueModel': , 'Alignment': , 'ArrowHelper': , 'ArrowType': , 'Axis': , 'BezierCurve': , 'Button': , 'ByteImageProvider': , 'CanvasFrame': , 'CheckBox': , 'Circle': , 'CircleSizePolicy': , 'CollapsableFrame': , 'ColorStore': , 'ColorWidget': , 'ComboBox': , 'Container': , 'CornerFlag': , 'Direction': , 'DockPolicy': , 'DockPosition': , 'DockPreference': , 'DockSpace': , 'DynamicTextureProvider': , 'Ellipse': , 'FillPolicy': , 'FloatDrag': , 'FloatField': , 'FloatSlider': , 'FloatStore': , 'FocusPolicy': , 'FontStyle': , 'Fraction': , 'Frame': , 'FreeBezierCurve': , 'FreeCircle': , 'FreeEllipse': , 'FreeLine': , 'FreeRectangle': , 'FreeTriangle': , 'Grid': , 'HGrid': , 'HStack': , 'Image': , 'ImageProvider': , 'ImageWithProvider': , 'Inspector': , 'IntDrag': , 'IntField': , 'IntSlider': , 'InvisibleButton': , 'ItemModelHelper': , 'IwpFillPolicy': , 'Label': , 'Length': , 'Line': , 'MainWindow': , 'Menu': , 'MenuBar': , 'MenuDelegate': , 'MenuHelper': , 'MenuItem': , 'MenuItemCollection': , 'MultiFloatDragField': , 'MultiFloatField': , 'MultiIntDragField': , 'MultiIntField': , 'MultiStringField': , 'OffsetLine': , 'Optional': typing.Optional, 'Percent': , 'Pixel': , 'Placer': , 'Plot': , 'ProgressBar': , 'RadioButton': , 'RadioCollection': , 'RasterImageProvider': , 'RasterPolicy': , 'Rectangle': , 'ScrollBarPolicy': , 'ScrollingFrame': , 'Separator': , 'ShadowFlag': , 'Shape': , 'ShapeAnchorHelper': , 'SimpleBoolModel': , 'SimpleFloatModel': , 'SimpleIntModel': , 'SimpleStringModel': , 'SliderDrawMode': , 'Spacer': , 'Stack': , 'StringField': , 'StringStore': , 'Style': , 'TextureFormat': , 'ToolBar': , 'ToolBarAxis': , 'ToolButton': , 'TreeView': , 'Triangle': , 'Type': , 'UIPreferencesExtension': , 'UIntDrag': , 'UIntSlider': , 'UnitType': , 'VGrid': , 'VStack': , 'ValueModelHelper': , 'VectorImageProvider': , 'WINDOW_FLAGS_FORCE_HORIZONTAL_SCROLLBAR': 32768, 'WINDOW_FLAGS_FORCE_VERTICAL_SCROLLBAR': 16384, 'WINDOW_FLAGS_MENU_BAR': 1024, 'WINDOW_FLAGS_MODAL': 134217728, 'WINDOW_FLAGS_NONE': 0, 'WINDOW_FLAGS_NO_BACKGROUND': 128, 'WINDOW_FLAGS_NO_CLOSE': 2147483648, 'WINDOW_FLAGS_NO_COLLAPSE': 32, 'WINDOW_FLAGS_NO_DOCKING': 2097152, 'WINDOW_FLAGS_NO_FOCUS_ON_APPEARING': 4096, 'WINDOW_FLAGS_NO_MOUSE_INPUTS': 512, 'WINDOW_FLAGS_NO_MOVE': 4, 'WINDOW_FLAGS_NO_RESIZE': 2, 'WINDOW_FLAGS_NO_SAVED_SETTINGS': 256, 'WINDOW_FLAGS_NO_SCROLLBAR': 8, 'WINDOW_FLAGS_NO_SCROLL_WITH_MOUSE': 16, 'WINDOW_FLAGS_NO_TITLE_BAR': 1, 'WINDOW_FLAGS_POPUP': 67108864, 'WINDOW_FLAGS_SHOW_HORIZONTAL_SCROLLBAR': 2048, 'Widget': , 'WidgetMouseDropEvent': , 'Window': , 'WindowHandle': , 'Workspace': , 'ZStack': , '__builtins__': {'ArithmeticError': , 'AssertionError': , 'AttributeError': , 'BaseException': , 'BlockingIOError': , 'BrokenPipeError': , 'BufferError': , 'BytesWarning': , 'ChildProcessError': , 'ConnectionAbortedError': , 'ConnectionError': , 'ConnectionRefusedError': , 'ConnectionResetError': , 'DeprecationWarning': , 'EOFError': , 'Ellipsis': Ellipsis, 'EncodingWarning': , 'EnvironmentError': , 'Exception': , 'False': False, 'FileExistsError': , 'FileNotFoundError': , 'FloatingPointError': , 'FutureWarning': , 'GeneratorExit': , 'IOError': , 'ImportError': , 'ImportWarning': , 'IndentationError': , 'IndexError': , 'InterruptedError': , 'IsADirectoryError': , 'KeyError': , 'KeyboardInterrupt': , 'LookupError': , 'MemoryError': , 'ModuleNotFoundError': , 'NameError': , 'None': None, 'NotADirectoryError': , 'NotImplemented': NotImplemented, 'NotImplementedError': , 'OSError': , 'OverflowError': , 'PendingDeprecationWarning': , 'PermissionError': , 'ProcessLookupError': , 'RecursionError': , 'ReferenceError': , 'ResourceWarning': , 'RuntimeError': , 'RuntimeWarning': , 'StopAsyncIteration': , 'StopIteration': , 'SyntaxError': , 'SyntaxWarning': , 'SystemError': , 'SystemExit': , 'TabError': , 'TimeoutError': , 'True': True, 'TypeError': , 'UnboundLocalError': , 'UnicodeDecodeError': , 'UnicodeEncodeError': , 'UnicodeError': , 'UnicodeTranslateError': , 'UnicodeWarning': , 'UserWarning': , 'ValueError': , 'Warning': , 'ZeroDivisionError': , '__build_class__': , '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': , '__loader__': , '__name__': 'builtins', '__package__': '', '__pybind11_internals_v4_gcc_libstdcpp_cxxabi1011__': , '__spec__': ModuleSpec(name='builtins', loader=, origin='built-in'), 'abs': , 'aiter': , 'all': , 'anext': , 'any': , 'ascii': , 'bin': , 'bool': , 'breakpoint': , 'bytearray': , 'bytes': , 'callable': , 'chr': , 'classmethod': , 'compile': , 'complex': , 'copyright': Copyright (c) 2001-2022 Python Software Foundation. All Rights Reserved.  Copyright (c) 2000 BeOpen.com. All Rights Reserved.  Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved.  Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands     for supporting Python development.  See www.python.org for more information., 'delattr': , 'dict': , 'dir': , 'divmod': , 'enumerate': , 'eval': , 'exec': , 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': , 'float': , 'format': , 'frozenset': , 'getattr': , 'globals': , 'hasattr': , 'hash': , 'help': Type help() for interactive help, or help(object) for help about object., 'hex': , 'id': , 'input': , 'int': , 'isinstance': , 'issubclass': , 'iter': , 'len': , 'license': Type license() to see the full license text, 'list': , 'locals': , 'map': , 'max': , 'memoryview': , 'min': , 'next': , 'object': , 'oct': , 'open': , 'ord': , 'pow': , 'print': , 'property': , 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': , 'repr': , 'reversed': , 'round': , 'set': , 'setattr': , 'slice': , 'sorted': , 'staticmethod': , 'str': , 'sum': , 'super': , 'tuple': , 'type': , 'vars': , 'zip': }, '__cached__': '/buildAgent/work/922c23240cdaae69/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/__pycache__/__init__.cpython-310.pyc', '__doc__': '\nOmni::UI\n--------\n\nOmni::UI is Omniverse\'s UI toolkit for creating beautiful and flexible graphical user interfaces\nin the Kit extensions. Omni::UI provides the basic types necessary to create rich extensions with\na fluid and dynamic user interface in Omniverse Kit. It gives a layout system and includes\nwidgets for creating visual components, receiving user input, and creating data models. It allows\nuser interface components to be built around their behavior and enables a declarative flavor of\ndescribing the layout of the application. Omni::UI gives a very flexible styling system that\nallows deep customizing the final look of the application.\n\nTypical Example\n---------------\n\nTypical example to create a window with two buttons:\n\n.. code-block::\n\n    import omni.ui as ui\n\n    _window_example = ui.Window("Example Window", width=300, height=300)\n\n    with _window_example.frame:\n        with ui.VStack():\n            ui.Button("click me")\n\n            def move_me(window):\n                window.setPosition(200, 200)\n\n            def size_me(window):\n                window.width = 300\n                window.height = 300\n\n            ui.Button("Move to (200,200)", clicked_fn=lambda w=self._window_example: move_me(w))\n            ui.Button("Set size (300,300)", clicked_fn=lambda w=self._window_example: size_me(w))\n\nDetailed Documentation\n----------------------\n\nOmni::UI is shipped with the developer documentation that is written with Omni::UI. For detailed documentation, please\nsee `omni.example.ui` extension. It has detailed descriptions of all the classes, best practices, and real-world usage\nexamples.\n\nLayout\n------\n\n* Arrangement of elements\n    * :class:`omni.ui.CollapsableFrame`\n    * :class:`omni.ui.Frame`\n    * :class:`omni.ui.HStack`\n    * :class:`omni.ui.Placer`\n    * :class:`omni.ui.ScrollingFrame`\n    * :class:`omni.ui.Spacer`\n    * :class:`omni.ui.VStack`\n    * :class:`omni.ui.ZStack`\n\n* Lengths\n    * :class:`omni.ui.Fraction`\n    * :class:`omni.ui.Percent`\n    * :class:`omni.ui.Pixel`\n\nWidgets\n-------\n\n* Base Widgets\n    * :class:`omni.ui.Button`\n    * :class:`omni.ui.Image`\n    * :class:`omni.ui.Label`\n\n* Shapes\n    * :class:`omni.ui.Circle`\n    * :class:`omni.ui.Line`\n    * :class:`omni.ui.Rectangle`\n    * :class:`omni.ui.Triangle`\n\n* Menu\n    * :class:`omni.ui.Menu`\n    * :class:`omni.ui.MenuItem`\n\n* Model-View Widgets\n    * :class:`omni.ui.AbstractItemModel`\n    * :class:`omni.ui.AbstractValueModel`\n    * :class:`omni.ui.CheckBox`\n    * :class:`omni.ui.ColorWidget`\n    * :class:`omni.ui.ComboBox`\n    * :class:`omni.ui.RadioButton`\n    * :class:`omni.ui.RadioCollection`\n    * :class:`omni.ui.TreeView`\n\n* Model-View Fields\n    * :class:`omni.ui.FloatField`\n    * :class:`omni.ui.IntField`\n    * :class:`omni.ui.MultiField`\n    * :class:`omni.ui.StringField`\n\n* Model-View Drags and Sliders\n    * :class:`omni.ui.FloatDrag`\n    * :class:`omni.ui.FloatSlider`\n    * :class:`omni.ui.IntDrag`\n    * :class:`omni.ui.IntSlider`\n\n* Model-View ProgressBar\n    * :class:`omni.ui.ProgressBar`\n\n* Windows\n    * :class:`omni.ui.ToolBar`\n    * :class:`omni.ui.Window`\n    * :class:`omni.ui.Workspace`\n\n* Web\n    * :class:`omni.ui.WebViewWidget`\n\n', '__file__': '/buildAgent/work/922c23240cdaae69/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/__init__.py', '__loader__': <_frozen_importlib_external.SourceFileLoader object>, '__name__': 'omni.ui', '__package__': 'omni.ui', '__path__': ['/buildAgent/work/922c23240cdaae69/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui'], '__spec__': ModuleSpec(name='omni.ui', loader=<_frozen_importlib_external.SourceFileLoader object>, origin='/buildAgent/work/922c23240cdaae69/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/__init__.py', submodule_search_locations=['/buildAgent/work/922c23240cdaae69/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui']), '_ui': , 'abstract_shade': , 'add_to_namespace': , 'color': , 'color_utils': , 'constant': , 'constant_utils': , 'dock_window_in_window': , 'extension': , 'get_custom_glyph_code': , 'get_main_window_height': , 'get_main_window_width': , 'omni': )>, 'set_menu_delegate': , 'set_shade': , 'singleton': , 'style': , 'style_utils': , 'url': , 'url_utils': , 'workspace_utils': }) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.color_utils.AbstractShade.md b/omni.ui.color_utils.AbstractShade.md new file mode 100644 index 0000000000000000000000000000000000000000..1db0ea61ee6eed96bf5b7821f95c35e85105accf --- /dev/null +++ b/omni.ui.color_utils.AbstractShade.md @@ -0,0 +1,47 @@ + + +AbstractShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.color_utils » +omni.ui.color_utils Classes » +AbstractShade + +  + +# AbstractShade + +class omni.ui.color_utils.AbstractShade +Bases: object +The implementation of shades for custom style parameter type. +The user has to reimplement methods _store and _find to set/get the value +in the specific store. +Methods + +__init__() + +set_shade([name]) +Set the default shade. + +shade([default]) +Save the given shade, pick the color and apply it to ui.ColorStore. + +__init__() + +set_shade(name: Optional[str] = None) +Set the default shade. + +shade(default: Optional[Any] = None, **kwargs) → str +Save the given shade, pick the color and apply it to ui.ColorStore. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.color_utils.ColorShade.md b/omni.ui.color_utils.ColorShade.md new file mode 100644 index 0000000000000000000000000000000000000000..7116b3a178e2c62b9415b11c4b9baf4203ddf3ed --- /dev/null +++ b/omni.ui.color_utils.ColorShade.md @@ -0,0 +1,26 @@ + + +ColorShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.color_utils » +omni.ui.color_utils Functions » +ColorShade + +  + +# ColorShade + +omni.ui.color_utils.ColorShade(*args, **kwargs) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.color_utils.Singleton.md b/omni.ui.color_utils.Singleton.md new file mode 100644 index 0000000000000000000000000000000000000000..4a509ce57cc0a84e37cefad2eb2b052d198c1549 --- /dev/null +++ b/omni.ui.color_utils.Singleton.md @@ -0,0 +1,27 @@ + + +Singleton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.color_utils » +omni.ui.color_utils Functions » +Singleton + +  + +# Singleton + +omni.ui.color_utils.Singleton(class_) +A singleton decorator + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.constant_utils.AbstractShade.md b/omni.ui.constant_utils.AbstractShade.md new file mode 100644 index 0000000000000000000000000000000000000000..a9cf3093176bd3cb1cbb144f06bb3f80cbc8f3d5 --- /dev/null +++ b/omni.ui.constant_utils.AbstractShade.md @@ -0,0 +1,47 @@ + + +AbstractShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.constant_utils » +omni.ui.constant_utils Classes » +AbstractShade + +  + +# AbstractShade + +class omni.ui.constant_utils.AbstractShade +Bases: object +The implementation of shades for custom style parameter type. +The user has to reimplement methods _store and _find to set/get the value +in the specific store. +Methods + +__init__() + +set_shade([name]) +Set the default shade. + +shade([default]) +Save the given shade, pick the color and apply it to ui.ColorStore. + +__init__() + +set_shade(name: Optional[str] = None) +Set the default shade. + +shade(default: Optional[Any] = None, **kwargs) → str +Save the given shade, pick the color and apply it to ui.ColorStore. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.constant_utils.FloatShade.md b/omni.ui.constant_utils.FloatShade.md new file mode 100644 index 0000000000000000000000000000000000000000..6fb521fdd6f0c3c7d270e488adc580af11c14d19 --- /dev/null +++ b/omni.ui.constant_utils.FloatShade.md @@ -0,0 +1,26 @@ + + +FloatShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.constant_utils » +omni.ui.constant_utils Functions » +FloatShade + +  + +# FloatShade + +omni.ui.constant_utils.FloatShade(*args, **kwargs) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.constant_utils.Singleton.md b/omni.ui.constant_utils.Singleton.md new file mode 100644 index 0000000000000000000000000000000000000000..4fbc4c8c00948fa938a789fc235dd2c381bc1c88 --- /dev/null +++ b/omni.ui.constant_utils.Singleton.md @@ -0,0 +1,27 @@ + + +Singleton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.constant_utils » +omni.ui.constant_utils Functions » +Singleton + +  + +# Singleton + +omni.ui.constant_utils.Singleton(class_) +A singleton decorator + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.dock_window_in_window.md b/omni.ui.dock_window_in_window.md new file mode 100644 index 0000000000000000000000000000000000000000..aaa593f8e143b76102fe138a5b5a6c943a12eba1 --- /dev/null +++ b/omni.ui.dock_window_in_window.md @@ -0,0 +1,25 @@ + + +dock_window_in_window — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +dock_window_in_window + +  + +# dock_window_in_window + +omni.ui.dock_window_in_window(arg0: str, arg1: str, arg2: omni.ui._ui.DockPosition, arg3: float) → bool +place a named window in a specific docking position based on a target window name. We will find the target window dock node and insert this named window in it, either by spliting on ratio or on top if the windows is not found false is return, otherwise true + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.get_custom_glyph_code.md b/omni.ui.get_custom_glyph_code.md new file mode 100644 index 0000000000000000000000000000000000000000..0189951dd97e0bca3efb49e65f27701e4f44fc5c --- /dev/null +++ b/omni.ui.get_custom_glyph_code.md @@ -0,0 +1,30 @@ + + +get_custom_glyph_code — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +get_custom_glyph_code + +  + +# get_custom_glyph_code + +omni.ui.get_custom_glyph_code(file_path: str, font_style: omni.ui._ui.FontStyle = ) → str +Get glyph code. + +Parameters + +file_path (str) – Path to svg file +font_style (FontStyle) – font style to use. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.get_main_window_height.md b/omni.ui.get_main_window_height.md new file mode 100644 index 0000000000000000000000000000000000000000..6c8318db1c640cb58b54be0be9c2de4dd4036e2a --- /dev/null +++ b/omni.ui.get_main_window_height.md @@ -0,0 +1,25 @@ + + +get_main_window_height — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +get_main_window_height + +  + +# get_main_window_height + +omni.ui.get_main_window_height() → float +Get the height in points of the current main window. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.get_main_window_width.md b/omni.ui.get_main_window_width.md new file mode 100644 index 0000000000000000000000000000000000000000..91fc395db3a05b7601a146f964a05072c3947126 --- /dev/null +++ b/omni.ui.get_main_window_width.md @@ -0,0 +1,25 @@ + + +get_main_window_width — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +get_main_window_width + +  + +# get_main_window_width + +omni.ui.get_main_window_width() → float +Get the width in points of the current main window. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.set_menu_delegate.md b/omni.ui.set_menu_delegate.md new file mode 100644 index 0000000000000000000000000000000000000000..9936de26eaed387f619fce50787fd6b6023577b7 --- /dev/null +++ b/omni.ui.set_menu_delegate.md @@ -0,0 +1,26 @@ + + +set_menu_delegate — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +set_menu_delegate + +  + +# set_menu_delegate + +omni.ui.set_menu_delegate(delegate: MenuDelegate) +Set the default delegate to use it when the item doesn’t have a +delegate. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.set_shade.md b/omni.ui.set_shade.md new file mode 100644 index 0000000000000000000000000000000000000000..93a6e096bbfae39fa95936328395ccc4256a2577 --- /dev/null +++ b/omni.ui.set_shade.md @@ -0,0 +1,24 @@ + + +set_shade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Functions » +set_shade + +  + +# set_shade + +omni.ui.set_shade(shade_name: Optional[str] = None) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.singleton.Singleton.md b/omni.ui.singleton.Singleton.md new file mode 100644 index 0000000000000000000000000000000000000000..0a77b8ca478b6647657c9159093fce5e2b355e41 --- /dev/null +++ b/omni.ui.singleton.Singleton.md @@ -0,0 +1,27 @@ + + +Singleton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.singleton » +omni.ui.singleton Functions » +Singleton + +  + +# Singleton + +omni.ui.singleton.Singleton(class_) +A singleton decorator + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.url_utils.AbstractShade.md b/omni.ui.url_utils.AbstractShade.md new file mode 100644 index 0000000000000000000000000000000000000000..4b23b628ac2e4733ecef31737edcdf963b7ae8a8 --- /dev/null +++ b/omni.ui.url_utils.AbstractShade.md @@ -0,0 +1,47 @@ + + +AbstractShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.url_utils » +omni.ui.url_utils Classes » +AbstractShade + +  + +# AbstractShade + +class omni.ui.url_utils.AbstractShade +Bases: object +The implementation of shades for custom style parameter type. +The user has to reimplement methods _store and _find to set/get the value +in the specific store. +Methods + +__init__() + +set_shade([name]) +Set the default shade. + +shade([default]) +Save the given shade, pick the color and apply it to ui.ColorStore. + +__init__() + +set_shade(name: Optional[str] = None) +Set the default shade. + +shade(default: Optional[Any] = None, **kwargs) → str +Save the given shade, pick the color and apply it to ui.ColorStore. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.url_utils.Singleton.md b/omni.ui.url_utils.Singleton.md new file mode 100644 index 0000000000000000000000000000000000000000..c0e606a35ffc6d11c9195bfec1f13f142f19583e --- /dev/null +++ b/omni.ui.url_utils.Singleton.md @@ -0,0 +1,27 @@ + + +Singleton — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.url_utils » +omni.ui.url_utils Functions » +Singleton + +  + +# Singleton + +omni.ui.url_utils.Singleton(class_) +A singleton decorator + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.url_utils.StringShade.md b/omni.ui.url_utils.StringShade.md new file mode 100644 index 0000000000000000000000000000000000000000..8a23c1f17385cfe05b8a14017392d853daa1eea3 --- /dev/null +++ b/omni.ui.url_utils.StringShade.md @@ -0,0 +1,26 @@ + + +StringShade — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.url_utils » +omni.ui.url_utils Functions » +StringShade + +  + +# StringShade + +omni.ui.url_utils.StringShade(*args, **kwargs) + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.workspace_utils.CompareDelegate.md b/omni.ui.workspace_utils.CompareDelegate.md new file mode 100644 index 0000000000000000000000000000000000000000..de7fb284ab3d20b6caa4ae771e9f2a5965e0dc1e --- /dev/null +++ b/omni.ui.workspace_utils.CompareDelegate.md @@ -0,0 +1,52 @@ + + +CompareDelegate — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.workspace_utils » +omni.ui.workspace_utils Classes » +CompareDelegate + +  + +# CompareDelegate + +class omni.ui.workspace_utils.CompareDelegate +Bases: object +Methods + +__init__() + +compare_dock_in_value_dock_id(key, value, target) + +compare_dock_in_value_height(key, value, target) + +compare_dock_in_value_position_x(key, value, ...) + +compare_dock_in_value_position_y(key, value, ...) + +compare_dock_in_value_width(key, value, target) + +compare_value(key, value, target) + +compare_window_value_dock_id(key, value, target) + +failed_get_window(error_list, target) + +failed_window_key(error_list, key, target, ...) + +failed_window_value(error_list, key, value, ...) + +__init__() + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.workspace_utils.compare_workspace.md b/omni.ui.workspace_utils.compare_workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..d8100641eb7cb569e5ccd083dc50d5316e44f769 --- /dev/null +++ b/omni.ui.workspace_utils.compare_workspace.md @@ -0,0 +1,31 @@ + + +compare_workspace — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.workspace_utils » +omni.ui.workspace_utils Functions » +compare_workspace + +  + +# compare_workspace + +omni.ui.workspace_utils.compare_workspace(workspace_dump: ~typing.List[~typing.Any], compare_delegate: ~omni.ui.workspace_utils.CompareDelegate = ) +Compare current docked windows according to the workspace description. +### Arguments + +`workspace_dumpList[Any]`The dictionary with the description of the layout. It’s the dict +received from `dump_workspace`. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.workspace_utils.dump_workspace.md b/omni.ui.workspace_utils.dump_workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..d5b7825a5ddc37ce24d25e1ad7660b9d57d46b7f --- /dev/null +++ b/omni.ui.workspace_utils.dump_workspace.md @@ -0,0 +1,28 @@ + + +dump_workspace — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.workspace_utils » +omni.ui.workspace_utils Functions » +dump_workspace + +  + +# dump_workspace + +omni.ui.workspace_utils.dump_workspace() +Capture current workspace and return the dict with the description of the +docking state and window size. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.workspace_utils.handle_exception.md b/omni.ui.workspace_utils.handle_exception.md new file mode 100644 index 0000000000000000000000000000000000000000..35020f24f0dbdaaa6f7f48e424f53d00d35661fc --- /dev/null +++ b/omni.ui.workspace_utils.handle_exception.md @@ -0,0 +1,27 @@ + + +handle_exception — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.workspace_utils » +omni.ui.workspace_utils Functions » +handle_exception + +  + +# handle_exception + +omni.ui.workspace_utils.handle_exception(func) +Decorator to print exception in async functions + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/omni.ui.workspace_utils.restore_workspace.md b/omni.ui.workspace_utils.restore_workspace.md new file mode 100644 index 0000000000000000000000000000000000000000..df0e85ffd306e7c48786dcc0e357d71d565fd353 --- /dev/null +++ b/omni.ui.workspace_utils.restore_workspace.md @@ -0,0 +1,34 @@ + + +restore_workspace — Omniverse Kit 2.25.9 documentation + +Omniverse Kit + + » +API (python) » +Modules » +omni.ui » +omni.ui Submodules » +omni.ui.workspace_utils » +omni.ui.workspace_utils Functions » +restore_workspace + +  + +# restore_workspace + +omni.ui.workspace_utils.restore_workspace(workspace_dump: List[Any], keep_windows_open=False) +Dock the windows according to the workspace description. +### Arguments + +`workspace_dumpList[Any]`The dictionary with the description of the layout. It’s the dict +received from `dump_workspace`. + +`keep_windows_openbool`Determines if it’s necessary to hide the already opened windows that +are not present in `workspace_dump`. + +© Copyright 2019-2024, NVIDIA. + Last updated on Mar 25, 2024. + + + diff --git a/overview_external.md b/overview_external.md new file mode 100644 index 0000000000000000000000000000000000000000..189bcf28fe2544879a58f1264681d7e64d60adce --- /dev/null +++ b/overview_external.md @@ -0,0 +1,46 @@ + + +Launcher Overview — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Launcher Overview + +  + +# Launcher Overview + +The NVIDIA Omniverse™ Launcher is your first step into the Omniverse. Giving you immediate access to all the apps, connectors and other downloads the Omniverse Launcher is your gateway to the Omniverse. You can download the launcher here. + +Click here for Launcher installation instructions. + +## Features + +### Quick Access to Omniverse Apps + +With an intuitive Interface, Launcher allows a lightning quick experience for opening Omniverse Apps. + +### Updating Made Easy + +Staying current is easy with Omniverse Apps and Connectors. The Launcher provides all you need to download, install, and update Omniverse Apps and Connectors through an elegant user interface. + +When you see a green bell icon next to an app, that means a new version is available. Click the hamburger icon next to “Launch” to open the version dropdown, then click the green “Install/bell icon” to install the latest version. + +### Learning Content + +With quick easy access links, the Launcher puts all the help you need front and center. Learn via video tutorials, documentation or other Omniverse users on the Omniverse Forums. Whatever way you wish to learn, Launcher makes available. + +### Get Connected + +Entering the Omniverse is much easier when you do so through tools you are already familiar with. Launcher offers quick access to download and install Omniverse Connectors. These Connectors allow applications like Maya, 3Ds-Max, Revit and many other DCC Applications to contribute to an Omniverse project. + +Interested in learning more? +Open the Omniverse Launcher documentation portal + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/package.md b/package.md new file mode 100644 index 0000000000000000000000000000000000000000..b1148a9314c924e785890270d683d6a40ad16586 --- /dev/null +++ b/package.md @@ -0,0 +1,118 @@ + + +Package a Build — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Package a Build + +  + +# Package a Build + +At the conclusion of your development and testing phases, packaging your project is often necessary in preparation for publishing. While some extensions may not require this step, it becomes essential for applications and more complex extensions involving advanced features. The packaging process organizes and structures your project assets for delivery and deployment. The specifics of the packaging step depend on your desired method of distribution. + +## Introduction + +Please ensure that you are following the NVIDIA Omniverse License Agreement when developing your project. If you intend to distribute your project outside your company, it must use thin packaging. + +Important Notes: + +Packaging is OS dependent. Linux is required for Linux packages and Windows is required for Windows packages +Packaging requires a build of the desired Project. See Build a Project for additional details +Instructions provided here assume use of Repo tooling + +Packages are a collection of all the files that compose your Project. Although it is possible to manually assemble your package by creating an archive with the necessary files and folders, Omniverse conveniently offers a more efficient alternative via the Repo Package tool. This tool verifies that you have all the essential config files and that your build folder is accurately configured. + +## Packaging Extensions + +It’s important to note that sometimes, specifically with simpler extensions, you may only need to manually copy the files into the destination directory for distribution. Generally, the repo package method is best used for projects that contain a premake5.lua file and result in a _build folder. + +## Packaging Applications + +### Lock Extension Versions + +Before packaging, it is advised to lock your Extension versions. While iterative development typically benefits from using the latest versions without specifying one, it’s good practice to lock Extension versions for distributed Applications. This ensures that end users install and experience the fully tested and developed version. +The following steps apply if you’re working on a Kit project that includes the Repo tool, like the kit-app-template, for example. +To lock Extension versions: + +Build the Project +Open the repo.toml file (most likely in the root directory of the project) and insert a reference to the application .kit file in the [repo_precache_exts] section: + +[repo_precache_exts] +# Apps to run and precache +apps = [ +"${root}/source/apps/my_company.my_app.kit", +] + +Run the command repo precache_exts -u. +Open the .kit file. There should be a section labeled BEGIN GENERATED PART. This is where Extension versions have been locked. + +### Warmup Script + +When an end user installs an Application we can provide a warmup procedure that caches shaders and a does a few other things to improve the Application startup performance. This is an optional step and is most relevant to packages published via an Omniverse Launcher. +Open .\kit-app-template\premake5.lua. +Note this section: +-- App warmup script for the Launcher +create_app_warmup_script("omni.usd_explorer", { + args = "--exec \"open_stage.py ${SCRIPT_DIR}exts/omni.usd_explorer.setup/data/BuiltInMaterials.usda\" --/app/warmupMode=1 --no-window --/app/extensions/excluded/0='omni.kit.splash' --/app/extensions/excluded/1='omni.kit.splash.carousel' --/app/extensions/excluded/2='omni.kit.window.splash' --/app/settings/persistent=0 --/app/settings/loadUserConfig=0 --/structuredLog/enable=0 --/app/hangDetector/enabled=0 --/crashreporter/skipOldDumpUpload=1 --/app/content/emptyStageOnStart=1 --/app/window/showStartup=false --/rtx/materialDb/syncLoads=1 --/omni.kit.plugin/syncUsdLoads=1 --/rtx/hydra/materialSyncLoads=1 --/app/asyncRendering=0 --/app/file/ignoreUnsavedOnExit=1 --/renderer/multiGpu/enabled=0 --/app/quitAfter=10" +}) +By including this section for the app, an additional [app name].warmup.bat\.sh is added in the build. Go ahead and change omni.usd_explorer to my_company.usd_explorer (there’s two places): + +-- App warmup script for the Launcher +create_app_warmup_script("my_company.usd_explorer", { + args = "--exec \"open_stage.py ${SCRIPT_DIR}exts/my_company.usd_explorer.setup/data/BuiltInMaterials.usda\" --/app/warmupMode=1 --no-window --/app/extensions/excluded/0='omni.kit.splash' --/app/extensions/excluded/1='omni.kit.splash.carousel' --/app/extensions/excluded/2='omni.kit.window.splash' --/app/settings/persistent=0 --/app/settings/loadUserConfig=0 --/structuredLog/enable=0 --/app/hangDetector/enabled=0 --/crashreporter/skipOldDumpUpload=1 --/app/content/emptyStageOnStart=1 --/app/window/showStartup=false --/rtx/materialDb/syncLoads=1 --/omni.kit.plugin/syncUsdLoads=1 --/rtx/hydra/materialSyncLoads=1 --/app/asyncRendering=0 --/app/file/ignoreUnsavedOnExit=1 --/renderer/multiGpu/enabled=0 --/app/quitAfter=10" +}) + +Run a build. +A my_company.usd_explorer.warmup.bat.sh file was created in the build directory. +To prepare for a Launcher package, open .kit-app-templatesourcelauncherlauncher.toml. +Note the per platform post-install = “” entries. Edit these settings to provide the warmup script (the default has them commented out): +[defaults.windows-x86_64.install] +... +post-install = "${productRoot}/my_company.usd_explorer.warmup.bat" +... + +[defaults.linux-x86_64.install] +... +post-install = "${productRoot}/my_company.usd_explorer.warmup.sh" +... + +### Create the Package + +There are primarily two types of packages: ‘Fat’ and ‘Thin’. + +‘Fat’ Package +Includes all the necessary components to run the app, encompassing both the Kit Kernel and all Extensions. This is the package type you should opt for if you don’t want end users to download anything during installation. It is particularly useful in environments without access to public repositories, such as air-gapped organizations. + +‘Thin’ Package +Contains the bare essentials needed for an installation, necessitating the download of the Kit Kernel and Extensions during app installation. Thin packages optimize the use of local storage by only downloading components that other thin packaged apps haven’t already downloaded. However, this package type isn’t suitable for air-gapped environments. + +Both ‘fat’ and ‘thin’ packages come as zip-archives and can be directly shared with end users. +A variant is the ‘Launcher’ Package. This type includes either a ‘fat’ or ‘thin’ application package along with additional resources, enabling the application to be listed in the Omniverse Launcher. +Both fat and thin packages can be renamed - nothing inside the package depends on the package name. + +#### Fat Package + +Build the Project +Execute repo package. +Package is created in the .\_build\package directory. + +#### Thin Package + +Build the Project +Execute repo package --thin. +Package is created in the .\_build\package directory. + +## Connectors + +Note +There is no set method for packaging connectors. Please reference the Connect Sample and associated documentation for best practices + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/planning.md b/planning.md new file mode 100644 index 0000000000000000000000000000000000000000..c85f4e9a0ecc473186b02707494d3bce7ee442d2 --- /dev/null +++ b/planning.md @@ -0,0 +1,54 @@ + + +Planning Your Installation — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Installation Guide » +Planning Your Installation + +  + +# Planning Your Installation + +Whether you are looking for a way to install a single Omniverse foundation application for a user to test, or want to deploy an entire suite of Omniverse apps and content for your internal users to work and collaborate with, you should review and plan accordingly based on the requirements and options below to ensure your internal infrastructure is at the desired level of readiness. + +## System Requirements + +Ensure you have identified at least one computer with the ability to connect to the Internet to download the various installation files, applications and content archives from NVIDIA servers. All of these files are available for both Windows and Linux operating systems (except for the Enterprise Nucleus Server, which is only available for Linux via Docker) and it is up to you to determine which operating systems your users’ workstations need to be supported. +Confirm that you have hardware within your company firewall with ample disk space (100-500GB) where you can “stage” many of these downloaded files so they can be accessed as part of the installation or deployment process. +If you don’t have connected staging hardware that is accessible by users’ workstations (they are completely isolated from a network and Internet connections), you should have some form of portable media device (100-500GB) to manually move the downloaded files from one location to another. +Make sure to update the OS systems that will be utilized and installed upon (ie. Windows Update, etc.) so they are up to date +Verify that all orchestrations (if needed) have the correct versions in support of Omniverse deployed GPUs etc. + +## Configuration Options + +Ensure evaluation of Omniverse application and configuration needs for each internal customer group. +Create a topology of how Omniverse on internal customer systems (virtual or local) are connected to each other, Nucleus Server / Workstation, etc. + +You can learn about Reference Architectures here. +You can learn about Virtualized Topologies here. + +Omniverse currently does not support LDAP however, services like Microsoft InTune may be used to support hybrid and remote teams with disparate resources. + +## Omniverse Readiness + +Review and identify all internal customer requirements starting from application resource needs (Omniverse + other installed applications) working your way through to confirming your network, servers, and workstations meet these requirements for the collective requirements in deployment. +Pre-check that available Omniverse installation software are the correct versions required. +Ensure required Omniverse quantities of licensing are secured. +Download all necessary files from the Omniverse Enterprise Web Portal and transfer them to an easily accessible local networked system that will act as a staging area. +Ensure all necessary ports that need to be open for Omniverse applications to communicate with each other are configured properly. + +## Permissions + +Ensure that all extensions are downloaded/staged into IT managed public folders such as D:/omniverse/data. IT organizations tend to lock down non-user folders (anything sans %USER_ROOT%) will want to ensure that they have installed “all required” files in the read-only areas for workstation users. + +As a first step, you must install the IT Managed Launcher to your users’ workstations. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/profiling.md b/profiling.md new file mode 100644 index 0000000000000000000000000000000000000000..6542cfee0e75162e2a94ec6a0d68360fab2dcea8 --- /dev/null +++ b/profiling.md @@ -0,0 +1,132 @@ + + +Profiling — kit-manual 105.1 documentation + +kit-manual + + » +Profiling + +  + +# Profiling + +Kit-based applications come bundled with a profiler interface to instrument your code, for both C++ and Python. Multiple profiler backend implementations are supported: + +NVTX +ChromeTrace +Tracy + +## Easy Start + +Enable the omni.kit.profiler.window extension. +Press F5 to start profiling, then press F5 again to stop profiling and get a trace opened in Tracy. + +Press F8 to open the profiler window, where you can perform additional operations such as enabling the Python profiler, browsing traces, etc. +All traces are saved into one folder (can be found in the Browse section of the profiler window). They can be viewed with either Tracy or Chrome (by navigating to chrome://tracing). + +Note +Both F5 and F8 have an entry in the top menu. + +## Profiling Backends + +### Chrome Trace + +Run the Kit-based application using the following settings to produce a trace file named mytrace.gz in the directory where the executable is located: +kit.exe [your_configuration] \ + --/app/profilerBackend="cpu" \ + --/app/profileFromStart=1 \ + --/plugins/carb.profiler-cpu.plugin/saveProfile=1 \ + --/plugins/carb.profiler-cpu.plugin/compressProfile=1 \ + --/plugins/carb.profiler-cpu.plugin/filePath="mytrace.gz" + +Then, using the Google Chrome browser, navigate to chrome://tracing to open a trace file and explore areas of interest. + +### Tracy + +#### On Demand + +Enable the omni.kit.profiler.tracy extension. +Select Profiling->Tracy->Launch and Connect from the menu. + +Note: The omni.kit.profiler.tracy extension contains the currently supported version of Tracy (v0.9.1), which can also be downloaded from GitHub. + +#### From Startup + +Run the Kit-based application using the following settings: +kit.exe [your_configuration] \ + --/app/profilerBackend="tracy" \ + --/app/profileFromStart=true + +Run Tracy and click the “Connect” button to start capturing profiling events. +You can also convert a chrome trace profile to Tracy format using import-chrome.exe tool it provides. There is a helper tool to do that in repo_kit_tools, it downloads Tracy from packman and opens any of those 3 formats: +repo tracetools tracy mytrace.gz +repo tracetools tracy mytrace.json +repo tracetools tracy mytrace.tracy + +### Multiplexer + +You can enable multiple profiler backends at the same time. +Run the Kit-based application using the following settings: +kit.exe [your_configuration] \ + --/app/profilerBackend=[cpu,tracy] \ + {other_settings_specific_to_either} + +The multiplexer profiler will automatically detect any IProfiler implementations that are loaded afterwards, for example as part of an extension. +If the --/app/profilerBackend setting is empty, the multiplexer profiler will be used as the default, along with the cpu profiler behind it. + +## Instrumenting Code + +To instrument C++ code, use the macros from the Carbonite Profiler, e.g.: +#include + +constexpr const uint64_t kProfilerMask = 1; + +void myfunc() +{ + CARB_PROFILE_ZONE(kProfilerMask, "My C++ function"); + + // Do hard work here. + // [...] +} + +For Python code, use the Carbonite Profiler bindings: +import carb.profiler + +# Using the decorator version: + +@carb.profiler.profile +def foo(): + pass + +# Using explicit begin/end statements: + +def my_func(): + carb.profiler.begin(1, "My Python function") + + # Do hard work here. + # [...] + + carb.profiler.end(1) + +## Automatic Python Profiler: omni.kit.profile_python + +Python offers a sys.setprofile() method to profile all function calls. Kit-based applications come with an extension that hooks into it automatically and reports all events to carb.profiler. Since this profiling method has an impact on the runtime performance of the application, it is disabled by default. +kit.exe [your_configuration] \ + [profiler_backend_configuration] \ + --enable omni.kit.profile_python + +## Profiling Startup Time + +Kit includes a handy shell script to profile app startup time: profile_startup.bat. +It runs an app with profiling enabled, quits, and opens the trace in Tracy. Pass the path to the app kit file and other arguments to it. E.g.: +profile_startup.bat path/to/omni.app.full.kit --/foo/bar=123 + +To enable python profiling pass --enable omni.kit.profile_python: +profile_startup.bat path/to/omni.app.full.kit --enable omni.kit.profile_python + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/publish.md b/publish.md new file mode 100644 index 0000000000000000000000000000000000000000..3bef1980bb8eca5ab29f7f4b23650842cb45055a --- /dev/null +++ b/publish.md @@ -0,0 +1,51 @@ + + +Publish a Package — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Publish a Package + +  + +# Publish a Package + +The ultimate goal is to transform your hard work into a product that others can realize value from. The publishing process helps you to achieve this by relocating the Packaged Build to a location suitable for installation or deployment. Omniverse offers a wide array of endpoints including integrated ZIP files, Cloud systems, Streaming systems, our Launcher system, Git repositories, customized CMS, and more. Although the functional content of a package can be consistent across platforms, the delivery and installation methods may vary. This section guides you through the process of publishing your project to reach your intended audience. + +For end users of your custom App or Extension, users must accept the NVIDIA Omniverse License Agreement. + +It’s important to keep in mind that you can publish your project to multiple destinations as long as you can meet the requirements for each of them. Some might require particular Package steps, others may require that you create a Package for a particular platform. In any case, it is important to note that you can create your development workflow around generating multiple Packages intended for multiple publishing destinations. + +## Direct Deployment + +Package Types: Thin Package, Fat Package +Project Types: Apps, Services, Connectors, Extensions +Platforms: Windows, Linux + +Instructions to Install Packages Directly to End User + +## Launcher + +Package Types: Thin Package, Fat Package +Project Types: Apps, Services, Connectors, Extensions +Platforms: Windows, Linux + +NVIDIA Omniverse™ Launcher is the method that most Omniverse Projects are distributed to end-users. Launcher not only allows for distribution of NVIDIA generated applications and extensions, but also third-party apps and extensions. Launcher also can be used for on-prem distribution, enterprise solutions, and more. You can even test your packages on a local version of Launcher to see how they will be presented to your customers. +Learn more about publishing to Omniverse Launcher + +## Omniverse Cloud + +Package Types: Fat Package +Project Types: Apps +Platforms: Linux + +After building a Launcher Package using the Fat Package, you can then also distribute via Omniverse Cloud (OVC). With OVC, users can stream their apps to devices with nothing more than an internet connection. +Learn about publishing to OVC via the Omniverse Cloud Guide + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/publishing_exts.md b/publishing_exts.md new file mode 100644 index 0000000000000000000000000000000000000000..93715873853ec72d20a4f7e1009c1d395a96a924 --- /dev/null +++ b/publishing_exts.md @@ -0,0 +1,49 @@ + + +Publishing Extensions — kit-manual 105.1 documentation + +kit-manual + + » +Publishing Extensions + +  + +# Publishing Extensions + +Extensions are published to the registry to be used by downstream apps and extensions. +Kit documentation: Publishing covers how to do it manually with the command line or UI. However, we suggest automating that process in CI. +Extensions are published using the repo publish_exts tool that comes with Kit. The [repo_publish_exts] section of repo.toml lists which extensions to publish. E.g.: +[repo_publish_exts] +# Extensions to publish, include and exclude among those discovered by kit. Wildcards are supported. +exts.include = [ + "omni.foo.bar", +] +exts.exclude = [] + +Typically, CI scripts are setup to run repo publish_exts -c release (and debug) on every green commit to master, after builds and tests pass. That publishes any new extension version. For versions that were already published, nothing happens. So the version number needs to be incremented for publishing to have any effect. +You can test publishing locally with a “dry” run using -n flag: +repo publish_exts -c release -n + +It is important to remember that some extensions (typically C++, native) have a separate package per platform, so we need to run publishing separately on each platform and publish for each configuration (debug and release). This is especially important to satisfy all required dependencies for downstream consumers. + +## Publish Verification + +The extension system verifies extensions before publishing. It checks basic things like the extension icon being present, that the changelog is correct, that a name and description field are present, etc. Those checks are recommended, but not required. You can control them with a setting for repo_publish_exts: +[repo_publish_exts] +publish_verification = false + +To only run the verification step, without publishing, use the --verify flag: +repo publish_exts -c release --verify + +It is recommended to run the verification step as part of build, to catch issues early. + +## Other Publish Tool Settings + +As with any repo tool, to find other available settings for the publish tool, look into its repo_tools.toml file. Since it comes with Kit, this file is a part of the kit-sdk package and can be found at: _build/$platform/$config/kit/dev/repo_tools.toml + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/pxr.md b/pxr.md new file mode 100644 index 0000000000000000000000000000000000000000..ac91282bbf52567dd201c16713399b680fc6dc74 --- /dev/null +++ b/pxr.md @@ -0,0 +1,114 @@ + + +Modules — pxr-usd-api 105.1 documentation + +pxr-usd-api + + » +Modules + +  + +# Modules + +Ar +The Ar (Asset Resolution) library is responsible for querying, reading, and writing asset data. + +CameraUtil +Camera Utilities + +Garch +GL Architecture + +GeomUtil +The GeomUtil module contains utilities to help image common geometry. + +Gf +The Gf (Graphics Foundations) library contains classes and functions for working with basic mathematical aspects of graphics. + +Glf +The Glf module contains Utility classes for OpenGL output. + +Kind +The Kind library provides a runtime-extensible taxonomy known as “kinds”. Useful for classifying scenegraph objects. + +Ndr +The Ndr (Node Definition Registry) provides a node-domain-agmostic framework for registering and querying information about nodes. + +Pcp +The PrimCache Population module implements core scenegraph composition semantics - behaviors informally referred to as Layering & Referencing. + +PhysicsSchemaTools +Omniverse-specific: The Physics Schema Tools provides tools for the representation of physics properties and behaviors in a 3D scene, such as gravity, collisions, and rigid body dynamics. + +Plug +Provides a plug-in framework implementation. Define interfaces, discover, register, and apply plug-in modules to nodes. + +Sdf +The Sdf (Scene Description Foundation) provides foundations for serializing scene description and primitive abstractions for interacting. + +Sdr +The Sdr (Shader Definition Registry) is a specialized version of Ndr for Shaders. + +Tf +The Tf (Tools Foundations) module. + +Trace +The Trace module provides performance tracking utility classes for counting, timing, measuring, recording, and reporting events. + +Usd +The core client-facing module for authoring, compositing, and reading Universal Scene Description. + +UsdAppUtils +The UsdAppUtils module contains a number of utilities and common functionality for applications that view and/or record images of USD stages. + +UsdGeom +The UsdGeom module defines 3D graphics-related prim and property schemas that form a basis for geometry interchange. + +UsdHydra +The UsdHydra module. + +UsdLux +The UsdLux module provides a representation for lights and related components that are common to many graphics environments. + +UsdMedia +The UsdMedia module provides a representation for including other media, such as audio, in the context of a stage. UsdMedia currently contains one media type, UsdMediaSpatialAudio, which allows the playback of audio files both spatially and non-spatially. + +UsdPhysics +The UsdPhysics module defines the physics-related prim and property schemas that together form a physics simulation representation. + +UsdProc +The UsdProc module defines schemas for the scene description of procedural data meaningful to downstream systems. + +UsdRender +The UsdRender module provides schemas and behaviors for describing renders. + +UsdRi +The UsdRi module provides schemas and utilities for authoring USD that encodes Renderman-specific information, and USD/RI data conversions. + +UsdShade +The UsdShade module provides schemas and behaviors for creating and binding materials, which encapsulate shading networks. + +UsdSkel +The UsdSkel module defines schemas and API that form a basis for interchanging skeletally-skinned meshes and joint animations. + +UsdUI +The UsdUI module provides schemas for encoding information on USD prims for client GUI tools to use in organizing/presenting prims in GUI layouts. + +UsdUtils +The UsdUtils module contains utility classes and functions for managing, inspecting, editing, and creating USD Assets. + +UsdVol +The UsdVol module provides schemas for representing volumes (smoke, fire, etc). + +Vt +The Vt (Value Types) module defines classes that provide for type abstraction, enhanced array types, and value type manipulation. + +Work +The Work library is intended to simplify the use of multithreading in the context of our software ecosystem. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/pxr_index.md b/pxr_index.md new file mode 100644 index 0000000000000000000000000000000000000000..0d96979ec3e7f357fe1ea71e2d86600235221585 --- /dev/null +++ b/pxr_index.md @@ -0,0 +1,18 @@ + + +API (pxr) — kit-manual 105.1 documentation + +kit-manual + + » +API (pxr) + +  + +# API (pxr) + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/python_scripting.md b/python_scripting.md new file mode 100644 index 0000000000000000000000000000000000000000..e4b03deec8bb5e29db73d1aa7d7ff02e39392688 --- /dev/null +++ b/python_scripting.md @@ -0,0 +1,51 @@ + + +Scripting — kit-manual 105.1 documentation + +kit-manual + + » +Scripting + +  + +# Scripting + +## Overview + +Kit Core comes with a python interpreter and a scripting system. It is mainly used to write extensions in python, but it can also be used to make simple python scripts. Each extension can register a set of script search folders. Scripts can be run via command line or API. + +## How to add a script folder + +Multiple ways: + +Use the /app/python/scriptFolders setting. As with any setting it can be changed in the core config, in the app config, via the command line or at runtime using settings API. +Use IAppScripting API, e.g. carb::getCachedInterface()->getPythonScripting()->addSearchScriptFolder("myfolder"). +Specify in the extension.toml, in the [[python.scriptFolder]] section: + +[[python.scriptFolder]] +path = "scripts" + +## How to run a script + +Command line: + +Example: > kit.exe --exec "some_script.py arg1 arg2"  --exec "open_stage" + +Settings: + +Example: > kit.exe --app/exec/0="some_script.py arg1" + +API: + +C++ Example: carb::getCachedInterface()->getPythonScripting()->executeFile("script.py") +Python Example: omni.kit.app.get_app_interface().get_python_scripting().execute_file("script.py") see (omni.kit.app.IAppScripting.execute_file()) for more details. + +Note +The script extension (.py) can be omitted. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/release-notes.md b/release-notes.md new file mode 100644 index 0000000000000000000000000000000000000000..f4ab4ac92f3f5e3a0265cbfd786fc58c3b6e04c7 --- /dev/null +++ b/release-notes.md @@ -0,0 +1,69 @@ + + +Release Notes — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Release Notes + +  + +# Release Notes + +Note +For Release Notes related to features in the Nucleus tab, please review the Omniverse Nucleus Navigator Release Notes. + +## Current Release + +### 1.9.11 + +Release Date: April 2024 + +### Fixed + +Fixed an issue where Launcher was minimized to the system tray instead of exiting when users clicked on Exit option in user settings menu. +Fixed a race condition that could cause settings reset. [OM-118568] +Fixed gallery positioning for content packs. [OM-118695] +Fixed beta banner positioning on the Exchange tab. [OM-119105] +Fixed an issue on the Hub page settings that caused showing “infinity” in disk chart for Linux. [HUB-965] +Fixed cache size max validations on Hub page settings tab. [OM-119136] +Fixed cache size decimal points validations on Hub page settings tab. [OM-119335] +Fixed Hub Total Disk Space chart to not allow available disk space to become negative. [HUB-966] +Fixed an issue on the Hub page settings that caused showing “infinity” in disk chart for Linux. [HUB-965] +Fixed an issue on the Hub page settings that cause cache size not to be displayed. [HUB-960] +Fixed an issue on the Hub page settings preventing editing Cleanup Threshold. [OM-119137] +Fixed Hub page settings chart drive/mount detection size based on cache path. [HUB-970] +Replace Omniverse Beta license agreement text with NVIDIA License and add license agreement link in the About dialog. [OM-120991] + +## All Release Notes + +1.9.8 +1.9.11 +Fixed +1.9.10 +1.8.7 +1.8.2 +1.8.11 +1.7.1 +1.6.10 +1.5.7 +1.5.5 +1.5.4 +1.5.3 +1.5.1 +1.4.0 +1.3.4 +1.3.3 +1.2.8 +1.1.2 +1.0.50 +1.0.42 +1.00.48 + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/test.md b/test.md new file mode 100644 index 0000000000000000000000000000000000000000..74c5576074909418dd19756afc2ce3eb95f91f48 --- /dev/null +++ b/test.md @@ -0,0 +1,39 @@ + + +Test a Build — Omniverse Developer Guide latest documentation + +Omniverse Developer Guide + + » +Omniverse Developer Guide » +Test a Build + +  + +# Test a Build + +Omniverse provides tooling and automation making testing easier and more efficient. Use the system’s built-in methods to generate UNIT TESTS for extensions, run automated INTEGRATION TESTS for your applications, and perform PERFORMANCE TESTS to ensure your project runs as efficiently as possible. + +Testing Extensions with Python - Kit Manual : Python Testing. +Testing Extensions with C++ - Kit Manual : C++ Testing +Service Testing Tutorial - Unit testing for a viewport capture Service + +## Logging + +Logging, an essential tool for tracking Project activities, offers a detailed, sequential record of events occurring within your Project. This process assists in specifying the performance of your Project. + +Kit Manual : Logging - Provides a brief overview of utility functions in Kit so you can create log entries during runtime. + +## Profiling + +Profiling is an analysis technique used to evaluate the runtime behavior of a software program. It entails gathering data on aspects such as time distribution across code segments, frequency of function usage, number of rendered “frames,” memory allocation, etc. This data serves to identify potential performance bottlenecks, memory leaks, and other factors potentially affecting the efficiency or stability of the program. +The Omniverse Platform provides comprehensive profiling support, enabling the thorough examination of your project’s frame rate, resource usage, stability, among other aspects. +For more information on profiling, refer to the following resources: + +Kit Manual : Profiling Guide + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/testing_exts_cplusplus.md b/testing_exts_cplusplus.md new file mode 100644 index 0000000000000000000000000000000000000000..80acdba2e4d439e9ad566976077c252ea0cf3c75 --- /dev/null +++ b/testing_exts_cplusplus.md @@ -0,0 +1,219 @@ + + +Testing Extensions with C++ — kit-manual 105.1 documentation + +kit-manual + + » +Testing Extensions with C++ + +  + +# Testing Extensions with C++ + +For information on testing extensions with Python, look here + +## Doctest + +omni.kit.test has a doctest library as a runner for C++ tests. +Further, refer to Carbonite’s Testing.md to learn about using the Doctest testing system. +List of doctest command line arguments +You can also use –help on the command line for test.unit: +test.unit.exe --help + +Although Omniverse adds additional options, there is also an online reference for Doctest command-line options. + +## Set up testable libraries + +To write C++ tests, you first must have created a shared library with tests to be loaded: +project_ext_tests(ext, "omni.appwindow.tests") + add_files("impl", "tests.cpp") + +tests.cpp/AppWindowTests.cpp: +#include +#include + +CARB_BINDINGS("omni.appwindow.tests") + +TEST_SUITE("some test suite") { + TEST_CASE("test case success") { + CHECK(5 == 5); + } +} + +Next specify in the test section to load this library: +[[test]] +cppTests.libraries = [ + "bin/${lib_prefix}omni.appwindow.tests${lib_ext}", +] + +Run tests the same way with _build\windows-x86_64\release\tests-[extension_name].bat. omni.kit.test this: + +loads the library +tests will be registered automatically in doctest +runs doctest + +In this setup C++ and python tests will run in the same process. A separate [[test]] entry can be created to run separate processes. +To run only subset of tests -f option can be used: +> _build\windows-x86_64\release\tests-omni.appwindow.bat -f foo +All arguments in the tested process after -- are passed to doctest. But to pass to the tested process, -- must be used. So to pass arguments to doctest, -- must be specified twice, like so: +> _build\windows-x86_64\release\tests-omni.appwindow.bat -- -- -tc=*foo* -s +When using the test.unit.exe workflow instead, check below. + +## Running a single test case + +In order to run a single test case, use the -tc flag (short for –test-case) with wildcard filters: +_build\windows-x86_64\release\tests-omni.appwindow.bat -- -- -tc="*[rtx]*" + +Commas can be used to add multiple filters: +_build\windows-x86_64\release\tests-omni.appwindow.bat -- -- -tc="*[rtx]*,*[graphics]*" + +## Unit Tests + +Some tests are written using an older approach. Carbonite is used directly without kit and all the required plugins are manually loaded. To run those tests use: +> _build\windows-x86_64\release\test.unit.exe + +## Image comparison with a golden image + +Some graphics tests allow you to compare visual tests with a golden image. This can be done by creating an instance of ImageComparison class. +Each ImageComparison descriptor requires a unique GUID, and must be accompanied with the equivalent string version in C++ source as a comment for easy lookup. +Defining a test case: +ImageComparisonDesc desc = +{ + { 0x2ae3d60e, 0xbc3b, 0x48b6, { 0xa8, 0x67, 0xe0, 0xa0, 0x7c, 0xaa, 0x9e, 0xd0 } }, // 2AE3D60E-BC3B-48B6-A867-E0A07CAA9ED0 + "Depth-stencil-16bit", + ComparisonMetric::eAbsoluteError, + kBackBufferWidth, + kBackBufferHeight +}; + +// Create Image comparison +imageComparison = new ImageComparison(); + +// register the test case (only once) +status = imageComparison->registerTestCase(&desc); +REQUIRE(status); + +### Regression testing of an executable with a golden image: + +This is supported by any executable that uses carb.renderer (e.g. omnivserse-kit or rtx.example), in which it can capture and dump a frame. +NVF is not yet supported. + +// 1- run an executable that supports CaptureFrame +std::string execPath; +std::string cmdLine; +ImageComparison::makeCaptureFrameCmdLine(500, // Captures frame number 500 + &desc, // ImageComparisonDesc desc + "kit", // Executable's name + execPath, // Returns the executable path needed for executeCommand() + cmdLine); // Returns command line arguments needed for executeCommand() + +// 2- Append any command line arguments you need to cmdLine with proper spaces +cmdLine += " --/rtx/debugView='normal'"; + +// 3- Run the application with a limited time-out +status = executeCommand(execPath, cmdLine, kExecuteTimeoutMs); +REQUIRE(status); + +// 4- compare the golden image with the dumped output of the captured frame (located at $Grapehene$/outputs) +float result = 0.0f; +CHECK(m_captureFrame->compareResult(&desc, result) == ImageComparisonStatus::eSuccess); +CHECK(result <= Approx(kMaxMeanSqrError)); // With ComparisonMetric::eMeanErrorSquared + +### Regression testing of a rendering test using comparison of backbuffer with a golden image: + +// 1- Create an instance of CaptureFrame and initialize it +captureFrame = new CaptureFrame(m_gEnv->graphics, m_gEnv->device); +captureFrame->initializeCaptureFrame(RenderOpTest::kBackBufferWidth, RenderOpTest::kBackBufferHeight); + +// 2- Render something + +// 3- copy BackBuffer to CaptureFrame +captureFrame->copyBackBufferToHostBuffer(commandList, backBufferTexture); + +// 4- Submit commands and wait to finish + +// 5- compare the golden image with the BackBuffer (or dump it into the disk $Grapehene$/outputs) +float result = 0.0f; +CHECK(imageComparison->compareResult(&desc, captureFrame->readBufferData(true), captureFrame->getBufferSize(), result) == ImageComparisonStatus::eSuccess); +CHECK(result == Approx(0.0f)); + +compareResult() also allows you to dump the BackBuffer into outputs folder on the disk. This can be done using the following option of test.unit executable: + +test.unit.exe --carb-golden -tc="*[graphics]*,*[visual]*" + +The following command allows executables to dump only the golden images of the test that fail our acceptable threshold: + +test.unit.exe --carb-golden-failure -tc="*[graphics]*,*[visual]*" + +### How to update and upload a new golden image + +Run the test in release mode. + +// Example: regression testing of OmniverseKit executable +test.unit.exe -tc="*[omniverse-kit][rtx]*" + +// Example: regression testing of visual rendering tests +test.unit.exe --carb-golden -tc="*[graphics]*,*[visual]*" + +// Example: regression testing of visual rendering tests that fail our acceptable threshold +test.unit.exe --carb-golden-failure -tc="*[graphics]*,*[visual]*" + +Verify and view the golden image that is added to outputs folder in Omniverse kit’s repo. It must be exactly what you expect to see. +Name of the golden image is GUID of the test. +Copy the golden image from outputs folder to data\golden. This is a folder for git lfs data. +Open a merge request with git-lfs data changes. + +### Troubleshooting + +All unit tests crash on textures or shaders: + +You must have git lfs installed and initialize it. +Check files in data folder, and open them in a text editor. You should not see any URL or hash as content. +Install the latest driver (refer to readme.md) + +executeCommand() fails: + +A possible crash or assert in release mode. +A crash or hang during exit. +Time-out reached. Note that any assert dialog box in release mode may cause time-out. + +compareResult() fails: + +Rendering is broken, or a regression is introduced beyond the threshold. + +outputs folder is empty for tests with a tag of [executable]: + +A regression caused the app to fail. + +### How to use asset folder for storing data + +Perform the following command to delete the existing _build\asset.override folder. That folder must be gone before proceeding further. + +.\assets.bat clean + +Stage assets. It copies data from assets to assets.override. + +.\assets.bat stage + +Modify any data under asset.override. Do NOT modify assets folder. +Upload and publish a new asset package: + +.\assets.bat publish + +Rebuild to download the new assets and run the the test to verify: + +.\build.bat --rebuild + +Open a merge request with new assets.packman.xml changes. + +## Skipping Vulkan or Direct3D 12 graphics tests + +In order to skip running a specific backend for graphical tests, use --carb-no-vulkan or --carb-no-d3d12. +test.unit.exe --carb-no-vulkan" + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/testing_exts_python.md b/testing_exts_python.md new file mode 100644 index 0000000000000000000000000000000000000000..817732657a2038de3fc442fc5a941903e7015afb --- /dev/null +++ b/testing_exts_python.md @@ -0,0 +1,416 @@ + + +Testing Extensions with Python — kit-manual 105.1 documentation + +kit-manual + + » +Testing Extensions with Python + +  + +# Testing Extensions with Python + +This guide covers the practical part of testing extensions with Python. Both for extensions developed in the kit repo and outside. +For information on testing extensions with C++ / doctest, look here, although there is some overlap, because it can be preferable to test C++ code from python bindings. +The Kit Sdk includes the omni.kit.test extension and a set of build scripts (in premake5-public.lua file) to run extension tests. +It supports two types of testing: +* python tests (unittest with async/await support) +* c++ tests (doctest) +It is generally preferred to test C++ code from python using bindings where feasible. In this way, the bindings are also tested, and that promotes writing bindings to your C++ code. Most of this guide focuses on python tests, but there is a C++ section at the very end. + +## Adding Extension Test: Build Scripts + +If your extension’s premake5.lua file defines the extension project in usual way: +local ext = get_current_extension_info() +project_ext (ext) + +It should already have corresponding bat/sh files generated in the _build folder, e.g.: _build\windows-x86_64\release\tests-[extension_name].bat +Even if you haven’t written any actual tests, it is already useful. It is a startup/shutdown test, that verifies that all extension dependencies are correct, python imports are working, and that it can start and exit without any errors. +An empty extension test entry is already an important one. Wrong or missing dependencies are a source of many future issues. Extensions are often developed in the context of certain apps and have implicit expectations. When used in other apps they do not work. Or when the extension load order randomly changes and other extensions you implicitly depend on start to load after you. + +## How does it work? + +You can look inside Kit’s premake5-public.lua file to find the details on how it happens, follow the function project_ext(ext, args). +If you look inside that shell script, it basically runs an empty Kit + omni.kit.test + passes your extension. That will run the test system process which in turn will run another, tested process, which is basically: empty Kit + omni.kit.test + --enable [your extension]. +The test system process prints each command it uses to spawn a new process. You can copy that command and use exactly the same command for debugging purposes. +You may ask why we spawn a process, which spawns another process? And both have omni.kit.test? Many reasons: + +Test system process monitors tested process: + +It can kill it in case of timeout. +Reads return code. If != 0 indicates test failure. +Reads stdout/stderr for error messages. + +Test system process reads extension.toml of the tested extension in advance. That allows us to specify test settings, cmd args, etc. +It can run many extension tests in parallel. +It can download extensions from the registry before testing. + +omni.kit.test has separate modules for both test system process (exttests.py) and tested process (unittests.py). + +## Writing First Test + +Tested process runs with omni.kit.test which has the unittests module. It is a wrapper on top of python’s standard unittest framework. +It adds support for async/await usage in tests. Allowing test methods to be async and run for many updates/frames. For instance, a test can at any point call await omni.kit.app.get_app().next_update_async() and thus yield test code execution until next update. +All the methods in the python standard unittest can be used normally (like self.assertEqual etc). +If your extension for instance is defined: +[[python.module]] +name = "omni.foo" + +Your tests must go into the omni.foo.tests module. The testing framework will try to import tests submodule for every python module, in order to discover them. This has a few benefits: + +It only gets imported in the test run. Thus it can use test-only dependencies or run more expensive code. There is no need to depend on omni.kit.test everywhere. +It gets imported after other python modules. This way public modules can be imported and used in tests as if the tests are written externally (but still inside of an extension). In this way, the public API can be tested. + +An actual test code can look like this: +# NOTE: +# omni.kit.test - python's standard library unittest module with additional wrapping to add support for async/await tests +# For most things refer to the unittest docs: https://docs.python.org/3/library/unittest.html +import omni.kit.test + +# Import extension python module we are testing with absolute import path, as if we are an external user (i.e. a different extension) +import example.python_ext + +# Having a test class dervived from omni.kit.test.AsyncTestCase declared on the root of the module will make it auto-discoverable by omni.kit.test +class Test(omni.kit.test.AsyncTestCase): + # Before running each test + async def setUp(self): + pass + + # After running each test + async def tearDown(self): + pass + + # Actual test, notice it is an "async" function, so "await" can be used if needed + async def test_hello_public_function(self): + result = example.python_ext.some_public_function(4) + self.assertEqual(result, 256) + +All the concepts here are from the standard unittest framework. Test methods start with test_. You need to inherit a base test class, which will be created, setUp() will be called before each test, tearDown() after. Everything can be async or “sync”. + +## Test Settings + +### Test Settings: Basics + +The [[test]] section of extension.toml allows control of how to run a test process. We aim to make that configuration empty and for the defaults to be reasonable. We also strive to make tests run as close as possible to a real-usage run, making test environments the same as production. +However, you can specify which errors to ignore, what additional dependencies to bring, change the timeout, pass extra args etc. All the details are in Kit’s Extensions doc. +Below is an example, it shows how to: + +add extra arguments +add test only dependencies (extensions) +change timeout +include and exclude error messages from failing tests + + [[test]] + args = ["--/some/setting=1"] + dependencies = ["omni.kit.capture"] + timeout = 666 + stdoutFailPatterns.include = ["*[error]*", "*[fatal]*"] + stdoutFailPatterns.exclude = [ + "*Leaking graphics objects*", # Exclude graphics leaks until fixed + ] + +### Test Settings: Where to look for python tests? + +By default test system process (exttests.py) reads all [[python.module]] entries from the tested extension and searches for tests in each of them. You can override it by explicitly setting where to look for tests: +[[test]] +pythonTests.include = ["omni.foo.*"] +pythonTests.exclude = ["omni.foo.bar.*"] + +This is useful if you want to bring tests from other extensions. Especially, when testing apps. + +### Test Settings: Multiple test processes + +Each [[test]] entry is a new process. Thus by default, each extension will run one test process to run all the python tests for that extension. +When adding multiple entries they must be named to distinguish them (in artifacts, logs, etc): +[[test]] +name = "basic" +pythonTests.include = [ "omni.foo.*basic*" ] + +[[test]] +name = "other" +pythonTests.include = [ "omni.foo.*other*" ] + +To select which process to run: pass -n [wildcard], where [wildcard] is a name. * are supported: +> _build\windows-x86_64\release\tests-example.python_ext.bat -n other + +### Test Settings: Disable test on certain platform + +Any setting in extension.toml can be set per platform, using filters. Read more about them in “Extensions” doc. For example, to disable tests on Windows, the enabled setting can be overridden: +[[test]] +name = "some_test" +"filter:platform"."windows-x86_64".enabled = false + +## Running Your Test + +To run your test just call the shell script described above: _build\windows-x86_64\release\tests-[extension_name].bat. + +### Run subset of tests + +Pass -f [wildcard], where [wildcard] is a name of the test or part of the name. * are supported: +> _build\windows-x86_64\release\tests-example.python_ext.bat -f "public_function" + +### Run subset of tests using Tests Sampling + +Pass --/exts/omni.kit.test/testExtSamplingFactor=N, where N is a number between 0.0 and 1.0, 0.0 meaning no tests will be run and 1.0 all tests will run and 0.5 means 50% of tests will run. +To have this behavior on local build you need an additional parameter: --/exts/omni.kit.test/testExtSamplingContext='local' +> _build\windows-x86_64\release\tests-example.python_ext.bat --/exts/omni.kit.test/testExtSamplingFactor=0.5 --/exts/omni.kit.test/testExtSamplingContext='local' + +### Run tests from a file + +To run tests from a file use --/exts/omni.kit.test/runTestsFromFile='' with the name of the file to read. +Note: each time the tests run a playlist will be generated, useful to replay tests in a specific order or a subset of tests. +> _build\windows-x86_64\release\tests-example.python_ext.bat --/exts/omni.kit.test/runTestsFromFile='C:/dev/ov/kit/exttest_omni_foo_playlist_1.log' + +### Retry Strategy + +There are 4 supported retry strategies: + +no-retry -> run tests once +retry-on-failure -> run up to N times, stop at first success (N = testExtMaxTestRunCount) +iterations -> run tests N times (N = testExtMaxTestRunCount) +rerun-until-failure -> run up to N times, stop at first failure (N = testExtMaxTestRunCount) + +For example to retry tests up to 3 times (if a flaky test occurs) use this command: +> _build\windows-x86_64\release\tests-example.python_ext.bat --/exts/omni.kit.test/testExtRetryStrategy='retry-on-failure' --/exts/omni.kit.test/testExtMaxTestRunCount=3 + +### Developing Tests + +Pass --dev or --/exts/omni.kit.test/testExtUIMode=1. That will start a window with a list of tests instead of immediately running them. Here you can select tests to run. Change code, extension hot reloads, run again. E.g.: +> _build\windows-x86_64\release\tests-example.python_ext.bat --dev +Note that this test run environment is a bit different. Extra extensions required to render a basic UI are enabled. + +### Tests Code Coverage (Python) + +Pass --coverage. That will run your tests and produce a coverage report at the end (HTML format): +> _build\windows-x86_64\release\tests-example.python_ext.bat --coverage +The output will look like this: +Generating a Test Report... + > Coverage for example.python_ext:default is 49.8% + > Full report available here C:/dev/ov/kit/kit/_testoutput/test_report/index.html + +The HTML file will have 3 tabs. The coverage tab will display the coverage per file. Click on a filename to see the actual code coverage for that file. + +Based on the Google Code Coverage Best Practices the general guideline for extension coverage is defined as: 60% is acceptable, 75% is commendable and 90% is exemplary. +The settings to modify the Coverage behavior are found in the extension.toml file of omni.kit.test, for example pyCoverageThreshold to modify the threshold and filter flags like pyCoverageIncludeDependencies to modify the filtering. +Note: the python code coverage is done with Coverage.py. If you need to exclude code from Coverage you can consult this section. +The python code coverage is done with Coverage.py. If you need to exclude code from Coverage you can consult this section. +For example any line with a comment # pragma : no cover is excluded. If that line introduces a clause, for example, an if clause, or a function or class definition, then the entire clause is also excluded. + if example: # pragma: no cover + print("this line and the `if example:` branch will be excluded") + print("this line not excluded") + +### Debugging Coverage + +If you see strange coverage results, the easiest way to understand what is going is to modify test_coverage.py from omni.kit.test. In def startup(self) comment out the source=self._settings.filter line and also remove all items in self._coverage.config.disable_warnings. Coverage will run without any filter and will report all warnings, giving more insights. List of warnings can be seen here. + +### Disabling a python test + +Use decorators from unittest module, e.g.: + @unittest.skip("Fails on Linux now, to be fixed") # OM-12345 + async def test_create_delete(self): + ... + +### Pass extra cmd args to the test + +To pass extra arguments for debugging purposes (for permanent use [[test]] config part) there are 2 ways: + +all arguments after -- will be passed, e.g. _build\windows-x86_64\release\tests-[extension_name].bat -- -v --/app/printConfig=1 +use /exts/omni.kit.test/testExtArgs setting, e,g,: --/exts/omni.kit.test/testExtArgs/0="-v" + +### Choose an app to run tests in + +All tests run in a context of an app, which by default is an empty app: "${kit}/apps/omni.app.test_ext.kit". You can instead pass your own kit file, where you can define any extra settings. +In this kit file you can change testing environment, enable some debug settings or extensions. omni.app.test_ext_kit_sdk.kit app kit comes with a few useful settings commented. + +### Test Output + +For each test process, omni.kit.test provides a directory it can write test outputs to (logs, images, etc): +import omni.kit.test +output_dir = omni.kit.test.get_test_output_path() + +Or using test_output token: +output_dir = carb.tokens.get_tokens_interface().resolve("${test_output}") + +When running on CI this folder becomes a build artifact. + +### Python debugger + +To enable python debugger you can use omni.kit.debug.python extension. One way is to uncomment in omni.app.test_ext.kit: + # "omni.kit.debug.python" = {} + +You can use VSCode to attach a python debugger. Look into omni.kit.debug.python extension.toml for more settings, and check the FAQ section for a walkthrough. + +### Wait for the debugger to attach + +If you want to attach a debugger, you can run with the -d flag. When Kit runs with -d, it stops and wait for debugger to attach, which can also can be skipped. Since we run 2 processes, you likely want to attach to the second one - skip the first one. E.g.: +λ _build\windows-x86_64\release\tests-example.python_ext.bat -d +[omni.kit.app] Waiting for debugger to attach, press any key to skip... [pid: 19052] +[Info] [carb] Logging to file: C:/projects/extensions/kit-template/_build/windows-x86_64/release//logs/Kit/kit/103.0/kit_20211018_160436.log +Test output path: C:\projects\extensions\kit-template\_testoutput +Running 1 Extension Test(s). + +|||||||||||||||||||||||||||||| [EXTENSION TEST START: example.python_ext-0.2.1] |||||||||||||||||||||||||||||| +>>> running process: C:\projects\extensions\kit-template\_build\windows-x86_64\release\kit\kit.exe ${kit}/apps/omni.app.test_ext.kit --enable example.python_ext-0.2.1 --/log/flushStandardStreamOutput=1 --/app/name=exttest_example.python_ext-0.2.1 --/log/file='C:\projects\extensions\kit-template\_testoutput/exttest_example.python_ext-0.2.1/exttest_example.python_ext-0.2.1_2021-10-18T16-04-37.log' --/crashreporter/dumpDir='C:\projects\extensions\kit-template\_testoutput/exttest_example.python_ext-0.2.1' --/plugins/carb.profiler-cpu.plugin/saveProfile=1 --/plugins/carb.profiler-cpu.plugin/compressProfile=1 --/app/profileFromStart=1 --/plugins/carb.profiler-cpu.plugin/filePath='C:\projects\extensions\kit-template\_testoutput/exttest_example.python_ext-0.2.1/ct_exttest_example.python_ext-0.2.1_2021-10-18T16-04-37.gz' --ext-folder c:/projects/extensions/kit-template/_build/windows-x86_64/release/kit/extsPhysics --ext-folder c:/projects/extensions/kit-converters/_build/windows-x86_64/release/exts --ext-folder C:/projects/extensions/kit-template/_build/windows-x86_64/release/exts --ext-folder C:/projects/extensions/kit-template/_build/windows-x86_64/release/apps --enable omni.kit.test --/exts/omni.kit.test/runTestsAndQuit=true --/exts/omni.kit.test/includeTests/0='example.python_ext.*' --portable-root C:\projects\extensions\kit-template\_build\windows-x86_64\release\/ -d +|| [omni.kit.app] Waiting for debugger to attach, press any key to skip... [pid: 22940] + +Alternatively, pass -d directly to the second process by putting it after --: +_build\windows-x86_64\release\tests-[extension_name].bat -- -d + +### Reading Logs + +Each process writes own log file. Paths to those files are printed to stdout. You can run with -v to increase the verbosity of standard output. + +### Run from Extension Manager + +You can also run tests from UI. Run any Kit with UI, for instance omni.app.mini.kit. Go to Extension Manager, find your extension, open Tests tab. Here you can run the same tests. +It will also run a separate process and works exactly the same way as running from the shell script. + +## Marking tests as unreliable + +It is often the case that certain tests can fail randomly, with some probability. That can block CI/CD pipelines and lowers the trust into the TC state. +In that case: + +Create a ticket with Kit:UnreliableTests label +Mark a test as unreliable and leave the ticket number in the comment + +Unreliable tests do not run as part of the regular CI pipeline. They run in the separate nightly TC job. +There are 2 ways to mark a test as unreliable: + +Mark whole test process as unreliable: + +[[test]] +unreliable = true + +Mark specific python tests as unreliable: + +[[test]] +pythonTests.unreliable = [ "*test_name" ] + +## Running unreliable tests + +To run unreliable tests (and only them) pass --/exts/omni.kit.test/testExtRunUnreliableTests=1 to the test runner: +> _build\windows-x86_64\release\tests-example.python_ext.bat --/exts/omni.kit.test/testExtRunUnreliableTests=1 + +## Listing tests + +To list tests without running, pass --/exts/omni.kit.test/printTestsAndQuit=1. That will still take some time to start the tested extension. It is a limitation of the testing system that it can’t find tests without setting up python environment: +> _build\windows-x86_64\release\tests-example.python_ext.bat --/exts/omni.kit.test/printTestsAndQuit=1 +Look for lines like: +|| ======================================== +|| Printing All Tests (count: 6): +|| ======================================== +|| omni.kit.commands.tests.test_commands.TestCommands.test_callbacks +|| omni.kit.commands.tests.test_commands.TestCommands.test_command_parameters +|| omni.kit.commands.tests.test_commands.TestCommands.test_commands +|| omni.kit.commands.tests.test_commands.TestCommands.test_error +|| omni.kit.commands.tests.test_commands.TestCommands.test_group +|| omni.kit.commands.tests.test_commands.TestCommands.test_multiple_calls + +Accordingly, to list unreliable tests add --/exts/omni.kit.test/testExtRunUnreliableTests=1: +> _build\windows-x86_64\release\tests-example.python_ext.bat --/exts/omni.kit.test/testExtRunUnreliableTests=1 --/exts/omni.kit.test/printTestsAndQuit=1 + +## repo_test: Running All Tests + +To run all tests in the repo we use repo_test repo tool. Which is yet another process that runs before anything. It globs all the files according to repo.toml [repo_test] section configuration and runs them. +It is one entry point to run all sorts of tests. Different kinds of tests are grouped into suites. By default, it will run one suite, but you can select which suite to run with --suite [suite name]. Look at repo.toml for entries like [repo_test.suites.pythontests]. In that example: pythontests is a suite name. +You can also choose a build config to run tests on: -c release or -c debug. In kit the default is debug, in other repos: release. +Run all tests in the repo: +> repo.bat test +or +> repo.bat test --suite pythontests -c release +Just print them: +> repo.bat test -l +To filter tests: +> repo.bat test -f foobar +For more options (as usual): +> repo.bat test -h + +### Excluding Tests from TC: + +You can control which shell scripts to run with repo_test in repo.toml: +[[repo_test.suites.alltests.group]] +# Run all test +include = [ + "tests-*${shell_ext}" +] +exclude = [ + "tests-example.cpp_ext*", # Exclude some script +] +args = [] + +Check before running with: +> repo.bat test -l + +## Adding Info to Failed Test Summary + +If a test fails, a summary is printed to stdout that looks like so: +[fail] Extension Test failed. Details: + Cmd: kit.exe ... + Return code: 13 + Failure reasons: + Process return code: 13 != 0. + Failing tests: ['test_all (omni.example.ui.tests.example_ui_test.TestExampleUi)'] + +You can add more fields to this summary by printing special pragmas to stdout from your tests (in fact, +the Failing tests field above is done this way). For example, if you were to add the line +print("##omni.kit.test[set, foo, bah]") to the test above, then the summary would look like so: +[fail] Extension Test failed. Details: + Cmd: kit.exe ... + Return code: 13 + Failure reasons: + Process return code: 13 != 0. + Failing tests: ['test_all (omni.example.ui.tests.example_ui_test.TestExampleUi)'] + foo: bah + +Pragma operations must appear at the start of a line. They should appear on their own, and any further +pragmas on the same line will be ignored. +Available pragma operations are: + +set: Set a field. Example: ##omni.kit.test[set, foo, bah] +append: Append to a list field. Example: ##omni.kit.test[append, foo, bah] + +Note that if a pragma fails for any reason (the syntax is incorrect; you try to append to a value that +was previously set), it will be silently ignored. + +## omni.kit.ui_test: Writing UI tests + +Many extensions build various windows and widgets using omni.ui. The best way to test them is by simulating user interactions with the UI. For that omni.kit.ui_test extension can be used. +omni.kit.ui_test provides a way to query UI elements and interact with them. To start add test dependency to this extension: +[[test]] +dependencies = [ + "omni.kit.ui_test", +] + +Now you can import and use it in tests. Example: +import omni.kit.ui_test as ui_test + +async def test_button(self): + # Find a button + button = ui_test.find("Nice Window//Frame/**/Button[*]") + + # button is a reference, actual omni.ui.Widget can be accessed: + print(type(button.widget)) # + + # Click on button + await button.click()) + +Refer to omni.kit.ui_test documentation for more examples and API. + +## (Advanced) Generating new tests or adapting discovered tests at runtime + +Python unit tests are discovered at runtime. We introduced a way to adapt and/or extend the list of tests +by implementing custom omni.kit.test.AsyncTestCase class with def generate_extra_tests(self) method. +This method allows: + +changes to discovered test case by mutating self instance +generation of new test cases by returning a list of them + +In general, this method is preferred when same set of tests needs to be validated with multiple different +configurations. For example, when developing new subsystems while maintaining the old ones. + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/tokens.md b/tokens.md new file mode 100644 index 0000000000000000000000000000000000000000..eafe2b86dca05503756165439654a17f60a0984c --- /dev/null +++ b/tokens.md @@ -0,0 +1,159 @@ + + +Tokens — kit-manual 105.1 documentation + +kit-manual + + » +Tokens + +  + +# Tokens + +Kit supports tokens to make the configuration more flexible. They take the form of ${token}. They are implemented in carb.tokens Carbonite plugin. +Most of the tokens in settings are resolved when configuration is loaded. Some settings are set later and for those, it is each extension’s responsibility to resolve tokens in them. +Tokens are most often used to build various filesystem paths. List of commonly used tokens, that are always available: + +## App Tokens + +${app_name} - Application name, e.g.: Create, View, omni.create (/app/name setting, othewise name of kit file) +${app_filename} - Application kit filename, e.g.: omni.create, omni.app.mini +${app_version} - Application version, e.g.: 2022.3.0-rc.5 (/app/version setting, otherwise version in kit file) +${app_version_short} - Application major.minor version, e.g. 2022.3 (version of the app from kit file) +${kit_version} - Kit version, e.g.: 105.0+master.123.b1255276.tc +${kit_version_short} - Kit major.minor version, e.g.: 105.0 +${kit_git_hash} - Kit git hash, e.g.: b1255276 + +When running without an app, e.g. kit.exe --enable [ext], then ${app_name} becomes kit and app version equals to the kit version. + +## Environment Variable Tokens + +Tokens can be used to read environment variables: + +${env:VAR_NAME} - Environment variable, e.g.: ${env:USERPROFILE} + +## Path Tokens + +There are a few important folders that Kit provides for extensions to read and write to. While may look similar there are conceptual differences between them. +For each of them, there are a few tokens. They point to app specific and Omniverse wide versions of a folder. They also influenced by running in “portable mode” (developer mode, --portable) or not. +For some token ${folder} that represents a folder named [FOLDER NAME] it will look like this: + +${folder} - Kit app specific version: + +portable mode: [PORTABLE ROOT]/[FOLDER NAME]/Kit/${app_name}/${app_version_short}. +non-portable mode: [SYSTEM PATH]/[FOLDER NAME]/Kit/${app_name}/${app_version_short}. + +${omni_folder} - Omniverse wide version: + +portable mode: [PORTABLE ROOT]/[FOLDER NAME]. +non-portable mode: [SYSTEM PATH]/[FOLDER NAME]. + +${omni_global_folder} - Omniverse wide version, that is not influenced by portable mode: + +portable mode: [SYSTEM PATH]/[FOLDER NAME]. +non-portable mode: [SYSTEM PATH]/[FOLDER NAME]. + +### Data Folder + +Data folder is a per user system folder to store persistent data. This system folder is different for every OS user. +Data folder is where an application can write anything that must reliably persist between sessions. For example, user settings are stored there. + +${data} - kit app specific version, e.g.: C:/Users/[user]/AppData/Local/ov/data/Kit/${app_name}/${app_version_short}. +${omni_data} - Omniverse wide version, e.g.: C:/Users/[user]/AppData/Local/ov/data. +${omni_global_data} - Omniverse wide version, that is not influenced by portable mode: + +### Program data + +Program data folder is a global system folder to store persistent data. This system folder is shared by all OS users. +Otherwise it can be used the same way as data folder. + +{app_program_data} - kit app specific version, e.g.: C:/ProgramData/NVIDIA Corporation/kit/${app_name}. +{shared_program_data} - Kit wide version, e.g.: C:/ProgramData/NVIDIA Corporation/kit. +${omni_program_data} - System wide version, e.g.: C:/ProgramData + +### Documents folder + +Documents folder is a system folder to store user’s data. Typically it is like a user home directory, where user can store anything. For example, default location when picking where to save a stage. + +${app_documents} - kit app specific version, e.g.: C:/Users/[user]/Documents/Kit/apps/${app_name}. +${shared_documents} - kit wide version, e.g.: C:/Users/[user]/Documents/Kit/shared. +${omni_documents} - Omniverse wide version, e.g.: C:/Users/[user]/Documents/Kit. + +### Cache folder + +Cache folder is a system folder to be used for caching. It can be cleaned up between runs (usually it is not). And application should be able to rebuild the cache if it is missing. +This one is using Kit version and git hash. So, always shared between apps. You can build app specific version manually using tokens like ${app_name}. + +[KIT VERSION SHORT] - Kit major.minor version, like 105.0 +[KIT GIT HASH] - Kit git hash, like a1b2c4d4 +${cache} - kit specific version, e.g.: C:/Users/[user]/AppData/Local/ov/cache/Kit/[KIT VERSION SHORT]/[KIT GIT HASH]. +${omni_cache} - Omniverse wide version, e.g.: C:/Users/[user]/AppData/Local/ov/cache. +${omni_global_cache} - Omniverse wide version, that is not influenced by portable mode. + +### Logs folder + +System folder to store logs. + +${logs} - kit app specific version, e.g.: C:/Users/[user]/.nvidia-omniverse/logs/Kit/${app_name}/${app_version_short} +${omni_logs} - Omniverse wide version, e.g.: C:/Users/[user]/.nvidia-omniverse/logs +${omni_global_logs} - Omniverse wide version, that is not influenced by portable mode: + +### Config folder + +System folder where Omniverse config omniverse.toml is read from: + +${omni_config} - Omniverse wide version, e.g.: C:/Users/[user]/.nvidia-omniverse/config +${omni_global_config} - Omniverse wide version, that is not influenced by portable mode: + +### Temporary folder + +Temporary folder is cleaned between runs and provided by OS. + +${temp} - e.g.: C:/Users/[user]/AppData/Local/Temp/xplw.0 + +### Other useful paths + +${kit} - path to Kit folder, where the Kit executable is (it is not always the same executable as was used to run currently, because someone could run from python.exe). +${app} - path to app, if loaded with --merge-config that will be a folder where this config is. +${python} - path to python interpreter executable. + +### Platform tokens + +${config} - whether debug or release build is running. +${platform} - target platform Kit is running on, e.g. windows-x86_64. +${lib_ext} - .dll on Windows, .so on Linux, .dylib on Mac OS. +${lib_prefix} - empty on Windows, lib on Linux and Mac OS. +${bindings_ext} - .pyd on Windows, .so on Linux and Mac OS. +${exe_ext} - .exe on Windows, empty on Linux and Mac OS. +${shell_ext} - .bat on Windows, .sh on Linux and Mac OS. + +### Extension tokens + +Each extension sets a token with the extension name and extension folder path. See Extension Tokens. + +## Overriding Tokens + +Some tokens can be overridden by using /app/tokens setting namespace. E.g.: --/app/tokens/data="C:/data". + +## Checking Token Values + +Kit logs all tokens in INFO log level, search for Tokens:. Either look in a log file or run with -v. +You can also print all tokens using settings: +import carb.settings +settings = carb.settings.get_settings() +print(settings.get("/app/tokens")) + +## Resolving your path + +To make your path (or string) support tokens you must resolve it before using it, like this: +path = carb::tokens::resolveString(carb::getCachedInterface(), path); + +import carb.tokens +path = carb.tokens.get_tokens_interface().resolve(path) + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/tutorial.md b/tutorial.md new file mode 100644 index 0000000000000000000000000000000000000000..c7f113749308507cc63b35711b7691b67b739c92 --- /dev/null +++ b/tutorial.md @@ -0,0 +1,525 @@ + + +Omni Asset Validator (Tutorial) — asset-validator 0.6.2 documentation + +asset-validator + + » +Omni Asset Validator (Tutorial) + +  + +# Omni Asset Validator (Tutorial) + +## Introduction + +Omniverse Asset Validator is an extensible framework to validate USD. +Initially inspired from Pixar Compliance Checker, +extends upon these ideas and adds more validation rules applicable throughout Omniverse, as well as adding the ability +to automatically fix issues. +Currently, there are two main components: + +Omni Asset Validator (Core): Core components for Validation engine. Feel free to use this component to +implement programmatic functionality or extend Core functionality through its framework. +Omni Asset Validator (UI): Convenient UI for Omniverse. +Used for daily tasks with Omniverse tools as Create. + +The following tutorial will help you to: + +Run basic operations for Asset Validator, ValidationEngine and IssueFixer. +Get familiar with existing Rules to diagnose and fix problems. +Create your custom Rules. + +## Tutorials + +### Testing assets + +In order to run Asset Validator, we need to enable the extension Omni asset validator (Core). Optionally we can also +enable Omni asset validator (UI) to perform similar operations using the user interface. Through this tutorial we will +use Script Editor, enable it under the Window menu. +The following tutorial uses the file BASIC_TUTORIAL_PATH which is bundled together with omni.asset_validator.core. +We can see its contents with the following snippet: +import omni.asset_validator.core +from pxr import Usd + +stage = Usd.Stage.Open(omni.asset_validator.core.BASIC_TUTORIAL_PATH) +print(stage.ExportToString()) + +The contents should be equivalent to: +#usda 1.0 +( + doc="""Generated from Composed Stage of root layer C:\\some\\location\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial.usda""" +) + +def Xform "Hello" +{ + def Sphere "World" + { + } +} + +To run a simple asset validation, with Script Editor execute the following code. +import omni.asset_validator.core + +engine = omni.asset_validator.core.ValidationEngine() +print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) + +Note +For more information about ValidationEngine together with more examples can be found at the ValidationEngine API. + +The above code would produce similar results to. +Results( + asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", + issues=[ + Issue( + message="Stage does not specify an upAxis.", + severity=IssueSeverity.FAILURE, + rule=StageMetadataChecker, + at=None, + suggestion=None + ), + Issue( + message="Stage does not specify its linear scale in metersPerUnit.", + severity=IssueSeverity.FAILURE, + rule=StageMetadataChecker, + at=None, + suggestion=None + ), + Issue( + message="Stage has missing or invalid defaultPrim.", + severity=IssueSeverity.FAILURE, + rule=StageMetadataChecker, + at=None, + suggestion=None + ), + Issue( + message="Stage has missing or invalid defaultPrim.", + severity=IssueSeverity.FAILURE, + rule=OmniDefaultPrimChecker, + at=StageId( + identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" + ), + suggestion=Suggestion( + callable=UpdateDefaultPrim, + message="Updates the default prim" + ) + ) + ] +) + +The main result of validation engine is called an Issue. The main task of Asset validation is to detect and fix issues. +An Issue has important information on how to achieve both tasks. + +Detect. Once an issue has been found it offers a description of the problem (through a human-readable message), its +severity, the Rule that found the issue and its location (i.e. the Usd.Prim). +Fix. If a suggestion is available, it will help to address the Issue found. Information on the Rule and the location +of the issue will be used to address it. + +In the following section we will walk you through on how to identify and fix issues. + +Note +For more information see the Issue API. + +### Understanding Rules + +Omni asset validator (Core) ships with multiple rules, in the previous example we already covered two: + +StageMetadataChecker: All stages should declare their upAxis and metersPerUnit. +Stages that can be consumed as referencable assets should furthermore have +a valid defaultPrim declared, and stages meant for consumer-level packaging +should always have upAxis set to Y. +OmniDefaultPrimChecker: Omniverse requires a single, active, Xformable root prim, +also set to the layer’s defaultPrim. + +Refer to Rules for the rest of rules. In the previous example when calling ValidationEngine we invoked +all rules available. ValidationRulesRegistry has a registry of all rules to be used by ValidationEngine. +import omni.asset_validator.core + +for category in omni.asset_validator.core.ValidationRulesRegistry.categories(): + for rule in omni.asset_validator.core.ValidationRulesRegistry.rules(category=category): + print(rule.__name__) + +If we want to have finer control of what we can execute, we can also specify which rules to run, for example: +import omni.asset_validator.core + +engine = omni.asset_validator.core.ValidationEngine(initRules=False) +engine.enableRule(omni.asset_validator.core.OmniDefaultPrimChecker) +print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) + +There are two new elements present here: + +initRules: By default set to true. if set to false, no rules will be automatically loaded. +enableRule: A method of ValidationEngine to add rules. + +The above would produce the following result: +Results( + asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", + issues=[ + Issue( + message="Stage has missing or invalid defaultPrim.", + severity=IssueSeverity.FAILURE, + rule=OmniDefaultPrimChecker, + at=StageId( + identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" + ), + suggestion=Suggestion( + callable=UpdateDefaultPrim, + message="Updates the default prim" + ) + ) + ] +) + +In this particular case, OmniDefaultPrimChecker has implemented a suggestion for this specific issue. The second important class in Core +we want to cover is IssueFixer, the way to invoke it is quite straightforward. +import omni.asset_validator.core + +fixer = omni.asset_validator.core.IssueFixer(asset=omni.asset_validator.core.BASIC_TUTORIAL_PATH) +fixer.fix([]) + +fixer.fix will receive the list of issues that should be addressed. The list of issues to address can be accessed through issues method in Results class. + +Note +For more information about IssueFixer see IssueFixer API. + +By combining the previous two examples we can now, detect and fix issues for a specific rule. +import omni.asset_validator.core + +# Detect issues +engine = omni.asset_validator.core.ValidationEngine(initRules=False) +engine.enableRule(omni.asset_validator.core.OmniDefaultPrimChecker) +result = engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH) + +# Fix issues +fixer = omni.asset_validator.core.IssueFixer(asset=omni.asset_validator.core.BASIC_TUTORIAL_PATH) +fixer.fix(result.issues()) + +Warning +In this tutorial we do temporary changes. To persist your changes uses fixer.save(). + +If we inspect the file BASIC_TUTORIAL_PATH: +import omni.asset_validator.core +from pxr import Usd + +stage = Usd.Stage.Open(omni.asset_validator.core.BASIC_TUTORIAL_PATH) +print(stage.ExportToString()) + +We can find the issue reported by OmniDefaultPrimChecker is fixed: +#usda 1.0 +( + defaultPrim="Hello" + doc="""Generated from Composed Stage of root layer C:\\some\\location\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial.usda""" +) + +def Xform "Hello" +{ + def Sphere "World" + { + } +} + +Note +Try to repeat the same steps using the UI. + +### Custom Rule: Detection + +If the shipped rules are not enough for your needs you can also implement your own rule. +ValidationEngine allows to be extensible, by levering users to add its own rules. +To add a new rule extend from BaseRuleChecker. The most simple code to achieve this is as follows: +import omni.asset_validator.core +from pxr import Usd + +class MyRule(omni.asset_validator.core.BaseRuleChecker): + + def CheckPrim(self, prim: Usd.Prim) -> None: + pass + +engine = omni.asset_validator.core.ValidationEngine(initRules=False) +engine.enableRule(MyRule) +print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) + +We can see our method CheckPrim being invoked for every Prim. However, our output is empty because CheckPrim has not notified of any issues. +Results( + asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", + issues=[ + + ] +) + +Note +CheckPrim is not the only method available, see more at BaseRuleChecker API. + +To add a bit of logic we can change our class to report a single failure when we encounter the prim whose path is /Hello/World: +import omni.asset_validator.core +from pxr import Usd + +class MyRule(omni.asset_validator.core.BaseRuleChecker): + + def CheckPrim(self, prim: Usd.Prim) -> None: + if prim.GetPath() == "/Hello/World": + self._AddFailedCheck( + message="Goodbye!", + at=prim, + ) + +engine = omni.asset_validator.core.ValidationEngine(initRules=False) +engine.enableRule(MyRule) +print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) + +There are three levels of issues: + +Errors: Errors are used to notify user that something unexpected happened that would not let the Rule run (i.e. File not found error). Added through the method _AddError. +Warnings: Warnings are used to notify users that though correct data is found it could cause a potential problem. Added through the method _AddWarning. +Failures: The most common way to report an Issue in Asset Validation. This can be done through _AddFailedCheck as seen in the example above. + +Above code will generate: +Results( + asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", + issues=[ + Issue( + message="Goodbye!", + severity=IssueSeverity.FAILURE, + rule=MyRule, + at=PrimId( + stage_ref=StageId( + identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" + ), + path="/Hello/World" + ), + suggestion=None + ) + ] +) + +With our Rule implemented the next step is to propose a suggestion to fix it. + +### Custom Rule: Fix + +The fixing interface requires to implement a Suggestion. A Suggestion will take as parameters: + +Stage: The original stage where the issue was found. +Location: The location defined in the Issue (i.e. the at attribute). This will help us to scope down our fix. + +import omni.asset_validator.core +from pxr import Usd + +class MyRule(omni.asset_validator.core.BaseRuleChecker): + + def Callable(self, stage: Usd.Stage, location: Usd.Prim) -> None: + raise NotImplementedError() + + def CheckPrim(self, prim: Usd.Prim) -> None: + if prim.GetPath() == "/Hello/World": + self._AddFailedCheck( + message="Goodbye!", + at=prim, + suggestion=omni.asset_validator.core.Suggestion( + message="Avoids saying goodbye!", + callable=self.Callable, + ) + ) + +engine = omni.asset_validator.core.ValidationEngine(initRules=False) +engine.enableRule(MyRule) +print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) + +It will now produce the following output. +Results( + asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", + issues=[ + Issue( + message="Goodbye!", + severity=IssueSeverity.FAILURE, + rule=MyRule, + at=PrimId( + stage_ref=StageId( + identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" + ), + path="/Hello/World" + ), + suggestion=Suggestion( + callable=Callable, + message="Avoids saying goodbye!" + ) + ) + ] +) + +As we can see we have now a suggestion with a description and a method to invoke. The full example will be: +import omni.asset_validator.core +from pxr import Usd + +class MyRule(omni.asset_validator.core.BaseRuleChecker): + + def Callable(self, stage: Usd.Stage, location: Usd.Prim) -> None: + raise NotImplementedError() + + def CheckPrim(self, prim: Usd.Prim) -> None: + if prim.GetPath() == "/Hello/World": + self._AddFailedCheck( + message="Goodbye!", + at=prim, + suggestion=omni.asset_validator.core.Suggestion( + message="Avoids saying goodbye!", + callable=self.Callable, + ) + ) + +engine = omni.asset_validator.core.ValidationEngine(initRules=False) +engine.enableRule(MyRule) +result = engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH) + +fixer = omni.asset_validator.core.IssueFixer(asset=omni.asset_validator.core.BASIC_TUTORIAL_PATH) +result = fixer.fix(result.issues()) +print(result) + +Notice how the NotImplementedError error was not thrown during fixer.fix. However, we can access the result of +execution by inspecting result: +[ + FixResult( + issue=Issue( + message='Goodbye!', + severity=FAILURE, + rule=, + at=PrimId( + stage_ref=StageId(identifier='C:\\sources\\asset-validator\\_build\\windows-x86_64\\release\\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial.usda'), + path='/Hello/World' + ), + suggestion=Suggestion(callable=Callable, message='Avoids saying goodbye!') + ), + status=FAILURE, + exception=NotImplementedError() + ) +] + +Finally, if you decide to run your custom Rule with the rest of the rules, it may be useful to register it in +ValidationRulesRegistry, this can be done using registerRule. +import omni.asset_validator.core +from pxr import Usd + +@omni.asset_validator.core.registerRule("MyCategory") +class MyRule(omni.asset_validator.core.BaseRuleChecker): + + def CheckPrim(self, prim: Usd.Prim) -> None: + pass + +for rule in omni.asset_validator.core.ValidationRulesRegistry.rules(category="MyCategory"): + print(rule.__name__) + +### Custom Rule: Locations + +For this section, let us use LAYERS_TUTORIAL_PATH. We proceed like in the previous section: +import omni.asset_validator.core +from pxr import Usd + +stage = Usd.Stage.Open(omni.asset_validator.core.LAYERS_TUTORIAL_PATH) +print(stage.ExportToString()) + +The contents should be equivalent to: +#usda 1.0 +( + doc="""Generated from Composed Stage of root layer C:\\some\\location\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial2.usda""" +) + +def Xform "Hello" +{ + def Sphere "World" + { + double3 xformOp:translate = (-250, 0, 0) + uniform token[] xformOpOrder = ["xformOp:translate"] + } +} + +What we are doing is adding an opinion to the prim “/Hello/World”. In the previous section we learned how to create a Rule and issue a Failure. +The data model is similar to the following code snippet: +from pxr import Usd +import omni.asset_validator.core + +# We open the stage +stage = Usd.Stage.Open(omni.asset_validator.core.LAYERS_TUTORIAL_PATH) + +# We inspect a specific prim +prim = stage.GetPrimAtPath("/Hello/World") + +# We create the data model for the issue +def Callable(stage: Usd.Stage, location: Usd.Prim) -> None: + raise NotImplementedError() + +issue = omni.asset_validator.core.Issue( + message="Goodbye!", + at=prim, + severity= omni.asset_validator.core.IssueSeverity.FAILURE, + suggestion=omni.asset_validator.core.Suggestion( + message="Avoids saying goodbye!", + callable=Callable + ), +) + +# Inspect the fixing points for the suggestion +for fix_at in issue.all_fix_sites: + layer_id = fix_at.layer_id + path = fix_at.path + print(layer_id, path) + +The output of the above snippet should show first the path of layers tutorial (i.e. LAYERS_TUTORIAL_PATH) and second the basic tutorial (i.e. BASIC_TUTORIAL_PATH). +While this may be correct for above issue, different issues may need to override this information. +Every issue, has associated fixing sites (i.e. property all_fix_sites). The fixing sites are all places that contribute opinions to the prim from strongest to +weakest order. When no layer is provided to fix, by default will be the strongest. If no indicated (as above) the preferred site will be the Root layer. +To change the preferred site to fix, we can add the at attribute to Suggestion. +from pxr import Usd, Sdf +import omni.asset_validator.core + +# We open the stage +stage = Usd.Stage.Open(omni.asset_validator.core.LAYERS_TUTORIAL_PATH) + +# We inspect a specific prim +prim = stage.GetPrimAtPath("/Hello/World") + +# We create the data model for the issue +def Callable(stage: Usd.Stage, location: Usd.Prim) -> None: + raise NotImplementedError() + +issue = omni.asset_validator.core.Issue( + message="Goodbye!", + at=prim, + severity= omni.asset_validator.core.IssueSeverity.FAILURE, + suggestion=omni.asset_validator.core.Suggestion( + message="Avoids saying goodbye!", + callable=Callable, + at=[Sdf.Layer.FindOrOpen(omni.asset_validator.core.BASIC_TUTORIAL_PATH)] + ), +) + +# Inspect the fixing points for the suggestion +for fix_at in issue.all_fix_sites: + layer_id = fix_at.layer_id + path = fix_at.path + print(layer_id, path) + +The output will change the order now, and you should see basic tutorial path first (i.e. BASIC_TUTORIAL_PATH). +The previous tutorial should have helped you to: + +Create a custom Rule, generating an error and a suggestion to fix it. +Run ValidationEngine with a specific rule. +Run IssueFixer to fix specific issues and review the response. + +### Frequently Asked Questions + +Are there any guards to make sure fixes are still relevant / don’t collide? +In our general practice we have noticed: + +Fixing an issue may solve another issue. If a consecutive suggestion may fail to be applied, we just keep the +exception in FixResult and continue execution. You will then decide the steps to take with FixResult. +Fixing an issue may generate another issue. For the second case it is recommended to run ValidationEngine again, +to discover those cases. Think of it as an iterative process with help of an automated tool. + +Are fixes addressed in the root layer? strongest layer? +Currently, some Issues would perform the suggestion on the strongest layer, while many on the root layer. We are +working into offer flexibility to decide in which layer aim the changes, while also offering a default layer for +automated workflows. + +© Copyright 2021-2023, NVIDIA. + Last updated on Jun 20, 2023. + + + diff --git a/ui.md b/ui.md new file mode 100644 index 0000000000000000000000000000000000000000..360b7acd5e735353d72c42b13b32dc4c1e70934c --- /dev/null +++ b/ui.md @@ -0,0 +1,193 @@ + + +Omni Asset Validator (UI) — asset-validator 0.6.2 documentation + +asset-validator + + » +Omni Asset Validator (UI) + +  + +# Omni Asset Validator (UI) + +Kit UIs for validating assets against Omniverse specific rules to ensure they run smoothly across Omniverse products. +It includes the following components: + +An Asset Validator Window to select rules and run validation on individual USD layer files, recursively search a folder for layer files and validate them all, or validate a live / in-memory Usd.Stage, such as the main stage in OV Create or other USD based applications. +Content Browser context menus to launch the Asset Validator Window preset to the selected file/folder. +Layer Window context menus to launch the Asset Validator Window preset to either the in-memory layer or the selected layer’s file URI. +Stage Window context menus to launch the Asset Validator Window preset to the currently open stage (e.g the main stage of the application). + +## Launching the Asset Validator Window + +In the main menu of any Kit based application (e.g. Create, View) you will find a Window > Asset Validator submenu. Click this menu item to open or close the Asset Validator Window. The window state will be preserved, so do not worry about losing your settings. For other ways to launch the Asset Validator Window, see Launching from other Windows. + +# +Option +Description + +1 +Asset Mode Selector +Switches between URI Mode and Stage Mode. See Choosing your Asset Mode for more details. + +2 +Asset Description +Describes the selected Asset. In URI Mode this should be the fully qualified URI. In Stage Mode it will be an automated message. + +3 +Asset URI Browser Button +Click the button to launch a File Picker and select any USD layer or folder. Only available in URI Mode. + +4 +Enable/Disable Rules Buttons +These buttons toggle all Rules or the Rules within each category. + +5 +Rule Checkboxes +These checkboxes will enable/disable individual Rules. + +6 +Rule Labels +Hover on the labels to reveal a tooltip description for each Rule. + +7 +Analyze Asset Validation Button +Click this to analyze the current asset with the enabled Rules. + +8 +Fix errors on Selected +Click this to run the validation using the current Asset & enabled Rules. + +9 +Clear Results +Clears out the information produced when analyzing or fixing errors. + +## Choosing your Asset Mode + +The Asset Validator Window operates in 2 distinct modes, called Asset Modes. + +URI Mode operates on an Omniverse URI, including files & folders on you local disk, networked drives, nucleus servers, or any other protocol supported by Omniverse (e.g. https). +Stage Mode operates on a live / in-memory Usd.Stage. This can be the main stage of an Omniverse application like Create or View, or any other stage in memory within the application (e.g. a bespoke stage authored in the Script Editor). + +Once the window has been launched, you can freely switch between these modes using the dropdown menu at the top left corner. Your asset and rule selections will be preserved when you switch modes, so do not worry about losing your place. +By default, the window opens in URI Mode (1): + +To locate an Asset URI, use the Asset URI Browser Button (2) or paste a link into the Asset Description (3). In this mode, the description must be the fully qualified URI of the Asset (e.g. omniverse://localhost/NVIDIA/Samples/Astronaut/Astronaut.usd). +Alternatively, you can switch to Stage Mode (1), which is preset to validate the main stage of the application (2): + +Caution +Using Stage Mode on the main stage is a live operation that will temporarily alter the main stage. Any edits will occur on a bespoke session sublayer, which requires switching the authoring layer temporarily. It will not alter your actual layers, so you don’t need to save or lock the layers first, and the authoring layer will be restored when the validation completes. + +## Validating the selected Asset + +Regardless of which Asset Mode you have chosen, you will be presented with a list of pre-defined validation rules, organized by category, which has been configured based on the extensions you have loaded and the particular app you are running. If you would like to configure this further, see the section below called Configuring Rules with Carbonite Settings. + +### Enabling and Disabling Rules + +You are free to enable/disable any of the individual rules using the checkboxes (1), or you may use the Enable/Disable Rules Buttons (2) to do this in-bulk or per-category. If you want to reset the rules to their default state, use the Reset Default Rules Button (3). + +Tip + +While the rule names may seem a bit cryptic, the tooltips help to explain the reasoning behind each rule. + +### Running the Validator + +When you are ready, press the “Analyze Asset Validation” button at the bottom of the window (1): + +Caution +There may be a brief pause while the system contacts the appropriate server, particularly if you have not interacted with this file or folder recently. + +The Asset Validator Window will now advance to an in-progress results listing of individual assets. This may initially be a blank page, but as each asset is located by the Omni Client Library, a new section will appear with a grey Waiting status. + +Tip + +These sections are clickable and will expand to show you more details. + +### Reviewing Results + +As validation of each asset completes, the relevant section will update to one of the following statuses: + +Valid : Assets that pass all rules without issue will be blue with a check-mark icon. +Failure : Assets that failed or errored on any of the validation rules will be marked in red. +Warning : Assets that generated no failures may have still generated warnings and will be marked in yellow. + +Regardless of status, you can hover on the section header for a quick summary (1): + +Or click the section header for detailed reports of each issue (1). There may be many issues, as some rules run per-prim-per-variant: + +#### Copying Issues + +To generate a report we have added a simple functionality of Copy Output. Just select the issues or assets you are interested and click on the (1) Copy Output button. This will put in your clipboard the contents of the selected issues in a human readable format. You can also (2) Save Outputto a .csv file. + +#### Fixing Issues + +Asset validation includes new functionality to fix issues. Issues that have suggestions can make use of Fix errors on Selected. +Just select the issue(s) you are interested to fix and select the corresponding action. +Fix errors on Selected will perform the fix. Once the scene is fixed, you can save your changes by saving the scene. + +Some issues may offer multiple locations to fix (ComboBox at At). Asset validation would offer a default option, but you can choose the one that suits you better. + +Note +Repeated validation of the same asset will be substantially quicker. Any interaction with servers should be cached and the stage itself may still be in-memory. + +## Launching from other Windows + +### Using the Content Browser + +You may have already located your USD layer file or folder in the Content Browser. For convenience, you can right click on any USD layer file and select “Validate USD” from the context menu: + +Doing the same on a folder will provide a context menu entry called “Search for USD files and Validate”: + +Clicking either of these will not run a validation directly, it will instead launch the Asset Validator Window, preset to URI Mode and pointing to the file or folder that you just specified in the Content Browser. + +### Using the Layer Window + +If you want to validate layers that you already have open, begin in the Layer Window. Right clicking on any layer (except session layers) will provide related context menus. Clicking any of the related menu entires will not run a validation directly, but will instead launch the Asset Validator Window, preset to either URI Mode or Stage Mode, and pointing to the asset you requested to validate. + +Layers will provide either “Validate Layer (w/unsaved changes)” (1) or “Validate Layer (in-memory)” entires, depending if there are currently unsaved changes to the layer. Both of these “live” options will operate in Stage Mode, on a bespoke stage containing only that layer and its sublayers: + +Important +Any edits will occur on a session sublayer, so neither option will save or alter the layer you have selected. You don’t need to lock the layer first. + +Layers that are associated with a file (i.e are not anonymous) will also provide an entry called “Validate Layer (from file)”. Use this entry to operate in URI Mode on the file, ignoring any changes you have made in the application: + +### Using the Stage Window + +If you want to validate the application’s main stage (i.e. the entire layer stack), begin in the Stage Window. Right clicking on the empty space (with no prims selected) will provide a context menu entry called “Validate Stage” (1): + +Clicking this will not run a validation directly, it will instead launch the Asset Validator Window, preset to Stage Mode and pointing to the same live Usd.Stage that you are currently authoring: + +Caution +This is a live operation that will temporarily alter the main stage. Any edits will occur on a bespoke session sublayer, which requires switching the authoring layer temporarily. It will not alter your actual layers, so you don’t need to save or lock the layers first, and the authoring layer will be restored when the validation completes. + +## Configuring Rules with Carbonite Settings + +As with many Omniverse tools, the Asset Validator Window is configurable at runtime using Carbonite settings. The following Asset Validator Window settings work in concert with the omni.asset_validator.core settings to hide rules that may not be of use in a particular app, company, or team. Any rules hidden from the UI via these settings will not be used during validation runs initiated from the Asset Validator Window nor the omni.asset_validator.ui Python API. + +### Settings + +hideDisabledCategories can be used to exclude rules in the UI based on the enabledCategories/disabledCategories settings in omni.asset_validator.core +hideDisabledRules can be used to exclude rules in the UI based on the enabledRules/disabledRules settings in omni.asset_validator.core + +## API and Changelog + +We provide a public Python API for controlling the Asset Validation Window. Client code is able to: + +Show and hide the window. +Change Asset Mode and set the selected URI or Stage (including bespoke in-memory stages authored at runtime by the client). +Enable and disable individual rules (e.g. click the checkboxes). +Initiate validation runs (e.g. click the run button) and await the results. + +Results will be both displayed in the UI and returned by the coroutine. + +Reset the window back to the selection page (e.g. click the back button) or reset to the default state. + +Python API +Changelog + +© Copyright 2021-2023, NVIDIA. + Last updated on Jun 20, 2023. + + + diff --git a/uninstall_apps.md b/uninstall_apps.md new file mode 100644 index 0000000000000000000000000000000000000000..1fb54cff01c7d20bee6c86c0b5b9e46fd5eaa76c --- /dev/null +++ b/uninstall_apps.md @@ -0,0 +1,64 @@ + + +Uninstalling Apps (Win & Linux) — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +Installation Guide » +Uninstalling Apps (Win & Linux) + +  + +# Uninstalling Apps (Win & Linux) + +Uninstalling Applications Guide for Windows & Linux +There are two methods to uninstall Omniverse applications within the IT Managed Launcher. + +Users can directly uninstall Omniverse applications from within the Launcher (no IT Manager required) +IT Managers can uninstall Omniverse applications using a command line argument. + +Uninstalling from within the IT Managed Launcher is very quick and straightforward. +1) Select the small Hamburger Menu icon next to the installed Omniverse Application and choose Settings. + +2) From the resulting floating dialog, choose the version of the application you want to remove and click Uninstall. + +Note +If you have multiple versions of the same Omniverse application installed, you can remove any of them without disturbing the other versions. + +To uninstall applications using the Custom Protocol URL is designed for IT Managers and Systems Administrators to use. In this case, you’ll need to identify the application by name as well as its version number since a user can have multiple versions of the same application installed on their workstation. +Like the install command, uninstalling adheres to the following base structure: +omniverse-launcher://uninstall?slug=^&version= +To find the slug and version information needed to run this command, do the following: +1) Go to the Omniverse Enterprise Web Portal. +2) Within the Apps section, find the Omniverse foundation application that is installed on a local workstation and select its tile. + +3) Look at the URL in the browser bar of that tile and at the end, you’ll see the application name. + +This application name represents the slug for the uninstall process. + +Note +Pay attention to any underscores or other characters in the application name as those will be required for the slug name. In the example above, the name usd_explorer is the correct name for the slug parameter. + +4) Next, within the IT Managed Launcher, go to the Library tab and look at the version number listed beneath the Launch button. This indicates the version you should refer to in the uninstall command. + +Once you have both pieces of information, you can invoke the command as follows. +WINDOWS: + +DOS Command: start ominverse-launcher://uninstall?slug=usd_explorer^&version=2023.2.0 + +Note +Notice the ‘^’ character before the ‘&’ character. This is needed for DOS, otherwise it will be interpreted as new window popup + +PowerShell: "start ominverse-launcher://uninstall?slug=usd_explorer&version=2023.2.0" + +LINUX: +xdg-open "omniverse-launcher://uninstall?slug=usd_explorer&version=2023.2.0" +Once the command is triggered, the selected Omniverse application will be uninstalled from the IT Managed Launcher. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/using_pip_packages.md b/using_pip_packages.md new file mode 100644 index 0000000000000000000000000000000000000000..f41dc304d15bad9977b599637811b3884d204348 --- /dev/null +++ b/using_pip_packages.md @@ -0,0 +1,104 @@ + + +Using Python pip Packages — kit-manual 105.1 documentation + +kit-manual + + » +Using Python pip Packages + +  + +# Using Python pip Packages + +There are 2 ways to use python pip packages in extensions: + +Install them at runtime and use them right away. +Install them at build-time and pre-package into another extension. + +## Runtime installation using omni.kit.pipapi + +Installing at runtime is probably the most convenient way to quickly prototype and play around with tools. The omni.kit.pipapi extension conveniently wraps pip (which is already included into python by default) and provides an API to install pip packages. You just have to declare a dependency on this extension, and call the omni.kit.pipapi.install("package_name")() function. Right after this line, you can import and start using the installed package. +# Package name and module can be different (although rarely is in practice): +import omni.kit.pipapi +omni.kit.pipapi.install("Pillow", module="PIL") +import PIL + +However installing at runtime has a couple of downsides: + +Can be slow. Usually it ends up blocking the process, waiting for the download and installation upon first startup. +Requires internet access and pip index availability. +Has security and licensing implications. + +Even if the version is locked, which should always be the case, the package can still become unavailable at some point, or the content could change. It opens up the opportunity for certain types of attacks, and from a legal perspective we can’t ship any extensions/apps that perform a pip installation at runtime. The end-user can decide to write, test, and execute such code, but it shouldn’t come from NVIDIA. + +## Build-time installation using repo_build + +The recommended way to install pip packages is at build time, and to embed it into an extension. For most packages, it is as simple as installing it into a folder inside an extension. As long it is added to the sys.path, python can import it. Sometimes, packages require certain shared libraries or other system software, which goes out of the scope of this guide and had to be dealt on case by case basis. +We also provide tooling to simplify the process of build time package installation. The repo_build tool, when run, can process special config file(s). By default: deps/pip.toml. Here you can specify a list of packages to install and a target folder: +[[dependency]] +packages = [ + "watchdog==0.10.4", # SWIPAT filed under: http://nvbugs/123456 +] +target = "../_build/target-deps/pip_prebundle" + +The version must be specified (locked). +The repo_build tool performs an installation only once. It then hashes the whole config file and uploads the installed packages into packman. On the next launch, it will download the uploaded package from packman, instead of using the pip index. This is much faster and removes the necessity of vendoring dependencies. The build also won’t depend on the availability of the pip index. +Then, this folder where packages were installed into is linked (or copied) into an extension. The only reason we don’t install it directly into the extension target folder is because debug and release configurations can share the same pip packages. It is convenient to install it once and link the folder into both build flavors. Linking the folder is done in the premake5.lua file of an extension. +-- Include pip packages installed at build time +repo_build.prebuild_link { + { "%{root}/_build/target-deps/pip_prebundle", ext.target_dir.."/pip_prebundle" }, +} + +Also, after installation, repo_build gathers up pip package license information (including N-order dependencies) into the gather_licenses_path. They must be included into an extension too, for legal reasons. +After the build, you can make sure that everything looks correct by looking into the extension target folder, e.g.: _build/$platform/$config/exts/example.mixed_ext/pip_prebundle . +Finally, in the extension.toml, we need to make sure that this folder is added to sys.path. +# Demonstrate how to add another folder to sys.path. Here we add pip packages installed at build time. +[[python.module]] +path = "pip_prebundle" + +When the extension starts, it adds all [[python.module]] entries with their path relative to extension root to the sys.path. The order of those entries can be important if you have other code in the extension that for instance performs an import watchdog. +All the extensions that are loaded as dependees can also make use of those packages as well. This way one extension can bring several pip packages for other extensions to use. They just need to add a dependency on the package providing them. + +## pip packages included in Kit: omni.kit.pip_archive + +Exactly as described above, Kit comes with the omni.kit.pip_archive extension that includes many commonly used packages, like numpy or PIL. To use them just add dependency: +[dependecies] +"omni.kit.pip_archive" = {} + +The Kit repo serves as another great example of this setup. + +## Code Examples + +### Install pip package at runtime + +# PIP/Install pip package + +# omni.kit.pipapi extension is required +import omni.kit.pipapi + +# It wraps `pip install` calls and reroutes package installation into user specified environment folder. +# That folder is added to sys.path. +# Note: This call is blocking and slow. It is meant to be used for debugging, development. For final product packages +# should be installed at build-time and packaged inside extensions. +omni.kit.pipapi.install( + package="semver", + version="2.13.0", + module="semver", # sometimes module is different from package name, module is used for import check + ignore_import_check=False, + ignore_cache=False, + use_online_index=True, + surpress_output=False, + extra_args=[] +) + +# use +import semver +ver = semver.VersionInfo.parse('1.2.3-pre.2+build.4') +print(ver) + +© Copyright 2019-2023, NVIDIA. + Last updated on Nov 14, 2023. + + + diff --git a/workstation-install.md b/workstation-install.md new file mode 100644 index 0000000000000000000000000000000000000000..4783540e7f31a863131d147d7b60fdba10617f4c --- /dev/null +++ b/workstation-install.md @@ -0,0 +1,38 @@ + + +Workstation Install Guide — Omniverse Install Guide latest documentation + +Omniverse Install Guide + + » +Omniverse Install Guide » +Workstation Install Guide + +  + +# Workstation Install Guide + +## Workstation Setup + +Workstation is ideal for individuals and small teams. It’s deployment and configuration is simple thanks to the Omniverse Launcher application. + +Warning +Workstation runs on a network interface and it’s IP Address or hostname must be accessible by all intended Clients (e.g., USD Composer), including Nucleus itself. +Running Workstation behind a firewall or using a Cloud Service Provider (CSP) and port forwarding traffic inbound is not supported. + +### Setup Instructions + +Download Omniverse Launcher. +Install the Omniverse Launcher and refer to the Installing Launcher instructions for additional help. +Install Nucleus Workstation. See Nucleus Tab for additional configuration details. +Install Omniverse Applications & Connectors as needed. See Install Apps for information and help. + +Note +To ensure Workstation has access to and is accessible by all required services in a non-airgapped environment, refer to the Networking and TCP/IP Ports documentation +for a comprehensive list of connectivity ports and endpoints. + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + + diff --git a/workstation-launcher.md b/workstation-launcher.md new file mode 100644 index 0000000000000000000000000000000000000000..cd69cbaeb97194062de06f809c82c9400975a03b --- /dev/null +++ b/workstation-launcher.md @@ -0,0 +1,261 @@ + + +User Guide — Omniverse Launcher latest documentation + +Omniverse Launcher + + » +Omniverse Launcher » +User Guide + +  + +# User Guide + +This document describes the components and workflow of the Omniverse Launcher. Making it easy for users to manage their Omniverse Apps, Connectors, and provides Nucleus Collaboration Services; the Omniverse Launcher acts as your personal launchpad for the Omniverse. +The Omniverse Launcher is available for download from the Omniverse Getting Started page or from NVIDIA’s licensing and software portal for Enterprise customers. + +## News Tab + +The Omniverse news Tab allows users to review and learn about things related to Omniverse. + +## Exchange Tab + +The Omniverse Exchange is the place where Omniverse Apps, Connectors, File Tools and more can be found and installed. + +Simply navigate through the list of available apps and connectors, select the version, and install. Once installed, this area can also be used to launch apps. + +## Library Tab + +The Omniverse Library makes it easy to see, launch, update, and/or learn about Omniverse Apps installed on your computer. + +Note +If this list is empty this is because you currently have no applications installed. This can easily be remedied by clicking over to the Exchange and installing the apps/connectors of your choice. + +### Library Panel + +The Omniverse Library Panel is located on the left side of the screen and lists all installed Apps, Connectors and more. Selecting one of the items on the list will reveal useful data in the main window about the tool as well as provides functionality based on the item type selected. + +Note +The Omniverse Library Panel will be unpopulated until apps are installed. If your list is empty, please navigate to the Exchange Tab to install apps, connectors, and other Omniverse tools. + +#### Apps + +On the top of the Library panel, apps are listed. Upon selecting an App, a series of options will be provided for managing the App in the main display. + +Option +Description + +Launch Button + +The launch button allows users to easily launch a selected App. + +Install Settings + +Found in the Hamburger Menu to the right of the Launch Button, The Settings Pane allows you to review +the install path, update, or uninstall the Selected App + +Release Notes + +Launches the Documentation Portal for the selected App and takes you to the Latest Release Notes. + +Documentation + +Launches the Documentation Portal for the Selected App. + +Tutorials + +Launches the Video Learning content for the selected App. + +Forums + +Launches the Forum Pages for in-depth discussion on the selected App. + +#### Development Tools + +Upon installing Kit, a development tools Tab will appear below Apps. Development tools are typically handled and managed in the same way as Apps and offers similar tools for managing these tools. + +Option +Description + +Launch Button + +The launch button allows users to easily launch a selected App. + +Install Settings + +Found in the triple Bars to the right of the Launch Button, The Settings Pane allows you to review +the install path, update, or uninstall the Selected App + +Release Notes + +Launches the Documentation Portal for the selected App and Takes you to the Latest Release Notes. + +Documentation + +Launches the Documentation Portal for the Selected App. + +Tutorials + +Launches the Video Learning content for the selected App. + +Forums + +Launches the Forum Pages for in depth discussion on the selected App. + +#### File Management + +File management tools provide utilities for managing file operations on the Omniverse. These tools by their nature are less cohesive in their tooling and have variation on their UI controls. Please see the documentation of the tool in question should you need explanation of how to manage. + +#### Connectors + +All connectors appear under the connectors icon and are displayed in a list allowing management. +For each connector installed, an entry will appear in the list with the ability to add additional connectors easily should you need them. + +Option +Description + +Add + +Allows adding additional connectors and brings you to the Connectors Exchange. + +Update + +If a connector is out of date, a green Update Button will be displayed allowing you to update to the most current release of that connector. + +Up To Date + +When a connector on the list is up to date, a greyed out “up to date” notification will be presented. + +### Updating an App + +Any app previously installed that has an update available will display with the following green highlight. + +Selecting (left-click) the highlight will allow you to locate the update (green). + +Upon selecting, the launcher update status will show the progress. +Once the update is complete + +The Launch Button will auto-select the updated version. +An Alert confirming the success or failure + reason will be generated. +The highlight will be removed. + +Note +In the Library Tab, only the latest version of an application is listed for quick install. Versions released after the installed version and before the latest version are available for installation in the Exchange Tab. + +## Exchange Tab + +The Omniverse Exchange is the place where Omniverse Apps, Connectors, File Tools and more can be found and installed. + +Simply navigate through the list of available apps and connectors, select the version, and install. Once installed, this area can also be used to launch apps. + +## Updating a Connector + +Connectors have a unified interface. Simply select Connectors under the Exchange Tab and any installed connectors will have an green notification bell shown. + +Option +Description + +Filters + +Allows refinement of list based on selection + +Search + +Contextual Search allows locating a specific App or Connector easily. + +Apps List + +Shows all available Apps or Connectors based on Filters and Search. + +### Product Overview + +When selected, details about the app/connector/tool are presented including overall description, version information, supported platforms, and system requirements. This information can be useful to decide if the app/connector/tool is right for you before downloading and installing. + +### Install Apps + +Apps are installed and launched by selecting items in the Exchange Tab: + +Available releases are categorized by release channel. A release is classified as Alpha, Beta, Release, or Enterprise, depending on its maturity and stability. If an Alpha or Beta release is selected, a banner will appear on the main image to emphasize the relative stability and completeness of that release. Alpha or Beta releases may not be feature complete or fully stable. Versions classified as Release (also known as GA or General Availability) are feature complete and stable. Release versions that are supported for Enterprise customers appear in the Enterprise list. After selecting the desired version, clicking the Install Button will initialize installation. + +## Nucleus Tab + +The Omniverse Launcher Nucleus Tab offers the experience of the Omniverse Nucleus Navigator app directly in the Launcher, enabling users to quickly and easily navigate and manage content in their Omniverse Nucleus servers. + +For more information on Navigator features and functionality, please review Omniverse Nucleus Navigator. + +Important +If you are looking to host a large, company wide installation of Nucleus and expect large amounts of traffic, other more robust Nucleus packages are available and should be used in lieu or addition to local Server(s). + +Note +A network can have multiple Nucleus Installations and there is no harm in having both Linux Docker Installations and Local Servers on the same network. They will exist independently of each other and do not conflict. + +### Create your administration Account + +As this process installs a set of services and effectively turns your workstation into a server, an administration account will be needed. This account allows full and complete control over your Nucleus and is unrelated to any other NVIDIA Accounts. This is your servers primary account and specifically allows you access to the server you are currently installing. + +Press the Create to finalize the user admin account and log in. + +### Connecting to Collaboration + +Once the above steps have been followed, Users can now connect to your Omniverse Nucleus collaboration service. This is also true for Local Applications. +In order to connect to the collaboration service connect with the network address of the host that is also accessible to the user you wish to share with. For details on connecting, please see the documentation for the omniverse app, connector or utility you are using. + +#### Connecting Locally + +If the collaboration service resides on your workstation, you can also use localhost to connect with local apps and connectors. + +#### Additional Collaboration Information + +For more information on the Nucleus Collaboration Services, please review Nucleus Documentation + +## Alerts + +The alert icon in the top right of the notifies your of important Omniverse Messages. + +## User Settings + +The User Settings panel allows users to choose the default install path for the Omniverse Library Apps & Connectors. + +### Settings + +Option +Description + +Library Path + +This location specifies where apps, connectors and tools are installed when installed from Launcher. + +Data Path + +Displays and allows selection of the Data Path. The data path is where all content on the local Nucleus is stored. + +### About + +Gives version information about Launcher. + +### Log out + +Logs out of the Launcher. + +## Accessibility + +Omniverse Launcher Text and Layout accommodates text/image scale adjustment to help users with readability and/or high resolution monitors. + +Key Command +Action + +Ctrl + - +Scale Text/Images Smaller + +Ctrl + Shift + + +Scale Text/Images Larger + +Ctrl + 0 +Reset Scale to Default + +© Copyright 2023-2024, NVIDIA. + Last updated on Apr 15, 2024. + + +