larkZ commited on
Commit
d8ab1df
·
verified ·
1 Parent(s): fa9aabb

Upload 253 files

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. 1_0_0_48.md +56 -0
  2. 1_0_42.md +28 -0
  3. 1_0_50.md +31 -0
  4. 1_1_2.md +65 -0
  5. 1_2_8.md +92 -0
  6. 1_3_3.md +42 -0
  7. 1_3_4.md +34 -0
  8. 1_4_0.md +37 -0
  9. 1_5_1.md +39 -0
  10. 1_5_3.md +34 -0
  11. 1_5_4.md +30 -0
  12. 1_5_5.md +30 -0
  13. 1_5_7.md +35 -0
  14. 1_6_1.md +47 -0
  15. 1_7_1.md +28 -0
  16. 1_8_11.md +38 -0
  17. 1_8_2.md +27 -0
  18. 1_8_7.md +32 -0
  19. 1_9_10.md +56 -0
  20. 1_9_11.md +38 -0
  21. 1_9_8.md +82 -0
  22. Ar.md +446 -0
  23. CameraUtil.md +156 -0
  24. Garch.md +43 -0
  25. GeomUtil.md +455 -0
  26. Gf.md +0 -0
  27. Glf.md +477 -0
  28. Kind.md +122 -0
  29. Ndr.md +849 -0
  30. Pcp.md +1659 -0
  31. PhysicsSchemaTools.md +422 -0
  32. Plug.md +580 -0
  33. Sdf.md +0 -0
  34. Sdr.md +709 -0
  35. Tf.md +1345 -0
  36. Trace.md +395 -0
  37. Usd.md +0 -0
  38. UsdAppUtils.md +115 -0
  39. UsdGeom.md +0 -0
  40. UsdHydra.md +294 -0
  41. UsdLux.md +0 -0
  42. UsdMedia.md +462 -0
  43. UsdPhysics.md +0 -0
  44. UsdProc.md +138 -0
  45. UsdRender.md +1343 -0
  46. UsdRi.md +974 -0
  47. UsdShade.md +0 -0
  48. UsdSkel.md +2480 -0
  49. UsdUI.md +622 -0
  50. UsdUtils.md +635 -0
1_0_0_48.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.00.48 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.00.48
11
+
12
+  
13
+
14
+ # 1.00.48
15
+
16
+ Release Date: Feb 2021
17
+
18
+ ## New Features
19
+
20
+ News tab – shows the latest information about Omniverse
21
+ Show Nucleus Web on the collaboration tab
22
+ Improved keyboard navigation and accessibility
23
+ Update info for installed apps and connectors automatically when the library tab is opened
24
+ Improved the drag area for the main window
25
+ Remove failed installers from the installation queue automatically
26
+ Added a button to clear the search input
27
+ Added a button to open logs location
28
+ Allow users to copy notification text
29
+ Hide Launcher when started with the system
30
+ Change the bell color to red if notifications contain errors
31
+ Added a header for error notifications
32
+ Added a link to show open-source licenses used in the launcher
33
+ Create a user session in System Monitor after Nucleus is installed
34
+ Show loading indicators and errors on the startup window
35
+
36
+ ## Improvements
37
+
38
+ Fixed installation controls were not clickable
39
+ Ignore OS errors during the installation cancel
40
+ Fixed problems with loading internal launcher settings
41
+ Fixed problems with initialization during the authentication
42
+ Fixed a bug where users went back in collaboration tab and saw ‘null’ instead of a data path
43
+ Fixed a bug where users got redirected to a broken Nucleus page when clicked on a notification
44
+ Fixed left spacing in component details on the exchange tab
45
+ Fixed issues with invalid usernames specified during the installation of the collaboration service
46
+ Fixed users were not prompted to select data paths or install Cache
47
+ Fixed previous Cache versions were not deleted automatically after updates
48
+ Fixed the launch button on the library tab displaying “Up to date” when update is available
49
+ Fixed “Cancel” button was visible when installing components
50
+ Fixed text overflow in the installation progress
51
+
52
+ © Copyright 2023-2024, NVIDIA.
53
+ Last updated on Apr 15, 2024.
54
+
55
+
56
+
1_0_42.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.0.42 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.0.42
11
+
12
+  
13
+
14
+ # 1.0.42
15
+
16
+ Release Date: Jan 2021
17
+
18
+ Added News section to display content from Omniverse News in the launcher
19
+ Fixed collecting hardware info on Linux when lshw returns an array
20
+ Add a login session in System Monitor when Nucleus is installed
21
+ Moved all licenses to PACKAGE-LICENSES folder, added a LICENSES link to the about dialog
22
+ Fixed user was not prompted to select data paths or install Cache
23
+
24
+ © Copyright 2023-2024, NVIDIA.
25
+ Last updated on Apr 15, 2024.
26
+
27
+
28
+
1_0_50.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.0.50 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.0.50
11
+
12
+  
13
+
14
+ # 1.0.50
15
+
16
+ Release Date: March 2021
17
+
18
+ ## Fixed
19
+
20
+ Catch unexpected Starfleet responses and return the error that tells users to log in.
21
+ Fixed licenses link not working on Linux.
22
+
23
+ ## Removed
24
+
25
+ Remove debug noise in logs from the auto-updater.
26
+
27
+ © Copyright 2023-2024, NVIDIA.
28
+ Last updated on Apr 15, 2024.
29
+
30
+
31
+
1_1_2.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.1.2 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.1.2
11
+
12
+  
13
+
14
+ # 1.1.2
15
+
16
+ Release Date: March 2021
17
+
18
+ ## Spotlight Features
19
+
20
+ 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.
21
+
22
+ ## New Capabilities
23
+
24
+ Show available updates for components on the exchange tab.
25
+ Show component versions in the list view on the exchange tab.
26
+ Added omniverse-launcher://exit command to close the launcher.
27
+ Register a custom protocol handler on Linux automatically.
28
+ HTTP API to get the current authentication info.
29
+ HTTP API to get a list of installed components and their settings.
30
+ Added Learn tab.
31
+ Added new options to group and sort content on the exchange tab.
32
+ Added the list view for components on the exchange tab.
33
+ Use omniverse-launcher:// custom protocol to accept commands from other apps.
34
+ Added the telemetry service for events from external applications.
35
+
36
+ ## Fixed/Altered
37
+
38
+ Changed the aspect ratio of images used in component cards to be 16:9.
39
+ Fixed focusing the search bar automatically when nothing was typed in the input.
40
+ Fixed reinstalling components that were marked as installed after a restart.
41
+ Changed the gap between cards on the Exchange tab using the grid view.
42
+ Fixed refreshing News and Learn pages when users click on the header tabs.
43
+ Fixed News and Learn links to load webpages without headers and footers.
44
+ Fixed the scrollbar on the Exchange tab not working correctly when dragged with a mouse.
45
+ Fixed clicking area for the notification bell.
46
+ Fixed Nucleus showing up in the library.
47
+ Fixed “Uninstall” button position in component settings dialog.
48
+ Fixed the search input losing focus after typing.
49
+ Fixed losing the search filters after selecting a card on the exchange tab.
50
+ Changed how content is structured and searched on the exchange tab – moved Apps and Connectors categories to the left menu.
51
+ Improved the load speed and performance on the exchange tab.
52
+ Show placeholder in the installation queue if no downloads are queued.
53
+ Load messages displayed in the footer from the server.
54
+ Match the font size used for links in the settings dialog.
55
+ Updated links on Collaboration tab.
56
+ Fixed extracting files from zip archives with a read-only flag on Windows.
57
+ Fixed error that crashed browser page and didn’t let users log in.
58
+ Fixed showing invalid error messages in the exchange tab when Starfleet returns unexpected response body.
59
+ Fixed expiration of the authentication token.
60
+
61
+ © Copyright 2023-2024, NVIDIA.
62
+ Last updated on Apr 15, 2024.
63
+
64
+
65
+
1_2_8.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.2.8 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.2.8
11
+
12
+  
13
+
14
+ # 1.2.8
15
+
16
+ Release Date: Aug 2021
17
+
18
+ ## Spotlight Features
19
+
20
+ Previous Versions
21
+ Users can now install previous version of Omniverse via a new and improved interface.
22
+
23
+ Easy Links
24
+ When opening files for the first time from a linked location, launcher now confirms the app to load with.
25
+
26
+ Users can also set the default app manually in settings.
27
+
28
+ ## Added
29
+
30
+ Allow to customize system requirements for installable components.
31
+ Display a notification when applications are successfully uninstalled.
32
+ Added a smooth transition animation for the library tab.
33
+ Added thin packaging support - allows splitting large components into smaller packages that can be reused.
34
+ Added “Exit” button to the user menu.
35
+ Support installing previous versions of applications and connectors.
36
+ Added new dialog to select the default application used to open Omniverse links.
37
+ Support markdown for component description.
38
+ Show an error message on startup if Launcher can’t read the library database file.
39
+
40
+ ## Changed
41
+
42
+ Scale side menu on the exchange tab based on the screen size.
43
+ Updated Starfleet integration to use name instead of preferred_username.
44
+ Renamed Download Launcher button to Download Enterprise Launcher
45
+ Display “News” tab inside of Launcher.
46
+ Use thumbnail images on the exchange tab to optimize page load time.
47
+ Disable Launch button for three seconds after click to prevent launching apps multiple times.
48
+ Display an error when iframes can’t load the external web page.
49
+ Update privacy settings on a new login.
50
+ Renamed “Collaboration” tab to “Nucleus”.
51
+ Updated “News” and “Learn” links to hide the website header.
52
+ Support tables and headers for component description via Markdown and HTML.
53
+ Changed the inactive tab color on the library tab.
54
+ Made Launcher errors more readable.
55
+ “News” and “Learn” tabs open a web browser now instead of showing these pages in iframes.
56
+
57
+ ## Fixed
58
+
59
+ Fixed issues where users could install or update the same app more than once.
60
+ Fixed resizing of the main window at the top.
61
+ Fixed issues with scrolling the exchange tab when the featured section is available.
62
+ Fixed showing the main window on system startup (Launcher will be hidden in the system tray).
63
+ Ignore system errors when Launcher removes installed components.
64
+ Fixed an issue when users could not change their current account without a reboot.
65
+ Fixed race condition when users rapidly click on the installer pause button multiple times.
66
+ Fixed an issue with installers not queueing up in the correct order.
67
+ Fixed missing vendor prefix for desktop files on Linux to register a custom protocol handler.
68
+ Fixed issues with floating carousel images for featured components.
69
+ Preserve unknown fields in privacy.toml file.
70
+ Invalidate cached HTTP responses on a startup.
71
+ Fixed issues with cached URLs for loading applications and their versions.
72
+ Fixed installing previous versions of applications that don’t support side-by-side installations.
73
+ Fixed thin package installer did not create intermediate folders for installed packages.
74
+ Refresh auth tokens when external apps query /auth endpoint.
75
+ Fixed displaying loading state on the Nucleus tab if Nucleus installer fails.
76
+ Fixed issue with components not been marked as installed.
77
+ Fixed sorting of exchange components in the left menu.
78
+ Fixed displaying hidden components on the library tab after installation.
79
+ Allow Launcher to start without downloading the GDPR agreement if it’s accepted already.
80
+ Fixed running applications that require the finalize script after install.
81
+ Fixed running applications that require the finalize script after install.
82
+
83
+ ## Removed
84
+
85
+ Launcher Cleanup tool disabled from running during uninstall/reinstall in Windows.
86
+ Removed OS and Video Driver from system requirements.
87
+
88
+ © Copyright 2023-2024, NVIDIA.
89
+ Last updated on Apr 15, 2024.
90
+
91
+
92
+
1_3_3.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.3.3 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.3.3
11
+
12
+  
13
+
14
+ # 1.3.3
15
+
16
+ Release Date: Oct 2021
17
+
18
+ ## Added
19
+
20
+ Added the OS version to com.nvidia.omniverse.launcher.session telemetry event.
21
+ Added the locale to com.nvidia.omniverse.launcher.session telemetry event.
22
+ Added “Developer” and “Publisher” fields to component details.
23
+ Show “Welcome to Omniverse” page on the first launch.
24
+ Support installing the Enterprise Launcher to a shared location on Linux.
25
+
26
+ ## Fixed
27
+
28
+ Fixed an issue where “Add Connector” button was pointing to the wrong location on the Exchange tab.
29
+ Fixed an issue where the default Omniverse app was not reset after its last version is uninstalled.
30
+ Fixed an issue where the startup component didn’t react on the background authentication.
31
+ Fixed an issue where installers that were initiated from the library tab ignored the current queue and started a download immediately.
32
+ Fixed Japanese translations.
33
+ Fixed an issue that caused a delay for queuing new installers.
34
+ Fixed an issue where components were added to the library before they were registered by scripts.
35
+ Fixed an issue where component platforms were determined incorrectly if thin packaging is used.
36
+ Fixed an issue where installers used incorrect path with the latest component version instead of the specified version.
37
+
38
+ © Copyright 2023-2024, NVIDIA.
39
+ Last updated on Apr 15, 2024.
40
+
41
+
42
+
1_3_4.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.3.4 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.3.4
11
+
12
+  
13
+
14
+ # 1.3.4
15
+
16
+ Release Date: Oct 2021
17
+
18
+ ## Added
19
+
20
+ Show the installation date for apps displayed on the library tab.
21
+ Added “Collect debug info” button to the settings dialog to prepare a tarball with logs and configuration files.
22
+ Show “External link” button for third-party components on the detailed page.
23
+
24
+ ## Fixed
25
+
26
+ Fixed an issue where links on the “Learn” tab didn’t work after watching a video.
27
+ Fixed showing the latest component version instead of the currently installed version on the library tab.
28
+ Fixed an issue with dangling installers in the queue.
29
+
30
+ © Copyright 2023-2024, NVIDIA.
31
+ Last updated on Apr 15, 2024.
32
+
33
+
34
+
1_4_0.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.4.0 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.4.0
11
+
12
+  
13
+
14
+ # 1.4.0
15
+
16
+ Release Date: Nov 2022
17
+
18
+ ## Changed
19
+
20
+ Added retries for downloading EULA and GDPR agreements.
21
+
22
+ ## Fixed
23
+
24
+ Fixed an issue with scrolling the left menu on the exchange tab.
25
+ Fixed an issue where Launcher dialogs were displayed behind the exchange view after navigation.
26
+ Fixed an issue where thin packages could not install correctly if the file system had dangling symlinks.
27
+ Remove all unused packages on the startup.
28
+ Fixed an issue where failed updates changed the latest registered app version in the library.
29
+ Fixed an issue where scheduling two installers could not finish the download if authentication needs to be refreshed.
30
+ Fixed an issue with collecting hardware info on Windows 11.
31
+ Fixed sending multiple simultaneous session events.
32
+
33
+ © Copyright 2023-2024, NVIDIA.
34
+ Last updated on Apr 15, 2024.
35
+
36
+
37
+
1_5_1.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.5.1 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.5.1
11
+
12
+  
13
+
14
+ # 1.5.1
15
+
16
+ Release Date: Jan 2022
17
+
18
+ ## Added
19
+
20
+ 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.
21
+
22
+ ## Changed
23
+
24
+ Changed colors for messages displayed in the bottom toolbar (white for regular text and blue for links instead of yellow).
25
+
26
+ ## Fixed
27
+
28
+ Escape desktop entry path on Linux for opening custom protocol links.
29
+ Fixed an issue where News and Learn tabs were refreshed when Launcher lost or regained focus.
30
+ Increased the default window size to fit the cache path in the Launcher settings.
31
+ Raise an error when users try to install components that are already installed.
32
+ Raise an error when users try to launch components that are not installed.
33
+ Fixed an issue where some packages couldn’t be moved to the right location by offline installer.
34
+
35
+ © Copyright 2023-2024, NVIDIA.
36
+ Last updated on Apr 15, 2024.
37
+
38
+
39
+
1_5_3.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.5.3 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.5.3
11
+
12
+  
13
+
14
+ # 1.5.3
15
+
16
+ Release Date: March 2022
17
+
18
+ ## Added
19
+
20
+ Added a check argument for omniverse-launcher://install command that manages throwing an error in case the same component is already installed.
21
+ Support external links for third-party content.
22
+
23
+ ## Fixed
24
+
25
+ Fixed an issue where downloaded zip archives were not removed when the installer is cancelled.
26
+ Improved Italian localization.
27
+ Fixed an issue where licenses were required for third-party content.
28
+ Fixed an issue where problematic components could crash the application.
29
+
30
+ © Copyright 2023-2024, NVIDIA.
31
+ Last updated on Apr 15, 2024.
32
+
33
+
34
+
1_5_4.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.5.4 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.5.4
11
+
12
+  
13
+
14
+ # 1.5.4
15
+
16
+ Release Date: April 2022
17
+
18
+ ## Fixed
19
+
20
+ Fixed an issue where users couldn’t change configured paths in Launcher.
21
+ Fixed Italian translations.
22
+ Fixed an issue where Launcher couldn’t be started if System Monitor is installed but missing on disk.
23
+ Fixed an issue where connector updates were started immediately instead of being queued on the library tab.
24
+ Fixed an issue where components couldn’t be found by full names and tags on the Exchange tab.
25
+
26
+ © Copyright 2023-2024, NVIDIA.
27
+ Last updated on Apr 15, 2024.
28
+
29
+
30
+
1_5_5.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.5.5 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.5.5
11
+
12
+  
13
+
14
+ # 1.5.5
15
+
16
+ Release Date: June 2022
17
+
18
+ ## Fixed
19
+
20
+ Fixed an issue related to refreshing the session when installing new apps after desktop comes out of sleep mode.
21
+ Fixed an issue where connectors displayed in the library were enlarged.
22
+ Fixed an issue related to a blank error when Launcher is started without internet connection.
23
+ Fixed an issue where “Data collection and use” did not reset the language on dialog cancel.
24
+ Fixed an issue where trailing slashes were omitted when Launcher opened omniverse:// links.
25
+
26
+ © Copyright 2023-2024, NVIDIA.
27
+ Last updated on Apr 15, 2024.
28
+
29
+
30
+
1_5_7.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.5.7 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.5.7
11
+
12
+  
13
+
14
+ # 1.5.7
15
+
16
+ Release Date: May 2023
17
+
18
+ ## Added
19
+
20
+ Added new controls for changing the current language on the login screen.
21
+ Added the Extensions content type in the Exchange.
22
+
23
+ ## Fixed
24
+
25
+ Fixed an issue where the close icon closed Launcher instead of hiding it to the system tray.
26
+ Removed the crash reporter logging when using custom protocol commands.
27
+ Fixed an issue that caused a crash when Launcher failed to collect hardware info.
28
+ Fixed an issue where connectors were sometimes duplicated after the installation.
29
+ Fixed an issue where “Add connector” button on the Library tab opened a blank page.
30
+
31
+ © Copyright 2023-2024, NVIDIA.
32
+ Last updated on Apr 15, 2024.
33
+
34
+
35
+
1_6_1.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.6.10 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.6.10
11
+
12
+  
13
+
14
+ # 1.6.10
15
+
16
+ Release Date: Sept 2022
17
+
18
+ ## Added
19
+
20
+ Integrated Navigator filesystem directly into the Nucleus tab.
21
+ Added “Show in folder” option for downloaded files in Navigator.
22
+ Extension installation.
23
+ /open command for opening files with installed applications.
24
+ Added links for Nucleus Cache in the library.
25
+ Display an icon for external packages on the Exchange tab.
26
+ Added new UI for Omniverse Drive 2.
27
+ Added Ukrainian language translations to locale.
28
+
29
+ ## Fixed
30
+
31
+ Updated dependencies to address minor potential security vulnerabilities.
32
+ Improved error reporting when files are used by other processes.
33
+ Fixed an issue where pressing Enter closed modal dialogs.
34
+ Fixed selecting all notifications when users click on the notification bell.
35
+ Fixed “Invalid time value” error displayed for some OS locales on startup.
36
+ Fixed an issue where Launcher displayed dates in different formats on the Library tab.
37
+ Fixed scrolling the language selection in the settings displayed during the first installation.
38
+ Fixed triggering Google Translate dialog on the login result page.
39
+ Fixed displaying user settings and notifications behind Nucleus installation dialog.
40
+ Fixed an issue where Launcher couldn’t download new updates after the first downloaded patch.
41
+ Fixed translations.
42
+
43
+ © Copyright 2023-2024, NVIDIA.
44
+ Last updated on Apr 15, 2024.
45
+
46
+
47
+
1_7_1.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.7.1 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.7.1
11
+
12
+  
13
+
14
+ # 1.7.1
15
+
16
+ Release Date: Dec 2022
17
+
18
+ ## Added
19
+
20
+ Renamed Enterprise Launcher to IT Managed Launcher.
21
+ 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.
22
+ Added /settings HTTP API for GET requests for the Launcher settings.
23
+
24
+ © Copyright 2023-2024, NVIDIA.
25
+ Last updated on Apr 15, 2024.
26
+
27
+
28
+
1_8_11.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.8.11 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.8.11
11
+
12
+  
13
+
14
+ # 1.8.11
15
+
16
+ Release Date: July 2023
17
+
18
+ ## Changed
19
+
20
+ Updated Nucleus tab with Navigator 3.3.2.
21
+ Display “Install” button for new versions in the setting menu on the Library tab.
22
+ Extend omniverse-launcher://launch command to support custom launch scripts.
23
+
24
+ ## Fixed
25
+
26
+ Fixed an issue where users were unable to exit from Launcher via UI when not authenticated.
27
+ Fixed incorrect links displayed in GDPR/EULA error.
28
+ Add retries for pulling component versions during installations.
29
+ Fixed an issue where Launcher raised an error during installation if installed package printed too many messages.
30
+ Amend Italian and Korean translation strings.
31
+ Fixed the beta banner displayed with the carousel.
32
+ Fixed an issue where Launcher didn’t remember command line arguments specified for AppImage.
33
+
34
+ © Copyright 2023-2024, NVIDIA.
35
+ Last updated on Apr 15, 2024.
36
+
37
+
38
+
1_8_2.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.8.2 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.8.2
11
+
12
+  
13
+
14
+ # 1.8.2
15
+
16
+ Release Date: Dec 2022
17
+
18
+ ## Added
19
+
20
+ 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.
21
+ Added release classification labels and Beta banner (when applicable) to the Library tab.
22
+
23
+ © Copyright 2023-2024, NVIDIA.
24
+ Last updated on Apr 15, 2024.
25
+
26
+
27
+
1_8_7.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.8.7 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.8.7
11
+
12
+  
13
+
14
+ # 1.8.7
15
+
16
+ Release Date: May 2023
17
+
18
+ ## Added
19
+
20
+ Show Nucleus update version on the Nucleus tab.
21
+ Added a Data Opt-In checkbox allowing users to opt-in and opt-out of data collection.
22
+ Display Cache version in the library.
23
+
24
+ ## Fixed
25
+
26
+ Updated Nucleus tab with Navigator 3.3.
27
+
28
+ © Copyright 2023-2024, NVIDIA.
29
+ Last updated on Apr 15, 2024.
30
+
31
+
32
+
1_9_10.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.9.10 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.9.10
11
+
12
+  
13
+
14
+ # 1.9.10
15
+
16
+ Release Date: Jan 2024
17
+
18
+ ## Added
19
+
20
+ Anonymize telemetry events when users opt out of data collection.
21
+ Support feature targeting by OS, Launcher version, build or user profile.
22
+ Update Nucleus Navigator to 3.3.4.
23
+ Support silent launch for custom protocol commands.
24
+
25
+ ## Changed
26
+
27
+ Enabled “Newest” sorting for the Exchange tab by default.
28
+
29
+ ## Fixed
30
+
31
+ Fixed an issue where Launcher did not bring its main window to the front when Launcher opened a second instance.
32
+ Fixed an issue where Launcher closed the application when its main window was closed from the taskbar.
33
+ Fixed an issue where Launcher installation might hang before running installation scripts.
34
+ Fixed an issue where Hub settings represented incorrect information in the UI.
35
+ Fixed an issue where Navigator did not refresh its server list after Nucleus installation.
36
+ Fixed an issue where Nucleus installation was displayed on top of other UI elements.
37
+ Fixed an issue where closing the main window in IT Managed Launcher closed the entire application.
38
+ Fixed a crash in IT Managed Launcher when a user opens a Nucleus tab without internet connection.
39
+ Users are now redirected to the library page when Nucleus is uninstalled in IT Managed Launcher.
40
+ Fixed an issue with the version drop-down arrow displayed incorrectly.
41
+ Validated email input on the login screen.
42
+ Fixed an issue where the email field was not updated in privacy.toml after users sign in.
43
+ Fixed an incorrect error translation for Czech language.
44
+ Fixed an issue where the dialog close icon was not clickable when the scroll bar was displayed.
45
+ Fixed an issue where the uninstall notification did not include the component version.
46
+ Fixed an issue where Launcher could not register the first Nucleus account.
47
+
48
+ ## Security
49
+
50
+ Fix for CVE-2023-45133.
51
+
52
+ © Copyright 2023-2024, NVIDIA.
53
+ Last updated on Apr 15, 2024.
54
+
55
+
56
+
1_9_11.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.9.11 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.9.11
11
+
12
+  
13
+
14
+ # 1.9.11
15
+
16
+ Release Date: April 2024
17
+
18
+ # Fixed
19
+
20
+ Fixed an issue where Launcher was minimized to the system tray instead of exiting when users clicked on Exit option in user settings menu.
21
+ Fixed a race condition that could cause settings reset. [OM-118568]
22
+ Fixed gallery positioning for content packs. [OM-118695]
23
+ Fixed beta banner positioning on the Exchange tab. [OM-119105]
24
+ Fixed an issue on the Hub page settings that caused showing “infinity” in disk chart for Linux. [HUB-965]
25
+ Fixed cache size max validations on Hub page settings tab. [OM-119136]
26
+ Fixed cache size decimal points validations on Hub page settings tab. [OM-119335]
27
+ Fixed Hub Total Disk Space chart to not allow available disk space to become negative. [HUB-966]
28
+ Fixed an issue on the Hub page settings that caused showing “infinity” in disk chart for Linux. [HUB-965]
29
+ Fixed an issue on the Hub page settings that cause cache size not to be displayed. [HUB-960]
30
+ Fixed an issue on the Hub page settings preventing editing Cleanup Threshold. [OM-119137]
31
+ Fixed Hub page settings chart drive/mount detection size based on cache path. [HUB-970]
32
+ Replace Omniverse Beta license agreement text with NVIDIA License and add license agreement link in the About dialog. [OM-120991]
33
+
34
+ © Copyright 2023-2024, NVIDIA.
35
+ Last updated on Apr 15, 2024.
36
+
37
+
38
+
1_9_8.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ 1.9.8 — Omniverse Launcher latest documentation
4
+
5
+ Omniverse Launcher
6
+
7
+ »
8
+ Omniverse Launcher »
9
+ Release Notes »
10
+ 1.9.8
11
+
12
+  
13
+
14
+ # 1.9.8
15
+
16
+ Release Date: Nov 2023
17
+
18
+ ## Added
19
+
20
+ Featured Collections section added to the Exchange tab.
21
+ Collection Side Nav expanded by default in Exchange tab.
22
+ Pass proxy settings to launched applications with OMNI_PROXY_SERVER environment variable.
23
+ Add custom UI for Omniverse Hub app.
24
+ Add window titles for News and Learn tabs.
25
+ Block user navigation on the Nucleus tab if Navigator tasks are active.
26
+ Support displaying server notifications until a specific date.
27
+ Support sending server notifications for specific platforms or Launcher versions.
28
+ Add splash notifications displayed as a modal dialog.
29
+
30
+ ## Changed
31
+
32
+ Update Nucleus Navigator to 3.3.3.
33
+ Updated the UI for collection menu on the Exchange tab.
34
+ Updated the suggestion for installing the default Omniverse application.
35
+ Updated IT Managed Web Launcher Documentation tab to be a link to online omniverse documentation.
36
+ Changed the default page to Library for IT Managed Launcher.
37
+ Updated the look for featured collections.
38
+ Updated the look for the side menu on the Exchange tab (only display categories).
39
+
40
+ ## Fixed
41
+
42
+ Display an error when user tries to delete version that is not installed.
43
+ Fixed an issue that displayed an Update button for installed connectors and apps in IT Managed Launcher.
44
+ Fixed an issue where “New” badges were displayed incorrectly for IT Managed Launcher.
45
+ Fixed displaying duplicate connectors after installing with IT Managed Launcher.
46
+ Fixed displaying a spinner for connectors page in IT Managed Launcher.
47
+ Fixed displaying applications and connectors on the Library tab after calling omniverse-launcher://uninstall command.
48
+ Fixed an issue when uninstall notification was not shown if triggered by omniverse-launcher://uninstall command.
49
+ Fixed an issue where filtering content by collections that do not exist could crash the application.
50
+ Fixed an issue where tags were not displayed for components on the Exchange tab.
51
+ Fixed displaying regular notifications instead of errors if installer returned an empty error message.
52
+ Fixed displaying Cache installation suggestion in IT Managed Launcher.
53
+ Fixed an issue with webview links not opening in a browser window.
54
+ Fixed an issue where IT Managed Launcher didn’t work without internet connection.
55
+ Fixed an issue where custom protocol commands args were persisted to Linux .desktop files.
56
+ Fixed an issue where Collaboration packages were not displayed on the Enterprise portal.
57
+ Disable bringing IT Managed Launcher in front of other apps when custom protocol commands are used.
58
+ Fixed issues with focusing input elements inside modal dialogs.
59
+ Fixed an issue where login result page opened Launcher or brought it in front of other applications.
60
+ Fixed opening Nucleus settings from the menu on the Nucleus tab.
61
+ Fixed incorrect coloring for the beta banner.
62
+ Fixed an issue where buttons and pagination controls could be scrolled in the version dialog.
63
+ Fixed an issue where autostart registry keys were kept after uninstall.
64
+ Fixed the color for the name displayed in the channel dropdown.
65
+ Fixed an issue where Launcher API wasn’t hosted on 127.0.0.1.
66
+ Fixed an issue where users could not close modal dialogs.
67
+ Fixed an issue where the beta overlay was displayed compressed sometimes.
68
+ Fixed an issue where UI and Navigator logs were not being saved to a log file.
69
+ Fixed an issue blocking custom protocol commands on Ubuntu.
70
+ Use 127.0.0.1 address for registering new account during Nucleus installation.
71
+
72
+ ## Security
73
+
74
+ Fix for CVE-2023-5217
75
+ Fix for CVE-2023-4863
76
+ Fix for CVE-2023-44270
77
+
78
+ © Copyright 2023-2024, NVIDIA.
79
+ Last updated on Apr 15, 2024.
80
+
81
+
82
+
Ar.md ADDED
@@ -0,0 +1,446 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Ar module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Ar module
10
+
11
+  
12
+
13
+ # Ar module
14
+
15
+ Summary: The Ar (Asset Resolution) library is responsible for querying, reading, and writing asset data.
16
+
17
+ Classes:
18
+
19
+ DefaultResolver
20
+ Default asset resolution implementation used when no plugin implementation is provided.
21
+
22
+ DefaultResolverContext
23
+ Resolver context object that specifies a search path to use during asset resolution.
24
+
25
+ Notice
26
+
27
+ ResolvedPath
28
+ Represents a resolved asset path.
29
+
30
+ Resolver
31
+ Interface for the asset resolution system.
32
+
33
+ ResolverContext
34
+ An asset resolver context allows clients to provide additional data to the resolver for use during resolution.
35
+
36
+ ResolverContextBinder
37
+ Helper object for managing the binding and unbinding of ArResolverContext objects with the asset resolver.
38
+
39
+ ResolverScopedCache
40
+ Helper object for managing asset resolver cache scopes.
41
+
42
+ Timestamp
43
+ Represents a timestamp for an asset.
44
+
45
+ class pxr.Ar.DefaultResolver
46
+ Default asset resolution implementation used when no plugin
47
+ implementation is provided.
48
+ In order to resolve assets specified by relative paths, this resolver
49
+ implements a simple”search path”scheme. The resolver will anchor the
50
+ relative path to a series of directories and return the first absolute
51
+ path where the asset exists.
52
+ The first directory will always be the current working directory. The
53
+ resolver will then examine the directories specified via the following
54
+ mechanisms (in order):
55
+
56
+ The currently-bound ArDefaultResolverContext for the calling
57
+ thread
58
+ ArDefaultResolver::SetDefaultSearchPath
59
+ The environment variable PXR_AR_DEFAULT_SEARCH_PATH. This is
60
+ expected to be a list of directories delimited by the platform’s
61
+ standard path separator.
62
+
63
+ ArDefaultResolver supports creating an ArDefaultResolverContext via
64
+ ArResolver::CreateContextFromString by passing a list of directories
65
+ delimited by the platform’s standard path separator.
66
+ Methods:
67
+
68
+ SetDefaultSearchPath
69
+ classmethod SetDefaultSearchPath(searchPath) -> None
70
+
71
+ static SetDefaultSearchPath()
72
+ classmethod SetDefaultSearchPath(searchPath) -> None
73
+ Set the default search path that will be used during asset resolution.
74
+ This must be called before the first call to ArGetResolver. The
75
+ specified paths will be searched in addition to, and before paths
76
+ specified via the environment variable PXR_AR_DEFAULT_SEARCH_PATH
77
+
78
+ Parameters
79
+ searchPath (list[str]) –
80
+
81
+ class pxr.Ar.DefaultResolverContext
82
+ Resolver context object that specifies a search path to use during
83
+ asset resolution. This object is intended for use with the default
84
+ ArDefaultResolver asset resolution implementation; see documentation
85
+ for that class for more details on the search path resolution
86
+ algorithm.
87
+ Example usage:
88
+ ArDefaultResolverContext ctx({"/Local/Models", "/Installed/Models"});
89
+ {
90
+ // Bind the context object:
91
+ ArResolverContextBinder binder(ctx);
92
+
93
+ // While the context is bound, all calls to ArResolver::Resolve
94
+ // (assuming ArDefaultResolver is the underlying implementation being
95
+ // used) will include the specified paths during resolution.
96
+ std::string resolvedPath = resolver.Resolve("ModelName/File.txt")
97
+ }
98
+
99
+ // Once the context is no longer bound (due to the ArResolverContextBinder
100
+ // going out of scope), its search path no longer factors into asset
101
+ // resolution.
102
+
103
+ Methods:
104
+
105
+ GetSearchPath()
106
+ Return this context's search path.
107
+
108
+ GetSearchPath() → list[str]
109
+ Return this context’s search path.
110
+
111
+ class pxr.Ar.Notice
112
+ Classes:
113
+
114
+ ResolverChanged
115
+
116
+ ResolverNotice
117
+
118
+ class ResolverChanged
119
+ Methods:
120
+
121
+ AffectsContext
122
+
123
+ AffectsContext()
124
+
125
+ class ResolverNotice
126
+
127
+ class pxr.Ar.ResolvedPath
128
+ Represents a resolved asset path.
129
+ Methods:
130
+
131
+ GetPathString()
132
+ Return the resolved path held by this object as a string.
133
+
134
+ GetPathString() → str
135
+ Return the resolved path held by this object as a string.
136
+
137
+ class pxr.Ar.Resolver
138
+ Interface for the asset resolution system. An asset resolver is
139
+ responsible for resolving asset information (including the asset’s
140
+ physical path) from a logical path.
141
+ See ar_implementing_resolver for information on how to customize asset
142
+ resolution behavior by implementing a subclass of ArResolver. Clients
143
+ may use ArGetResolver to access the configured asset resolver.
144
+ Methods:
145
+
146
+ CanWriteAssetToPath(resolvedPath, whyNot)
147
+ Returns true if an asset may be written to the given resolvedPath , false otherwise.
148
+
149
+ CreateContextFromString(contextStr)
150
+ Return an ArResolverContext created from the primary ArResolver implementation using the given contextStr .
151
+
152
+ CreateContextFromStrings(contextStrs)
153
+ Return an ArResolverContext created by combining the ArResolverContext objects created from the given contextStrs .
154
+
155
+ CreateDefaultContext()
156
+ Return an ArResolverContext that may be bound to this resolver to resolve assets when no other context is explicitly specified.
157
+
158
+ CreateDefaultContextForAsset(assetPath)
159
+ 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.
160
+
161
+ CreateIdentifier(assetPath, anchorAssetPath)
162
+ Returns an identifier for the asset specified by assetPath .
163
+
164
+ CreateIdentifierForNewAsset(assetPath, ...)
165
+ Returns an identifier for a new asset specified by assetPath .
166
+
167
+ GetAssetInfo(assetPath, resolvedPath)
168
+ Returns an ArAssetInfo populated with additional metadata (if any) about the asset at the given assetPath .
169
+
170
+ GetCurrentContext()
171
+ Returns the asset resolver context currently bound in this thread.
172
+
173
+ GetExtension(assetPath)
174
+ Returns the file extension for the given assetPath .
175
+
176
+ GetModificationTimestamp(assetPath, resolvedPath)
177
+ Returns an ArTimestamp representing the last time the asset at assetPath was modified.
178
+
179
+ IsContextDependentPath(assetPath)
180
+ Returns true if assetPath is a context-dependent path, false otherwise.
181
+
182
+ RefreshContext(context)
183
+ Refresh any caches associated with the given context.
184
+
185
+ Resolve(assetPath)
186
+ Returns the resolved path for the asset identified by the given assetPath if it exists.
187
+
188
+ ResolveForNewAsset(assetPath)
189
+ Returns the resolved path for the given assetPath that may be used to create a new asset.
190
+
191
+ CanWriteAssetToPath(resolvedPath, whyNot) → bool
192
+ Returns true if an asset may be written to the given resolvedPath
193
+ , false otherwise.
194
+ If this function returns false and whyNot is not nullptr , it
195
+ may be filled with an explanation.
196
+
197
+ Parameters
198
+
199
+ resolvedPath (ResolvedPath) –
200
+ whyNot (str) –
201
+
202
+ CreateContextFromString(contextStr) → ResolverContext
203
+ Return an ArResolverContext created from the primary ArResolver
204
+ implementation using the given contextStr .
205
+
206
+ Parameters
207
+ contextStr (str) –
208
+
209
+ CreateContextFromString(uriScheme, contextStr) -> ResolverContext
210
+ Return an ArResolverContext created from the ArResolver registered for
211
+ the given uriScheme using the given contextStr .
212
+ An empty uriScheme indicates the primary resolver and is
213
+ equivalent to CreateContextFromString(string).
214
+ If no resolver is registered for uriScheme , returns an empty
215
+ ArResolverContext.
216
+
217
+ Parameters
218
+
219
+ uriScheme (str) –
220
+ contextStr (str) –
221
+
222
+ CreateContextFromStrings(contextStrs) → ResolverContext
223
+ Return an ArResolverContext created by combining the ArResolverContext
224
+ objects created from the given contextStrs .
225
+ contextStrs is a list of pairs of strings. The first element in
226
+ the pair is the URI scheme for the ArResolver that will be used to
227
+ create the ArResolverContext from the second element in the pair. An
228
+ empty URI scheme indicates the primary resolver.
229
+ For example:
230
+ ArResolverContext ctx = ArGetResolver().CreateContextFromStrings(
231
+ { {"", "context str 1"},
232
+ {"my_scheme", "context str 2"} });
233
+
234
+ This will use the primary resolver to create an ArResolverContext
235
+ using the string”context str 1”and use the resolver registered for
236
+ the”my_scheme”URI scheme to create an ArResolverContext using”context
237
+ str 2”. These contexts will be combined into a single
238
+ ArResolverContext and returned.
239
+ If no resolver is registered for a URI scheme in an entry in
240
+ contextStrs , that entry will be ignored.
241
+
242
+ Parameters
243
+ contextStrs (list[tuple[str, str]]) –
244
+
245
+ CreateDefaultContext() → ResolverContext
246
+ Return an ArResolverContext that may be bound to this resolver to
247
+ resolve assets when no other context is explicitly specified.
248
+ The returned ArResolverContext will contain the default context
249
+ returned by the primary resolver and all URI resolvers.
250
+
251
+ CreateDefaultContextForAsset(assetPath) → ResolverContext
252
+ Return an ArResolverContext that may be bound to this resolver to
253
+ resolve the asset located at assetPath or referenced by that asset
254
+ when no other context is explicitly specified.
255
+ The returned ArResolverContext will contain the default context for
256
+ assetPath returned by the primary resolver and all URI resolvers.
257
+
258
+ Parameters
259
+ assetPath (str) –
260
+
261
+ CreateIdentifier(assetPath, anchorAssetPath) → str
262
+ Returns an identifier for the asset specified by assetPath .
263
+ If anchorAssetPath is not empty, it is the resolved asset path
264
+ that assetPath should be anchored to if it is a relative path.
265
+
266
+ Parameters
267
+
268
+ assetPath (str) –
269
+ anchorAssetPath (ResolvedPath) –
270
+
271
+ CreateIdentifierForNewAsset(assetPath, anchorAssetPath) → str
272
+ Returns an identifier for a new asset specified by assetPath .
273
+ If anchorAssetPath is not empty, it is the resolved asset path
274
+ that assetPath should be anchored to if it is a relative path.
275
+
276
+ Parameters
277
+
278
+ assetPath (str) –
279
+ anchorAssetPath (ResolvedPath) –
280
+
281
+ GetAssetInfo(assetPath, resolvedPath) → ArAssetInfo
282
+ Returns an ArAssetInfo populated with additional metadata (if any)
283
+ about the asset at the given assetPath .
284
+ resolvedPath is the resolved path computed for the given
285
+ assetPath .
286
+
287
+ Parameters
288
+
289
+ assetPath (str) –
290
+ resolvedPath (ResolvedPath) –
291
+
292
+ GetCurrentContext() → ResolverContext
293
+ Returns the asset resolver context currently bound in this thread.
294
+ ArResolver::BindContext, ArResolver::UnbindContext
295
+
296
+ GetExtension(assetPath) → str
297
+ Returns the file extension for the given assetPath .
298
+ The returned extension does not include a”.”at the beginning.
299
+
300
+ Parameters
301
+ assetPath (str) –
302
+
303
+ GetModificationTimestamp(assetPath, resolvedPath) → Timestamp
304
+ Returns an ArTimestamp representing the last time the asset at
305
+ assetPath was modified.
306
+ resolvedPath is the resolved path computed for the given
307
+ assetPath . If a timestamp cannot be retrieved, return an invalid
308
+ ArTimestamp.
309
+
310
+ Parameters
311
+
312
+ assetPath (str) –
313
+ resolvedPath (ResolvedPath) –
314
+
315
+ IsContextDependentPath(assetPath) → bool
316
+ Returns true if assetPath is a context-dependent path, false
317
+ otherwise.
318
+ A context-dependent path may result in different resolved paths
319
+ depending on what asset resolver context is bound when Resolve is
320
+ called. Assets located at the same context-dependent path may not be
321
+ the same since those assets may have been loaded from different
322
+ resolved paths. In this case, the assets’resolved paths must be
323
+ consulted to determine if they are the same.
324
+
325
+ Parameters
326
+ assetPath (str) –
327
+
328
+ RefreshContext(context) → None
329
+ Refresh any caches associated with the given context.
330
+ If doing so would invalidate asset paths that had previously been
331
+ resolved, an ArNotice::ResolverChanged notice will be sent to inform
332
+ clients of this.
333
+
334
+ Parameters
335
+ context (ResolverContext) –
336
+
337
+ Resolve(assetPath) → ResolvedPath
338
+ Returns the resolved path for the asset identified by the given
339
+ assetPath if it exists.
340
+ If the asset does not exist, returns an empty ArResolvedPath.
341
+
342
+ Parameters
343
+ assetPath (str) –
344
+
345
+ ResolveForNewAsset(assetPath) → ResolvedPath
346
+ Returns the resolved path for the given assetPath that may be used
347
+ to create a new asset.
348
+ If such a path cannot be computed for assetPath , returns an empty
349
+ ArResolvedPath.
350
+ Note that an asset might or might not already exist at the returned
351
+ resolved path.
352
+
353
+ Parameters
354
+ assetPath (str) –
355
+
356
+ class pxr.Ar.ResolverContext
357
+ An asset resolver context allows clients to provide additional data to
358
+ the resolver for use during resolution. Clients may provide this data
359
+ via context objects of their own (subject to restrictions below). An
360
+ ArResolverContext is simply a wrapper around these objects that allows
361
+ it to be treated as a single type. Note that an ArResolverContext may
362
+ not hold multiple context objects with the same type.
363
+ A client-defined context object must provide the following:
364
+
365
+ Default and copy constructors
366
+ operator<
367
+ operator==
368
+ An overload for size_t hash_value(const T&)
369
+
370
+ Note that the user may define a free function:
371
+ std::string ArGetDebugString(const Context & ctx); (Where Context is
372
+ the type of the user’s path resolver context.)
373
+ This is optional; a default generic implementation has been
374
+ predefined. This function should return a string representation of the
375
+ context to be utilized for debugging purposes(such as in TF_DEBUG
376
+ statements).
377
+ The ArIsContextObject template must also be specialized for this
378
+ object to declare that it can be used as a context object. This is to
379
+ avoid accidental use of an unexpected object as a context object. The
380
+ AR_DECLARE_RESOLVER_CONTEXT macro can be used to do this as a
381
+ convenience.
382
+ AR_DECLARE_RESOLVER_CONTEXT
383
+ ArResolver::BindContext
384
+ ArResolver::UnbindContext
385
+ ArResolverContextBinder
386
+ Methods:
387
+
388
+ Get()
389
+ Returns pointer to the context object of the given type held in this resolver context.
390
+
391
+ GetDebugString()
392
+ Returns a debug string representing the contained context objects.
393
+
394
+ IsEmpty()
395
+ Returns whether this resolver context is empty.
396
+
397
+ Get() → ContextObj
398
+ Returns pointer to the context object of the given type held in this
399
+ resolver context.
400
+ Returns None if this resolver context is not holding an object of the
401
+ requested type.
402
+
403
+ GetDebugString() → str
404
+ Returns a debug string representing the contained context objects.
405
+
406
+ IsEmpty() → bool
407
+ Returns whether this resolver context is empty.
408
+
409
+ class pxr.Ar.ResolverContextBinder
410
+ Helper object for managing the binding and unbinding of
411
+ ArResolverContext objects with the asset resolver.
412
+ Asset Resolver Context Operations
413
+
414
+ class pxr.Ar.ResolverScopedCache
415
+ Helper object for managing asset resolver cache scopes.
416
+ A scoped resolution cache indicates to the resolver that results of
417
+ calls to Resolve should be cached for a certain scope. This is
418
+ important for performance and also for consistency it ensures that
419
+ repeated calls to Resolve with the same parameters will return the
420
+ same result.
421
+ Scoped Resolution Cache
422
+
423
+ class pxr.Ar.Timestamp
424
+ Represents a timestamp for an asset. Timestamps are represented by
425
+ Unix time, the number of seconds elapsed since 00:00:00 UTC 1/1/1970.
426
+ Methods:
427
+
428
+ GetTime()
429
+ Return the time represented by this timestamp as a double.
430
+
431
+ IsValid()
432
+ Return true if this timestamp is valid, false otherwise.
433
+
434
+ GetTime() → float
435
+ Return the time represented by this timestamp as a double.
436
+ If this timestamp is invalid, issue a coding error and return a quiet
437
+ NaN value.
438
+
439
+ IsValid() → bool
440
+ Return true if this timestamp is valid, false otherwise.
441
+
442
+ © Copyright 2019-2023, NVIDIA.
443
+ Last updated on Nov 14, 2023.
444
+
445
+
446
+
CameraUtil.md ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ CameraUtil module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ CameraUtil module
10
+
11
+  
12
+
13
+ # CameraUtil module
14
+
15
+ Summary: Camera Utilities
16
+
17
+ Camera utilities.
18
+ Classes:
19
+
20
+ ConformWindowPolicy
21
+
22
+ Framing
23
+ Framing information.
24
+
25
+ ScreenWindowParameters
26
+ Given a camera object, compute parameters suitable for setting up RenderMan.
27
+
28
+ class pxr.CameraUtil.ConformWindowPolicy
29
+ Methods:
30
+
31
+ GetValueFromName
32
+
33
+ Attributes:
34
+
35
+ allValues
36
+
37
+ static GetValueFromName()
38
+
39
+ allValues = (CameraUtil.MatchVertically, CameraUtil.MatchHorizontally, CameraUtil.Fit, CameraUtil.Crop, CameraUtil.DontConform)
40
+
41
+ class pxr.CameraUtil.Framing
42
+ Framing information. That is information determining how the filmback
43
+ plane of a camera maps to the pixels of the rendered image
44
+ (displayWindow together with pixelAspectRatio and window policy) and
45
+ what pixels of the image will be filled by the renderer (dataWindow).
46
+ The concepts of displayWindow and dataWindow are similar to the ones
47
+ in OpenEXR, including that the x- and y-axis of the coordinate system
48
+ point left and down, respectively.
49
+ In fact, these windows mean the same here and in OpenEXR if the
50
+ displayWindow has the same aspect ratio (when accounting for the
51
+ pixelAspectRatio) as the filmback plane of the camera has (that is the
52
+ ratio of the horizontalAperture to verticalAperture of, e.g., Usd’s
53
+ Camera or GfCamera).
54
+ In particular, overscan can be achieved by making the dataWindow
55
+ larger than the displayWindow.
56
+ If the aspect ratios differ, a window policy is applied to the
57
+ displayWindow to determine how the pixels correspond to the filmback
58
+ plane. One such window policy is to take the largest rect that fits
59
+ (centered) into the displayWindow and has the camera’s aspect ratio.
60
+ For example, if the displayWindow and dataWindow are the same and both
61
+ have an aspect ratio smaller than the camera, the image is created by
62
+ enlarging the camera frustum slightly in the bottom and top direction.
63
+ When using the AOVs, the render buffer size is determined
64
+ independently from the framing info. However, the dataWindow is
65
+ supposed to be contained in the render buffer rect (in particular, the
66
+ dataWindow cannot contain pixels withs negative coordinates - this
67
+ restriction does not apply if, e.g., hdPrman circumvents AOVs and
68
+ writes directly to EXR). In other words, unlike in OpenEXR, the rect
69
+ of pixels for which we allocate storage can differ from the rect the
70
+ renderer fills with data (dataWindow).
71
+ For example, an application can set the render buffer size to match
72
+ the widget size but use a dataWindow and displayWindow that only fills
73
+ the render buffer horizontally to have slates at the top and bottom.
74
+ Methods:
75
+
76
+ ApplyToProjectionMatrix(projectionMatrix, ...)
77
+ Given the projectionMatrix computed from a camera, applies the framing.
78
+
79
+ IsValid()
80
+ Is display and data window non-empty.
81
+
82
+ Attributes:
83
+
84
+ dataWindow
85
+
86
+ displayWindow
87
+
88
+ pixelAspectRatio
89
+
90
+ ApplyToProjectionMatrix(projectionMatrix, windowPolicy) → Matrix4d
91
+ Given the projectionMatrix computed from a camera, applies the
92
+ framing.
93
+ To obtain a correct result, a rasterizer needs to use the resulting
94
+ projection matrix and set the viewport to the data window.
95
+
96
+ Parameters
97
+
98
+ projectionMatrix (Matrix4d) –
99
+ windowPolicy (ConformWindowPolicy) –
100
+
101
+ IsValid() → bool
102
+ Is display and data window non-empty.
103
+
104
+ property dataWindow
105
+
106
+ property displayWindow
107
+
108
+ property pixelAspectRatio
109
+
110
+ class pxr.CameraUtil.ScreenWindowParameters
111
+ Given a camera object, compute parameters suitable for setting up
112
+ RenderMan.
113
+ Attributes:
114
+
115
+ fieldOfView
116
+ float
117
+
118
+ screenWindow
119
+ Vec4d
120
+
121
+ zFacingViewMatrix
122
+ Matrix4d
123
+
124
+ property fieldOfView
125
+ float
126
+ The field of view.
127
+ More precisely, the full angle perspective field of view (in degrees)
128
+ between screen space coordinates (-1,0) and (1,0). Give these
129
+ parameters to RiProjection as parameter after”perspective”.
130
+
131
+ Type
132
+ type
133
+
134
+ property screenWindow
135
+ Vec4d
136
+ The vector (left, right, bottom, top) defining the rectangle in the
137
+ image plane.
138
+ Give these parameters to RiScreenWindow.
139
+
140
+ Type
141
+ type
142
+
143
+ property zFacingViewMatrix
144
+ Matrix4d
145
+ Returns the inverse of the transform for a camera that is y-Up and
146
+ z-facing (vs the OpenGL camera that is (-z)-facing).
147
+ Write this transform with RiConcatTransform before RiWorldBegin.
148
+
149
+ Type
150
+ type
151
+
152
+ © Copyright 2019-2023, NVIDIA.
153
+ Last updated on Nov 14, 2023.
154
+
155
+
156
+
Garch.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Garch module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Garch module
10
+
11
+  
12
+
13
+ # Garch module
14
+
15
+ Summary: GL Architecture
16
+
17
+ garch
18
+ Classes:
19
+
20
+ GLPlatformDebugContext
21
+ Platform specific context (e.g.
22
+
23
+ class pxr.Garch.GLPlatformDebugContext
24
+ Platform specific context (e.g. X11/GLX) which supports debug output.
25
+ Methods:
26
+
27
+ makeCurrent()
28
+
29
+ Attributes:
30
+
31
+ expired
32
+ True if this object has expired, False otherwise.
33
+
34
+ makeCurrent() → None
35
+
36
+ property expired
37
+ True if this object has expired, False otherwise.
38
+
39
+ © Copyright 2019-2023, NVIDIA.
40
+ Last updated on Nov 14, 2023.
41
+
42
+
43
+
GeomUtil.md ADDED
@@ -0,0 +1,455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ GeomUtil module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ GeomUtil module
10
+
11
+  
12
+
13
+ # GeomUtil module
14
+
15
+ Summary: The GeomUtil module contains utilities to help image common geometry.
16
+
17
+ Utilities to help image common geometry.
18
+ Classes:
19
+
20
+ CapsuleMeshGenerator
21
+ This class provides an implementation for generating topology and point positions on a capsule.
22
+
23
+ ConeMeshGenerator
24
+ This class provides an implementation for generating topology and point positions on a cone of a given radius and height.
25
+
26
+ CuboidMeshGenerator
27
+ 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.
28
+
29
+ CylinderMeshGenerator
30
+ This class provides an implementation for generating topology and point positions on a cylinder with a given radius and height.
31
+
32
+ SphereMeshGenerator
33
+ This class provides an implementation for generating topology and point positions on a sphere with a given radius.
34
+
35
+ class pxr.GeomUtil.CapsuleMeshGenerator
36
+ This class provides an implementation for generating topology and
37
+ point positions on a capsule.
38
+ The simplest form takes a radius and height and is a cylinder capped
39
+ by two hemispheres that is centered at the origin. The generated
40
+ capsule is made up of circular cross-sections in the XY plane. Each
41
+ cross-section has numRadial segments. Successive cross-sections for
42
+ each of the hemispheres are generated at numCapAxial locations along
43
+ the Z and -Z axes respectively. The height is aligned with the Z axis
44
+ and represents the height of just the cylindrical portion.
45
+ An optional transform may be provided to GeneratePoints to orient the
46
+ capsule as necessary (e.g., whose height is along the Y axis).
47
+ An additional overload of GeneratePoints is provided to specify
48
+ different radii and heights for the bottom and top caps, as well as
49
+ the sweep angle for the capsule about the +Z axis. When the sweep is
50
+ less than 360 degrees, the generated geometry is not closed.
51
+ Usage:
52
+ const size_t numRadial = 4, numCapAxial = 4;
53
+ const size_t numPoints =
54
+ GeomUtilCapsuleMeshGenerator::ComputeNumPoints(numRadial, numCapAxial);
55
+ const float radius = 1, height = 2;
56
+
57
+ MyPointContainer<GfVec3f> points(numPoints);
58
+
59
+ GeomUtilCapsuleMeshGenerator::GeneratePoints(
60
+ points.begin(), numRadial, numCapAxial, radius, height);
61
+
62
+ Methods:
63
+
64
+ ComputeNumPoints
65
+ classmethod ComputeNumPoints(numRadial, numCapAxial, closedSweep) -> int
66
+
67
+ GeneratePoints
68
+ classmethod GeneratePoints(iter, numRadial, numCapAxial, radius, height, framePtr) -> None
69
+
70
+ GenerateTopology
71
+ classmethod GenerateTopology(numRadial, numCapAxial, closedSweep) -> MeshTopology
72
+
73
+ Attributes:
74
+
75
+ minNumCapAxial
76
+
77
+ minNumRadial
78
+
79
+ static ComputeNumPoints()
80
+ classmethod ComputeNumPoints(numRadial, numCapAxial, closedSweep) -> int
81
+
82
+ Parameters
83
+
84
+ numRadial (int) –
85
+ numCapAxial (int) –
86
+ closedSweep (bool) –
87
+
88
+ static GeneratePoints()
89
+ classmethod GeneratePoints(iter, numRadial, numCapAxial, radius, height, framePtr) -> None
90
+
91
+ Parameters
92
+
93
+ iter (PointIterType) –
94
+ numRadial (int) –
95
+ numCapAxial (int) –
96
+ radius (ScalarType) –
97
+ height (ScalarType) –
98
+ framePtr (Matrix4d) –
99
+
100
+ GeneratePoints(iter, numRadial, numCapAxial, bottomRadius, topRadius, height, bottomCapHeight, topCapHeight, sweepDegrees, framePtr) -> None
101
+
102
+ Parameters
103
+
104
+ iter (PointIterType) –
105
+ numRadial (int) –
106
+ numCapAxial (int) –
107
+ bottomRadius (ScalarType) –
108
+ topRadius (ScalarType) –
109
+ height (ScalarType) –
110
+ bottomCapHeight (ScalarType) –
111
+ topCapHeight (ScalarType) –
112
+ sweepDegrees (ScalarType) –
113
+ framePtr (Matrix4d) –
114
+
115
+ GeneratePoints(iter, arg2) -> None
116
+
117
+ Parameters
118
+
119
+ iter (PointIterType) –
120
+ arg2 –
121
+
122
+ static GenerateTopology()
123
+ classmethod GenerateTopology(numRadial, numCapAxial, closedSweep) -> MeshTopology
124
+
125
+ Parameters
126
+
127
+ numRadial (int) –
128
+ numCapAxial (int) –
129
+ closedSweep (bool) –
130
+
131
+ minNumCapAxial = 1
132
+
133
+ minNumRadial = 3
134
+
135
+ class pxr.GeomUtil.ConeMeshGenerator
136
+ This class provides an implementation for generating topology and
137
+ point positions on a cone of a given radius and height.
138
+ The cone is made up of circular cross-sections in the XY plane and is
139
+ centered at the origin. Each cross-section has numRadial segments. The
140
+ height is aligned with the Z axis, with the base of the object at Z =
141
+ -h/2 and apex at Z = h/2.
142
+ An optional transform may be provided to GeneratePoints to orient the
143
+ cone as necessary (e.g., whose height is along the Y axis).
144
+ An additional overload of GeneratePoints is provided to specify the
145
+ sweep angle for the cone about the +Z axis. When the sweep is less
146
+ than 360 degrees, the generated geometry is not closed.
147
+ Usage:
148
+ const size_t numRadial = 8;
149
+ const size_t numPoints =
150
+ GeomUtilConeMeshGenerator::ComputeNumPoints(numRadial);
151
+ const float radius = 1, height = 2;
152
+
153
+ MyPointContainer<GfVec3f> points(numPoints);
154
+
155
+ GeomUtilConeMeshGenerator::GeneratePoints(
156
+ points.begin(), numRadial, radius, height);
157
+
158
+ Methods:
159
+
160
+ ComputeNumPoints
161
+ classmethod ComputeNumPoints(numRadial, closedSweep) -> int
162
+
163
+ GeneratePoints
164
+ classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None
165
+
166
+ GenerateTopology
167
+ classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology
168
+
169
+ Attributes:
170
+
171
+ minNumRadial
172
+
173
+ static ComputeNumPoints()
174
+ classmethod ComputeNumPoints(numRadial, closedSweep) -> int
175
+
176
+ Parameters
177
+
178
+ numRadial (int) –
179
+ closedSweep (bool) –
180
+
181
+ static GeneratePoints()
182
+ classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None
183
+
184
+ Parameters
185
+
186
+ iter (PointIterType) –
187
+ numRadial (int) –
188
+ radius (ScalarType) –
189
+ height (ScalarType) –
190
+ framePtr (Matrix4d) –
191
+
192
+ GeneratePoints(iter, numRadial, radius, height, sweepDegrees, framePtr) -> None
193
+
194
+ Parameters
195
+
196
+ iter (PointIterType) –
197
+ numRadial (int) –
198
+ radius (ScalarType) –
199
+ height (ScalarType) –
200
+ sweepDegrees (ScalarType) –
201
+ framePtr (Matrix4d) –
202
+
203
+ GeneratePoints(iter, arg2) -> None
204
+
205
+ Parameters
206
+
207
+ iter (PointIterType) –
208
+ arg2 –
209
+
210
+ static GenerateTopology()
211
+ classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology
212
+
213
+ Parameters
214
+
215
+ numRadial (int) –
216
+ closedSweep (bool) –
217
+
218
+ minNumRadial = 3
219
+
220
+ class pxr.GeomUtil.CuboidMeshGenerator
221
+ This class provides an implementation for generating topology and
222
+ point positions on a rectangular cuboid given the dimensions along the
223
+ X, Y and Z axes.
224
+ The generated cuboid is centered at the origin.
225
+ An optional transform may be provided to GeneratePoints to orient the
226
+ cuboid as necessary.
227
+ Usage:
228
+ const size_t numPoints =
229
+ GeomUtilCuboidMeshGenerator::ComputeNumPoints();
230
+ const float l = 5, b = 4, h = 3;
231
+
232
+ MyPointContainer<GfVec3f> points(numPoints);
233
+
234
+ GeomUtilCuboidMeshGenerator::GeneratePoints(
235
+ points.begin(), l, b, h);
236
+
237
+ Methods:
238
+
239
+ ComputeNumPoints
240
+ classmethod ComputeNumPoints() -> int
241
+
242
+ GeneratePoints
243
+ classmethod GeneratePoints(iter, xLength, yLength, zLength, framePtr) -> None
244
+
245
+ GenerateTopology
246
+ classmethod GenerateTopology() -> MeshTopology
247
+
248
+ static ComputeNumPoints()
249
+ classmethod ComputeNumPoints() -> int
250
+
251
+ static GeneratePoints()
252
+ classmethod GeneratePoints(iter, xLength, yLength, zLength, framePtr) -> None
253
+
254
+ Parameters
255
+
256
+ iter (PointIterType) –
257
+ xLength (ScalarType) –
258
+ yLength (ScalarType) –
259
+ zLength (ScalarType) –
260
+ framePtr (Matrix4d) –
261
+
262
+ GeneratePoints(iter, arg2) -> None
263
+
264
+ Parameters
265
+
266
+ iter (PointIterType) –
267
+ arg2 –
268
+
269
+ static GenerateTopology()
270
+ classmethod GenerateTopology() -> MeshTopology
271
+
272
+ class pxr.GeomUtil.CylinderMeshGenerator
273
+ This class provides an implementation for generating topology and
274
+ point positions on a cylinder with a given radius and height.
275
+ The cylinder is made up of circular cross-sections in the XY plane and
276
+ is centered at the origin. Each cross-section has numRadial segments.
277
+ The height is aligned with the Z axis, with the base at Z = -h/2.
278
+ An optional transform may be provided to GeneratePoints to orient the
279
+ cone as necessary (e.g., whose height is along the Y axis).
280
+ An additional overload of GeneratePoints is provided to specify
281
+ different radii for the bottom and top discs of the cylinder and a
282
+ sweep angle for cylinder about the +Z axis. When the sweep is less
283
+ than 360 degrees, the generated geometry is not closed.
284
+ Setting one radius to 0 in order to get a cone is inefficient and
285
+ could result in artifacts. Clients should use
286
+ GeomUtilConeMeshGenerator instead. Usage:
287
+ const size_t numRadial = 8;
288
+ const size_t numPoints =
289
+ GeomUtilCylinderMeshGenerator::ComputeNumPoints(numRadial);
290
+ const float radius = 1, height = 2;
291
+
292
+ MyPointContainer<GfVec3f> points(numPoints);
293
+
294
+ GeomUtilCylinderMeshGenerator::GeneratePoints(
295
+ points.begin(), numRadial, radius, height);
296
+
297
+ Methods:
298
+
299
+ ComputeNumPoints
300
+ classmethod ComputeNumPoints(numRadial, closedSweep) -> int
301
+
302
+ GeneratePoints
303
+ classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None
304
+
305
+ GenerateTopology
306
+ classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology
307
+
308
+ Attributes:
309
+
310
+ minNumRadial
311
+
312
+ static ComputeNumPoints()
313
+ classmethod ComputeNumPoints(numRadial, closedSweep) -> int
314
+
315
+ Parameters
316
+
317
+ numRadial (int) –
318
+ closedSweep (bool) –
319
+
320
+ static GeneratePoints()
321
+ classmethod GeneratePoints(iter, numRadial, radius, height, framePtr) -> None
322
+
323
+ Parameters
324
+
325
+ iter (PointIterType) –
326
+ numRadial (int) –
327
+ radius (ScalarType) –
328
+ height (ScalarType) –
329
+ framePtr (Matrix4d) –
330
+
331
+ GeneratePoints(iter, numRadial, bottomRadius, topRadius, height, sweepDegrees, framePtr) -> None
332
+
333
+ Parameters
334
+
335
+ iter (PointIterType) –
336
+ numRadial (int) –
337
+ bottomRadius (ScalarType) –
338
+ topRadius (ScalarType) –
339
+ height (ScalarType) –
340
+ sweepDegrees (ScalarType) –
341
+ framePtr (Matrix4d) –
342
+
343
+ GeneratePoints(iter, arg2) -> None
344
+
345
+ Parameters
346
+
347
+ iter (PointIterType) –
348
+ arg2 –
349
+
350
+ static GenerateTopology()
351
+ classmethod GenerateTopology(numRadial, closedSweep) -> MeshTopology
352
+
353
+ Parameters
354
+
355
+ numRadial (int) –
356
+ closedSweep (bool) –
357
+
358
+ minNumRadial = 3
359
+
360
+ class pxr.GeomUtil.SphereMeshGenerator
361
+ This class provides an implementation for generating topology and
362
+ point positions on a sphere with a given radius.
363
+ The sphere is made up of circular cross-sections in the XY plane and
364
+ is centered at the origin. Each cross-section has numRadial segments.
365
+ Successive cross-sections are generated at numAxial locations along
366
+ the Z axis, with the bottom of the sphere at Z = -r and top at Z = r.
367
+ An optional transform may be provided to GeneratePoints to orient the
368
+ sphere as necessary (e.g., cross-sections in the YZ plane).
369
+ An additional overload of GeneratePoints is provided to specify a
370
+ sweep angle for the sphere about the +Z axis. When the sweep is less
371
+ than 360 degrees, the generated geometry is not closed.
372
+ Usage:
373
+ const size_t numRadial = 4, numAxial = 4;
374
+ const size_t numPoints =
375
+ GeomUtilSphereMeshGenerator::ComputeNumPoints(numRadial, numAxial);
376
+ const float radius = 5;
377
+
378
+ MyPointContainer<GfVec3f> points(numPoints);
379
+
380
+ GeomUtilSphereMeshGenerator::GeneratePoints(
381
+ points.begin(), numRadial, numAxial, radius);
382
+
383
+ Methods:
384
+
385
+ ComputeNumPoints
386
+ classmethod ComputeNumPoints(numRadial, numAxial, closedSweep) -> int
387
+
388
+ GeneratePoints
389
+ classmethod GeneratePoints(iter, numRadial, numAxial, radius, framePtr) -> None
390
+
391
+ GenerateTopology
392
+ classmethod GenerateTopology(numRadial, numAxial, closedSweep) -> MeshTopology
393
+
394
+ Attributes:
395
+
396
+ minNumAxial
397
+
398
+ minNumRadial
399
+
400
+ static ComputeNumPoints()
401
+ classmethod ComputeNumPoints(numRadial, numAxial, closedSweep) -> int
402
+
403
+ Parameters
404
+
405
+ numRadial (int) –
406
+ numAxial (int) –
407
+ closedSweep (bool) –
408
+
409
+ static GeneratePoints()
410
+ classmethod GeneratePoints(iter, numRadial, numAxial, radius, framePtr) -> None
411
+
412
+ Parameters
413
+
414
+ iter (PointIterType) –
415
+ numRadial (int) –
416
+ numAxial (int) –
417
+ radius (ScalarType) –
418
+ framePtr (Matrix4d) –
419
+
420
+ GeneratePoints(iter, numRadial, numAxial, radius, sweepDegrees, framePtr) -> None
421
+
422
+ Parameters
423
+
424
+ iter (PointIterType) –
425
+ numRadial (int) –
426
+ numAxial (int) –
427
+ radius (ScalarType) –
428
+ sweepDegrees (ScalarType) –
429
+ framePtr (Matrix4d) –
430
+
431
+ GeneratePoints(iter, arg2) -> None
432
+
433
+ Parameters
434
+
435
+ iter (PointIterType) –
436
+ arg2 –
437
+
438
+ static GenerateTopology()
439
+ classmethod GenerateTopology(numRadial, numAxial, closedSweep) -> MeshTopology
440
+
441
+ Parameters
442
+
443
+ numRadial (int) –
444
+ numAxial (int) –
445
+ closedSweep (bool) –
446
+
447
+ minNumAxial = 2
448
+
449
+ minNumRadial = 3
450
+
451
+ © Copyright 2019-2023, NVIDIA.
452
+ Last updated on Nov 14, 2023.
453
+
454
+
455
+
Gf.md ADDED
The diff for this file is too large to render. See raw diff
 
Glf.md ADDED
@@ -0,0 +1,477 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Glf module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Glf module
10
+
11
+  
12
+
13
+ # Glf module
14
+
15
+ Summary: The Glf module contains Utility classes for OpenGL output.
16
+
17
+ glf
18
+ Classes:
19
+
20
+ DrawTarget
21
+ A class representing a GL render target with mutliple image attachments.
22
+
23
+ GLQueryObject
24
+ Represents a GL query object in Glf
25
+
26
+ SimpleLight
27
+
28
+ SimpleMaterial
29
+
30
+ Texture
31
+ Represents a texture object in Glf.
32
+
33
+ class pxr.Glf.DrawTarget
34
+ A class representing a GL render target with mutliple image
35
+ attachments.
36
+ A DrawTarget is essentially a custom render pass into which several
37
+ arbitrary variables can be output into. These can later be used as
38
+ texture samplers by GLSL shaders.
39
+ The DrawTarget maintains a map of named attachments that correspond to
40
+ GL_TEXTURE_2D mages. By default, DrawTargets also create a depth
41
+ component that is used both as a depth buffer during the draw pass,
42
+ and can later be accessed as a regular GL_TEXTURE_2D data. Stencils
43
+ are also available (by setting the format to GL_DEPTH_STENCIL and the
44
+ internalFormat to GL_DEPTH24_STENCIL8)
45
+ Methods:
46
+
47
+ AddAttachment(name, format, type, internalFormat)
48
+ Add an attachment to the DrawTarget.
49
+
50
+ Bind()
51
+ Binds the framebuffer.
52
+
53
+ Unbind()
54
+ Unbinds the framebuffer.
55
+
56
+ WriteToFile(name, filename, viewMatrix, ...)
57
+ Write the Attachment buffer to an image file (debugging).
58
+
59
+ Attributes:
60
+
61
+ expired
62
+ True if this object has expired, False otherwise.
63
+
64
+ AddAttachment(name, format, type, internalFormat) → None
65
+ Add an attachment to the DrawTarget.
66
+
67
+ Parameters
68
+
69
+ name (str) –
70
+ format (GLenum) –
71
+ type (GLenum) –
72
+ internalFormat (GLenum) –
73
+
74
+ Bind() → None
75
+ Binds the framebuffer.
76
+
77
+ Unbind() → None
78
+ Unbinds the framebuffer.
79
+
80
+ WriteToFile(name, filename, viewMatrix, projectionMatrix) → bool
81
+ Write the Attachment buffer to an image file (debugging).
82
+
83
+ Parameters
84
+
85
+ name (str) –
86
+ filename (str) –
87
+ viewMatrix (Matrix4d) –
88
+ projectionMatrix (Matrix4d) –
89
+
90
+ property expired
91
+ True if this object has expired, False otherwise.
92
+
93
+ class pxr.Glf.GLQueryObject
94
+ Represents a GL query object in Glf
95
+ Methods:
96
+
97
+ Begin(target)
98
+ 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.
99
+
100
+ BeginPrimitivesGenerated()
101
+ equivalent to Begin(GL_PRIMITIVES_GENERATED).
102
+
103
+ BeginSamplesPassed()
104
+ equivalent to Begin(GL_SAMPLES_PASSED).
105
+
106
+ BeginTimeElapsed()
107
+ equivalent to Begin(GL_TIME_ELAPSED).
108
+
109
+ End()
110
+ End query.
111
+
112
+ GetResult()
113
+ Return the query result (synchronous) stalls CPU until the result becomes available.
114
+
115
+ GetResultNoWait()
116
+ Return the query result (asynchronous) returns 0 if the result hasn't been available.
117
+
118
+ Begin(target) → None
119
+ Begin query for the given target target has to be one of
120
+ GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED,
121
+ GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED
122
+ GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED,
123
+ GL_TIMESTAMP.
124
+
125
+ Parameters
126
+ target (GLenum) –
127
+
128
+ BeginPrimitivesGenerated() → None
129
+ equivalent to Begin(GL_PRIMITIVES_GENERATED).
130
+ The number of primitives sent to the rasterizer by the scoped drawing
131
+ command will be returned.
132
+
133
+ BeginSamplesPassed() → None
134
+ equivalent to Begin(GL_SAMPLES_PASSED).
135
+ The number of samples that pass the depth test for all drawing
136
+ commands within the scope of the query will be returned.
137
+
138
+ BeginTimeElapsed() → None
139
+ equivalent to Begin(GL_TIME_ELAPSED).
140
+ The time that it takes for the GPU to execute all of the scoped
141
+ commands will be returned in nanoseconds.
142
+
143
+ End() → None
144
+ End query.
145
+
146
+ GetResult() → int
147
+ Return the query result (synchronous) stalls CPU until the result
148
+ becomes available.
149
+
150
+ GetResultNoWait() → int
151
+ Return the query result (asynchronous) returns 0 if the result hasn’t
152
+ been available.
153
+
154
+ class pxr.Glf.SimpleLight
155
+ Attributes:
156
+
157
+ ambient
158
+ None
159
+
160
+ attenuation
161
+ None
162
+
163
+ diffuse
164
+ None
165
+
166
+ hasShadow
167
+ None
168
+
169
+ id
170
+
171
+ isCameraSpaceLight
172
+ None
173
+
174
+ isDomeLight
175
+ None
176
+
177
+ position
178
+ None
179
+
180
+ shadowBias
181
+ None
182
+
183
+ shadowBlur
184
+ None
185
+
186
+ shadowIndexEnd
187
+ None
188
+
189
+ shadowIndexStart
190
+ None
191
+
192
+ shadowMatrices
193
+ None
194
+
195
+ shadowResolution
196
+ None
197
+
198
+ specular
199
+ None
200
+
201
+ spotCutoff
202
+ None
203
+
204
+ spotDirection
205
+ None
206
+
207
+ spotFalloff
208
+ None
209
+
210
+ transform
211
+ None
212
+
213
+ property ambient
214
+ None
215
+
216
+ type : Vec4f
217
+
218
+ Type
219
+ type
220
+
221
+ property attenuation
222
+ None
223
+
224
+ type : Vec3f
225
+
226
+ Type
227
+ type
228
+
229
+ property diffuse
230
+ None
231
+
232
+ type : Vec4f
233
+
234
+ Type
235
+ type
236
+
237
+ property hasShadow
238
+ None
239
+
240
+ Type
241
+ type
242
+
243
+ property id
244
+
245
+ property isCameraSpaceLight
246
+ None
247
+
248
+ type : bool
249
+
250
+ Type
251
+ type
252
+
253
+ property isDomeLight
254
+ None
255
+
256
+ type : bool
257
+
258
+ Type
259
+ type
260
+
261
+ property position
262
+ None
263
+
264
+ type : Vec4f
265
+
266
+ Type
267
+ type
268
+
269
+ property shadowBias
270
+ None
271
+
272
+ type : float
273
+
274
+ Type
275
+ type
276
+
277
+ property shadowBlur
278
+ None
279
+
280
+ type : float
281
+
282
+ Type
283
+ type
284
+
285
+ property shadowIndexEnd
286
+ None
287
+
288
+ type : int
289
+
290
+ Type
291
+ type
292
+
293
+ property shadowIndexStart
294
+ None
295
+
296
+ type : int
297
+
298
+ Type
299
+ type
300
+
301
+ property shadowMatrices
302
+ None
303
+
304
+ type : list[Matrix4d]
305
+
306
+ Type
307
+ type
308
+
309
+ property shadowResolution
310
+ None
311
+
312
+ type : int
313
+
314
+ Type
315
+ type
316
+
317
+ property specular
318
+ None
319
+
320
+ type : Vec4f
321
+
322
+ Type
323
+ type
324
+
325
+ property spotCutoff
326
+ None
327
+
328
+ type : float
329
+
330
+ Type
331
+ type
332
+
333
+ property spotDirection
334
+ None
335
+
336
+ type : Vec3f
337
+
338
+ Type
339
+ type
340
+
341
+ property spotFalloff
342
+ None
343
+
344
+ type : float
345
+
346
+ Type
347
+ type
348
+
349
+ property transform
350
+ None
351
+
352
+ type : Matrix4d
353
+
354
+ Type
355
+ type
356
+
357
+ class pxr.Glf.SimpleMaterial
358
+ Attributes:
359
+
360
+ ambient
361
+ None
362
+
363
+ diffuse
364
+ None
365
+
366
+ emission
367
+ None
368
+
369
+ shininess
370
+ None
371
+
372
+ specular
373
+ None
374
+
375
+ property ambient
376
+ None
377
+
378
+ type : Vec4f
379
+
380
+ Type
381
+ type
382
+
383
+ property diffuse
384
+ None
385
+
386
+ type : Vec4f
387
+
388
+ Type
389
+ type
390
+
391
+ property emission
392
+ None
393
+
394
+ type : Vec4f
395
+
396
+ Type
397
+ type
398
+
399
+ property shininess
400
+ None
401
+
402
+ type : float
403
+
404
+ Type
405
+ type
406
+
407
+ property specular
408
+ None
409
+
410
+ type : Vec4f
411
+
412
+ Type
413
+ type
414
+
415
+ class pxr.Glf.Texture
416
+ Represents a texture object in Glf.
417
+ A texture is typically defined by reading texture image data from an
418
+ image file but a texture might also represent an attachment of a draw
419
+ target.
420
+ Methods:
421
+
422
+ GetTextureMemoryAllocated
423
+ classmethod GetTextureMemoryAllocated() -> int
424
+
425
+ Attributes:
426
+
427
+ magFilterSupported
428
+ bool
429
+
430
+ memoryRequested
431
+ None
432
+
433
+ memoryUsed
434
+ int
435
+
436
+ minFilterSupported
437
+ bool
438
+
439
+ static GetTextureMemoryAllocated()
440
+ classmethod GetTextureMemoryAllocated() -> int
441
+ static reporting function
442
+
443
+ property magFilterSupported
444
+ bool
445
+
446
+ Type
447
+ type
448
+
449
+ property memoryRequested
450
+ None
451
+ Specify the amount of memory the user wishes to allocate to the
452
+ texture.
453
+
454
+ type : int
455
+ Amount of memory the user wishes to allocate to the texture.
456
+
457
+ Type
458
+ type
459
+
460
+ property memoryUsed
461
+ int
462
+ Amount of memory used to store the texture.
463
+
464
+ Type
465
+ type
466
+
467
+ property minFilterSupported
468
+ bool
469
+
470
+ Type
471
+ type
472
+
473
+ © Copyright 2019-2023, NVIDIA.
474
+ Last updated on Nov 14, 2023.
475
+
476
+
477
+
Kind.md ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Kind module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Kind module
10
+
11
+  
12
+
13
+ # Kind module
14
+
15
+ Summary: The Kind library provides a runtime-extensible taxonomy known as “kinds”. Useful for classifying scenegraph objects.
16
+
17
+ Python bindings for libKind
18
+ Classes:
19
+
20
+ Registry
21
+ A singleton that holds known kinds and information about them.
22
+
23
+ Tokens
24
+
25
+ class pxr.Kind.Registry
26
+ A singleton that holds known kinds and information about them. See
27
+ Kind Overview for a description of why kind exists, what the builtin
28
+ registered kinds are, and how to extend the core kinds.
29
+
30
+ ## KindRegistry Threadsafty
31
+
32
+ KindRegistry serves performance-critical clients that operate under
33
+ the stl threading model, and therefore itself follows that model in
34
+ order to avoid locking during HasKind() and IsA() queries.
35
+ To make this robust, KindRegistry exposes no means to mutate the
36
+ registry. All extensions must be accomplished via plugInfo.json files,
37
+ which are consumed once during the registry initialization (See
38
+ Extending the KindRegistry)
39
+ Methods:
40
+
41
+ GetAllKinds
42
+ classmethod GetAllKinds() -> list[str]
43
+
44
+ GetBaseKind
45
+ classmethod GetBaseKind(kind) -> str
46
+
47
+ HasKind
48
+ classmethod HasKind(kind) -> bool
49
+
50
+ IsA
51
+ classmethod IsA(derivedKind, baseKind) -> bool
52
+
53
+ Attributes:
54
+
55
+ expired
56
+ True if this object has expired, False otherwise.
57
+
58
+ static GetAllKinds()
59
+ classmethod GetAllKinds() -> list[str]
60
+ Return an unordered vector of all kinds known to the registry.
61
+
62
+ static GetBaseKind()
63
+ classmethod GetBaseKind(kind) -> str
64
+ Return the base kind of the given kind.
65
+ If there is no base, the result will be an empty token. Issues a
66
+ coding error if kind is unknown to the registry.
67
+
68
+ Parameters
69
+ kind (str) –
70
+
71
+ static HasKind()
72
+ classmethod HasKind(kind) -> bool
73
+ Test whether kind is known to the registry.
74
+
75
+ Parameters
76
+ kind (str) –
77
+
78
+ static IsA()
79
+ classmethod IsA(derivedKind, baseKind) -> bool
80
+ Test whether derivedKind is the same as baseKind or has it as a
81
+ base kind (either directly or indirectly).
82
+ It is not required that derivedKind or baseKind be known to the
83
+ registry: if they are unknown but equal, IsA will return true ;
84
+ otherwise if either is unknown, we will simply return false.
85
+ Therefore this method will not raise any errors.
86
+
87
+ Parameters
88
+
89
+ derivedKind (str) –
90
+ baseKind (str) –
91
+
92
+ property expired
93
+ True if this object has expired, False otherwise.
94
+
95
+ class pxr.Kind.Tokens
96
+ Attributes:
97
+
98
+ assembly
99
+
100
+ component
101
+
102
+ group
103
+
104
+ model
105
+
106
+ subcomponent
107
+
108
+ assembly = 'assembly'
109
+
110
+ component = 'component'
111
+
112
+ group = 'group'
113
+
114
+ model = 'model'
115
+
116
+ subcomponent = 'subcomponent'
117
+
118
+ © Copyright 2019-2023, NVIDIA.
119
+ Last updated on Nov 14, 2023.
120
+
121
+
122
+
Ndr.md ADDED
@@ -0,0 +1,849 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Ndr module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Ndr module
10
+
11
+  
12
+
13
+ # Ndr module
14
+
15
+ Summary: The Ndr (Node Definition Registry) provides a node-domain-agmostic framework for registering and querying information about nodes.
16
+
17
+ Python bindings for libNdr
18
+ Classes:
19
+
20
+ DiscoveryPlugin
21
+ Interface for discovery plugins.
22
+
23
+ DiscoveryPluginContext
24
+ A context for discovery.
25
+
26
+ DiscoveryPluginList
27
+
28
+ DiscoveryUri
29
+ Struct for holding a URI and its resolved URI for a file discovered by NdrFsHelpersDiscoverFiles.
30
+
31
+ Node
32
+ Represents an abstract node.
33
+
34
+ NodeDiscoveryResult
35
+ Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDiscoveryPlugin .
36
+
37
+ NodeList
38
+
39
+ Property
40
+ Represents a property (input or output) that is part of a NdrNode instance.
41
+
42
+ Registry
43
+ The registry provides access to node information."Discovery Plugins"are responsible for finding the nodes that should be included in the registry.
44
+
45
+ Version
46
+
47
+ VersionFilter
48
+
49
+ class pxr.Ndr.DiscoveryPlugin
50
+ Interface for discovery plugins.
51
+ Discovery plugins, like the name implies, find nodes. Where the plugin
52
+ searches is up to the plugin that implements this interface. Examples
53
+ of discovery plugins could include plugins that look for nodes on the
54
+ filesystem, another that finds nodes in a cloud service, and another
55
+ that searches a local database. Multiple discovery plugins that search
56
+ the filesystem in specific locations/ways could also be created. All
57
+ discovery plugins are executed as soon as the registry is
58
+ instantiated.
59
+ These plugins simply report back to the registry what nodes they found
60
+ in a generic way. The registry doesn’t know much about the innards of
61
+ the nodes yet, just that the nodes exist. Understanding the nodes is
62
+ the responsibility of another set of plugins defined by the
63
+ NdrParserPlugin interface.
64
+ Discovery plugins report back to the registry via
65
+ NdrNodeDiscoveryResult s. These are small, lightweight classes
66
+ that contain the information for a single node that was found during
67
+ discovery. The discovery result only includes node information that
68
+ can be gleaned pre-parse, so the data is fairly limited; to see
69
+ exactly what’s included, and what is expected to be populated, see the
70
+ documentation for NdrNodeDiscoveryResult .
71
+
72
+ ## How to Create a Discovery Plugin
73
+
74
+ There are three steps to creating a discovery plugin:
75
+
76
+ Implement the discovery plugin interface, NdrDiscoveryPlugin
77
+ Register your new plugin with the registry. The registration
78
+ macro must be called in your plugin’s implementation file:
79
+
80
+ NDR_REGISTER_DISCOVERY_PLUGIN(YOUR_DISCOVERY_PLUGIN_CLASS_NAME)
81
+
82
+ This macro is available in discoveryPlugin.h.
83
+
84
+ - In the same folder as your plugin, create a ``plugInfo.json``
85
+ file. This file must be formatted like so, substituting
86
+ ``YOUR_LIBRARY_NAME`` , ``YOUR_CLASS_NAME`` , and
87
+ ``YOUR_DISPLAY_NAME`` :
88
+
89
+ {
90
+ "Plugins": [{
91
+ "Type": "module",
92
+ "Name": "YOUR_LIBRARY_NAME",
93
+ "Root": "@PLUG_INFO_ROOT@",
94
+ "LibraryPath": "@PLUG_INFO_LIBRARY_PATH@",
95
+ "ResourcePath": "@PLUG_INFO_RESOURCE_PATH@",
96
+ "Info": {
97
+ "Types": {
98
+ "YOUR_CLASS_NAME" : {
99
+ "bases": ["NdrDiscoveryPlugin"],
100
+ "displayName": "YOUR_DISPLAY_NAME"
101
+ }
102
+ }
103
+ }
104
+ }]
105
+ }
106
+
107
+ The NDR ships with one discovery plugin, the
108
+ _NdrFilesystemDiscoveryPlugin . Take a look at NDR’s plugInfo.json
109
+ file for example values for YOUR_LIBRARY_NAME ,
110
+ YOUR_CLASS_NAME , and YOUR_DISPLAY_NAME . If multiple
111
+ discovery plugins exist in the same folder, you can continue adding
112
+ additional plugins under the Types key in the JSON. More detailed
113
+ information about the plugInfo.json format can be found in the
114
+ documentation for the plug module (in pxr/base).
115
+ Methods:
116
+
117
+ DiscoverNodes(arg1)
118
+ Finds and returns all nodes that the implementing plugin should be aware of.
119
+
120
+ GetSearchURIs()
121
+ Gets the URIs that this plugin is searching for nodes in.
122
+
123
+ Attributes:
124
+
125
+ expired
126
+ True if this object has expired, False otherwise.
127
+
128
+ DiscoverNodes(arg1) → NdrNodeDiscoveryResultVec
129
+ Finds and returns all nodes that the implementing plugin should be
130
+ aware of.
131
+
132
+ Parameters
133
+ arg1 (Context) –
134
+
135
+ GetSearchURIs() → NdrStringVec
136
+ Gets the URIs that this plugin is searching for nodes in.
137
+
138
+ property expired
139
+ True if this object has expired, False otherwise.
140
+
141
+ class pxr.Ndr.DiscoveryPluginContext
142
+ A context for discovery.
143
+ Discovery plugins can use this to get a limited set of non-local
144
+ information without direct coupling between plugins.
145
+ Methods:
146
+
147
+ GetSourceType(discoveryType)
148
+ Returns the source type associated with the discovery type.
149
+
150
+ Attributes:
151
+
152
+ expired
153
+ True if this object has expired, False otherwise.
154
+
155
+ GetSourceType(discoveryType) → str
156
+ Returns the source type associated with the discovery type.
157
+ This may return an empty token if there is no such association.
158
+
159
+ Parameters
160
+ discoveryType (str) –
161
+
162
+ property expired
163
+ True if this object has expired, False otherwise.
164
+
165
+ class pxr.Ndr.DiscoveryPluginList
166
+ Methods:
167
+
168
+ append
169
+
170
+ extend
171
+
172
+ append()
173
+
174
+ extend()
175
+
176
+ class pxr.Ndr.DiscoveryUri
177
+ Struct for holding a URI and its resolved URI for a file discovered by
178
+ NdrFsHelpersDiscoverFiles.
179
+ Attributes:
180
+
181
+ resolvedUri
182
+
183
+ uri
184
+
185
+ property resolvedUri
186
+
187
+ property uri
188
+
189
+ class pxr.Ndr.Node
190
+ Represents an abstract node. Describes information like the name of
191
+ the node, what its inputs and outputs are, and any associated
192
+ metadata.
193
+ In almost all cases, this class will not be used directly. More
194
+ specialized nodes can be created that derive from NdrNode ; those
195
+ specialized nodes can add their own domain-specific data and methods.
196
+ Methods:
197
+
198
+ GetContext()
199
+ Gets the context of the node.
200
+
201
+ GetFamily()
202
+ Gets the name of the family that the node belongs to.
203
+
204
+ GetIdentifier()
205
+ Return the identifier of the node.
206
+
207
+ GetInfoString()
208
+ Gets a string with basic information about this node.
209
+
210
+ GetInput(inputName)
211
+ Get an input property by name.
212
+
213
+ GetInputNames()
214
+ Get an ordered list of all the input names on this node.
215
+
216
+ GetMetadata()
217
+ All metadata that came from the parse process.
218
+
219
+ GetName()
220
+ Gets the name of the node.
221
+
222
+ GetOutput(outputName)
223
+ Get an output property by name.
224
+
225
+ GetOutputNames()
226
+ Get an ordered list of all the output names on this node.
227
+
228
+ GetResolvedDefinitionURI()
229
+ Gets the URI to the resource that provided this node's definition.
230
+
231
+ GetResolvedImplementationURI()
232
+ Gets the URI to the resource that provides this node's implementation.
233
+
234
+ GetSourceCode()
235
+ Returns the source code for this node.
236
+
237
+ GetSourceType()
238
+ Gets the type of source that this node originated from.
239
+
240
+ GetVersion()
241
+ Return the version of the node.
242
+
243
+ IsValid()
244
+ Whether or not this node is valid.
245
+
246
+ GetContext() → str
247
+ Gets the context of the node.
248
+ The context is the context that the node declares itself as having
249
+ (or, if a particular node does not declare a context, it will be
250
+ assigned a default context by the parser).
251
+ As a concrete example from the Sdr module, a shader with a
252
+ specific source type may perform different duties vs. another shader
253
+ with the same source type. For example, one shader with a source type
254
+ of SdrArgsParser::SourceType may declare itself as having a
255
+ context of’pattern’, while another shader of the same source type may
256
+ say it is used for lighting, and thus has a context of’light’.
257
+
258
+ GetFamily() → str
259
+ Gets the name of the family that the node belongs to.
260
+ An empty token will be returned if the node does not belong to a
261
+ family.
262
+
263
+ GetIdentifier() → NdrIdentifier
264
+ Return the identifier of the node.
265
+
266
+ GetInfoString() → str
267
+ Gets a string with basic information about this node.
268
+ Helpful for things like adding this node to a log.
269
+
270
+ GetInput(inputName) → Property
271
+ Get an input property by name.
272
+ nullptr is returned if an input with the given name does not
273
+ exist.
274
+
275
+ Parameters
276
+ inputName (str) –
277
+
278
+ GetInputNames() → NdrTokenVec
279
+ Get an ordered list of all the input names on this node.
280
+
281
+ GetMetadata() → NdrTokenMap
282
+ All metadata that came from the parse process.
283
+ Specialized nodes may isolate values in the metadata (with possible
284
+ manipulations and/or additional parsing) and expose those values in
285
+ their API.
286
+
287
+ GetName() → str
288
+ Gets the name of the node.
289
+
290
+ GetOutput(outputName) → Property
291
+ Get an output property by name.
292
+ nullptr is returned if an output with the given name does not
293
+ exist.
294
+
295
+ Parameters
296
+ outputName (str) –
297
+
298
+ GetOutputNames() → NdrTokenVec
299
+ Get an ordered list of all the output names on this node.
300
+
301
+ GetResolvedDefinitionURI() → str
302
+ Gets the URI to the resource that provided this node’s definition.
303
+ Could be a path to a file, or some other resource identifier. This URI
304
+ should be fully resolved.
305
+ NdrNode::GetResolvedImplementationURI()
306
+
307
+ GetResolvedImplementationURI() → str
308
+ Gets the URI to the resource that provides this node’s implementation.
309
+ Could be a path to a file, or some other resource identifier. This URI
310
+ should be fully resolved.
311
+ NdrNode::GetResolvedDefinitionURI()
312
+
313
+ GetSourceCode() → str
314
+ Returns the source code for this node.
315
+ This will be empty for most nodes. It will be non-empty only for the
316
+ nodes that are constructed using NdrRegistry::GetNodeFromSourceCode()
317
+ , in which case, the source code has not been parsed (or even
318
+ compiled) yet.
319
+ An unparsed node with non-empty source-code but no properties is
320
+ considered to be invalid. Once the node is parsed and the relevant
321
+ properties and metadata are extracted from the source code, the node
322
+ becomes valid.
323
+ NdrNode::IsValid
324
+
325
+ GetSourceType() → str
326
+ Gets the type of source that this node originated from.
327
+ Note that this is distinct from GetContext() , which is the type
328
+ that the node declares itself as having.
329
+ As a concrete example from the Sdr module, several shader parsers
330
+ exist and operate on different types of shaders. In this scenario,
331
+ each distinct type of shader (OSL, Args, etc) is considered a
332
+ different source, even though they are all shaders. In addition, the
333
+ shaders under each source type may declare themselves as having a
334
+ specific context (shaders can serve different roles). See
335
+ GetContext() for more information on this.
336
+
337
+ GetVersion() → Version
338
+ Return the version of the node.
339
+
340
+ IsValid() → bool
341
+ Whether or not this node is valid.
342
+ A node that is valid indicates that the parser plugin was able to
343
+ successfully parse the contents of this node.
344
+ Note that if a node is not valid, some data like its name, URI, source
345
+ code etc. could still be available (data that was obtained during the
346
+ discovery process). However, other data that must be gathered from the
347
+ parsing process will NOT be available (eg, inputs and outputs).
348
+
349
+ class pxr.Ndr.NodeDiscoveryResult
350
+ Represents the raw data of a node, and some other bits of metadata,
351
+ that were determined via a NdrDiscoveryPlugin .
352
+ Attributes:
353
+
354
+ blindData
355
+
356
+ discoveryType
357
+
358
+ family
359
+
360
+ identifier
361
+
362
+ metadata
363
+
364
+ name
365
+
366
+ resolvedUri
367
+
368
+ sourceCode
369
+
370
+ sourceType
371
+
372
+ subIdentifier
373
+
374
+ uri
375
+
376
+ version
377
+
378
+ property blindData
379
+
380
+ property discoveryType
381
+
382
+ property family
383
+
384
+ property identifier
385
+
386
+ property metadata
387
+
388
+ property name
389
+
390
+ property resolvedUri
391
+
392
+ property sourceCode
393
+
394
+ property sourceType
395
+
396
+ property subIdentifier
397
+
398
+ property uri
399
+
400
+ property version
401
+
402
+ class pxr.Ndr.NodeList
403
+ Methods:
404
+
405
+ append
406
+
407
+ extend
408
+
409
+ append()
410
+
411
+ extend()
412
+
413
+ class pxr.Ndr.Property
414
+ Represents a property (input or output) that is part of a NdrNode
415
+ instance.
416
+ A property must have a name and type, but may also specify a host of
417
+ additional metadata. Instances can also be queried to determine if
418
+ another NdrProperty instance can be connected to it.
419
+ In almost all cases, this class will not be used directly. More
420
+ specialized properties can be created that derive from NdrProperty
421
+ ; those specialized properties can add their own domain-specific data
422
+ and methods.
423
+ Methods:
424
+
425
+ CanConnectTo(other)
426
+ Determines if this property can be connected to the specified property.
427
+
428
+ GetArraySize()
429
+ Gets this property's array size.
430
+
431
+ GetDefaultValue()
432
+ Gets this property's default value associated with the type of the property.
433
+
434
+ GetInfoString()
435
+ Gets a string with basic information about this property.
436
+
437
+ GetMetadata()
438
+ All of the metadata that came from the parse process.
439
+
440
+ GetName()
441
+ Gets the name of the property.
442
+
443
+ GetType()
444
+ Gets the type of the property.
445
+
446
+ GetTypeAsSdfType()
447
+ Converts the property's type from GetType() into a SdfValueTypeName .
448
+
449
+ IsArray()
450
+ Whether this property's type is an array type.
451
+
452
+ IsConnectable()
453
+ Whether this property can be connected to other properties.
454
+
455
+ IsDynamicArray()
456
+ Whether this property's array type is dynamically-sized.
457
+
458
+ IsOutput()
459
+ Whether this property is an output.
460
+
461
+ CanConnectTo(other) → bool
462
+ Determines if this property can be connected to the specified
463
+ property.
464
+
465
+ Parameters
466
+ other (Property) –
467
+
468
+ GetArraySize() → int
469
+ Gets this property’s array size.
470
+ If this property is a fixed-size array type, the array size is
471
+ returned. In the case of a dynamically-sized array, this method
472
+ returns the array size that the parser reports, and should not be
473
+ relied upon to be accurate. A parser may report -1 for the array size,
474
+ for example, to indicate a dynamically-sized array. For types that are
475
+ not a fixed-size array or dynamic array, this returns 0.
476
+
477
+ GetDefaultValue() → VtValue
478
+ Gets this property’s default value associated with the type of the
479
+ property.
480
+ GetType()
481
+
482
+ GetInfoString() → str
483
+ Gets a string with basic information about this property.
484
+ Helpful for things like adding this property to a log.
485
+
486
+ GetMetadata() → NdrTokenMap
487
+ All of the metadata that came from the parse process.
488
+
489
+ GetName() → str
490
+ Gets the name of the property.
491
+
492
+ GetType() → str
493
+ Gets the type of the property.
494
+
495
+ GetTypeAsSdfType() → NdrSdfTypeIndicator
496
+ Converts the property’s type from GetType() into a
497
+ SdfValueTypeName .
498
+ Two scenarios can result: an exact mapping from property type to Sdf
499
+ type, and an inexact mapping. In the first scenario, the first element
500
+ in the pair will be the cleanly-mapped Sdf type, and the second
501
+ element, a TfToken, will be empty. In the second scenario, the Sdf
502
+ type will be set to Token to indicate an unclean mapping, and the
503
+ second element will be set to the original type returned by
504
+ GetType() .
505
+ GetDefaultValueAsSdfType
506
+
507
+ IsArray() → bool
508
+ Whether this property’s type is an array type.
509
+
510
+ IsConnectable() → bool
511
+ Whether this property can be connected to other properties.
512
+ If this returns true , connectability to a specific property can
513
+ be tested via CanConnectTo() .
514
+
515
+ IsDynamicArray() → bool
516
+ Whether this property’s array type is dynamically-sized.
517
+
518
+ IsOutput() → bool
519
+ Whether this property is an output.
520
+
521
+ class pxr.Ndr.Registry
522
+ The registry provides access to node information.”Discovery
523
+ Plugins”are responsible for finding the nodes that should be included
524
+ in the registry.
525
+ Discovery plugins are found through the plugin system. If additional
526
+ discovery plugins need to be specified, a client can pass them to
527
+ SetExtraDiscoveryPlugins() .
528
+ When the registry is first told about the discovery plugins, the
529
+ plugins will be asked to discover nodes. These plugins will generate
530
+ NdrNodeDiscoveryResult instances, which only contain basic
531
+ metadata. Once the client asks for information that would require the
532
+ node’s contents to be parsed (eg, what its inputs and outputs are),
533
+ the registry will begin the parsing process on an as-needed basis. See
534
+ NdrNodeDiscoveryResult for the information that can be retrieved
535
+ without triggering a parse.
536
+ Some methods in this module may allow for a”family”to be provided. A
537
+ family is simply a generic grouping which is optional.
538
+ Methods:
539
+
540
+ GetAllNodeSourceTypes()
541
+ Get a sorted list of all node source types that may be present on the nodes in the registry.
542
+
543
+ GetNodeByIdentifier(identifier, ...)
544
+ 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.
545
+
546
+ GetNodeByIdentifierAndType(identifier, ...)
547
+ Get the node with the specified identifier and sourceType .
548
+
549
+ GetNodeByName(name, sourceTypePriority, filter)
550
+ Get the node with the specified name.
551
+
552
+ GetNodeByNameAndType(name, sourceType, filter)
553
+ A convenience wrapper around GetNodeByName() .
554
+
555
+ GetNodeFromAsset(asset, metadata, ...)
556
+ Parses the given asset , constructs a NdrNode from it and adds it to the registry.
557
+
558
+ GetNodeFromSourceCode(sourceCode, ...)
559
+ Parses the given sourceCode string, constructs a NdrNode from it and adds it to the registry.
560
+
561
+ GetNodeIdentifiers(family, filter)
562
+ Get the identifiers of all the nodes that the registry is aware of.
563
+
564
+ GetNodeNames(family)
565
+ Get the names of all the nodes that the registry is aware of.
566
+
567
+ GetNodesByFamily(family, filter)
568
+ Get all nodes from the registry, optionally restricted to the nodes that fall under a specified family and/or the default version.
569
+
570
+ GetNodesByIdentifier(identifier)
571
+ Get all nodes matching the specified identifier (multiple nodes of the same identifier, but different source types, may exist).
572
+
573
+ GetNodesByName(name, filter)
574
+ Get all nodes matching the specified name.
575
+
576
+ GetSearchURIs()
577
+ Get the locations where the registry is searching for nodes.
578
+
579
+ SetExtraDiscoveryPlugins(plugins)
580
+ Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system.
581
+
582
+ SetExtraParserPlugins(pluginTypes)
583
+ Allows the client to set any additional parser plugins that would otherwise NOT be found through the plugin system.
584
+
585
+ GetAllNodeSourceTypes() → NdrTokenVec
586
+ Get a sorted list of all node source types that may be present on the
587
+ nodes in the registry.
588
+ Source types originate from the discovery process, but there is no
589
+ guarantee that the discovered source types will also have a registered
590
+ parser plugin. The actual supported source types here depend on the
591
+ parsers that are available. Also note that some parser plugins may not
592
+ advertise a source type.
593
+ See the documentation for NdrParserPlugin and
594
+ NdrNode::GetSourceType() for more information.
595
+
596
+ GetNodeByIdentifier(identifier, sourceTypePriority) → Node
597
+ Get the node with the specified identifier , and an optional
598
+ sourceTypePriority list specifying the set of node SOURCE types
599
+ (see NdrNode::GetSourceType() ) that should be searched.
600
+ If no sourceTypePriority is specified, the first encountered node with
601
+ the specified identifier will be returned (first is arbitrary) if
602
+ found.
603
+ If a sourceTypePriority list is specified, then this will iterate
604
+ through each source type and try to find a node matching by
605
+ identifier. This is equivalent to calling
606
+ NdrRegistry::GetNodeByIdentifierAndType for each source type until a
607
+ node is found.
608
+ Nodes of the same identifier but different source type can exist in
609
+ the registry. If a node’Foo’with source types’abc’and’xyz’exist in the
610
+ registry, and you want to make sure the’abc’version is fetched before
611
+ the’xyz’version, the priority list would be specified as
612
+ [‘abc’,’xyz’]. If the’abc’version did not exist in the registry, then
613
+ the’xyz’version would be returned.
614
+ Returns nullptr if a node matching the arguments can’t be found.
615
+
616
+ Parameters
617
+
618
+ identifier (NdrIdentifier) –
619
+ sourceTypePriority (NdrTokenVec) –
620
+
621
+ GetNodeByIdentifierAndType(identifier, sourceType) → Node
622
+ Get the node with the specified identifier and sourceType .
623
+ If there is no matching node for the sourceType, nullptr is returned.
624
+
625
+ Parameters
626
+
627
+ identifier (NdrIdentifier) –
628
+ sourceType (str) –
629
+
630
+ GetNodeByName(name, sourceTypePriority, filter) → Node
631
+ Get the node with the specified name.
632
+ An optional priority list specifies the set of node SOURCE types (
633
+ NdrNode::GetSourceType() ) that should be searched and in what order.
634
+ Optionally, a filter can be specified to consider just the default
635
+ versions of nodes matching name (the default) or all versions of
636
+ the nodes.
637
+ GetNodeByIdentifier() .
638
+
639
+ Parameters
640
+
641
+ name (str) –
642
+ sourceTypePriority (NdrTokenVec) –
643
+ filter (VersionFilter) –
644
+
645
+ GetNodeByNameAndType(name, sourceType, filter) → Node
646
+ A convenience wrapper around GetNodeByName() .
647
+ Instead of providing a priority list, an exact type is specified, and
648
+ nullptr is returned if a node with the exact identifier and type
649
+ does not exist.
650
+ Optionally, a filter can be specified to consider just the default
651
+ versions of nodes matching name (the default) or all versions of
652
+ the nodes.
653
+
654
+ Parameters
655
+
656
+ name (str) –
657
+ sourceType (str) –
658
+ filter (VersionFilter) –
659
+
660
+ GetNodeFromAsset(asset, metadata, subIdentifier, sourceType) → Node
661
+ Parses the given asset , constructs a NdrNode from it and adds it
662
+ to the registry.
663
+ Nodes created from an asset using this API can be looked up by the
664
+ unique identifier and sourceType of the returned node, or by URI,
665
+ which will be set to the unresolved asset path value.
666
+ metadata contains additional metadata needed for parsing and
667
+ compiling the source code in the file pointed to by asset
668
+ correctly. This metadata supplements the metadata available in the
669
+ asset and overrides it in cases where there are key collisions.
670
+ subidentifier is optional, and it would be used to indicate a
671
+ particular definition in the asset file if the asset contains multiple
672
+ node definitions.
673
+ sourceType is optional, and it is only needed to indicate a
674
+ particular type if the asset file is capable of representing a node
675
+ definition of multiple source types.
676
+ Returns a valid node if the asset is parsed successfully using one of
677
+ the registered parser plugins.
678
+
679
+ Parameters
680
+
681
+ asset (AssetPath) –
682
+ metadata (NdrTokenMap) –
683
+ subIdentifier (str) –
684
+ sourceType (str) –
685
+
686
+ GetNodeFromSourceCode(sourceCode, sourceType, metadata) → Node
687
+ Parses the given sourceCode string, constructs a NdrNode from it
688
+ and adds it to the registry.
689
+ The parser to be used is determined by the specified sourceType .
690
+ Nodes created from source code using this API can be looked up by the
691
+ unique identifier and sourceType of the returned node.
692
+ metadata contains additional metadata needed for parsing and
693
+ compiling the source code correctly. This metadata supplements the
694
+ metadata available in sourceCode and overrides it cases where
695
+ there are key collisions.
696
+ Returns a valid node if the given source code is parsed successfully
697
+ using the parser plugins that is registered for the specified
698
+ sourceType .
699
+
700
+ Parameters
701
+
702
+ sourceCode (str) –
703
+ sourceType (str) –
704
+ metadata (NdrTokenMap) –
705
+
706
+ GetNodeIdentifiers(family, filter) → NdrIdentifierVec
707
+ Get the identifiers of all the nodes that the registry is aware of.
708
+ This will not run the parsing plugins on the nodes that have been
709
+ discovered, so this method is relatively quick. Optionally,
710
+ a”family”name can be specified to only get the identifiers of nodes
711
+ that belong to that family and a filter can be specified to get just
712
+ the default version (the default) or all versions of the node.
713
+
714
+ Parameters
715
+
716
+ family (str) –
717
+ filter (VersionFilter) –
718
+
719
+ GetNodeNames(family) → NdrStringVec
720
+ Get the names of all the nodes that the registry is aware of.
721
+ This will not run the parsing plugins on the nodes that have been
722
+ discovered, so this method is relatively quick. Optionally,
723
+ a”family”name can be specified to only get the names of nodes that
724
+ belong to that family.
725
+
726
+ Parameters
727
+ family (str) –
728
+
729
+ GetNodesByFamily(family, filter) → NdrNodeConstPtrVec
730
+ Get all nodes from the registry, optionally restricted to the nodes
731
+ that fall under a specified family and/or the default version.
732
+ Note that this will parse all nodes that the registry is aware of
733
+ (unless a family is specified), so this may take some time to run the
734
+ first time it is called.
735
+
736
+ Parameters
737
+
738
+ family (str) –
739
+ filter (VersionFilter) –
740
+
741
+ GetNodesByIdentifier(identifier) → NdrNodeConstPtrVec
742
+ Get all nodes matching the specified identifier (multiple nodes of the
743
+ same identifier, but different source types, may exist).
744
+ If no nodes match the identifier, an empty vector is returned.
745
+
746
+ Parameters
747
+ identifier (NdrIdentifier) –
748
+
749
+ GetNodesByName(name, filter) → NdrNodeConstPtrVec
750
+ Get all nodes matching the specified name.
751
+ Only nodes matching the specified name will be parsed. Optionally, a
752
+ filter can be specified to get just the default version (the default)
753
+ or all versions of the node. If no nodes match an empty vector is
754
+ returned.
755
+
756
+ Parameters
757
+
758
+ name (str) –
759
+ filter (VersionFilter) –
760
+
761
+ GetSearchURIs() → NdrStringVec
762
+ Get the locations where the registry is searching for nodes.
763
+ Depending on which discovery plugins were used, this may include non-
764
+ filesystem paths.
765
+
766
+ SetExtraDiscoveryPlugins(plugins) → None
767
+ Allows the client to set any additional discovery plugins that would
768
+ otherwise NOT be found through the plugin system.
769
+ Runs the discovery process for the specified plugins immediately.
770
+ Note that this method cannot be called after any nodes in the registry
771
+ have been parsed (eg, through GetNode*()), otherwise an error will
772
+ result.
773
+
774
+ Parameters
775
+ plugins (DiscoveryPluginRefPtrVec) –
776
+
777
+ SetExtraDiscoveryPlugins(pluginTypes) -> None
778
+ Allows the client to set any additional discovery plugins that would
779
+ otherwise NOT be found through the plugin system.
780
+ Runs the discovery process for the specified plugins immediately.
781
+ Note that this method cannot be called after any nodes in the registry
782
+ have been parsed (eg, through GetNode*()), otherwise an error will
783
+ result.
784
+
785
+ Parameters
786
+ pluginTypes (list[Type]) –
787
+
788
+ SetExtraParserPlugins(pluginTypes) → None
789
+ Allows the client to set any additional parser plugins that would
790
+ otherwise NOT be found through the plugin system.
791
+ Note that this method cannot be called after any nodes in the registry
792
+ have been parsed (eg, through GetNode*()), otherwise an error will
793
+ result.
794
+
795
+ Parameters
796
+ pluginTypes (list[Type]) –
797
+
798
+ class pxr.Ndr.Version
799
+ Methods:
800
+
801
+ GetAsDefault()
802
+ Return an equal version marked as default.
803
+
804
+ GetMajor()
805
+ Return the major version number or zero for an invalid version.
806
+
807
+ GetMinor()
808
+ Return the minor version number or zero for an invalid version.
809
+
810
+ GetStringSuffix()
811
+ Return the version as a identifier suffix.
812
+
813
+ IsDefault()
814
+ Return true iff this version is marked as default.
815
+
816
+ GetAsDefault() → Version
817
+ Return an equal version marked as default.
818
+ It’s permitted to mark an invalid version as the default.
819
+
820
+ GetMajor() → int
821
+ Return the major version number or zero for an invalid version.
822
+
823
+ GetMinor() → int
824
+ Return the minor version number or zero for an invalid version.
825
+
826
+ GetStringSuffix() → str
827
+ Return the version as a identifier suffix.
828
+
829
+ IsDefault() → bool
830
+ Return true iff this version is marked as default.
831
+
832
+ class pxr.Ndr.VersionFilter
833
+ Methods:
834
+
835
+ GetValueFromName
836
+
837
+ Attributes:
838
+
839
+ allValues
840
+
841
+ static GetValueFromName()
842
+
843
+ allValues = (Ndr.VersionFilterDefaultOnly, Ndr.VersionFilterAllVersions)
844
+
845
+ © Copyright 2019-2023, NVIDIA.
846
+ Last updated on Nov 14, 2023.
847
+
848
+
849
+
Pcp.md ADDED
@@ -0,0 +1,1659 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Pcp module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Pcp module
10
+
11
+  
12
+
13
+ # Pcp module
14
+
15
+ Summary: The PrimCache Population module implements core scenegraph composition semantics - behaviors informally referred to as Layering & Referencing.
16
+
17
+ Classes:
18
+
19
+ ArcType
20
+
21
+ Cache
22
+ PcpCache is the context required to make requests of the Pcp composition algorithm and cache the results.
23
+
24
+ Dependency
25
+ Description of a dependency.
26
+
27
+ DependencyType
28
+
29
+ DynamicFileFormatDependencyData
30
+ 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.
31
+
32
+ ErrorArcCycle
33
+ Arcs between PcpNodes that form a cycle.
34
+
35
+ ErrorArcPermissionDenied
36
+ Arcs that were not made between PcpNodes because of permission restrictions.
37
+
38
+ ErrorBase
39
+ Base class for all error types.
40
+
41
+ ErrorCapacityExceeded
42
+ Exceeded the capacity for composition arcs at a single site.
43
+
44
+ ErrorInconsistentAttributeType
45
+ Attributes that have specs with conflicting definitions.
46
+
47
+ ErrorInconsistentAttributeVariability
48
+ Attributes that have specs with conflicting variability.
49
+
50
+ ErrorInconsistentPropertyType
51
+ Properties that have specs with conflicting definitions.
52
+
53
+ ErrorInvalidAssetPath
54
+ Invalid asset paths used by references or payloads.
55
+
56
+ ErrorInvalidAssetPathBase
57
+
58
+ ErrorInvalidExternalTargetPath
59
+ Invalid target or connection path in some scope that points to an object outside of that scope.
60
+
61
+ ErrorInvalidInstanceTargetPath
62
+ Invalid target or connection path authored in an inherited class that points to an instance of that class.
63
+
64
+ ErrorInvalidPrimPath
65
+ Invalid prim paths used by references or payloads.
66
+
67
+ ErrorInvalidReferenceOffset
68
+ References or payloads that use invalid layer offsets.
69
+
70
+ ErrorInvalidSublayerOffset
71
+ Sublayers that use invalid layer offsets.
72
+
73
+ ErrorInvalidSublayerOwnership
74
+ Sibling layers that have the same owner.
75
+
76
+ ErrorInvalidSublayerPath
77
+ Asset paths that could not be both resolved and loaded.
78
+
79
+ ErrorInvalidTargetPath
80
+ Invalid target or connection path.
81
+
82
+ ErrorMutedAssetPath
83
+ Muted asset paths used by references or payloads.
84
+
85
+ ErrorOpinionAtRelocationSource
86
+ Opinions were found at a relocation source path.
87
+
88
+ ErrorPrimPermissionDenied
89
+ Layers with illegal opinions about private prims.
90
+
91
+ ErrorPropertyPermissionDenied
92
+ Layers with illegal opinions about private properties.
93
+
94
+ ErrorSublayerCycle
95
+ Layers that recursively sublayer themselves.
96
+
97
+ ErrorTargetPathBase
98
+ Base class for composition errors related to target or connection paths.
99
+
100
+ ErrorTargetPermissionDenied
101
+ Paths with illegal opinions about private targets.
102
+
103
+ ErrorType
104
+
105
+ ErrorUnresolvedPrimPath
106
+ Asset paths that could not be both resolved and loaded.
107
+
108
+ InstanceKey
109
+ A PcpInstanceKey identifies instanceable prim indexes that share the same set of opinions.
110
+
111
+ LayerStack
112
+ Represents a stack of layers that contribute opinions to composition.
113
+
114
+ LayerStackIdentifier
115
+ Arguments used to identify a layer stack.
116
+
117
+ LayerStackSite
118
+ A site specifies a path in a layer stack of scene description.
119
+
120
+ MapExpression
121
+ An expression that yields a PcpMapFunction value.
122
+
123
+ MapFunction
124
+ A function that maps values from one namespace (and time domain) to another.
125
+
126
+ NodeRef
127
+ PcpNode represents a node in an expression tree for compositing scene description.
128
+
129
+ PrimIndex
130
+ PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics.
131
+
132
+ PropertyIndex
133
+ PcpPropertyIndex is an index of all sites in scene description that contribute opinions to a specific property, under composition semantics.
134
+
135
+ Site
136
+ A site specifies a path in a layer stack of scene description.
137
+
138
+ class pxr.Pcp.ArcType
139
+ Methods:
140
+
141
+ GetValueFromName
142
+
143
+ Attributes:
144
+
145
+ allValues
146
+
147
+ static GetValueFromName()
148
+
149
+ allValues = (Pcp.ArcTypeRoot, Pcp.ArcTypeInherit, Pcp.ArcTypeRelocate, Pcp.ArcTypeVariant, Pcp.ArcTypeReference, Pcp.ArcTypePayload, Pcp.ArcTypeSpecialize)
150
+
151
+ class pxr.Pcp.Cache
152
+ PcpCache is the context required to make requests of the Pcp
153
+ composition algorithm and cache the results.
154
+ Because the algorithms are recursive making a request typically makes
155
+ other internal requests to solve subproblems caching subproblem
156
+ results is required for reasonable performance, and so this cache is
157
+ the only entrypoint to the algorithms.
158
+ There is a set of parameters that affect the composition results:
159
+
160
+ variant fallbacks: per named variant set, an ordered list of
161
+ fallback values to use when composing a prim that defines a variant
162
+ set but does not specify a selection
163
+ payload inclusion set: an SdfPath set used to identify which
164
+ prims should have their payloads included during composition; this is
165
+ the basis for explicit control over the”working set”of composition
166
+ file format target: the file format target that Pcp will request
167
+ when opening scene description layers
168
+ “USD mode”configures the Pcp composition algorithm to provide
169
+ only a custom, lighter subset of the full feature set, as needed by
170
+ the Universal Scene Description system
171
+ There are a number of different computations that can be requested.
172
+ These include computing a layer stack from a PcpLayerStackIdentifier,
173
+ computing a prim index or prim stack, and computing a property index.
174
+
175
+ Methods:
176
+
177
+ ComputeAttributeConnectionPaths(...)
178
+ Compute the attribute connection paths for the attribute at attributePath into paths .
179
+
180
+ ComputeLayerStack(identifier, allErrors)
181
+ Returns the layer stack for identifier if it exists, otherwise creates a new layer stack for identifier .
182
+
183
+ ComputePrimIndex(primPath, allErrors)
184
+ Compute and return a reference to the cached result for the prim index for the given path.
185
+
186
+ ComputePropertyIndex(propPath, allErrors)
187
+ Compute and return a reference to the cached result for the property index for the given path.
188
+
189
+ ComputeRelationshipTargetPaths(...)
190
+ Compute the relationship target paths for the relationship at relationshipPath into paths .
191
+
192
+ FindAllLayerStacksUsingLayer(layer)
193
+ Returns every computed & cached layer stack that includes layer .
194
+
195
+ FindPrimIndex(primPath)
196
+ Returns a pointer to the cached computed prim index for the given path, or None if it has not been computed.
197
+
198
+ FindPropertyIndex(propPath)
199
+ Returns a pointer to the cached computed property index for the given path, or None if it has not been computed.
200
+
201
+ FindSiteDependencies(siteLayerStack, ...)
202
+ Returns dependencies on the given site of scene description, as discovered by the cached index computations.
203
+
204
+ GetDynamicFileFormatArgumentDependencyData(...)
205
+ Returns the dynamic file format dependency data object for the prim index with the given primIndexPath .
206
+
207
+ GetLayerStackIdentifier()
208
+ Get the identifier of the layerStack used for composition.
209
+
210
+ GetMutedLayers()
211
+ Returns the list of canonical identifiers for muted layers in this cache.
212
+
213
+ GetUsedLayers()
214
+ Returns set of all layers used by this cache.
215
+
216
+ GetUsedLayersRevision()
217
+ 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.
218
+
219
+ GetVariantFallbacks()
220
+ Get the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection.
221
+
222
+ HasAnyDynamicFileFormatArgumentDependencies()
223
+ Returns true if any prim index in this cache has a dependency on a dynamic file format argument field.
224
+
225
+ HasRootLayerStack(layerStack)
226
+ Return true if this cache's root layer stack is layerStack , false otherwise.
227
+
228
+ IsInvalidAssetPath(resolvedAssetPath)
229
+ Returns true if resolvedAssetPath was used by a prim (e.g.
230
+
231
+ IsInvalidSublayerIdentifier(identifier)
232
+ Returns true if identifier was used as a sublayer path in a layer stack but did not identify a valid layer.
233
+
234
+ IsLayerMuted(layerIdentifier)
235
+ Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise.
236
+
237
+ IsPayloadIncluded(path)
238
+ Return true if the payload is included for the given path.
239
+
240
+ IsPossibleDynamicFileFormatArgumentField(field)
241
+ 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.
242
+
243
+ PrintStatistics()
244
+ Prints various statistics about the data stored in this cache.
245
+
246
+ Reload(changes)
247
+ Reload the layers of the layer stack, except session layers and sublayers of session layers.
248
+
249
+ RequestLayerMuting(layersToMute, ...)
250
+ Request layers to be muted or unmuted in this cache.
251
+
252
+ RequestPayloads(pathsToInclude, ...)
253
+ Request payloads to be included or excluded from composition.
254
+
255
+ SetVariantFallbacks(map, changes)
256
+ Set the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection.
257
+
258
+ UsesLayerStack(layerStack)
259
+ Return true if layerStack is used by this cache in its composition, false otherwise.
260
+
261
+ Attributes:
262
+
263
+ fileFormatTarget
264
+ str
265
+
266
+ layerStack
267
+ LayerStack
268
+
269
+ ComputeAttributeConnectionPaths(attributePath, paths, localOnly, stopProperty, includeStopProperty, deletedPaths, allErrors) → None
270
+ Compute the attribute connection paths for the attribute at
271
+ attributePath into paths .
272
+ If localOnly is true then this will compose attribute
273
+ connections from local nodes only. If stopProperty is not None
274
+ then this will stop composing attribute connections at
275
+ stopProperty , including stopProperty iff
276
+ includeStopProperty is true . If not None ,
277
+ deletedPaths will be populated with connection paths whose
278
+ deletion contributed to the computed result. allErrors will
279
+ contain any errors encountered while performing this operation.
280
+
281
+ Parameters
282
+
283
+ attributePath (Path) –
284
+ paths (list[SdfPath]) –
285
+ localOnly (bool) –
286
+ stopProperty (Spec) –
287
+ includeStopProperty (bool) –
288
+ deletedPaths (list[SdfPath]) –
289
+ allErrors (list[PcpError]) –
290
+
291
+ ComputeLayerStack(identifier, allErrors) → LayerStack
292
+ Returns the layer stack for identifier if it exists, otherwise
293
+ creates a new layer stack for identifier .
294
+ This returns None if identifier is invalid (i.e. its root
295
+ layer is None ). allErrors will contain any errors encountered
296
+ while creating a new layer stack. It’ll be unchanged if the layer
297
+ stack already existed.
298
+
299
+ Parameters
300
+
301
+ identifier (LayerStackIdentifier) –
302
+ allErrors (list[PcpError]) –
303
+
304
+ ComputePrimIndex(primPath, allErrors) → PrimIndex
305
+ Compute and return a reference to the cached result for the prim index
306
+ for the given path.
307
+ allErrors will contain any errors encountered while performing
308
+ this operation.
309
+
310
+ Parameters
311
+
312
+ primPath (Path) –
313
+ allErrors (list[PcpError]) –
314
+
315
+ ComputePropertyIndex(propPath, allErrors) → PropertyIndex
316
+ Compute and return a reference to the cached result for the property
317
+ index for the given path.
318
+ allErrors will contain any errors encountered while performing
319
+ this operation.
320
+
321
+ Parameters
322
+
323
+ propPath (Path) –
324
+ allErrors (list[PcpError]) –
325
+
326
+ ComputeRelationshipTargetPaths(relationshipPath, paths, localOnly, stopProperty, includeStopProperty, deletedPaths, allErrors) → None
327
+ Compute the relationship target paths for the relationship at
328
+ relationshipPath into paths .
329
+ If localOnly is true then this will compose relationship
330
+ targets from local nodes only. If stopProperty is not None
331
+ then this will stop composing relationship targets at stopProperty
332
+ , including stopProperty iff includeStopProperty is true .
333
+ If not None , deletedPaths will be populated with target paths
334
+ whose deletion contributed to the computed result. allErrors will
335
+ contain any errors encountered while performing this operation.
336
+
337
+ Parameters
338
+
339
+ relationshipPath (Path) –
340
+ paths (list[SdfPath]) –
341
+ localOnly (bool) –
342
+ stopProperty (Spec) –
343
+ includeStopProperty (bool) –
344
+ deletedPaths (list[SdfPath]) –
345
+ allErrors (list[PcpError]) –
346
+
347
+ FindAllLayerStacksUsingLayer(layer) → list[PcpLayerStackPtr]
348
+ Returns every computed & cached layer stack that includes layer .
349
+
350
+ Parameters
351
+ layer (Layer) –
352
+
353
+ FindPrimIndex(primPath) → PrimIndex
354
+ Returns a pointer to the cached computed prim index for the given
355
+ path, or None if it has not been computed.
356
+
357
+ Parameters
358
+ primPath (Path) –
359
+
360
+ FindPropertyIndex(propPath) → PropertyIndex
361
+ Returns a pointer to the cached computed property index for the given
362
+ path, or None if it has not been computed.
363
+
364
+ Parameters
365
+ propPath (Path) –
366
+
367
+ FindSiteDependencies(siteLayerStack, sitePath, depMask, recurseOnSite, recurseOnIndex, filterForExistingCachesOnly) → list[PcpDependency]
368
+ Returns dependencies on the given site of scene description, as
369
+ discovered by the cached index computations.
370
+ depMask
371
+ specifies what classes of dependency to include; see
372
+ PcpDependencyFlags for details recurseOnSite
373
+ includes incoming dependencies on children of sitePath recurseOnIndex
374
+ extends the result to include all PcpCache child indexes below
375
+ discovered results filterForExistingCachesOnly
376
+ filters the results to only paths representing computed prim and
377
+ property index caches; otherwise a recursively-expanded result can
378
+ include un-computed paths that are expected to depend on the site
379
+
380
+ Parameters
381
+
382
+ siteLayerStack (LayerStack) –
383
+ sitePath (Path) –
384
+ depMask (PcpDependencyFlags) –
385
+ recurseOnSite (bool) –
386
+ recurseOnIndex (bool) –
387
+ filterForExistingCachesOnly (bool) –
388
+
389
+ FindSiteDependencies(siteLayer, sitePath, depMask, recurseOnSite, recurseOnIndex, filterForExistingCachesOnly) -> list[PcpDependency]
390
+ Returns dependencies on the given site of scene description, as
391
+ discovered by the cached index computations.
392
+ This method overload takes a site layer rather than a layer stack. It
393
+ will check every layer stack using that layer, and apply any relevant
394
+ sublayer offsets to the map functions in the returned
395
+ PcpDependencyVector.
396
+ See the other method for parameter details.
397
+
398
+ Parameters
399
+
400
+ siteLayer (Layer) –
401
+ sitePath (Path) –
402
+ depMask (PcpDependencyFlags) –
403
+ recurseOnSite (bool) –
404
+ recurseOnIndex (bool) –
405
+ filterForExistingCachesOnly (bool) –
406
+
407
+ GetDynamicFileFormatArgumentDependencyData(primIndexPath) → DynamicFileFormatDependencyData
408
+ Returns the dynamic file format dependency data object for the prim
409
+ index with the given primIndexPath .
410
+ This will return an empty dependency data if either there is no cache
411
+ prim index for the path or if the prim index has no dynamic file
412
+ formats that it depends on.
413
+
414
+ Parameters
415
+ primIndexPath (Path) –
416
+
417
+ GetLayerStackIdentifier() → LayerStackIdentifier
418
+ Get the identifier of the layerStack used for composition.
419
+
420
+ GetMutedLayers() → list[str]
421
+ Returns the list of canonical identifiers for muted layers in this
422
+ cache.
423
+ See documentation on RequestLayerMuting for more details.
424
+
425
+ GetUsedLayers() → SdfLayerHandleSet
426
+ Returns set of all layers used by this cache.
427
+
428
+ GetUsedLayersRevision() → int
429
+ Return a number that can be used to determine whether or not the set
430
+ of layers used by this cache may have changed or not.
431
+ For example, if one calls GetUsedLayers() and saves the
432
+ GetUsedLayersRevision() , and then later calls GetUsedLayersRevision()
433
+ again, if the number is unchanged, then GetUsedLayers() is guaranteed
434
+ to be unchanged as well.
435
+
436
+ GetVariantFallbacks() → PcpVariantFallbackMap
437
+ Get the list of fallbacks to attempt to use when evaluating variant
438
+ sets that lack an authored selection.
439
+
440
+ HasAnyDynamicFileFormatArgumentDependencies() → bool
441
+ Returns true if any prim index in this cache has a dependency on a
442
+ dynamic file format argument field.
443
+
444
+ HasRootLayerStack(layerStack) → bool
445
+ Return true if this cache’s root layer stack is layerStack , false
446
+ otherwise.
447
+ This is functionally equivalent to comparing against the result of
448
+ GetLayerStack() , but does not require constructing a TfWeakPtr or any
449
+ refcount operations.
450
+
451
+ Parameters
452
+ layerStack (LayerStack) –
453
+
454
+ HasRootLayerStack(layerStack) -> bool
455
+ This is an overloaded member function, provided for convenience. It
456
+ differs from the above function only in what argument(s) it accepts.
457
+
458
+ Parameters
459
+ layerStack (LayerStack) –
460
+
461
+ IsInvalidAssetPath(resolvedAssetPath) → bool
462
+ Returns true if resolvedAssetPath was used by a prim (e.g.
463
+ in a reference) but did not resolve to a valid asset. This is
464
+ functionally equivalent to examining the values in the map returned by
465
+ GetInvalidAssetPaths, but more efficient.
466
+
467
+ Parameters
468
+ resolvedAssetPath (str) –
469
+
470
+ IsInvalidSublayerIdentifier(identifier) → bool
471
+ Returns true if identifier was used as a sublayer path in a layer
472
+ stack but did not identify a valid layer.
473
+ This is functionally equivalent to examining the values in the vector
474
+ returned by GetInvalidSublayerIdentifiers, but more efficient.
475
+
476
+ Parameters
477
+ identifier (str) –
478
+
479
+ IsLayerMuted(layerIdentifier) → bool
480
+ Returns true if the layer specified by layerIdentifier is muted in
481
+ this cache, false otherwise.
482
+ If layerIdentifier is relative, it is assumed to be relative to
483
+ this cache’s root layer. See documentation on RequestLayerMuting for
484
+ more details.
485
+
486
+ Parameters
487
+ layerIdentifier (str) –
488
+
489
+ IsLayerMuted(anchorLayer, layerIdentifier, canonicalMutedLayerIdentifier) -> bool
490
+ Returns true if the layer specified by layerIdentifier is muted in
491
+ this cache, false otherwise.
492
+ If layerIdentifier is relative, it is assumed to be relative to
493
+ anchorLayer . If canonicalMutedLayerIdentifier is supplied, it
494
+ will be populated with the canonical identifier of the muted layer if
495
+ this function returns true. See documentation on RequestLayerMuting
496
+ for more details.
497
+
498
+ Parameters
499
+
500
+ anchorLayer (Layer) –
501
+ layerIdentifier (str) –
502
+ canonicalMutedLayerIdentifier (str) –
503
+
504
+ IsPayloadIncluded(path) → bool
505
+ Return true if the payload is included for the given path.
506
+
507
+ Parameters
508
+ path (Path) –
509
+
510
+ IsPossibleDynamicFileFormatArgumentField(field) → bool
511
+ Returns true if the given field is the name of a field that was
512
+ composed while generating dynamic file format arguments for any prim
513
+ index in this cache.
514
+
515
+ Parameters
516
+ field (str) –
517
+
518
+ PrintStatistics() → None
519
+ Prints various statistics about the data stored in this cache.
520
+
521
+ Reload(changes) → None
522
+ Reload the layers of the layer stack, except session layers and
523
+ sublayers of session layers.
524
+ This will also try to load sublayers in this cache’s layer stack that
525
+ could not be loaded previously. It will also try to load any
526
+ referenced or payloaded layer that could not be loaded previously.
527
+ Clients should subsequently Apply() changes to use any now-
528
+ valid layers.
529
+
530
+ Parameters
531
+ changes (PcpChanges) –
532
+
533
+ RequestLayerMuting(layersToMute, layersToUnmute, changes, newLayersMuted, newLayersUnmuted) → None
534
+ Request layers to be muted or unmuted in this cache.
535
+ Muted layers are ignored during composition and do not appear in any
536
+ layer stacks. The root layer of this stage may not be muted;
537
+ attempting to do so will generate a coding error. If the root layer of
538
+ a reference or payload layer stack is muted, the behavior is as if the
539
+ muted layer did not exist, which means a composition error will be
540
+ generated.
541
+ A canonical identifier for each layer in layersToMute will be
542
+ computed using ArResolver::CreateIdentifier using the cache’s root
543
+ layer as the anchoring asset. Any layer encountered during composition
544
+ with the same identifier will be considered muted and ignored.
545
+ Note that muting a layer will cause this cache to release all
546
+ references to that layer. If no other client is holding on to
547
+ references to that layer, it will be unloaded. In this case, if there
548
+ are unsaved edits to the muted layer, those edits are lost. Since
549
+ anonymous layers are not serialized, muting an anonymous layer will
550
+ cause that layer and its contents to be lost in this case.
551
+ If changes is not nullptr , it is adjusted to reflect the
552
+ changes necessary to see the change in muted layers. Otherwise, those
553
+ changes are applied immediately.
554
+ newLayersMuted and newLayersUnmuted contains the pruned vector
555
+ of layers which are muted or unmuted by this call to
556
+ RequestLayerMuting.
557
+
558
+ Parameters
559
+
560
+ layersToMute (list[str]) –
561
+ layersToUnmute (list[str]) –
562
+ changes (PcpChanges) –
563
+ newLayersMuted (list[str]) –
564
+ newLayersUnmuted (list[str]) –
565
+
566
+ RequestPayloads(pathsToInclude, pathsToExclude, changes) → None
567
+ Request payloads to be included or excluded from composition.
568
+ pathsToInclude
569
+ is a set of paths to add to the set for payload inclusion.
570
+ pathsToExclude
571
+ is a set of paths to remove from the set for payload inclusion.
572
+ changes
573
+ if not None , is adjusted to reflect the changes necessary to see
574
+ the change in payloads; otherwise those changes are applied
575
+ immediately.
576
+ If a path is listed in both pathsToInclude and pathsToExclude, it will
577
+ be treated as an inclusion only.
578
+
579
+ Parameters
580
+
581
+ pathsToInclude (SdfPathSet) –
582
+ pathsToExclude (SdfPathSet) –
583
+ changes (PcpChanges) –
584
+
585
+ SetVariantFallbacks(map, changes) → None
586
+ Set the list of fallbacks to attempt to use when evaluating variant
587
+ sets that lack an authored selection.
588
+ If changes is not None then it’s adjusted to reflect the
589
+ changes necessary to see the change in standin preferences, otherwise
590
+ those changes are applied immediately.
591
+
592
+ Parameters
593
+
594
+ map (PcpVariantFallbackMap) –
595
+ changes (PcpChanges) –
596
+
597
+ UsesLayerStack(layerStack) → bool
598
+ Return true if layerStack is used by this cache in its
599
+ composition, false otherwise.
600
+
601
+ Parameters
602
+ layerStack (LayerStack) –
603
+
604
+ property fileFormatTarget
605
+ str
606
+ Returns the file format target this cache is configured for.
607
+
608
+ Type
609
+ type
610
+
611
+ property layerStack
612
+ LayerStack
613
+ Get the layer stack for GetLayerStackIdentifier() .
614
+ Note that this will neither compute the layer stack nor report errors.
615
+ So if the layer stack has not been computed yet this will return
616
+ None . Use ComputeLayerStack() if you need to compute the layer
617
+ stack if it hasn’t been computed already and/or get errors caused by
618
+ computing the layer stack.
619
+
620
+ Type
621
+ type
622
+
623
+ class pxr.Pcp.Dependency
624
+ Description of a dependency.
625
+ Attributes:
626
+
627
+ indexPath
628
+
629
+ mapFunc
630
+
631
+ sitePath
632
+
633
+ property indexPath
634
+
635
+ property mapFunc
636
+
637
+ property sitePath
638
+
639
+ class pxr.Pcp.DependencyType
640
+ Methods:
641
+
642
+ GetValueFromName
643
+
644
+ Attributes:
645
+
646
+ allValues
647
+
648
+ static GetValueFromName()
649
+
650
+ allValues = (Pcp.DependencyTypeNone, Pcp.DependencyTypeRoot, Pcp.DependencyTypePurelyDirect, Pcp.DependencyTypePartlyDirect, Pcp.DependencyTypeDirect, Pcp.DependencyTypeAncestral, Pcp.DependencyTypeVirtual, Pcp.DependencyTypeNonVirtual, Pcp.DependencyTypeAnyNonVirtual, Pcp.DependencyTypeAnyIncludingVirtual)
651
+
652
+ class pxr.Pcp.DynamicFileFormatDependencyData
653
+ Contains the necessary information for storing a prim index’s
654
+ dependency on dynamic file format arguments and determining if a field
655
+ change affects the prim index. This data structure does not store the
656
+ prim index or its path itself and is expected to be the data in some
657
+ other data structure that maps prim indexes to its dependencies.
658
+ Methods:
659
+
660
+ CanFieldChangeAffectFileFormatArguments(...)
661
+ 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.
662
+
663
+ GetRelevantFieldNames()
664
+ Returns a list of field names that were composed for any of the dependency contexts that were added to this dependency.
665
+
666
+ IsEmpty()
667
+ Returns whether this dependency data is empty.
668
+
669
+ CanFieldChangeAffectFileFormatArguments(fieldName, oldValue, newValue) → bool
670
+ Given a field name and the changed field values in
671
+ oldAndNewValues this return whether this change can affect any of
672
+ the file format arguments generated by any of the contexts stored in
673
+ this dependency.
674
+
675
+ Parameters
676
+
677
+ fieldName (str) –
678
+ oldValue (VtValue) –
679
+ newValue (VtValue) –
680
+
681
+ GetRelevantFieldNames() → str.Set
682
+ Returns a list of field names that were composed for any of the
683
+ dependency contexts that were added to this dependency.
684
+
685
+ IsEmpty() → bool
686
+ Returns whether this dependency data is empty.
687
+
688
+ class pxr.Pcp.ErrorArcCycle
689
+ Arcs between PcpNodes that form a cycle.
690
+
691
+ class pxr.Pcp.ErrorArcPermissionDenied
692
+ Arcs that were not made between PcpNodes because of permission
693
+ restrictions.
694
+
695
+ class pxr.Pcp.ErrorBase
696
+ Base class for all error types.
697
+ Attributes:
698
+
699
+ errorType
700
+
701
+ property errorType
702
+
703
+ class pxr.Pcp.ErrorCapacityExceeded
704
+ Exceeded the capacity for composition arcs at a single site.
705
+
706
+ class pxr.Pcp.ErrorInconsistentAttributeType
707
+ Attributes that have specs with conflicting definitions.
708
+
709
+ class pxr.Pcp.ErrorInconsistentAttributeVariability
710
+ Attributes that have specs with conflicting variability.
711
+
712
+ class pxr.Pcp.ErrorInconsistentPropertyType
713
+ Properties that have specs with conflicting definitions.
714
+
715
+ class pxr.Pcp.ErrorInvalidAssetPath
716
+ Invalid asset paths used by references or payloads.
717
+
718
+ class pxr.Pcp.ErrorInvalidAssetPathBase
719
+
720
+ class pxr.Pcp.ErrorInvalidExternalTargetPath
721
+ Invalid target or connection path in some scope that points to an
722
+ object outside of that scope.
723
+
724
+ class pxr.Pcp.ErrorInvalidInstanceTargetPath
725
+ Invalid target or connection path authored in an inherited class that
726
+ points to an instance of that class.
727
+
728
+ class pxr.Pcp.ErrorInvalidPrimPath
729
+ Invalid prim paths used by references or payloads.
730
+
731
+ class pxr.Pcp.ErrorInvalidReferenceOffset
732
+ References or payloads that use invalid layer offsets.
733
+
734
+ class pxr.Pcp.ErrorInvalidSublayerOffset
735
+ Sublayers that use invalid layer offsets.
736
+
737
+ class pxr.Pcp.ErrorInvalidSublayerOwnership
738
+ Sibling layers that have the same owner.
739
+
740
+ class pxr.Pcp.ErrorInvalidSublayerPath
741
+ Asset paths that could not be both resolved and loaded.
742
+
743
+ class pxr.Pcp.ErrorInvalidTargetPath
744
+ Invalid target or connection path.
745
+
746
+ class pxr.Pcp.ErrorMutedAssetPath
747
+ Muted asset paths used by references or payloads.
748
+
749
+ class pxr.Pcp.ErrorOpinionAtRelocationSource
750
+ Opinions were found at a relocation source path.
751
+
752
+ class pxr.Pcp.ErrorPrimPermissionDenied
753
+ Layers with illegal opinions about private prims.
754
+
755
+ class pxr.Pcp.ErrorPropertyPermissionDenied
756
+ Layers with illegal opinions about private properties.
757
+
758
+ class pxr.Pcp.ErrorSublayerCycle
759
+ Layers that recursively sublayer themselves.
760
+
761
+ class pxr.Pcp.ErrorTargetPathBase
762
+ Base class for composition errors related to target or connection
763
+ paths.
764
+
765
+ class pxr.Pcp.ErrorTargetPermissionDenied
766
+ Paths with illegal opinions about private targets.
767
+
768
+ class pxr.Pcp.ErrorType
769
+ Methods:
770
+
771
+ GetValueFromName
772
+
773
+ Attributes:
774
+
775
+ allValues
776
+
777
+ static GetValueFromName()
778
+
779
+ 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)
780
+
781
+ class pxr.Pcp.ErrorUnresolvedPrimPath
782
+ Asset paths that could not be both resolved and loaded.
783
+
784
+ class pxr.Pcp.InstanceKey
785
+ A PcpInstanceKey identifies instanceable prim indexes that share the
786
+ same set of opinions. Instanceable prim indexes with equal instance
787
+ keys are guaranteed to have the same opinions for name children and
788
+ properties beneath those name children. They are NOT guaranteed to
789
+ have the same opinions for direct properties of the prim indexes
790
+ themselves.
791
+
792
+ class pxr.Pcp.LayerStack
793
+ Represents a stack of layers that contribute opinions to composition.
794
+ Each PcpLayerStack is identified by a PcpLayerStackIdentifier. This
795
+ identifier contains all of the parameters needed to construct a layer
796
+ stack, such as the root layer, session layer, and path resolver
797
+ context.
798
+ PcpLayerStacks are constructed and managed by a
799
+ Pcp_LayerStackRegistry.
800
+ Attributes:
801
+
802
+ expired
803
+ True if this object has expired, False otherwise.
804
+
805
+ identifier
806
+ LayerStackIdentifier
807
+
808
+ incrementalRelocatesSourceToTarget
809
+ SdfRelocatesMap
810
+
811
+ incrementalRelocatesTargetToSource
812
+ SdfRelocatesMap
813
+
814
+ layerOffsets
815
+
816
+ layerTree
817
+ LayerTree
818
+
819
+ layers
820
+ list[SdfLayerRefPtr]
821
+
822
+ localErrors
823
+ list[PcpError]
824
+
825
+ mutedLayers
826
+ set[str]
827
+
828
+ pathsToPrimsWithRelocates
829
+ list[SdfPath]
830
+
831
+ relocatesSourceToTarget
832
+ SdfRelocatesMap
833
+
834
+ relocatesTargetToSource
835
+ SdfRelocatesMap
836
+
837
+ property expired
838
+ True if this object has expired, False otherwise.
839
+
840
+ property identifier
841
+ LayerStackIdentifier
842
+ Returns the identifier for this layer stack.
843
+
844
+ Type
845
+ type
846
+
847
+ property incrementalRelocatesSourceToTarget
848
+ SdfRelocatesMap
849
+ Returns incremental relocation source-to-target mapping for this layer
850
+ stack.
851
+ This map contains the individual relocation entries found across all
852
+ layers in this layer stack; it does not combine ancestral entries with
853
+ descendant entries. For instance, if this layer stack contains
854
+ relocations { /A: /B} and { /A/C: /A/D}, this map will contain { /A:
855
+ /B} and { /A/C: /A/D}.
856
+
857
+ Type
858
+ type
859
+
860
+ property incrementalRelocatesTargetToSource
861
+ SdfRelocatesMap
862
+ Returns incremental relocation target-to-source mapping for this layer
863
+ stack.
864
+ See GetIncrementalRelocatesTargetToSource for more details.
865
+
866
+ Type
867
+ type
868
+
869
+ property layerOffsets
870
+
871
+ property layerTree
872
+ LayerTree
873
+ Returns the layer tree representing the structure of this layer stack.
874
+
875
+ Type
876
+ type
877
+
878
+ property layers
879
+ list[SdfLayerRefPtr]
880
+ Returns the layers in this layer stack in strong-to-weak order.
881
+ Note that this is only the local layer stack it does not include
882
+ any layers brought in by references inside prims.
883
+
884
+ Type
885
+ type
886
+
887
+ property localErrors
888
+ list[PcpError]
889
+ Return the list of errors local to this layer stack.
890
+
891
+ Type
892
+ type
893
+
894
+ property mutedLayers
895
+ set[str]
896
+ Returns the set of layers that were muted in this layer stack.
897
+
898
+ Type
899
+ type
900
+
901
+ property pathsToPrimsWithRelocates
902
+ list[SdfPath]
903
+ Returns a list of paths to all prims across all layers in this layer
904
+ stack that contained relocates.
905
+
906
+ Type
907
+ type
908
+
909
+ property relocatesSourceToTarget
910
+ SdfRelocatesMap
911
+ Returns relocation source-to-target mapping for this layer stack.
912
+ This map combines the individual relocation entries found across all
913
+ layers in this layer stack; multiple entries that affect a single prim
914
+ will be combined into a single entry. For instance, if this layer
915
+ stack contains relocations { /A: /B} and { /A/C: /A/D}, this map will
916
+ contain { /A: /B} and { /B/C: /B/D}. This allows consumers to go from
917
+ unrelocated namespace to relocated namespace in a single step.
918
+
919
+ Type
920
+ type
921
+
922
+ property relocatesTargetToSource
923
+ SdfRelocatesMap
924
+ Returns relocation target-to-source mapping for this layer stack.
925
+ See GetRelocatesSourceToTarget for more details.
926
+
927
+ Type
928
+ type
929
+
930
+ class pxr.Pcp.LayerStackIdentifier
931
+ Arguments used to identify a layer stack.
932
+ Objects of this type are immutable.
933
+ Attributes:
934
+
935
+ pathResolverContext
936
+
937
+ rootLayer
938
+
939
+ sessionLayer
940
+
941
+ property pathResolverContext
942
+
943
+ property rootLayer
944
+
945
+ property sessionLayer
946
+
947
+ class pxr.Pcp.LayerStackSite
948
+ A site specifies a path in a layer stack of scene description.
949
+ Attributes:
950
+
951
+ layerStack
952
+
953
+ path
954
+
955
+ property layerStack
956
+
957
+ property path
958
+
959
+ class pxr.Pcp.MapExpression
960
+ An expression that yields a PcpMapFunction value.
961
+ Expressions comprise constant values, variables, and operators applied
962
+ to sub-expressions. Expressions cache their computed values
963
+ internally. Assigning a new value to a variable automatically
964
+ invalidates the cached values of dependent expressions. Common
965
+ (sub-)expressions are automatically detected and shared.
966
+ PcpMapExpression exists solely to support efficient incremental
967
+ handling of relocates edits. It represents a tree of the namespace
968
+ mapping operations and their inputs, so we can narrowly redo the
969
+ computation when one of the inputs changes.
970
+ Methods:
971
+
972
+ AddRootIdentity()
973
+ Return a new expression representing this expression with an added (if necessary) mapping from</>to</>.
974
+
975
+ Compose(f)
976
+ Create a new PcpMapExpression representing the application of f's value, followed by the application of this expression's value.
977
+
978
+ Constant
979
+ classmethod Constant(constValue) -> MapExpression
980
+
981
+ Evaluate()
982
+ Evaluate this expression, yielding a PcpMapFunction value.
983
+
984
+ Identity
985
+ classmethod Identity() -> MapExpression
986
+
987
+ Inverse()
988
+ Create a new PcpMapExpression representing the inverse of f.
989
+
990
+ MapSourceToTarget(path)
991
+ Map a path in the source namespace to the target.
992
+
993
+ MapTargetToSource(path)
994
+ Map a path in the target namespace to the source.
995
+
996
+ Attributes:
997
+
998
+ isIdentity
999
+ bool
1000
+
1001
+ isNull
1002
+ bool
1003
+
1004
+ timeOffset
1005
+ LayerOffset
1006
+
1007
+ AddRootIdentity() → MapExpression
1008
+ Return a new expression representing this expression with an added (if
1009
+ necessary) mapping from</>to</>.
1010
+
1011
+ Compose(f) → MapExpression
1012
+ Create a new PcpMapExpression representing the application of f’s
1013
+ value, followed by the application of this expression’s value.
1014
+
1015
+ Parameters
1016
+ f (MapExpression) –
1017
+
1018
+ static Constant()
1019
+ classmethod Constant(constValue) -> MapExpression
1020
+ Create a new constant.
1021
+
1022
+ Parameters
1023
+ constValue (Value) –
1024
+
1025
+ Evaluate() → Value
1026
+ Evaluate this expression, yielding a PcpMapFunction value.
1027
+ The computed result is cached. The return value is a reference to the
1028
+ internal cached value. The cache is automatically invalidated as
1029
+ needed.
1030
+
1031
+ static Identity()
1032
+ classmethod Identity() -> MapExpression
1033
+ Return an expression representing PcpMapFunction::Identity() .
1034
+
1035
+ static Inverse() → MapExpression
1036
+ Create a new PcpMapExpression representing the inverse of f.
1037
+
1038
+ MapSourceToTarget(path) → Path
1039
+ Map a path in the source namespace to the target.
1040
+ If the path is not in the domain, returns an empty path.
1041
+
1042
+ Parameters
1043
+ path (Path) –
1044
+
1045
+ MapTargetToSource(path) → Path
1046
+ Map a path in the target namespace to the source.
1047
+ If the path is not in the co-domain, returns an empty path.
1048
+
1049
+ Parameters
1050
+ path (Path) –
1051
+
1052
+ property isIdentity
1053
+ bool
1054
+ Return true if the evaluated map function is the identity function.
1055
+ For identity, MapSourceToTarget() always returns the path unchanged.
1056
+
1057
+ Type
1058
+ type
1059
+
1060
+ property isNull
1061
+ bool
1062
+ Return true if this is a null expression.
1063
+
1064
+ Type
1065
+ type
1066
+
1067
+ property timeOffset
1068
+ LayerOffset
1069
+ The time offset of the mapping.
1070
+
1071
+ Type
1072
+ type
1073
+
1074
+ class pxr.Pcp.MapFunction
1075
+ A function that maps values from one namespace (and time domain) to
1076
+ another. It represents the transformation that an arc such as a
1077
+ reference arc applies as it incorporates values across the arc.
1078
+ Take the example of a reference arc, where a source path</Model>is
1079
+ referenced as a target path,</Model_1>. The source path</Model>is the
1080
+ source of the opinions; the target path</Model_1>is where they are
1081
+ incorporated in the scene. Values in the model that refer to paths
1082
+ relative to</Model>must be transformed to be relative
1083
+ to</Model_1>instead. The PcpMapFunction for the arc provides this
1084
+ service.
1085
+ Map functions have a specific domain, or set of values they can
1086
+ operate on. Any values outside the domain cannot be mapped. The domain
1087
+ precisely tracks what areas of namespace can be referred to across
1088
+ various forms of arcs.
1089
+ Map functions can be chained to represent a series of map operations
1090
+ applied in sequence. The map function represent the cumulative effect
1091
+ as efficiently as possible. For example, in the case of a chained
1092
+ reference from</Model>to</Model>to</Model>to</Model_1>, this is
1093
+ effectively the same as a mapping directly from</Model>to</Model_1>.
1094
+ Representing the cumulative effect of arcs in this way is important
1095
+ for handling larger scenes efficiently.
1096
+ Map functions can be inverted. Formally, map functions are
1097
+ bijections (one-to-one and onto), which ensures that they can be
1098
+ inverted. Put differently, no information is lost by applying a map
1099
+ function to set of values within its domain; they retain their
1100
+ distinct identities and can always be mapped back.
1101
+ One analogy that may or may not be helpful: In the same way a
1102
+ geometric transform maps a model’s points in its rest space into the
1103
+ world coordinates for a particular instance, a PcpMapFunction maps
1104
+ values about a referenced model into the composed scene for a
1105
+ particular instance of that model. But rather than translating and
1106
+ rotating points, the map function shifts the values in namespace (and
1107
+ time).
1108
+ Methods:
1109
+
1110
+ Compose(f)
1111
+ Compose this map over the given map function.
1112
+
1113
+ ComposeOffset(newOffset)
1114
+ Compose this map function over a hypothetical map function that has an identity path mapping and offset .
1115
+
1116
+ GetInverse()
1117
+ Return the inverse of this map function.
1118
+
1119
+ Identity
1120
+ classmethod Identity() -> MapFunction
1121
+
1122
+ IdentityPathMap
1123
+ classmethod IdentityPathMap() -> PathMap
1124
+
1125
+ MapSourceToTarget(path)
1126
+ Map a path in the source namespace to the target.
1127
+
1128
+ MapTargetToSource(path)
1129
+ Map a path in the target namespace to the source.
1130
+
1131
+ Attributes:
1132
+
1133
+ isIdentity
1134
+ bool
1135
+
1136
+ isIdentityPathMapping
1137
+ bool
1138
+
1139
+ isNull
1140
+ bool
1141
+
1142
+ sourceToTargetMap
1143
+ PathMap
1144
+
1145
+ timeOffset
1146
+ LayerOffset
1147
+
1148
+ Compose(f) → MapFunction
1149
+ Compose this map over the given map function.
1150
+ The result will represent the application of f followed by the
1151
+ application of this function.
1152
+
1153
+ Parameters
1154
+ f (MapFunction) –
1155
+
1156
+ ComposeOffset(newOffset) → MapFunction
1157
+ Compose this map function over a hypothetical map function that has an
1158
+ identity path mapping and offset .
1159
+ This is equivalent to building such a map function and invoking
1160
+ Compose() , but is faster.
1161
+
1162
+ Parameters
1163
+ newOffset (LayerOffset) –
1164
+
1165
+ GetInverse() → MapFunction
1166
+ Return the inverse of this map function.
1167
+ This returns a true inverse inv: for any path p in this function’s
1168
+ domain that it maps to p’, inv(p’) ->p.
1169
+
1170
+ static Identity()
1171
+ classmethod Identity() -> MapFunction
1172
+ Construct an identity map function.
1173
+
1174
+ static IdentityPathMap()
1175
+ classmethod IdentityPathMap() -> PathMap
1176
+ Returns an identity path mapping.
1177
+
1178
+ MapSourceToTarget(path) → Path
1179
+ Map a path in the source namespace to the target.
1180
+ If the path is not in the domain, returns an empty path.
1181
+
1182
+ Parameters
1183
+ path (Path) –
1184
+
1185
+ MapTargetToSource(path) → Path
1186
+ Map a path in the target namespace to the source.
1187
+ If the path is not in the co-domain, returns an empty path.
1188
+
1189
+ Parameters
1190
+ path (Path) –
1191
+
1192
+ property isIdentity
1193
+ bool
1194
+ Return true if the map function is the identity function.
1195
+ The identity function has an identity path mapping and time offset.
1196
+
1197
+ Type
1198
+ type
1199
+
1200
+ property isIdentityPathMapping
1201
+ bool
1202
+ Return true if the map function uses the identity path mapping.
1203
+ If true, MapSourceToTarget() always returns the path unchanged.
1204
+ However, this map function may have a non-identity time offset.
1205
+
1206
+ Type
1207
+ type
1208
+
1209
+ property isNull
1210
+ bool
1211
+ Return true if this map function is the null function.
1212
+ For a null function, MapSourceToTarget() always returns an empty path.
1213
+
1214
+ Type
1215
+ type
1216
+
1217
+ property sourceToTargetMap
1218
+ PathMap
1219
+ The set of path mappings, from source to target.
1220
+
1221
+ Type
1222
+ type
1223
+
1224
+ property timeOffset
1225
+ LayerOffset
1226
+ The time offset of the mapping.
1227
+
1228
+ Type
1229
+ type
1230
+
1231
+ class pxr.Pcp.NodeRef
1232
+ PcpNode represents a node in an expression tree for compositing scene
1233
+ description.
1234
+ A node represents the opinions from a particular site. In addition, it
1235
+ may have child nodes, representing nested expressions that are
1236
+ composited over/under this node.
1237
+ Child nodes are stored and composited in strength order.
1238
+ Each node holds information about the arc to its parent. This captures
1239
+ both the relative strength of the sub-expression as well as any value-
1240
+ mapping needed, such as to rename opinions from a model to use in a
1241
+ particular instance.
1242
+ Methods:
1243
+
1244
+ CanContributeSpecs()
1245
+ Returns true if this node is allowed to contribute opinions for composition, false otherwise.
1246
+
1247
+ GetDepthBelowIntroduction()
1248
+ Return the number of levels of namespace this node's site is below the level at which it was introduced by an arc.
1249
+
1250
+ GetIntroPath()
1251
+ Get the path that introduced this node.
1252
+
1253
+ GetOriginRootNode()
1254
+ Walk up to the root origin node for this node.
1255
+
1256
+ GetPathAtIntroduction()
1257
+ Returns the path for this node's site when it was introduced.
1258
+
1259
+ GetRootNode()
1260
+ Walk up to the root node of this expression.
1261
+
1262
+ IsDueToAncestor()
1263
+
1264
+ IsRootNode()
1265
+ Returns true if this node is the root node of the prim index graph.
1266
+
1267
+ Attributes:
1268
+
1269
+ arcType
1270
+ ArcType
1271
+
1272
+ children
1273
+
1274
+ hasSpecs
1275
+ None
1276
+
1277
+ hasSymmetry
1278
+ None
1279
+
1280
+ isCulled
1281
+ bool
1282
+
1283
+ isInert
1284
+ bool
1285
+
1286
+ isRestricted
1287
+ bool
1288
+
1289
+ layerStack
1290
+ LayerStack
1291
+
1292
+ mapToParent
1293
+ MapExpression
1294
+
1295
+ mapToRoot
1296
+ MapExpression
1297
+
1298
+ namespaceDepth
1299
+ int
1300
+
1301
+ origin
1302
+
1303
+ parent
1304
+
1305
+ path
1306
+ Path
1307
+
1308
+ permission
1309
+ Permission
1310
+
1311
+ siblingNumAtOrigin
1312
+ int
1313
+
1314
+ site
1315
+ LayerStackSite
1316
+
1317
+ CanContributeSpecs() → bool
1318
+ Returns true if this node is allowed to contribute opinions for
1319
+ composition, false otherwise.
1320
+
1321
+ GetDepthBelowIntroduction() → int
1322
+ Return the number of levels of namespace this node’s site is below the
1323
+ level at which it was introduced by an arc.
1324
+
1325
+ GetIntroPath() → Path
1326
+ Get the path that introduced this node.
1327
+ Specifically, this is the path the parent node had at the level of
1328
+ namespace where this node was added as a child. For a root node, this
1329
+ returns the absolute root path. See also GetDepthBelowIntroduction() .
1330
+
1331
+ GetOriginRootNode() → NodeRef
1332
+ Walk up to the root origin node for this node.
1333
+ This is the very first node that caused this node to be added to the
1334
+ graph. For instance, the root origin node of an implied inherit is the
1335
+ original inherit node.
1336
+
1337
+ GetPathAtIntroduction() → Path
1338
+ Returns the path for this node’s site when it was introduced.
1339
+
1340
+ GetRootNode() → NodeRef
1341
+ Walk up to the root node of this expression.
1342
+
1343
+ IsDueToAncestor() → bool
1344
+
1345
+ IsRootNode() → bool
1346
+ Returns true if this node is the root node of the prim index graph.
1347
+
1348
+ property arcType
1349
+ ArcType
1350
+ Returns the type of arc connecting this node to its parent node.
1351
+
1352
+ Type
1353
+ type
1354
+
1355
+ property children
1356
+
1357
+ property hasSpecs
1358
+ None
1359
+ Returns true if this node has opinions authored for composition, false
1360
+ otherwise.
1361
+
1362
+ Type
1363
+ type
1364
+
1365
+ property hasSymmetry
1366
+ None
1367
+ Get/set whether this node provides any symmetry opinions, either
1368
+ directly or from a namespace ancestor.
1369
+
1370
+ Type
1371
+ type
1372
+
1373
+ property isCulled
1374
+ bool
1375
+
1376
+ Type
1377
+ type
1378
+
1379
+ property isInert
1380
+ bool
1381
+
1382
+ Type
1383
+ type
1384
+
1385
+ property isRestricted
1386
+ bool
1387
+
1388
+ Type
1389
+ type
1390
+
1391
+ property layerStack
1392
+ LayerStack
1393
+ Returns the layer stack for the site this node represents.
1394
+
1395
+ Type
1396
+ type
1397
+
1398
+ property mapToParent
1399
+ MapExpression
1400
+ Returns mapping function used to translate paths and values from this
1401
+ node to its parent node.
1402
+
1403
+ Type
1404
+ type
1405
+
1406
+ property mapToRoot
1407
+ MapExpression
1408
+ Returns mapping function used to translate paths and values from this
1409
+ node directly to the root node.
1410
+
1411
+ Type
1412
+ type
1413
+
1414
+ property namespaceDepth
1415
+ int
1416
+ Returns the absolute namespace depth of the node that introduced this
1417
+ node.
1418
+ Note that this does not count any variant selections.
1419
+
1420
+ Type
1421
+ type
1422
+
1423
+ property origin
1424
+
1425
+ property parent
1426
+
1427
+ property path
1428
+ Path
1429
+ Returns the path for the site this node represents.
1430
+
1431
+ Type
1432
+ type
1433
+
1434
+ property permission
1435
+ Permission
1436
+
1437
+ type : None
1438
+ Get/set the permission for this node.
1439
+ This indicates whether specs on this node can be accessed from other
1440
+ nodes.
1441
+
1442
+ Type
1443
+ type
1444
+
1445
+ property siblingNumAtOrigin
1446
+ int
1447
+ Returns this node’s index among siblings with the same arc type at
1448
+ this node’s origin.
1449
+
1450
+ Type
1451
+ type
1452
+
1453
+ property site
1454
+ LayerStackSite
1455
+ Get the site this node represents.
1456
+
1457
+ Type
1458
+ type
1459
+
1460
+ class pxr.Pcp.PrimIndex
1461
+ PcpPrimIndex is an index of the all sites of scene description that
1462
+ contribute opinions to a specific prim, under composition semantics.
1463
+ PcpComputePrimIndex() builds an index (“indexes”) the given prim site.
1464
+ At any site there may be scene description values expressing arcs that
1465
+ represent instructions to pull in further scene description.
1466
+ PcpComputePrimIndex() recursively follows these arcs, building and
1467
+ ordering the results.
1468
+ Methods:
1469
+
1470
+ ComposeAuthoredVariantSelections()
1471
+ Compose the authored prim variant selections.
1472
+
1473
+ ComputePrimChildNames(nameOrder, ...)
1474
+ Compute the prim child names for the given path.
1475
+
1476
+ ComputePrimPropertyNames(nameOrder)
1477
+ Compute the prim property names for the given path.
1478
+
1479
+ DumpToDotGraph(filename, ...)
1480
+ Dump the prim index in dot format to the file named filename .
1481
+
1482
+ DumpToString(includeInheritOriginInfo, ...)
1483
+ Dump the prim index contents to a string.
1484
+
1485
+ GetNodeProvidingSpec(primSpec)
1486
+ Returns the node that brings opinions from primSpec into this prim index.
1487
+
1488
+ GetSelectionAppliedForVariantSet(variantSet)
1489
+ Return the variant selection applied for the named variant set.
1490
+
1491
+ IsInstanceable()
1492
+ Returns true if this prim index is instanceable.
1493
+
1494
+ IsValid()
1495
+ Return true if this index is valid.
1496
+
1497
+ PrintStatistics()
1498
+ Prints various statistics about this prim index.
1499
+
1500
+ Attributes:
1501
+
1502
+ hasAnyPayloads
1503
+
1504
+ localErrors
1505
+ list[PcpError]
1506
+
1507
+ primStack
1508
+
1509
+ rootNode
1510
+ NodeRef
1511
+
1512
+ ComposeAuthoredVariantSelections() → SdfVariantSelectionMap
1513
+ Compose the authored prim variant selections.
1514
+ These are the variant selections expressed in scene description. Note
1515
+ that these selections may not have actually been applied, if they are
1516
+ invalid.
1517
+ This result is not cached, but computed each time.
1518
+
1519
+ ComputePrimChildNames(nameOrder, prohibitedNameSet) → None
1520
+ Compute the prim child names for the given path.
1521
+ errors will contain any errors encountered while performing this
1522
+ operation.
1523
+
1524
+ Parameters
1525
+
1526
+ nameOrder (list[TfToken]) –
1527
+ prohibitedNameSet (PcpTokenSet) –
1528
+
1529
+ ComputePrimPropertyNames(nameOrder) → None
1530
+ Compute the prim property names for the given path.
1531
+ errors will contain any errors encountered while performing this
1532
+ operation. The nameOrder vector must not contain any duplicate
1533
+ entries.
1534
+
1535
+ Parameters
1536
+ nameOrder (list[TfToken]) –
1537
+
1538
+ DumpToDotGraph(filename, includeInheritOriginInfo, includeMaps) → None
1539
+ Dump the prim index in dot format to the file named filename .
1540
+ See Dump(...) for information regarding arguments.
1541
+
1542
+ Parameters
1543
+
1544
+ filename (str) –
1545
+ includeInheritOriginInfo (bool) –
1546
+ includeMaps (bool) –
1547
+
1548
+ DumpToString(includeInheritOriginInfo, includeMaps) → str
1549
+ Dump the prim index contents to a string.
1550
+ If includeInheritOriginInfo is true , output for implied
1551
+ inherit nodes will include information about the originating inherit
1552
+ node. If includeMaps is true , output for each node will
1553
+ include the mappings to the parent and root node.
1554
+
1555
+ Parameters
1556
+
1557
+ includeInheritOriginInfo (bool) –
1558
+ includeMaps (bool) –
1559
+
1560
+ GetNodeProvidingSpec(primSpec) → NodeRef
1561
+ Returns the node that brings opinions from primSpec into this prim
1562
+ index.
1563
+ If no such node exists, returns an invalid PcpNodeRef.
1564
+
1565
+ Parameters
1566
+ primSpec (PrimSpec) –
1567
+
1568
+ GetNodeProvidingSpec(layer, path) -> NodeRef
1569
+ Returns the node that brings opinions from the Sd prim spec at
1570
+ layer and path into this prim index.
1571
+ If no such node exists, returns an invalid PcpNodeRef.
1572
+
1573
+ Parameters
1574
+
1575
+ layer (Layer) –
1576
+ path (Path) –
1577
+
1578
+ GetSelectionAppliedForVariantSet(variantSet) → str
1579
+ Return the variant selection applied for the named variant set.
1580
+ If none was applied, this returns an empty string. This can be
1581
+ different from the authored variant selection; for example, if the
1582
+ authored selection is invalid.
1583
+
1584
+ Parameters
1585
+ variantSet (str) –
1586
+
1587
+ IsInstanceable() → bool
1588
+ Returns true if this prim index is instanceable.
1589
+ Instanceable prim indexes with the same instance key are guaranteed to
1590
+ have the same set of opinions, but may not have local opinions about
1591
+ name children.
1592
+ PcpInstanceKey
1593
+
1594
+ IsValid() → bool
1595
+ Return true if this index is valid.
1596
+ A default-constructed index is invalid.
1597
+
1598
+ PrintStatistics() → None
1599
+ Prints various statistics about this prim index.
1600
+
1601
+ property hasAnyPayloads
1602
+
1603
+ property localErrors
1604
+ list[PcpError]
1605
+ Return the list of errors local to this prim.
1606
+
1607
+ Type
1608
+ type
1609
+
1610
+ property primStack
1611
+
1612
+ property rootNode
1613
+ NodeRef
1614
+ Returns the root node of the prim index graph.
1615
+
1616
+ Type
1617
+ type
1618
+
1619
+ class pxr.Pcp.PropertyIndex
1620
+ PcpPropertyIndex is an index of all sites in scene description that
1621
+ contribute opinions to a specific property, under composition
1622
+ semantics.
1623
+ Attributes:
1624
+
1625
+ localErrors
1626
+ list[PcpError]
1627
+
1628
+ localPropertyStack
1629
+
1630
+ propertyStack
1631
+
1632
+ property localErrors
1633
+ list[PcpError]
1634
+ Return the list of errors local to this property.
1635
+
1636
+ Type
1637
+ type
1638
+
1639
+ property localPropertyStack
1640
+
1641
+ property propertyStack
1642
+
1643
+ class pxr.Pcp.Site
1644
+ A site specifies a path in a layer stack of scene description.
1645
+ Attributes:
1646
+
1647
+ layerStack
1648
+
1649
+ path
1650
+
1651
+ property layerStack
1652
+
1653
+ property path
1654
+
1655
+ © Copyright 2019-2023, NVIDIA.
1656
+ Last updated on Nov 14, 2023.
1657
+
1658
+
1659
+
PhysicsSchemaTools.md ADDED
@@ -0,0 +1,422 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ PhysicsSchemaTools module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ PhysicsSchemaTools module
10
+
11
+  
12
+
13
+ # PhysicsSchemaTools module
14
+
15
+ 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.
16
+
17
+ Classes:
18
+
19
+ Path(*args, **kwargs)
20
+ PurePath subclass that can make system calls.
21
+
22
+ Functions:
23
+
24
+ addActor
25
+
26
+ addBoxCollisionShape
27
+
28
+ addCollisionShape
29
+
30
+ addDensity
31
+
32
+ addDisplayColor
33
+
34
+ addGroundPlane
35
+
36
+ addGroundTriMesh
37
+
38
+ addOrientation
39
+
40
+ addPhysicsScene
41
+
42
+ addPosition
43
+
44
+ addRigidBody
45
+
46
+ addRigidBox
47
+
48
+ addRigidBoxForInstancing
49
+
50
+ addRigidCapsule
51
+
52
+ addRigidCone
53
+
54
+ addRigidCylinder
55
+
56
+ addRigidSphere
57
+
58
+ addVelocity
59
+
60
+ createMesh
61
+
62
+ createMeshBox
63
+
64
+ createMeshCapsule
65
+
66
+ createMeshCylinder
67
+
68
+ createMeshSphere
69
+
70
+ createMeshSquare
71
+
72
+ decodeSdfPath
73
+
74
+ encodeSdfPath
75
+
76
+ getMassSpaceInertia
77
+
78
+ intToSdfPath
79
+
80
+ sdfPathToInt
81
+
82
+ class pxr.PhysicsSchemaTools.Path(*args, **kwargs)
83
+ PurePath subclass that can make system calls.
84
+ Path represents a filesystem path but unlike PurePath, also offers
85
+ methods to do system calls on path objects. Depending on your system,
86
+ instantiating a Path will return either a PosixPath or a WindowsPath
87
+ object. You can also instantiate a PosixPath or WindowsPath directly,
88
+ but cannot instantiate a WindowsPath on a POSIX system or vice versa.
89
+ Methods:
90
+
91
+ absolute()
92
+ Return an absolute version of this path.
93
+
94
+ chmod(mode, *[, follow_symlinks])
95
+ Change the permissions of the path, like os.chmod().
96
+
97
+ cwd()
98
+ Return a new path pointing to the current working directory (as returned by os.getcwd()).
99
+
100
+ exists()
101
+ Whether this path exists.
102
+
103
+ expanduser()
104
+ Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser)
105
+
106
+ glob(pattern)
107
+ Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern.
108
+
109
+ group()
110
+ Return the group name of the file gid.
111
+
112
+ hardlink_to(target)
113
+ Make this path a hard link pointing to the same file as target.
114
+
115
+ home()
116
+ Return a new path pointing to the user's home directory (as returned by os.path.expanduser('~')).
117
+
118
+ is_block_device()
119
+ Whether this path is a block device.
120
+
121
+ is_char_device()
122
+ Whether this path is a character device.
123
+
124
+ is_dir()
125
+ Whether this path is a directory.
126
+
127
+ is_fifo()
128
+ Whether this path is a FIFO.
129
+
130
+ is_file()
131
+ Whether this path is a regular file (also True for symlinks pointing to regular files).
132
+
133
+ is_mount()
134
+ Check if this path is a POSIX mount point
135
+
136
+ is_socket()
137
+ Whether this path is a socket.
138
+
139
+ is_symlink()
140
+ Whether this path is a symbolic link.
141
+
142
+ iterdir()
143
+ Iterate over the files in this directory.
144
+
145
+ lchmod(mode)
146
+ Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's.
147
+
148
+ link_to(target)
149
+ Make the target path a hard link pointing to this path.
150
+
151
+ lstat()
152
+ Like stat(), except if the path points to a symlink, the symlink's status information is returned, rather than its target's.
153
+
154
+ mkdir([mode, parents, exist_ok])
155
+ Create a new directory at this given path.
156
+
157
+ open([mode, buffering, encoding, errors, ...])
158
+ Open the file pointed by this path and return a file object, as the built-in open() function does.
159
+
160
+ owner()
161
+ Return the login name of the file owner.
162
+
163
+ read_bytes()
164
+ Open the file in bytes mode, read it, and close the file.
165
+
166
+ read_text([encoding, errors])
167
+ Open the file in text mode, read it, and close the file.
168
+
169
+ readlink()
170
+ Return the path to which the symbolic link points.
171
+
172
+ rename(target)
173
+ Rename this path to the target path.
174
+
175
+ replace(target)
176
+ Rename this path to the target path, overwriting if that path exists.
177
+
178
+ resolve([strict])
179
+ Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows).
180
+
181
+ rglob(pattern)
182
+ Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree.
183
+
184
+ rmdir()
185
+ Remove this directory.
186
+
187
+ samefile(other_path)
188
+ Return whether other_path is the same or not as this file (as returned by os.path.samefile()).
189
+
190
+ stat(*[, follow_symlinks])
191
+ Return the result of the stat() system call on this path, like os.stat() does.
192
+
193
+ symlink_to(target[, target_is_directory])
194
+ Make this path a symlink pointing to the target path.
195
+
196
+ touch([mode, exist_ok])
197
+ Create this file with the given access mode, if it doesn't exist.
198
+
199
+ unlink([missing_ok])
200
+ Remove this file or link.
201
+
202
+ write_bytes(data)
203
+ Open the file in bytes mode, write to it, and close the file.
204
+
205
+ write_text(data[, encoding, errors, newline])
206
+ Open the file in text mode, write to it, and close the file.
207
+
208
+ absolute()
209
+ Return an absolute version of this path. This function works
210
+ even if the path doesn’t point to anything.
211
+ No normalization is done, i.e. all ‘.’ and ‘..’ will be kept along.
212
+ Use resolve() to get the canonical path to a file.
213
+
214
+ chmod(mode, *, follow_symlinks=True)
215
+ Change the permissions of the path, like os.chmod().
216
+
217
+ classmethod cwd()
218
+ Return a new path pointing to the current working directory
219
+ (as returned by os.getcwd()).
220
+
221
+ exists()
222
+ Whether this path exists.
223
+
224
+ expanduser()
225
+ Return a new path with expanded ~ and ~user constructs
226
+ (as returned by os.path.expanduser)
227
+
228
+ glob(pattern)
229
+ Iterate over this subtree and yield all existing files (of any
230
+ kind, including directories) matching the given relative pattern.
231
+
232
+ group()
233
+ Return the group name of the file gid.
234
+
235
+ hardlink_to(target)
236
+ Make this path a hard link pointing to the same file as target.
237
+ Note the order of arguments (self, target) is the reverse of os.link’s.
238
+
239
+ classmethod home()
240
+ Return a new path pointing to the user’s home directory (as
241
+ returned by os.path.expanduser(‘~’)).
242
+
243
+ is_block_device()
244
+ Whether this path is a block device.
245
+
246
+ is_char_device()
247
+ Whether this path is a character device.
248
+
249
+ is_dir()
250
+ Whether this path is a directory.
251
+
252
+ is_fifo()
253
+ Whether this path is a FIFO.
254
+
255
+ is_file()
256
+ Whether this path is a regular file (also True for symlinks pointing
257
+ to regular files).
258
+
259
+ is_mount()
260
+ Check if this path is a POSIX mount point
261
+
262
+ is_socket()
263
+ Whether this path is a socket.
264
+
265
+ is_symlink()
266
+ Whether this path is a symbolic link.
267
+
268
+ iterdir()
269
+ Iterate over the files in this directory. Does not yield any
270
+ result for the special paths ‘.’ and ‘..’.
271
+
272
+ lchmod(mode)
273
+ Like chmod(), except if the path points to a symlink, the symlink’s
274
+ permissions are changed, rather than its target’s.
275
+
276
+ link_to(target)
277
+ Make the target path a hard link pointing to this path.
278
+ Note this function does not make this path a hard link to target,
279
+ despite the implication of the function and argument names. The order
280
+ of arguments (target, link) is the reverse of Path.symlink_to, but
281
+ matches that of os.link.
282
+ Deprecated since Python 3.10 and scheduled for removal in Python 3.12.
283
+ Use hardlink_to() instead.
284
+
285
+ lstat()
286
+ Like stat(), except if the path points to a symlink, the symlink’s
287
+ status information is returned, rather than its target’s.
288
+
289
+ mkdir(mode=511, parents=False, exist_ok=False)
290
+ Create a new directory at this given path.
291
+
292
+ open(mode='r', buffering=-1, encoding=None, errors=None, newline=None)
293
+ Open the file pointed by this path and return a file object, as
294
+ the built-in open() function does.
295
+
296
+ owner()
297
+ Return the login name of the file owner.
298
+
299
+ read_bytes()
300
+ Open the file in bytes mode, read it, and close the file.
301
+
302
+ read_text(encoding=None, errors=None)
303
+ Open the file in text mode, read it, and close the file.
304
+
305
+ readlink()
306
+ Return the path to which the symbolic link points.
307
+
308
+ rename(target)
309
+ Rename this path to the target path.
310
+ The target path may be absolute or relative. Relative paths are
311
+ interpreted relative to the current working directory, not the
312
+ directory of the Path object.
313
+ Returns the new Path instance pointing to the target path.
314
+
315
+ replace(target)
316
+ Rename this path to the target path, overwriting if that path exists.
317
+ The target path may be absolute or relative. Relative paths are
318
+ interpreted relative to the current working directory, not the
319
+ directory of the Path object.
320
+ Returns the new Path instance pointing to the target path.
321
+
322
+ resolve(strict=False)
323
+ Make the path absolute, resolving all symlinks on the way and also
324
+ normalizing it (for example turning slashes into backslashes under
325
+ Windows).
326
+
327
+ rglob(pattern)
328
+ Recursively yield all existing files (of any kind, including
329
+ directories) matching the given relative pattern, anywhere in
330
+ this subtree.
331
+
332
+ rmdir()
333
+ Remove this directory. The directory must be empty.
334
+
335
+ samefile(other_path)
336
+ Return whether other_path is the same or not as this file
337
+ (as returned by os.path.samefile()).
338
+
339
+ stat(*, follow_symlinks=True)
340
+ Return the result of the stat() system call on this path, like
341
+ os.stat() does.
342
+
343
+ symlink_to(target, target_is_directory=False)
344
+ Make this path a symlink pointing to the target path.
345
+ Note the order of arguments (link, target) is the reverse of os.symlink.
346
+
347
+ touch(mode=438, exist_ok=True)
348
+ Create this file with the given access mode, if it doesn’t exist.
349
+
350
+ unlink(missing_ok=False)
351
+ Remove this file or link.
352
+ If the path is a directory, use rmdir() instead.
353
+
354
+ write_bytes(data)
355
+ Open the file in bytes mode, write to it, and close the file.
356
+
357
+ write_text(data, encoding=None, errors=None, newline=None)
358
+ Open the file in text mode, write to it, and close the file.
359
+
360
+ pxr.PhysicsSchemaTools.addActor()
361
+
362
+ pxr.PhysicsSchemaTools.addBoxCollisionShape()
363
+
364
+ pxr.PhysicsSchemaTools.addCollisionShape()
365
+
366
+ pxr.PhysicsSchemaTools.addDensity()
367
+
368
+ pxr.PhysicsSchemaTools.addDisplayColor()
369
+
370
+ pxr.PhysicsSchemaTools.addGroundPlane()
371
+
372
+ pxr.PhysicsSchemaTools.addGroundTriMesh()
373
+
374
+ pxr.PhysicsSchemaTools.addOrientation()
375
+
376
+ pxr.PhysicsSchemaTools.addPhysicsScene()
377
+
378
+ pxr.PhysicsSchemaTools.addPosition()
379
+
380
+ pxr.PhysicsSchemaTools.addRigidBody()
381
+
382
+ pxr.PhysicsSchemaTools.addRigidBox()
383
+
384
+ pxr.PhysicsSchemaTools.addRigidBoxForInstancing()
385
+
386
+ pxr.PhysicsSchemaTools.addRigidCapsule()
387
+
388
+ pxr.PhysicsSchemaTools.addRigidCone()
389
+
390
+ pxr.PhysicsSchemaTools.addRigidCylinder()
391
+
392
+ pxr.PhysicsSchemaTools.addRigidSphere()
393
+
394
+ pxr.PhysicsSchemaTools.addVelocity()
395
+
396
+ pxr.PhysicsSchemaTools.createMesh()
397
+
398
+ pxr.PhysicsSchemaTools.createMeshBox()
399
+
400
+ pxr.PhysicsSchemaTools.createMeshCapsule()
401
+
402
+ pxr.PhysicsSchemaTools.createMeshCylinder()
403
+
404
+ pxr.PhysicsSchemaTools.createMeshSphere()
405
+
406
+ pxr.PhysicsSchemaTools.createMeshSquare()
407
+
408
+ pxr.PhysicsSchemaTools.decodeSdfPath()
409
+
410
+ pxr.PhysicsSchemaTools.encodeSdfPath()
411
+
412
+ pxr.PhysicsSchemaTools.getMassSpaceInertia()
413
+
414
+ pxr.PhysicsSchemaTools.intToSdfPath()
415
+
416
+ pxr.PhysicsSchemaTools.sdfPathToInt()
417
+
418
+ © Copyright 2019-2023, NVIDIA.
419
+ Last updated on Nov 14, 2023.
420
+
421
+
422
+
Plug.md ADDED
@@ -0,0 +1,580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Plug module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Plug module
10
+
11
+  
12
+
13
+ # Plug module
14
+
15
+ Summary: Provides a plug-in framework implementation. Define interfaces, discover, register, and apply plug-in modules to nodes.
16
+
17
+ This package defines facilities for dealing with plugins.
18
+ Classes:
19
+
20
+ Notice
21
+ Notifications sent by the Plug module.
22
+
23
+ Plugin
24
+ Defines an interface to registered plugins.
25
+
26
+ Registry
27
+ Defines an interface for registering plugins.
28
+
29
+ class pxr.Plug.Notice
30
+ Notifications sent by the Plug module.
31
+ Classes:
32
+
33
+ Base
34
+
35
+ DidRegisterPlugins
36
+
37
+ class Base
38
+
39
+ class DidRegisterPlugins
40
+ Methods:
41
+
42
+ GetNewPlugins
43
+
44
+ GetNewPlugins()
45
+
46
+ class pxr.Plug.Plugin
47
+ Defines an interface to registered plugins.
48
+ Plugins are registered using the interfaces in PlugRegistry .
49
+ For each registered plugin, there is an instance of PlugPlugin
50
+ which can be used to load and unload the plugin and to retrieve
51
+ information about the classes implemented by the plugin.
52
+ Methods:
53
+
54
+ DeclaresType(type, includeSubclasses)
55
+ Returns true if type is declared by this plugin.
56
+
57
+ FindPluginResource(path, verify)
58
+ Find a plugin resource by absolute or relative path optionally verifying that file exists.
59
+
60
+ GetMetadataForType(type)
61
+ Returns the metadata sub-dictionary for a particular type.
62
+
63
+ Load()
64
+ Loads the plugin.
65
+
66
+ MakeResourcePath(path)
67
+ Build a plugin resource path by returning a given absolute path or combining the plugin's resource path with a given relative path.
68
+
69
+ Attributes:
70
+
71
+ expired
72
+ True if this object has expired, False otherwise.
73
+
74
+ isLoaded
75
+ bool
76
+
77
+ isPythonModule
78
+ bool
79
+
80
+ isResource
81
+ bool
82
+
83
+ metadata
84
+ JsObject
85
+
86
+ name
87
+ str
88
+
89
+ path
90
+ str
91
+
92
+ resourcePath
93
+ str
94
+
95
+ DeclaresType(type, includeSubclasses) → bool
96
+ Returns true if type is declared by this plugin.
97
+ If includeSubclasses is specified, also returns true if any
98
+ subclasses of type have been declared.
99
+
100
+ Parameters
101
+
102
+ type (Type) –
103
+ includeSubclasses (bool) –
104
+
105
+ FindPluginResource(path, verify) → str
106
+ Find a plugin resource by absolute or relative path optionally
107
+ verifying that file exists.
108
+ If verification fails an empty path is returned. Relative paths are
109
+ relative to the plugin’s resource path.
110
+
111
+ Parameters
112
+
113
+ path (str) –
114
+ verify (bool) –
115
+
116
+ GetMetadataForType(type) → JsObject
117
+ Returns the metadata sub-dictionary for a particular type.
118
+
119
+ Parameters
120
+ type (Type) –
121
+
122
+ Load() → bool
123
+ Loads the plugin.
124
+ This is a noop if the plugin is already loaded.
125
+
126
+ MakeResourcePath(path) → str
127
+ Build a plugin resource path by returning a given absolute path or
128
+ combining the plugin’s resource path with a given relative path.
129
+
130
+ Parameters
131
+ path (str) –
132
+
133
+ property expired
134
+ True if this object has expired, False otherwise.
135
+
136
+ property isLoaded
137
+ bool
138
+ Returns true if the plugin is currently loaded.
139
+ Resource plugins always report as loaded.
140
+
141
+ Type
142
+ type
143
+
144
+ property isPythonModule
145
+ bool
146
+ Returns true if the plugin is a python module.
147
+
148
+ Type
149
+ type
150
+
151
+ property isResource
152
+ bool
153
+ Returns true if the plugin is resource-only.
154
+
155
+ Type
156
+ type
157
+
158
+ property metadata
159
+ JsObject
160
+ Returns the dictionary containing meta-data for the plugin.
161
+
162
+ Type
163
+ type
164
+
165
+ property name
166
+ str
167
+ Returns the plugin’s name.
168
+
169
+ Type
170
+ type
171
+
172
+ property path
173
+ str
174
+ Returns the plugin’s filesystem path.
175
+
176
+ Type
177
+ type
178
+
179
+ property resourcePath
180
+ str
181
+ Returns the plugin’s resources filesystem path.
182
+
183
+ Type
184
+ type
185
+
186
+ class pxr.Plug.Registry
187
+ Defines an interface for registering plugins.
188
+ PlugRegistry maintains a registry of plug-ins known to the system and
189
+ provides an interface for base classes to load any plug-ins required
190
+ to instantiate a subclass of a given type.
191
+
192
+ ## Defining a Base Class API
193
+
194
+ In order to use this facility you will generally provide a module
195
+ which defines the API for a plug-in base class. This API will be
196
+ sufficient for the application or framework to make use of custom
197
+ subclasses that will be written by plug-in developers.
198
+ For example, if you have an image processing application, you might
199
+ want to support plug-ins that implement image filters. You can define
200
+ an abstract base class for image filters that declares the API your
201
+ application will require image filters to implement; perhaps something
202
+ simple like C++ Code Example 1 (Doxygen only).
203
+ People writing custom filters would write a subclass of ImageFilter
204
+ that overrides the two methods, implementing their own special
205
+ filtering behavior.
206
+
207
+ ## Enabling Plug-in Loading for the Base Class
208
+
209
+ In order for ImageFilter to be able to load plug-ins that implement
210
+ these custom subclasses, it must be registered with the TfType system.
211
+ The ImageFilter base class, as was mentioned earlier, should be made
212
+ available in a module that the application links with. This is done
213
+ so that plug-ins that want to provide ImageFilters can also link with
214
+ the module allowing them to subclass ImageFilter.
215
+
216
+ ## Registering Plug-ins
217
+
218
+ A plug-in developer can now write plug-ins with ImageFilter
219
+ subclasses. Plug-ins can be implemented either as native dynamic
220
+ modules (either regular dynamic modules or framework bundles) or
221
+ as Python modules.
222
+ Plug-ins must be registered with the registry. All plugins are
223
+ registered via RegisterPlugins() . Plug-in Python modules must be
224
+ directly importable (in other words they must be able to be found in
225
+ Python’s module path.) Plugins are registered by providing a path or
226
+ paths to JSON files that describe the location, structure and contents
227
+ of the plugin. The standard name for these files in plugInfo.json.
228
+ Typically, the application that hosts plug-ins will locate and
229
+ register plug-ins at startup.
230
+ The plug-in facility is lazy. It does not dynamically load code from
231
+ plug-in bundles until that code is required.
232
+
233
+ ## plugInfo.json
234
+
235
+ A plugInfo.json file has the following structure:
236
+ {
237
+ # Comments are allowed and indicated by a hash at the start of a
238
+ # line or after spaces and tabs. They continue to the end of line.
239
+ # Blank lines are okay, too.
240
+
241
+ # This is optional. It may contain any number of strings.
242
+ # Paths may be absolute or relative.
243
+ # Paths ending with slash have plugInfo.json appended automatically.
244
+ # '\*' may be used anywhere to match any character except slash.
245
+ # '\*\*' may be used anywhere to match any character including slash.
246
+ "Includes": [
247
+ "/absolute/path/to/plugInfo.json",
248
+ "/absolute/path/to/custom.filename",
249
+ "/absolute/path/to/directory/with/plugInfo/",
250
+ "relative/path/to/plugInfo.json",
251
+ "relative/path/to/directory/with/plugInfo/",
252
+ "glob\*/pa\*th/\*to\*/\*/plugInfo.json",
253
+ "recursive/pa\*\*th/\*\*/"
254
+ ],
255
+
256
+ # This is optional. It may contain any number of objects.
257
+ "Plugins": [
258
+ {
259
+ # Type is required and may be "module", "python" or "resource".
260
+ "Type": "module",
261
+
262
+ # Name is required. It should be the Python module name,
263
+ # the shared module name, or a unique resource name.
264
+ "Name": "myplugin",
265
+
266
+ # Root is optional. It defaults to ".".
267
+ # This gives the path to the plugin as a whole if the plugin
268
+ # has substructure. For Python it should be the directory
269
+ # with the __init__.py file. The path is usually relative.
270
+ "Root": ".",
271
+
272
+ # LibraryPath is required by Type "module" and unused
273
+ # otherwise. It gives the path to the shared module
274
+ # object, either absolute or relative to Root.
275
+ "LibraryPath": "libmyplugin.so",
276
+
277
+ # ResourcePath is option. It defaults to ".".
278
+ # This gives the path to the plugin's resources directory.
279
+ # The path is either absolute or relative to Root.
280
+ "ResourcePath": "resources",
281
+
282
+ # Info is required. It's described below.
283
+ "Info": {
284
+ # Plugin contents.
285
+ }
286
+ }
287
+ ]
288
+ }
289
+
290
+ As a special case, if a plugInfo.json contains an object that doesn’t
291
+ have either the”Includes”or”Plugins”keys then it’s as if the object
292
+ was in a”Plugins”array.
293
+
294
+ ## Advertising a Plug-in’s Contents
295
+
296
+ Once the plug-ins are registered, the plug-in facility must also be
297
+ able to tell what they contain. Specifically, it must be able to find
298
+ out what subclasses of what plug-in base classes each plug-in
299
+ contains. Plug-ins must advertise this information through their
300
+ plugInfo.json file in the”Info”key. In the”Info”object there should be
301
+ a key”Types”holding an object.
302
+ This”Types”object’s keys are names of subclasses and its values are
303
+ yet more objects (the subclass meta-data objects). The meta-data
304
+ objects can contain arbitrary key-value pairs. The plug-in mechanism
305
+ will look for a meta-data key called”displayName”whose value should be
306
+ the display name of the subclass. The plug-in mechanism will look for
307
+ a meta-data key called”bases”whose value should be an array of base
308
+ class type names.
309
+ For example, a bundle that contains a subclass of ImageFilter might
310
+ have a plugInfo.json that looks like the following example.
311
+ {
312
+ "Types": {
313
+ "MyCustomCoolFilter" : {
314
+ "bases": ["ImageFilter"],
315
+ "displayName": "Add Coolness to Image"
316
+ # other arbitrary metadata for MyCustomCoolFilter here
317
+ }
318
+ }
319
+ }
320
+
321
+ What this says is that the plug-in contains a type called
322
+ MyCustomCoolFilter which has a base class ImageFilter and that this
323
+ subclass should be called”Add Coolness to Image”in user-visible
324
+ contexts.
325
+ In addition to the”displayName”meta-data key which is actually known
326
+ to the plug-in facility, you may put whatever other information you
327
+ want into a class’meta-data dictionary. If your plug-in base class
328
+ wants to define custom keys that it requires all subclasses to
329
+ provide, you can do that. Or, if a plug-in writer wants to define
330
+ their own keys that their code will look for at runtime, that is OK as
331
+ well.
332
+
333
+ ## Working with Subclasses of a Plug-in Base Class
334
+
335
+ Most code with uses types defined in plug-ins doesn’t deal with the
336
+ Plug API directly. Instead, the TfType interface is used to lookup
337
+ types and to manufacture instances. The TfType interface will take
338
+ care to load any required plugins.
339
+ To wrap up our example, the application that wants to actually use
340
+ ImageFilter plug-ins would probably do a couple of things. First, it
341
+ would get a list of available ImageFilters to present to the user.
342
+ This could be accomplished as shown in Python Code Example 2 (Doxygen
343
+ only).
344
+ Then, when the user picks a filter from the list, it would manufacture
345
+ and instance of the filter as shown in Python Code Example 3 (Doxygen
346
+ only).
347
+ As was mentioned earlier, this plug-in facility tries to be as lazy as
348
+ possible about loading the code associated with plug-ins. To that end,
349
+ loading of a plugin will be deferred until an instance of a type is
350
+ manufactured which requires the plugin.
351
+
352
+ ## Multiple Subclasses of Multiple Plug-in Base Classes
353
+
354
+ It is possible for a bundle to implement multiple subclasses for a
355
+ plug-in base class if desired. If you want to package half a dozen
356
+ ImageFilter subclasses in one bundle, that will work fine. All must be
357
+ declared in the plugInfo.json.
358
+ It is possible for there to be multiple classes in your application or
359
+ framework that are plug-in base classes. Plug-ins that implement
360
+ subclasses of any of these base classes can all coexist. And, it is
361
+ possible to have subclasses of multiple plug-in base classes in the
362
+ same bundle.
363
+ When putting multiple subclasses (of the same or different base
364
+ classes) in a bundle, keep in mind that dynamic loading happens for
365
+ the whole bundle the first time any subclass is needed, the whole
366
+ bundle will be loaded. But this is generally not a big concern.
367
+ For example, say the example application also has a plug-in base
368
+ class”ImageCodec”that allows people to add support for reading and
369
+ writing other image formats. Imagine that you want to supply a plug-in
370
+ that has two codecs and a filter all in a single plug-in. Your
371
+ plugInfo.json”Info”object might look something like this example.
372
+ {
373
+ "Types": {
374
+ "MyTIFFCodec": {
375
+ "bases": ["ImageCodec"],
376
+ "displayName": "TIFF Image"
377
+ },
378
+ "MyJPEGCodec": {
379
+ "bases": ["ImageCodec"],
380
+ "displayName": "JPEG Image"
381
+ },
382
+ "MyCustomCoolFilter" : {
383
+ "bases": ["ImageFilter"],
384
+ "displayName": "Add Coolness to Image"
385
+ }
386
+ }
387
+ }
388
+
389
+ ## Dependencies on Other Plug-ins
390
+
391
+ If you write a plug-in that has dependencies on another plug-in that
392
+ you cannot (or do not want to) link against statically, you can
393
+ declare the dependencies in your plug-in’s plugInfo.json. A plug-in
394
+ declares dependencies on other classes with a PluginDependencies key
395
+ whose value is a dictionary. The keys of the dictionary are plug-in
396
+ base class names and the values are arrays of subclass names.
397
+ The following example contains an example of a plug-in that depends on
398
+ two classes from the plug-in in the previous example.
399
+ {
400
+ "Types": {
401
+ "UltraCoolFilter": {
402
+ "bases": ["MyCustomCoolFilter"],
403
+ "displayName": "Add Unbelievable Coolness to Image"
404
+ # A subclass of MyCustomCoolFilter that also uses MyTIFFCodec
405
+ }
406
+ },
407
+ "PluginDependencies": {
408
+ "ImageFilter": ["MyCustomCoolFilter"],
409
+ "ImageCodec": ["MyTIFFCodec"]
410
+ }
411
+ }
412
+
413
+ The ImageFilter provided by the plug-in in this example depends on the
414
+ other ImageFilter MyCoolImageFilter and the ImageCodec MyTIFFCodec.
415
+ Before loading this plug-in, the plug-in facility will ensure that
416
+ those two classes are present, loading the plug-in that contains them
417
+ if needed.
418
+ Methods:
419
+
420
+ FindDerivedTypeByName
421
+ classmethod FindDerivedTypeByName(base, typeName) -> Type
422
+
423
+ FindTypeByName
424
+ classmethod FindTypeByName(typeName) -> Type
425
+
426
+ GetAllDerivedTypes
427
+ classmethod GetAllDerivedTypes(base, result) -> None
428
+
429
+ GetAllPlugins()
430
+ Returns all registered plug-ins.
431
+
432
+ GetDirectlyDerivedTypes
433
+ classmethod GetDirectlyDerivedTypes(base) -> list[Type]
434
+
435
+ GetPluginForType(t)
436
+ Returns the plug-in for the given type, or a null pointer if there is no registered plug-in.
437
+
438
+ GetPluginWithName(name)
439
+ Returns a plugin with the specified module name.
440
+
441
+ GetStringFromPluginMetaData(type, key)
442
+ Looks for a string associated with type and key and returns it, or an empty string if type or key are not found.
443
+
444
+ RegisterPlugins(pathToPlugInfo)
445
+ Registers all plug-ins discovered at pathToPlugInfo.
446
+
447
+ Attributes:
448
+
449
+ expired
450
+ True if this object has expired, False otherwise.
451
+
452
+ static FindDerivedTypeByName()
453
+ classmethod FindDerivedTypeByName(base, typeName) -> Type
454
+ Retrieve the TfType that derives from base and has the given
455
+ alias or type name typeName .
456
+ See the documentation for TfType::FindDerivedByName for more
457
+ information. Use this function if you expect that the derived type may
458
+ be provided by a plugin. Calling this function will incur plugin
459
+ discovery (but not loading) if plugin discovery has not yet occurred.
460
+ Note that additional plugins may be registered during program runtime.
461
+ Plug-In Discovery & Registration
462
+
463
+ Parameters
464
+
465
+ base (Type) –
466
+ typeName (str) –
467
+
468
+ FindDerivedTypeByName(typeName) -> Type
469
+ Retrieve the TfType that derives from Base and has the given
470
+ alias or type name typeName .
471
+ See the documentation for TfType::FindDerivedByName for more
472
+ information. Use this function if you expect that the derived type may
473
+ be provided by a plugin. Calling this function will incur plugin
474
+ discovery (but not loading) if plugin discovery has not yet occurred.
475
+ Note that additional plugins may be registered during program runtime.
476
+ Plug-In Discovery & Registration
477
+
478
+ Parameters
479
+ typeName (str) –
480
+
481
+ static FindTypeByName()
482
+ classmethod FindTypeByName(typeName) -> Type
483
+ Retrieve the TfType corresponding to the given name .
484
+ See the documentation for TfType::FindByName for more information.
485
+ Use this function if you expect that name may name a type provided
486
+ by a plugin. Calling this function will incur plugin discovery (but
487
+ not loading) if plugin discovery has not yet occurred.
488
+ Note that additional plugins may be registered during program runtime.
489
+ Plug-In Discovery & Registration
490
+
491
+ Parameters
492
+ typeName (str) –
493
+
494
+ static GetAllDerivedTypes()
495
+ classmethod GetAllDerivedTypes(base, result) -> None
496
+ Return the set of all types derived (directly or indirectly) from
497
+ base.
498
+ Use this function if you expect that plugins may provide types derived
499
+ from base. Otherwise, use TfType::GetAllDerivedTypes.
500
+ Note that additional plugins may be registered during program runtime.
501
+ Plug-In Discovery & Registration
502
+
503
+ Parameters
504
+
505
+ base (Type) –
506
+ result (set[Type]) –
507
+
508
+ GetAllDerivedTypes(result) -> None
509
+ Return the set of all types derived (directly or indirectly) from
510
+ Base.
511
+ Use this function if you expect that plugins may provide types derived
512
+ from base. Otherwise, use TfType::GetAllDerivedTypes.
513
+ Note that additional plugins may be registered during program runtime.
514
+ Plug-In Discovery & Registration
515
+
516
+ Parameters
517
+ result (set[Type]) –
518
+
519
+ GetAllPlugins() → list[PlugPluginPtr]
520
+ Returns all registered plug-ins.
521
+ Note that additional plugins may be registered during program runtime.
522
+ Plug-In Discovery & Registration
523
+
524
+ static GetDirectlyDerivedTypes()
525
+ classmethod GetDirectlyDerivedTypes(base) -> list[Type]
526
+ Return a vector of types derived directly from base.
527
+ Use this function if you expect that plugins may provide types derived
528
+ from base. Otherwise, use TfType::GetDirectlyDerivedTypes.
529
+
530
+ Parameters
531
+ base (Type) –
532
+
533
+ GetPluginForType(t) → Plugin
534
+ Returns the plug-in for the given type, or a null pointer if there is
535
+ no registered plug-in.
536
+
537
+ Parameters
538
+ t (Type) –
539
+
540
+ GetPluginWithName(name) → Plugin
541
+ Returns a plugin with the specified module name.
542
+ Note that additional plugins may be registered during program runtime.
543
+ Plug-In Discovery & Registration
544
+
545
+ Parameters
546
+ name (str) –
547
+
548
+ GetStringFromPluginMetaData(type, key) → str
549
+ Looks for a string associated with type and key and returns it, or
550
+ an empty string if type or key are not found.
551
+
552
+ Parameters
553
+
554
+ type (Type) –
555
+ key (str) –
556
+
557
+ RegisterPlugins(pathToPlugInfo) → list[PlugPluginPtr]
558
+ Registers all plug-ins discovered at pathToPlugInfo.
559
+ Sends PlugNotice::DidRegisterPlugins with any newly registered
560
+ plugins.
561
+
562
+ Parameters
563
+ pathToPlugInfo (str) –
564
+
565
+ RegisterPlugins(pathsToPlugInfo) -> list[PlugPluginPtr]
566
+ Registers all plug-ins discovered in any of pathsToPlugInfo.
567
+ Sends PlugNotice::DidRegisterPlugins with any newly registered
568
+ plugins.
569
+
570
+ Parameters
571
+ pathsToPlugInfo (list[str]) –
572
+
573
+ property expired
574
+ True if this object has expired, False otherwise.
575
+
576
+ © Copyright 2019-2023, NVIDIA.
577
+ Last updated on Nov 14, 2023.
578
+
579
+
580
+
Sdf.md ADDED
The diff for this file is too large to render. See raw diff
 
Sdr.md ADDED
@@ -0,0 +1,709 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Sdr module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Sdr module
10
+
11
+  
12
+
13
+ # Sdr module
14
+
15
+ Summary: The Sdr (Shader Definition Registry) is a specialized version of Ndr for Shaders.
16
+
17
+ Python bindings for libSdr
18
+ Classes:
19
+
20
+ NodeContext
21
+
22
+ NodeMetadata
23
+
24
+ NodeRole
25
+
26
+ PropertyMetadata
27
+
28
+ PropertyRole
29
+
30
+ PropertyTypes
31
+
32
+ Registry
33
+ The shading-specialized version of NdrRegistry .
34
+
35
+ ShaderNode
36
+ A specialized version of NdrNode which holds shading information.
37
+
38
+ ShaderNodeList
39
+
40
+ ShaderProperty
41
+ A specialized version of NdrProperty which holds shading information.
42
+
43
+ class pxr.Sdr.NodeContext
44
+ Attributes:
45
+
46
+ Displacement
47
+
48
+ Light
49
+
50
+ LightFilter
51
+
52
+ Pattern
53
+
54
+ PixelFilter
55
+
56
+ SampleFilter
57
+
58
+ Surface
59
+
60
+ Volume
61
+
62
+ Displacement = 'displacement'
63
+
64
+ Light = 'light'
65
+
66
+ LightFilter = 'lightFilter'
67
+
68
+ Pattern = 'pattern'
69
+
70
+ PixelFilter = 'pixelFilter'
71
+
72
+ SampleFilter = 'sampleFilter'
73
+
74
+ Surface = 'surface'
75
+
76
+ Volume = 'volume'
77
+
78
+ class pxr.Sdr.NodeMetadata
79
+ Attributes:
80
+
81
+ Category
82
+
83
+ Departments
84
+
85
+ Help
86
+
87
+ ImplementationName
88
+
89
+ Label
90
+
91
+ Pages
92
+
93
+ Primvars
94
+
95
+ Role
96
+
97
+ SdrDefinitionNameFallbackPrefix
98
+
99
+ SdrUsdEncodingVersion
100
+
101
+ Target
102
+
103
+ Category = 'category'
104
+
105
+ Departments = 'departments'
106
+
107
+ Help = 'help'
108
+
109
+ ImplementationName = '__SDR__implementationName'
110
+
111
+ Label = 'label'
112
+
113
+ Pages = 'pages'
114
+
115
+ Primvars = 'primvars'
116
+
117
+ Role = 'role'
118
+
119
+ SdrDefinitionNameFallbackPrefix = 'sdrDefinitionNameFallbackPrefix'
120
+
121
+ SdrUsdEncodingVersion = 'sdrUsdEncodingVersion'
122
+
123
+ Target = '__SDR__target'
124
+
125
+ class pxr.Sdr.NodeRole
126
+ Attributes:
127
+
128
+ Field
129
+
130
+ Math
131
+
132
+ Primvar
133
+
134
+ Texture
135
+
136
+ Field = 'field'
137
+
138
+ Math = 'math'
139
+
140
+ Primvar = 'primvar'
141
+
142
+ Texture = 'texture'
143
+
144
+ class pxr.Sdr.PropertyMetadata
145
+ Attributes:
146
+
147
+ Colorspace
148
+
149
+ Connectable
150
+
151
+ DefaultInput
152
+
153
+ Help
154
+
155
+ Hints
156
+
157
+ ImplementationName
158
+
159
+ IsAssetIdentifier
160
+
161
+ IsDynamicArray
162
+
163
+ Label
164
+
165
+ Options
166
+
167
+ Page
168
+
169
+ RenderType
170
+
171
+ Role
172
+
173
+ SdrUsdDefinitionType
174
+
175
+ Target
176
+
177
+ ValidConnectionTypes
178
+
179
+ VstructConditionalExpr
180
+
181
+ VstructMemberName
182
+
183
+ VstructMemberOf
184
+
185
+ Widget
186
+
187
+ Colorspace = '__SDR__colorspace'
188
+
189
+ Connectable = 'connectable'
190
+
191
+ DefaultInput = '__SDR__defaultinput'
192
+
193
+ Help = 'help'
194
+
195
+ Hints = 'hints'
196
+
197
+ ImplementationName = '__SDR__implementationName'
198
+
199
+ IsAssetIdentifier = '__SDR__isAssetIdentifier'
200
+
201
+ IsDynamicArray = 'isDynamicArray'
202
+
203
+ Label = 'label'
204
+
205
+ Options = 'options'
206
+
207
+ Page = 'page'
208
+
209
+ RenderType = 'renderType'
210
+
211
+ Role = 'role'
212
+
213
+ SdrUsdDefinitionType = 'sdrUsdDefinitionType'
214
+
215
+ Target = '__SDR__target'
216
+
217
+ ValidConnectionTypes = 'validConnectionTypes'
218
+
219
+ VstructConditionalExpr = 'vstructConditionalExpr'
220
+
221
+ VstructMemberName = 'vstructMemberName'
222
+
223
+ VstructMemberOf = 'vstructMemberOf'
224
+
225
+ Widget = 'widget'
226
+
227
+ class pxr.Sdr.PropertyRole
228
+ Attributes:
229
+
230
+ None
231
+
232
+ None = 'none'
233
+
234
+ class pxr.Sdr.PropertyTypes
235
+ Attributes:
236
+
237
+ Color
238
+
239
+ Color4
240
+
241
+ Float
242
+
243
+ Int
244
+
245
+ Matrix
246
+
247
+ Normal
248
+
249
+ Point
250
+
251
+ String
252
+
253
+ Struct
254
+
255
+ Terminal
256
+
257
+ Unknown
258
+
259
+ Vector
260
+
261
+ Vstruct
262
+
263
+ Color = 'color'
264
+
265
+ Color4 = 'color4'
266
+
267
+ Float = 'float'
268
+
269
+ Int = 'int'
270
+
271
+ Matrix = 'matrix'
272
+
273
+ Normal = 'normal'
274
+
275
+ Point = 'point'
276
+
277
+ String = 'string'
278
+
279
+ Struct = 'struct'
280
+
281
+ Terminal = 'terminal'
282
+
283
+ Unknown = 'unknown'
284
+
285
+ Vector = 'vector'
286
+
287
+ Vstruct = 'vstruct'
288
+
289
+ class pxr.Sdr.Registry
290
+ The shading-specialized version of NdrRegistry .
291
+ Methods:
292
+
293
+ GetShaderNodeByIdentifier(identifier, ...)
294
+ Exactly like NdrRegistry::GetNodeByIdentifier() , but returns a SdrShaderNode pointer instead of a NdrNode pointer.
295
+
296
+ GetShaderNodeByIdentifierAndType(identifier, ...)
297
+ Exactly like NdrRegistry::GetNodeByIdentifierAndType() , but returns a SdrShaderNode pointer instead of a NdrNode pointer.
298
+
299
+ GetShaderNodeByName(name, typePriority, filter)
300
+ Exactly like NdrRegistry::GetNodeByName() , but returns a SdrShaderNode pointer instead of a NdrNode pointer.
301
+
302
+ GetShaderNodeByNameAndType(name, nodeType, ...)
303
+ Exactly like NdrRegistry::GetNodeByNameAndType() , but returns a SdrShaderNode pointer instead of a NdrNode pointer.
304
+
305
+ GetShaderNodeFromAsset(shaderAsset, ...)
306
+ Wrapper method for NdrRegistry::GetNodeFromAsset() .
307
+
308
+ GetShaderNodeFromSourceCode(sourceCode, ...)
309
+ Wrapper method for NdrRegistry::GetNodeFromSourceCode() .
310
+
311
+ GetShaderNodesByFamily(family, filter)
312
+ Exactly like NdrRegistry::GetNodesByFamily() , but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.
313
+
314
+ GetShaderNodesByIdentifier(identifier)
315
+ Exactly like NdrRegistry::GetNodesByIdentifier() , but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.
316
+
317
+ GetShaderNodesByName(name, filter)
318
+ Exactly like NdrRegistry::GetNodesByName() , but returns a vector of SdrShaderNode pointers instead of a vector of NdrNode pointers.
319
+
320
+ Attributes:
321
+
322
+ expired
323
+ True if this object has expired, False otherwise.
324
+
325
+ GetShaderNodeByIdentifier(identifier, typePriority) → ShaderNode
326
+ Exactly like NdrRegistry::GetNodeByIdentifier() , but returns a
327
+ SdrShaderNode pointer instead of a NdrNode pointer.
328
+
329
+ Parameters
330
+
331
+ identifier (NdrIdentifier) –
332
+ typePriority (NdrTokenVec) –
333
+
334
+ GetShaderNodeByIdentifierAndType(identifier, nodeType) → ShaderNode
335
+ Exactly like NdrRegistry::GetNodeByIdentifierAndType() , but
336
+ returns a SdrShaderNode pointer instead of a NdrNode pointer.
337
+
338
+ Parameters
339
+
340
+ identifier (NdrIdentifier) –
341
+ nodeType (str) –
342
+
343
+ GetShaderNodeByName(name, typePriority, filter) → ShaderNode
344
+ Exactly like NdrRegistry::GetNodeByName() , but returns a
345
+ SdrShaderNode pointer instead of a NdrNode pointer.
346
+
347
+ Parameters
348
+
349
+ name (str) –
350
+ typePriority (NdrTokenVec) –
351
+ filter (VersionFilter) –
352
+
353
+ GetShaderNodeByNameAndType(name, nodeType, filter) → ShaderNode
354
+ Exactly like NdrRegistry::GetNodeByNameAndType() , but returns a
355
+ SdrShaderNode pointer instead of a NdrNode pointer.
356
+
357
+ Parameters
358
+
359
+ name (str) –
360
+ nodeType (str) –
361
+ filter (VersionFilter) –
362
+
363
+ GetShaderNodeFromAsset(shaderAsset, metadata, subIdentifier, sourceType) → ShaderNode
364
+ Wrapper method for NdrRegistry::GetNodeFromAsset() .
365
+ Returns a valid SdrShaderNode pointer upon success.
366
+
367
+ Parameters
368
+
369
+ shaderAsset (AssetPath) –
370
+ metadata (NdrTokenMap) –
371
+ subIdentifier (str) –
372
+ sourceType (str) –
373
+
374
+ GetShaderNodeFromSourceCode(sourceCode, sourceType, metadata) → ShaderNode
375
+ Wrapper method for NdrRegistry::GetNodeFromSourceCode() .
376
+ Returns a valid SdrShaderNode pointer upon success.
377
+
378
+ Parameters
379
+
380
+ sourceCode (str) –
381
+ sourceType (str) –
382
+ metadata (NdrTokenMap) –
383
+
384
+ GetShaderNodesByFamily(family, filter) → SdrShaderNodePtrVec
385
+ Exactly like NdrRegistry::GetNodesByFamily() , but returns a
386
+ vector of SdrShaderNode pointers instead of a vector of
387
+ NdrNode pointers.
388
+
389
+ Parameters
390
+
391
+ family (str) –
392
+ filter (VersionFilter) –
393
+
394
+ GetShaderNodesByIdentifier(identifier) → SdrShaderNodePtrVec
395
+ Exactly like NdrRegistry::GetNodesByIdentifier() , but returns a
396
+ vector of SdrShaderNode pointers instead of a vector of
397
+ NdrNode pointers.
398
+
399
+ Parameters
400
+ identifier (NdrIdentifier) –
401
+
402
+ GetShaderNodesByName(name, filter) → SdrShaderNodePtrVec
403
+ Exactly like NdrRegistry::GetNodesByName() , but returns a vector
404
+ of SdrShaderNode pointers instead of a vector of NdrNode
405
+ pointers.
406
+
407
+ Parameters
408
+
409
+ name (str) –
410
+ filter (VersionFilter) –
411
+
412
+ property expired
413
+ True if this object has expired, False otherwise.
414
+
415
+ class pxr.Sdr.ShaderNode
416
+ A specialized version of NdrNode which holds shading information.
417
+ Methods:
418
+
419
+ GetAdditionalPrimvarProperties()
420
+ The list of string input properties whose values provide the names of additional primvars consumed by this node.
421
+
422
+ GetAllVstructNames()
423
+ Gets all vstructs that are present in the shader.
424
+
425
+ GetAssetIdentifierInputNames()
426
+ Returns the list of all inputs that are tagged as asset identifier inputs.
427
+
428
+ GetCategory()
429
+ The category assigned to this node, if any.
430
+
431
+ GetDefaultInput()
432
+ Returns the first shader input that is tagged as the default input.
433
+
434
+ GetDepartments()
435
+ The departments this node is associated with, if any.
436
+
437
+ GetHelp()
438
+ The help message assigned to this node, if any.
439
+
440
+ GetImplementationName()
441
+ Returns the implementation name of this node.
442
+
443
+ GetLabel()
444
+ The label assigned to this node, if any.
445
+
446
+ GetPages()
447
+ 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).
448
+
449
+ GetPrimvars()
450
+ The list of primvars this node knows it requires / uses.
451
+
452
+ GetPropertyNamesForPage(pageName)
453
+ Gets the names of the properties on a certain page (one that was returned by GetPages() ).
454
+
455
+ GetRole()
456
+ Returns the role of this node.
457
+
458
+ GetShaderInput(inputName)
459
+ Get a shader input property by name.
460
+
461
+ GetShaderOutput(outputName)
462
+ Get a shader output property by name.
463
+
464
+ GetAdditionalPrimvarProperties() → NdrTokenVec
465
+ The list of string input properties whose values provide the names of
466
+ additional primvars consumed by this node.
467
+ For example, this may return a token named varname . This
468
+ indicates that the client should query the value of a (presumed to be
469
+ string-valued) input attribute named varname from its scene
470
+ description to determine the name of a primvar the node will consume.
471
+ See GetPrimvars() for additional information.
472
+
473
+ GetAllVstructNames() → NdrTokenVec
474
+ Gets all vstructs that are present in the shader.
475
+
476
+ GetAssetIdentifierInputNames() → NdrTokenVec
477
+ Returns the list of all inputs that are tagged as asset identifier
478
+ inputs.
479
+
480
+ GetCategory() → str
481
+ The category assigned to this node, if any.
482
+ Distinct from the family returned from GetFamily() .
483
+
484
+ GetDefaultInput() → ShaderProperty
485
+ Returns the first shader input that is tagged as the default input.
486
+ A default input and its value can be used to acquire a fallback value
487
+ for a node when the node is considered’disabled’or otherwise incapable
488
+ of producing an output value.
489
+
490
+ GetDepartments() → NdrTokenVec
491
+ The departments this node is associated with, if any.
492
+
493
+ GetHelp() → str
494
+ The help message assigned to this node, if any.
495
+
496
+ GetImplementationName() → str
497
+ Returns the implementation name of this node.
498
+ The name of the node is how to refer to the node in shader networks.
499
+ The label is how to present this node to users. The implementation
500
+ name is the name of the function (or something) this node represents
501
+ in the implementation. Any client using the implementation must
502
+ call this method to get the correct name; using getName() is not
503
+ correct.
504
+
505
+ GetLabel() → str
506
+ The label assigned to this node, if any.
507
+ Distinct from the name returned from GetName() . In the context of
508
+ a UI, the label value might be used as the display name for the node
509
+ instead of the name.
510
+
511
+ GetPages() → NdrTokenVec
512
+ Gets the pages on which the node’s properties reside (an aggregate of
513
+ the unique SdrShaderProperty::GetPage() values for all of the
514
+ node’s properties).
515
+ Nodes themselves do not reside on pages. In an example scenario,
516
+ properties might be divided into two pages,’Simple’and’Advanced’.
517
+
518
+ GetPrimvars() → NdrTokenVec
519
+ The list of primvars this node knows it requires / uses.
520
+ For example, a shader node may require the’normals’primvar to function
521
+ correctly. Additional, user specified primvars may have been authored
522
+ on the node. These can be queried via
523
+ GetAdditionalPrimvarProperties() . Together, GetPrimvars() and
524
+ GetAdditionalPrimvarProperties() , provide the complete list of
525
+ primvar requirements for the node.
526
+
527
+ GetPropertyNamesForPage(pageName) → NdrTokenVec
528
+ Gets the names of the properties on a certain page (one that was
529
+ returned by GetPages() ).
530
+ To get properties that are not assigned to a page, an empty string can
531
+ be used for pageName .
532
+
533
+ Parameters
534
+ pageName (str) –
535
+
536
+ GetRole() → str
537
+ Returns the role of this node.
538
+ This is used to annotate the role that the shader node plays inside a
539
+ shader network. We can tag certain shaders to indicate their role
540
+ within a shading network. We currently tag primvar reading nodes,
541
+ texture reading nodes and nodes that access volume fields (like
542
+ extinction or scattering). This is done to identify resources used by
543
+ a shading network.
544
+
545
+ GetShaderInput(inputName) → ShaderProperty
546
+ Get a shader input property by name.
547
+ nullptr is returned if an input with the given name does not
548
+ exist.
549
+
550
+ Parameters
551
+ inputName (str) –
552
+
553
+ GetShaderOutput(outputName) → ShaderProperty
554
+ Get a shader output property by name.
555
+ nullptr is returned if an output with the given name does not
556
+ exist.
557
+
558
+ Parameters
559
+ outputName (str) –
560
+
561
+ class pxr.Sdr.ShaderNodeList
562
+ Methods:
563
+
564
+ append
565
+
566
+ extend
567
+
568
+ append()
569
+
570
+ extend()
571
+
572
+ class pxr.Sdr.ShaderProperty
573
+ A specialized version of NdrProperty which holds shading
574
+ information.
575
+ Methods:
576
+
577
+ GetDefaultValueAsSdfType()
578
+ Accessor for default value corresponding to the SdfValueTypeName returned by GetTypeAsSdfType.
579
+
580
+ GetHelp()
581
+ The help message assigned to this property, if any.
582
+
583
+ GetHints()
584
+ Any UI"hints"that are associated with this property.
585
+
586
+ GetImplementationName()
587
+ Returns the implementation name of this property.
588
+
589
+ GetLabel()
590
+ The label assigned to this property, if any.
591
+
592
+ GetOptions()
593
+ 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).
594
+
595
+ GetPage()
596
+ The page (group), eg"Advanced", this property appears on, if any.
597
+
598
+ GetVStructConditionalExpr()
599
+ If this field is part of a vstruct, this is the conditional expression.
600
+
601
+ GetVStructMemberName()
602
+ If this field is part of a vstruct, this is its name in the struct.
603
+
604
+ GetVStructMemberOf()
605
+ If this field is part of a vstruct, this is the name of the struct.
606
+
607
+ GetValidConnectionTypes()
608
+ Gets the list of valid connection types for this property.
609
+
610
+ GetWidget()
611
+ The widget"hint"that indicates the widget that can best display the type of data contained in this property, if any.
612
+
613
+ IsAssetIdentifier()
614
+ 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.
615
+
616
+ IsDefaultInput()
617
+ Determines if the value held by this property is the default input for this node.
618
+
619
+ IsVStruct()
620
+ Returns true if the field is the head of a vstruct.
621
+
622
+ IsVStructMember()
623
+ Returns true if this field is part of a vstruct.
624
+
625
+ GetDefaultValueAsSdfType() → VtValue
626
+ Accessor for default value corresponding to the SdfValueTypeName
627
+ returned by GetTypeAsSdfType.
628
+ Note that this is different than GetDefaultValue which returns the
629
+ default value associated with the SdrPropertyType and may differ from
630
+ the SdfValueTypeName, example when sdrUsdDefinitionType metadata is
631
+ specified for a sdr property.
632
+ GetTypeAsSdfType
633
+
634
+ GetHelp() → str
635
+ The help message assigned to this property, if any.
636
+
637
+ GetHints() → NdrTokenMap
638
+ Any UI”hints”that are associated with this property.
639
+ “Hints”are simple key/value pairs.
640
+
641
+ GetImplementationName() → str
642
+ Returns the implementation name of this property.
643
+ The name of the property is how to refer to the property in shader
644
+ networks. The label is how to present this property to users. The
645
+ implementation name is the name of the parameter this property
646
+ represents in the implementation. Any client using the implementation
647
+ must call this method to get the correct name; using getName()
648
+ is not correct.
649
+
650
+ GetLabel() → str
651
+ The label assigned to this property, if any.
652
+ Distinct from the name returned from GetName() . In the context of
653
+ a UI, the label value might be used as the display name for the
654
+ property instead of the name.
655
+
656
+ GetOptions() → NdrOptionVec
657
+ If the property has a set of valid values that are pre-determined,
658
+ this will return the valid option names and corresponding string
659
+ values (if the option was specified with a value).
660
+
661
+ GetPage() → str
662
+ The page (group), eg”Advanced”, this property appears on, if any.
663
+ Note that the page for a shader property can be nested, delimited
664
+ by”:”, representing the hierarchy of sub-pages a property is defined
665
+ in.
666
+
667
+ GetVStructConditionalExpr() → str
668
+ If this field is part of a vstruct, this is the conditional
669
+ expression.
670
+
671
+ GetVStructMemberName() → str
672
+ If this field is part of a vstruct, this is its name in the struct.
673
+
674
+ GetVStructMemberOf() → str
675
+ If this field is part of a vstruct, this is the name of the struct.
676
+
677
+ GetValidConnectionTypes() → NdrTokenVec
678
+ Gets the list of valid connection types for this property.
679
+ This value comes from shader metadata, and may not be specified. The
680
+ value from NdrProperty::GetType() can be used as a fallback, or
681
+ you can use the connectability test in CanConnectTo() .
682
+
683
+ GetWidget() → str
684
+ The widget”hint”that indicates the widget that can best display the
685
+ type of data contained in this property, if any.
686
+ Examples of this value could include”number”,”slider”, etc.
687
+
688
+ IsAssetIdentifier() → bool
689
+ Determines if the value held by this property is an asset identifier
690
+ (eg, a file path); the logic for this is left up to the parser.
691
+ Note: The type returned from GetTypeAsSdfType() will be Asset
692
+ if this method returns true (even though its true underlying data
693
+ type is string).
694
+
695
+ IsDefaultInput() → bool
696
+ Determines if the value held by this property is the default input for
697
+ this node.
698
+
699
+ IsVStruct() → bool
700
+ Returns true if the field is the head of a vstruct.
701
+
702
+ IsVStructMember() → bool
703
+ Returns true if this field is part of a vstruct.
704
+
705
+ © Copyright 2019-2023, NVIDIA.
706
+ Last updated on Nov 14, 2023.
707
+
708
+
709
+
Tf.md ADDED
@@ -0,0 +1,1345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Tf module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Tf module
10
+
11
+  
12
+
13
+ # Tf module
14
+
15
+ Summary: The Tf (Tools Foundations) module.
16
+
17
+ Tf – Tools Foundation
18
+ Exceptions:
19
+
20
+ CppException
21
+
22
+ ErrorException(*args)
23
+
24
+ Classes:
25
+
26
+ CallContext
27
+
28
+ Debug
29
+
30
+ DiagnosticType
31
+
32
+ Enum
33
+
34
+ Error
35
+
36
+ MallocTag
37
+
38
+ NamedTemporaryFile([suffix, prefix, dir, text])
39
+ A named temporary file which keeps the internal file handle closed.
40
+
41
+ Notice
42
+
43
+ PyModuleWasLoaded
44
+ A TfNotice that is sent when a script module is loaded.
45
+
46
+ RefPtrTracker
47
+ Provides tracking of TfRefPtr objects to particular objects.
48
+
49
+ ScopeDescription
50
+ 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.
51
+
52
+ ScriptModuleLoader
53
+ 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.
54
+
55
+ Singleton
56
+
57
+ StatusObject
58
+
59
+ Stopwatch
60
+
61
+ TemplateString
62
+
63
+ Tf_PyEnumWrapper
64
+
65
+ Tf_TestAnnotatedBoolResult
66
+
67
+ Tf_TestPyContainerConversions
68
+
69
+ Tf_TestPyOptional
70
+
71
+ Type
72
+ TfType represents a dynamic runtime type.
73
+
74
+ Warning
75
+
76
+ Functions:
77
+
78
+ Fatal(msg)
79
+ Raise a fatal error to the Tf Diagnostic system.
80
+
81
+ GetCodeLocation(framesUp)
82
+ Returns a tuple (moduleName, functionName, fileName, lineNo).
83
+
84
+ PrepareModule(module, result)
85
+ PrepareModule(module, result) -- Prepare an extension module at import time.
86
+
87
+ PreparePythonModule([moduleName])
88
+ Prepare an extension module at import time.
89
+
90
+ RaiseCodingError(msg)
91
+ Raise a coding error to the Tf Diagnostic system.
92
+
93
+ RaiseRuntimeError(msg)
94
+ Raise a runtime error to the Tf Diagnostic system.
95
+
96
+ Status(msg[, verbose])
97
+ Issues a status update to the Tf diagnostic system.
98
+
99
+ Warn(msg[, template])
100
+ Issue a warning via the TfDiagnostic system.
101
+
102
+ WindowsImportWrapper()
103
+
104
+ exception pxr.Tf.CppException
105
+
106
+ exception pxr.Tf.ErrorException(*args)
107
+
108
+ class pxr.Tf.CallContext
109
+ Attributes:
110
+
111
+ file
112
+ char
113
+
114
+ function
115
+ char
116
+
117
+ line
118
+ int
119
+
120
+ prettyFunction
121
+ char
122
+
123
+ property file
124
+ char
125
+
126
+ Type
127
+ type
128
+
129
+ property function
130
+ char
131
+
132
+ Type
133
+ type
134
+
135
+ property line
136
+ int
137
+
138
+ Type
139
+ type
140
+
141
+ property prettyFunction
142
+ char
143
+
144
+ Type
145
+ type
146
+
147
+ class pxr.Tf.Debug
148
+ Methods:
149
+
150
+ GetDebugSymbolDescription
151
+ classmethod GetDebugSymbolDescription(name) -> str
152
+
153
+ GetDebugSymbolDescriptions
154
+ classmethod GetDebugSymbolDescriptions() -> str
155
+
156
+ GetDebugSymbolNames
157
+ classmethod GetDebugSymbolNames() -> list[str]
158
+
159
+ IsDebugSymbolNameEnabled
160
+ classmethod IsDebugSymbolNameEnabled(name) -> bool
161
+
162
+ SetDebugSymbolsByName
163
+ classmethod SetDebugSymbolsByName(pattern, value) -> list[str]
164
+
165
+ SetOutputFile
166
+ classmethod SetOutputFile(file) -> None
167
+
168
+ static GetDebugSymbolDescription()
169
+ classmethod GetDebugSymbolDescription(name) -> str
170
+ Get a description for the specified debug symbol.
171
+ A short description of the debug symbol is returned. This is the same
172
+ description string that is embedded in the return value of
173
+ GetDebugSymbolDescriptions.
174
+
175
+ Parameters
176
+ name (str) –
177
+
178
+ static GetDebugSymbolDescriptions()
179
+ classmethod GetDebugSymbolDescriptions() -> str
180
+ Get a description of all debug symbols and their purpose.
181
+ A single string describing all registered debug symbols along with
182
+ short descriptions is returned.
183
+
184
+ static GetDebugSymbolNames()
185
+ classmethod GetDebugSymbolNames() -> list[str]
186
+ Get a listing of all debug symbols.
187
+
188
+ static IsDebugSymbolNameEnabled()
189
+ classmethod IsDebugSymbolNameEnabled(name) -> bool
190
+ True if the specified debug symbol is set.
191
+
192
+ Parameters
193
+ name (str) –
194
+
195
+ static SetDebugSymbolsByName()
196
+ classmethod SetDebugSymbolsByName(pattern, value) -> list[str]
197
+ Set registered debug symbols matching pattern to value .
198
+ All registered debug symbols matching pattern are set to value
199
+ . The only matching is an exact match with pattern , or if
200
+ pattern ends with an’*’as is otherwise a prefix of a debug
201
+ symbols. The names of all debug symbols set by this call are returned
202
+ as a vector.
203
+
204
+ Parameters
205
+
206
+ pattern (str) –
207
+ value (bool) –
208
+
209
+ static SetOutputFile()
210
+ classmethod SetOutputFile(file) -> None
211
+ Direct debug output to either stdout or stderr.
212
+ Note that file MUST be either stdout or stderr. If not, issue an
213
+ error and do nothing. Debug output is issued to stdout by default. If
214
+ the environment variable TF_DEBUG_OUTPUT_FILE is set to’stderr’, then
215
+ output is issued to stderr by default.
216
+
217
+ Parameters
218
+ file (FILE) –
219
+
220
+ class pxr.Tf.DiagnosticType
221
+ Methods:
222
+
223
+ GetValueFromName
224
+
225
+ Attributes:
226
+
227
+ allValues
228
+
229
+ static GetValueFromName()
230
+
231
+ 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)
232
+
233
+ class pxr.Tf.Enum
234
+ Methods:
235
+
236
+ GetValueFromFullName
237
+ classmethod GetValueFromFullName(fullname, foundIt) -> Enum
238
+
239
+ static GetValueFromFullName()
240
+ classmethod GetValueFromFullName(fullname, foundIt) -> Enum
241
+ Returns the enumerated value for a fully-qualified name.
242
+ This takes a fully-qualified enumerated value name (e.g.,
243
+ "Season::WINTER" ) and returns the associated value. If there is
244
+ no such name, this returns -1. Since -1 can sometimes be a valid
245
+ value, the foundIt flag pointer, if not None , is set to
246
+ true if the name was found and false otherwise. Also, since
247
+ this is not a templated function, it has to return a generic value
248
+ type, so we use TfEnum .
249
+
250
+ Parameters
251
+
252
+ fullname (str) –
253
+ foundIt (bool) –
254
+
255
+ class pxr.Tf.Error
256
+ Classes:
257
+
258
+ Mark
259
+
260
+ Attributes:
261
+
262
+ errorCode
263
+ The error code posted for this error.
264
+
265
+ errorCodeString
266
+ The error code posted for this error, as a string.
267
+
268
+ class Mark
269
+ Methods:
270
+
271
+ Clear
272
+
273
+ GetErrors
274
+ A list of the errors held by this mark.
275
+
276
+ IsClean
277
+
278
+ SetMark
279
+
280
+ Clear()
281
+
282
+ GetErrors()
283
+ A list of the errors held by this mark.
284
+
285
+ IsClean()
286
+
287
+ SetMark()
288
+
289
+ property errorCode
290
+ The error code posted for this error.
291
+
292
+ property errorCodeString
293
+ The error code posted for this error, as a string.
294
+
295
+ class pxr.Tf.MallocTag
296
+ Classes:
297
+
298
+ CallTree
299
+
300
+ Methods:
301
+
302
+ GetCallStacks
303
+
304
+ GetCallTree
305
+ classmethod GetCallTree(tree, skipRepeated) -> bool
306
+
307
+ GetMaxTotalBytes
308
+ classmethod GetMaxTotalBytes() -> int
309
+
310
+ GetTotalBytes
311
+ classmethod GetTotalBytes() -> int
312
+
313
+ Initialize
314
+ classmethod Initialize(errMsg) -> bool
315
+
316
+ IsInitialized
317
+ classmethod IsInitialized() -> bool
318
+
319
+ SetCapturedMallocStacksMatchList
320
+ classmethod SetCapturedMallocStacksMatchList(matchList) -> None
321
+
322
+ SetDebugMatchList
323
+ classmethod SetDebugMatchList(matchList) -> None
324
+
325
+ class CallTree
326
+ Classes:
327
+
328
+ CallSite
329
+
330
+ PathNode
331
+
332
+ Methods:
333
+
334
+ GetCallSites
335
+
336
+ GetPrettyPrintString
337
+
338
+ GetRoot
339
+
340
+ LogReport
341
+
342
+ Report
343
+
344
+ class CallSite
345
+ Attributes:
346
+
347
+ nBytes
348
+
349
+ name
350
+
351
+ property nBytes
352
+
353
+ property name
354
+
355
+ class PathNode
356
+ Methods:
357
+
358
+ GetChildren
359
+
360
+ Attributes:
361
+
362
+ nAllocations
363
+
364
+ nBytes
365
+
366
+ nBytesDirect
367
+
368
+ siteName
369
+
370
+ GetChildren()
371
+
372
+ property nAllocations
373
+
374
+ property nBytes
375
+
376
+ property nBytesDirect
377
+
378
+ property siteName
379
+
380
+ GetCallSites()
381
+
382
+ GetPrettyPrintString()
383
+
384
+ GetRoot()
385
+
386
+ LogReport()
387
+
388
+ Report()
389
+
390
+ static GetCallStacks()
391
+
392
+ static GetCallTree()
393
+ classmethod GetCallTree(tree, skipRepeated) -> bool
394
+ Return a snapshot of memory usage.
395
+ Returns a snapshot by writing into \*tree . See the C *tree
396
+ structure for documentation. If Initialize() has not been called,
397
+ *tree is set to a rather blank structure (empty vectors, empty
398
+ strings, zero in all integral fields) and false is returned;
399
+ otherwise, \*tree is set with the contents of the current memory
400
+ snapshot and true is returned. It is fine to call this function on
401
+ the same \*tree instance; each call simply overwrites the data
402
+ from the last call. If /p skipRepeated is true , then any repeated
403
+ callsite is skipped. See the CallTree documentation for more
404
+ details.
405
+
406
+ Parameters
407
+
408
+ tree (CallTree) –
409
+ skipRepeated (bool) –
410
+
411
+ static GetMaxTotalBytes()
412
+ classmethod GetMaxTotalBytes() -> int
413
+ Return the maximum total number of bytes that have ever been allocated
414
+ at one time.
415
+ This is simply the maximum value of GetTotalBytes() since Initialize()
416
+ was called.
417
+
418
+ static GetTotalBytes()
419
+ classmethod GetTotalBytes() -> int
420
+ Return total number of allocated bytes.
421
+ The current total memory that has been allocated and not freed is
422
+ returned. Memory allocated before calling Initialize() is not
423
+ accounted for.
424
+
425
+ static Initialize()
426
+ classmethod Initialize(errMsg) -> bool
427
+ Initialize the memory tagging system.
428
+ This function returns true if the memory tagging system can be
429
+ successfully initialized or it has already been initialized.
430
+ Otherwise, \*errMsg is set with an explanation for the failure.
431
+ Until the system is initialized, the various memory reporting calls
432
+ will indicate that no memory has been allocated. Note also that memory
433
+ allocated prior to calling Initialize() is not tracked i.e. all
434
+ data refers to allocations that happen subsequent to calling
435
+ Initialize() .
436
+
437
+ Parameters
438
+ errMsg (str) –
439
+
440
+ static IsInitialized()
441
+ classmethod IsInitialized() -> bool
442
+ Return true if the tagging system is active.
443
+ If Initialize() has been successfully called, this function
444
+ returns true .
445
+
446
+ static SetCapturedMallocStacksMatchList()
447
+ classmethod SetCapturedMallocStacksMatchList(matchList) -> None
448
+ Sets the tags to trace.
449
+ When memory is allocated for any tag that matches matchList a
450
+ stack trace is recorded. When that memory is released the stack trace
451
+ is discarded. Clients can call GetCapturedMallocStacks() to get a
452
+ list of all recorded stack traces. This is useful for finding leaks.
453
+ Traces recorded for any tag that will no longer be matched are
454
+ discarded by this call. Traces recorded for tags that continue to be
455
+ matched are retained.
456
+ matchList is a comma, tab or newline separated list of malloc tag
457
+ names. The names can have internal spaces but leading and trailing
458
+ spaces are stripped. If a name ends in’*’then the suffix is
459
+ wildcarded. A name can have a leading’-‘or’+’to prevent or allow a
460
+ match. Each name is considered in order and later matches override
461
+ earlier matches. For example,’Csd*, -CsdScene::_Populate*,
462
+ +CsdScene::_PopulatePrimCacheLocal’matches any malloc tag starting
463
+ with’Csd’but nothing starting
464
+ with’CsdScene::_Populate’except’CsdScene::_PopulatePrimCacheLocal’.
465
+ Use the empty string to disable stack capturing.
466
+
467
+ Parameters
468
+ matchList (str) –
469
+
470
+ static SetDebugMatchList()
471
+ classmethod SetDebugMatchList(matchList) -> None
472
+ Sets the tags to trap in the debugger.
473
+ When memory is allocated or freed for any tag that matches
474
+ matchList the debugger trap is invoked. If a debugger is attached
475
+ the program will stop in the debugger, otherwise the program will
476
+ continue to run. See ArchDebuggerTrap() and ArchDebuggerWait()
477
+ .
478
+ matchList is a comma, tab or newline separated list of malloc tag
479
+ names. The names can have internal spaces but leading and trailing
480
+ spaces are stripped. If a name ends in’*’then the suffix is
481
+ wildcarded. A name can have a leading’-‘or’+’to prevent or allow a
482
+ match. Each name is considered in order and later matches override
483
+ earlier matches. For example,’Csd*, -CsdScene::_Populate*,
484
+ +CsdScene::_PopulatePrimCacheLocal’matches any malloc tag starting
485
+ with’Csd’but nothing starting
486
+ with’CsdScene::_Populate’except’CsdScene::_PopulatePrimCacheLocal’.
487
+ Use the empty string to disable debugging traps.
488
+
489
+ Parameters
490
+ matchList (str) –
491
+
492
+ class pxr.Tf.NamedTemporaryFile(suffix='', prefix='', dir=None, text=False)
493
+ A named temporary file which keeps the internal file handle closed.
494
+ A class which constructs a temporary file(that isn’t open) on __enter__,
495
+ provides its name as an attribute, and deletes it on __exit__.
496
+ Note: The constructor args for this object match those of
497
+ python’s tempfile.mkstemp() function, and will have the same effect on
498
+ the underlying file created.
499
+ Attributes:
500
+
501
+ name
502
+ The path for the temporary file created.
503
+
504
+ property name
505
+ The path for the temporary file created.
506
+
507
+ class pxr.Tf.Notice
508
+ Classes:
509
+
510
+ Listener
511
+ Represents the Notice connection between senders and receivers of notices.
512
+
513
+ Methods:
514
+
515
+ Register(noticeType, callback, sender)
516
+ noticeType : Tf.Notice callback : function sender : object
517
+
518
+ RegisterGlobally(noticeType, callback)
519
+ noticeType : Tf.Notice callback : function
520
+
521
+ Send
522
+ Send(sender)
523
+
524
+ SendGlobally
525
+ SendGlobally()
526
+
527
+ class Listener
528
+ 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.
529
+ Methods:
530
+
531
+ Revoke
532
+ Revoke()
533
+
534
+ Revoke()
535
+ Revoke()
536
+ 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.
537
+
538
+ static Register(noticeType, callback, sender) → Listener
539
+ noticeType : Tf.Notice
540
+ callback : function
541
+ sender : object
542
+ 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.
543
+ Register( noticeType, callback, sender ) -> Listener
544
+ noticeType : Tf.Notice
545
+ callback : function
546
+ sender : object
547
+ 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.
548
+
549
+ static RegisterGlobally(noticeType, callback) → Listener
550
+ noticeType : Tf.Notice
551
+ callback : function
552
+ Register a listener as being interested in a TfNotice type from any sender. The notice listener does not get sender as an argument.
553
+
554
+ Send()
555
+ Send(sender)
556
+ sender : object
557
+ 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.
558
+ Send(sender)
559
+ sender : object
560
+ 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.
561
+
562
+ SendGlobally()
563
+ SendGlobally()
564
+ 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.
565
+
566
+ class pxr.Tf.PyModuleWasLoaded
567
+ A TfNotice that is sent when a script module is loaded. Since many
568
+ modules may be loaded at once, listeners are encouraged to defer work
569
+ triggered by this notice to the end of an application iteration. This,
570
+ of course, is good practice in general.
571
+ Methods:
572
+
573
+ name()
574
+ Return the name of the module that was loaded.
575
+
576
+ name() → str
577
+ Return the name of the module that was loaded.
578
+
579
+ class pxr.Tf.RefPtrTracker
580
+ Provides tracking of TfRefPtr objects to particular objects.
581
+ Clients can enable, at compile time, tracking of TfRefPtr objects
582
+ that point to particular instances of classes derived from
583
+ TfRefBase . This is useful if you have a ref counted object with a
584
+ ref count that should’ve gone to zero but didn’t. This tracker can
585
+ tell you every TfRefPtr that’s holding the TfRefBase and a
586
+ stack trace where it was created or last assigned to.
587
+ Clients can get a report of all watched instances and how many
588
+ TfRefPtr objects are holding them using
589
+ ReportAllWatchedCounts() (in python use Tf.RefPtrTracker()
590
+ .GetAllWatchedCountsReport()). You can see all of the stack traces
591
+ using ReportAllTraces() (in python use Tf.RefPtrTracker()
592
+ .GetAllTracesReport()).
593
+ Clients will typically enable tracking using code like this:
594
+ #include "pxr/base/tf/refPtrTracker.h"
595
+
596
+ class MyRefBaseType;
597
+ typedef TfRefPtr<MyRefBaseType> MyRefBaseTypeRefPtr;
598
+
599
+ TF_DECLARE_REFPTR_TRACK(MyRefBaseType);
600
+
601
+ class MyRefBaseType {
602
+ \.\.\.
603
+ public:
604
+ static bool _ShouldWatch(const MyRefBaseType\*);
605
+ \.\.\.
606
+ };
607
+
608
+ TF_DEFINE_REFPTR_TRACK(MyRefBaseType, MyRefBaseType::_ShouldWatch);
609
+
610
+ Note that the TF_DECLARE_REFPTR_TRACK() macro must be invoked
611
+ before any use of the MyRefBaseTypeRefPtr type.
612
+ The MyRefBaseType::_ShouldWatch() function returns true if the
613
+ given instance of MyRefBaseType should be tracked. You can also
614
+ use TfRefPtrTracker::WatchAll() to watch every instance (but that
615
+ might use a lot of memory and time).
616
+ If you have a base type, B , and a derived type, D , and you
617
+ hold instances of D in a TfRefPtr < ``B>`` (i.e. a pointer to
618
+ the base) then you must track both type B and type D . But you
619
+ can use TfRefPtrTracker::WatchNone() when tracking B if you’re
620
+ not interested in instances of B .
621
+ Methods:
622
+
623
+ GetAllTracesReport
624
+
625
+ GetAllWatchedCountsReport
626
+
627
+ GetTracesReportForWatched
628
+
629
+ Attributes:
630
+
631
+ expired
632
+ True if this object has expired, False otherwise.
633
+
634
+ GetAllTracesReport()
635
+
636
+ GetAllWatchedCountsReport()
637
+
638
+ GetTracesReportForWatched()
639
+
640
+ property expired
641
+ True if this object has expired, False otherwise.
642
+
643
+ class pxr.Tf.ScopeDescription
644
+ This class is used to provide high-level descriptions about scopes of
645
+ execution that could possibly block, or to provide relevant
646
+ information about high-level action that would be useful in a crash
647
+ report.
648
+ This class is reasonably fast to use, especially if the message
649
+ strings are not dynamically created, however it should not be used in
650
+ very highly performance sensitive contexts. The cost to push & pop is
651
+ essentially a TLS lookup plus a couple of atomic operations.
652
+ Methods:
653
+
654
+ SetDescription(description)
655
+ Replace the description stack entry for this scope description.
656
+
657
+ SetDescription(description) → None
658
+ Replace the description stack entry for this scope description.
659
+ Caller guarantees that the string description lives at least as
660
+ long as this TfScopeDescription object.
661
+
662
+ Parameters
663
+ description (str) –
664
+
665
+ SetDescription(description) -> None
666
+ Replace the description stack entry for this scope description.
667
+ This object adopts ownership of the rvalue description .
668
+
669
+ Parameters
670
+ description (str) –
671
+
672
+ SetDescription(description) -> None
673
+ Replace the description stack entry for this scope description.
674
+ Caller guarantees that the string description lives at least as
675
+ long as this TfScopeDescription object.
676
+
677
+ Parameters
678
+ description (char) –
679
+
680
+ class pxr.Tf.ScriptModuleLoader
681
+ Provides low-level facilities for shared modules with script
682
+ bindings to register themselves with their dependences, and provides a
683
+ mechanism whereby those script modules will be loaded when necessary.
684
+ Currently, this is when one of our script modules is loaded, when
685
+ TfPyInitialize is called, and when Plug opens shared modules.
686
+ Generally, user code will not make use of this.
687
+ Methods:
688
+
689
+ GetModuleNames()
690
+ Return a list of all currently known modules in a valid dependency order.
691
+
692
+ GetModulesDict()
693
+ Return a python dict containing all currently known modules under their canonical names.
694
+
695
+ WriteDotFile(file)
696
+ Write a graphviz dot-file for the dependency graph of all.
697
+
698
+ Attributes:
699
+
700
+ expired
701
+ True if this object has expired, False otherwise.
702
+
703
+ GetModuleNames() → list[str]
704
+ Return a list of all currently known modules in a valid dependency
705
+ order.
706
+
707
+ GetModulesDict() → python.dict
708
+ Return a python dict containing all currently known modules under
709
+ their canonical names.
710
+
711
+ WriteDotFile(file) → None
712
+ Write a graphviz dot-file for the dependency graph of all.
713
+ currently known modules/modules to file.
714
+
715
+ Parameters
716
+ file (str) –
717
+
718
+ property expired
719
+ True if this object has expired, False otherwise.
720
+
721
+ class pxr.Tf.Singleton
722
+
723
+ class pxr.Tf.StatusObject
724
+
725
+ class pxr.Tf.Stopwatch
726
+ Methods:
727
+
728
+ AddFrom(t)
729
+ Adds the accumulated time and sample count from t into the TfStopwatch .
730
+
731
+ Reset()
732
+ Resets the accumulated time and the sample count to zero.
733
+
734
+ Start()
735
+ Record the current time for use by the next Stop() call.
736
+
737
+ Stop()
738
+ Increases the accumulated time stored in the TfStopwatch .
739
+
740
+ Attributes:
741
+
742
+ microseconds
743
+ int
744
+
745
+ milliseconds
746
+ int
747
+
748
+ nanoseconds
749
+ int
750
+
751
+ sampleCount
752
+ int
753
+
754
+ seconds
755
+ float
756
+
757
+ AddFrom(t) → None
758
+ Adds the accumulated time and sample count from t into the
759
+ TfStopwatch .
760
+ If you have several timers taking measurements, and you wish to
761
+ combine them together, you can add one timer’s results into another;
762
+ for example, t2.AddFrom(t1) will add t1 ‘s time and sample
763
+ count into t2 .
764
+
765
+ Parameters
766
+ t (Stopwatch) –
767
+
768
+ Reset() → None
769
+ Resets the accumulated time and the sample count to zero.
770
+
771
+ Start() → None
772
+ Record the current time for use by the next Stop() call.
773
+ The Start() function records the current time. A subsequent call
774
+ to Start() before a call to Stop() simply records a later
775
+ current time, but does not change the accumulated time of the
776
+ TfStopwatch .
777
+
778
+ Stop() → None
779
+ Increases the accumulated time stored in the TfStopwatch .
780
+ The Stop() function increases the accumulated time by the duration
781
+ between the current time and the last time recorded by a Start()
782
+ call. A subsequent call to Stop() before another call to
783
+ Start() will therefore double-count time and throw off the
784
+ results.
785
+ A TfStopwatch also counts the number of samples it has taken.
786
+ The”sample count”is simply the number of times that Stop() has
787
+ been called.
788
+
789
+ property microseconds
790
+ int
791
+ Return the accumulated time in microseconds.
792
+ Note that 45 minutes will overflow a 32-bit counter, so take care to
793
+ save the result in an int64_t , and not a regular int or
794
+ long .
795
+
796
+ Type
797
+ type
798
+
799
+ property milliseconds
800
+ int
801
+ Return the accumulated time in milliseconds.
802
+
803
+ Type
804
+ type
805
+
806
+ property nanoseconds
807
+ int
808
+ Return the accumulated time in nanoseconds.
809
+ Note that this number can easily overflow a 32-bit counter, so take
810
+ care to save the result in an int64_t , and not a regular int
811
+ or long .
812
+
813
+ Type
814
+ type
815
+
816
+ property sampleCount
817
+ int
818
+ Return the current sample count.
819
+ The sample count, which is simply the number of calls to Stop()
820
+ since creation or a call to Reset() , is useful for computing
821
+ average running times of a repeated task.
822
+
823
+ Type
824
+ type
825
+
826
+ property seconds
827
+ float
828
+ Return the accumulated time in seconds as a double .
829
+
830
+ Type
831
+ type
832
+
833
+ class pxr.Tf.TemplateString
834
+ Methods:
835
+
836
+ GetEmptyMapping()
837
+ Returns an empty mapping for the current template.
838
+
839
+ GetParseErrors()
840
+ Returns any error messages generated during template parsing.
841
+
842
+ SafeSubstitute(arg1)
843
+ 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.
844
+
845
+ Substitute(arg1)
846
+ Performs the template substitution, returning a new string.
847
+
848
+ Attributes:
849
+
850
+ template
851
+ str
852
+
853
+ valid
854
+ bool
855
+
856
+ GetEmptyMapping() → Mapping
857
+ Returns an empty mapping for the current template.
858
+ This method first calls IsValid to ensure that the template is valid.
859
+
860
+ GetParseErrors() → list[str]
861
+ Returns any error messages generated during template parsing.
862
+
863
+ SafeSubstitute(arg1) → str
864
+ Like Substitute() , except that if placeholders are missing from the
865
+ mapping, instead of raising a coding error, the original placeholder
866
+ will appear in the resulting string intact.
867
+
868
+ Parameters
869
+ arg1 (Mapping) –
870
+
871
+ Substitute(arg1) → str
872
+ Performs the template substitution, returning a new string.
873
+ The mapping contains keys which match the placeholders in the
874
+ template. If a placeholder is found for which no mapping is present, a
875
+ coding error is raised.
876
+
877
+ Parameters
878
+ arg1 (Mapping) –
879
+
880
+ property template
881
+ str
882
+ Returns the template source string supplied to the constructor.
883
+
884
+ Type
885
+ type
886
+
887
+ property valid
888
+ bool
889
+ Returns true if the current template is well formed.
890
+ Empty templates are valid.
891
+
892
+ Type
893
+ type
894
+
895
+ class pxr.Tf.Tf_PyEnumWrapper
896
+ Attributes:
897
+
898
+ displayName
899
+
900
+ fullName
901
+
902
+ name
903
+
904
+ value
905
+
906
+ property displayName
907
+
908
+ property fullName
909
+
910
+ property name
911
+
912
+ property value
913
+
914
+ class pxr.Tf.Tf_TestAnnotatedBoolResult
915
+ Attributes:
916
+
917
+ annotation
918
+
919
+ property annotation
920
+
921
+ class pxr.Tf.Tf_TestPyContainerConversions
922
+ Methods:
923
+
924
+ GetPairTimesTwo
925
+
926
+ GetTokens
927
+
928
+ GetVectorTimesTwo
929
+
930
+ static GetPairTimesTwo()
931
+
932
+ static GetTokens()��
933
+
934
+ static GetVectorTimesTwo()
935
+
936
+ class pxr.Tf.Tf_TestPyOptional
937
+ Methods:
938
+
939
+ TakesOptional
940
+
941
+ TestOptionalChar
942
+
943
+ TestOptionalDouble
944
+
945
+ TestOptionalFloat
946
+
947
+ TestOptionalInt
948
+
949
+ TestOptionalLong
950
+
951
+ TestOptionalShort
952
+
953
+ TestOptionalString
954
+
955
+ TestOptionalStringVector
956
+
957
+ TestOptionalUChar
958
+
959
+ TestOptionalUInt
960
+
961
+ TestOptionalULong
962
+
963
+ TestOptionalUShort
964
+
965
+ static TakesOptional()
966
+
967
+ static TestOptionalChar()
968
+
969
+ static TestOptionalDouble()
970
+
971
+ static TestOptionalFloat()
972
+
973
+ static TestOptionalInt()
974
+
975
+ static TestOptionalLong()
976
+
977
+ static TestOptionalShort()
978
+
979
+ static TestOptionalString()
980
+
981
+ static TestOptionalStringVector()
982
+
983
+ static TestOptionalUChar()
984
+
985
+ static TestOptionalUInt()
986
+
987
+ static TestOptionalULong()
988
+
989
+ static TestOptionalUShort()
990
+
991
+ class pxr.Tf.Type
992
+ TfType represents a dynamic runtime type.
993
+ TfTypes are created and discovered at runtime, rather than compile
994
+ time.
995
+ Features:
996
+
997
+ unique typename
998
+ safe across DSO boundaries
999
+ can represent C++ types, pure Python types, or Python subclasses
1000
+ of wrapped C++ types
1001
+ lightweight value semantics you can copy and default construct
1002
+ TfType, unlike std::type_info .
1003
+ totally ordered can use as a std::map key
1004
+
1005
+ Methods:
1006
+
1007
+ AddAlias
1008
+ classmethod AddAlias(base, name) -> None
1009
+
1010
+ Define
1011
+ classmethod Define() -> Type
1012
+
1013
+ Find
1014
+ classmethod Find() -> Type
1015
+
1016
+ FindByName
1017
+ classmethod FindByName(name) -> Type
1018
+
1019
+ FindDerivedByName
1020
+ classmethod FindDerivedByName(name) -> Type
1021
+
1022
+ GetAliases(derivedType)
1023
+ Returns a vector of the aliases registered for the derivedType under this, the base type.
1024
+
1025
+ GetAllAncestorTypes(result)
1026
+ Build a vector of all ancestor types inherited by this type.
1027
+
1028
+ GetAllDerivedTypes(result)
1029
+ Return the set of all types derived (directly or indirectly) from this type.
1030
+
1031
+ GetRoot
1032
+ classmethod GetRoot() -> Type
1033
+
1034
+ IsA(queryType)
1035
+ Return true if this type is the same as or derived from queryType
1036
+
1037
+ Attributes:
1038
+
1039
+ Unknown
1040
+
1041
+ baseTypes
1042
+ list[Type]
1043
+
1044
+ derivedTypes
1045
+
1046
+ isEnumType
1047
+ bool
1048
+
1049
+ isPlainOldDataType
1050
+ bool
1051
+
1052
+ isUnknown
1053
+ bool
1054
+
1055
+ pythonClass
1056
+ TfPyObjWrapper
1057
+
1058
+ sizeof
1059
+ int
1060
+
1061
+ typeName
1062
+ str
1063
+
1064
+ AddAlias()
1065
+ classmethod AddAlias(base, name) -> None
1066
+ Add an alias name for this type under the given base type.
1067
+ Aliases are similar to typedefs in C++: they provide an alternate name
1068
+ for a type. The alias is defined with respect to the given base
1069
+ type. Aliases must be unique with respect to both other aliases
1070
+ beneath that base type and names of derived types of that base.
1071
+
1072
+ Parameters
1073
+
1074
+ base (Type) –
1075
+ name (str) –
1076
+
1077
+ AddAlias(name) -> None
1078
+ Add an alias for DERIVED beneath BASE.
1079
+ This is a convenience method, that declares both DERIVED and BASE as
1080
+ TfTypes before adding the alias.
1081
+
1082
+ Parameters
1083
+ name (str) –
1084
+
1085
+ static Define()
1086
+ classmethod Define() -> Type
1087
+ Define a TfType with the given C++ type T and C++ base types B.
1088
+ Each of the base types will be declared (but not defined) as TfTypes
1089
+ if they have not already been.
1090
+ The typeName of the created TfType will be the canonical demangled
1091
+ RTTI type name, as defined by GetCanonicalTypeName() .
1092
+ It is an error to attempt to define a type that has already been
1093
+ defined.
1094
+
1095
+ Define() -> Type
1096
+ Define a TfType with the given C++ type T and no bases.
1097
+ See the other Define() template for more details.
1098
+ C++ does not allow default template arguments for function templates,
1099
+ so we provide this separate definition for the case of no bases.
1100
+
1101
+ static Find()
1102
+ classmethod Find() -> Type
1103
+ Retrieve the TfType corresponding to type T .
1104
+ The type T must have been declared or defined in the type system
1105
+ or the TfType corresponding to an unknown type is returned.
1106
+ IsUnknown()
1107
+
1108
+ Find(obj) -> Type
1109
+ Retrieve the TfType corresponding to obj .
1110
+ The TfType corresponding to the actual object represented by
1111
+ obj is returned; this may not be the object returned by
1112
+ TfType::Find<T>() if T is a polymorphic type.
1113
+ This works for Python subclasses of the C++ type T as well, as
1114
+ long as T has been wrapped using TfPyPolymorphic.
1115
+ Of course, the object’s type must have been declared or defined in the
1116
+ type system or the TfType corresponding to an unknown type is
1117
+ returned.
1118
+ IsUnknown()
1119
+
1120
+ Parameters
1121
+ obj (T) –
1122
+
1123
+ Find(t) -> Type
1124
+ Retrieve the TfType corresponding to an obj with the given
1125
+ type_info .
1126
+
1127
+ Parameters
1128
+ t (type_info) –
1129
+
1130
+ static FindByName()
1131
+ classmethod FindByName(name) -> Type
1132
+ Retrieve the TfType corresponding to the given name .
1133
+ Every type defined in the TfType system has a unique, implementation
1134
+ independent name. In addition, aliases can be added to identify a type
1135
+ underneath a specific base type; see TfType::AddAlias() . The given
1136
+ name will first be tried as an alias under the root type, and
1137
+ subsequently as a typename.
1138
+ This method is equivalent to:
1139
+ TfType::GetRoot().FindDerivedByName(name)
1140
+
1141
+ For any object obj ,
1142
+ Find(obj) == FindByName( Find(obj).GetTypeName() )
1143
+
1144
+ Parameters
1145
+ name (str) –
1146
+
1147
+ FindDerivedByName()
1148
+ classmethod FindDerivedByName(name) -> Type
1149
+ Retrieve the TfType that derives from this type and has the given
1150
+ alias or typename.
1151
+ AddAlias
1152
+
1153
+ Parameters
1154
+ name (str) –
1155
+
1156
+ FindDerivedByName(name) -> Type
1157
+ Retrieve the TfType that derives from BASE and has the given alias
1158
+ or typename.
1159
+ This is a convenience method, and is equivalent to:
1160
+ TfType::Find<BASE>().FindDerivedByName(name)
1161
+
1162
+ Parameters
1163
+ name (str) –
1164
+
1165
+ GetAliases(derivedType) → list[str]
1166
+ Returns a vector of the aliases registered for the derivedType under
1167
+ this, the base type.
1168
+ AddAlias()
1169
+
1170
+ Parameters
1171
+ derivedType (Type) –
1172
+
1173
+ GetAllAncestorTypes(result) → None
1174
+ Build a vector of all ancestor types inherited by this type.
1175
+ The starting type is itself included, as the first element of the
1176
+ results vector.
1177
+ Types are given in”C3”resolution order, as used for new-style classes
1178
+ starting in Python 2.3. This algorithm is more complicated than a
1179
+ simple depth-first traversal of base classes, in order to prevent some
1180
+ subtle errors with multiple-inheritance. See the references below for
1181
+ more background.
1182
+ This can be expensive; consider caching the results. TfType does not
1183
+ cache this itself since it is not needed internally.
1184
+ Guido van Rossum.”Unifying types and classes in Python 2.2: Method
1185
+ resolution order.”
1186
+ http://www.python.org/download/releases/2.2.2/descrintro/#mro
1187
+ Barrett, Cassels, Haahr, Moon, Playford, Withington.”A Monotonic
1188
+ Superclass Linearization for Dylan.”OOPSLA 96.
1189
+ http://www.webcom.com/haahr/dylan/linearization-oopsla96.html
1190
+
1191
+ Parameters
1192
+ result (list[Type]) –
1193
+
1194
+ GetAllDerivedTypes(result) → None
1195
+ Return the set of all types derived (directly or indirectly) from this
1196
+ type.
1197
+
1198
+ Parameters
1199
+ result (set[Type]) –
1200
+
1201
+ static GetRoot()
1202
+ classmethod GetRoot() -> Type
1203
+ Return the root type of the type hierarchy.
1204
+ All known types derive (directly or indirectly) from the root. If a
1205
+ type is specified with no bases, it is implicitly considered to derive
1206
+ from the root type.
1207
+
1208
+ IsA(queryType) → bool
1209
+ Return true if this type is the same as or derived from queryType
1210
+ .
1211
+ If queryType is unknown, this always returns false .
1212
+
1213
+ Parameters
1214
+ queryType (Type) –
1215
+
1216
+ IsA() -> bool
1217
+ Return true if this type is the same as or derived from T.
1218
+ This is equivalent to:
1219
+ IsA(Find<T>())
1220
+
1221
+ Unknown = Tf.Type.Unknown
1222
+
1223
+ property baseTypes
1224
+ list[Type]
1225
+ Return a vector of types from which this type was derived.
1226
+
1227
+ Type
1228
+ type
1229
+
1230
+ property derivedTypes
1231
+
1232
+ property isEnumType
1233
+ bool
1234
+ Return true if this is an enum type.
1235
+
1236
+ Type
1237
+ type
1238
+
1239
+ property isPlainOldDataType
1240
+ bool
1241
+ Return true if this is a plain old data type, as defined by C++.
1242
+
1243
+ Type
1244
+ type
1245
+
1246
+ property isUnknown
1247
+ bool
1248
+ Return true if this is the unknown type, representing a type unknown
1249
+ to the TfType system.
1250
+ The unknown type does not derive from the root type, or any other
1251
+ type.
1252
+
1253
+ Type
1254
+ type
1255
+
1256
+ property pythonClass
1257
+ TfPyObjWrapper
1258
+ Return the Python class object for this type.
1259
+ If this type is unknown or has not yet had a Python class defined,
1260
+ this will return None , as an empty TfPyObjWrapper
1261
+ DefinePythonClass()
1262
+
1263
+ Type
1264
+ type
1265
+
1266
+ property sizeof
1267
+ int
1268
+ Return the size required to hold an instance of this type on the stack
1269
+ (does not include any heap allocated memory the instance uses).
1270
+ This is what the C++ sizeof operator returns for the type, so this
1271
+ value is not very useful for Python types (it will always be
1272
+ sizeof(boost::python::object)).
1273
+
1274
+ Type
1275
+ type
1276
+
1277
+ property typeName
1278
+ str
1279
+ Return the machine-independent name for this type.
1280
+ This name is specified when the TfType is declared.
1281
+ Declare()
1282
+
1283
+ Type
1284
+ type
1285
+
1286
+ class pxr.Tf.Warning
1287
+
1288
+ pxr.Tf.Fatal(msg)
1289
+ Raise a fatal error to the Tf Diagnostic system.
1290
+
1291
+ pxr.Tf.GetCodeLocation(framesUp)
1292
+ Returns a tuple (moduleName, functionName, fileName, lineNo).
1293
+ To trace the current location of python execution, use GetCodeLocation().
1294
+ By default, the information is returned at the current stack-frame; thus:
1295
+ info = GetCodeLocation()
1296
+
1297
+ will return information about the line that GetCodeLocation() was called
1298
+ from. One can write:
1299
+ def genericDebugFacility():
1300
+ info = GetCodeLocation(1)
1301
+ # print out data
1302
+
1303
+ def someCode():
1304
+ ...
1305
+ if bad:
1306
+ genericDebugFacility()
1307
+
1308
+ and genericDebugFacility() will get information associated with its caller,
1309
+ i.e. the function someCode().
1310
+
1311
+ pxr.Tf.PrepareModule(module, result)
1312
+ PrepareModule(module, result) – Prepare an extension module at import
1313
+ time. Generally, this should only be called by the __init__.py script for a
1314
+ module upon loading a boost python module (generally ‘_libName.so’).
1315
+
1316
+ pxr.Tf.PreparePythonModule(moduleName=None)
1317
+ Prepare an extension module at import time. This will import the
1318
+ Python module associated with the caller’s module (e.g. ‘_tf’ for ‘pxr.Tf’)
1319
+ or the module with the specified moduleName and copy its contents into
1320
+ the caller’s local namespace.
1321
+ Generally, this should only be called by the __init__.py script for a module
1322
+ upon loading a boost python module (generally ‘_libName.so’).
1323
+
1324
+ pxr.Tf.RaiseCodingError(msg)
1325
+ Raise a coding error to the Tf Diagnostic system.
1326
+
1327
+ pxr.Tf.RaiseRuntimeError(msg)
1328
+ Raise a runtime error to the Tf Diagnostic system.
1329
+
1330
+ pxr.Tf.Status(msg, verbose=True)
1331
+ Issues a status update to the Tf diagnostic system.
1332
+ If verbose is True (the default) then information about where in the code
1333
+ the status update was issued from is included.
1334
+
1335
+ pxr.Tf.Warn(msg, template='')
1336
+ Issue a warning via the TfDiagnostic system.
1337
+ At this time, template is ignored.
1338
+
1339
+ pxr.Tf.WindowsImportWrapper()
1340
+
1341
+ © Copyright 2019-2023, NVIDIA.
1342
+ Last updated on Nov 14, 2023.
1343
+
1344
+
1345
+
Trace.md ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ Trace module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ Trace module
10
+
11
+  
12
+
13
+ # Trace module
14
+
15
+ Summary: The Trace module provides performance tracking utility classes for counting, timing, measuring, recording, and reporting events.
16
+
17
+ Trace – Utilities for counting and recording events.
18
+ Classes:
19
+
20
+ AggregateNode
21
+ A representation of a call tree.
22
+
23
+ Collector
24
+ This is a singleton class that records TraceEvent instances and populates TraceCollection instances.
25
+
26
+ Reporter
27
+ 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.
28
+
29
+ Functions:
30
+
31
+ TraceFunction(obj)
32
+ A decorator that enables tracing the function that it decorates.
33
+
34
+ TraceMethod(obj)
35
+ A convenience.
36
+
37
+ TraceScope(label)
38
+ A context manager that calls BeginEvent on the global collector on enter and EndEvent on exit.
39
+
40
+ class pxr.Trace.AggregateNode
41
+ A representation of a call tree. Each node represents one or more
42
+ calls that occurred in the trace. Multiple calls to a child node are
43
+ aggregated into one node.
44
+ Attributes:
45
+
46
+ children
47
+ list[TraceAggregateNodePtr]
48
+
49
+ count
50
+ int
51
+
52
+ exclusiveCount
53
+ int
54
+
55
+ exclusiveTime
56
+ TimeStamp
57
+
58
+ expanded
59
+ bool
60
+
61
+ expired
62
+ True if this object has expired, False otherwise.
63
+
64
+ id
65
+ Id
66
+
67
+ inclusiveTime
68
+ TimeStamp
69
+
70
+ key
71
+ str
72
+
73
+ property children
74
+ list[TraceAggregateNodePtr]
75
+
76
+ Type
77
+ type
78
+
79
+ property count
80
+ int
81
+ Returns the call count of this node.
82
+ recursive determines if recursive calls are counted.
83
+
84
+ Type
85
+ type
86
+
87
+ property exclusiveCount
88
+ int
89
+ Returns the exclusive count.
90
+
91
+ Type
92
+ type
93
+
94
+ property exclusiveTime
95
+ TimeStamp
96
+ Returns the time spent in this node but not its children.
97
+
98
+ Type
99
+ type
100
+
101
+ property expanded
102
+ bool
103
+ Returns whether this node is expanded in a gui.
104
+
105
+ type : None
106
+ Sets whether or not this node is expanded in a gui.
107
+
108
+ Type
109
+ type
110
+
111
+ property expired
112
+ True if this object has expired, False otherwise.
113
+
114
+ property id
115
+ Id
116
+ Returns the node’s id.
117
+
118
+ Type
119
+ type
120
+
121
+ property inclusiveTime
122
+ TimeStamp
123
+ Returns the total time of this node ands its children.
124
+
125
+ Type
126
+ type
127
+
128
+ property key
129
+ str
130
+ Returns the node’s key.
131
+
132
+ Type
133
+ type
134
+
135
+ class pxr.Trace.Collector
136
+ This is a singleton class that records TraceEvent instances and
137
+ populates TraceCollection instances.
138
+ All public methods of TraceCollector are safe to call from any thread.
139
+ Methods:
140
+
141
+ BeginEvent(key)
142
+ Record a begin event with key if Category is enabled.
143
+
144
+ BeginEventAtTime(key, ms)
145
+ Record a begin event with key at a specified time if Category is enabled.
146
+
147
+ Clear()
148
+ Clear all pending events from the collector.
149
+
150
+ EndEvent(key)
151
+ Record an end event with key if Category is enabled.
152
+
153
+ EndEventAtTime(key, ms)
154
+ Record an end event with key at a specified time if Category is enabled.
155
+
156
+ GetLabel()
157
+ Return the label associated with this collector.
158
+
159
+ Attributes:
160
+
161
+ enabled
162
+ bool
163
+
164
+ expired
165
+ True if this object has expired, False otherwise.
166
+
167
+ pythonTracingEnabled
168
+ None
169
+
170
+ BeginEvent(key) → TimeStamp
171
+ Record a begin event with key if Category is enabled.
172
+ A matching end event is expected some time in the future.
173
+ If the key is known at compile time BeginScope and Scope
174
+ methods are preferred because they have lower overhead.
175
+ The TimeStamp of the TraceEvent or 0 if the collector is disabled.
176
+ BeginScope
177
+ Scope
178
+
179
+ Parameters
180
+ key (Key) –
181
+
182
+ BeginEventAtTime(key, ms) → None
183
+ Record a begin event with key at a specified time if Category is
184
+ enabled.
185
+ This version of the method allows the passing of a specific number of
186
+ elapsed milliseconds, ms, to use for this event. This method is used
187
+ for testing and debugging code.
188
+
189
+ Parameters
190
+
191
+ key (Key) –
192
+ ms (float) –
193
+
194
+ Clear() → None
195
+ Clear all pending events from the collector.
196
+ No TraceCollection will be made for these events.
197
+
198
+ EndEvent(key) → TimeStamp
199
+ Record an end event with key if Category is enabled.
200
+ A matching begin event must have preceded this end event.
201
+ If the key is known at compile time EndScope and Scope methods are
202
+ preferred because they have lower overhead.
203
+ The TimeStamp of the TraceEvent or 0 if the collector is disabled.
204
+ EndScope
205
+ Scope
206
+
207
+ Parameters
208
+ key (Key) –
209
+
210
+ EndEventAtTime(key, ms) → None
211
+ Record an end event with key at a specified time if Category is
212
+ enabled.
213
+ This version of the method allows the passing of a specific number of
214
+ elapsed milliseconds, ms, to use for this event. This method is used
215
+ for testing and debugging code.
216
+
217
+ Parameters
218
+
219
+ key (Key) –
220
+ ms (float) –
221
+
222
+ GetLabel() → str
223
+ Return the label associated with this collector.
224
+
225
+ property enabled
226
+ bool
227
+ Returns whether collection of events is enabled for DefaultCategory.
228
+
229
+ type : None
230
+ Enables or disables collection of events for DefaultCategory.
231
+
232
+ Type
233
+ classmethod type
234
+
235
+ property expired
236
+ True if this object has expired, False otherwise.
237
+
238
+ property pythonTracingEnabled
239
+ None
240
+ Set whether automatic tracing of all python scopes is enabled.
241
+
242
+ type : bool
243
+ Returns whether automatic tracing of all python scopes is enabled.
244
+
245
+ Type
246
+ type
247
+
248
+ class pxr.Trace.Reporter
249
+ This class converts streams of TraceEvent objects into call trees
250
+ which can then be used as a data source to a GUI or written out to a
251
+ file.
252
+ Methods:
253
+
254
+ ClearTree()
255
+ Clears event tree and counters.
256
+
257
+ GetLabel()
258
+ Return the label associated with this reporter.
259
+
260
+ Report(s, iterationCount)
261
+ Generates a report to the ostream s, dividing all times by iterationCount.
262
+
263
+ ReportChromeTracing(s)
264
+ Generates a timeline trace report suitable for viewing in Chrome's trace viewer.
265
+
266
+ ReportChromeTracingToFile
267
+
268
+ ReportTimes(s)
269
+ Generates a report of the times to the ostream s.
270
+
271
+ UpdateTraceTrees()
272
+ This fully re-builds the event and aggregate trees from whatever the current collection holds.
273
+
274
+ Attributes:
275
+
276
+ aggregateTreeRoot
277
+ AggregateNode
278
+
279
+ expired
280
+ True if this object has expired, False otherwise.
281
+
282
+ foldRecursiveCalls
283
+ bool
284
+
285
+ globalReporter
286
+
287
+ groupByFunction
288
+ bool
289
+
290
+ shouldAdjustForOverheadAndNoise
291
+ None
292
+
293
+ ClearTree() → None
294
+ Clears event tree and counters.
295
+
296
+ GetLabel() → str
297
+ Return the label associated with this reporter.
298
+
299
+ Report(s, iterationCount) → None
300
+ Generates a report to the ostream s, dividing all times by
301
+ iterationCount.
302
+
303
+ Parameters
304
+
305
+ s (ostream) –
306
+ iterationCount (int) –
307
+
308
+ ReportChromeTracing(s) → None
309
+ Generates a timeline trace report suitable for viewing in Chrome’s
310
+ trace viewer.
311
+
312
+ Parameters
313
+ s (ostream) –
314
+
315
+ ReportChromeTracingToFile()
316
+
317
+ ReportTimes(s) → None
318
+ Generates a report of the times to the ostream s.
319
+
320
+ Parameters
321
+ s (ostream) –
322
+
323
+ UpdateTraceTrees() → None
324
+ This fully re-builds the event and aggregate trees from whatever the
325
+ current collection holds.
326
+ It is ok to call this multiple times in case the collection gets
327
+ appended on inbetween.
328
+ If we want to have multiple reporters per collector, this will need to
329
+ be changed so that all reporters reporting on a collector update their
330
+ respective trees.
331
+
332
+ property aggregateTreeRoot
333
+ AggregateNode
334
+ Returns the root node of the aggregated call tree.
335
+
336
+ Type
337
+ type
338
+
339
+ property expired
340
+ True if this object has expired, False otherwise.
341
+
342
+ property foldRecursiveCalls
343
+ bool
344
+ Returns the current setting for recursion folding for stack trace
345
+ event reporting.
346
+
347
+ type : None
348
+ When stack trace event reporting, this sets whether or not recursive
349
+ calls are folded in the output.
350
+ Recursion folding is useful when the stacks contain deep recursive
351
+ structures.
352
+
353
+ Type
354
+ type
355
+
356
+ globalReporter = <pxr.Trace.Reporter object>
357
+
358
+ property groupByFunction
359
+ bool
360
+ Returns the current group-by-function state.
361
+
362
+ type : None
363
+ This affects only stack trace event reporting.
364
+ If true then all events in a function are grouped together
365
+ otherwise events are split out by address.
366
+
367
+ Type
368
+ type
369
+
370
+ property shouldAdjustForOverheadAndNoise
371
+ None
372
+ Set whether or not the reporter should adjust scope times for overhead
373
+ and noise.
374
+
375
+ Type
376
+ type
377
+
378
+ pxr.Trace.TraceFunction(obj)
379
+ A decorator that enables tracing the function that it decorates.
380
+ If you decorate with ‘TraceFunction’ the function will be traced in the
381
+ global collector.
382
+
383
+ pxr.Trace.TraceMethod(obj)
384
+ A convenience. Same as TraceFunction but changes the recorded
385
+ label to use the term ‘method’ rather than ‘function’.
386
+
387
+ pxr.Trace.TraceScope(label)
388
+ A context manager that calls BeginEvent on the global collector on enter
389
+ and EndEvent on exit.
390
+
391
+ © Copyright 2019-2023, NVIDIA.
392
+ Last updated on Nov 14, 2023.
393
+
394
+
395
+
Usd.md ADDED
The diff for this file is too large to render. See raw diff
 
UsdAppUtils.md ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdAppUtils module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdAppUtils module
10
+
11
+  
12
+
13
+ # UsdAppUtils module
14
+
15
+ Summary: The UsdAppUtils module contains a number of utilities and common functionality for applications that view and/or record images of USD stages.
16
+
17
+ Classes:
18
+
19
+ FrameRecorder
20
+ A utility class for recording images of USD stages.
21
+
22
+ class pxr.UsdAppUtils.FrameRecorder
23
+ A utility class for recording images of USD stages.
24
+ UsdAppUtilsFrameRecorder uses Hydra to produce recorded images of a
25
+ USD stage looking through a particular UsdGeomCamera on that stage at
26
+ a particular UsdTimeCode. The images generated will be effectively the
27
+ same as what you would see in the viewer in usdview.
28
+ Note that it is assumed that an OpenGL context has already been setup.
29
+ Methods:
30
+
31
+ GetCurrentRendererId()
32
+ Gets the ID of the Hydra renderer plugin that will be used for recording.
33
+
34
+ Record(stage, usdCamera, timeCode, ...)
35
+ Records an image and writes the result to outputImagePath .
36
+
37
+ SetColorCorrectionMode(colorCorrectionMode)
38
+ Sets the color correction mode to be used for recording.
39
+
40
+ SetComplexity(complexity)
41
+ Sets the level of refinement complexity.
42
+
43
+ SetImageWidth(imageWidth)
44
+ Sets the width of the recorded image.
45
+
46
+ SetIncludedPurposes(purposes)
47
+ Sets the UsdGeomImageable purposes to be used for rendering.
48
+
49
+ SetRendererPlugin(id)
50
+ Sets the Hydra renderer plugin to be used for recording.
51
+
52
+ GetCurrentRendererId() → str
53
+ Gets the ID of the Hydra renderer plugin that will be used for
54
+ recording.
55
+
56
+ Record(stage, usdCamera, timeCode, outputImagePath) → bool
57
+ Records an image and writes the result to outputImagePath .
58
+ The recorded image will represent the view from usdCamera looking
59
+ at the imageable prims on USD stage stage at time timeCode .
60
+ If usdCamera is not a valid camera, a camera will be computed to
61
+ automatically frame the stage geometry.
62
+ Returns true if the image was generated and written successfully, or
63
+ false otherwise.
64
+
65
+ Parameters
66
+
67
+ stage (Stage) –
68
+ usdCamera (Camera) –
69
+ timeCode (TimeCode) –
70
+ outputImagePath (str) –
71
+
72
+ SetColorCorrectionMode(colorCorrectionMode) → None
73
+ Sets the color correction mode to be used for recording.
74
+ By default, color correction is disabled.
75
+
76
+ Parameters
77
+ colorCorrectionMode (str) –
78
+
79
+ SetComplexity(complexity) → None
80
+ Sets the level of refinement complexity.
81
+ The default complexity is”low”(1.0).
82
+
83
+ Parameters
84
+ complexity (float) –
85
+
86
+ SetImageWidth(imageWidth) → None
87
+ Sets the width of the recorded image.
88
+ The height of the recorded image will be computed using this value and
89
+ the aspect ratio of the camera used for recording.
90
+ The default image width is 960 pixels.
91
+
92
+ Parameters
93
+ imageWidth (int) –
94
+
95
+ SetIncludedPurposes(purposes) → None
96
+ Sets the UsdGeomImageable purposes to be used for rendering.
97
+ We will always include”default”purpose, and by default, we will
98
+ also include UsdGeomTokens->proxy. Use this method to explicitly
99
+ enumerate an alternate set of purposes to be included along
100
+ with”default”.
101
+
102
+ Parameters
103
+ purposes (list[TfToken]) –
104
+
105
+ SetRendererPlugin(id) → bool
106
+ Sets the Hydra renderer plugin to be used for recording.
107
+
108
+ Parameters
109
+ id (str) –
110
+
111
+ © Copyright 2019-2023, NVIDIA.
112
+ Last updated on Nov 14, 2023.
113
+
114
+
115
+
UsdGeom.md ADDED
The diff for this file is too large to render. See raw diff
 
UsdHydra.md ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdHydra module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdHydra module
10
+
11
+  
12
+
13
+ # UsdHydra module
14
+
15
+ Summary: The UsdHydra module.
16
+
17
+ Classes:
18
+
19
+ GenerativeProceduralAPI
20
+ This API extends and configures the core UsdProcGenerativeProcedural schema defined within usdProc for use with hydra generative procedurals as defined within hdGp.
21
+
22
+ Tokens
23
+
24
+ class pxr.UsdHydra.GenerativeProceduralAPI
25
+ This API extends and configures the core UsdProcGenerativeProcedural
26
+ schema defined within usdProc for use with hydra generative
27
+ procedurals as defined within hdGp.
28
+ For any described attribute Fallback Value or Allowed Values
29
+ below that are text/tokens, the actual token is published and defined
30
+ in UsdHydraTokens. So to set an attribute to the value”rightHanded”,
31
+ use UsdHydraTokens->rightHanded as the value.
32
+ Methods:
33
+
34
+ Apply
35
+ classmethod Apply(prim) -> GenerativeProceduralAPI
36
+
37
+ CanApply
38
+ classmethod CanApply(prim, whyNot) -> bool
39
+
40
+ CreateProceduralSystemAttr(defaultValue, ...)
41
+ See GetProceduralSystemAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
42
+
43
+ CreateProceduralTypeAttr(defaultValue, ...)
44
+ See GetProceduralTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
45
+
46
+ Get
47
+ classmethod Get(stage, path) -> GenerativeProceduralAPI
48
+
49
+ GetProceduralSystemAttr()
50
+ This value should correspond to a configured instance of HdGpGenerativeProceduralResolvingSceneIndex which will evaluate the procedural.
51
+
52
+ GetProceduralTypeAttr()
53
+ The registered name of a HdGpGenerativeProceduralPlugin to be executed.
54
+
55
+ GetSchemaAttributeNames
56
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
57
+
58
+ static Apply()
59
+ classmethod Apply(prim) -> GenerativeProceduralAPI
60
+ Applies this single-apply API schema to the given prim .
61
+ This information is stored by adding”HydraGenerativeProceduralAPI”to
62
+ the token-valued, listOp metadata apiSchemas on the prim.
63
+ A valid UsdHydraGenerativeProceduralAPI object is returned upon
64
+ success. An invalid (or empty) UsdHydraGenerativeProceduralAPI object
65
+ is returned upon failure. See UsdPrim::ApplyAPI() for conditions
66
+ resulting in failure.
67
+ UsdPrim::GetAppliedSchemas()
68
+ UsdPrim::HasAPI()
69
+ UsdPrim::CanApplyAPI()
70
+ UsdPrim::ApplyAPI()
71
+ UsdPrim::RemoveAPI()
72
+
73
+ Parameters
74
+ prim (Prim) –
75
+
76
+ static CanApply()
77
+ classmethod CanApply(prim, whyNot) -> bool
78
+ Returns true if this single-apply API schema can be applied to the
79
+ given prim .
80
+ If this schema can not be a applied to the prim, this returns false
81
+ and, if provided, populates whyNot with the reason it can not be
82
+ applied.
83
+ Note that if CanApply returns false, that does not necessarily imply
84
+ that calling Apply will fail. Callers are expected to call CanApply
85
+ before calling Apply if they want to ensure that it is valid to apply
86
+ a schema.
87
+ UsdPrim::GetAppliedSchemas()
88
+ UsdPrim::HasAPI()
89
+ UsdPrim::CanApplyAPI()
90
+ UsdPrim::ApplyAPI()
91
+ UsdPrim::RemoveAPI()
92
+
93
+ Parameters
94
+
95
+ prim (Prim) –
96
+ whyNot (str) –
97
+
98
+ CreateProceduralSystemAttr(defaultValue, writeSparsely) → Attribute
99
+ See GetProceduralSystemAttr() , and also Create vs Get Property
100
+ Methods for when to use Get vs Create.
101
+ If specified, author defaultValue as the attribute’s default,
102
+ sparsely (when it makes sense to do so) if writeSparsely is
103
+ true - the default for writeSparsely is false .
104
+
105
+ Parameters
106
+
107
+ defaultValue (VtValue) –
108
+ writeSparsely (bool) –
109
+
110
+ CreateProceduralTypeAttr(defaultValue, writeSparsely) → Attribute
111
+ See GetProceduralTypeAttr() , and also Create vs Get Property Methods
112
+ for when to use Get vs Create.
113
+ If specified, author defaultValue as the attribute’s default,
114
+ sparsely (when it makes sense to do so) if writeSparsely is
115
+ true - the default for writeSparsely is false .
116
+
117
+ Parameters
118
+
119
+ defaultValue (VtValue) –
120
+ writeSparsely (bool) –
121
+
122
+ static Get()
123
+ classmethod Get(stage, path) -> GenerativeProceduralAPI
124
+ Return a UsdHydraGenerativeProceduralAPI holding the prim adhering to
125
+ this schema at path on stage .
126
+ If no prim exists at path on stage , or if the prim at that
127
+ path does not adhere to this schema, return an invalid schema object.
128
+ This is shorthand for the following:
129
+ UsdHydraGenerativeProceduralAPI(stage->GetPrimAtPath(path));
130
+
131
+ Parameters
132
+
133
+ stage (Stage) –
134
+ path (Path) –
135
+
136
+ GetProceduralSystemAttr() → Attribute
137
+ This value should correspond to a configured instance of
138
+ HdGpGenerativeProceduralResolvingSceneIndex which will evaluate the
139
+ procedural.
140
+ The default value of”hydraGenerativeProcedural”matches the equivalent
141
+ default of HdGpGenerativeProceduralResolvingSceneIndex. Multiple
142
+ instances of the scene index can be used to determine where within a
143
+ scene index chain a given procedural will be evaluated.
144
+ Declaration
145
+ token proceduralSystem ="hydraGenerativeProcedural"
146
+ C++ Type
147
+ TfToken
148
+ Usd Type
149
+ SdfValueTypeNames->Token
150
+
151
+ GetProceduralTypeAttr() → Attribute
152
+ The registered name of a HdGpGenerativeProceduralPlugin to be
153
+ executed.
154
+ Declaration
155
+ token primvars:hdGp:proceduralType
156
+ C++ Type
157
+ TfToken
158
+ Usd Type
159
+ SdfValueTypeNames->Token
160
+
161
+ static GetSchemaAttributeNames()
162
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
163
+ Return a vector of names of all pre-declared attributes for this
164
+ schema class and all its ancestor classes.
165
+ Does not include attributes that may be authored by custom/extended
166
+ methods of the schemas involved.
167
+
168
+ Parameters
169
+ includeInherited (bool) –
170
+
171
+ class pxr.UsdHydra.Tokens
172
+ Attributes:
173
+
174
+ HwPrimvar_1
175
+
176
+ HwPtexTexture_1
177
+
178
+ HwUvTexture_1
179
+
180
+ black
181
+
182
+ clamp
183
+
184
+ displayLookBxdf
185
+
186
+ faceIndex
187
+
188
+ faceOffset
189
+
190
+ frame
191
+
192
+ hydraGenerativeProcedural
193
+
194
+ infoFilename
195
+
196
+ infoVarname
197
+
198
+ linear
199
+
200
+ linearMipmapLinear
201
+
202
+ linearMipmapNearest
203
+
204
+ magFilter
205
+
206
+ minFilter
207
+
208
+ mirror
209
+
210
+ nearest
211
+
212
+ nearestMipmapLinear
213
+
214
+ nearestMipmapNearest
215
+
216
+ primvarsHdGpProceduralType
217
+
218
+ proceduralSystem
219
+
220
+ repeat
221
+
222
+ textureMemory
223
+
224
+ useMetadata
225
+
226
+ uv
227
+
228
+ wrapS
229
+
230
+ wrapT
231
+
232
+ HwPrimvar_1 = 'HwPrimvar_1'
233
+
234
+ HwPtexTexture_1 = 'HwPtexTexture_1'
235
+
236
+ HwUvTexture_1 = 'HwUvTexture_1'
237
+
238
+ black = 'black'
239
+
240
+ clamp = 'clamp'
241
+
242
+ displayLookBxdf = 'displayLook:bxdf'
243
+
244
+ faceIndex = 'faceIndex'
245
+
246
+ faceOffset = 'faceOffset'
247
+
248
+ frame = 'frame'
249
+
250
+ hydraGenerativeProcedural = 'hydraGenerativeProcedural'
251
+
252
+ infoFilename = 'inputs:file'
253
+
254
+ infoVarname = 'inputs:varname'
255
+
256
+ linear = 'linear'
257
+
258
+ linearMipmapLinear = 'linearMipmapLinear'
259
+
260
+ linearMipmapNearest = 'linearMipmapNearest'
261
+
262
+ magFilter = 'magFilter'
263
+
264
+ minFilter = 'minFilter'
265
+
266
+ mirror = 'mirror'
267
+
268
+ nearest = 'nearest'
269
+
270
+ nearestMipmapLinear = 'nearestMipmapLinear'
271
+
272
+ nearestMipmapNearest = 'nearestMipmapNearest'
273
+
274
+ primvarsHdGpProceduralType = 'primvars:hdGp:proceduralType'
275
+
276
+ proceduralSystem = 'proceduralSystem'
277
+
278
+ repeat = 'repeat'
279
+
280
+ textureMemory = 'textureMemory'
281
+
282
+ useMetadata = 'useMetadata'
283
+
284
+ uv = 'uv'
285
+
286
+ wrapS = 'wrapS'
287
+
288
+ wrapT = 'wrapT'
289
+
290
+ © Copyright 2019-2023, NVIDIA.
291
+ Last updated on Nov 14, 2023.
292
+
293
+
294
+
UsdLux.md ADDED
The diff for this file is too large to render. See raw diff
 
UsdMedia.md ADDED
@@ -0,0 +1,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdMedia module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdMedia module
10
+
11
+  
12
+
13
+ # UsdMedia module
14
+
15
+ 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.
16
+
17
+ Classes:
18
+
19
+ SpatialAudio
20
+ The SpatialAudio primitive defines basic properties for encoding playback of an audio file or stream within a USD Stage.
21
+
22
+ Tokens
23
+
24
+ class pxr.UsdMedia.SpatialAudio
25
+ The SpatialAudio primitive defines basic properties for encoding
26
+ playback of an audio file or stream within a USD Stage. The
27
+ SpatialAudio schema derives from UsdGeomXformable since it can support
28
+ full spatial audio while also supporting non-spatial mono and stereo
29
+ sounds. One or more SpatialAudio prims can be placed anywhere in the
30
+ namespace, though it is advantageous to place truly spatial audio
31
+ prims under/inside the models from which the sound emanates, so that
32
+ the audio prim need only be transformed relative to the model, rather
33
+ than copying its animation.
34
+
35
+ ## Timecode Attributes and Time Scaling
36
+
37
+ startTime and endTime are timecode valued attributes which gives
38
+ them the special behavior that layer offsets affecting the layer in
39
+ which one of these values is authored are applied to the attribute’s
40
+ value itself during value resolution. This allows audio playback to be
41
+ kept in sync with time sampled animation as the animation is affected
42
+ by layer offsets in the composition. But this behavior brings with it
43
+ some interesting edge cases and caveats when it comes to layer offsets
44
+ that include scale.
45
+ Although authored layer offsets may have a time scale which can scale
46
+ the duration between an authored startTime and endTime, we make no
47
+ attempt to infer any playback dilation of the actual audio media
48
+ itself. Given that startTime and endTime can be independently
49
+ authored in different layers with differing time scales, it is not
50
+ possible, in general, to define an”original timeframe”from which we
51
+ can compute a dilation to composed stage-time. Even if we could
52
+ compute a composed dilation this way, it would still be impossible to
53
+ flatten a stage or layer stack into a single layer and still retain
54
+ the composed audio dilation using this schema.
55
+ Although we do not expect it to be common, it is possible to apply a
56
+ negative time scale to USD layers, which mostly has the effect of
57
+ reversing animation in the affected composition. If a negative scale
58
+ is applied to a composition that contains authored startTime and
59
+ endTime, it will reverse their relative ordering in time. Therefore,
60
+ we stipulate when playbackMode
61
+ is”onceFromStartToEnd”or”loopFromStartToEnd”, if endTime is less
62
+ than startTime, then begin playback at endTime, and continue until
63
+ startTime. When startTime and endTime are inverted, we do not,
64
+ however, stipulate that playback of the audio media itself be
65
+ inverted, since doing so”successfully”would require perfect knowledge
66
+ of when, within the audio clip, relevant audio ends (so that we know
67
+ how to offset the reversed audio to align it so that we reach
68
+ the”beginning”at startTime), and sounds played in reverse are not
69
+ likely to produce desirable results.
70
+ For any described attribute Fallback Value or Allowed Values
71
+ below that are text/tokens, the actual token is published and defined
72
+ in UsdMediaTokens. So to set an attribute to the value”rightHanded”,
73
+ use UsdMediaTokens->rightHanded as the value.
74
+ Methods:
75
+
76
+ CreateAuralModeAttr(defaultValue, writeSparsely)
77
+ See GetAuralModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
78
+
79
+ CreateEndTimeAttr(defaultValue, writeSparsely)
80
+ See GetEndTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
81
+
82
+ CreateFilePathAttr(defaultValue, writeSparsely)
83
+ See GetFilePathAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
84
+
85
+ CreateGainAttr(defaultValue, writeSparsely)
86
+ See GetGainAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
87
+
88
+ CreateMediaOffsetAttr(defaultValue, ...)
89
+ See GetMediaOffsetAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
90
+
91
+ CreatePlaybackModeAttr(defaultValue, ...)
92
+ See GetPlaybackModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
93
+
94
+ CreateStartTimeAttr(defaultValue, writeSparsely)
95
+ See GetStartTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
96
+
97
+ Define
98
+ classmethod Define(stage, path) -> SpatialAudio
99
+
100
+ Get
101
+ classmethod Get(stage, path) -> SpatialAudio
102
+
103
+ GetAuralModeAttr()
104
+ Determines how audio should be played.
105
+
106
+ GetEndTimeAttr()
107
+ 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.
108
+
109
+ GetFilePathAttr()
110
+ Path to the audio file.
111
+
112
+ GetGainAttr()
113
+ Multiplier on the incoming audio signal.
114
+
115
+ GetMediaOffsetAttr()
116
+ 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.
117
+
118
+ GetPlaybackModeAttr()
119
+ 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.
120
+
121
+ GetSchemaAttributeNames
122
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
123
+
124
+ GetStartTimeAttr()
125
+ Expressed in the timeCodesPerSecond of the containing stage, startTime specifies when the audio stream will start playing during animation playback.
126
+
127
+ CreateAuralModeAttr(defaultValue, writeSparsely) → Attribute
128
+ See GetAuralModeAttr() , and also Create vs Get Property Methods for
129
+ when to use Get vs Create.
130
+ If specified, author defaultValue as the attribute’s default,
131
+ sparsely (when it makes sense to do so) if writeSparsely is
132
+ true - the default for writeSparsely is false .
133
+
134
+ Parameters
135
+
136
+ defaultValue (VtValue) –
137
+ writeSparsely (bool) –
138
+
139
+ CreateEndTimeAttr(defaultValue, writeSparsely) → Attribute
140
+ See GetEndTimeAttr() , and also Create vs Get Property Methods for
141
+ when to use Get vs Create.
142
+ If specified, author defaultValue as the attribute’s default,
143
+ sparsely (when it makes sense to do so) if writeSparsely is
144
+ true - the default for writeSparsely is false .
145
+
146
+ Parameters
147
+
148
+ defaultValue (VtValue) –
149
+ writeSparsely (bool) –
150
+
151
+ CreateFilePathAttr(defaultValue, writeSparsely) → Attribute
152
+ See GetFilePathAttr() , and also Create vs Get Property Methods for
153
+ when to use Get vs Create.
154
+ If specified, author defaultValue as the attribute’s default,
155
+ sparsely (when it makes sense to do so) if writeSparsely is
156
+ true - the default for writeSparsely is false .
157
+
158
+ Parameters
159
+
160
+ defaultValue (VtValue) –
161
+ writeSparsely (bool) –
162
+
163
+ CreateGainAttr(defaultValue, writeSparsely) → Attribute
164
+ See GetGainAttr() , and also Create vs Get Property Methods for when
165
+ to use Get vs Create.
166
+ If specified, author defaultValue as the attribute’s default,
167
+ sparsely (when it makes sense to do so) if writeSparsely is
168
+ true - the default for writeSparsely is false .
169
+
170
+ Parameters
171
+
172
+ defaultValue (VtValue) –
173
+ writeSparsely (bool) –
174
+
175
+ CreateMediaOffsetAttr(defaultValue, writeSparsely) → Attribute
176
+ See GetMediaOffsetAttr() , and also Create vs Get Property Methods for
177
+ when to use Get vs Create.
178
+ If specified, author defaultValue as the attribute’s default,
179
+ sparsely (when it makes sense to do so) if writeSparsely is
180
+ true - the default for writeSparsely is false .
181
+
182
+ Parameters
183
+
184
+ defaultValue (VtValue) –
185
+ writeSparsely (bool) –
186
+
187
+ CreatePlaybackModeAttr(defaultValue, writeSparsely) → Attribute
188
+ See GetPlaybackModeAttr() , and also Create vs Get Property Methods
189
+ for when to use Get vs Create.
190
+ If specified, author defaultValue as the attribute’s default,
191
+ sparsely (when it makes sense to do so) if writeSparsely is
192
+ true - the default for writeSparsely is false .
193
+
194
+ Parameters
195
+
196
+ defaultValue (VtValue) –
197
+ writeSparsely (bool) –
198
+
199
+ CreateStartTimeAttr(defaultValue, writeSparsely) → Attribute
200
+ See GetStartTimeAttr() , and also Create vs Get Property Methods for
201
+ when to use Get vs Create.
202
+ If specified, author defaultValue as the attribute’s default,
203
+ sparsely (when it makes sense to do so) if writeSparsely is
204
+ true - the default for writeSparsely is false .
205
+
206
+ Parameters
207
+
208
+ defaultValue (VtValue) –
209
+ writeSparsely (bool) –
210
+
211
+ static Define()
212
+ classmethod Define(stage, path) -> SpatialAudio
213
+ Attempt to ensure a UsdPrim adhering to this schema at path is
214
+ defined (according to UsdPrim::IsDefined() ) on this stage.
215
+ If a prim adhering to this schema at path is already defined on
216
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
217
+ specifier == SdfSpecifierDef and this schema’s prim type name for
218
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
219
+ with specifier == SdfSpecifierDef and empty typeName at the
220
+ current EditTarget for any nonexistent, or existing but not Defined
221
+ ancestors.
222
+ The given path must be an absolute prim path that does not contain
223
+ any variant selections.
224
+ If it is impossible to author any of the necessary PrimSpecs, (for
225
+ example, in case path cannot map to the current UsdEditTarget ‘s
226
+ namespace) issue an error and return an invalid UsdPrim.
227
+ Note that this method may return a defined prim whose typeName does
228
+ not specify this schema class, in case a stronger typeName opinion
229
+ overrides the opinion at the current EditTarget.
230
+
231
+ Parameters
232
+
233
+ stage (Stage) –
234
+ path (Path) –
235
+
236
+ static Get()
237
+ classmethod Get(stage, path) -> SpatialAudio
238
+ Return a UsdMediaSpatialAudio holding the prim adhering to this schema
239
+ at path on stage .
240
+ If no prim exists at path on stage , or if the prim at that
241
+ path does not adhere to this schema, return an invalid schema object.
242
+ This is shorthand for the following:
243
+ UsdMediaSpatialAudio(stage->GetPrimAtPath(path));
244
+
245
+ Parameters
246
+
247
+ stage (Stage) –
248
+ path (Path) –
249
+
250
+ GetAuralModeAttr() → Attribute
251
+ Determines how audio should be played.
252
+ Valid values are:
253
+
254
+ spatial: Play the audio in 3D space if the device can support
255
+ spatial audio. if not, fall back to mono.
256
+ nonSpatial: Play the audio without regard to the SpatialAudio
257
+ prim’s position. If the audio media contains any form of stereo or
258
+ other multi-channel sound, it is left to the application to determine
259
+ whether the listener’s position should be taken into account. We
260
+ expect nonSpatial to be the choice for ambient sounds and music sound-
261
+ tracks.
262
+
263
+ Declaration
264
+ uniform token auralMode ="spatial"
265
+ C++ Type
266
+ TfToken
267
+ Usd Type
268
+ SdfValueTypeNames->Token
269
+ Variability
270
+ SdfVariabilityUniform
271
+ Allowed Values
272
+ spatial, nonSpatial
273
+
274
+ GetEndTimeAttr() → Attribute
275
+ Expressed in the timeCodesPerSecond of the containing stage, endTime
276
+ specifies when the audio stream will cease playing during animation
277
+ playback if the length of the referenced audio clip is longer than
278
+ desired.
279
+ This only applies if playbackMode is set to onceFromStartToEnd or
280
+ loopFromStartToEnd, otherwise the endTimeCode of the stage is used
281
+ instead of endTime. If endTime is less than startTime, it is
282
+ expected that the audio will instead be played from endTime to
283
+ startTime. Note that endTime is expressed as a timecode so that
284
+ the stage can properly apply layer offsets when resolving its value.
285
+ See Timecode Attributes and Time Scaling for more details and caveats.
286
+ Declaration
287
+ uniform timecode endTime = 0
288
+ C++ Type
289
+ SdfTimeCode
290
+ Usd Type
291
+ SdfValueTypeNames->TimeCode
292
+ Variability
293
+ SdfVariabilityUniform
294
+
295
+ GetFilePathAttr() → Attribute
296
+ Path to the audio file.
297
+ In general, the formats allowed for audio files is no more constrained
298
+ by USD than is image-type. As with images, however, usdz has stricter
299
+ requirements based on DMA and format support in browsers and consumer
300
+ devices. The allowed audio filetypes for usdz are M4A, MP3, WAV (in
301
+ order of preference).
302
+ Usdz Specification
303
+ Declaration
304
+ uniform asset filePath = @@
305
+ C++ Type
306
+ SdfAssetPath
307
+ Usd Type
308
+ SdfValueTypeNames->Asset
309
+ Variability
310
+ SdfVariabilityUniform
311
+
312
+ GetGainAttr() → Attribute
313
+ Multiplier on the incoming audio signal.
314
+ A value of 0”mutes”the signal. Negative values will be clamped to 0.
315
+ Declaration
316
+ double gain = 1
317
+ C++ Type
318
+ double
319
+ Usd Type
320
+ SdfValueTypeNames->Double
321
+
322
+ GetMediaOffsetAttr() → Attribute
323
+ Expressed in seconds, mediaOffset specifies the offset from the
324
+ referenced audio file’s beginning at which we should begin playback
325
+ when stage playback reaches the time that prim’s audio should start.
326
+ If the prim’s playbackMode is a looping mode, mediaOffset is
327
+ applied only to the first run-through of the audio clip; the second
328
+ and all other loops begin from the start of the audio clip.
329
+ Declaration
330
+ uniform double mediaOffset = 0
331
+ C++ Type
332
+ double
333
+ Usd Type
334
+ SdfValueTypeNames->Double
335
+ Variability
336
+ SdfVariabilityUniform
337
+
338
+ GetPlaybackModeAttr() → Attribute
339
+ Along with startTime and endTime, determines when the audio
340
+ playback should start and stop during the stage’s animation playback
341
+ and whether the audio should loop during its duration.
342
+ Valid values are:
343
+
344
+ onceFromStart: Play the audio once, starting at startTime,
345
+ continuing until the audio completes.
346
+ onceFromStartToEnd: Play the audio once beginning at startTime,
347
+ continuing until endTime or until the audio completes, whichever
348
+ comes first.
349
+ loopFromStart: Start playing the audio at startTime and
350
+ continue looping through to the stage’s authored endTimeCode.
351
+ loopFromStartToEnd: Start playing the audio at startTime and
352
+ continue looping through, stopping the audio at endTime.
353
+ loopFromStage: Start playing the audio at the stage’s authored
354
+ startTimeCode and continue looping through to the stage’s authored
355
+ endTimeCode. This can be useful for ambient sounds that should
356
+ always be active.
357
+
358
+ Declaration
359
+ uniform token playbackMode ="onceFromStart"
360
+ C++ Type
361
+ TfToken
362
+ Usd Type
363
+ SdfValueTypeNames->Token
364
+ Variability
365
+ SdfVariabilityUniform
366
+ Allowed Values
367
+ onceFromStart, onceFromStartToEnd, loopFromStart, loopFromStartToEnd,
368
+ loopFromStage
369
+
370
+ static GetSchemaAttributeNames()
371
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
372
+ Return a vector of names of all pre-declared attributes for this
373
+ schema class and all its ancestor classes.
374
+ Does not include attributes that may be authored by custom/extended
375
+ methods of the schemas involved.
376
+
377
+ Parameters
378
+ includeInherited (bool) –
379
+
380
+ GetStartTimeAttr() → Attribute
381
+ Expressed in the timeCodesPerSecond of the containing stage,
382
+ startTime specifies when the audio stream will start playing during
383
+ animation playback.
384
+ This value is ignored when playbackMode is set to loopFromStage as,
385
+ in this mode, the audio will always start at the stage’s authored
386
+ startTimeCode. Note that startTime is expressed as a timecode so
387
+ that the stage can properly apply layer offsets when resolving its
388
+ value. See Timecode Attributes and Time Scaling for more details and
389
+ caveats.
390
+ Declaration
391
+ uniform timecode startTime = 0
392
+ C++ Type
393
+ SdfTimeCode
394
+ Usd Type
395
+ SdfValueTypeNames->TimeCode
396
+ Variability
397
+ SdfVariabilityUniform
398
+
399
+ class pxr.UsdMedia.Tokens
400
+ Attributes:
401
+
402
+ auralMode
403
+
404
+ endTime
405
+
406
+ filePath
407
+
408
+ gain
409
+
410
+ loopFromStage
411
+
412
+ loopFromStart
413
+
414
+ loopFromStartToEnd
415
+
416
+ mediaOffset
417
+
418
+ nonSpatial
419
+
420
+ onceFromStart
421
+
422
+ onceFromStartToEnd
423
+
424
+ playbackMode
425
+
426
+ spatial
427
+
428
+ startTime
429
+
430
+ auralMode = 'auralMode'
431
+
432
+ endTime = 'endTime'
433
+
434
+ filePath = 'filePath'
435
+
436
+ gain = 'gain'
437
+
438
+ loopFromStage = 'loopFromStage'
439
+
440
+ loopFromStart = 'loopFromStart'
441
+
442
+ loopFromStartToEnd = 'loopFromStartToEnd'
443
+
444
+ mediaOffset = 'mediaOffset'
445
+
446
+ nonSpatial = 'nonSpatial'
447
+
448
+ onceFromStart = 'onceFromStart'
449
+
450
+ onceFromStartToEnd = 'onceFromStartToEnd'
451
+
452
+ playbackMode = 'playbackMode'
453
+
454
+ spatial = 'spatial'
455
+
456
+ startTime = 'startTime'
457
+
458
+ © Copyright 2019-2023, NVIDIA.
459
+ Last updated on Nov 14, 2023.
460
+
461
+
462
+
UsdPhysics.md ADDED
The diff for this file is too large to render. See raw diff
 
UsdProc.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdProc module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdProc module
10
+
11
+  
12
+
13
+ # UsdProc module
14
+
15
+ Summary: The UsdProc module defines schemas for the scene description of procedural data meaningful to downstream systems.
16
+
17
+ Classes:
18
+
19
+ GenerativeProcedural
20
+ Represents an abstract generative procedural prim which delivers its input parameters via properties (including relationships) within the"primvars:"namespace.
21
+
22
+ Tokens
23
+
24
+ class pxr.UsdProc.GenerativeProcedural
25
+ Represents an abstract generative procedural prim which delivers its
26
+ input parameters via properties (including relationships) within
27
+ the”primvars:”namespace.
28
+ It does not itself have any awareness or participation in the
29
+ execution of the procedural but rather serves as a means of delivering
30
+ a procedural’s definition and input parameters.
31
+ The value of its”proceduralSystem”property (either authored or
32
+ provided by API schema fallback) indicates to which system the
33
+ procedural definition is meaningful.
34
+ For any described attribute Fallback Value or Allowed Values
35
+ below that are text/tokens, the actual token is published and defined
36
+ in UsdProcTokens. So to set an attribute to the value”rightHanded”,
37
+ use UsdProcTokens->rightHanded as the value.
38
+ Methods:
39
+
40
+ CreateProceduralSystemAttr(defaultValue, ...)
41
+ See GetProceduralSystemAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
42
+
43
+ Define
44
+ classmethod Define(stage, path) -> GenerativeProcedural
45
+
46
+ Get
47
+ classmethod Get(stage, path) -> GenerativeProcedural
48
+
49
+ GetProceduralSystemAttr()
50
+ The name or convention of the system responsible for evaluating the procedural.
51
+
52
+ GetSchemaAttributeNames
53
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
54
+
55
+ CreateProceduralSystemAttr(defaultValue, writeSparsely) → Attribute
56
+ See GetProceduralSystemAttr() , and also Create vs Get Property
57
+ Methods for when to use Get vs Create.
58
+ If specified, author defaultValue as the attribute’s default,
59
+ sparsely (when it makes sense to do so) if writeSparsely is
60
+ true - the default for writeSparsely is false .
61
+
62
+ Parameters
63
+
64
+ defaultValue (VtValue) –
65
+ writeSparsely (bool) –
66
+
67
+ static Define()
68
+ classmethod Define(stage, path) -> GenerativeProcedural
69
+ Attempt to ensure a UsdPrim adhering to this schema at path is
70
+ defined (according to UsdPrim::IsDefined() ) on this stage.
71
+ If a prim adhering to this schema at path is already defined on
72
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
73
+ specifier == SdfSpecifierDef and this schema’s prim type name for
74
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
75
+ with specifier == SdfSpecifierDef and empty typeName at the
76
+ current EditTarget for any nonexistent, or existing but not Defined
77
+ ancestors.
78
+ The given path must be an absolute prim path that does not contain
79
+ any variant selections.
80
+ If it is impossible to author any of the necessary PrimSpecs, (for
81
+ example, in case path cannot map to the current UsdEditTarget ‘s
82
+ namespace) issue an error and return an invalid UsdPrim.
83
+ Note that this method may return a defined prim whose typeName does
84
+ not specify this schema class, in case a stronger typeName opinion
85
+ overrides the opinion at the current EditTarget.
86
+
87
+ Parameters
88
+
89
+ stage (Stage) –
90
+ path (Path) –
91
+
92
+ static Get()
93
+ classmethod Get(stage, path) -> GenerativeProcedural
94
+ Return a UsdProcGenerativeProcedural holding the prim adhering to this
95
+ schema at path on stage .
96
+ If no prim exists at path on stage , or if the prim at that
97
+ path does not adhere to this schema, return an invalid schema object.
98
+ This is shorthand for the following:
99
+ UsdProcGenerativeProcedural(stage->GetPrimAtPath(path));
100
+
101
+ Parameters
102
+
103
+ stage (Stage) –
104
+ path (Path) –
105
+
106
+ GetProceduralSystemAttr() → Attribute
107
+ The name or convention of the system responsible for evaluating the
108
+ procedural.
109
+ NOTE: A fallback value for this is typically set via an API schema.
110
+ Declaration
111
+ token proceduralSystem
112
+ C++ Type
113
+ TfToken
114
+ Usd Type
115
+ SdfValueTypeNames->Token
116
+
117
+ static GetSchemaAttributeNames()
118
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
119
+ Return a vector of names of all pre-declared attributes for this
120
+ schema class and all its ancestor classes.
121
+ Does not include attributes that may be authored by custom/extended
122
+ methods of the schemas involved.
123
+
124
+ Parameters
125
+ includeInherited (bool) –
126
+
127
+ class pxr.UsdProc.Tokens
128
+ Attributes:
129
+
130
+ proceduralSystem
131
+
132
+ proceduralSystem = 'proceduralSystem'
133
+
134
+ © Copyright 2019-2023, NVIDIA.
135
+ Last updated on Nov 14, 2023.
136
+
137
+
138
+
UsdRender.md ADDED
@@ -0,0 +1,1343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdRender module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdRender module
10
+
11
+  
12
+
13
+ # UsdRender module
14
+
15
+ Summary: The UsdRender module provides schemas and behaviors for describing renders.
16
+
17
+ Classes:
18
+
19
+ DenoisePass
20
+ A RenderDenoisePass generates renders via a denoising process.
21
+
22
+ Pass
23
+ A RenderPass prim encapsulates the necessary information to generate multipass renders.
24
+
25
+ Product
26
+ A UsdRenderProduct describes an image or other file-like artifact produced by a render.
27
+
28
+ Settings
29
+ 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.
30
+
31
+ SettingsBase
32
+ Abstract base class that defines render settings that can be specified on either a RenderSettings prim or a RenderProduct prim.
33
+
34
+ Tokens
35
+
36
+ Var
37
+ A UsdRenderVar describes a custom data variable for a render to produce.
38
+
39
+ class pxr.UsdRender.DenoisePass
40
+ A RenderDenoisePass generates renders via a denoising process. This
41
+ may be the same renderer that a pipeline uses for UsdRender, or may be
42
+ a separate one. Notably, a RenderDenoisePass requires another Pass to
43
+ be present for it to operate. The denoising process itself is not
44
+ generative, and requires images inputs to operate.
45
+ As denoising integration varies so widely across pipelines, all
46
+ implementation details are left to pipeline-specific prims that
47
+ inherit from RenderDenoisePass.
48
+ Methods:
49
+
50
+ Define
51
+ classmethod Define(stage, path) -> DenoisePass
52
+
53
+ Get
54
+ classmethod Get(stage, path) -> DenoisePass
55
+
56
+ GetSchemaAttributeNames
57
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
58
+
59
+ static Define()
60
+ classmethod Define(stage, path) -> DenoisePass
61
+ Attempt to ensure a UsdPrim adhering to this schema at path is
62
+ defined (according to UsdPrim::IsDefined() ) on this stage.
63
+ If a prim adhering to this schema at path is already defined on
64
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
65
+ specifier == SdfSpecifierDef and this schema’s prim type name for
66
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
67
+ with specifier == SdfSpecifierDef and empty typeName at the
68
+ current EditTarget for any nonexistent, or existing but not Defined
69
+ ancestors.
70
+ The given path must be an absolute prim path that does not contain
71
+ any variant selections.
72
+ If it is impossible to author any of the necessary PrimSpecs, (for
73
+ example, in case path cannot map to the current UsdEditTarget ‘s
74
+ namespace) issue an error and return an invalid UsdPrim.
75
+ Note that this method may return a defined prim whose typeName does
76
+ not specify this schema class, in case a stronger typeName opinion
77
+ overrides the opinion at the current EditTarget.
78
+
79
+ Parameters
80
+
81
+ stage (Stage) –
82
+ path (Path) –
83
+
84
+ static Get()
85
+ classmethod Get(stage, path) -> DenoisePass
86
+ Return a UsdRenderDenoisePass holding the prim adhering to this schema
87
+ at path on stage .
88
+ If no prim exists at path on stage , or if the prim at that
89
+ path does not adhere to this schema, return an invalid schema object.
90
+ This is shorthand for the following:
91
+ UsdRenderDenoisePass(stage->GetPrimAtPath(path));
92
+
93
+ Parameters
94
+
95
+ stage (Stage) –
96
+ path (Path) –
97
+
98
+ static GetSchemaAttributeNames()
99
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
100
+ Return a vector of names of all pre-declared attributes for this
101
+ schema class and all its ancestor classes.
102
+ Does not include attributes that may be authored by custom/extended
103
+ methods of the schemas involved.
104
+
105
+ Parameters
106
+ includeInherited (bool) –
107
+
108
+ class pxr.UsdRender.Pass
109
+ A RenderPass prim encapsulates the necessary information to generate
110
+ multipass renders. It houses properties for generating dependencies
111
+ and the necessary commands to run to generate renders, as well as
112
+ visibility controls for the scene. While RenderSettings describes the
113
+ information needed to generate images from a single invocation of a
114
+ renderer, RenderPass describes the additional information needed to
115
+ generate a time varying set of images.
116
+ There are two consumers of RenderPass prims - a runtime executable
117
+ that generates images from usdRender prims, and pipeline specific code
118
+ that translates between usdRender prims and the pipeline’s resource
119
+ scheduling software. We’ll refer to the latter as’job submission
120
+ code’.
121
+ The name of the prim is used as the pass’s name.
122
+ For any described attribute Fallback Value or Allowed Values
123
+ below that are text/tokens, the actual token is published and defined
124
+ in UsdRenderTokens. So to set an attribute to the value”rightHanded”,
125
+ use UsdRenderTokens->rightHanded as the value.
126
+ Methods:
127
+
128
+ CreateCommandAttr(defaultValue, writeSparsely)
129
+ See GetCommandAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
130
+
131
+ CreateDenoiseEnableAttr(defaultValue, ...)
132
+ See GetDenoiseEnableAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
133
+
134
+ CreateDenoisePassRel()
135
+ See GetDenoisePassRel() , and also Create vs Get Property Methods for when to use Get vs Create.
136
+
137
+ CreateFileNameAttr(defaultValue, writeSparsely)
138
+ See GetFileNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
139
+
140
+ CreateInputPassesRel()
141
+ See GetInputPassesRel() , and also Create vs Get Property Methods for when to use Get vs Create.
142
+
143
+ CreatePassTypeAttr(defaultValue, writeSparsely)
144
+ See GetPassTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
145
+
146
+ CreateRenderSourceRel()
147
+ See GetRenderSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create.
148
+
149
+ Define
150
+ classmethod Define(stage, path) -> Pass
151
+
152
+ Get
153
+ classmethod Get(stage, path) -> Pass
154
+
155
+ GetCommandAttr()
156
+ The command to run in order to generate renders for this pass.
157
+
158
+ GetDenoiseEnableAttr()
159
+ When True, this Pass pass should be denoised.
160
+
161
+ GetDenoisePassRel()
162
+ The The UsdRenderDenoisePass prim from which to source denoise settings.
163
+
164
+ GetFileNameAttr()
165
+ The asset that contains the rendering prims or other information needed to render this pass.
166
+
167
+ GetInputPassesRel()
168
+ The set of other Passes that this Pass depends on in order to be constructed properly.
169
+
170
+ GetPassTypeAttr()
171
+ A string used to categorize differently structured or executed types of passes within a customized pipeline.
172
+
173
+ GetRenderSourceRel()
174
+ The source prim to render from.
175
+
176
+ GetSchemaAttributeNames
177
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
178
+
179
+ CreateCommandAttr(defaultValue, writeSparsely) → Attribute
180
+ See GetCommandAttr() , and also Create vs Get Property Methods for
181
+ when to use Get vs Create.
182
+ If specified, author defaultValue as the attribute’s default,
183
+ sparsely (when it makes sense to do so) if writeSparsely is
184
+ true - the default for writeSparsely is false .
185
+
186
+ Parameters
187
+
188
+ defaultValue (VtValue) –
189
+ writeSparsely (bool) –
190
+
191
+ CreateDenoiseEnableAttr(defaultValue, writeSparsely) → Attribute
192
+ See GetDenoiseEnableAttr() , and also Create vs Get Property Methods
193
+ for when to use Get vs Create.
194
+ If specified, author defaultValue as the attribute’s default,
195
+ sparsely (when it makes sense to do so) if writeSparsely is
196
+ true - the default for writeSparsely is false .
197
+
198
+ Parameters
199
+
200
+ defaultValue (VtValue) –
201
+ writeSparsely (bool) –
202
+
203
+ CreateDenoisePassRel() → Relationship
204
+ See GetDenoisePassRel() , and also Create vs Get Property Methods for
205
+ when to use Get vs Create.
206
+
207
+ CreateFileNameAttr(defaultValue, writeSparsely) → Attribute
208
+ See GetFileNameAttr() , and also Create vs Get Property Methods for
209
+ when to use Get vs Create.
210
+ If specified, author defaultValue as the attribute’s default,
211
+ sparsely (when it makes sense to do so) if writeSparsely is
212
+ true - the default for writeSparsely is false .
213
+
214
+ Parameters
215
+
216
+ defaultValue (VtValue) –
217
+ writeSparsely (bool) –
218
+
219
+ CreateInputPassesRel() → Relationship
220
+ See GetInputPassesRel() , and also Create vs Get Property Methods for
221
+ when to use Get vs Create.
222
+
223
+ CreatePassTypeAttr(defaultValue, writeSparsely) → Attribute
224
+ See GetPassTypeAttr() , and also Create vs Get Property Methods for
225
+ when to use Get vs Create.
226
+ If specified, author defaultValue as the attribute’s default,
227
+ sparsely (when it makes sense to do so) if writeSparsely is
228
+ true - the default for writeSparsely is false .
229
+
230
+ Parameters
231
+
232
+ defaultValue (VtValue) –
233
+ writeSparsely (bool) –
234
+
235
+ CreateRenderSourceRel() → Relationship
236
+ See GetRenderSourceRel() , and also Create vs Get Property Methods for
237
+ when to use Get vs Create.
238
+
239
+ static Define()
240
+ classmethod Define(stage, path) -> Pass
241
+ Attempt to ensure a UsdPrim adhering to this schema at path is
242
+ defined (according to UsdPrim::IsDefined() ) on this stage.
243
+ If a prim adhering to this schema at path is already defined on
244
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
245
+ specifier == SdfSpecifierDef and this schema’s prim type name for
246
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
247
+ with specifier == SdfSpecifierDef and empty typeName at the
248
+ current EditTarget for any nonexistent, or existing but not Defined
249
+ ancestors.
250
+ The given path must be an absolute prim path that does not contain
251
+ any variant selections.
252
+ If it is impossible to author any of the necessary PrimSpecs, (for
253
+ example, in case path cannot map to the current UsdEditTarget ‘s
254
+ namespace) issue an error and return an invalid UsdPrim.
255
+ Note that this method may return a defined prim whose typeName does
256
+ not specify this schema class, in case a stronger typeName opinion
257
+ overrides the opinion at the current EditTarget.
258
+
259
+ Parameters
260
+
261
+ stage (Stage) –
262
+ path (Path) –
263
+
264
+ static Get()
265
+ classmethod Get(stage, path) -> Pass
266
+ Return a UsdRenderPass holding the prim adhering to this schema at
267
+ path on stage .
268
+ If no prim exists at path on stage , or if the prim at that
269
+ path does not adhere to this schema, return an invalid schema object.
270
+ This is shorthand for the following:
271
+ UsdRenderPass(stage->GetPrimAtPath(path));
272
+
273
+ Parameters
274
+
275
+ stage (Stage) –
276
+ path (Path) –
277
+
278
+ GetCommandAttr() �� Attribute
279
+ The command to run in order to generate renders for this pass.
280
+ The job submission code can use this to properly send tasks to the job
281
+ scheduling software that will generate products.
282
+ The command can contain variables that will be substituted
283
+ appropriately during submission, as seen in the example below with
284
+ {fileName}.
285
+ For example: command[0] =”prman”command[1] =”-progress”command[2]
286
+ =”-pixelvariance”command[3] =”-0.15”command[4] =”{fileName}”# the
287
+ fileName property will be substituted
288
+ Declaration
289
+ uniform string[] command
290
+ C++ Type
291
+ VtArray<std::string>
292
+ Usd Type
293
+ SdfValueTypeNames->StringArray
294
+ Variability
295
+ SdfVariabilityUniform
296
+
297
+ GetDenoiseEnableAttr() → Attribute
298
+ When True, this Pass pass should be denoised.
299
+ Declaration
300
+ uniform bool denoise:enable = 0
301
+ C++ Type
302
+ bool
303
+ Usd Type
304
+ SdfValueTypeNames->Bool
305
+ Variability
306
+ SdfVariabilityUniform
307
+
308
+ GetDenoisePassRel() → Relationship
309
+ The The UsdRenderDenoisePass prim from which to source denoise
310
+ settings.
311
+
312
+ GetFileNameAttr() → Attribute
313
+ The asset that contains the rendering prims or other information
314
+ needed to render this pass.
315
+ Declaration
316
+ uniform asset fileName
317
+ C++ Type
318
+ SdfAssetPath
319
+ Usd Type
320
+ SdfValueTypeNames->Asset
321
+ Variability
322
+ SdfVariabilityUniform
323
+
324
+ GetInputPassesRel() → Relationship
325
+ The set of other Passes that this Pass depends on in order to be
326
+ constructed properly.
327
+ For example, a Pass A may generate a texture, which is then used as an
328
+ input to Pass B.
329
+ By default, usdRender makes some assumptions about the relationship
330
+ between this prim and the prims listed in inputPasses. Namely, when
331
+ per-frame tasks are generated from these pass prims, usdRender will
332
+ assume a one-to-one relationship between tasks that share their frame
333
+ number. Consider a pass named’composite’whose inputPasses targets a
334
+ Pass prim named’beauty`. By default, each frame for’composite’will
335
+ depend on the same frame from’beauty’: beauty.1 ->composite.1 beauty.2
336
+ ->composite.2 etc
337
+ The consumer of this RenderPass graph of inputs will need to resolve
338
+ the transitive dependencies.
339
+
340
+ GetPassTypeAttr() → Attribute
341
+ A string used to categorize differently structured or executed types
342
+ of passes within a customized pipeline.
343
+ For example, when multiple DCC’s (e.g. Houdini, Katana, Nuke) each
344
+ compute and contribute different Products to a final result, it may be
345
+ clearest and most flexible to create a separate RenderPass for each.
346
+ Declaration
347
+ uniform token passType
348
+ C++ Type
349
+ TfToken
350
+ Usd Type
351
+ SdfValueTypeNames->Token
352
+ Variability
353
+ SdfVariabilityUniform
354
+
355
+ GetRenderSourceRel() → Relationship
356
+ The source prim to render from.
357
+ If fileName is not present, the source is assumed to be a
358
+ RenderSettings prim present in the current Usd stage. If fileName is
359
+ present, the source should be found in the file there. This
360
+ relationship might target a string attribute on this or another prim
361
+ that identifies the appropriate object in the external container.
362
+ For example, for a Usd-backed pass, this would point to a
363
+ RenderSettings prim. Houdini passes would point to a Rop. Nuke passes
364
+ would point to a write node.
365
+
366
+ static GetSchemaAttributeNames()
367
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
368
+ Return a vector of names of all pre-declared attributes for this
369
+ schema class and all its ancestor classes.
370
+ Does not include attributes that may be authored by custom/extended
371
+ methods of the schemas involved.
372
+
373
+ Parameters
374
+ includeInherited (bool) –
375
+
376
+ class pxr.UsdRender.Product
377
+ A UsdRenderProduct describes an image or other file-like artifact
378
+ produced by a render. A RenderProduct combines one or more RenderVars
379
+ into a file or interactive buffer. It also provides all the controls
380
+ established in UsdRenderSettingsBase as optional overrides to whatever
381
+ the owning UsdRenderSettings prim dictates.
382
+ Specific renderers may support additional settings, such as a way to
383
+ configure compression settings, filetype metadata, and so forth. Such
384
+ settings can be encoded using renderer-specific API schemas applied to
385
+ the product prim.
386
+ For any described attribute Fallback Value or Allowed Values
387
+ below that are text/tokens, the actual token is published and defined
388
+ in UsdRenderTokens. So to set an attribute to the value”rightHanded”,
389
+ use UsdRenderTokens->rightHanded as the value.
390
+ Methods:
391
+
392
+ CreateOrderedVarsRel()
393
+ See GetOrderedVarsRel() , and also Create vs Get Property Methods for when to use Get vs Create.
394
+
395
+ CreateProductNameAttr(defaultValue, ...)
396
+ See GetProductNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
397
+
398
+ CreateProductTypeAttr(defaultValue, ...)
399
+ See GetProductTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
400
+
401
+ Define
402
+ classmethod Define(stage, path) -> Product
403
+
404
+ Get
405
+ classmethod Get(stage, path) -> Product
406
+
407
+ GetOrderedVarsRel()
408
+ Specifies the RenderVars that should be consumed and combined into the final product.
409
+
410
+ GetProductNameAttr()
411
+ Specifies the name that the output/display driver should give the product.
412
+
413
+ GetProductTypeAttr()
414
+ The type of output to produce.
415
+
416
+ GetSchemaAttributeNames
417
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
418
+
419
+ CreateOrderedVarsRel() → Relationship
420
+ See GetOrderedVarsRel() , and also Create vs Get Property Methods for
421
+ when to use Get vs Create.
422
+
423
+ CreateProductNameAttr(defaultValue, writeSparsely) → Attribute
424
+ See GetProductNameAttr() , and also Create vs Get Property Methods for
425
+ when to use Get vs Create.
426
+ If specified, author defaultValue as the attribute’s default,
427
+ sparsely (when it makes sense to do so) if writeSparsely is
428
+ true - the default for writeSparsely is false .
429
+
430
+ Parameters
431
+
432
+ defaultValue (VtValue) –
433
+ writeSparsely (bool) –
434
+
435
+ CreateProductTypeAttr(defaultValue, writeSparsely) → Attribute
436
+ See GetProductTypeAttr() , and also Create vs Get Property Methods for
437
+ when to use Get vs Create.
438
+ If specified, author defaultValue as the attribute’s default,
439
+ sparsely (when it makes sense to do so) if writeSparsely is
440
+ true - the default for writeSparsely is false .
441
+
442
+ Parameters
443
+
444
+ defaultValue (VtValue) –
445
+ writeSparsely (bool) –
446
+
447
+ static Define()
448
+ classmethod Define(stage, path) -> Product
449
+ Attempt to ensure a UsdPrim adhering to this schema at path is
450
+ defined (according to UsdPrim::IsDefined() ) on this stage.
451
+ If a prim adhering to this schema at path is already defined on
452
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
453
+ specifier == SdfSpecifierDef and this schema’s prim type name for
454
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
455
+ with specifier == SdfSpecifierDef and empty typeName at the
456
+ current EditTarget for any nonexistent, or existing but not Defined
457
+ ancestors.
458
+ The given path must be an absolute prim path that does not contain
459
+ any variant selections.
460
+ If it is impossible to author any of the necessary PrimSpecs, (for
461
+ example, in case path cannot map to the current UsdEditTarget ‘s
462
+ namespace) issue an error and return an invalid UsdPrim.
463
+ Note that this method may return a defined prim whose typeName does
464
+ not specify this schema class, in case a stronger typeName opinion
465
+ overrides the opinion at the current EditTarget.
466
+
467
+ Parameters
468
+
469
+ stage (Stage) –
470
+ path (Path) –
471
+
472
+ static Get()
473
+ classmethod Get(stage, path) -> Product
474
+ Return a UsdRenderProduct holding the prim adhering to this schema at
475
+ path on stage .
476
+ If no prim exists at path on stage , or if the prim at that
477
+ path does not adhere to this schema, return an invalid schema object.
478
+ This is shorthand for the following:
479
+ UsdRenderProduct(stage->GetPrimAtPath(path));
480
+
481
+ Parameters
482
+
483
+ stage (Stage) –
484
+ path (Path) –
485
+
486
+ GetOrderedVarsRel() → Relationship
487
+ Specifies the RenderVars that should be consumed and combined into the
488
+ final product.
489
+ If ordering is relevant to the output driver, then the ordering of
490
+ targets in this relationship provides the order to use.
491
+
492
+ GetProductNameAttr() → Attribute
493
+ Specifies the name that the output/display driver should give the
494
+ product.
495
+ This is provided as-authored to the driver, whose responsibility it is
496
+ to situate the product on a filesystem or other storage, in the
497
+ desired location.
498
+ Declaration
499
+ token productName =""
500
+ C++ Type
501
+ TfToken
502
+ Usd Type
503
+ SdfValueTypeNames->Token
504
+
505
+ GetProductTypeAttr() → Attribute
506
+ The type of output to produce.
507
+ The default,”raster”, indicates a 2D image.
508
+ In the future, UsdRender may define additional product types.
509
+ Declaration
510
+ uniform token productType ="raster"
511
+ C++ Type
512
+ TfToken
513
+ Usd Type
514
+ SdfValueTypeNames->Token
515
+ Variability
516
+ SdfVariabilityUniform
517
+
518
+ static GetSchemaAttributeNames()
519
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
520
+ Return a vector of names of all pre-declared attributes for this
521
+ schema class and all its ancestor classes.
522
+ Does not include attributes that may be authored by custom/extended
523
+ methods of the schemas involved.
524
+
525
+ Parameters
526
+ includeInherited (bool) –
527
+
528
+ class pxr.UsdRender.Settings
529
+ A UsdRenderSettings prim specifies global settings for a render
530
+ process, including an enumeration of the RenderProducts that should
531
+ result, and the UsdGeomImageable purposes that should be rendered. How
532
+ settings affect rendering
533
+ For any described attribute Fallback Value or Allowed Values
534
+ below that are text/tokens, the actual token is published and defined
535
+ in UsdRenderTokens. So to set an attribute to the value”rightHanded”,
536
+ use UsdRenderTokens->rightHanded as the value.
537
+ Methods:
538
+
539
+ CreateIncludedPurposesAttr(defaultValue, ...)
540
+ See GetIncludedPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
541
+
542
+ CreateMaterialBindingPurposesAttr(...)
543
+ See GetMaterialBindingPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
544
+
545
+ CreateProductsRel()
546
+ See GetProductsRel() , and also Create vs Get Property Methods for when to use Get vs Create.
547
+
548
+ CreateRenderingColorSpaceAttr(defaultValue, ...)
549
+ See GetRenderingColorSpaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
550
+
551
+ Define
552
+ classmethod Define(stage, path) -> Settings
553
+
554
+ Get
555
+ classmethod Get(stage, path) -> Settings
556
+
557
+ GetIncludedPurposesAttr()
558
+ The list of UsdGeomImageable purpose values that should be included in the render.
559
+
560
+ GetMaterialBindingPurposesAttr()
561
+ Ordered list of material purposes to consider when resolving material bindings in the scene.
562
+
563
+ GetProductsRel()
564
+ The set of RenderProducts the render should produce.
565
+
566
+ GetRenderingColorSpaceAttr()
567
+ Describes a renderer's working (linear) colorSpace where all the renderer/shader math is expected to happen.
568
+
569
+ GetSchemaAttributeNames
570
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
571
+
572
+ GetStageRenderSettings
573
+ classmethod GetStageRenderSettings(stage) -> Settings
574
+
575
+ CreateIncludedPurposesAttr(defaultValue, writeSparsely) → Attribute
576
+ See GetIncludedPurposesAttr() , and also Create vs Get Property
577
+ Methods for when to use Get vs Create.
578
+ If specified, author defaultValue as the attribute’s default,
579
+ sparsely (when it makes sense to do so) if writeSparsely is
580
+ true - the default for writeSparsely is false .
581
+
582
+ Parameters
583
+
584
+ defaultValue (VtValue) –
585
+ writeSparsely (bool) –
586
+
587
+ CreateMaterialBindingPurposesAttr(defaultValue, writeSparsely) → Attribute
588
+ See GetMaterialBindingPurposesAttr() , and also Create vs Get Property
589
+ Methods for when to use Get vs Create.
590
+ If specified, author defaultValue as the attribute’s default,
591
+ sparsely (when it makes sense to do so) if writeSparsely is
592
+ true - the default for writeSparsely is false .
593
+
594
+ Parameters
595
+
596
+ defaultValue (VtValue) –
597
+ writeSparsely (bool) –
598
+
599
+ CreateProductsRel() → Relationship
600
+ See GetProductsRel() , and also Create vs Get Property Methods for
601
+ when to use Get vs Create.
602
+
603
+ CreateRenderingColorSpaceAttr(defaultValue, writeSparsely) → Attribute
604
+ See GetRenderingColorSpaceAttr() , and also Create vs Get Property
605
+ Methods for when to use Get vs Create.
606
+ If specified, author defaultValue as the attribute’s default,
607
+ sparsely (when it makes sense to do so) if writeSparsely is
608
+ true - the default for writeSparsely is false .
609
+
610
+ Parameters
611
+
612
+ defaultValue (VtValue) –
613
+ writeSparsely (bool) –
614
+
615
+ static Define()
616
+ classmethod Define(stage, path) -> Settings
617
+ Attempt to ensure a UsdPrim adhering to this schema at path is
618
+ defined (according to UsdPrim::IsDefined() ) on this stage.
619
+ If a prim adhering to this schema at path is already defined on
620
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
621
+ specifier == SdfSpecifierDef and this schema’s prim type name for
622
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
623
+ with specifier == SdfSpecifierDef and empty typeName at the
624
+ current EditTarget for any nonexistent, or existing but not Defined
625
+ ancestors.
626
+ The given path must be an absolute prim path that does not contain
627
+ any variant selections.
628
+ If it is impossible to author any of the necessary PrimSpecs, (for
629
+ example, in case path cannot map to the current UsdEditTarget ‘s
630
+ namespace) issue an error and return an invalid UsdPrim.
631
+ Note that this method may return a defined prim whose typeName does
632
+ not specify this schema class, in case a stronger typeName opinion
633
+ overrides the opinion at the current EditTarget.
634
+
635
+ Parameters
636
+
637
+ stage (Stage) –
638
+ path (Path) –
639
+
640
+ static Get()
641
+ classmethod Get(stage, path) -> Settings
642
+ Return a UsdRenderSettings holding the prim adhering to this schema at
643
+ path on stage .
644
+ If no prim exists at path on stage , or if the prim at that
645
+ path does not adhere to this schema, return an invalid schema object.
646
+ This is shorthand for the following:
647
+ UsdRenderSettings(stage->GetPrimAtPath(path));
648
+
649
+ Parameters
650
+
651
+ stage (Stage) –
652
+ path (Path) –
653
+
654
+ GetIncludedPurposesAttr() → Attribute
655
+ The list of UsdGeomImageable purpose values that should be included
656
+ in the render.
657
+ Note this cannot be specified per-RenderProduct because it is a
658
+ statement of which geometry is present.
659
+ Declaration
660
+ uniform token[] includedPurposes = ["default","render"]
661
+ C++ Type
662
+ VtArray<TfToken>
663
+ Usd Type
664
+ SdfValueTypeNames->TokenArray
665
+ Variability
666
+ SdfVariabilityUniform
667
+
668
+ GetMaterialBindingPurposesAttr() → Attribute
669
+ Ordered list of material purposes to consider when resolving material
670
+ bindings in the scene.
671
+ The empty string indicates the”allPurpose”binding.
672
+ Declaration
673
+ uniform token[] materialBindingPurposes = ["full",""]
674
+ C++ Type
675
+ VtArray<TfToken>
676
+ Usd Type
677
+ SdfValueTypeNames->TokenArray
678
+ Variability
679
+ SdfVariabilityUniform
680
+ Allowed Values
681
+ full, preview,””
682
+
683
+ GetProductsRel() → Relationship
684
+ The set of RenderProducts the render should produce.
685
+ This relationship should target UsdRenderProduct prims. If no
686
+ products are specified, an application should produce an rgb image
687
+ according to the RenderSettings configuration, to a default display or
688
+ image name.
689
+
690
+ GetRenderingColorSpaceAttr() → Attribute
691
+ Describes a renderer’s working (linear) colorSpace where all the
692
+ renderer/shader math is expected to happen.
693
+ When no renderingColorSpace is provided, renderer should use its own
694
+ default.
695
+ Declaration
696
+ uniform token renderingColorSpace
697
+ C++ Type
698
+ TfToken
699
+ Usd Type
700
+ SdfValueTypeNames->Token
701
+ Variability
702
+ SdfVariabilityUniform
703
+
704
+ static GetSchemaAttributeNames()
705
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
706
+ Return a vector of names of all pre-declared attributes for this
707
+ schema class and all its ancestor classes.
708
+ Does not include attributes that may be authored by custom/extended
709
+ methods of the schemas involved.
710
+
711
+ Parameters
712
+ includeInherited (bool) –
713
+
714
+ static GetStageRenderSettings()
715
+ classmethod GetStageRenderSettings(stage) -> Settings
716
+ Fetch and return stage ‘s render settings, as indicated by root
717
+ layer metadata.
718
+ If unauthored, or the metadata does not refer to a valid
719
+ UsdRenderSettings prim, this will return an invalid UsdRenderSettings
720
+ prim.
721
+
722
+ Parameters
723
+ stage (UsdStageWeak) –
724
+
725
+ class pxr.UsdRender.SettingsBase
726
+ Abstract base class that defines render settings that can be specified
727
+ on either a RenderSettings prim or a RenderProduct prim.
728
+ For any described attribute Fallback Value or Allowed Values
729
+ below that are text/tokens, the actual token is published and defined
730
+ in UsdRenderTokens. So to set an attribute to the value”rightHanded”,
731
+ use UsdRenderTokens->rightHanded as the value.
732
+ Methods:
733
+
734
+ CreateAspectRatioConformPolicyAttr(...)
735
+ See GetAspectRatioConformPolicyAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
736
+
737
+ CreateCameraRel()
738
+ See GetCameraRel() , and also Create vs Get Property Methods for when to use Get vs Create.
739
+
740
+ CreateDataWindowNDCAttr(defaultValue, ...)
741
+ See GetDataWindowNDCAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
742
+
743
+ CreateDisableMotionBlurAttr(defaultValue, ...)
744
+ See GetDisableMotionBlurAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
745
+
746
+ CreateInstantaneousShutterAttr(defaultValue, ...)
747
+ See GetInstantaneousShutterAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
748
+
749
+ CreatePixelAspectRatioAttr(defaultValue, ...)
750
+ See GetPixelAspectRatioAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
751
+
752
+ CreateResolutionAttr(defaultValue, writeSparsely)
753
+ See GetResolutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
754
+
755
+ Get
756
+ classmethod Get(stage, path) -> SettingsBase
757
+
758
+ GetAspectRatioConformPolicyAttr()
759
+ Indicates the policy to use to resolve an aspect ratio mismatch between the camera aperture and image settings.
760
+
761
+ GetCameraRel()
762
+ The camera relationship specifies the primary camera to use in a render.
763
+
764
+ GetDataWindowNDCAttr()
765
+ dataWindowNDC specifies the axis-aligned rectangular region in the adjusted aperture window within which the renderer should produce data.
766
+
767
+ GetDisableMotionBlurAttr()
768
+ 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.
769
+
770
+ GetInstantaneousShutterAttr()
771
+ Deprecated - use disableMotionBlur instead.
772
+
773
+ GetPixelAspectRatioAttr()
774
+ The aspect ratio (width/height) of image pixels.
775
+
776
+ GetResolutionAttr()
777
+ The image pixel resolution, corresponding to the camera's screen window.
778
+
779
+ GetSchemaAttributeNames
780
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
781
+
782
+ CreateAspectRatioConformPolicyAttr(defaultValue, writeSparsely) → Attribute
783
+ See GetAspectRatioConformPolicyAttr() , and also Create vs Get
784
+ Property Methods for when to use Get vs Create.
785
+ If specified, author defaultValue as the attribute’s default,
786
+ sparsely (when it makes sense to do so) if writeSparsely is
787
+ true - the default for writeSparsely is false .
788
+
789
+ Parameters
790
+
791
+ defaultValue (VtValue) –
792
+ writeSparsely (bool) –
793
+
794
+ CreateCameraRel() → Relationship
795
+ See GetCameraRel() , and also Create vs Get Property Methods for when
796
+ to use Get vs Create.
797
+
798
+ CreateDataWindowNDCAttr(defaultValue, writeSparsely) → Attribute
799
+ See GetDataWindowNDCAttr() , and also Create vs Get Property Methods
800
+ for when to use Get vs Create.
801
+ If specified, author defaultValue as the attribute’s default,
802
+ sparsely (when it makes sense to do so) if writeSparsely is
803
+ true - the default for writeSparsely is false .
804
+
805
+ Parameters
806
+
807
+ defaultValue (VtValue) –
808
+ writeSparsely (bool) –
809
+
810
+ CreateDisableMotionBlurAttr(defaultValue, writeSparsely) → Attribute
811
+ See GetDisableMotionBlurAttr() , and also Create vs Get Property
812
+ Methods for when to use Get vs Create.
813
+ If specified, author defaultValue as the attribute’s default,
814
+ sparsely (when it makes sense to do so) if writeSparsely is
815
+ true - the default for writeSparsely is false .
816
+
817
+ Parameters
818
+
819
+ defaultValue (VtValue) –
820
+ writeSparsely (bool) –
821
+
822
+ CreateInstantaneousShutterAttr(defaultValue, writeSparsely) → Attribute
823
+ See GetInstantaneousShutterAttr() , and also Create vs Get Property
824
+ Methods for when to use Get vs Create.
825
+ If specified, author defaultValue as the attribute’s default,
826
+ sparsely (when it makes sense to do so) if writeSparsely is
827
+ true - the default for writeSparsely is false .
828
+
829
+ Parameters
830
+
831
+ defaultValue (VtValue) –
832
+ writeSparsely (bool) –
833
+
834
+ CreatePixelAspectRatioAttr(defaultValue, writeSparsely) → Attribute
835
+ See GetPixelAspectRatioAttr() , and also Create vs Get Property
836
+ Methods for when to use Get vs Create.
837
+ If specified, author defaultValue as the attribute’s default,
838
+ sparsely (when it makes sense to do so) if writeSparsely is
839
+ true - the default for writeSparsely is false .
840
+
841
+ Parameters
842
+
843
+ defaultValue (VtValue) –
844
+ writeSparsely (bool) –
845
+
846
+ CreateResolutionAttr(defaultValue, writeSparsely) → Attribute
847
+ See GetResolutionAttr() , and also Create vs Get Property Methods for
848
+ when to use Get vs Create.
849
+ If specified, author defaultValue as the attribute’s default,
850
+ sparsely (when it makes sense to do so) if writeSparsely is
851
+ true - the default for writeSparsely is false .
852
+
853
+ Parameters
854
+
855
+ defaultValue (VtValue) –
856
+ writeSparsely (bool) –
857
+
858
+ static Get()
859
+ classmethod Get(stage, path) -> SettingsBase
860
+ Return a UsdRenderSettingsBase holding the prim adhering to this
861
+ schema at path on stage .
862
+ If no prim exists at path on stage , or if the prim at that
863
+ path does not adhere to this schema, return an invalid schema object.
864
+ This is shorthand for the following:
865
+ UsdRenderSettingsBase(stage->GetPrimAtPath(path));
866
+
867
+ Parameters
868
+
869
+ stage (Stage) –
870
+ path (Path) –
871
+
872
+ GetAspectRatioConformPolicyAttr() → Attribute
873
+ Indicates the policy to use to resolve an aspect ratio mismatch
874
+ between the camera aperture and image settings.
875
+ This policy allows a standard render setting to do something
876
+ reasonable given varying camera inputs.
877
+ The camera aperture aspect ratio is determined by the aperture
878
+ atributes on the UsdGeomCamera.
879
+ The image aspect ratio is determined by the resolution and
880
+ pixelAspectRatio attributes in the render settings.
881
+
882
+ “expandAperture”: if necessary, expand the aperture to fit the
883
+ image, exposing additional scene content
884
+ “cropAperture”: if necessary, crop the aperture to fit the image,
885
+ cropping scene content
886
+ “adjustApertureWidth”: if necessary, adjust aperture width to
887
+ make its aspect ratio match the image
888
+ “adjustApertureHeight”: if necessary, adjust aperture height to
889
+ make its aspect ratio match the image
890
+ “adjustPixelAspectRatio”: compute pixelAspectRatio to make the
891
+ image exactly cover the aperture; disregards existing attribute value
892
+ of pixelAspectRatio
893
+
894
+ Declaration
895
+ uniform token aspectRatioConformPolicy ="expandAperture"
896
+ C++ Type
897
+ TfToken
898
+ Usd Type
899
+ SdfValueTypeNames->Token
900
+ Variability
901
+ SdfVariabilityUniform
902
+ Allowed Values
903
+ expandAperture, cropAperture, adjustApertureWidth,
904
+ adjustApertureHeight, adjustPixelAspectRatio
905
+
906
+ GetCameraRel() → Relationship
907
+ The camera relationship specifies the primary camera to use in a
908
+ render.
909
+ It must target a UsdGeomCamera.
910
+
911
+ GetDataWindowNDCAttr() → Attribute
912
+ dataWindowNDC specifies the axis-aligned rectangular region in the
913
+ adjusted aperture window within which the renderer should produce
914
+ data.
915
+ It is specified as (xmin, ymin, xmax, ymax) in normalized device
916
+ coordinates, where the range 0 to 1 corresponds to the aperture. (0,0)
917
+ corresponds to the bottom-left corner and (1,1) corresponds to the
918
+ upper-right corner.
919
+ Specifying a window outside the unit square will produce overscan
920
+ data. Specifying a window that does not cover the unit square will
921
+ produce a cropped render.
922
+ A pixel is included in the rendered result if the pixel center is
923
+ contained by the data window. This is consistent with standard rules
924
+ used by polygon rasterization engines. UsdRenderRasterization
925
+ The data window is expressed in NDC so that cropping and overscan may
926
+ be resolution independent. In interactive workflows, incremental
927
+ cropping and resolution adjustment may be intermixed to isolate and
928
+ examine parts of the scene. In compositing workflows, overscan may be
929
+ used to support image post-processing kernels, and reduced-resolution
930
+ proxy renders may be used for faster iteration.
931
+ The dataWindow:ndc coordinate system references the aperture after any
932
+ adjustments required by aspectRatioConformPolicy.
933
+ Declaration
934
+ uniform float4 dataWindowNDC = (0, 0, 1, 1)
935
+ C++ Type
936
+ GfVec4f
937
+ Usd Type
938
+ SdfValueTypeNames->Float4
939
+ Variability
940
+ SdfVariabilityUniform
941
+
942
+ GetDisableMotionBlurAttr() → Attribute
943
+ Disable all motion blur by setting the shutter interval of the
944
+ targeted camera to [0,0] - that is, take only one sample, namely at
945
+ the current time code.
946
+ Declaration
947
+ uniform bool disableMotionBlur = 0
948
+ C++ Type
949
+ bool
950
+ Usd Type
951
+ SdfValueTypeNames->Bool
952
+ Variability
953
+ SdfVariabilityUniform
954
+
955
+ GetInstantaneousShutterAttr() → Attribute
956
+ Deprecated - use disableMotionBlur instead.
957
+ Override the targeted camera ‘s shutterClose to be equal to the
958
+ value of its shutterOpen, to produce a zero-width shutter interval.
959
+ This gives us a convenient way to disable motion blur.
960
+ Declaration
961
+ uniform bool instantaneousShutter = 0
962
+ C++ Type
963
+ bool
964
+ Usd Type
965
+ SdfValueTypeNames->Bool
966
+ Variability
967
+ SdfVariabilityUniform
968
+
969
+ GetPixelAspectRatioAttr() → Attribute
970
+ The aspect ratio (width/height) of image pixels.
971
+ The default ratio 1.0 indicates square pixels.
972
+ Declaration
973
+ uniform float pixelAspectRatio = 1
974
+ C++ Type
975
+ float
976
+ Usd Type
977
+ SdfValueTypeNames->Float
978
+ Variability
979
+ SdfVariabilityUniform
980
+
981
+ GetResolutionAttr() → Attribute
982
+ The image pixel resolution, corresponding to the camera’s screen
983
+ window.
984
+ Declaration
985
+ uniform int2 resolution = (2048, 1080)
986
+ C++ Type
987
+ GfVec2i
988
+ Usd Type
989
+ SdfValueTypeNames->Int2
990
+ Variability
991
+ SdfVariabilityUniform
992
+
993
+ static GetSchemaAttributeNames()
994
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
995
+ Return a vector of names of all pre-declared attributes for this
996
+ schema class and all its ancestor classes.
997
+ Does not include attributes that may be authored by custom/extended
998
+ methods of the schemas involved.
999
+
1000
+ Parameters
1001
+ includeInherited (bool) –
1002
+
1003
+ class pxr.UsdRender.Tokens
1004
+ Attributes:
1005
+
1006
+ adjustApertureHeight
1007
+
1008
+ adjustApertureWidth
1009
+
1010
+ adjustPixelAspectRatio
1011
+
1012
+ aspectRatioConformPolicy
1013
+
1014
+ camera
1015
+
1016
+ color3f
1017
+
1018
+ command
1019
+
1020
+ cropAperture
1021
+
1022
+ dataType
1023
+
1024
+ dataWindowNDC
1025
+
1026
+ denoiseEnable
1027
+
1028
+ denoisePass
1029
+
1030
+ disableMotionBlur
1031
+
1032
+ expandAperture
1033
+
1034
+ fileName
1035
+
1036
+ full
1037
+
1038
+ includedPurposes
1039
+
1040
+ inputPasses
1041
+
1042
+ instantaneousShutter
1043
+
1044
+ intrinsic
1045
+
1046
+ lpe
1047
+
1048
+ materialBindingPurposes
1049
+
1050
+ orderedVars
1051
+
1052
+ passType
1053
+
1054
+ pixelAspectRatio
1055
+
1056
+ preview
1057
+
1058
+ primvar
1059
+
1060
+ productName
1061
+
1062
+ productType
1063
+
1064
+ products
1065
+
1066
+ raster
1067
+
1068
+ raw
1069
+
1070
+ renderSettingsPrimPath
1071
+
1072
+ renderSource
1073
+
1074
+ renderingColorSpace
1075
+
1076
+ resolution
1077
+
1078
+ sourceName
1079
+
1080
+ sourceType
1081
+
1082
+ adjustApertureHeight = 'adjustApertureHeight'
1083
+
1084
+ adjustApertureWidth = 'adjustApertureWidth'
1085
+
1086
+ adjustPixelAspectRatio = 'adjustPixelAspectRatio'
1087
+
1088
+ aspectRatioConformPolicy = 'aspectRatioConformPolicy'
1089
+
1090
+ camera = 'camera'
1091
+
1092
+ color3f = 'color3f'
1093
+
1094
+ command = 'command'
1095
+
1096
+ cropAperture = 'cropAperture'
1097
+
1098
+ dataType = 'dataType'
1099
+
1100
+ dataWindowNDC = 'dataWindowNDC'
1101
+
1102
+ denoiseEnable = 'denoise:enable'
1103
+
1104
+ denoisePass = 'denoise:pass'
1105
+
1106
+ disableMotionBlur = 'disableMotionBlur'
1107
+
1108
+ expandAperture = 'expandAperture'
1109
+
1110
+ fileName = 'fileName'
1111
+
1112
+ full = 'full'
1113
+
1114
+ includedPurposes = 'includedPurposes'
1115
+
1116
+ inputPasses = 'inputPasses'
1117
+
1118
+ instantaneousShutter = 'instantaneousShutter'
1119
+
1120
+ intrinsic = 'intrinsic'
1121
+
1122
+ lpe = 'lpe'
1123
+
1124
+ materialBindingPurposes = 'materialBindingPurposes'
1125
+
1126
+ orderedVars = 'orderedVars'
1127
+
1128
+ passType = 'passType'
1129
+
1130
+ pixelAspectRatio = 'pixelAspectRatio'
1131
+
1132
+ preview = 'preview'
1133
+
1134
+ primvar = 'primvar'
1135
+
1136
+ productName = 'productName'
1137
+
1138
+ productType = 'productType'
1139
+
1140
+ products = 'products'
1141
+
1142
+ raster = 'raster'
1143
+
1144
+ raw = 'raw'
1145
+
1146
+ renderSettingsPrimPath = 'renderSettingsPrimPath'
1147
+
1148
+ renderSource = 'renderSource'
1149
+
1150
+ renderingColorSpace = 'renderingColorSpace'
1151
+
1152
+ resolution = 'resolution'
1153
+
1154
+ sourceName = 'sourceName'
1155
+
1156
+ sourceType = 'sourceType'
1157
+
1158
+ class pxr.UsdRender.Var
1159
+ A UsdRenderVar describes a custom data variable for a render to
1160
+ produce. The prim describes the source of the data, which can be a
1161
+ shader output or an LPE (Light Path Expression), and also allows
1162
+ encoding of (generally renderer-specific) parameters that configure
1163
+ the renderer for computing the variable.
1164
+ The name of the RenderVar prim drives the name of the data variable
1165
+ that the renderer will produce.
1166
+ In the future, UsdRender may standardize RenderVar representation for
1167
+ well-known variables under the sourceType intrinsic , such as r,
1168
+ g, b, a, z, or id. For any described attribute Fallback
1169
+ Value or Allowed Values below that are text/tokens, the actual
1170
+ token is published and defined in UsdRenderTokens. So to set an
1171
+ attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded
1172
+ as the value.
1173
+ Methods:
1174
+
1175
+ CreateDataTypeAttr(defaultValue, writeSparsely)
1176
+ See GetDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1177
+
1178
+ CreateSourceNameAttr(defaultValue, writeSparsely)
1179
+ See GetSourceNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1180
+
1181
+ CreateSourceTypeAttr(defaultValue, writeSparsely)
1182
+ See GetSourceTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1183
+
1184
+ Define
1185
+ classmethod Define(stage, path) -> Var
1186
+
1187
+ Get
1188
+ classmethod Get(stage, path) -> Var
1189
+
1190
+ GetDataTypeAttr()
1191
+ The type of this channel, as a USD attribute type.
1192
+
1193
+ GetSchemaAttributeNames
1194
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1195
+
1196
+ GetSourceNameAttr()
1197
+ The renderer should look for an output of this name as the computed value for the RenderVar.
1198
+
1199
+ GetSourceTypeAttr()
1200
+ Indicates the type of the source.
1201
+
1202
+ CreateDataTypeAttr(defaultValue, writeSparsely) → Attribute
1203
+ See GetDataTypeAttr() , and also Create vs Get Property Methods for
1204
+ when to use Get vs Create.
1205
+ If specified, author defaultValue as the attribute’s default,
1206
+ sparsely (when it makes sense to do so) if writeSparsely is
1207
+ true - the default for writeSparsely is false .
1208
+
1209
+ Parameters
1210
+
1211
+ defaultValue (VtValue) –
1212
+ writeSparsely (bool) –
1213
+
1214
+ CreateSourceNameAttr(defaultValue, writeSparsely) → Attribute
1215
+ See GetSourceNameAttr() , and also Create vs Get Property Methods for
1216
+ when to use Get vs Create.
1217
+ If specified, author defaultValue as the attribute’s default,
1218
+ sparsely (when it makes sense to do so) if writeSparsely is
1219
+ true - the default for writeSparsely is false .
1220
+
1221
+ Parameters
1222
+
1223
+ defaultValue (VtValue) –
1224
+ writeSparsely (bool) –
1225
+
1226
+ CreateSourceTypeAttr(defaultValue, writeSparsely) → Attribute
1227
+ See GetSourceTypeAttr() , and also Create vs Get Property Methods for
1228
+ when to use Get vs Create.
1229
+ If specified, author defaultValue as the attribute’s default,
1230
+ sparsely (when it makes sense to do so) if writeSparsely is
1231
+ true - the default for writeSparsely is false .
1232
+
1233
+ Parameters
1234
+
1235
+ defaultValue (VtValue) –
1236
+ writeSparsely (bool) –
1237
+
1238
+ static Define()
1239
+ classmethod Define(stage, path) -> Var
1240
+ Attempt to ensure a UsdPrim adhering to this schema at path is
1241
+ defined (according to UsdPrim::IsDefined() ) on this stage.
1242
+ If a prim adhering to this schema at path is already defined on
1243
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
1244
+ specifier == SdfSpecifierDef and this schema’s prim type name for
1245
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
1246
+ with specifier == SdfSpecifierDef and empty typeName at the
1247
+ current EditTarget for any nonexistent, or existing but not Defined
1248
+ ancestors.
1249
+ The given path must be an absolute prim path that does not contain
1250
+ any variant selections.
1251
+ If it is impossible to author any of the necessary PrimSpecs, (for
1252
+ example, in case path cannot map to the current UsdEditTarget ‘s
1253
+ namespace) issue an error and return an invalid UsdPrim.
1254
+ Note that this method may return a defined prim whose typeName does
1255
+ not specify this schema class, in case a stronger typeName opinion
1256
+ overrides the opinion at the current EditTarget.
1257
+
1258
+ Parameters
1259
+
1260
+ stage (Stage) –
1261
+ path (Path) –
1262
+
1263
+ static Get()
1264
+ classmethod Get(stage, path) -> Var
1265
+ Return a UsdRenderVar holding the prim adhering to this schema at
1266
+ path on stage .
1267
+ If no prim exists at path on stage , or if the prim at that
1268
+ path does not adhere to this schema, return an invalid schema object.
1269
+ This is shorthand for the following:
1270
+ UsdRenderVar(stage->GetPrimAtPath(path));
1271
+
1272
+ Parameters
1273
+
1274
+ stage (Stage) –
1275
+ path (Path) –
1276
+
1277
+ GetDataTypeAttr() → Attribute
1278
+ The type of this channel, as a USD attribute type.
1279
+ Declaration
1280
+ uniform token dataType ="color3f"
1281
+ C++ Type
1282
+ TfToken
1283
+ Usd Type
1284
+ SdfValueTypeNames->Token
1285
+ Variability
1286
+ SdfVariabilityUniform
1287
+
1288
+ static GetSchemaAttributeNames()
1289
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1290
+ Return a vector of names of all pre-declared attributes for this
1291
+ schema class and all its ancestor classes.
1292
+ Does not include attributes that may be authored by custom/extended
1293
+ methods of the schemas involved.
1294
+
1295
+ Parameters
1296
+ includeInherited (bool) –
1297
+
1298
+ GetSourceNameAttr() → Attribute
1299
+ The renderer should look for an output of this name as the computed
1300
+ value for the RenderVar.
1301
+ Declaration
1302
+ uniform string sourceName =""
1303
+ C++ Type
1304
+ std::string
1305
+ Usd Type
1306
+ SdfValueTypeNames->String
1307
+ Variability
1308
+ SdfVariabilityUniform
1309
+
1310
+ GetSourceTypeAttr() → Attribute
1311
+ Indicates the type of the source.
1312
+
1313
+ “raw”: The name should be passed directly to the renderer. This
1314
+ is the default behavior.
1315
+ “primvar”: This source represents the name of a primvar. Some
1316
+ renderers may use this to ensure that the primvar is provided; other
1317
+ renderers may require that a suitable material network be provided, in
1318
+ which case this is simply an advisory setting.
1319
+ “lpe”: Specifies a Light Path Expression in the OSL Light Path
1320
+ Expressions language as the source for this RenderVar. Some renderers
1321
+ may use extensions to that syntax, which will necessarily be non-
1322
+ portable.
1323
+ “intrinsic”: This setting is currently unimplemented, but
1324
+ represents a future namespace for UsdRender to provide portable
1325
+ baseline RenderVars, such as camera depth, that may have varying
1326
+ implementations for each renderer.
1327
+
1328
+ Declaration
1329
+ uniform token sourceType ="raw"
1330
+ C++ Type
1331
+ TfToken
1332
+ Usd Type
1333
+ SdfValueTypeNames->Token
1334
+ Variability
1335
+ SdfVariabilityUniform
1336
+ Allowed Values
1337
+ raw, primvar, lpe, intrinsic
1338
+
1339
+ © Copyright 2019-2023, NVIDIA.
1340
+ Last updated on Nov 14, 2023.
1341
+
1342
+
1343
+
UsdRi.md ADDED
@@ -0,0 +1,974 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdRi module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdRi module
10
+
11
+  
12
+
13
+ # UsdRi module
14
+
15
+ Summary: The UsdRi module provides schemas and utilities for authoring USD that encodes Renderman-specific information, and USD/RI data conversions.
16
+
17
+ Classes:
18
+
19
+ MaterialAPI
20
+ Deprecated
21
+
22
+ SplineAPI
23
+ Deprecated
24
+
25
+ StatementsAPI
26
+ Container namespace schema for all renderman statements.
27
+
28
+ TextureAPI
29
+ Deprecated
30
+
31
+ Tokens
32
+
33
+ class pxr.UsdRi.MaterialAPI
34
+ Deprecated
35
+ Materials should use UsdShadeMaterial instead. This schema will be
36
+ removed in a future release.
37
+ This API provides outputs that connect a material prim to prman
38
+ shaders and RIS objects.
39
+ For any described attribute Fallback Value or Allowed Values
40
+ below that are text/tokens, the actual token is published and defined
41
+ in UsdRiTokens. So to set an attribute to the value”rightHanded”, use
42
+ UsdRiTokens->rightHanded as the value.
43
+ Methods:
44
+
45
+ Apply
46
+ classmethod Apply(prim) -> MaterialAPI
47
+
48
+ CanApply
49
+ classmethod CanApply(prim, whyNot) -> bool
50
+
51
+ ComputeInterfaceInputConsumersMap(...)
52
+ 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.
53
+
54
+ CreateDisplacementAttr(defaultValue, ...)
55
+ See GetDisplacementAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
56
+
57
+ CreateSurfaceAttr(defaultValue, writeSparsely)
58
+ See GetSurfaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
59
+
60
+ CreateVolumeAttr(defaultValue, writeSparsely)
61
+ See GetVolumeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
62
+
63
+ Get
64
+ classmethod Get(stage, path) -> MaterialAPI
65
+
66
+ GetDisplacement(ignoreBaseMaterial)
67
+ Returns a valid shader object if the"displacement"output on the material is connected to one.
68
+
69
+ GetDisplacementAttr()
70
+ Declaration
71
+
72
+ GetDisplacementOutput()
73
+ Returns the"displacement"output associated with the material.
74
+
75
+ GetSchemaAttributeNames
76
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
77
+
78
+ GetSurface(ignoreBaseMaterial)
79
+ Returns a valid shader object if the"surface"output on the material is connected to one.
80
+
81
+ GetSurfaceAttr()
82
+ Declaration
83
+
84
+ GetSurfaceOutput()
85
+ Returns the"surface"output associated with the material.
86
+
87
+ GetVolume(ignoreBaseMaterial)
88
+ Returns a valid shader object if the"volume"output on the material is connected to one.
89
+
90
+ GetVolumeAttr()
91
+ Declaration
92
+
93
+ GetVolumeOutput()
94
+ Returns the"volume"output associated with the material.
95
+
96
+ SetDisplacementSource(displacementPath)
97
+
98
+ param displacementPath
99
+
100
+ SetSurfaceSource(surfacePath)
101
+
102
+ param surfacePath
103
+
104
+ SetVolumeSource(volumePath)
105
+
106
+ param volumePath
107
+
108
+ static Apply()
109
+ classmethod Apply(prim) -> MaterialAPI
110
+ Applies this single-apply API schema to the given prim .
111
+ This information is stored by adding”RiMaterialAPI”to the token-
112
+ valued, listOp metadata apiSchemas on the prim.
113
+ A valid UsdRiMaterialAPI object is returned upon success. An invalid
114
+ (or empty) UsdRiMaterialAPI object is returned upon failure. See
115
+ UsdPrim::ApplyAPI() for conditions resulting in failure.
116
+ UsdPrim::GetAppliedSchemas()
117
+ UsdPrim::HasAPI()
118
+ UsdPrim::CanApplyAPI()
119
+ UsdPrim::ApplyAPI()
120
+ UsdPrim::RemoveAPI()
121
+
122
+ Parameters
123
+ prim (Prim) –
124
+
125
+ static CanApply()
126
+ classmethod CanApply(prim, whyNot) -> bool
127
+ Returns true if this single-apply API schema can be applied to the
128
+ given prim .
129
+ If this schema can not be a applied to the prim, this returns false
130
+ and, if provided, populates whyNot with the reason it can not be
131
+ applied.
132
+ Note that if CanApply returns false, that does not necessarily imply
133
+ that calling Apply will fail. Callers are expected to call CanApply
134
+ before calling Apply if they want to ensure that it is valid to apply
135
+ a schema.
136
+ UsdPrim::GetAppliedSchemas()
137
+ UsdPrim::HasAPI()
138
+ UsdPrim::CanApplyAPI()
139
+ UsdPrim::ApplyAPI()
140
+ UsdPrim::RemoveAPI()
141
+
142
+ Parameters
143
+
144
+ prim (Prim) –
145
+ whyNot (str) –
146
+
147
+ ComputeInterfaceInputConsumersMap(computeTransitiveConsumers) → NodeGraph.InterfaceInputConsumersMap
148
+ Walks the namespace subtree below the material and computes a map
149
+ containing the list of all inputs on the material and the associated
150
+ vector of consumers of their values.
151
+ The consumers can be inputs on shaders within the material or on node-
152
+ graphs under it.
153
+
154
+ Parameters
155
+ computeTransitiveConsumers (bool) –
156
+
157
+ CreateDisplacementAttr(defaultValue, writeSparsely) → Attribute
158
+ See GetDisplacementAttr() , and also Create vs Get Property Methods
159
+ for when to use Get vs Create.
160
+ If specified, author defaultValue as the attribute’s default,
161
+ sparsely (when it makes sense to do so) if writeSparsely is
162
+ true - the default for writeSparsely is false .
163
+
164
+ Parameters
165
+
166
+ defaultValue (VtValue) –
167
+ writeSparsely (bool) –
168
+
169
+ CreateSurfaceAttr(defaultValue, writeSparsely) → Attribute
170
+ See GetSurfaceAttr() , and also Create vs Get Property Methods for
171
+ when to use Get vs Create.
172
+ If specified, author defaultValue as the attribute’s default,
173
+ sparsely (when it makes sense to do so) if writeSparsely is
174
+ true - the default for writeSparsely is false .
175
+
176
+ Parameters
177
+
178
+ defaultValue (VtValue) –
179
+ writeSparsely (bool) –
180
+
181
+ CreateVolumeAttr(defaultValue, writeSparsely) → Attribute
182
+ See GetVolumeAttr() , and also Create vs Get Property Methods for when
183
+ to use Get vs Create.
184
+ If specified, author defaultValue as the attribute’s default,
185
+ sparsely (when it makes sense to do so) if writeSparsely is
186
+ true - the default for writeSparsely is false .
187
+
188
+ Parameters
189
+
190
+ defaultValue (VtValue) –
191
+ writeSparsely (bool) –
192
+
193
+ static Get()
194
+ classmethod Get(stage, path) -> MaterialAPI
195
+ Return a UsdRiMaterialAPI holding the prim adhering to this schema at
196
+ path on stage .
197
+ If no prim exists at path on stage , or if the prim at that
198
+ path does not adhere to this schema, return an invalid schema object.
199
+ This is shorthand for the following:
200
+ UsdRiMaterialAPI(stage->GetPrimAtPath(path));
201
+
202
+ Parameters
203
+
204
+ stage (Stage) –
205
+ path (Path) –
206
+
207
+ GetDisplacement(ignoreBaseMaterial) → Shader
208
+ Returns a valid shader object if the”displacement”output on the
209
+ material is connected to one.
210
+ If ignoreBaseMaterial is true and if the”displacement”shader
211
+ source is specified in the base-material of this material, then this
212
+ returns an invalid shader object.
213
+
214
+ Parameters
215
+ ignoreBaseMaterial (bool) –
216
+
217
+ GetDisplacementAttr() → Attribute
218
+ Declaration
219
+ token outputs:ri:displacement
220
+ C++ Type
221
+ TfToken
222
+ Usd Type
223
+ SdfValueTypeNames->Token
224
+
225
+ GetDisplacementOutput() → Output
226
+ Returns the”displacement”output associated with the material.
227
+
228
+ static GetSchemaAttributeNames()
229
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
230
+ Return a vector of names of all pre-declared attributes for this
231
+ schema class and all its ancestor classes.
232
+ Does not include attributes that may be authored by custom/extended
233
+ methods of the schemas involved.
234
+
235
+ Parameters
236
+ includeInherited (bool) –
237
+
238
+ GetSurface(ignoreBaseMaterial) → Shader
239
+ Returns a valid shader object if the”surface”output on the material is
240
+ connected to one.
241
+ If ignoreBaseMaterial is true and if the”surface”shader source is
242
+ specified in the base-material of this material, then this returns an
243
+ invalid shader object.
244
+
245
+ Parameters
246
+ ignoreBaseMaterial (bool) –
247
+
248
+ GetSurfaceAttr() → Attribute
249
+ Declaration
250
+ token outputs:ri:surface
251
+ C++ Type
252
+ TfToken
253
+ Usd Type
254
+ SdfValueTypeNames->Token
255
+
256
+ GetSurfaceOutput() → Output
257
+ Returns the”surface”output associated with the material.
258
+
259
+ GetVolume(ignoreBaseMaterial) → Shader
260
+ Returns a valid shader object if the”volume”output on the material is
261
+ connected to one.
262
+ If ignoreBaseMaterial is true and if the”volume”shader source is
263
+ specified in the base-material of this material, then this returns an
264
+ invalid shader object.
265
+
266
+ Parameters
267
+ ignoreBaseMaterial (bool) –
268
+
269
+ GetVolumeAttr() → Attribute
270
+ Declaration
271
+ token outputs:ri:volume
272
+ C++ Type
273
+ TfToken
274
+ Usd Type
275
+ SdfValueTypeNames->Token
276
+
277
+ GetVolumeOutput() → Output
278
+ Returns the”volume”output associated with the material.
279
+
280
+ SetDisplacementSource(displacementPath) → bool
281
+
282
+ Parameters
283
+ displacementPath (Path) –
284
+
285
+ SetSurfaceSource(surfacePath) → bool
286
+
287
+ Parameters
288
+ surfacePath (Path) –
289
+
290
+ SetVolumeSource(volumePath) → bool
291
+
292
+ Parameters
293
+ volumePath (Path) –
294
+
295
+ class pxr.UsdRi.SplineAPI
296
+ Deprecated
297
+ This API schema will be removed in a future release.
298
+ RiSplineAPI is a general purpose API schema used to describe a named
299
+ spline stored as a set of attributes on a prim.
300
+ It is an add-on schema that can be applied many times to a prim with
301
+ different spline names. All the attributes authored by the schema are
302
+ namespaced under”$NAME:spline:”, with the name of the spline providing
303
+ a namespace for the attributes.
304
+ The spline describes a 2D piecewise cubic curve with a position and
305
+ value for each knot. This is chosen to give straightforward artistic
306
+ control over the shape. The supported basis types are:
307
+
308
+ linear (UsdRiTokens->linear)
309
+ bspline (UsdRiTokens->bspline)
310
+ Catmull-Rom (UsdRiTokens->catmullRom)
311
+
312
+ Methods:
313
+
314
+ Apply
315
+ classmethod Apply(prim) -> SplineAPI
316
+
317
+ CanApply
318
+ classmethod CanApply(prim, whyNot) -> bool
319
+
320
+ CreateInterpolationAttr(defaultValue, ...)
321
+ See GetInterpolationAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
322
+
323
+ CreatePositionsAttr(defaultValue, writeSparsely)
324
+ See GetPositionsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
325
+
326
+ CreateValuesAttr(defaultValue, writeSparsely)
327
+ See GetValuesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
328
+
329
+ Get
330
+ classmethod Get(stage, path) -> SplineAPI
331
+
332
+ GetInterpolationAttr()
333
+ Interpolation method for the spline.
334
+
335
+ GetPositionsAttr()
336
+ Positions of the knots.
337
+
338
+ GetSchemaAttributeNames
339
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
340
+
341
+ GetValuesAttr()
342
+ Values of the knots.
343
+
344
+ GetValuesTypeName()
345
+ Returns the intended typename of the values attribute of the spline.
346
+
347
+ Validate(reason)
348
+ Validates the attribute values belonging to the spline.
349
+
350
+ static Apply()
351
+ classmethod Apply(prim) -> SplineAPI
352
+ Applies this single-apply API schema to the given prim .
353
+ This information is stored by adding”RiSplineAPI”to the token-valued,
354
+ listOp metadata apiSchemas on the prim.
355
+ A valid UsdRiSplineAPI object is returned upon success. An invalid (or
356
+ empty) UsdRiSplineAPI object is returned upon failure. See
357
+ UsdPrim::ApplyAPI() for conditions resulting in failure.
358
+ UsdPrim::GetAppliedSchemas()
359
+ UsdPrim::HasAPI()
360
+ UsdPrim::CanApplyAPI()
361
+ UsdPrim::ApplyAPI()
362
+ UsdPrim::RemoveAPI()
363
+
364
+ Parameters
365
+ prim (Prim) –
366
+
367
+ static CanApply()
368
+ classmethod CanApply(prim, whyNot) -> bool
369
+ Returns true if this single-apply API schema can be applied to the
370
+ given prim .
371
+ If this schema can not be a applied to the prim, this returns false
372
+ and, if provided, populates whyNot with the reason it can not be
373
+ applied.
374
+ Note that if CanApply returns false, that does not necessarily imply
375
+ that calling Apply will fail. Callers are expected to call CanApply
376
+ before calling Apply if they want to ensure that it is valid to apply
377
+ a schema.
378
+ UsdPrim::GetAppliedSchemas()
379
+ UsdPrim::HasAPI()
380
+ UsdPrim::CanApplyAPI()
381
+ UsdPrim::ApplyAPI()
382
+ UsdPrim::RemoveAPI()
383
+
384
+ Parameters
385
+
386
+ prim (Prim) –
387
+ whyNot (str) –
388
+
389
+ CreateInterpolationAttr(defaultValue, writeSparsely) → Attribute
390
+ See GetInterpolationAttr() , and also Create vs Get Property Methods
391
+ for when to use Get vs Create.
392
+ If specified, author defaultValue as the attribute’s default,
393
+ sparsely (when it makes sense to do so) if writeSparsely is
394
+ true - the default for writeSparsely is false .
395
+
396
+ Parameters
397
+
398
+ defaultValue (VtValue) –
399
+ writeSparsely (bool) –
400
+
401
+ CreatePositionsAttr(defaultValue, writeSparsely) → Attribute
402
+ See GetPositionsAttr() , and also Create vs Get Property Methods for
403
+ when to use Get vs Create.
404
+ If specified, author defaultValue as the attribute’s default,
405
+ sparsely (when it makes sense to do so) if writeSparsely is
406
+ true - the default for writeSparsely is false .
407
+
408
+ Parameters
409
+
410
+ defaultValue (VtValue) –
411
+ writeSparsely (bool) –
412
+
413
+ CreateValuesAttr(defaultValue, writeSparsely) → Attribute
414
+ See GetValuesAttr() , and also Create vs Get Property Methods for when
415
+ to use Get vs Create.
416
+ If specified, author defaultValue as the attribute’s default,
417
+ sparsely (when it makes sense to do so) if writeSparsely is
418
+ true - the default for writeSparsely is false .
419
+
420
+ Parameters
421
+
422
+ defaultValue (VtValue) –
423
+ writeSparsely (bool) –
424
+
425
+ static Get()
426
+ classmethod Get(stage, path) -> SplineAPI
427
+ Return a UsdRiSplineAPI holding the prim adhering to this schema at
428
+ path on stage .
429
+ If no prim exists at path on stage , or if the prim at that
430
+ path does not adhere to this schema, return an invalid schema object.
431
+ This is shorthand for the following:
432
+ UsdRiSplineAPI(stage->GetPrimAtPath(path));
433
+
434
+ Parameters
435
+
436
+ stage (Stage) –
437
+ path (Path) –
438
+
439
+ GetInterpolationAttr() → Attribute
440
+ Interpolation method for the spline.
441
+ C++ Type: TfToken Usd Type: SdfValueTypeNames->Token Variability:
442
+ SdfVariabilityUniform Fallback Value: linear Allowed Values :
443
+ [linear, constant, bspline, catmullRom]
444
+
445
+ GetPositionsAttr() → Attribute
446
+ Positions of the knots.
447
+ C++ Type: VtArray<float> Usd Type: SdfValueTypeNames->FloatArray
448
+ Variability: SdfVariabilityUniform Fallback Value: No Fallback
449
+
450
+ static GetSchemaAttributeNames()
451
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
452
+ Return a vector of names of all pre-declared attributes for this
453
+ schema class and all its ancestor classes.
454
+ Does not include attributes that may be authored by custom/extended
455
+ methods of the schemas involved.
456
+
457
+ Parameters
458
+ includeInherited (bool) –
459
+
460
+ GetValuesAttr() → Attribute
461
+ Values of the knots.
462
+ C++ Type: See GetValuesTypeName() Usd Type: See GetValuesTypeName()
463
+ Variability: SdfVariabilityUniform Fallback Value: No Fallback
464
+
465
+ GetValuesTypeName() → ValueTypeName
466
+ Returns the intended typename of the values attribute of the spline.
467
+
468
+ Validate(reason) → bool
469
+ Validates the attribute values belonging to the spline.
470
+ Returns true if the spline has all valid attribute values. Returns
471
+ false and populates the reason output argument if the spline has
472
+ invalid attribute values.
473
+ Here’s the list of validations performed by this method:
474
+
475
+ the SplineAPI must be fully initialized
476
+ interpolation attribute must exist and use an allowed value
477
+ the positions array must be a float array
478
+ the positions array must be sorted by increasing value
479
+ the values array must use the correct value type
480
+ the positions and values array must have the same size
481
+
482
+ Parameters
483
+ reason (str) –
484
+
485
+ class pxr.UsdRi.StatementsAPI
486
+ Container namespace schema for all renderman statements.
487
+ The longer term goal is for clients to go directly to primvar or
488
+ render-attribute API’s, instead of using UsdRi StatementsAPI for
489
+ inherited attributes. Anticpating this, StatementsAPI can smooth the
490
+ way via a few environment variables:
491
+
492
+ USDRI_STATEMENTS_READ_OLD_ENCODING: Causes StatementsAPI to read
493
+ old-style attributes instead of primvars in the”ri:”namespace.
494
+
495
+ Methods:
496
+
497
+ Apply
498
+ classmethod Apply(prim) -> StatementsAPI
499
+
500
+ CanApply
501
+ classmethod CanApply(prim, whyNot) -> bool
502
+
503
+ CreateRiAttribute(name, riType, nameSpace)
504
+ Create a rib attribute on the prim to which this schema is attached.
505
+
506
+ Get
507
+ classmethod Get(stage, path) -> StatementsAPI
508
+
509
+ GetCoordinateSystem()
510
+ Returns the value in the"ri:coordinateSystem"attribute if it exists.
511
+
512
+ GetModelCoordinateSystems(targets)
513
+ Populates the output targets with the authored ri:modelCoordinateSystems, if any.
514
+
515
+ GetModelScopedCoordinateSystems(targets)
516
+ Populates the output targets with the authored ri:modelScopedCoordinateSystems, if any.
517
+
518
+ GetRiAttribute(name, nameSpace)
519
+ Return a UsdAttribute representing the Ri attribute with the name name, in the namespace nameSpace.
520
+
521
+ GetRiAttributeName
522
+ classmethod GetRiAttributeName(prop) -> str
523
+
524
+ GetRiAttributeNameSpace
525
+ classmethod GetRiAttributeNameSpace(prop) -> str
526
+
527
+ GetRiAttributes(nameSpace)
528
+ Return all rib attributes on this prim, or under a specific namespace (e.g."user").
529
+
530
+ GetSchemaAttributeNames
531
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
532
+
533
+ GetScopedCoordinateSystem()
534
+ Returns the value in the"ri:scopedCoordinateSystem"attribute if it exists.
535
+
536
+ HasCoordinateSystem()
537
+ Returns true if the underlying prim has a ri:coordinateSystem opinion.
538
+
539
+ HasScopedCoordinateSystem()
540
+ Returns true if the underlying prim has a ri:scopedCoordinateSystem opinion.
541
+
542
+ IsRiAttribute
543
+ classmethod IsRiAttribute(prop) -> bool
544
+
545
+ MakeRiAttributePropertyName
546
+ classmethod MakeRiAttributePropertyName(attrName) -> str
547
+
548
+ SetCoordinateSystem(coordSysName)
549
+ Sets the"ri:coordinateSystem"attribute to the given string value, creating the attribute if needed.
550
+
551
+ SetScopedCoordinateSystem(coordSysName)
552
+ Sets the"ri:scopedCoordinateSystem"attribute to the given string value, creating the attribute if needed.
553
+
554
+ static Apply()
555
+ classmethod Apply(prim) -> StatementsAPI
556
+ Applies this single-apply API schema to the given prim .
557
+ This information is stored by adding”StatementsAPI”to the token-
558
+ valued, listOp metadata apiSchemas on the prim.
559
+ A valid UsdRiStatementsAPI object is returned upon success. An invalid
560
+ (or empty) UsdRiStatementsAPI object is returned upon failure. See
561
+ UsdPrim::ApplyAPI() for conditions resulting in failure.
562
+ UsdPrim::GetAppliedSchemas()
563
+ UsdPrim::HasAPI()
564
+ UsdPrim::CanApplyAPI()
565
+ UsdPrim::ApplyAPI()
566
+ UsdPrim::RemoveAPI()
567
+
568
+ Parameters
569
+ prim (Prim) –
570
+
571
+ static CanApply()
572
+ classmethod CanApply(prim, whyNot) -> bool
573
+ Returns true if this single-apply API schema can be applied to the
574
+ given prim .
575
+ If this schema can not be a applied to the prim, this returns false
576
+ and, if provided, populates whyNot with the reason it can not be
577
+ applied.
578
+ Note that if CanApply returns false, that does not necessarily imply
579
+ that calling Apply will fail. Callers are expected to call CanApply
580
+ before calling Apply if they want to ensure that it is valid to apply
581
+ a schema.
582
+ UsdPrim::GetAppliedSchemas()
583
+ UsdPrim::HasAPI()
584
+ UsdPrim::CanApplyAPI()
585
+ UsdPrim::ApplyAPI()
586
+ UsdPrim::RemoveAPI()
587
+
588
+ Parameters
589
+
590
+ prim (Prim) –
591
+ whyNot (str) –
592
+
593
+ CreateRiAttribute(name, riType, nameSpace) → Attribute
594
+ Create a rib attribute on the prim to which this schema is attached.
595
+ A rib attribute consists of an attribute “nameSpace” and an
596
+ attribute “name”. For example, the namespace”cull”may define
597
+ attributes”backfacing”and”hidden”, and user-defined attributes belong
598
+ to the namespace”user”.
599
+ This method makes no attempt to validate that the given nameSpace
600
+ and name are actually meaningful to prman or any other renderer.
601
+ riType
602
+ should be a known RenderMan type definition, which can be array-
603
+ valued. For instance, both”color”and”float[3]”are valid values for
604
+ riType .
605
+
606
+ Parameters
607
+
608
+ name (str) –
609
+ riType (str) –
610
+ nameSpace (str) –
611
+
612
+ CreateRiAttribute(name, tfType, nameSpace) -> Attribute
613
+ Creates an attribute of the given tfType .
614
+ This is an overloaded member function, provided for convenience. It
615
+ differs from the above function only in what argument(s) it accepts.
616
+
617
+ Parameters
618
+
619
+ name (str) –
620
+ tfType (Type) –
621
+ nameSpace (str) –
622
+
623
+ static Get()
624
+ classmethod Get(stage, path) -> StatementsAPI
625
+ Return a UsdRiStatementsAPI holding the prim adhering to this schema
626
+ at path on stage .
627
+ If no prim exists at path on stage , or if the prim at that
628
+ path does not adhere to this schema, return an invalid schema object.
629
+ This is shorthand for the following:
630
+ UsdRiStatementsAPI(stage->GetPrimAtPath(path));
631
+
632
+ Parameters
633
+
634
+ stage (Stage) –
635
+ path (Path) –
636
+
637
+ GetCoordinateSystem() → str
638
+ Returns the value in the”ri:coordinateSystem”attribute if it exists.
639
+
640
+ GetModelCoordinateSystems(targets) → bool
641
+ Populates the output targets with the authored
642
+ ri:modelCoordinateSystems, if any.
643
+ Returns true if the query was successful.
644
+
645
+ Parameters
646
+ targets (list[SdfPath]) –
647
+
648
+ GetModelScopedCoordinateSystems(targets) → bool
649
+ Populates the output targets with the authored
650
+ ri:modelScopedCoordinateSystems, if any.
651
+ Returns true if the query was successful.
652
+
653
+ Parameters
654
+ targets (list[SdfPath]) –
655
+
656
+ GetRiAttribute(name, nameSpace) → Attribute
657
+ Return a UsdAttribute representing the Ri attribute with the name
658
+ name, in the namespace nameSpace.
659
+ The attribute returned may or may not actually exist so it must be
660
+ checked for validity.
661
+
662
+ Parameters
663
+
664
+ name (str) –
665
+ nameSpace (str) –
666
+
667
+ static GetRiAttributeName()
668
+ classmethod GetRiAttributeName(prop) -> str
669
+ Return the base, most-specific name of the rib attribute.
670
+ For example, the name of the rib
671
+ attribute”cull:backfacing”is”backfacing”
672
+
673
+ Parameters
674
+ prop (Property) –
675
+
676
+ static GetRiAttributeNameSpace()
677
+ classmethod GetRiAttributeNameSpace(prop) -> str
678
+ Return the containing namespace of the rib attribute (e.g.”user”).
679
+
680
+ Parameters
681
+ prop (Property) –
682
+
683
+ GetRiAttributes(nameSpace) → list[Property]
684
+ Return all rib attributes on this prim, or under a specific namespace
685
+ (e.g.”user”).
686
+ As noted above, rib attributes can be either UsdAttribute or
687
+ UsdRelationship, and like all UsdProperties, need not have a defined
688
+ value.
689
+
690
+ Parameters
691
+ nameSpace (str) –
692
+
693
+ static GetSchemaAttributeNames()
694
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
695
+ Return a vector of names of all pre-declared attributes for this
696
+ schema class and all its ancestor classes.
697
+ Does not include attributes that may be authored by custom/extended
698
+ methods of the schemas involved.
699
+
700
+ Parameters
701
+ includeInherited (bool) –
702
+
703
+ GetScopedCoordinateSystem() → str
704
+ Returns the value in the”ri:scopedCoordinateSystem”attribute if it
705
+ exists.
706
+
707
+ HasCoordinateSystem() → bool
708
+ Returns true if the underlying prim has a ri:coordinateSystem opinion.
709
+
710
+ HasScopedCoordinateSystem() → bool
711
+ Returns true if the underlying prim has a ri:scopedCoordinateSystem
712
+ opinion.
713
+
714
+ static IsRiAttribute()
715
+ classmethod IsRiAttribute(prop) -> bool
716
+ Return true if the property is in the”ri:attributes”namespace.
717
+
718
+ Parameters
719
+ prop (Property) –
720
+
721
+ static MakeRiAttributePropertyName()
722
+ classmethod MakeRiAttributePropertyName(attrName) -> str
723
+ Returns the given attrName prefixed with the full Ri attribute
724
+ namespace, creating a name suitable for an RiAttribute UsdProperty.
725
+ This handles conversion of common separator characters used in other
726
+ packages, such as periods and underscores.
727
+ Will return empty string if attrName is not a valid property
728
+ identifier; otherwise, will return a valid property name that
729
+ identifies the property as an RiAttribute, according to the following
730
+ rules:
731
+
732
+ If attrName is already a properly constructed RiAttribute
733
+ property name, return it unchanged.
734
+ If attrName contains two or more tokens separated by a
735
+ colon, consider the first to be the namespace, and the rest the
736
+ name, joined by underscores
737
+ If attrName contains two or more tokens separated by a
738
+ period, consider the first to be the namespace, and the rest the
739
+ name, joined by underscores
740
+ If attrName contains two or more tokens separated by an,
741
+ underscore consider the first to be the namespace, and the rest the
742
+ name, joined by underscores
743
+ else, assume attrName is the name, and”user”is the namespace
744
+
745
+ Parameters
746
+ attrName (str) –
747
+
748
+ SetCoordinateSystem(coordSysName) → None
749
+ Sets the”ri:coordinateSystem”attribute to the given string value,
750
+ creating the attribute if needed.
751
+ That identifies this prim as providing a coordinate system, which can
752
+ be retrieved via UsdGeomXformable::GetTransformAttr(). Also adds the
753
+ owning prim to the ri:modelCoordinateSystems relationship targets on
754
+ its parent leaf model prim, if it exists. If this prim is not under a
755
+ leaf model, no relationship targets will be authored.
756
+
757
+ Parameters
758
+ coordSysName (str) –
759
+
760
+ SetScopedCoordinateSystem(coordSysName) → None
761
+ Sets the”ri:scopedCoordinateSystem”attribute to the given string
762
+ value, creating the attribute if needed.
763
+ That identifies this prim as providing a coordinate system, which can
764
+ be retrieved via UsdGeomXformable::GetTransformAttr(). Such coordinate
765
+ systems are local to the RI attribute stack state, but does get
766
+ updated properly for instances when defined inside an object master.
767
+ Also adds the owning prim to the ri:modelScopedCoordinateSystems
768
+ relationship targets on its parent leaf model prim, if it exists. If
769
+ this prim is not under a leaf model, no relationship targets will be
770
+ authored.
771
+
772
+ Parameters
773
+ coordSysName (str) –
774
+
775
+ class pxr.UsdRi.TextureAPI
776
+ Deprecated
777
+ This API schema will be removed in a future release.
778
+ RiTextureAPI is an API schema that provides an interface to add
779
+ Renderman-specific attributes to adjust textures.
780
+ Methods:
781
+
782
+ Apply
783
+ classmethod Apply(prim) -> TextureAPI
784
+
785
+ CanApply
786
+ classmethod CanApply(prim, whyNot) -> bool
787
+
788
+ CreateRiTextureGammaAttr(defaultValue, ...)
789
+ See GetRiTextureGammaAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
790
+
791
+ CreateRiTextureSaturationAttr(defaultValue, ...)
792
+ See GetRiTextureSaturationAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
793
+
794
+ Get
795
+ classmethod Get(stage, path) -> TextureAPI
796
+
797
+ GetRiTextureGammaAttr()
798
+ Gamma-correct the texture.
799
+
800
+ GetRiTextureSaturationAttr()
801
+ Adjust the texture's saturation.
802
+
803
+ GetSchemaAttributeNames
804
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
805
+
806
+ static Apply()
807
+ classmethod Apply(prim) -> TextureAPI
808
+ Applies this single-apply API schema to the given prim .
809
+ This information is stored by adding”RiTextureAPI”to the token-valued,
810
+ listOp metadata apiSchemas on the prim.
811
+ A valid UsdRiTextureAPI object is returned upon success. An invalid
812
+ (or empty) UsdRiTextureAPI object is returned upon failure. See
813
+ UsdPrim::ApplyAPI() for conditions resulting in failure.
814
+ UsdPrim::GetAppliedSchemas()
815
+ UsdPrim::HasAPI()
816
+ UsdPrim::CanApplyAPI()
817
+ UsdPrim::ApplyAPI()
818
+ UsdPrim::RemoveAPI()
819
+
820
+ Parameters
821
+ prim (Prim) –
822
+
823
+ static CanApply()
824
+ classmethod CanApply(prim, whyNot) -> bool
825
+ Returns true if this single-apply API schema can be applied to the
826
+ given prim .
827
+ If this schema can not be a applied to the prim, this returns false
828
+ and, if provided, populates whyNot with the reason it can not be
829
+ applied.
830
+ Note that if CanApply returns false, that does not necessarily imply
831
+ that calling Apply will fail. Callers are expected to call CanApply
832
+ before calling Apply if they want to ensure that it is valid to apply
833
+ a schema.
834
+ UsdPrim::GetAppliedSchemas()
835
+ UsdPrim::HasAPI()
836
+ UsdPrim::CanApplyAPI()
837
+ UsdPrim::ApplyAPI()
838
+ UsdPrim::RemoveAPI()
839
+
840
+ Parameters
841
+
842
+ prim (Prim) –
843
+ whyNot (str) –
844
+
845
+ CreateRiTextureGammaAttr(defaultValue, writeSparsely) → Attribute
846
+ See GetRiTextureGammaAttr() , and also Create vs Get Property Methods
847
+ for when to use Get vs Create.
848
+ If specified, author defaultValue as the attribute’s default,
849
+ sparsely (when it makes sense to do so) if writeSparsely is
850
+ true - the default for writeSparsely is false .
851
+
852
+ Parameters
853
+
854
+ defaultValue (VtValue) –
855
+ writeSparsely (bool) –
856
+
857
+ CreateRiTextureSaturationAttr(defaultValue, writeSparsely) → Attribute
858
+ See GetRiTextureSaturationAttr() , and also Create vs Get Property
859
+ Methods for when to use Get vs Create.
860
+ If specified, author defaultValue as the attribute’s default,
861
+ sparsely (when it makes sense to do so) if writeSparsely is
862
+ true - the default for writeSparsely is false .
863
+
864
+ Parameters
865
+
866
+ defaultValue (VtValue) –
867
+ writeSparsely (bool) –
868
+
869
+ static Get()
870
+ classmethod Get(stage, path) -> TextureAPI
871
+ Return a UsdRiTextureAPI holding the prim adhering to this schema at
872
+ path on stage .
873
+ If no prim exists at path on stage , or if the prim at that
874
+ path does not adhere to this schema, return an invalid schema object.
875
+ This is shorthand for the following:
876
+ UsdRiTextureAPI(stage->GetPrimAtPath(path));
877
+
878
+ Parameters
879
+
880
+ stage (Stage) –
881
+ path (Path) –
882
+
883
+ GetRiTextureGammaAttr() → Attribute
884
+ Gamma-correct the texture.
885
+ Declaration
886
+ float ri:texture:gamma
887
+ C++ Type
888
+ float
889
+ Usd Type
890
+ SdfValueTypeNames->Float
891
+
892
+ GetRiTextureSaturationAttr() → Attribute
893
+ Adjust the texture’s saturation.
894
+ Declaration
895
+ float ri:texture:saturation
896
+ C++ Type
897
+ float
898
+ Usd Type
899
+ SdfValueTypeNames->Float
900
+
901
+ static GetSchemaAttributeNames()
902
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
903
+ Return a vector of names of all pre-declared attributes for this
904
+ schema class and all its ancestor classes.
905
+ Does not include attributes that may be authored by custom/extended
906
+ methods of the schemas involved.
907
+
908
+ Parameters
909
+ includeInherited (bool) –
910
+
911
+ class pxr.UsdRi.Tokens
912
+ Attributes:
913
+
914
+ bspline
915
+
916
+ catmullRom
917
+
918
+ constant
919
+
920
+ interpolation
921
+
922
+ linear
923
+
924
+ outputsRiDisplacement
925
+
926
+ outputsRiSurface
927
+
928
+ outputsRiVolume
929
+
930
+ positions
931
+
932
+ renderContext
933
+
934
+ riTextureGamma
935
+
936
+ riTextureSaturation
937
+
938
+ spline
939
+
940
+ values
941
+
942
+ bspline = 'bspline'
943
+
944
+ catmullRom = 'catmull-rom'
945
+
946
+ constant = 'constant'
947
+
948
+ interpolation = 'interpolation'
949
+
950
+ linear = 'linear'
951
+
952
+ outputsRiDisplacement = 'outputs:ri:displacement'
953
+
954
+ outputsRiSurface = 'outputs:ri:surface'
955
+
956
+ outputsRiVolume = 'outputs:ri:volume'
957
+
958
+ positions = 'positions'
959
+
960
+ renderContext = 'ri'
961
+
962
+ riTextureGamma = 'ri:texture:gamma'
963
+
964
+ riTextureSaturation = 'ri:texture:saturation'
965
+
966
+ spline = 'spline'
967
+
968
+ values = 'values'
969
+
970
+ © Copyright 2019-2023, NVIDIA.
971
+ Last updated on Nov 14, 2023.
972
+
973
+
974
+
UsdShade.md ADDED
The diff for this file is too large to render. See raw diff
 
UsdSkel.md ADDED
@@ -0,0 +1,2480 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdSkel module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdSkel module
10
+
11
+  
12
+
13
+ # UsdSkel module
14
+
15
+ Summary: The UsdSkel module defines schemas and API that form a basis for interchanging skeletally-skinned meshes and joint animations.
16
+
17
+ Classes:
18
+
19
+ AnimMapper
20
+
21
+ AnimQuery
22
+ Class providing efficient queries of primitives that provide skel animation.
23
+
24
+ Animation
25
+ Describes a skel animation, where joint animation is stored in a vectorized form.
26
+
27
+ Binding
28
+ Helper object that describes the binding of a skeleton to a set of skinnable objects.
29
+
30
+ BindingAPI
31
+ 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.
32
+
33
+ BlendShape
34
+ Describes a target blend shape, possibly containing inbetween shapes.
35
+
36
+ BlendShapeQuery
37
+ Helper class used to resolve blend shape weights, including inbetweens.
38
+
39
+ Cache
40
+ Thread-safe cache for accessing query objects for evaluating skeletal data.
41
+
42
+ InbetweenShape
43
+ Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape.
44
+
45
+ PackedJointAnimation
46
+ Deprecated.
47
+
48
+ Root
49
+ Boundable prim type used to identify a scope beneath which skeletally- posed primitives are defined.
50
+
51
+ Skeleton
52
+ Describes a skeleton.
53
+
54
+ SkeletonQuery
55
+ Primary interface to reading bound skeleton data.
56
+
57
+ SkinningQuery
58
+ Object used for querying resolved bindings for skinning.
59
+
60
+ Tokens
61
+
62
+ Topology
63
+ Object holding information describing skeleton topology.
64
+
65
+ class pxr.UsdSkel.AnimMapper
66
+ Methods:
67
+
68
+ IsIdentity()
69
+ Returns true if this is an identity map.
70
+
71
+ IsNull()
72
+ Returns true if this is a null mapping.
73
+
74
+ IsSparse()
75
+ Returns true if this is a sparse mapping.
76
+
77
+ Remap(source, target, elementSize, defaultValue)
78
+ Typed remapping of data in an arbitrary, stl-like container.
79
+
80
+ RemapTransforms(source, target, elementSize)
81
+ Convenience method for the common task of remapping transform arrays.
82
+
83
+ IsIdentity() → bool
84
+ Returns true if this is an identity map.
85
+ The source and target orders of an identity map are identical.
86
+
87
+ IsNull() → bool
88
+ Returns true if this is a null mapping.
89
+ No source elements of a null map are mapped to the target.
90
+
91
+ IsSparse() → bool
92
+ Returns true if this is a sparse mapping.
93
+ A sparse mapping means that not all target values will be overridden
94
+ by source values, when mapped with Remap().
95
+
96
+ Remap(source, target, elementSize, defaultValue) → bool
97
+ Typed remapping of data in an arbitrary, stl-like container.
98
+ The source array provides a run of elementSize for each path
99
+ in the em sourceOrder. These elements are remapped and copied over
100
+ the target array. Prior to remapping, the target array is
101
+ resized to the size of the em targetOrder (as given at mapper
102
+ construction time) multiplied by the elementSize . New element
103
+ created in the array are initialized to defaultValue , if
104
+ provided.
105
+
106
+ Parameters
107
+
108
+ source (Container) –
109
+ target (Container) –
110
+ elementSize (int) –
111
+ defaultValue (Container.value_type) –
112
+
113
+ Remap(source, target, elementSize, defaultValue) -> bool
114
+ Type-erased remapping of data from source into target .
115
+ The source array provides a run of elementSize elements for
116
+ each path in the em sourceOrder. These elements are remapped and
117
+ copied over the target array. Prior to remapping, the target
118
+ array is resized to the size of the em targetOrder (as given at
119
+ mapper construction time) multiplied by the elementSize . New
120
+ elements created in the array are initialized to defaultValue , if
121
+ provided. Remapping is supported for registered Sdf array value types
122
+ only.
123
+
124
+ Parameters
125
+
126
+ source (VtValue) –
127
+ target (VtValue) –
128
+ elementSize (int) –
129
+ defaultValue (VtValue) –
130
+
131
+ RemapTransforms(source, target, elementSize) → bool
132
+ Convenience method for the common task of remapping transform arrays.
133
+ This performs the same operation as Remap(), but sets the matrix
134
+ identity as the default value.
135
+
136
+ Parameters
137
+
138
+ source (VtArray[Matrix4]) –
139
+ target (VtArray[Matrix4]) –
140
+ elementSize (int) –
141
+
142
+ class pxr.UsdSkel.AnimQuery
143
+ Class providing efficient queries of primitives that provide skel
144
+ animation.
145
+ Methods:
146
+
147
+ BlendShapeWeightsMightBeTimeVarying()
148
+ Return true if it possible, but not certain, that the blend shape weights computed through this animation query change over time, false otherwise.
149
+
150
+ ComputeBlendShapeWeights(weights, time)
151
+
152
+ param weights
153
+
154
+ ComputeJointLocalTransformComponents(...)
155
+ Compute translation,rotation,scale components of the joint transforms in joint-local space.
156
+
157
+ ComputeJointLocalTransforms(xforms, time)
158
+ Compute joint transforms in joint-local space.
159
+
160
+ GetBlendShapeOrder()
161
+ Returns an array of tokens describing the ordering of blend shape channels in the animation.
162
+
163
+ GetBlendShapeWeightTimeSamples(attrs)
164
+ Get the time samples at which values contributing to blend shape weights have been set.
165
+
166
+ GetBlendShapeWeightTimeSamplesInInterval(...)
167
+ Get the time samples at which values contributing to blend shape weights are set, over interval .
168
+
169
+ GetJointOrder()
170
+ Returns an array of tokens describing the ordering of joints in the animation.
171
+
172
+ GetJointTransformTimeSamples(times)
173
+ Get the time samples at which values contributing to joint transforms are set.
174
+
175
+ GetJointTransformTimeSamplesInInterval(...)
176
+ Get the time samples at which values contributing to joint transforms are set, over interval .
177
+
178
+ GetPrim()
179
+ Return the primitive this anim query reads from.
180
+
181
+ JointTransformsMightBeTimeVarying()
182
+ Return true if it possible, but not certain, that joint transforms computed through this animation query change over time, false otherwise.
183
+
184
+ BlendShapeWeightsMightBeTimeVarying() → bool
185
+ Return true if it possible, but not certain, that the blend shape
186
+ weights computed through this animation query change over time, false
187
+ otherwise.
188
+ UsdAttribute::ValueMightBeTimeVayring
189
+
190
+ ComputeBlendShapeWeights(weights, time) → bool
191
+
192
+ Parameters
193
+
194
+ weights (FloatArray) –
195
+ time (TimeCode) –
196
+
197
+ ComputeJointLocalTransformComponents(translations, rotations, scales, time) → bool
198
+ Compute translation,rotation,scale components of the joint transforms
199
+ in joint-local space.
200
+ This is provided to facilitate direct streaming of animation data in a
201
+ form that can efficiently be processed for animation blending.
202
+
203
+ Parameters
204
+
205
+ translations (Vec3fArray) –
206
+ rotations (QuatfArray) –
207
+ scales (Vec3hArray) –
208
+ time (TimeCode) –
209
+
210
+ ComputeJointLocalTransforms(xforms, time) → bool
211
+ Compute joint transforms in joint-local space.
212
+ Transforms are returned in the order specified by the joint ordering
213
+ of the animation primitive itself.
214
+
215
+ Parameters
216
+
217
+ xforms (VtArray[Matrix4]) –
218
+ time (TimeCode) –
219
+
220
+ GetBlendShapeOrder() → TokenArray
221
+ Returns an array of tokens describing the ordering of blend shape
222
+ channels in the animation.
223
+
224
+ GetBlendShapeWeightTimeSamples(attrs) → bool
225
+ Get the time samples at which values contributing to blend shape
226
+ weights have been set.
227
+ UsdAttribute::GetTimeSamples
228
+
229
+ Parameters
230
+ attrs (list[float]) –
231
+
232
+ GetBlendShapeWeightTimeSamplesInInterval(interval, times) → bool
233
+ Get the time samples at which values contributing to blend shape
234
+ weights are set, over interval .
235
+ UsdAttribute::GetTimeSamplesInInterval
236
+
237
+ Parameters
238
+
239
+ interval (Interval) –
240
+ times (list[float]) –
241
+
242
+ GetJointOrder() → TokenArray
243
+ Returns an array of tokens describing the ordering of joints in the
244
+ animation.
245
+ UsdSkelSkeleton::GetJointOrder
246
+
247
+ GetJointTransformTimeSamples(times) → bool
248
+ Get the time samples at which values contributing to joint transforms
249
+ are set.
250
+ This only computes the time samples for sampling transforms in joint-
251
+ local space, and does not include time samples affecting the root
252
+ transformation.
253
+ UsdAttribute::GetTimeSamples
254
+
255
+ Parameters
256
+ times (list[float]) –
257
+
258
+ GetJointTransformTimeSamplesInInterval(interval, times) → bool
259
+ Get the time samples at which values contributing to joint transforms
260
+ are set, over interval .
261
+ This only computes the time samples for sampling transforms in joint-
262
+ local space, and does not include time samples affecting the root
263
+ transformation.
264
+ UsdAttribute::GetTimeSamplesInInterval
265
+
266
+ Parameters
267
+
268
+ interval (Interval) –
269
+ times (list[float]) –
270
+
271
+ GetPrim() → Prim
272
+ Return the primitive this anim query reads from.
273
+
274
+ JointTransformsMightBeTimeVarying() → bool
275
+ Return true if it possible, but not certain, that joint transforms
276
+ computed through this animation query change over time, false
277
+ otherwise.
278
+ UsdAttribute::ValueMightBeTimeVayring
279
+
280
+ class pxr.UsdSkel.Animation
281
+ Describes a skel animation, where joint animation is stored in a
282
+ vectorized form.
283
+ See the extended Skel Animation documentation for more information.
284
+ Methods:
285
+
286
+ CreateBlendShapeWeightsAttr(defaultValue, ...)
287
+ See GetBlendShapeWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
288
+
289
+ CreateBlendShapesAttr(defaultValue, ...)
290
+ See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
291
+
292
+ CreateJointsAttr(defaultValue, writeSparsely)
293
+ See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
294
+
295
+ CreateRotationsAttr(defaultValue, writeSparsely)
296
+ See GetRotationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
297
+
298
+ CreateScalesAttr(defaultValue, writeSparsely)
299
+ See GetScalesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
300
+
301
+ CreateTranslationsAttr(defaultValue, ...)
302
+ See GetTranslationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
303
+
304
+ Define
305
+ classmethod Define(stage, path) -> Animation
306
+
307
+ Get
308
+ classmethod Get(stage, path) -> Animation
309
+
310
+ GetBlendShapeWeightsAttr()
311
+ Array of weight values for each blend shape.
312
+
313
+ GetBlendShapesAttr()
314
+ Array of tokens identifying which blend shapes this animation's data applies to.
315
+
316
+ GetJointsAttr()
317
+ Array of tokens identifying which joints this animation's data applies to.
318
+
319
+ GetRotationsAttr()
320
+ Joint-local unit quaternion rotations of all affected joints, in 32-bit precision.
321
+
322
+ GetScalesAttr()
323
+ Joint-local scales of all affected joints, in 16 bit precision.
324
+
325
+ GetSchemaAttributeNames
326
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
327
+
328
+ GetTransforms(xforms, time)
329
+ Convenience method for querying resolved transforms at time .
330
+
331
+ GetTranslationsAttr()
332
+ Joint-local translations of all affected joints.
333
+
334
+ SetTransforms(xforms, time)
335
+ Convenience method for setting an array of transforms.
336
+
337
+ CreateBlendShapeWeightsAttr(defaultValue, writeSparsely) → Attribute
338
+ See GetBlendShapeWeightsAttr() , and also Create vs Get Property
339
+ Methods for when to use Get vs Create.
340
+ If specified, author defaultValue as the attribute’s default,
341
+ sparsely (when it makes sense to do so) if writeSparsely is
342
+ true - the default for writeSparsely is false .
343
+
344
+ Parameters
345
+
346
+ defaultValue (VtValue) –
347
+ writeSparsely (bool) –
348
+
349
+ CreateBlendShapesAttr(defaultValue, writeSparsely) → Attribute
350
+ See GetBlendShapesAttr() , and also Create vs Get Property Methods for
351
+ when to use Get vs Create.
352
+ If specified, author defaultValue as the attribute’s default,
353
+ sparsely (when it makes sense to do so) if writeSparsely is
354
+ true - the default for writeSparsely is false .
355
+
356
+ Parameters
357
+
358
+ defaultValue (VtValue) –
359
+ writeSparsely (bool) –
360
+
361
+ CreateJointsAttr(defaultValue, writeSparsely) → Attribute
362
+ See GetJointsAttr() , and also Create vs Get Property Methods for when
363
+ to use Get vs Create.
364
+ If specified, author defaultValue as the attribute’s default,
365
+ sparsely (when it makes sense to do so) if writeSparsely is
366
+ true - the default for writeSparsely is false .
367
+
368
+ Parameters
369
+
370
+ defaultValue (VtValue) –
371
+ writeSparsely (bool) –
372
+
373
+ CreateRotationsAttr(defaultValue, writeSparsely) → Attribute
374
+ See GetRotationsAttr() , and also Create vs Get Property Methods for
375
+ when to use Get vs Create.
376
+ If specified, author defaultValue as the attribute’s default,
377
+ sparsely (when it makes sense to do so) if writeSparsely is
378
+ true - the default for writeSparsely is false .
379
+
380
+ Parameters
381
+
382
+ defaultValue (VtValue) –
383
+ writeSparsely (bool) –
384
+
385
+ CreateScalesAttr(defaultValue, writeSparsely) → Attribute
386
+ See GetScalesAttr() , and also Create vs Get Property Methods for when
387
+ to use Get vs Create.
388
+ If specified, author defaultValue as the attribute’s default,
389
+ sparsely (when it makes sense to do so) if writeSparsely is
390
+ true - the default for writeSparsely is false .
391
+
392
+ Parameters
393
+
394
+ defaultValue (VtValue) –
395
+ writeSparsely (bool) –
396
+
397
+ CreateTranslationsAttr(defaultValue, writeSparsely) → Attribute
398
+ See GetTranslationsAttr() , and also Create vs Get Property Methods
399
+ for when to use Get vs Create.
400
+ If specified, author defaultValue as the attribute’s default,
401
+ sparsely (when it makes sense to do so) if writeSparsely is
402
+ true - the default for writeSparsely is false .
403
+
404
+ Parameters
405
+
406
+ defaultValue (VtValue) –
407
+ writeSparsely (bool) –
408
+
409
+ static Define()
410
+ classmethod Define(stage, path) -> Animation
411
+ Attempt to ensure a UsdPrim adhering to this schema at path is
412
+ defined (according to UsdPrim::IsDefined() ) on this stage.
413
+ If a prim adhering to this schema at path is already defined on
414
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
415
+ specifier == SdfSpecifierDef and this schema’s prim type name for
416
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
417
+ with specifier == SdfSpecifierDef and empty typeName at the
418
+ current EditTarget for any nonexistent, or existing but not Defined
419
+ ancestors.
420
+ The given path must be an absolute prim path that does not contain
421
+ any variant selections.
422
+ If it is impossible to author any of the necessary PrimSpecs, (for
423
+ example, in case path cannot map to the current UsdEditTarget ‘s
424
+ namespace) issue an error and return an invalid UsdPrim.
425
+ Note that this method may return a defined prim whose typeName does
426
+ not specify this schema class, in case a stronger typeName opinion
427
+ overrides the opinion at the current EditTarget.
428
+
429
+ Parameters
430
+
431
+ stage (Stage) –
432
+ path (Path) –
433
+
434
+ static Get()
435
+ classmethod Get(stage, path) -> Animation
436
+ Return a UsdSkelAnimation holding the prim adhering to this schema at
437
+ path on stage .
438
+ If no prim exists at path on stage , or if the prim at that
439
+ path does not adhere to this schema, return an invalid schema object.
440
+ This is shorthand for the following:
441
+ UsdSkelAnimation(stage->GetPrimAtPath(path));
442
+
443
+ Parameters
444
+
445
+ stage (Stage) –
446
+ path (Path) –
447
+
448
+ GetBlendShapeWeightsAttr() → Attribute
449
+ Array of weight values for each blend shape.
450
+ Each weight value is associated with the corresponding blend shape
451
+ identified within the blendShapes token array, and therefore must
452
+ have the same length as *blendShapes.
453
+ Declaration
454
+ float[] blendShapeWeights
455
+ C++ Type
456
+ VtArray<float>
457
+ Usd Type
458
+ SdfValueTypeNames->FloatArray
459
+
460
+ GetBlendShapesAttr() → Attribute
461
+ Array of tokens identifying which blend shapes this animation’s data
462
+ applies to.
463
+ The tokens for blendShapes correspond to the tokens set in the
464
+ skel:blendShapes binding property of the UsdSkelBindingAPI.
465
+ Declaration
466
+ uniform token[] blendShapes
467
+ C++ Type
468
+ VtArray<TfToken>
469
+ Usd Type
470
+ SdfValueTypeNames->TokenArray
471
+ Variability
472
+ SdfVariabilityUniform
473
+
474
+ GetJointsAttr() → Attribute
475
+ Array of tokens identifying which joints this animation’s data applies
476
+ to.
477
+ The tokens for joints correspond to the tokens of Skeleton primitives.
478
+ The order of the joints as listed here may vary from the order of
479
+ joints on the Skeleton itself.
480
+ Declaration
481
+ uniform token[] joints
482
+ C++ Type
483
+ VtArray<TfToken>
484
+ Usd Type
485
+ SdfValueTypeNames->TokenArray
486
+ Variability
487
+ SdfVariabilityUniform
488
+
489
+ GetRotationsAttr() → Attribute
490
+ Joint-local unit quaternion rotations of all affected joints, in
491
+ 32-bit precision.
492
+ Array length should match the size of the joints attribute.
493
+ Declaration
494
+ quatf[] rotations
495
+ C++ Type
496
+ VtArray<GfQuatf>
497
+ Usd Type
498
+ SdfValueTypeNames->QuatfArray
499
+
500
+ GetScalesAttr() → Attribute
501
+ Joint-local scales of all affected joints, in 16 bit precision.
502
+ Array length should match the size of the joints attribute.
503
+ Declaration
504
+ half3[] scales
505
+ C++ Type
506
+ VtArray<GfVec3h>
507
+ Usd Type
508
+ SdfValueTypeNames->Half3Array
509
+
510
+ static GetSchemaAttributeNames()
511
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
512
+ Return a vector of names of all pre-declared attributes for this
513
+ schema class and all its ancestor classes.
514
+ Does not include attributes that may be authored by custom/extended
515
+ methods of the schemas involved.
516
+
517
+ Parameters
518
+ includeInherited (bool) –
519
+
520
+ GetTransforms(xforms, time) → bool
521
+ Convenience method for querying resolved transforms at time .
522
+ Note that it is more efficient to query transforms through
523
+ UsdSkelAnimQuery or UsdSkelSkeletonQuery.
524
+
525
+ Parameters
526
+
527
+ xforms (Matrix4dArray) –
528
+ time (TimeCode) –
529
+
530
+ GetTranslationsAttr() → Attribute
531
+ Joint-local translations of all affected joints.
532
+ Array length should match the size of the joints attribute.
533
+ Declaration
534
+ float3[] translations
535
+ C++ Type
536
+ VtArray<GfVec3f>
537
+ Usd Type
538
+ SdfValueTypeNames->Float3Array
539
+
540
+ SetTransforms(xforms, time) → bool
541
+ Convenience method for setting an array of transforms.
542
+ The given transforms must be orthogonal.
543
+
544
+ Parameters
545
+
546
+ xforms (Matrix4dArray) –
547
+ time (TimeCode) –
548
+
549
+ class pxr.UsdSkel.Binding
550
+ Helper object that describes the binding of a skeleton to a set of
551
+ skinnable objects. The set of skinnable objects is given as
552
+ UsdSkelSkinningQuery prims, which can be used both to identify the
553
+ skinned prim as well compute skinning properties of the prim.
554
+ Methods:
555
+
556
+ GetSkeleton()
557
+ Returns the bound skeleton.
558
+
559
+ GetSkinningTargets()
560
+ Returns the set skinning targets.
561
+
562
+ GetSkeleton() → Skeleton
563
+ Returns the bound skeleton.
564
+
565
+ GetSkinningTargets() → VtArray[SkinningQuery]
566
+ Returns the set skinning targets.
567
+
568
+ class pxr.UsdSkel.BindingAPI
569
+ Provides API for authoring and extracting all the skinning-related
570
+ data that lives in the”geometry hierarchy”of prims and models that
571
+ want to be skeletally deformed.
572
+ See the extended UsdSkelBindingAPI schema documentation for more about
573
+ bindings and how they apply in a scene graph.
574
+ Methods:
575
+
576
+ Apply
577
+ classmethod Apply(prim) -> BindingAPI
578
+
579
+ CanApply
580
+ classmethod CanApply(prim, whyNot) -> bool
581
+
582
+ CreateAnimationSourceRel()
583
+ See GetAnimationSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create.
584
+
585
+ CreateBlendShapeTargetsRel()
586
+ See GetBlendShapeTargetsRel() , and also Create vs Get Property Methods for when to use Get vs Create.
587
+
588
+ CreateBlendShapesAttr(defaultValue, ...)
589
+ See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
590
+
591
+ CreateGeomBindTransformAttr(defaultValue, ...)
592
+ See GetGeomBindTransformAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
593
+
594
+ CreateJointIndicesAttr(defaultValue, ...)
595
+ See GetJointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
596
+
597
+ CreateJointIndicesPrimvar(constant, elementSize)
598
+ Convenience function to create the jointIndices primvar, optionally specifying elementSize.
599
+
600
+ CreateJointWeightsAttr(defaultValue, ...)
601
+ See GetJointWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
602
+
603
+ CreateJointWeightsPrimvar(constant, elementSize)
604
+ Convenience function to create the jointWeights primvar, optionally specifying elementSize.
605
+
606
+ CreateJointsAttr(defaultValue, writeSparsely)
607
+ See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
608
+
609
+ CreateSkeletonRel()
610
+ See GetSkeletonRel() , and also Create vs Get Property Methods for when to use Get vs Create.
611
+
612
+ CreateSkinningBlendWeightPrimvar
613
+
614
+ CreateSkinningBlendWeightsAttr(defaultValue, ...)
615
+ See GetSkinningBlendWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
616
+
617
+ CreateSkinningMethodAttr(defaultValue, ...)
618
+ See GetSkinningMethodAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
619
+
620
+ Get
621
+ classmethod Get(stage, path) -> BindingAPI
622
+
623
+ GetAnimationSource(prim)
624
+ Convenience method to query the animation source bound on this prim.
625
+
626
+ GetAnimationSourceRel()
627
+ Animation source to be bound to Skeleton primitives at or beneath the location at which this property is defined.
628
+
629
+ GetBlendShapeTargetsRel()
630
+ Ordered list of all target blend shapes.
631
+
632
+ GetBlendShapesAttr()
633
+ 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.
634
+
635
+ GetGeomBindTransformAttr()
636
+ Encodes the bind-time world space transforms of the prim.
637
+
638
+ GetInheritedAnimationSource()
639
+ Returns the animation source bound at this prim, or one of its ancestors.
640
+
641
+ GetInheritedSkeleton()
642
+ Returns the skeleton bound at this prim, or one of its ancestors.
643
+
644
+ GetJointIndicesAttr()
645
+ Indices into the joints attribute of the closest (in namespace) bound Skeleton that affect each point of a PointBased gprim.
646
+
647
+ GetJointIndicesPrimvar()
648
+ Convenience function to get the jointIndices attribute as a primvar.
649
+
650
+ GetJointWeightsAttr()
651
+ Weights for the joints that affect each point of a PointBased gprim.
652
+
653
+ GetJointWeightsPrimvar()
654
+ Convenience function to get the jointWeights attribute as a primvar.
655
+
656
+ GetJointsAttr()
657
+ An (optional) array of tokens defining the list of joints to which jointIndices apply.
658
+
659
+ GetSchemaAttributeNames
660
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
661
+
662
+ GetSkeleton(skel)
663
+ Convenience method to query the Skeleton bound on this prim.
664
+
665
+ GetSkeletonRel()
666
+ Skeleton to be bound to this prim and its descendents that possess a mapping and weighting to the joints of the identified Skeleton.
667
+
668
+ GetSkinningBlendWeightPrimvar
669
+
670
+ GetSkinningBlendWeightsAttr()
671
+ Weights for weighted blend skinning method.
672
+
673
+ GetSkinningMethodAttr()
674
+ Different calculation method for skinning.
675
+
676
+ SetRigidJointInfluence(jointIndex, weight)
677
+ Convenience method for defining joints influences that make a primitive rigidly deformed by a single joint.
678
+
679
+ ValidateJointIndices
680
+ classmethod ValidateJointIndices(indices, numJoints, reason) -> bool
681
+
682
+ static Apply()
683
+ classmethod Apply(prim) -> BindingAPI
684
+ Applies this single-apply API schema to the given prim .
685
+ This information is stored by adding”SkelBindingAPI”to the token-
686
+ valued, listOp metadata apiSchemas on the prim.
687
+ A valid UsdSkelBindingAPI object is returned upon success. An invalid
688
+ (or empty) UsdSkelBindingAPI object is returned upon failure. See
689
+ UsdPrim::ApplyAPI() for conditions resulting in failure.
690
+ UsdPrim::GetAppliedSchemas()
691
+ UsdPrim::HasAPI()
692
+ UsdPrim::CanApplyAPI()
693
+ UsdPrim::ApplyAPI()
694
+ UsdPrim::RemoveAPI()
695
+
696
+ Parameters
697
+ prim (Prim) –
698
+
699
+ static CanApply()
700
+ classmethod CanApply(prim, whyNot) -> bool
701
+ Returns true if this single-apply API schema can be applied to the
702
+ given prim .
703
+ If this schema can not be a applied to the prim, this returns false
704
+ and, if provided, populates whyNot with the reason it can not be
705
+ applied.
706
+ Note that if CanApply returns false, that does not necessarily imply
707
+ that calling Apply will fail. Callers are expected to call CanApply
708
+ before calling Apply if they want to ensure that it is valid to apply
709
+ a schema.
710
+ UsdPrim::GetAppliedSchemas()
711
+ UsdPrim::HasAPI()
712
+ UsdPrim::CanApplyAPI()
713
+ UsdPrim::ApplyAPI()
714
+ UsdPrim::RemoveAPI()
715
+
716
+ Parameters
717
+
718
+ prim (Prim) –
719
+ whyNot (str) –
720
+
721
+ CreateAnimationSourceRel() → Relationship
722
+ See GetAnimationSourceRel() , and also Create vs Get Property Methods
723
+ for when to use Get vs Create.
724
+
725
+ CreateBlendShapeTargetsRel() → Relationship
726
+ See GetBlendShapeTargetsRel() , and also Create vs Get Property
727
+ Methods for when to use Get vs Create.
728
+
729
+ CreateBlendShapesAttr(defaultValue, writeSparsely) → Attribute
730
+ See GetBlendShapesAttr() , and also Create vs Get Property Methods for
731
+ when to use Get vs Create.
732
+ If specified, author defaultValue as the attribute’s default,
733
+ sparsely (when it makes sense to do so) if writeSparsely is
734
+ true - the default for writeSparsely is false .
735
+
736
+ Parameters
737
+
738
+ defaultValue (VtValue) –
739
+ writeSparsely (bool) –
740
+
741
+ CreateGeomBindTransformAttr(defaultValue, writeSparsely) → Attribute
742
+ See GetGeomBindTransformAttr() , and also Create vs Get Property
743
+ Methods for when to use Get vs Create.
744
+ If specified, author defaultValue as the attribute’s default,
745
+ sparsely (when it makes sense to do so) if writeSparsely is
746
+ true - the default for writeSparsely is false .
747
+
748
+ Parameters
749
+
750
+ defaultValue (VtValue) –
751
+ writeSparsely (bool) –
752
+
753
+ CreateJointIndicesAttr(defaultValue, writeSparsely) → Attribute
754
+ See GetJointIndicesAttr() , and also Create vs Get Property Methods
755
+ for when to use Get vs Create.
756
+ If specified, author defaultValue as the attribute’s default,
757
+ sparsely (when it makes sense to do so) if writeSparsely is
758
+ true - the default for writeSparsely is false .
759
+
760
+ Parameters
761
+
762
+ defaultValue (VtValue) –
763
+ writeSparsely (bool) –
764
+
765
+ CreateJointIndicesPrimvar(constant, elementSize) → Primvar
766
+ Convenience function to create the jointIndices primvar, optionally
767
+ specifying elementSize.
768
+ If constant is true, the resulting primvar is configured
769
+ with’constant’interpolation, and describes a rigid deformation.
770
+ Otherwise, the primvar is configured with’vertex’interpolation, and
771
+ describes joint influences that vary per point.
772
+ CreateJointIndicesAttr() , GetJointIndicesPrimvar()
773
+
774
+ Parameters
775
+
776
+ constant (bool) –
777
+ elementSize (int) –
778
+
779
+ CreateJointWeightsAttr(defaultValue, writeSparsely) → Attribute
780
+ See GetJointWeightsAttr() , and also Create vs Get Property Methods
781
+ for when to use Get vs Create.
782
+ If specified, author defaultValue as the attribute’s default,
783
+ sparsely (when it makes sense to do so) if writeSparsely is
784
+ true - the default for writeSparsely is false .
785
+
786
+ Parameters
787
+
788
+ defaultValue (VtValue) –
789
+ writeSparsely (bool) –
790
+
791
+ CreateJointWeightsPrimvar(constant, elementSize) → Primvar
792
+ Convenience function to create the jointWeights primvar, optionally
793
+ specifying elementSize.
794
+ If constant is true, the resulting primvar is configured
795
+ with’constant’interpolation, and describes a rigid deformation.
796
+ Otherwise, the primvar is configured with’vertex’interpolation, and
797
+ describes joint influences that vary per point.
798
+ CreateJointWeightsAttr() , GetJointWeightsPrimvar()
799
+
800
+ Parameters
801
+
802
+ constant (bool) –
803
+ elementSize (int) –
804
+
805
+ CreateJointsAttr(defaultValue, writeSparsely) → Attribute
806
+ See GetJointsAttr() , and also Create vs Get Property Methods for when
807
+ to use Get vs Create.
808
+ If specified, author defaultValue as the attribute’s default,
809
+ sparsely (when it makes sense to do so) if writeSparsely is
810
+ true - the default for writeSparsely is false .
811
+
812
+ Parameters
813
+
814
+ defaultValue (VtValue) –
815
+ writeSparsely (bool) –
816
+
817
+ CreateSkeletonRel() → Relationship
818
+ See GetSkeletonRel() , and also Create vs Get Property Methods for
819
+ when to use Get vs Create.
820
+
821
+ CreateSkinningBlendWeightPrimvar()
822
+
823
+ CreateSkinningBlendWeightsAttr(defaultValue, writeSparsely) → Attribute
824
+ See GetSkinningBlendWeightsAttr() , and also Create vs Get Property
825
+ Methods for when to use Get vs Create.
826
+ If specified, author defaultValue as the attribute’s default,
827
+ sparsely (when it makes sense to do so) if writeSparsely is
828
+ true - the default for writeSparsely is false .
829
+
830
+ Parameters
831
+
832
+ defaultValue (VtValue) –
833
+ writeSparsely (bool) –
834
+
835
+ CreateSkinningMethodAttr(defaultValue, writeSparsely) → Attribute
836
+ See GetSkinningMethodAttr() , and also Create vs Get Property Methods
837
+ for when to use Get vs Create.
838
+ If specified, author defaultValue as the attribute’s default,
839
+ sparsely (when it makes sense to do so) if writeSparsely is
840
+ true - the default for writeSparsely is false .
841
+
842
+ Parameters
843
+
844
+ defaultValue (VtValue) –
845
+ writeSparsely (bool) –
846
+
847
+ static Get()
848
+ classmethod Get(stage, path) -> BindingAPI
849
+ Return a UsdSkelBindingAPI holding the prim adhering to this schema at
850
+ path on stage .
851
+ If no prim exists at path on stage , or if the prim at that
852
+ path does not adhere to this schema, return an invalid schema object.
853
+ This is shorthand for the following:
854
+ UsdSkelBindingAPI(stage->GetPrimAtPath(path));
855
+
856
+ Parameters
857
+
858
+ stage (Stage) –
859
+ path (Path) –
860
+
861
+ GetAnimationSource(prim) → bool
862
+ Convenience method to query the animation source bound on this prim.
863
+ Returns true if an animation source binding is defined, and sets
864
+ prim to the target prim. The resulting primitive may still be
865
+ invalid, if the prim has been explicitly unbound.
866
+ This does not resolved inherited animation source bindings.
867
+
868
+ Parameters
869
+ prim (Prim) –
870
+
871
+ GetAnimationSourceRel() → Relationship
872
+ Animation source to be bound to Skeleton primitives at or beneath the
873
+ location at which this property is defined.
874
+
875
+ GetBlendShapeTargetsRel() → Relationship
876
+ Ordered list of all target blend shapes.
877
+ This property is not inherited hierarchically, and is expected to be
878
+ authored directly on the skinnable primitive to which the the blend
879
+ shapes apply.
880
+
881
+ GetBlendShapesAttr() → Attribute
882
+ An array of tokens defining the order onto which blend shape weights
883
+ from an animation source map onto the skel:blendShapeTargets rel of
884
+ a binding site.
885
+ If authored, the number of elements must be equal to the number of
886
+ targets in the blendShapeTargets rel. This property is not inherited
887
+ hierarchically, and is expected to be authored directly on the
888
+ skinnable primitive to which the blend shapes apply.
889
+ Declaration
890
+ uniform token[] skel:blendShapes
891
+ C++ Type
892
+ VtArray<TfToken>
893
+ Usd Type
894
+ SdfValueTypeNames->TokenArray
895
+ Variability
896
+ SdfVariabilityUniform
897
+
898
+ GetGeomBindTransformAttr() → Attribute
899
+ Encodes the bind-time world space transforms of the prim.
900
+ If the transform is identical for a group of gprims that share a
901
+ common ancestor, the transform may be authored on the ancestor,
902
+ to”inherit”down to all the leaf gprims. If this transform is unset, an
903
+ identity transform is used instead.
904
+ Declaration
905
+ matrix4d primvars:skel:geomBindTransform
906
+ C++ Type
907
+ GfMatrix4d
908
+ Usd Type
909
+ SdfValueTypeNames->Matrix4d
910
+
911
+ GetInheritedAnimationSource() → Prim
912
+ Returns the animation source bound at this prim, or one of its
913
+ ancestors.
914
+
915
+ GetInheritedSkeleton() → Skeleton
916
+ Returns the skeleton bound at this prim, or one of its ancestors.
917
+
918
+ GetJointIndicesAttr() → Attribute
919
+ Indices into the joints attribute of the closest (in namespace)
920
+ bound Skeleton that affect each point of a PointBased gprim.
921
+ The primvar can have either constant or vertex interpolation. This
922
+ primvar’s elementSize will determine how many joint influences apply
923
+ to each point. Indices must point be valid. Null influences should be
924
+ defined by setting values in jointWeights to zero. See UsdGeomPrimvar
925
+ for more information on interpolation and elementSize.
926
+ Declaration
927
+ int[] primvars:skel:jointIndices
928
+ C++ Type
929
+ VtArray<int>
930
+ Usd Type
931
+ SdfValueTypeNames->IntArray
932
+
933
+ GetJointIndicesPrimvar() → Primvar
934
+ Convenience function to get the jointIndices attribute as a primvar.
935
+ GetJointIndicesAttr, GetInheritedJointWeightsPrimvar
936
+
937
+ GetJointWeightsAttr() → Attribute
938
+ Weights for the joints that affect each point of a PointBased gprim.
939
+ The primvar can have either constant or vertex interpolation. This
940
+ primvar’s elementSize will determine how many joints influences
941
+ apply to each point. The length, interpolation, and elementSize of
942
+ jointWeights must match that of jointIndices. See UsdGeomPrimvar
943
+ for more information on interpolation and elementSize.
944
+ Declaration
945
+ float[] primvars:skel:jointWeights
946
+ C++ Type
947
+ VtArray<float>
948
+ Usd Type
949
+ SdfValueTypeNames->FloatArray
950
+
951
+ GetJointWeightsPrimvar() → Primvar
952
+ Convenience function to get the jointWeights attribute as a primvar.
953
+ GetJointWeightsAttr, GetInheritedJointWeightsPrimvar
954
+
955
+ GetJointsAttr() → Attribute
956
+ An (optional) array of tokens defining the list of joints to which
957
+ jointIndices apply.
958
+ If not defined, jointIndices applies to the ordered list of joints
959
+ defined in the bound Skeleton’s joints attribute. If undefined on a
960
+ primitive, the primitive inherits the value of the nearest ancestor
961
+ prim, if any.
962
+ Declaration
963
+ uniform token[] skel:joints
964
+ C++ Type
965
+ VtArray<TfToken>
966
+ Usd Type
967
+ SdfValueTypeNames->TokenArray
968
+ Variability
969
+ SdfVariabilityUniform
970
+
971
+ static GetSchemaAttributeNames()
972
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
973
+ Return a vector of names of all pre-declared attributes for this
974
+ schema class and all its ancestor classes.
975
+ Does not include attributes that may be authored by custom/extended
976
+ methods of the schemas involved.
977
+
978
+ Parameters
979
+ includeInherited (bool) –
980
+
981
+ GetSkeleton(skel) → bool
982
+ Convenience method to query the Skeleton bound on this prim.
983
+ Returns true if a Skeleton binding is defined, and sets skel to
984
+ the target skel. The resulting Skeleton may still be invalid, if the
985
+ Skeleton has been explicitly unbound.
986
+ This does not resolved inherited skeleton bindings.
987
+
988
+ Parameters
989
+ skel (Skeleton) –
990
+
991
+ GetSkeletonRel() → Relationship
992
+ Skeleton to be bound to this prim and its descendents that possess a
993
+ mapping and weighting to the joints of the identified Skeleton.
994
+
995
+ GetSkinningBlendWeightPrimvar()
996
+
997
+ GetSkinningBlendWeightsAttr() → Attribute
998
+ Weights for weighted blend skinning method.
999
+ The primvar can have either constant or vertex interpolation.
1000
+ Constant interpolation means every vertex share the same single blend
1001
+ weight. Vertex interpolation means every vertex has their own blend
1002
+ weight. The element size should match the vertices count in this case.
1003
+ C++ Type: VtArray<float> Usd Type: SdfValueTypeNames->FloatArray
1004
+ Variability: SdfVariabilityUniform Fallback Value: No Fallback
1005
+
1006
+ GetSkinningMethodAttr() → Attribute
1007
+ Different calculation method for skinning.
1008
+ LBS, DQ, and blendWeight
1009
+ C++ Type: TfToken Usd Type: SdfValueTypeNames->Token Variability:
1010
+ SdfVariabilityUniform Fallback Value: ClassicLinear Allowed Values :
1011
+ [ClassicLinear, DualQuaternion, WeightedBlend]
1012
+
1013
+ SetRigidJointInfluence(jointIndex, weight) → bool
1014
+ Convenience method for defining joints influences that make a
1015
+ primitive rigidly deformed by a single joint.
1016
+
1017
+ Parameters
1018
+
1019
+ jointIndex (int) –
1020
+ weight (float) –
1021
+
1022
+ static ValidateJointIndices()
1023
+ classmethod ValidateJointIndices(indices, numJoints, reason) -> bool
1024
+ Validate an array of joint indices.
1025
+ This ensures that all indices are the in the range [0, numJoints).
1026
+ Returns true if the indices are valid, or false otherwise. If invalid
1027
+ and reason is non-null, an error message describing the first
1028
+ validation error will be set.
1029
+
1030
+ Parameters
1031
+
1032
+ indices (TfSpan[int]) –
1033
+ numJoints (int) –
1034
+ reason (str) –
1035
+
1036
+ class pxr.UsdSkel.BlendShape
1037
+ Describes a target blend shape, possibly containing inbetween shapes.
1038
+ See the extended Blend Shape Schema documentation for information.
1039
+ Methods:
1040
+
1041
+ CreateInbetween(name)
1042
+ Author scene description to create an attribute on this prim that will be recognized as an Inbetween (i.e.
1043
+
1044
+ CreateNormalOffsetsAttr(defaultValue, ...)
1045
+ See GetNormalOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1046
+
1047
+ CreateOffsetsAttr(defaultValue, writeSparsely)
1048
+ See GetOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1049
+
1050
+ CreatePointIndicesAttr(defaultValue, ...)
1051
+ See GetPointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1052
+
1053
+ Define
1054
+ classmethod Define(stage, path) -> BlendShape
1055
+
1056
+ Get
1057
+ classmethod Get(stage, path) -> BlendShape
1058
+
1059
+ GetAuthoredInbetweens()
1060
+ Like GetInbetweens() , but exclude inbetwens that have no authored scene / description.
1061
+
1062
+ GetInbetween(name)
1063
+ Return the Inbetween corresponding to the attribute named name , which will be valid if an Inbetween attribute definition already exists.
1064
+
1065
+ GetInbetweens()
1066
+ Return valid UsdSkelInbetweenShape objects for all defined Inbetweens on this prim.
1067
+
1068
+ GetNormalOffsetsAttr()
1069
+ Required property.
1070
+
1071
+ GetOffsetsAttr()
1072
+ Required property.
1073
+
1074
+ GetPointIndicesAttr()
1075
+ Optional property.
1076
+
1077
+ GetSchemaAttributeNames
1078
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1079
+
1080
+ HasInbetween(name)
1081
+ Return true if there is a defined Inbetween named name on this prim.
1082
+
1083
+ ValidatePointIndices
1084
+ classmethod ValidatePointIndices(indices, numPoints, reason) -> bool
1085
+
1086
+ CreateInbetween(name) → InbetweenShape
1087
+ Author scene description to create an attribute on this prim that will
1088
+ be recognized as an Inbetween (i.e.
1089
+ will present as a valid UsdSkelInbetweenShape).
1090
+ The name of the created attribute or may or may not be the specified
1091
+ attrName , due to the possible need to apply property namespacing.
1092
+ Creation may fail and return an invalid Inbetwen if attrName
1093
+ contains a reserved keyword.
1094
+ an invalid UsdSkelInbetweenShape if we failed to create a valid
1095
+ attribute, a valid UsdSkelInbetweenShape otherwise. It is not an error
1096
+ to create over an existing, compatible attribute.
1097
+ UsdSkelInbetweenShape::IsInbetween()
1098
+
1099
+ Parameters
1100
+ name (str) –
1101
+
1102
+ CreateNormalOffsetsAttr(defaultValue, writeSparsely) → Attribute
1103
+ See GetNormalOffsetsAttr() , and also Create vs Get Property Methods
1104
+ for when to use Get vs Create.
1105
+ If specified, author defaultValue as the attribute’s default,
1106
+ sparsely (when it makes sense to do so) if writeSparsely is
1107
+ true - the default for writeSparsely is false .
1108
+
1109
+ Parameters
1110
+
1111
+ defaultValue (VtValue) –
1112
+ writeSparsely (bool) –
1113
+
1114
+ CreateOffsetsAttr(defaultValue, writeSparsely) → Attribute
1115
+ See GetOffsetsAttr() , and also Create vs Get Property Methods for
1116
+ when to use Get vs Create.
1117
+ If specified, author defaultValue as the attribute’s default,
1118
+ sparsely (when it makes sense to do so) if writeSparsely is
1119
+ true - the default for writeSparsely is false .
1120
+
1121
+ Parameters
1122
+
1123
+ defaultValue (VtValue) –
1124
+ writeSparsely (bool) –
1125
+
1126
+ CreatePointIndicesAttr(defaultValue, writeSparsely) → Attribute
1127
+ See GetPointIndicesAttr() , and also Create vs Get Property Methods
1128
+ for when to use Get vs Create.
1129
+ If specified, author defaultValue as the attribute’s default,
1130
+ sparsely (when it makes sense to do so) if writeSparsely is
1131
+ true - the default for writeSparsely is false .
1132
+
1133
+ Parameters
1134
+
1135
+ defaultValue (VtValue) –
1136
+ writeSparsely (bool) –
1137
+
1138
+ static Define()
1139
+ classmethod Define(stage, path) -> BlendShape
1140
+ Attempt to ensure a UsdPrim adhering to this schema at path is
1141
+ defined (according to UsdPrim::IsDefined() ) on this stage.
1142
+ If a prim adhering to this schema at path is already defined on
1143
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
1144
+ specifier == SdfSpecifierDef and this schema’s prim type name for
1145
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
1146
+ with specifier == SdfSpecifierDef and empty typeName at the
1147
+ current EditTarget for any nonexistent, or existing but not Defined
1148
+ ancestors.
1149
+ The given path must be an absolute prim path that does not contain
1150
+ any variant selections.
1151
+ If it is impossible to author any of the necessary PrimSpecs, (for
1152
+ example, in case path cannot map to the current UsdEditTarget ‘s
1153
+ namespace) issue an error and return an invalid UsdPrim.
1154
+ Note that this method may return a defined prim whose typeName does
1155
+ not specify this schema class, in case a stronger typeName opinion
1156
+ overrides the opinion at the current EditTarget.
1157
+
1158
+ Parameters
1159
+
1160
+ stage (Stage) –
1161
+ path (Path) –
1162
+
1163
+ static Get()
1164
+ classmethod Get(stage, path) -> BlendShape
1165
+ Return a UsdSkelBlendShape holding the prim adhering to this schema at
1166
+ path on stage .
1167
+ If no prim exists at path on stage , or if the prim at that
1168
+ path does not adhere to this schema, return an invalid schema object.
1169
+ This is shorthand for the following:
1170
+ UsdSkelBlendShape(stage->GetPrimAtPath(path));
1171
+
1172
+ Parameters
1173
+
1174
+ stage (Stage) –
1175
+ path (Path) –
1176
+
1177
+ GetAuthoredInbetweens() → list[InbetweenShape]
1178
+ Like GetInbetweens() , but exclude inbetwens that have no authored
1179
+ scene / description.
1180
+
1181
+ GetInbetween(name) → InbetweenShape
1182
+ Return the Inbetween corresponding to the attribute named name ,
1183
+ which will be valid if an Inbetween attribute definition already
1184
+ exists.
1185
+ Name lookup will account for Inbetween namespacing, which means that
1186
+ this method will succeed in some cases where UsdSkelInbetweenShape
1187
+ (prim->GetAttribute(name)) will not, unless name has the proper
1188
+ namespace prefix.
1189
+ HasInbetween()
1190
+
1191
+ Parameters
1192
+ name (str) –
1193
+
1194
+ GetInbetweens() → list[InbetweenShape]
1195
+ Return valid UsdSkelInbetweenShape objects for all defined Inbetweens
1196
+ on this prim.
1197
+
1198
+ GetNormalOffsetsAttr() → Attribute
1199
+ Required property.
1200
+ Normal offsets which, when added to the base pose, provides the
1201
+ normals of the target shape.
1202
+ Declaration
1203
+ uniform vector3f[] normalOffsets
1204
+ C++ Type
1205
+ VtArray<GfVec3f>
1206
+ Usd Type
1207
+ SdfValueTypeNames->Vector3fArray
1208
+ Variability
1209
+ SdfVariabilityUniform
1210
+
1211
+ GetOffsetsAttr() → Attribute
1212
+ Required property.
1213
+ Position offsets which, when added to the base pose, provides the
1214
+ target shape.
1215
+ Declaration
1216
+ uniform vector3f[] offsets
1217
+ C++ Type
1218
+ VtArray<GfVec3f>
1219
+ Usd Type
1220
+ SdfValueTypeNames->Vector3fArray
1221
+ Variability
1222
+ SdfVariabilityUniform
1223
+
1224
+ GetPointIndicesAttr() → Attribute
1225
+ Optional property.
1226
+ Indices into the original mesh that correspond to the values in
1227
+ offsets and of any inbetween shapes. If authored, the number of
1228
+ elements must be equal to the number of elements in the offsets
1229
+ array.
1230
+ Declaration
1231
+ uniform int[] pointIndices
1232
+ C++ Type
1233
+ VtArray<int>
1234
+ Usd Type
1235
+ SdfValueTypeNames->IntArray
1236
+ Variability
1237
+ SdfVariabilityUniform
1238
+
1239
+ static GetSchemaAttributeNames()
1240
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1241
+ Return a vector of names of all pre-declared attributes for this
1242
+ schema class and all its ancestor classes.
1243
+ Does not include attributes that may be authored by custom/extended
1244
+ methods of the schemas involved.
1245
+
1246
+ Parameters
1247
+ includeInherited (bool) –
1248
+
1249
+ HasInbetween(name) → bool
1250
+ Return true if there is a defined Inbetween named name on this
1251
+ prim.
1252
+ Name lookup will account for Inbetween namespacing.
1253
+ GetInbetween()
1254
+
1255
+ Parameters
1256
+ name (str) –
1257
+
1258
+ static ValidatePointIndices()
1259
+ classmethod ValidatePointIndices(indices, numPoints, reason) -> bool
1260
+ Validates a set of point indices for a given point count.
1261
+ This ensures that all point indices are in the range [0, numPoints).
1262
+ Returns true if the indices are valid, or false otherwise. If invalid
1263
+ and reason is non-null, an error message describing the first
1264
+ validation error will be set.
1265
+
1266
+ Parameters
1267
+
1268
+ indices (TfSpan[int]) –
1269
+ numPoints (int) –
1270
+ reason (str) –
1271
+
1272
+ class pxr.UsdSkel.BlendShapeQuery
1273
+ Helper class used to resolve blend shape weights, including
1274
+ inbetweens.
1275
+ Methods:
1276
+
1277
+ ComputeBlendShapePointIndices()
1278
+ Compute an array holding the point indices of all shapes.
1279
+
1280
+ ComputeDeformedPoints(subShapeWeights, ...)
1281
+ Deform points using the resolved sub-shapes given by subShapeWeights , blendShapeIndices and subShapeIndices .
1282
+
1283
+ ComputeSubShapePointOffsets()
1284
+ Compute an array holding the point offsets of all sub-shapes.
1285
+
1286
+ ComputeSubShapeWeights(weights, ...)
1287
+ Compute the resolved weights for all sub-shapes bound to this prim.
1288
+
1289
+ GetBlendShape(blendShapeIndex)
1290
+ Returns the blend shape corresponding to blendShapeIndex .
1291
+
1292
+ GetBlendShapeIndex(subShapeIndex)
1293
+ Returns the blend shape index corresponding to the i'th sub-shape.
1294
+
1295
+ GetInbetween(subShapeIndex)
1296
+ Returns the inbetween shape corresponding to sub-shape i , if any.
1297
+
1298
+ GetNumBlendShapes()
1299
+
1300
+ GetNumSubShapes()
1301
+
1302
+ ComputeBlendShapePointIndices() → list[IntArray]
1303
+ Compute an array holding the point indices of all shapes.
1304
+ This is indexed by the blendShapeIndices returned by
1305
+ ComputeSubShapes(). Since the pointIndices property of blend shapes
1306
+ is optional, some of the arrays may be empty.
1307
+
1308
+ ComputeDeformedPoints(subShapeWeights, blendShapeIndices, subShapeIndices, blendShapePointIndices, subShapePointOffsets, points) → bool
1309
+ Deform points using the resolved sub-shapes given by
1310
+ subShapeWeights , blendShapeIndices and subShapeIndices .
1311
+ The blendShapePointIndices and blendShapePointOffsets arrays
1312
+ both provide the pre-computed point offsets and indices of each sub-
1313
+ shape, as computed by ComputeBlendShapePointIndices() and
1314
+ ComputeSubShapePointOffsets() .
1315
+
1316
+ Parameters
1317
+
1318
+ subShapeWeights (TfSpan[float]) –
1319
+ blendShapeIndices (TfSpan[unsigned]) –
1320
+ subShapeIndices (TfSpan[unsigned]) –
1321
+ blendShapePointIndices (list[IntArray]) –
1322
+ subShapePointOffsets (list[Vec3fArray]) –
1323
+ points (TfSpan[Vec3f]) –
1324
+
1325
+ ComputeSubShapePointOffsets() → list[Vec3fArray]
1326
+ Compute an array holding the point offsets of all sub-shapes.
1327
+ This includes offsets of both primary shapes those stored directly on
1328
+ a BlendShape primitive as well as those of inbetween shapes. This is
1329
+ indexed by the subShapeIndices returned by ComputeSubShapeWeights()
1330
+ .
1331
+
1332
+ ComputeSubShapeWeights(weights, subShapeWeights, blendShapeIndices, subShapeIndices) → bool
1333
+ Compute the resolved weights for all sub-shapes bound to this prim.
1334
+ The weights values are initial weight values, ordered according to
1335
+ the skel:blendShapeTargets relationship of the prim this query is
1336
+ associated with. If there are any inbetween shapes, a new set of
1337
+ weights is computed, providing weighting of the relevant inbetweens.
1338
+ All computed arrays shared the same size. Elements of the same index
1339
+ identify which sub-shape of which blend shape a given weight value is
1340
+ mapped to.
1341
+
1342
+ Parameters
1343
+
1344
+ weights (TfSpan[float]) –
1345
+ subShapeWeights (FloatArray) –
1346
+ blendShapeIndices (UIntArray) –
1347
+ subShapeIndices (UIntArray) –
1348
+
1349
+ GetBlendShape(blendShapeIndex) → BlendShape
1350
+ Returns the blend shape corresponding to blendShapeIndex .
1351
+
1352
+ Parameters
1353
+ blendShapeIndex (int) –
1354
+
1355
+ GetBlendShapeIndex(subShapeIndex) → int
1356
+ Returns the blend shape index corresponding to the i'th sub-shape.
1357
+
1358
+ Parameters
1359
+ subShapeIndex (int) –
1360
+
1361
+ GetInbetween(subShapeIndex) → InbetweenShape
1362
+ Returns the inbetween shape corresponding to sub-shape i , if any.
1363
+
1364
+ Parameters
1365
+ subShapeIndex (int) –
1366
+
1367
+ GetNumBlendShapes() → int
1368
+
1369
+ GetNumSubShapes() → int
1370
+
1371
+ class pxr.UsdSkel.Cache
1372
+ Thread-safe cache for accessing query objects for evaluating skeletal
1373
+ data.
1374
+ This provides caching of major structural components, such as skeletal
1375
+ topology. In a streaming context, this cache is intended to persist.
1376
+ Methods:
1377
+
1378
+ Clear()
1379
+
1380
+ ComputeSkelBinding(skelRoot, skel, binding, ...)
1381
+ Compute the bindings corresponding to a single skeleton, bound beneath skelRoot , as discovered through a traversal using predicate .
1382
+
1383
+ ComputeSkelBindings(skelRoot, bindings, ...)
1384
+ Compute the set of skeleton bindings beneath skelRoot , as discovered through a traversal using predicate .
1385
+
1386
+ GetAnimQuery(anim)
1387
+ Get an anim query corresponding to anim .
1388
+
1389
+ GetSkelQuery(skel)
1390
+ Get a skel query for computing properties of skel .
1391
+
1392
+ GetSkinningQuery(prim)
1393
+ Get a skinning query at prim .
1394
+
1395
+ Populate(root, predicate)
1396
+ Populate the cache for the skeletal data beneath prim root , as traversed using predicate .
1397
+
1398
+ Clear() → None
1399
+
1400
+ ComputeSkelBinding(skelRoot, skel, binding, predicate) → bool
1401
+ Compute the bindings corresponding to a single skeleton, bound beneath
1402
+ skelRoot , as discovered through a traversal using predicate .
1403
+ Skinnable prims are only discoverable by this method if Populate() has
1404
+ already been called for skelRoot , with an equivalent predicate.
1405
+
1406
+ Parameters
1407
+
1408
+ skelRoot (Root) –
1409
+ skel (Skeleton) –
1410
+ binding (Binding) –
1411
+ predicate (_PrimFlagsPredicate) –
1412
+
1413
+ ComputeSkelBindings(skelRoot, bindings, predicate) → bool
1414
+ Compute the set of skeleton bindings beneath skelRoot , as
1415
+ discovered through a traversal using predicate .
1416
+ Skinnable prims are only discoverable by this method if Populate() has
1417
+ already been called for skelRoot , with an equivalent predicate.
1418
+
1419
+ Parameters
1420
+
1421
+ skelRoot (Root) –
1422
+ bindings (list[Binding]) –
1423
+ predicate (_PrimFlagsPredicate) –
1424
+
1425
+ GetAnimQuery(anim) → AnimQuery
1426
+ Get an anim query corresponding to anim .
1427
+ This does not require Populate() to be called on the cache.
1428
+
1429
+ Parameters
1430
+ anim (Animation) –
1431
+
1432
+ GetAnimQuery(prim) -> AnimQuery
1433
+ This is an overloaded member function, provided for convenience. It
1434
+ differs from the above function only in what argument(s) it accepts.
1435
+ Deprecated
1436
+
1437
+ Parameters
1438
+ prim (Prim) –
1439
+
1440
+ GetSkelQuery(skel) → SkeletonQuery
1441
+ Get a skel query for computing properties of skel .
1442
+ This does not require Populate() to be called on the cache.
1443
+
1444
+ Parameters
1445
+ skel (Skeleton) –
1446
+
1447
+ GetSkinningQuery(prim) → SkinningQuery
1448
+ Get a skinning query at prim .
1449
+ Skinning queries are defined at any skinnable prims (I.e., boundable
1450
+ prims with fully defined joint influences).
1451
+ The caller must first Populate() the cache with the skel root
1452
+ containing prim , with a predicate that will visit prim , in
1453
+ order for a skinning query to be discoverable.
1454
+
1455
+ Parameters
1456
+ prim (Prim) –
1457
+
1458
+ Populate(root, predicate) → bool
1459
+ Populate the cache for the skeletal data beneath prim root , as
1460
+ traversed using predicate .
1461
+ Population resolves inherited skel bindings set using the
1462
+ UsdSkelBindingAPI, making resolved bindings available through
1463
+ GetSkinningQuery() , ComputeSkelBdining() and ComputeSkelBindings() .
1464
+
1465
+ Parameters
1466
+
1467
+ root (Root) –
1468
+ predicate (_PrimFlagsPredicate) –
1469
+
1470
+ class pxr.UsdSkel.InbetweenShape
1471
+ Schema wrapper for UsdAttribute for authoring and introspecting
1472
+ attributes that serve as inbetween shapes of a UsdSkelBlendShape.
1473
+ Inbetween shapes allow an explicit shape to be specified when the
1474
+ blendshape to which it’s bound is evaluated at a certain weight. For
1475
+ example, rather than performing piecewise linear interpolation between
1476
+ a primary shape and the rest shape at weight 0.5, an inbetween shape
1477
+ could be defined at the weight. For weight values greater than 0.5, a
1478
+ shape would then be resolved by linearly interpolating between the
1479
+ inbetween shape and the primary shape, while for weight values less
1480
+ than or equal to 0.5, the shape is resolved by linearly interpolating
1481
+ between the inbetween shape and the primary shape.
1482
+ Methods:
1483
+
1484
+ CreateNormalOffsetsAttr(defaultValue)
1485
+ Returns the existing normal offsets attribute if the shape has normal offsets, or creates a new one.
1486
+
1487
+ GetAttr()
1488
+ Explicit UsdAttribute extractor.
1489
+
1490
+ GetNormalOffsets(offsets)
1491
+ Get the normal offsets authored for this shape.
1492
+
1493
+ GetNormalOffsetsAttr()
1494
+ Returns a valid normal offsets attribute if the shape has normal offsets.
1495
+
1496
+ GetOffsets(offsets)
1497
+ Get the point offsets corresponding to this shape.
1498
+
1499
+ GetWeight(weight)
1500
+ Return the location at which the shape is applied.
1501
+
1502
+ HasAuthoredWeight()
1503
+ Has a weight value been explicitly authored on this shape?
1504
+
1505
+ IsDefined()
1506
+ Return true if the wrapped UsdAttribute::IsDefined() , and in addition the attribute is identified as an Inbetween.
1507
+
1508
+ IsInbetween
1509
+ classmethod IsInbetween(attr) -> bool
1510
+
1511
+ SetNormalOffsets(offsets)
1512
+ Set the normal offsets authored for this shape.
1513
+
1514
+ SetOffsets(offsets)
1515
+ Set the point offsets corresponding to this shape.
1516
+
1517
+ SetWeight(weight)
1518
+ Set the location at which the shape is applied.
1519
+
1520
+ CreateNormalOffsetsAttr(defaultValue) → Attribute
1521
+ Returns the existing normal offsets attribute if the shape has normal
1522
+ offsets, or creates a new one.
1523
+
1524
+ Parameters
1525
+ defaultValue (VtValue) –
1526
+
1527
+ GetAttr() → Attribute
1528
+ Explicit UsdAttribute extractor.
1529
+
1530
+ GetNormalOffsets(offsets) → bool
1531
+ Get the normal offsets authored for this shape.
1532
+ Normal offsets are optional, and may be left unspecified.
1533
+
1534
+ Parameters
1535
+ offsets (Vec3fArray) –
1536
+
1537
+ GetNormalOffsetsAttr() → Attribute
1538
+ Returns a valid normal offsets attribute if the shape has normal
1539
+ offsets.
1540
+ Returns an invalid attribute otherwise.
1541
+
1542
+ GetOffsets(offsets) → bool
1543
+ Get the point offsets corresponding to this shape.
1544
+
1545
+ Parameters
1546
+ offsets (Vec3fArray) –
1547
+
1548
+ GetWeight(weight) → bool
1549
+ Return the location at which the shape is applied.
1550
+
1551
+ Parameters
1552
+ weight (float) –
1553
+
1554
+ HasAuthoredWeight() → bool
1555
+ Has a weight value been explicitly authored on this shape?
1556
+ GetWeight()
1557
+
1558
+ IsDefined() → bool
1559
+ Return true if the wrapped UsdAttribute::IsDefined() , and in addition
1560
+ the attribute is identified as an Inbetween.
1561
+
1562
+ static IsInbetween()
1563
+ classmethod IsInbetween(attr) -> bool
1564
+ Test whether a given UsdAttribute represents a valid Inbetween, which
1565
+ implies that creating a UsdSkelInbetweenShape from the attribute will
1566
+ succeed.
1567
+ Succes implies that attr.IsDefined() is true.
1568
+
1569
+ Parameters
1570
+ attr (Attribute) –
1571
+
1572
+ SetNormalOffsets(offsets) → bool
1573
+ Set the normal offsets authored for this shape.
1574
+
1575
+ Parameters
1576
+ offsets (Vec3fArray) –
1577
+
1578
+ SetOffsets(offsets) → bool
1579
+ Set the point offsets corresponding to this shape.
1580
+
1581
+ Parameters
1582
+ offsets (Vec3fArray) –
1583
+
1584
+ SetWeight(weight) → bool
1585
+ Set the location at which the shape is applied.
1586
+
1587
+ Parameters
1588
+ weight (float) –
1589
+
1590
+ class pxr.UsdSkel.PackedJointAnimation
1591
+ Deprecated. Please use SkelAnimation instead.
1592
+ Methods:
1593
+
1594
+ Define
1595
+ classmethod Define(stage, path) -> PackedJointAnimation
1596
+
1597
+ Get
1598
+ classmethod Get(stage, path) -> PackedJointAnimation
1599
+
1600
+ GetSchemaAttributeNames
1601
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1602
+
1603
+ static Define()
1604
+ classmethod Define(stage, path) -> PackedJointAnimation
1605
+ Attempt to ensure a UsdPrim adhering to this schema at path is
1606
+ defined (according to UsdPrim::IsDefined() ) on this stage.
1607
+ If a prim adhering to this schema at path is already defined on
1608
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
1609
+ specifier == SdfSpecifierDef and this schema’s prim type name for
1610
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
1611
+ with specifier == SdfSpecifierDef and empty typeName at the
1612
+ current EditTarget for any nonexistent, or existing but not Defined
1613
+ ancestors.
1614
+ The given path must be an absolute prim path that does not contain
1615
+ any variant selections.
1616
+ If it is impossible to author any of the necessary PrimSpecs, (for
1617
+ example, in case path cannot map to the current UsdEditTarget ‘s
1618
+ namespace) issue an error and return an invalid UsdPrim.
1619
+ Note that this method may return a defined prim whose typeName does
1620
+ not specify this schema class, in case a stronger typeName opinion
1621
+ overrides the opinion at the current EditTarget.
1622
+
1623
+ Parameters
1624
+
1625
+ stage (Stage) –
1626
+ path (Path) –
1627
+
1628
+ static Get()
1629
+ classmethod Get(stage, path) -> PackedJointAnimation
1630
+ Return a UsdSkelPackedJointAnimation holding the prim adhering to this
1631
+ schema at path on stage .
1632
+ If no prim exists at path on stage , or if the prim at that
1633
+ path does not adhere to this schema, return an invalid schema object.
1634
+ This is shorthand for the following:
1635
+ UsdSkelPackedJointAnimation(stage->GetPrimAtPath(path));
1636
+
1637
+ Parameters
1638
+
1639
+ stage (Stage) –
1640
+ path (Path) –
1641
+
1642
+ static GetSchemaAttributeNames()
1643
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1644
+ Return a vector of names of all pre-declared attributes for this
1645
+ schema class and all its ancestor classes.
1646
+ Does not include attributes that may be authored by custom/extended
1647
+ methods of the schemas involved.
1648
+
1649
+ Parameters
1650
+ includeInherited (bool) –
1651
+
1652
+ class pxr.UsdSkel.Root
1653
+ Boundable prim type used to identify a scope beneath which skeletally-
1654
+ posed primitives are defined.
1655
+ A SkelRoot must be defined at or above a skinned primitive for any
1656
+ skinning behaviors in UsdSkel.
1657
+ See the extended Skel Root Schema documentation for more information.
1658
+ Methods:
1659
+
1660
+ Define
1661
+ classmethod Define(stage, path) -> Root
1662
+
1663
+ Find
1664
+ classmethod Find(prim) -> Root
1665
+
1666
+ Get
1667
+ classmethod Get(stage, path) -> Root
1668
+
1669
+ GetSchemaAttributeNames
1670
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1671
+
1672
+ static Define()
1673
+ classmethod Define(stage, path) -> Root
1674
+ Attempt to ensure a UsdPrim adhering to this schema at path is
1675
+ defined (according to UsdPrim::IsDefined() ) on this stage.
1676
+ If a prim adhering to this schema at path is already defined on
1677
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
1678
+ specifier == SdfSpecifierDef and this schema’s prim type name for
1679
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
1680
+ with specifier == SdfSpecifierDef and empty typeName at the
1681
+ current EditTarget for any nonexistent, or existing but not Defined
1682
+ ancestors.
1683
+ The given path must be an absolute prim path that does not contain
1684
+ any variant selections.
1685
+ If it is impossible to author any of the necessary PrimSpecs, (for
1686
+ example, in case path cannot map to the current UsdEditTarget ‘s
1687
+ namespace) issue an error and return an invalid UsdPrim.
1688
+ Note that this method may return a defined prim whose typeName does
1689
+ not specify this schema class, in case a stronger typeName opinion
1690
+ overrides the opinion at the current EditTarget.
1691
+
1692
+ Parameters
1693
+
1694
+ stage (Stage) –
1695
+ path (Path) –
1696
+
1697
+ static Find()
1698
+ classmethod Find(prim) -> Root
1699
+ Returns the skel root at or above prim , or an invalid schema
1700
+ object if no ancestor prim is defined as a skel root.
1701
+
1702
+ Parameters
1703
+ prim (Prim) –
1704
+
1705
+ static Get()
1706
+ classmethod Get(stage, path) -> Root
1707
+ Return a UsdSkelRoot holding the prim adhering to this schema at
1708
+ path on stage .
1709
+ If no prim exists at path on stage , or if the prim at that
1710
+ path does not adhere to this schema, return an invalid schema object.
1711
+ This is shorthand for the following:
1712
+ UsdSkelRoot(stage->GetPrimAtPath(path));
1713
+
1714
+ Parameters
1715
+
1716
+ stage (Stage) –
1717
+ path (Path) –
1718
+
1719
+ static GetSchemaAttributeNames()
1720
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1721
+ Return a vector of names of all pre-declared attributes for this
1722
+ schema class and all its ancestor classes.
1723
+ Does not include attributes that may be authored by custom/extended
1724
+ methods of the schemas involved.
1725
+
1726
+ Parameters
1727
+ includeInherited (bool) –
1728
+
1729
+ class pxr.UsdSkel.Skeleton
1730
+ Describes a skeleton.
1731
+ See the extended Skeleton Schema documentation for more information.
1732
+ Methods:
1733
+
1734
+ CreateBindTransformsAttr(defaultValue, ...)
1735
+ See GetBindTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1736
+
1737
+ CreateJointNamesAttr(defaultValue, writeSparsely)
1738
+ See GetJointNamesAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1739
+
1740
+ CreateJointsAttr(defaultValue, writeSparsely)
1741
+ See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1742
+
1743
+ CreateRestTransformsAttr(defaultValue, ...)
1744
+ See GetRestTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
1745
+
1746
+ Define
1747
+ classmethod Define(stage, path) -> Skeleton
1748
+
1749
+ Get
1750
+ classmethod Get(stage, path) -> Skeleton
1751
+
1752
+ GetBindTransformsAttr()
1753
+ Specifies the bind-pose transforms of each joint in world space, in the ordering imposed by joints.
1754
+
1755
+ GetJointNamesAttr()
1756
+ If authored, provides a unique name per joint.
1757
+
1758
+ GetJointsAttr()
1759
+ An array of path tokens identifying the set of joints that make up the skeleton, and their order.
1760
+
1761
+ GetRestTransformsAttr()
1762
+ Specifies the rest-pose transforms of each joint in local space, in the ordering imposed by joints.
1763
+
1764
+ GetSchemaAttributeNames
1765
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1766
+
1767
+ CreateBindTransformsAttr(defaultValue, writeSparsely) → Attribute
1768
+ See GetBindTransformsAttr() , and also Create vs Get Property Methods
1769
+ for when to use Get vs Create.
1770
+ If specified, author defaultValue as the attribute’s default,
1771
+ sparsely (when it makes sense to do so) if writeSparsely is
1772
+ true - the default for writeSparsely is false .
1773
+
1774
+ Parameters
1775
+
1776
+ defaultValue (VtValue) –
1777
+ writeSparsely (bool) –
1778
+
1779
+ CreateJointNamesAttr(defaultValue, writeSparsely) → Attribute
1780
+ See GetJointNamesAttr() , and also Create vs Get Property Methods for
1781
+ when to use Get vs Create.
1782
+ If specified, author defaultValue as the attribute’s default,
1783
+ sparsely (when it makes sense to do so) if writeSparsely is
1784
+ true - the default for writeSparsely is false .
1785
+
1786
+ Parameters
1787
+
1788
+ defaultValue (VtValue) –
1789
+ writeSparsely (bool) –
1790
+
1791
+ CreateJointsAttr(defaultValue, writeSparsely) → Attribute
1792
+ See GetJointsAttr() , and also Create vs Get Property Methods for when
1793
+ to use Get vs Create.
1794
+ If specified, author defaultValue as the attribute’s default,
1795
+ sparsely (when it makes sense to do so) if writeSparsely is
1796
+ true - the default for writeSparsely is false .
1797
+
1798
+ Parameters
1799
+
1800
+ defaultValue (VtValue) –
1801
+ writeSparsely (bool) –
1802
+
1803
+ CreateRestTransformsAttr(defaultValue, writeSparsely) → Attribute
1804
+ See GetRestTransformsAttr() , and also Create vs Get Property Methods
1805
+ for when to use Get vs Create.
1806
+ If specified, author defaultValue as the attribute’s default,
1807
+ sparsely (when it makes sense to do so) if writeSparsely is
1808
+ true - the default for writeSparsely is false .
1809
+
1810
+ Parameters
1811
+
1812
+ defaultValue (VtValue) –
1813
+ writeSparsely (bool) –
1814
+
1815
+ static Define()
1816
+ classmethod Define(stage, path) -> Skeleton
1817
+ Attempt to ensure a UsdPrim adhering to this schema at path is
1818
+ defined (according to UsdPrim::IsDefined() ) on this stage.
1819
+ If a prim adhering to this schema at path is already defined on
1820
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
1821
+ specifier == SdfSpecifierDef and this schema’s prim type name for
1822
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
1823
+ with specifier == SdfSpecifierDef and empty typeName at the
1824
+ current EditTarget for any nonexistent, or existing but not Defined
1825
+ ancestors.
1826
+ The given path must be an absolute prim path that does not contain
1827
+ any variant selections.
1828
+ If it is impossible to author any of the necessary PrimSpecs, (for
1829
+ example, in case path cannot map to the current UsdEditTarget ‘s
1830
+ namespace) issue an error and return an invalid UsdPrim.
1831
+ Note that this method may return a defined prim whose typeName does
1832
+ not specify this schema class, in case a stronger typeName opinion
1833
+ overrides the opinion at the current EditTarget.
1834
+
1835
+ Parameters
1836
+
1837
+ stage (Stage) –
1838
+ path (Path) –
1839
+
1840
+ static Get()
1841
+ classmethod Get(stage, path) -> Skeleton
1842
+ Return a UsdSkelSkeleton holding the prim adhering to this schema at
1843
+ path on stage .
1844
+ If no prim exists at path on stage , or if the prim at that
1845
+ path does not adhere to this schema, return an invalid schema object.
1846
+ This is shorthand for the following:
1847
+ UsdSkelSkeleton(stage->GetPrimAtPath(path));
1848
+
1849
+ Parameters
1850
+
1851
+ stage (Stage) –
1852
+ path (Path) –
1853
+
1854
+ GetBindTransformsAttr() → Attribute
1855
+ Specifies the bind-pose transforms of each joint in world space,
1856
+ in the ordering imposed by joints.
1857
+ Declaration
1858
+ uniform matrix4d[] bindTransforms
1859
+ C++ Type
1860
+ VtArray<GfMatrix4d>
1861
+ Usd Type
1862
+ SdfValueTypeNames->Matrix4dArray
1863
+ Variability
1864
+ SdfVariabilityUniform
1865
+
1866
+ GetJointNamesAttr() → Attribute
1867
+ If authored, provides a unique name per joint.
1868
+ This may be optionally set to provide better names when translating to
1869
+ DCC apps that require unique joint names.
1870
+ Declaration
1871
+ uniform token[] jointNames
1872
+ C++ Type
1873
+ VtArray<TfToken>
1874
+ Usd Type
1875
+ SdfValueTypeNames->TokenArray
1876
+ Variability
1877
+ SdfVariabilityUniform
1878
+
1879
+ GetJointsAttr() → Attribute
1880
+ An array of path tokens identifying the set of joints that make up the
1881
+ skeleton, and their order.
1882
+ Each token in the array must be valid when parsed as an SdfPath. The
1883
+ parent-child relationships of the corresponding paths determine the
1884
+ parent-child relationships of each joint. It is not required that the
1885
+ name at the end of each path be unique, but rather only that the paths
1886
+ themselves be unique.
1887
+ Declaration
1888
+ uniform token[] joints
1889
+ C++ Type
1890
+ VtArray<TfToken>
1891
+ Usd Type
1892
+ SdfValueTypeNames->TokenArray
1893
+ Variability
1894
+ SdfVariabilityUniform
1895
+
1896
+ GetRestTransformsAttr() → Attribute
1897
+ Specifies the rest-pose transforms of each joint in local space,
1898
+ in the ordering imposed by joints.
1899
+ This provides fallback values for joint transforms when a Skeleton
1900
+ either has no bound animation source, or when that animation source
1901
+ only contains animation for a subset of a Skeleton’s joints.
1902
+ Declaration
1903
+ uniform matrix4d[] restTransforms
1904
+ C++ Type
1905
+ VtArray<GfMatrix4d>
1906
+ Usd Type
1907
+ SdfValueTypeNames->Matrix4dArray
1908
+ Variability
1909
+ SdfVariabilityUniform
1910
+
1911
+ static GetSchemaAttributeNames()
1912
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
1913
+ Return a vector of names of all pre-declared attributes for this
1914
+ schema class and all its ancestor classes.
1915
+ Does not include attributes that may be authored by custom/extended
1916
+ methods of the schemas involved.
1917
+
1918
+ Parameters
1919
+ includeInherited (bool) –
1920
+
1921
+ class pxr.UsdSkel.SkeletonQuery
1922
+ Primary interface to reading bound skeleton data. This is used to
1923
+ query properties such as resolved transforms and animation bindings,
1924
+ as bound through the UsdSkelBindingAPI.
1925
+ A UsdSkelSkeletonQuery can not be constructed directly, and instead
1926
+ must be constructed through a UsdSkelCache instance. This is done as
1927
+ follows:
1928
+ // Global cache, intended to persist.
1929
+ UsdSkelCache skelCache;
1930
+ // Populate the cache for a skel root.
1931
+ skelCache.Populate(UsdSkelRoot(skelRootPrim));
1932
+
1933
+ if (UsdSkelSkeletonQuery skelQuery = skelCache.GetSkelQuery(skelPrim)) {
1934
+ \.\.\.
1935
+ }
1936
+
1937
+ Methods:
1938
+
1939
+ ComputeJointLocalTransforms(xforms, time, atRest)
1940
+ Compute joint transforms in joint-local space, at time .
1941
+
1942
+ ComputeJointRestRelativeTransforms(xforms, time)
1943
+ Compute joint transforms which, when concatenated against the rest pose, produce joint transforms in joint-local space.
1944
+
1945
+ ComputeJointSkelTransforms(xforms, time, atRest)
1946
+ Compute joint transforms in skeleton space, at time .
1947
+
1948
+ ComputeJointWorldTransforms(xforms, xfCache, ...)
1949
+ Compute joint transforms in world space, at whatever time is configured on xfCache .
1950
+
1951
+ ComputeSkinningTransforms(xforms, time)
1952
+ Compute transforms representing the change in transformation of a joint from its rest pose, in skeleton space.
1953
+
1954
+ GetAnimQuery()
1955
+ Returns the animation query that provides animation for the bound skeleton instance, if any.
1956
+
1957
+ GetJointOrder()
1958
+ Returns an array of joint paths, given as tokens, describing the order and parent-child relationships of joints in the skeleton.
1959
+
1960
+ GetJointWorldBindTransforms(xforms)
1961
+ Returns the world space joint transforms at bind time.
1962
+
1963
+ GetMapper()
1964
+ Returns a mapper for remapping from the bound animation, if any, to the Skeleton.
1965
+
1966
+ GetPrim()
1967
+ Returns the underlying Skeleton primitive corresponding to the bound skeleton instance, if any.
1968
+
1969
+ GetSkeleton()
1970
+ Returns the bound skeleton instance, if any.
1971
+
1972
+ GetTopology()
1973
+ Returns the topology of the bound skeleton instance, if any.
1974
+
1975
+ HasBindPose()
1976
+ Returns true if the size of the array returned by skeleton::GetBindTransformsAttr() matches the number of joints in the skeleton.
1977
+
1978
+ HasRestPose()
1979
+ Returns true if the size of the array returned by skeleton::GetRestTransformsAttr() matches the number of joints in the skeleton.
1980
+
1981
+ ComputeJointLocalTransforms(xforms, time, atRest) → bool
1982
+ Compute joint transforms in joint-local space, at time .
1983
+ This returns transforms in joint order of the skeleton. If atRest
1984
+ is false and an animation source is bound, local transforms defined by
1985
+ the animation are mapped into the skeleton’s joint order. Any
1986
+ transforms not defined by the animation source use the transforms from
1987
+ the rest pose as a fallback value. If valid transforms cannot be
1988
+ computed for the animation source, the xforms are instead set to
1989
+ the rest transforms.
1990
+
1991
+ Parameters
1992
+
1993
+ xforms (VtArray[Matrix4]) –
1994
+ time (TimeCode) –
1995
+ atRest (bool) –
1996
+
1997
+ ComputeJointRestRelativeTransforms(xforms, time) → bool
1998
+ Compute joint transforms which, when concatenated against the rest
1999
+ pose, produce joint transforms in joint-local space.
2000
+ More specifically, this computes restRelativeTransform in:
2001
+ restRelativeTransform \* restTransform = jointLocalTransform
2002
+
2003
+ Parameters
2004
+
2005
+ xforms (VtArray[Matrix4]) –
2006
+ time (TimeCode) –
2007
+
2008
+ ComputeJointSkelTransforms(xforms, time, atRest) → bool
2009
+ Compute joint transforms in skeleton space, at time .
2010
+ This concatenates joint transforms as computed from
2011
+ ComputeJointLocalTransforms() . If atRest is true, any bound
2012
+ animation source is ignored, and transforms are computed from the rest
2013
+ pose. The skeleton-space transforms of the rest pose are cached
2014
+ internally.
2015
+
2016
+ Parameters
2017
+
2018
+ xforms (VtArray[Matrix4]) –
2019
+ time (TimeCode) –
2020
+ atRest (bool) –
2021
+
2022
+ ComputeJointWorldTransforms(xforms, xfCache, atRest) → bool
2023
+ Compute joint transforms in world space, at whatever time is
2024
+ configured on xfCache .
2025
+ This is equivalent to computing skel-space joint transforms with
2026
+ CmoputeJointSkelTransforms(), and then concatenating all transforms by
2027
+ the local-to-world transform of the Skeleton prim. If atRest is
2028
+ true, any bound animation source is ignored, and transforms are
2029
+ computed from the rest pose.
2030
+
2031
+ Parameters
2032
+
2033
+ xforms (VtArray[Matrix4]) –
2034
+ xfCache (XformCache) –
2035
+ atRest (bool) –
2036
+
2037
+ ComputeSkinningTransforms(xforms, time) → bool
2038
+ Compute transforms representing the change in transformation of a
2039
+ joint from its rest pose, in skeleton space.
2040
+ I.e.,
2041
+ inverse(bindTransform)\*jointTransform
2042
+
2043
+ These are the transforms usually required for skinning.
2044
+
2045
+ Parameters
2046
+
2047
+ xforms (VtArray[Matrix4]) –
2048
+ time (TimeCode) –
2049
+
2050
+ GetAnimQuery() → AnimQuery
2051
+ Returns the animation query that provides animation for the bound
2052
+ skeleton instance, if any.
2053
+
2054
+ GetJointOrder() → TokenArray
2055
+ Returns an array of joint paths, given as tokens, describing the order
2056
+ and parent-child relationships of joints in the skeleton.
2057
+ UsdSkelSkeleton::GetJointOrder
2058
+
2059
+ GetJointWorldBindTransforms(xforms) → bool
2060
+ Returns the world space joint transforms at bind time.
2061
+
2062
+ Parameters
2063
+ xforms (VtArray[Matrix4]) –
2064
+
2065
+ GetMapper() → AnimMapper
2066
+ Returns a mapper for remapping from the bound animation, if any, to
2067
+ the Skeleton.
2068
+
2069
+ GetPrim() → Prim
2070
+ Returns the underlying Skeleton primitive corresponding to the bound
2071
+ skeleton instance, if any.
2072
+
2073
+ GetSkeleton() → Skeleton
2074
+ Returns the bound skeleton instance, if any.
2075
+
2076
+ GetTopology() → Topology
2077
+ Returns the topology of the bound skeleton instance, if any.
2078
+
2079
+ HasBindPose() → bool
2080
+ Returns true if the size of the array returned by
2081
+ skeleton::GetBindTransformsAttr() matches the number of joints in the
2082
+ skeleton.
2083
+
2084
+ HasRestPose() → bool
2085
+ Returns true if the size of the array returned by
2086
+ skeleton::GetRestTransformsAttr() matches the number of joints in the
2087
+ skeleton.
2088
+
2089
+ class pxr.UsdSkel.SkinningQuery
2090
+ Object used for querying resolved bindings for skinning.
2091
+ Methods:
2092
+
2093
+ ComputeExtentsPadding(skelRestXforms, boundable)
2094
+ Helper for computing an approximate padding for use in extents computations.
2095
+
2096
+ ComputeJointInfluences(indices, weights, time)
2097
+ Convenience method for computing joint influences.
2098
+
2099
+ ComputeSkinnedPoints(xforms, points, time)
2100
+ Compute skinned points using linear blend skinning.
2101
+
2102
+ ComputeSkinnedTransform(xforms, xform, time)
2103
+ Compute a skinning transform using linear blend skinning.
2104
+
2105
+ ComputeVaryingJointInfluences(numPoints, ...)
2106
+ Convenience method for computing joint influence, where constant influences are expanded to hold values per point.
2107
+
2108
+ GetBlendShapeMapper()
2109
+ Return the mapper for remapping blend shapes from the order of the bound SkelAnimation to the local blend shape order of this prim.
2110
+
2111
+ GetBlendShapeOrder(blendShapes)
2112
+ Get the blend shapes for this skinning site, if any.
2113
+
2114
+ GetBlendShapeTargetsRel()
2115
+
2116
+ GetBlendShapesAttr()
2117
+
2118
+ GetGeomBindTransform(time)
2119
+
2120
+ param time
2121
+
2122
+ GetGeomBindTransformAttr()
2123
+
2124
+ GetInterpolation()
2125
+
2126
+ GetJointIndicesPrimvar()
2127
+
2128
+ GetJointMapper()
2129
+ Return a mapper for remapping from the joint order of the skeleton to the local joint order of this prim, if any.
2130
+
2131
+ GetJointOrder(jointOrder)
2132
+ Get the custom joint order for this skinning site, if any.
2133
+
2134
+ GetJointWeightsPrimvar()
2135
+
2136
+ GetMapper()
2137
+ Deprecated
2138
+
2139
+ GetNumInfluencesPerComponent()
2140
+ Returns the number of influences encoded for each component.
2141
+
2142
+ GetPrim()
2143
+
2144
+ GetSkinningBlendWeightsPrimvar()
2145
+
2146
+ GetSkinningMethodAttr()
2147
+
2148
+ GetTimeSamples(times)
2149
+ 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).
2150
+
2151
+ GetTimeSamplesInInterval(interval, times)
2152
+ 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).
2153
+
2154
+ HasBlendShapes()
2155
+ Returns true if there are blend shapes associated with this prim.
2156
+
2157
+ HasJointInfluences()
2158
+ Returns true if joint influence data is associated with this prim.
2159
+
2160
+ IsRigidlyDeformed()
2161
+ Returns true if the held prim has the same joint influences across all points, or false otherwise.
2162
+
2163
+ ComputeExtentsPadding(skelRestXforms, boundable) → float
2164
+ Helper for computing an approximate padding for use in extents
2165
+ computations.
2166
+ The padding is computed as the difference between the pivots of the
2167
+ skelRestXforms skeleton space joint transforms at rest and the
2168
+ extents of the skinned primitive. This is intended to provide a
2169
+ suitable, constant metric for padding joint extents as computed by
2170
+ UsdSkelComputeJointsExtent.
2171
+
2172
+ Parameters
2173
+
2174
+ skelRestXforms (VtArray[Matrix4]) –
2175
+ boundable (Boundable) –
2176
+
2177
+ ComputeJointInfluences(indices, weights, time) → bool
2178
+ Convenience method for computing joint influences.
2179
+ In addition to querying influences, this will also perform validation
2180
+ of the basic form of the weight data although the array contents is
2181
+ not validated.
2182
+
2183
+ Parameters
2184
+
2185
+ indices (IntArray) –
2186
+ weights (FloatArray) –
2187
+ time (TimeCode) –
2188
+
2189
+ ComputeSkinnedPoints(xforms, points, time) → bool
2190
+ Compute skinned points using linear blend skinning.
2191
+ Both xforms and points are given in skeleton space, using
2192
+ the joint order of the bound skeleton. Joint influences and the
2193
+ (optional) binding transform are computed at time time (which will
2194
+ typically be unvarying).
2195
+ UsdSkelSkeletonQuery::ComputeSkinningTransforms
2196
+
2197
+ Parameters
2198
+
2199
+ xforms (VtArray[Matrix4]) –
2200
+ points (Vec3fArray) –
2201
+ time (TimeCode) –
2202
+
2203
+ ComputeSkinnedTransform(xforms, xform, time) → bool
2204
+ Compute a skinning transform using linear blend skinning.
2205
+ The xforms are given in skeleton space, using the joint order of
2206
+ the bound skeleton. Joint influences and the (optional) binding
2207
+ transform are computed at time time (which will typically be
2208
+ unvarying). If this skinning query holds non-constant joint
2209
+ influences, no transform will be computed, and the function will
2210
+ return false.
2211
+ UsdSkelSkeletonQuery::ComputeSkinningTransforms
2212
+
2213
+ Parameters
2214
+
2215
+ xforms (VtArray[Matrix4]) –
2216
+ xform (Matrix4) –
2217
+ time (TimeCode) –
2218
+
2219
+ ComputeVaryingJointInfluences(numPoints, indices, weights, time) → bool
2220
+ Convenience method for computing joint influence, where constant
2221
+ influences are expanded to hold values per point.
2222
+ In addition to querying influences, this will also perform validation
2223
+ of the basic form of the weight data although the array contents is
2224
+ not validated.
2225
+
2226
+ Parameters
2227
+
2228
+ numPoints (int) –
2229
+ indices (IntArray) –
2230
+ weights (FloatArray) –
2231
+ time (TimeCode) –
2232
+
2233
+ GetBlendShapeMapper() → AnimMapper
2234
+ Return the mapper for remapping blend shapes from the order of the
2235
+ bound SkelAnimation to the local blend shape order of this prim.
2236
+ Returns a null reference if the underlying prim has no blend shapes.
2237
+ The mapper maps data from the order given by the blendShapes order
2238
+ on the SkelAnimation to the order given by the skel:blendShapes
2239
+ property, as set through the UsdSkelBindingAPI.
2240
+
2241
+ GetBlendShapeOrder(blendShapes) → bool
2242
+ Get the blend shapes for this skinning site, if any.
2243
+
2244
+ Parameters
2245
+ blendShapes (TokenArray) –
2246
+
2247
+ GetBlendShapeTargetsRel() → Relationship
2248
+
2249
+ GetBlendShapesAttr() → Attribute
2250
+
2251
+ GetGeomBindTransform(time) → Matrix4d
2252
+
2253
+ Parameters
2254
+ time (TimeCode) –
2255
+
2256
+ GetGeomBindTransformAttr() → Attribute
2257
+
2258
+ GetInterpolation() → str
2259
+
2260
+ GetJointIndicesPrimvar() → Primvar
2261
+
2262
+ GetJointMapper() → AnimMapper
2263
+ Return a mapper for remapping from the joint order of the skeleton to
2264
+ the local joint order of this prim, if any.
2265
+ Returns a null pointer if the prim has no custom joint orer. The
2266
+ mapper maps data from the order given by the joints order on the
2267
+ Skeleton to the order given by the skel:joints property, as
2268
+ optionally set through the UsdSkelBindingAPI.
2269
+
2270
+ GetJointOrder(jointOrder) → bool
2271
+ Get the custom joint order for this skinning site, if any.
2272
+
2273
+ Parameters
2274
+ jointOrder (TokenArray) –
2275
+
2276
+ GetJointWeightsPrimvar() → Primvar
2277
+
2278
+ GetMapper() → AnimMapper
2279
+ Deprecated
2280
+ Use GetJointMapper.
2281
+
2282
+ GetNumInfluencesPerComponent() → int
2283
+ Returns the number of influences encoded for each component.
2284
+ If the prim defines rigid joint influences, then this returns the
2285
+ number of influences that map to every point. Otherwise, this provides
2286
+ the number of influences per point.
2287
+ IsRigidlyDeformed
2288
+
2289
+ GetPrim() → Prim
2290
+
2291
+ GetSkinningBlendWeightsPrimvar() → Primvar
2292
+
2293
+ GetSkinningMethodAttr() → Attribute
2294
+
2295
+ GetTimeSamples(times) → bool
2296
+ Populate times with the union of time samples for all properties
2297
+ that affect skinning, independent of joint transforms and any other
2298
+ prim-specific properties (such as points).
2299
+ UsdAttribute::GetTimeSamples
2300
+
2301
+ Parameters
2302
+ times (list[float]) –
2303
+
2304
+ GetTimeSamplesInInterval(interval, times) → bool
2305
+ Populate times with the union of time samples within interval
2306
+ , for all properties that affect skinning, independent of joint
2307
+ transforms and any other prim-specific properties (such as points).
2308
+ UsdAttribute::GetTimeSamplesInInterval
2309
+
2310
+ Parameters
2311
+
2312
+ interval (Interval) –
2313
+ times (list[float]) –
2314
+
2315
+ HasBlendShapes() → bool
2316
+ Returns true if there are blend shapes associated with this prim.
2317
+
2318
+ HasJointInfluences() → bool
2319
+ Returns true if joint influence data is associated with this prim.
2320
+
2321
+ IsRigidlyDeformed() → bool
2322
+ Returns true if the held prim has the same joint influences across all
2323
+ points, or false otherwise.
2324
+
2325
+ class pxr.UsdSkel.Tokens
2326
+ Attributes:
2327
+
2328
+ bindTransforms
2329
+
2330
+ blendShapeWeights
2331
+
2332
+ blendShapes
2333
+
2334
+ classicLinear
2335
+
2336
+ dualQuaternion
2337
+
2338
+ jointNames
2339
+
2340
+ joints
2341
+
2342
+ normalOffsets
2343
+
2344
+ offsets
2345
+
2346
+ pointIndices
2347
+
2348
+ primvarsSkelGeomBindTransform
2349
+
2350
+ primvarsSkelJointIndices
2351
+
2352
+ primvarsSkelJointWeights
2353
+
2354
+ primvarsSkelSkinningBlendWeights
2355
+
2356
+ restTransforms
2357
+
2358
+ rotations
2359
+
2360
+ scales
2361
+
2362
+ skelAnimationSource
2363
+
2364
+ skelBlendShapeTargets
2365
+
2366
+ skelBlendShapes
2367
+
2368
+ skelJoints
2369
+
2370
+ skelSkeleton
2371
+
2372
+ skelSkinningMethod
2373
+
2374
+ translations
2375
+
2376
+ weight
2377
+
2378
+ weightedBlend
2379
+
2380
+ bindTransforms = 'bindTransforms'
2381
+
2382
+ blendShapeWeights = 'blendShapeWeights'
2383
+
2384
+ blendShapes = 'blendShapes'
2385
+
2386
+ classicLinear = 'ClassicLinear'
2387
+
2388
+ dualQuaternion = 'DualQuaternion'
2389
+
2390
+ jointNames = 'jointNames'
2391
+
2392
+ joints = 'joints'
2393
+
2394
+ normalOffsets = 'normalOffsets'
2395
+
2396
+ offsets = 'offsets'
2397
+
2398
+ pointIndices = 'pointIndices'
2399
+
2400
+ primvarsSkelGeomBindTransform = 'primvars:skel:geomBindTransform'
2401
+
2402
+ primvarsSkelJointIndices = 'primvars:skel:jointIndices'
2403
+
2404
+ primvarsSkelJointWeights = 'primvars:skel:jointWeights'
2405
+
2406
+ primvarsSkelSkinningBlendWeights = 'primvars:skel:skinningBlendWeights'
2407
+
2408
+ restTransforms = 'restTransforms'
2409
+
2410
+ rotations = 'rotations'
2411
+
2412
+ scales = 'scales'
2413
+
2414
+ skelAnimationSource = 'skel:animationSource'
2415
+
2416
+ skelBlendShapeTargets = 'skel:blendShapeTargets'
2417
+
2418
+ skelBlendShapes = 'skel:blendShapes'
2419
+
2420
+ skelJoints = 'skel:joints'
2421
+
2422
+ skelSkeleton = 'skel:skeleton'
2423
+
2424
+ skelSkinningMethod = 'skel:skinningMethod'
2425
+
2426
+ translations = 'translations'
2427
+
2428
+ weight = 'weight'
2429
+
2430
+ weightedBlend = 'WeightedBlend'
2431
+
2432
+ class pxr.UsdSkel.Topology
2433
+ Object holding information describing skeleton topology. This provides
2434
+ the hierarchical information needed to reason about joint
2435
+ relationships in a manner suitable to computations.
2436
+ Methods:
2437
+
2438
+ GetNumJoints()
2439
+
2440
+ GetParent(index)
2441
+ Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots).
2442
+
2443
+ GetParentIndices()
2444
+
2445
+ IsRoot(index)
2446
+ Returns true if the index'th joint is a root joint.
2447
+
2448
+ Validate(reason)
2449
+ Validate the topology.
2450
+
2451
+ GetNumJoints() → int
2452
+
2453
+ GetParent(index) → int
2454
+ Returns the parent joint of the index'th joint, Returns -1 for
2455
+ joints with no parent (roots).
2456
+
2457
+ Parameters
2458
+ index (int) –
2459
+
2460
+ GetParentIndices() → IntArray
2461
+
2462
+ IsRoot(index) → bool
2463
+ Returns true if the index'th joint is a root joint.
2464
+
2465
+ Parameters
2466
+ index (int) –
2467
+
2468
+ Validate(reason) → bool
2469
+ Validate the topology.
2470
+ If validation is unsuccessful, a reason why will be written to
2471
+ reason , if provided.
2472
+
2473
+ Parameters
2474
+ reason (str) –
2475
+
2476
+ © Copyright 2019-2023, NVIDIA.
2477
+ Last updated on Nov 14, 2023.
2478
+
2479
+
2480
+
UsdUI.md ADDED
@@ -0,0 +1,622 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdUI module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdUI module
10
+
11
+  
12
+
13
+ # UsdUI module
14
+
15
+ 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.
16
+
17
+ Classes:
18
+
19
+ Backdrop
20
+ Provides a'group-box'for the purpose of node graph organization.
21
+
22
+ NodeGraphNodeAPI
23
+ This api helps storing information about nodes in node graphs.
24
+
25
+ SceneGraphPrimAPI
26
+ Utility schema for display properties of a prim
27
+
28
+ Tokens
29
+
30
+ class pxr.UsdUI.Backdrop
31
+ Provides a’group-box’for the purpose of node graph organization.
32
+ Unlike containers, backdrops do not store the Shader nodes inside of
33
+ them. Backdrops are an organizational tool that allows Shader nodes to
34
+ be visually grouped together in a node-graph UI, but there is no
35
+ direct relationship between a Shader node and a Backdrop.
36
+ The guideline for a node-graph UI is that a Shader node is considered
37
+ part of a Backdrop when the Backdrop is the smallest Backdrop a Shader
38
+ node’s bounding-box fits inside.
39
+ Backdrop objects are contained inside a NodeGraph, similar to how
40
+ Shader objects are contained inside a NodeGraph.
41
+ Backdrops have no shading inputs or outputs that influence the
42
+ rendered results of a NodeGraph. Therefore they can be safely ignored
43
+ during import.
44
+ Like Shaders and NodeGraphs, Backdrops subscribe to the
45
+ NodeGraphNodeAPI to specify position and size.
46
+ For any described attribute Fallback Value or Allowed Values
47
+ below that are text/tokens, the actual token is published and defined
48
+ in UsdUITokens. So to set an attribute to the value”rightHanded”, use
49
+ UsdUITokens->rightHanded as the value.
50
+ Methods:
51
+
52
+ CreateDescriptionAttr(defaultValue, ...)
53
+ See GetDescriptionAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
54
+
55
+ Define
56
+ classmethod Define(stage, path) -> Backdrop
57
+
58
+ Get
59
+ classmethod Get(stage, path) -> Backdrop
60
+
61
+ GetDescriptionAttr()
62
+ The text label that is displayed on the backdrop in the node graph.
63
+
64
+ GetSchemaAttributeNames
65
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
66
+
67
+ CreateDescriptionAttr(defaultValue, writeSparsely) → Attribute
68
+ See GetDescriptionAttr() , and also Create vs Get Property Methods for
69
+ when to use Get vs Create.
70
+ If specified, author defaultValue as the attribute’s default,
71
+ sparsely (when it makes sense to do so) if writeSparsely is
72
+ true - the default for writeSparsely is false .
73
+
74
+ Parameters
75
+
76
+ defaultValue (VtValue) –
77
+ writeSparsely (bool) –
78
+
79
+ static Define()
80
+ classmethod Define(stage, path) -> Backdrop
81
+ Attempt to ensure a UsdPrim adhering to this schema at path is
82
+ defined (according to UsdPrim::IsDefined() ) on this stage.
83
+ If a prim adhering to this schema at path is already defined on
84
+ this stage, return that prim. Otherwise author an SdfPrimSpec with
85
+ specifier == SdfSpecifierDef and this schema’s prim type name for
86
+ the prim at path at the current EditTarget. Author SdfPrimSpec s
87
+ with specifier == SdfSpecifierDef and empty typeName at the
88
+ current EditTarget for any nonexistent, or existing but not Defined
89
+ ancestors.
90
+ The given path must be an absolute prim path that does not contain
91
+ any variant selections.
92
+ If it is impossible to author any of the necessary PrimSpecs, (for
93
+ example, in case path cannot map to the current UsdEditTarget ‘s
94
+ namespace) issue an error and return an invalid UsdPrim.
95
+ Note that this method may return a defined prim whose typeName does
96
+ not specify this schema class, in case a stronger typeName opinion
97
+ overrides the opinion at the current EditTarget.
98
+
99
+ Parameters
100
+
101
+ stage (Stage) –
102
+ path (Path) –
103
+
104
+ static Get()
105
+ classmethod Get(stage, path) -> Backdrop
106
+ Return a UsdUIBackdrop holding the prim adhering to this schema at
107
+ path on stage .
108
+ If no prim exists at path on stage , or if the prim at that
109
+ path does not adhere to this schema, return an invalid schema object.
110
+ This is shorthand for the following:
111
+ UsdUIBackdrop(stage->GetPrimAtPath(path));
112
+
113
+ Parameters
114
+
115
+ stage (Stage) –
116
+ path (Path) –
117
+
118
+ GetDescriptionAttr() → Attribute
119
+ The text label that is displayed on the backdrop in the node graph.
120
+ This help-description explains what the nodes in a backdrop do.
121
+ Declaration
122
+ uniform token ui:description
123
+ C++ Type
124
+ TfToken
125
+ Usd Type
126
+ SdfValueTypeNames->Token
127
+ Variability
128
+ SdfVariabilityUniform
129
+
130
+ static GetSchemaAttributeNames()
131
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
132
+ Return a vector of names of all pre-declared attributes for this
133
+ schema class and all its ancestor classes.
134
+ Does not include attributes that may be authored by custom/extended
135
+ methods of the schemas involved.
136
+
137
+ Parameters
138
+ includeInherited (bool) –
139
+
140
+ class pxr.UsdUI.NodeGraphNodeAPI
141
+ This api helps storing information about nodes in node graphs.
142
+ For any described attribute Fallback Value or Allowed Values
143
+ below that are text/tokens, the actual token is published and defined
144
+ in UsdUITokens. So to set an attribute to the value”rightHanded���, use
145
+ UsdUITokens->rightHanded as the value.
146
+ Methods:
147
+
148
+ Apply
149
+ classmethod Apply(prim) -> NodeGraphNodeAPI
150
+
151
+ CanApply
152
+ classmethod CanApply(prim, whyNot) -> bool
153
+
154
+ CreateDisplayColorAttr(defaultValue, ...)
155
+ See GetDisplayColorAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
156
+
157
+ CreateExpansionStateAttr(defaultValue, ...)
158
+ See GetExpansionStateAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
159
+
160
+ CreateIconAttr(defaultValue, writeSparsely)
161
+ See GetIconAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
162
+
163
+ CreatePosAttr(defaultValue, writeSparsely)
164
+ See GetPosAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
165
+
166
+ CreateSizeAttr(defaultValue, writeSparsely)
167
+ See GetSizeAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
168
+
169
+ CreateStackingOrderAttr(defaultValue, ...)
170
+ See GetStackingOrderAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
171
+
172
+ Get
173
+ classmethod Get(stage, path) -> NodeGraphNodeAPI
174
+
175
+ GetDisplayColorAttr()
176
+ This hint defines what tint the node should have in the node graph.
177
+
178
+ GetExpansionStateAttr()
179
+ The current expansionState of the node in the ui.
180
+
181
+ GetIconAttr()
182
+ This points to an image that should be displayed on the node.
183
+
184
+ GetPosAttr()
185
+ Declared relative position to the parent in a node graph.
186
+
187
+ GetSchemaAttributeNames
188
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
189
+
190
+ GetSizeAttr()
191
+ Optional size hint for a node in a node graph.
192
+
193
+ GetStackingOrderAttr()
194
+ This optional value is a useful hint when an application cares about the visibility of a node and whether each node overlaps another.
195
+
196
+ static Apply()
197
+ classmethod Apply(prim) -> NodeGraphNodeAPI
198
+ Applies this single-apply API schema to the given prim .
199
+ This information is stored by adding”NodeGraphNodeAPI”to the token-
200
+ valued, listOp metadata apiSchemas on the prim.
201
+ A valid UsdUINodeGraphNodeAPI object is returned upon success. An
202
+ invalid (or empty) UsdUINodeGraphNodeAPI object is returned upon
203
+ failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.
204
+ UsdPrim::GetAppliedSchemas()
205
+ UsdPrim::HasAPI()
206
+ UsdPrim::CanApplyAPI()
207
+ UsdPrim::ApplyAPI()
208
+ UsdPrim::RemoveAPI()
209
+
210
+ Parameters
211
+ prim (Prim) –
212
+
213
+ static CanApply()
214
+ classmethod CanApply(prim, whyNot) -> bool
215
+ Returns true if this single-apply API schema can be applied to the
216
+ given prim .
217
+ If this schema can not be a applied to the prim, this returns false
218
+ and, if provided, populates whyNot with the reason it can not be
219
+ applied.
220
+ Note that if CanApply returns false, that does not necessarily imply
221
+ that calling Apply will fail. Callers are expected to call CanApply
222
+ before calling Apply if they want to ensure that it is valid to apply
223
+ a schema.
224
+ UsdPrim::GetAppliedSchemas()
225
+ UsdPrim::HasAPI()
226
+ UsdPrim::CanApplyAPI()
227
+ UsdPrim::ApplyAPI()
228
+ UsdPrim::RemoveAPI()
229
+
230
+ Parameters
231
+
232
+ prim (Prim) –
233
+ whyNot (str) –
234
+
235
+ CreateDisplayColorAttr(defaultValue, writeSparsely) → Attribute
236
+ See GetDisplayColorAttr() , and also Create vs Get Property Methods
237
+ for when to use Get vs Create.
238
+ If specified, author defaultValue as the attribute’s default,
239
+ sparsely (when it makes sense to do so) if writeSparsely is
240
+ true - the default for writeSparsely is false .
241
+
242
+ Parameters
243
+
244
+ defaultValue (VtValue) –
245
+ writeSparsely (bool) –
246
+
247
+ CreateExpansionStateAttr(defaultValue, writeSparsely) → Attribute
248
+ See GetExpansionStateAttr() , and also Create vs Get Property Methods
249
+ for when to use Get vs Create.
250
+ If specified, author defaultValue as the attribute’s default,
251
+ sparsely (when it makes sense to do so) if writeSparsely is
252
+ true - the default for writeSparsely is false .
253
+
254
+ Parameters
255
+
256
+ defaultValue (VtValue) –
257
+ writeSparsely (bool) –
258
+
259
+ CreateIconAttr(defaultValue, writeSparsely) → Attribute
260
+ See GetIconAttr() , and also Create vs Get Property Methods for when
261
+ to use Get vs Create.
262
+ If specified, author defaultValue as the attribute’s default,
263
+ sparsely (when it makes sense to do so) if writeSparsely is
264
+ true - the default for writeSparsely is false .
265
+
266
+ Parameters
267
+
268
+ defaultValue (VtValue) –
269
+ writeSparsely (bool) –
270
+
271
+ CreatePosAttr(defaultValue, writeSparsely) → Attribute
272
+ See GetPosAttr() , and also Create vs Get Property Methods for when to
273
+ use Get vs Create.
274
+ If specified, author defaultValue as the attribute’s default,
275
+ sparsely (when it makes sense to do so) if writeSparsely is
276
+ true - the default for writeSparsely is false .
277
+
278
+ Parameters
279
+
280
+ defaultValue (VtValue) –
281
+ writeSparsely (bool) –
282
+
283
+ CreateSizeAttr(defaultValue, writeSparsely) → Attribute
284
+ See GetSizeAttr() , and also Create vs Get Property Methods for when
285
+ to use Get vs Create.
286
+ If specified, author defaultValue as the attribute’s default,
287
+ sparsely (when it makes sense to do so) if writeSparsely is
288
+ true - the default for writeSparsely is false .
289
+
290
+ Parameters
291
+
292
+ defaultValue (VtValue) –
293
+ writeSparsely (bool) –
294
+
295
+ CreateStackingOrderAttr(defaultValue, writeSparsely) → Attribute
296
+ See GetStackingOrderAttr() , and also Create vs Get Property Methods
297
+ for when to use Get vs Create.
298
+ If specified, author defaultValue as the attribute’s default,
299
+ sparsely (when it makes sense to do so) if writeSparsely is
300
+ true - the default for writeSparsely is false .
301
+
302
+ Parameters
303
+
304
+ defaultValue (VtValue) –
305
+ writeSparsely (bool) –
306
+
307
+ static Get()
308
+ classmethod Get(stage, path) -> NodeGraphNodeAPI
309
+ Return a UsdUINodeGraphNodeAPI holding the prim adhering to this
310
+ schema at path on stage .
311
+ If no prim exists at path on stage , or if the prim at that
312
+ path does not adhere to this schema, return an invalid schema object.
313
+ This is shorthand for the following:
314
+ UsdUINodeGraphNodeAPI(stage->GetPrimAtPath(path));
315
+
316
+ Parameters
317
+
318
+ stage (Stage) –
319
+ path (Path) –
320
+
321
+ GetDisplayColorAttr() → Attribute
322
+ This hint defines what tint the node should have in the node graph.
323
+ Declaration
324
+ uniform color3f ui:nodegraph:node:displayColor
325
+ C++ Type
326
+ GfVec3f
327
+ Usd Type
328
+ SdfValueTypeNames->Color3f
329
+ Variability
330
+ SdfVariabilityUniform
331
+
332
+ GetExpansionStateAttr() → Attribute
333
+ The current expansionState of the node in the ui.
334
+ ‘open’= fully expanded’closed’= fully collapsed’minimized’= should
335
+ take the least space possible
336
+ Declaration
337
+ uniform token ui:nodegraph:node:expansionState
338
+ C++ Type
339
+ TfToken
340
+ Usd Type
341
+ SdfValueTypeNames->Token
342
+ Variability
343
+ SdfVariabilityUniform
344
+ Allowed Values
345
+ open, closed, minimized
346
+
347
+ GetIconAttr() → Attribute
348
+ This points to an image that should be displayed on the node.
349
+ It is intended to be useful for summary visual classification of
350
+ nodes, rather than a thumbnail preview of the computed result of the
351
+ node in some computational system.
352
+ Declaration
353
+ uniform asset ui:nodegraph:node:icon
354
+ C++ Type
355
+ SdfAssetPath
356
+ Usd Type
357
+ SdfValueTypeNames->Asset
358
+ Variability
359
+ SdfVariabilityUniform
360
+
361
+ GetPosAttr() → Attribute
362
+ Declared relative position to the parent in a node graph.
363
+ X is the horizontal position. Y is the vertical position. Higher
364
+ numbers correspond to lower positions (coordinates are Qt style, not
365
+ cartesian).
366
+ These positions are not explicitly meant in pixel space, but rather
367
+ assume that the size of a node is approximately 1.0x1.0. Where size-x
368
+ is the node width and size-y height of the node. Depending on graph UI
369
+ implementation, the size of a node may vary in each direction.
370
+ Example: If a node’s width is 300 and it is position is at 1000, we
371
+ store for x-position: 1000 * (1.0/300)
372
+ Declaration
373
+ uniform float2 ui:nodegraph:node:pos
374
+ C++ Type
375
+ GfVec2f
376
+ Usd Type
377
+ SdfValueTypeNames->Float2
378
+ Variability
379
+ SdfVariabilityUniform
380
+
381
+ static GetSchemaAttributeNames()
382
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
383
+ Return a vector of names of all pre-declared attributes for this
384
+ schema class and all its ancestor classes.
385
+ Does not include attributes that may be authored by custom/extended
386
+ methods of the schemas involved.
387
+
388
+ Parameters
389
+ includeInherited (bool) –
390
+
391
+ GetSizeAttr() → Attribute
392
+ Optional size hint for a node in a node graph.
393
+ X is the width. Y is the height.
394
+ This value is optional, because node size is often determined based on
395
+ the number of in- and outputs of a node.
396
+ Declaration
397
+ uniform float2 ui:nodegraph:node:size
398
+ C++ Type
399
+ GfVec2f
400
+ Usd Type
401
+ SdfValueTypeNames->Float2
402
+ Variability
403
+ SdfVariabilityUniform
404
+
405
+ GetStackingOrderAttr() → Attribute
406
+ This optional value is a useful hint when an application cares about
407
+ the visibility of a node and whether each node overlaps another.
408
+ Nodes with lower stacking order values are meant to be drawn below
409
+ higher ones. Negative values are meant as background. Positive values
410
+ are meant as foreground. Undefined values should be treated as 0.
411
+ There are no set limits in these values.
412
+ Declaration
413
+ uniform int ui:nodegraph:node:stackingOrder
414
+ C++ Type
415
+ int
416
+ Usd Type
417
+ SdfValueTypeNames->Int
418
+ Variability
419
+ SdfVariabilityUniform
420
+
421
+ class pxr.UsdUI.SceneGraphPrimAPI
422
+ Utility schema for display properties of a prim
423
+ For any described attribute Fallback Value or Allowed Values
424
+ below that are text/tokens, the actual token is published and defined
425
+ in UsdUITokens. So to set an attribute to the value”rightHanded”, use
426
+ UsdUITokens->rightHanded as the value.
427
+ Methods:
428
+
429
+ Apply
430
+ classmethod Apply(prim) -> SceneGraphPrimAPI
431
+
432
+ CanApply
433
+ classmethod CanApply(prim, whyNot) -> bool
434
+
435
+ CreateDisplayGroupAttr(defaultValue, ...)
436
+ See GetDisplayGroupAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
437
+
438
+ CreateDisplayNameAttr(defaultValue, ...)
439
+ See GetDisplayNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
440
+
441
+ Get
442
+ classmethod Get(stage, path) -> SceneGraphPrimAPI
443
+
444
+ GetDisplayGroupAttr()
445
+ When publishing a nodegraph or a material, it can be useful to provide an optional display group, for organizational purposes and readability.
446
+
447
+ GetDisplayNameAttr()
448
+ When publishing a nodegraph or a material, it can be useful to provide an optional display name, for readability.
449
+
450
+ GetSchemaAttributeNames
451
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
452
+
453
+ static Apply()
454
+ classmethod Apply(prim) -> SceneGraphPrimAPI
455
+ Applies this single-apply API schema to the given prim .
456
+ This information is stored by adding”SceneGraphPrimAPI”to the token-
457
+ valued, listOp metadata apiSchemas on the prim.
458
+ A valid UsdUISceneGraphPrimAPI object is returned upon success. An
459
+ invalid (or empty) UsdUISceneGraphPrimAPI object is returned upon
460
+ failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.
461
+ UsdPrim::GetAppliedSchemas()
462
+ UsdPrim::HasAPI()
463
+ UsdPrim::CanApplyAPI()
464
+ UsdPrim::ApplyAPI()
465
+ UsdPrim::RemoveAPI()
466
+
467
+ Parameters
468
+ prim (Prim) –
469
+
470
+ static CanApply()
471
+ classmethod CanApply(prim, whyNot) -> bool
472
+ Returns true if this single-apply API schema can be applied to the
473
+ given prim .
474
+ If this schema can not be a applied to the prim, this returns false
475
+ and, if provided, populates whyNot with the reason it can not be
476
+ applied.
477
+ Note that if CanApply returns false, that does not necessarily imply
478
+ that calling Apply will fail. Callers are expected to call CanApply
479
+ before calling Apply if they want to ensure that it is valid to apply
480
+ a schema.
481
+ UsdPrim::GetAppliedSchemas()
482
+ UsdPrim::HasAPI()
483
+ UsdPrim::CanApplyAPI()
484
+ UsdPrim::ApplyAPI()
485
+ UsdPrim::RemoveAPI()
486
+
487
+ Parameters
488
+
489
+ prim (Prim) –
490
+ whyNot (str) –
491
+
492
+ CreateDisplayGroupAttr(defaultValue, writeSparsely) → Attribute
493
+ See GetDisplayGroupAttr() , and also Create vs Get Property Methods
494
+ for when to use Get vs Create.
495
+ If specified, author defaultValue as the attribute’s default,
496
+ sparsely (when it makes sense to do so) if writeSparsely is
497
+ true - the default for writeSparsely is false .
498
+
499
+ Parameters
500
+
501
+ defaultValue (VtValue) –
502
+ writeSparsely (bool) –
503
+
504
+ CreateDisplayNameAttr(defaultValue, writeSparsely) → Attribute
505
+ See GetDisplayNameAttr() , and also Create vs Get Property Methods for
506
+ when to use Get vs Create.
507
+ If specified, author defaultValue as the attribute’s default,
508
+ sparsely (when it makes sense to do so) if writeSparsely is
509
+ true - the default for writeSparsely is false .
510
+
511
+ Parameters
512
+
513
+ defaultValue (VtValue) –
514
+ writeSparsely (bool) –
515
+
516
+ static Get()
517
+ classmethod Get(stage, path) -> SceneGraphPrimAPI
518
+ Return a UsdUISceneGraphPrimAPI holding the prim adhering to this
519
+ schema at path on stage .
520
+ If no prim exists at path on stage , or if the prim at that
521
+ path does not adhere to this schema, return an invalid schema object.
522
+ This is shorthand for the following:
523
+ UsdUISceneGraphPrimAPI(stage->GetPrimAtPath(path));
524
+
525
+ Parameters
526
+
527
+ stage (Stage) –
528
+ path (Path) –
529
+
530
+ GetDisplayGroupAttr() → Attribute
531
+ When publishing a nodegraph or a material, it can be useful to provide
532
+ an optional display group, for organizational purposes and
533
+ readability.
534
+ This is because often the usd shading hierarchy is rather flat while
535
+ we want to display it in organized groups.
536
+ Declaration
537
+ uniform token ui:displayGroup
538
+ C++ Type
539
+ TfToken
540
+ Usd Type
541
+ SdfValueTypeNames->Token
542
+ Variability
543
+ SdfVariabilityUniform
544
+
545
+ GetDisplayNameAttr() → Attribute
546
+ When publishing a nodegraph or a material, it can be useful to provide
547
+ an optional display name, for readability.
548
+ Declaration
549
+ uniform token ui:displayName
550
+ C++ Type
551
+ TfToken
552
+ Usd Type
553
+ SdfValueTypeNames->Token
554
+ Variability
555
+ SdfVariabilityUniform
556
+
557
+ static GetSchemaAttributeNames()
558
+ classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]
559
+ Return a vector of names of all pre-declared attributes for this
560
+ schema class and all its ancestor classes.
561
+ Does not include attributes that may be authored by custom/extended
562
+ methods of the schemas involved.
563
+
564
+ Parameters
565
+ includeInherited (bool) –
566
+
567
+ class pxr.UsdUI.Tokens
568
+ Attributes:
569
+
570
+ closed
571
+
572
+ minimized
573
+
574
+ open
575
+
576
+ uiDescription
577
+
578
+ uiDisplayGroup
579
+
580
+ uiDisplayName
581
+
582
+ uiNodegraphNodeDisplayColor
583
+
584
+ uiNodegraphNodeExpansionState
585
+
586
+ uiNodegraphNodeIcon
587
+
588
+ uiNodegraphNodePos
589
+
590
+ uiNodegraphNodeSize
591
+
592
+ uiNodegraphNodeStackingOrder
593
+
594
+ closed = 'closed'
595
+
596
+ minimized = 'minimized'
597
+
598
+ open = 'open'
599
+
600
+ uiDescription = 'ui:description'
601
+
602
+ uiDisplayGroup = 'ui:displayGroup'
603
+
604
+ uiDisplayName = 'ui:displayName'
605
+
606
+ uiNodegraphNodeDisplayColor = 'ui:nodegraph:node:displayColor'
607
+
608
+ uiNodegraphNodeExpansionState = 'ui:nodegraph:node:expansionState'
609
+
610
+ uiNodegraphNodeIcon = 'ui:nodegraph:node:icon'
611
+
612
+ uiNodegraphNodePos = 'ui:nodegraph:node:pos'
613
+
614
+ uiNodegraphNodeSize = 'ui:nodegraph:node:size'
615
+
616
+ uiNodegraphNodeStackingOrder = 'ui:nodegraph:node:stackingOrder'
617
+
618
+ © Copyright 2019-2023, NVIDIA.
619
+ Last updated on Nov 14, 2023.
620
+
621
+
622
+
UsdUtils.md ADDED
@@ -0,0 +1,635 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ UsdUtils module — pxr-usd-api 105.1 documentation
4
+
5
+ pxr-usd-api
6
+
7
+ »
8
+ Modules »
9
+ UsdUtils module
10
+
11
+  
12
+
13
+ # UsdUtils module
14
+
15
+ Summary: The UsdUtils module contains utility classes and functions for managing, inspecting, editing, and creating USD Assets.
16
+
17
+ Classes:
18
+
19
+ CoalescingDiagnosticDelegate
20
+ A class which collects warnings and statuses from the Tf diagnostic manager system in a thread safe manner.
21
+
22
+ CoalescingDiagnosticDelegateItem
23
+ 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.
24
+
25
+ CoalescingDiagnosticDelegateSharedItem
26
+ The shared component in a coalesced result This type can be thought of as the key by which we coalesce our diagnostics.
27
+
28
+ CoalescingDiagnosticDelegateUnsharedItem
29
+ The unshared component in a coalesced result.
30
+
31
+ ConditionalAbortDiagnosticDelegate
32
+ 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.
33
+
34
+ ConditionalAbortDiagnosticDelegateErrorFilters
35
+ 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.
36
+
37
+ RegisteredVariantSet
38
+ Info for registered variant set
39
+
40
+ SparseAttrValueWriter
41
+ A utility class for authoring time-varying attribute values with simple run-length encoding, by skipping any redundant time-samples.
42
+
43
+ SparseValueWriter
44
+ Utility class that manages sparse authoring of a set of UsdAttributes.
45
+
46
+ StageCache
47
+ The UsdUtilsStageCache class provides a simple interface for handling a singleton usd stage cache for use by all USD clients.
48
+
49
+ TimeCodeRange
50
+ Represents a range of UsdTimeCode values as start and end time codes and a stride value.
51
+
52
+ UsdStageStatsKeys
53
+
54
+ class pxr.UsdUtils.CoalescingDiagnosticDelegate
55
+ A class which collects warnings and statuses from the Tf diagnostic
56
+ manager system in a thread safe manner.
57
+ This class allows clients to get both the unfiltered results, as well
58
+ as a compressed view which deduplicates diagnostic events by their
59
+ source line number, function and file from which they occurred.
60
+ Methods:
61
+
62
+ DumpCoalescedDiagnosticsToStderr
63
+
64
+ DumpCoalescedDiagnosticsToStdout
65
+
66
+ DumpUncoalescedDiagnostics(ostr)
67
+ Print all pending diagnostics without any coalescing to ostr .
68
+
69
+ TakeCoalescedDiagnostics()
70
+ Get all pending diagnostics in a coalesced form.
71
+
72
+ TakeUncoalescedDiagnostics()
73
+ Get all pending diagnostics without any coalescing.
74
+
75
+ DumpCoalescedDiagnosticsToStderr()
76
+
77
+ DumpCoalescedDiagnosticsToStdout()
78
+
79
+ DumpUncoalescedDiagnostics(ostr) → None
80
+ Print all pending diagnostics without any coalescing to ostr .
81
+ This method clears the pending diagnostics.
82
+
83
+ Parameters
84
+ ostr (ostream) –
85
+
86
+ TakeCoalescedDiagnostics() → list[UsdUtilsCoalescingDiagnosticDelegate]
87
+ Get all pending diagnostics in a coalesced form.
88
+ This method clears the pending diagnostics.
89
+
90
+ TakeUncoalescedDiagnostics() → list[TfDiagnosticBase]
91
+ Get all pending diagnostics without any coalescing.
92
+ This method clears the pending diagnostics.
93
+
94
+ class pxr.UsdUtils.CoalescingDiagnosticDelegateItem
95
+ An item used in coalesced results, containing a shared component: the
96
+ file/function/line number, and a set of unshared components: the call
97
+ context and commentary.
98
+ Attributes:
99
+
100
+ sharedItem
101
+
102
+ unsharedItems
103
+
104
+ property sharedItem
105
+
106
+ property unsharedItems
107
+
108
+ class pxr.UsdUtils.CoalescingDiagnosticDelegateSharedItem
109
+ The shared component in a coalesced result This type can be thought of
110
+ as the key by which we coalesce our diagnostics.
111
+ Attributes:
112
+
113
+ sourceFileName
114
+
115
+ sourceFunction
116
+
117
+ sourceLineNumber
118
+
119
+ property sourceFileName
120
+
121
+ property sourceFunction
122
+
123
+ property sourceLineNumber
124
+
125
+ class pxr.UsdUtils.CoalescingDiagnosticDelegateUnsharedItem
126
+ The unshared component in a coalesced result.
127
+ Attributes:
128
+
129
+ commentary
130
+
131
+ context
132
+
133
+ property commentary
134
+
135
+ property context
136
+
137
+ class pxr.UsdUtils.ConditionalAbortDiagnosticDelegate
138
+ A class that allows client application to instantiate a diagnostic
139
+ delegate that can be used to abort operations for a non fatal USD
140
+ error or warning based on immutable include exclude rules defined for
141
+ this instance.
142
+ These rules are regex strings where case sensitive matching is done on
143
+ error/warning text or the location of the code path where the
144
+ error/warning occured. Note that these rules will be respected only
145
+ during the lifetime of the delegate. Include Rules determine what
146
+ errors or warnings will cause a fatal abort. Exclude Rules determine
147
+ what errors or warnings matched from the Include Rules should not
148
+ cause the fatal abort. Example: to abort on all errors and warnings
149
+ coming from”*pxr*”codepath but not
150
+ from”*ConditionalAbortDiagnosticDelegate*”, a client can create
151
+ the following delegate:
152
+ UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters includeFilters;
153
+ UsdUtilsConditionalAbortDiagnosticDelegateErrorFilters excludeFilters;
154
+ includeFilters.SetCodePathFilters({"\*pxr\*"});
155
+ excludeFilters.SetCodePathFilters({"\*ConditionalAbortDiagnosticDelegate\*"});
156
+ UsdUtilsConditionalAbortDiagnosticDelegate delegate =
157
+ UsdUtilsConditionalAbortDiagnosticDelegate(includeFilters,
158
+ excludeFilters);
159
+
160
+ class pxr.UsdUtils.ConditionalAbortDiagnosticDelegateErrorFilters
161
+ A class which represents the inclusion exclusion filters on which
162
+ errors will be matched stringFilters: matching and filtering will be
163
+ done on explicit string of the error/warning codePathFilters: matching
164
+ and filtering will be done on errors/warnings coming from a specific
165
+ usd code path.
166
+ Methods:
167
+
168
+ GetCodePathFilters()
169
+
170
+ GetStringFilters()
171
+
172
+ SetCodePathFilters(codePathFilters)
173
+
174
+ param codePathFilters
175
+
176
+ SetStringFilters(stringFilters)
177
+
178
+ param stringFilters
179
+
180
+ GetCodePathFilters() → list[str]
181
+
182
+ GetStringFilters() → list[str]
183
+
184
+ SetCodePathFilters(codePathFilters) → None
185
+
186
+ Parameters
187
+ codePathFilters (list[str]) –
188
+
189
+ SetStringFilters(stringFilters) → None
190
+
191
+ Parameters
192
+ stringFilters (list[str]) –
193
+
194
+ class pxr.UsdUtils.RegisteredVariantSet
195
+ Info for registered variant set
196
+ Classes:
197
+
198
+ SelectionExportPolicy
199
+ This specifies how the variantSet should be treated during export.
200
+
201
+ Attributes:
202
+
203
+ name
204
+
205
+ selectionExportPolicy
206
+
207
+ class SelectionExportPolicy
208
+ This specifies how the variantSet should be treated during export.
209
+ Note, in the plugInfo.json, the values for these enum’s are
210
+ lowerCamelCase.
211
+ Attributes:
212
+
213
+ Always
214
+
215
+ IfAuthored
216
+
217
+ Never
218
+
219
+ names
220
+
221
+ values
222
+
223
+ Always = pxr.UsdUtils.SelectionExportPolicy.Always
224
+
225
+ IfAuthored = pxr.UsdUtils.SelectionExportPolicy.IfAuthored
226
+
227
+ Never = pxr.UsdUtils.SelectionExportPolicy.Never
228
+
229
+ names = {'Always': pxr.UsdUtils.SelectionExportPolicy.Always, 'IfAuthored': pxr.UsdUtils.SelectionExportPolicy.IfAuthored, 'Never': pxr.UsdUtils.SelectionExportPolicy.Never}
230
+
231
+ values = {0: pxr.UsdUtils.SelectionExportPolicy.Never, 1: pxr.UsdUtils.SelectionExportPolicy.IfAuthored, 2: pxr.UsdUtils.SelectionExportPolicy.Always}
232
+
233
+ property name
234
+
235
+ property selectionExportPolicy
236
+
237
+ class pxr.UsdUtils.SparseAttrValueWriter
238
+ A utility class for authoring time-varying attribute values with
239
+ simple run-length encoding, by skipping any redundant time-samples.
240
+ Time-samples that are close enough to each other, with relative
241
+ difference smaller than a fixed epsilon value are considered to be
242
+ equivalent. This is to avoid unnecessary authoring of time-samples
243
+ caused by numerical fuzz in certain computations.
244
+ For vectors, matrices, and other composite types (like quaternions and
245
+ arrays), each component is compared with the corresponding component
246
+ for closeness. The chosen epsilon value for double precision floating
247
+ point numbers is 1e-12. For single-precision, it is 1e-6 and for half-
248
+ precision, it is 1e-2.
249
+ Example c++ usage:
250
+ UsdGeomSphere sphere = UsdGeomSphere::Define(stage, SdfPath("/Sphere"));
251
+ UsdAttribute radius = sphere.CreateRadiusAttr();
252
+ UsdUtilsSparseAttrValueWriter attrValueWriter(radius,
253
+ /\*defaultValue\*/ VtValue(1.0));
254
+ attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(1.0));
255
+ attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(2.0));
256
+ attrValueWriter.SetTimeSample(VtValue(10.0), UsdTimeCode(3.0));
257
+ attrValueWriter.SetTimeSample(VtValue(20.0), UsdTimeCode(4.0));
258
+
259
+ Equivalent python example:
260
+ sphere = UsdGeom.Sphere.Define(stage, Sdf.Path("/Sphere"))
261
+ radius = sphere.CreateRadiusAttr()
262
+ attrValueWriter = UsdUtils.SparseAttrValueWriter(radius, defaultValue=1.0)
263
+ attrValueWriter.SetTimeSample(10.0, 1.0)
264
+ attrValueWriter.SetTimeSample(10.0, 2.0)
265
+ attrValueWriter.SetTimeSample(10.0, 3.0)
266
+ attrValueWriter.SetTimeSample(20.0, 4.0)
267
+
268
+ In the above examples, the specified default value of radius (1.0)
269
+ will not be authored into scene description since it matches the
270
+ fallback value. Additionally, the time-sample authored at time=2.0
271
+ will be skipped since it is redundant. Also note that for correct
272
+ behavior, the calls to SetTimeSample() must be made with sequentially
273
+ increasing time values. If not, a coding error is issued and the
274
+ authored animation may be incorrect.
275
+ Methods:
276
+
277
+ SetTimeSample(value, time)
278
+ Sets a new time-sample on the attribute with given value at the given time .
279
+
280
+ SetTimeSample(value, time) → bool
281
+ Sets a new time-sample on the attribute with given value at the
282
+ given time .
283
+ The time-sample is only authored if it’s different from the previously
284
+ set time-sample, in which case the previous time-sample is also
285
+ authored, in order to to end the previous run of contiguous identical
286
+ values and start a new run.
287
+ This incurs a copy of value . Also, the value will be held in
288
+ memory at least until the next time-sample is written or until the
289
+ SparseAttrValueWriter instance is destroyed.
290
+
291
+ Parameters
292
+
293
+ value (VtValue) –
294
+ time (TimeCode) –
295
+
296
+ SetTimeSample(value, time) -> bool
297
+ This is an overloaded member function, provided for convenience. It
298
+ differs from the above function only in what argument(s) it accepts.
299
+ For efficiency, this function swaps out the given value , leaving
300
+ it empty.
301
+ The value will be held in memory at least until the next time-sample
302
+ is written or until the SparseAttrValueWriter instance is destroyed.
303
+
304
+ Parameters
305
+
306
+ value (VtValue) –
307
+ time (TimeCode) –
308
+
309
+ class pxr.UsdUtils.SparseValueWriter
310
+ Utility class that manages sparse authoring of a set of UsdAttributes.
311
+ It does this by maintaining a map of UsdAttributes to their
312
+ corresponding UsdUtilsSparseAttrValueWriter objects.
313
+ To use this class, simply instantiate an instance of it and invoke the
314
+ SetAttribute() method with various attributes and their associated
315
+ time-samples.
316
+ If the attribute has a default value, SetAttribute() must be called
317
+ with time=Default first (multiple times, if necessary), followed by
318
+ calls to author time-samples in sequentially increasing time order.
319
+ This class is not threadsafe. In general, authoring to a single USD
320
+ layer from multiple threads isn’t threadsafe. Hence, there is little
321
+ value in making this class threadsafe. Example c++ usage:
322
+ UsdGeomCylinder cylinder = UsdGeomCylinder::Define(stage, SdfPath("/Cylinder"));
323
+ UsdAttribute radius = cylinder.CreateRadiusAttr();
324
+ UsdAttribute height = cylinder.CreateHeightAttr();
325
+ UsdUtilsSparseValueWriter valueWriter;
326
+ valueWriter.SetAttribute(radius, 2.0, UsdTimeCode::Default());
327
+ valueWriter.SetAttribute(height, 2.0, UsdTimeCode::Default());
328
+
329
+ valueWriter.SetAttribute(radius, 10.0, UsdTimeCode(1.0));
330
+ valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(2.0));
331
+ valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(3.0));
332
+ valueWriter.SetAttribute(radius, 20.0, UsdTimeCode(4.0));
333
+
334
+ valueWriter.SetAttribute(height, 2.0, UsdTimeCode(1.0));
335
+ valueWriter.SetAttribute(height, 2.0, UsdTimeCode(2.0));
336
+ valueWriter.SetAttribute(height, 3.0, UsdTimeCode(3.0));
337
+ valueWriter.SetAttribute(height, 3.0, UsdTimeCode(4.0));
338
+
339
+ Equivalent python code:
340
+ cylinder = UsdGeom.Cylinder.Define(stage, Sdf.Path("/Cylinder"))
341
+ radius = cylinder.CreateRadiusAttr()
342
+ height = cylinder.CreateHeightAttr()
343
+ valueWriter = UsdUtils.SparseValueWriter()
344
+ valueWriter.SetAttribute(radius, 2.0, Usd.TimeCode.Default())
345
+ valueWriter.SetAttribute(height, 2.0, Usd.TimeCode.Default())
346
+
347
+ valueWriter.SetAttribute(radius, 10.0, 1.0)
348
+ valueWriter.SetAttribute(radius, 20.0, 2.0)
349
+ valueWriter.SetAttribute(radius, 20.0, 3.0)
350
+ valueWriter.SetAttribute(radius, 20.0, 4.0)
351
+
352
+ valueWriter.SetAttribute(height, 2.0, 1.0)
353
+ valueWriter.SetAttribute(height, 2.0, 2.0)
354
+ valueWriter.SetAttribute(height, 3.0, 3.0)
355
+ valueWriter.SetAttribute(height, 3.0, 4.0)
356
+
357
+ In the above example,
358
+
359
+ The default value of the”height”attribute is not authored into
360
+ scene description since it matches the fallback value.
361
+ Time-samples at time=3.0 and time=4.0 will be skipped for the
362
+ radius attribute.
363
+ For the”height”attribute, the first timesample at time=1.0 will
364
+ be skipped since it matches the default value.
365
+ The last time-sample at time=4.0 will also be skipped
366
+ for”height”since it matches the previously written value at time=3.0.
367
+
368
+ Methods:
369
+
370
+ GetSparseAttrValueWriters()
371
+ Returns a new vector of UsdUtilsSparseAttrValueWriter populated from the attrValueWriter map.
372
+
373
+ SetAttribute(attr, value, time)
374
+ Sets the value of attr to value at time time .
375
+
376
+ GetSparseAttrValueWriters() → list[SparseAttrValueWriter]
377
+ Returns a new vector of UsdUtilsSparseAttrValueWriter populated from
378
+ the attrValueWriter map.
379
+
380
+ SetAttribute(attr, value, time) → bool
381
+ Sets the value of attr to value at time time .
382
+ The value is written sparsely, i.e., the default value is authored
383
+ only if it is different from the fallback value or the existing
384
+ default value, and any redundant time-samples are skipped when the
385
+ attribute value does not change significantly between consecutive
386
+ time-samples.
387
+
388
+ Parameters
389
+
390
+ attr (Attribute) –
391
+ value (VtValue) –
392
+ time (TimeCode) –
393
+
394
+ SetAttribute(attr, value, time) -> bool
395
+ This is an overloaded member function, provided for convenience. It
396
+ differs from the above function only in what argument(s) it accepts.
397
+ For efficiency, this function swaps out the given value , leaving
398
+ it empty.
399
+ The value will be held in memory at least until the next time-sample
400
+ is written or until the SparseAttrValueWriter instance is destroyed.
401
+
402
+ Parameters
403
+
404
+ attr (Attribute) –
405
+ value (VtValue) –
406
+ time (TimeCode) –
407
+
408
+ SetAttribute(attr, value, time) -> bool
409
+ This is an overloaded member function, provided for convenience. It
410
+ differs from the above function only in what argument(s) it accepts.
411
+
412
+ Parameters
413
+
414
+ attr (Attribute) –
415
+ value (T) –
416
+ time (TimeCode) –
417
+
418
+ class pxr.UsdUtils.StageCache
419
+ The UsdUtilsStageCache class provides a simple interface for handling
420
+ a singleton usd stage cache for use by all USD clients. This way code
421
+ from any location can make use of the same cache to maximize stage
422
+ reuse.
423
+ Methods:
424
+
425
+ Get
426
+ classmethod Get() -> StageCache
427
+
428
+ GetSessionLayerForVariantSelections
429
+ classmethod GetSessionLayerForVariantSelections(modelName, variantSelections) -> Layer
430
+
431
+ static Get()
432
+ classmethod Get() -> StageCache
433
+ Returns the singleton stage cache.
434
+
435
+ static GetSessionLayerForVariantSelections()
436
+ classmethod GetSessionLayerForVariantSelections(modelName, variantSelections) -> Layer
437
+ Given variant selections as a vector of pairs (vector in case order
438
+ matters to the client), constructs a session layer with overs on the
439
+ given root modelName with the variant selections, or returns a cached
440
+ session layer with those opinions.
441
+
442
+ Parameters
443
+
444
+ modelName (str) –
445
+ variantSelections (list[tuple[str, str]]) –
446
+
447
+ class pxr.UsdUtils.TimeCodeRange
448
+ Represents a range of UsdTimeCode values as start and end time codes
449
+ and a stride value.
450
+ A UsdUtilsTimeCodeRange can be iterated to retrieve all time code
451
+ values in the range. The range may be empty, it may contain a single
452
+ time code, or it may represent multiple time codes from start to end.
453
+ The interval defined by the start and end time codes is closed on both
454
+ ends.
455
+ Note that when constructing a UsdUtilsTimeCodeRange,
456
+ UsdTimeCode::EarliestTime() and UsdTimeCode::Default() cannot be used
457
+ as the start or end time codes. Also, the end time code cannot be less
458
+ than the start time code for positive stride values, and the end time
459
+ code cannot be greater than the start time code for negative stride
460
+ values. Finally, the stride value cannot be zero. If any of these
461
+ conditions are not satisfied, then an invalid empty range will be
462
+ returned.
463
+ Classes:
464
+
465
+ Tokens
466
+
467
+ Methods:
468
+
469
+ CreateFromFrameSpec
470
+ classmethod CreateFromFrameSpec(frameSpec) -> TimeCodeRange
471
+
472
+ IsValid()
473
+ Return true if this range contains one or more time codes, or false otherwise.
474
+
475
+ empty()
476
+ Return true if this range contains no time codes, or false otherwise.
477
+
478
+ Attributes:
479
+
480
+ endTimeCode
481
+ TimeCode
482
+
483
+ frameSpec
484
+
485
+ startTimeCode
486
+ TimeCode
487
+
488
+ stride
489
+ float
490
+
491
+ class Tokens
492
+ Attributes:
493
+
494
+ EmptyTimeCodeRange
495
+
496
+ RangeSeparator
497
+
498
+ StrideSeparator
499
+
500
+ EmptyTimeCodeRange = 'NONE'
501
+
502
+ RangeSeparator = ':'
503
+
504
+ StrideSeparator = 'x'
505
+
506
+ static CreateFromFrameSpec()
507
+ classmethod CreateFromFrameSpec(frameSpec) -> TimeCodeRange
508
+ Create a time code range from frameSpec .
509
+ A FrameSpec is a compact string representation of a time code range. A
510
+ FrameSpec may contain up to three floating point values for the start
511
+ time code, end time code, and stride values of a time code range.
512
+ A FrameSpec containing just a single floating point value represents a
513
+ time code range containing only that time code.
514
+ A FrameSpec containing two floating point values separated by the
515
+ range separator (‘:’) represents a time code range from the first
516
+ value as the start time code to the second values as the end time
517
+ code.
518
+ A FrameSpec that specifies both a start and end time code value may
519
+ also optionally specify a third floating point value as the stride,
520
+ separating it from the first two values using the stride separator
521
+ (‘x’).
522
+ The following are examples of valid FrameSpecs: 123 101:105 105:101
523
+ 101:109x2 101:110x2 101:104x0.5
524
+ An empty string corresponds to an invalid empty time code range.
525
+ A coding error will be issued if the given string is malformed.
526
+
527
+ Parameters
528
+ frameSpec (str) –
529
+
530
+ IsValid() → bool
531
+ Return true if this range contains one or more time codes, or false
532
+ otherwise.
533
+
534
+ empty() → bool
535
+ Return true if this range contains no time codes, or false otherwise.
536
+
537
+ property endTimeCode
538
+ TimeCode
539
+ Return the end time code of this range.
540
+
541
+ Type
542
+ type
543
+
544
+ property frameSpec
545
+
546
+ property startTimeCode
547
+ TimeCode
548
+ Return the start time code of this range.
549
+
550
+ Type
551
+ type
552
+
553
+ property stride
554
+ float
555
+ Return the stride value of this range.
556
+
557
+ Type
558
+ type
559
+
560
+ class pxr.UsdUtils.UsdStageStatsKeys
561
+ Attributes:
562
+
563
+ activePrimCount
564
+
565
+ approxMemoryInMb
566
+
567
+ assetCount
568
+
569
+ inactivePrimCount
570
+
571
+ instanceCount
572
+
573
+ instancedModelCount
574
+
575
+ modelCount
576
+
577
+ primCounts
578
+
579
+ primCountsByType
580
+
581
+ primary
582
+
583
+ prototypeCount
584
+
585
+ prototypes
586
+
587
+ pureOverCount
588
+
589
+ totalInstanceCount
590
+
591
+ totalPrimCount
592
+
593
+ untyped
594
+
595
+ usedLayerCount
596
+
597
+ activePrimCount = 'activePrimCount'
598
+
599
+ approxMemoryInMb = 'approxMemoryInMb'
600
+
601
+ assetCount = 'assetCount'
602
+
603
+ inactivePrimCount = 'inactivePrimCount'
604
+
605
+ instanceCount = 'instanceCount'
606
+
607
+ instancedModelCount = 'instancedModelCount'
608
+
609
+ modelCount = 'modelCount'
610
+
611
+ primCounts = 'primCounts'
612
+
613
+ primCountsByType = 'primCountsByType'
614
+
615
+ primary = 'primary'
616
+
617
+ prototypeCount = 'prototypeCount'
618
+
619
+ prototypes = 'prototypes'
620
+
621
+ pureOverCount = 'pureOverCount'
622
+
623
+ totalInstanceCount = 'totalInstanceCount'
624
+
625
+ totalPrimCount = 'totalPrimCount'
626
+
627
+ untyped = 'untyped'
628
+
629
+ usedLayerCount = 'usedLayerCount'
630
+
631
+ © Copyright 2019-2023, NVIDIA.
632
+ Last updated on Nov 14, 2023.
633
+
634
+
635
+