file_path
stringlengths
5
44
content
stringlengths
75
400k
1_9_10.md
1.9.10 — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Release Notes » 1.9.10   # 1.9.10 Release Date: Jan 2024 ## Added Anonymize telemetry events when users opt out of data collection. Support feature targeting by OS, Launcher version, build or user profile. Update Nucleus Navigator to 3.3.4. Support silent launch for custom protocol commands. ## Changed Enabled “Newest” sorting for the Exchange tab by default. ## Fixed Fixed an issue where Launcher did not bring its main window to the front when Launcher opened a second instance. Fixed an issue where Launcher closed the application when its main window was closed from the taskbar. Fixed an issue where Launcher installation might hang before running installation scripts. Fixed an issue where Hub settings represented incorrect information in the UI. Fixed an issue where Navigator did not refresh its server list after Nucleus installation. Fixed an issue where Nucleus installation was displayed on top of other UI elements. Fixed an issue where closing the main window in IT Managed Launcher closed the entire application. Fixed a crash in IT Managed Launcher when a user opens a Nucleus tab without internet connection. Users are now redirected to the library page when Nucleus is uninstalled in IT Managed Launcher. Fixed an issue with the version drop-down arrow displayed incorrectly. Validated email input on the login screen. Fixed an issue where the email field was not updated in privacy.toml after users sign in. Fixed an incorrect error translation for Czech language. Fixed an issue where the dialog close icon was not clickable when the scroll bar was displayed. Fixed an issue where the uninstall notification did not include the component version. Fixed an issue where Launcher could not register the first Nucleus account. ## Security Fix for CVE-2023-45133. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.CanvasFrame.md
CanvasFrame — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » CanvasFrame   # CanvasFrame class omni.ui.CanvasFrame Bases: Frame CanvasFrame is the widget that allows the user to pan and zoom its children with a mouse. It has the layout that can be infinitely moved in any direction. Methods __init__(self, **kwargs) Constructs CanvasFrame. screen_to_canvas(self, x, y) Transforms screen-space coordinates to canvas-space screen_to_canvas_x(self, x) Transforms screen-space X to canvas-space X. screen_to_canvas_y(self, y) Transforms screen-space Y to canvas-space Y. set_pan_key_shortcut(self, mouse_button, ...) Specify the mouse button and key to pan the canvas. set_pan_x_changed_fn(self, fn) The horizontal offset of the child item. set_pan_y_changed_fn(self, fn) The vertical offset of the child item. set_zoom_changed_fn(self, fn) The zoom level of the child item. set_zoom_key_shortcut(self, mouse_button, ...) Specify the mouse button and key to zoom the canvas. Attributes compatibility This boolean property controls the behavior of CanvasFrame. draggable Provides a convenient way to make the content draggable and zoomable. pan_x The horizontal offset of the child item. pan_y The vertical offset of the child item. smooth_zoom When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn't provide smooth scrolling. zoom The zoom level of the child item. zoom_max The zoom maximum of the child item. zoom_min The zoom minimum of the child item. __init__(self: omni.ui._ui.CanvasFrame, **kwargs) → None Constructs CanvasFrame. `kwargsdict`See below ### Keyword Arguments: `pan_x`The horizontal offset of the child item. `pan_y`The vertical offset of the child item. `zoom`The zoom minimum of the child item. `zoom_min`The zoom maximum of the child item. `zoom_max`The zoom level of the child item. `compatibility`This boolean property controls the behavior of CanvasFrame. When set to true, the widget will function in the old way. When set to false, the widget will use a newer and faster implementation. This variable is included as a transition period to ensure that the update does not break any existing functionality. Please be aware that the old behavior may be deprecated in the future, so it is recommended to set this variable to false once you have thoroughly tested the new implementation. `pan_x_changed_fn`The horizontal offset of the child item. `pan_y_changed_fn`The vertical offset of the child item. `zoom_changed_fn`The zoom level of the child item. `draggable`Provides a convenient way to make the content draggable and zoomable. `horizontal_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. `vertical_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. `separate_window`A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. `raster_policy`Determine how the content of the frame should be rasterized. `build_fn`Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. screen_to_canvas(self: omni.ui._ui.CanvasFrame, x: float, y: float) → Tuple[float, float] Transforms screen-space coordinates to canvas-space screen_to_canvas_x(self: omni.ui._ui.CanvasFrame, x: float) → float Transforms screen-space X to canvas-space X. screen_to_canvas_y(self: omni.ui._ui.CanvasFrame, y: float) → float Transforms screen-space Y to canvas-space Y. set_pan_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int) → None Specify the mouse button and key to pan the canvas. set_pan_x_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None]) → None The horizontal offset of the child item. set_pan_y_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None]) → None The vertical offset of the child item. set_zoom_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float], None]) → None The zoom level of the child item. set_zoom_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int) → None Specify the mouse button and key to zoom the canvas. property compatibility This boolean property controls the behavior of CanvasFrame. When set to true, the widget will function in the old way. When set to false, the widget will use a newer and faster implementation. This variable is included as a transition period to ensure that the update does not break any existing functionality. Please be aware that the old behavior may be deprecated in the future, so it is recommended to set this variable to false once you have thoroughly tested the new implementation. property draggable Provides a convenient way to make the content draggable and zoomable. property pan_x The horizontal offset of the child item. property pan_y The vertical offset of the child item. property smooth_zoom When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn’t provide smooth scrolling. property zoom The zoom level of the child item. property zoom_max The zoom maximum of the child item. property zoom_min The zoom minimum of the child item. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
workstation-launcher.md
User Guide — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » User Guide   # User Guide This document describes the components and workflow of the Omniverse Launcher. Making it easy for users to manage their Omniverse Apps, Connectors, and provides Nucleus Collaboration Services; the Omniverse Launcher acts as your personal launchpad for the Omniverse. The Omniverse Launcher is available for download from the Omniverse Getting Started page or from NVIDIA’s licensing and software portal for Enterprise customers. ## News Tab The Omniverse news Tab allows users to review and learn about things related to Omniverse. ## Exchange Tab The Omniverse Exchange is the place where Omniverse Apps, Connectors, File Tools and more can be found and installed. Simply navigate through the list of available apps and connectors, select the version, and install. Once installed, this area can also be used to launch apps. ## Library Tab The Omniverse Library makes it easy to see, launch, update, and/or learn about Omniverse Apps installed on your computer. Note If this list is empty this is because you currently have no applications installed. This can easily be remedied by clicking over to the Exchange and installing the apps/connectors of your choice. ### Library Panel The Omniverse Library Panel is located on the left side of the screen and lists all installed Apps, Connectors and more. Selecting one of the items on the list will reveal useful data in the main window about the tool as well as provides functionality based on the item type selected. Note The Omniverse Library Panel will be unpopulated until apps are installed. If your list is empty, please navigate to the Exchange Tab to install apps, connectors, and other Omniverse tools. #### Apps On the top of the Library panel, apps are listed. Upon selecting an App, a series of options will be provided for managing the App in the main display. Option Description Launch Button The launch button allows users to easily launch a selected App. Install Settings Found in the Hamburger Menu to the right of the Launch Button, The Settings Pane allows you to review the install path, update, or uninstall the Selected App Release Notes Launches the Documentation Portal for the selected App and takes you to the Latest Release Notes. Documentation Launches the Documentation Portal for the Selected App. Tutorials Launches the Video Learning content for the selected App. Forums Launches the Forum Pages for in-depth discussion on the selected App. #### Development Tools Upon installing Kit, a development tools Tab will appear below Apps. Development tools are typically handled and managed in the same way as Apps and offers similar tools for managing these tools. Option Description Launch Button The launch button allows users to easily launch a selected App. Install Settings Found in the triple Bars to the right of the Launch Button, The Settings Pane allows you to review the install path, update, or uninstall the Selected App Release Notes Launches the Documentation Portal for the selected App and Takes you to the Latest Release Notes. Documentation Launches the Documentation Portal for the Selected App. Tutorials Launches the Video Learning content for the selected App. Forums Launches the Forum Pages for in depth discussion on the selected App. #### File Management File management tools provide utilities for managing file operations on the Omniverse. These tools by their nature are less cohesive in their tooling and have variation on their UI controls. Please see the documentation of the tool in question should you need explanation of how to manage. #### Connectors All connectors appear under the connectors icon and are displayed in a list allowing management. For each connector installed, an entry will appear in the list with the ability to add additional connectors easily should you need them. Option Description Add Allows adding additional connectors and brings you to the Connectors Exchange. Update If a connector is out of date, a green Update Button will be displayed allowing you to update to the most current release of that connector. Up To Date When a connector on the list is up to date, a greyed out “up to date” notification will be presented. ### Updating an App Any app previously installed that has an update available will display with the following green highlight. Selecting (left-click) the highlight will allow you to locate the update (green). Upon selecting, the launcher update status will show the progress. Once the update is complete The Launch Button will auto-select the updated version. An Alert confirming the success or failure + reason will be generated. The highlight will be removed. Note In the Library Tab, only the latest version of an application is listed for quick install. Versions released after the installed version and before the latest version are available for installation in the Exchange Tab. ## Exchange Tab The Omniverse Exchange is the place where Omniverse Apps, Connectors, File Tools and more can be found and installed. Simply navigate through the list of available apps and connectors, select the version, and install. Once installed, this area can also be used to launch apps. ## Updating a Connector Connectors have a unified interface. Simply select Connectors under the Exchange Tab and any installed connectors will have an green notification bell shown. Option Description Filters Allows refinement of list based on selection Search Contextual Search allows locating a specific App or Connector easily. Apps List Shows all available Apps or Connectors based on Filters and Search. ### Product Overview When selected, details about the app/connector/tool are presented including overall description, version information, supported platforms, and system requirements. This information can be useful to decide if the app/connector/tool is right for you before downloading and installing. ### Install Apps Apps are installed and launched by selecting items in the Exchange Tab: Available releases are categorized by release channel. A release is classified as Alpha, Beta, Release, or Enterprise, depending on its maturity and stability. If an Alpha or Beta release is selected, a banner will appear on the main image to emphasize the relative stability and completeness of that release. Alpha or Beta releases may not be feature complete or fully stable. Versions classified as Release (also known as GA or General Availability) are feature complete and stable. Release versions that are supported for Enterprise customers appear in the Enterprise list. After selecting the desired version, clicking the Install Button will initialize installation. ## Nucleus Tab The Omniverse Launcher Nucleus Tab offers the experience of the Omniverse Nucleus Navigator app directly in the Launcher, enabling users to quickly and easily navigate and manage content in their Omniverse Nucleus servers. For more information on Navigator features and functionality, please review Omniverse Nucleus Navigator. Important If you are looking to host a large, company wide installation of Nucleus and expect large amounts of traffic, other more robust Nucleus packages are available and should be used in lieu or addition to local Server(s). Note A network can have multiple Nucleus Installations and there is no harm in having both Linux Docker Installations and Local Servers on the same network. They will exist independently of each other and do not conflict. ### Create your administration Account As this process installs a set of services and effectively turns your workstation into a server, an administration account will be needed. This account allows full and complete control over your Nucleus and is unrelated to any other NVIDIA Accounts. This is your servers primary account and specifically allows you access to the server you are currently installing. Press the Create to finalize the user admin account and log in. ### Connecting to Collaboration Once the above steps have been followed, Users can now connect to your Omniverse Nucleus collaboration service. This is also true for Local Applications. In order to connect to the collaboration service connect with the network address of the host that is also accessible to the user you wish to share with. For details on connecting, please see the documentation for the omniverse app, connector or utility you are using. #### Connecting Locally If the collaboration service resides on your workstation, you can also use localhost to connect with local apps and connectors. #### Additional Collaboration Information For more information on the Nucleus Collaboration Services, please review Nucleus Documentation ## Alerts The alert icon in the top right of the notifies your of important Omniverse Messages. ## User Settings The User Settings panel allows users to choose the default install path for the Omniverse Library Apps & Connectors. ### Settings Option Description Library Path This location specifies where apps, connectors and tools are installed when installed from Launcher. Data Path Displays and allows selection of the Data Path. The data path is where all content on the local Nucleus is stored. ### About Gives version information about Launcher. ### Log out Logs out of the Launcher. ## Accessibility Omniverse Launcher Text and Layout accommodates text/image scale adjustment to help users with readability and/or high resolution monitors. Key Command Action Ctrl + - Scale Text/Images Smaller Ctrl + Shift + + Scale Text/Images Larger Ctrl + 0 Reset Scale to Default © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.ToolBarAxis.md
ToolBarAxis — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » ToolBarAxis   # ToolBarAxis class omni.ui.ToolBarAxis Bases: pybind11_object Members: X Y Methods __init__(self, value) Attributes X Y name value __init__(self: omni.ui._ui.ToolBarAxis, value: int) → None property name © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
tokens.md
Tokens — kit-manual 105.1 documentation kit-manual » Tokens   # Tokens Kit supports tokens to make the configuration more flexible. They take the form of ${token}. They are implemented in carb.tokens Carbonite plugin. Most of the tokens in settings are resolved when configuration is loaded. Some settings are set later and for those, it is each extension’s responsibility to resolve tokens in them. Tokens are most often used to build various filesystem paths. List of commonly used tokens, that are always available: ## App Tokens ${app_name} - Application name, e.g.: Create, View, omni.create (/app/name setting, othewise name of kit file) ${app_filename} - Application kit filename, e.g.: omni.create, omni.app.mini ${app_version} - Application version, e.g.: 2022.3.0-rc.5 (/app/version setting, otherwise version in kit file) ${app_version_short} - Application major.minor version, e.g. 2022.3 (version of the app from kit file) ${kit_version} - Kit version, e.g.: 105.0+master.123.b1255276.tc ${kit_version_short} - Kit major.minor version, e.g.: 105.0 ${kit_git_hash} - Kit git hash, e.g.: b1255276 When running without an app, e.g. kit.exe --enable [ext], then ${app_name} becomes kit and app version equals to the kit version. ## Environment Variable Tokens Tokens can be used to read environment variables: ${env:VAR_NAME} - Environment variable, e.g.: ${env:USERPROFILE} ## Path Tokens There are a few important folders that Kit provides for extensions to read and write to. While may look similar there are conceptual differences between them. For each of them, there are a few tokens. They point to app specific and Omniverse wide versions of a folder. They also influenced by running in “portable mode” (developer mode, --portable) or not. For some token ${folder} that represents a folder named [FOLDER NAME] it will look like this: ${folder} - Kit app specific version: portable mode: [PORTABLE ROOT]/[FOLDER NAME]/Kit/${app_name}/${app_version_short}. non-portable mode: [SYSTEM PATH]/[FOLDER NAME]/Kit/${app_name}/${app_version_short}. ${omni_folder} - Omniverse wide version: portable mode: [PORTABLE ROOT]/[FOLDER NAME]. non-portable mode: [SYSTEM PATH]/[FOLDER NAME]. ${omni_global_folder} - Omniverse wide version, that is not influenced by portable mode: portable mode: [SYSTEM PATH]/[FOLDER NAME]. non-portable mode: [SYSTEM PATH]/[FOLDER NAME]. ### Data Folder Data folder is a per user system folder to store persistent data. This system folder is different for every OS user. Data folder is where an application can write anything that must reliably persist between sessions. For example, user settings are stored there. ${data} - kit app specific version, e.g.: C:/Users/[user]/AppData/Local/ov/data/Kit/${app_name}/${app_version_short}. ${omni_data} - Omniverse wide version, e.g.: C:/Users/[user]/AppData/Local/ov/data. ${omni_global_data} - Omniverse wide version, that is not influenced by portable mode: ### Program data Program data folder is a global system folder to store persistent data. This system folder is shared by all OS users. Otherwise it can be used the same way as data folder. {app_program_data} - kit app specific version, e.g.: C:/ProgramData/NVIDIA Corporation/kit/${app_name}. {shared_program_data} - Kit wide version, e.g.: C:/ProgramData/NVIDIA Corporation/kit. ${omni_program_data} - System wide version, e.g.: C:/ProgramData ### Documents folder Documents folder is a system folder to store user’s data. Typically it is like a user home directory, where user can store anything. For example, default location when picking where to save a stage. ${app_documents} - kit app specific version, e.g.: C:/Users/[user]/Documents/Kit/apps/${app_name}. ${shared_documents} - kit wide version, e.g.: C:/Users/[user]/Documents/Kit/shared. ${omni_documents} - Omniverse wide version, e.g.: C:/Users/[user]/Documents/Kit. ### Cache folder Cache folder is a system folder to be used for caching. It can be cleaned up between runs (usually it is not). And application should be able to rebuild the cache if it is missing. This one is using Kit version and git hash. So, always shared between apps. You can build app specific version manually using tokens like ${app_name}. [KIT VERSION SHORT] - Kit major.minor version, like 105.0 [KIT GIT HASH] - Kit git hash, like a1b2c4d4 ${cache} - kit specific version, e.g.: C:/Users/[user]/AppData/Local/ov/cache/Kit/[KIT VERSION SHORT]/[KIT GIT HASH]. ${omni_cache} - Omniverse wide version, e.g.: C:/Users/[user]/AppData/Local/ov/cache. ${omni_global_cache} - Omniverse wide version, that is not influenced by portable mode. ### Logs folder System folder to store logs. ${logs} - kit app specific version, e.g.: C:/Users/[user]/.nvidia-omniverse/logs/Kit/${app_name}/${app_version_short} ${omni_logs} - Omniverse wide version, e.g.: C:/Users/[user]/.nvidia-omniverse/logs ${omni_global_logs} - Omniverse wide version, that is not influenced by portable mode: ### Config folder System folder where Omniverse config omniverse.toml is read from: ${omni_config} - Omniverse wide version, e.g.: C:/Users/[user]/.nvidia-omniverse/config ${omni_global_config} - Omniverse wide version, that is not influenced by portable mode: ### Temporary folder Temporary folder is cleaned between runs and provided by OS. ${temp} - e.g.: C:/Users/[user]/AppData/Local/Temp/xplw.0 ### Other useful paths ${kit} - path to Kit folder, where the Kit executable is (it is not always the same executable as was used to run currently, because someone could run from python.exe). ${app} - path to app, if loaded with --merge-config that will be a folder where this config is. ${python} - path to python interpreter executable. ### Platform tokens ${config} - whether debug or release build is running. ${platform} - target platform Kit is running on, e.g. windows-x86_64. ${lib_ext} - .dll on Windows, .so on Linux, .dylib on Mac OS. ${lib_prefix} - empty on Windows, lib on Linux and Mac OS. ${bindings_ext} - .pyd on Windows, .so on Linux and Mac OS. ${exe_ext} - .exe on Windows, empty on Linux and Mac OS. ${shell_ext} - .bat on Windows, .sh on Linux and Mac OS. ### Extension tokens Each extension sets a token with the extension name and extension folder path. See Extension Tokens. ## Overriding Tokens Some tokens can be overridden by using /app/tokens setting namespace. E.g.: --/app/tokens/data="C:/data". ## Checking Token Values Kit logs all tokens in INFO log level, search for Tokens:. Either look in a log file or run with -v. You can also print all tokens using settings: import carb.settings settings = carb.settings.get_settings() print(settings.get("/app/tokens")) ## Resolving your path To make your path (or string) support tokens you must resolve it before using it, like this: path = carb::tokens::resolveString(carb::getCachedInterface<carb::tokens::ITokens>(), path); import carb.tokens path = carb.tokens.get_tokens_interface().resolve(path) © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
omni.ui.get_main_window_width.md
get_main_window_width — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Functions » get_main_window_width   # get_main_window_width omni.ui.get_main_window_width() → float Get the width in points of the current main window. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
CameraUtil.md
CameraUtil module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » CameraUtil module   # CameraUtil module Summary: Camera Utilities Camera utilities. Classes: ConformWindowPolicy Framing Framing information. ScreenWindowParameters Given a camera object, compute parameters suitable for setting up RenderMan. class pxr.CameraUtil.ConformWindowPolicy Methods: GetValueFromName Attributes: allValues static GetValueFromName() allValues = (CameraUtil.MatchVertically, CameraUtil.MatchHorizontally, CameraUtil.Fit, CameraUtil.Crop, CameraUtil.DontConform) class pxr.CameraUtil.Framing Framing information. That is information determining how the filmback plane of a camera maps to the pixels of the rendered image (displayWindow together with pixelAspectRatio and window policy) and what pixels of the image will be filled by the renderer (dataWindow). The concepts of displayWindow and dataWindow are similar to the ones in OpenEXR, including that the x- and y-axis of the coordinate system point left and down, respectively. In fact, these windows mean the same here and in OpenEXR if the displayWindow has the same aspect ratio (when accounting for the pixelAspectRatio) as the filmback plane of the camera has (that is the ratio of the horizontalAperture to verticalAperture of, e.g., Usd’s Camera or GfCamera). In particular, overscan can be achieved by making the dataWindow larger than the displayWindow. If the aspect ratios differ, a window policy is applied to the displayWindow to determine how the pixels correspond to the filmback plane. One such window policy is to take the largest rect that fits (centered) into the displayWindow and has the camera’s aspect ratio. For example, if the displayWindow and dataWindow are the same and both have an aspect ratio smaller than the camera, the image is created by enlarging the camera frustum slightly in the bottom and top direction. When using the AOVs, the render buffer size is determined independently from the framing info. However, the dataWindow is supposed to be contained in the render buffer rect (in particular, the dataWindow cannot contain pixels withs negative coordinates - this restriction does not apply if, e.g., hdPrman circumvents AOVs and writes directly to EXR). In other words, unlike in OpenEXR, the rect of pixels for which we allocate storage can differ from the rect the renderer fills with data (dataWindow). For example, an application can set the render buffer size to match the widget size but use a dataWindow and displayWindow that only fills the render buffer horizontally to have slates at the top and bottom. Methods: ApplyToProjectionMatrix(projectionMatrix, ...) Given the projectionMatrix computed from a camera, applies the framing. IsValid() Is display and data window non-empty. Attributes: dataWindow displayWindow pixelAspectRatio ApplyToProjectionMatrix(projectionMatrix, windowPolicy) → Matrix4d Given the projectionMatrix computed from a camera, applies the framing. To obtain a correct result, a rasterizer needs to use the resulting projection matrix and set the viewport to the data window. Parameters projectionMatrix (Matrix4d) – windowPolicy (ConformWindowPolicy) – IsValid() → bool Is display and data window non-empty. property dataWindow property displayWindow property pixelAspectRatio class pxr.CameraUtil.ScreenWindowParameters Given a camera object, compute parameters suitable for setting up RenderMan. Attributes: fieldOfView float screenWindow Vec4d zFacingViewMatrix Matrix4d property fieldOfView float The field of view. More precisely, the full angle perspective field of view (in degrees) between screen space coordinates (-1,0) and (1,0). Give these parameters to RiProjection as parameter after”perspective”. Type type property screenWindow Vec4d The vector (left, right, bottom, top) defining the rectangle in the image plane. Give these parameters to RiScreenWindow. Type type property zFacingViewMatrix Matrix4d Returns the inverse of the transform for a camera that is y-Up and z-facing (vs the OpenGL camera that is (-z)-facing). Write this transform with RiConcatTransform before RiWorldBegin. Type type © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
event_streams.md
Event streams — kit-manual 105.1 documentation kit-manual » Event streams   # Event streams Event streams are covered by the carb.events plugin and carb::events::IEvents Carbonite interface. The goal of event streams is to provide a means to move data around using the generalized interface in a thread-safe manner, and also act as a way to synchronize the logic. ## API/design overview The singleton IEvents interface is used to create IEventStream objects. Whenever an event is being pushed into an event stream, the immediate callback is triggered, and the event stream stores the event in the internal event queue. Then, events can be popped from the queue one by one, or all at once (also called pump), and at this point deferred callbacks are triggered. The event stream owner typically controls where this pumping is happening. Event consumers can subscribe to both immediate (push) and deferred (pop) callbacks. Subscription functions create ISubscription class, which usually unsubscribes automatically upon destruction. Callbacks are wrapped into IEventListener class that allows for context binding to the subscription, and upon triggering, the callback is triggered with the IEvent passed as parameter, this parameter describes the event which triggered the callback. IEvent contains event type, sender id and custom payload, which is stored as carb.dictionary item. ## Recommended usage The events subsystem is flexible and there are several recommendations that are intended to help the most frequent use-cases, as well as provide clarifications on specific parts of the events logic. ### Deferred callbacks As opposed to immediate callback invocation, the recommended way of using events streams is through the deferred callbacks mechanisms, unless using immediate callbacks are absolutely necessary. When an event is pushed into an event stream, it is fairly frequent that the subsequent immediate callback is not a safe place to modify or even read related data outside the event payload. To avoid corruptions, it is recommended to use the deferred callbacks, which will be triggered at some place that the event stream owner deemed safe. ### Event types Each event contains an event type, which is set upon pushing the event into the stream, and can be specified when a consumer subscribes to an event stream. This can be used to narrow/decrease the number of callback invocations, which is especially important when listening to the event stream from the scripting language. It is recommended to use string hashes as event types, as this will help avoid managing the event type allocation in case multiple sources can push events into an event stream. In C++, use CARB_EVENTS_TYPE_FROM_STR which provides a 64-bit FNV-1a hash computed in compile-time, or its run-time counterpart, carb::events::typeFromString. In Python, carb.events.type_from_string can be used. Important event streams design choices: either multiple event streams with fairly limited number of event types served by each, or one single event stream can be created, serving many different event types. The latter approach is more akin to the event bus with many producers and consumers. Event buses are useful when designing a system that is easily extendable. ### Transient subscriptions In case you want to implement a deferred-action triggered by some event - instead of subscribing to the event on startup and then checking the action queue on each callback trigger, consider doing the transient subscriptions. This approach involves subscribing to the event stream only after you have a specific instance of action you want to execute in a deferred manner. When the event callback subscription is triggered, you execute the action and immediately unsubscribe, so you don’t introduce an empty callback ticking unconditionally each time the event happens. The transient subscription can also include a simple counter, so you execute your code only on Nth event, not necessarily on the next one. ## Code examples ### Subscribe to Shutdown Events # App/Subscribe to Shutdown Events import carb.events import omni.kit.app # Stream where app sends shutdown events shutdown_stream = omni.kit.app.get_app().get_shutdown_event_stream() def on_event(e: carb.events.IEvent): if e.type == omni.kit.app.POST_QUIT_EVENT_TYPE: print("We are about to shutdown") sub = shutdown_stream.create_subscription_to_pop(on_event, name="name of the subscriber for debugging", order=0) ### Subscribe to Update Events # App/Subscribe to Update Events import carb.events import omni.kit.app update_stream = omni.kit.app.get_app().get_update_event_stream() def on_update(e: carb.events.IEvent): print(f"Update: {e.payload['dt']}") sub = update_stream.create_subscription_to_pop(on_update, name="My Subscription Name") ### Create custom event # App/Create Custom Event import carb.events import omni.kit.app # Event is unique integer id. Create it from string by hashing, using helper function. # [ext name].[event name] is a recommended naming convention: MY_CUSTOM_EVENT = carb.events.type_from_string("omni.my.extension.MY_CUSTOM_EVENT") # App provides common event bus. It is event queue which is popped every update (frame). bus = omni.kit.app.get_app().get_message_bus_event_stream() def on_event(e): print(e.type, e.type == MY_CUSTOM_EVENT, e.payload) # Subscribe to the bus. Keep subscription objects (sub1, sub2) alive for subscription to work. # Push to queue is called immediately when pushed sub1 = bus.create_subscription_to_push_by_type(MY_CUSTOM_EVENT, on_event) # Pop is called on next update sub2 = bus.create_subscription_to_pop_by_type(MY_CUSTOM_EVENT, on_event) # Push event the bus with custom payload bus.push(MY_CUSTOM_EVENT, payload={"data": 2, "x": "y"}) © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
it-managed-launcher.md
Installation Guide — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Installation Guide   # Installation Guide This guide is designed for IT Managers and Systems Administrators who need to install and configure Omniverse Enterprise within a firewalled, air-gapped environment (i.e., limited or no Internet access), or want to prevent users from installing unapproved Omniverse applications. The instructions and information provided covers the installation and functional use of Omniverse Foundation applications and 3D sample content. There are four primary steps involved in setting up a user’s workstation in a firewalled environment, and we encourage you to fully read the instructions before proceeding. Downloading, installing, and configuring the IT Managed Launcher on a user’s workstation. Downloading and Installing one or more Omniverse Foundation Applications on a user’s workstation. Optional download Installation and configuration of Omniverse Sample 3D Content which can be stored in one of two locations: Users’ workstations local hard disk. Stored on a shared Enterprise Nucleus Server that the users’ workstations can access through a local network. Planning Your Installation Installation on Windows Installation on Linux Uninstalling Apps (Win & Linux) © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.MenuHelper.md
MenuHelper — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » MenuHelper   # MenuHelper class omni.ui.MenuHelper Bases: pybind11_object The helper class for the menu that draws the menu line. Methods __init__(*args, **kwargs) call_triggered_fn(self) Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination. has_triggered_fn(self) Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination. set_triggered_fn(self, fn) Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action's shortcut key combination. Attributes checkable This property holds whether this menu item is checkable. delegate hide_on_click Hide or keep the window when the user clicked this item. hotkey_text This property holds the menu's hotkey text. menu_compatibility text This property holds the menu's text. __init__(*args, **kwargs) call_triggered_fn(self: omni.ui._ui.MenuHelper) → None Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. has_triggered_fn(self: omni.ui._ui.MenuHelper) → bool Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. set_triggered_fn(self: omni.ui._ui.MenuHelper, fn: Callable[[], None]) → None Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. property checkable This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. property hide_on_click Hide or keep the window when the user clicked this item. property hotkey_text This property holds the menu’s hotkey text. property text This property holds the menu’s text. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.CollapsableFrame.md
CollapsableFrame — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » CollapsableFrame   # CollapsableFrame class omni.ui.CollapsableFrame Bases: Frame CollapsableFrame is a frame widget that can hide or show its content. It has two states expanded and collapsed. When it’s collapsed, it looks like a button. If it’s expanded, it looks like a button and a frame with the content. It’s handy to group properties, and temporarily hide them to get more space for something else. Methods __init__(self[, title]) Constructs CollapsableFrame. call_build_header_fn(self, arg0, arg1) Set dynamic header that will be created dynamiclly when it is needed. has_build_header_fn(self) Set dynamic header that will be created dynamiclly when it is needed. set_build_header_fn(self, fn) Set dynamic header that will be created dynamiclly when it is needed. set_collapsed_changed_fn(self, fn) The state of the CollapsableFrame. Attributes alignment This property holds the alignment of the label in the default header. collapsed The state of the CollapsableFrame. title The header text. __init__(self: omni.ui._ui.CollapsableFrame, title: str = '', **kwargs) → None Constructs CollapsableFrame. ### Arguments: `text :`The text for the caption of the frame. `kwargsdict`See below ### Keyword Arguments: `collapsed`The state of the CollapsableFrame. `title`The header text. `alignment`This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered. `build_header_fn`Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. `collapsed_changed_fn`The state of the CollapsableFrame. `horizontal_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. `vertical_clipping`When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertial direction. `separate_window`A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. `raster_policy`Determine how the content of the frame should be rasterized. `build_fn`Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. call_build_header_fn(self: omni.ui._ui.CollapsableFrame, arg0: bool, arg1: str) → None Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. has_build_header_fn(self: omni.ui._ui.CollapsableFrame) → bool Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. set_build_header_fn(self: omni.ui._ui.CollapsableFrame, fn: Callable[[bool, str], None]) → None Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. set_collapsed_changed_fn(self: omni.ui._ui.CollapsableFrame, fn: Callable[[bool], None]) → None The state of the CollapsableFrame. property alignment This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered. property collapsed The state of the CollapsableFrame. property title The header text. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
UsdSkel.md
UsdSkel module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » UsdSkel module   # UsdSkel module Summary: The UsdSkel module defines schemas and API that form a basis for interchanging skeletally-skinned meshes and joint animations. Classes: AnimMapper AnimQuery Class providing efficient queries of primitives that provide skel animation. Animation Describes a skel animation, where joint animation is stored in a vectorized form. Binding Helper object that describes the binding of a skeleton to a set of skinnable objects. BindingAPI Provides API for authoring and extracting all the skinning-related data that lives in the"geometry hierarchy"of prims and models that want to be skeletally deformed. BlendShape Describes a target blend shape, possibly containing inbetween shapes. BlendShapeQuery Helper class used to resolve blend shape weights, including inbetweens. Cache Thread-safe cache for accessing query objects for evaluating skeletal data. InbetweenShape Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape. PackedJointAnimation Deprecated. Root Boundable prim type used to identify a scope beneath which skeletally- posed primitives are defined. Skeleton Describes a skeleton. SkeletonQuery Primary interface to reading bound skeleton data. SkinningQuery Object used for querying resolved bindings for skinning. Tokens Topology Object holding information describing skeleton topology. class pxr.UsdSkel.AnimMapper Methods: IsIdentity() Returns true if this is an identity map. IsNull() Returns true if this is a null mapping. IsSparse() Returns true if this is a sparse mapping. Remap(source, target, elementSize, defaultValue) Typed remapping of data in an arbitrary, stl-like container. RemapTransforms(source, target, elementSize) Convenience method for the common task of remapping transform arrays. IsIdentity() → bool Returns true if this is an identity map. The source and target orders of an identity map are identical. IsNull() → bool Returns true if this is a null mapping. No source elements of a null map are mapped to the target. IsSparse() → bool Returns true if this is a sparse mapping. A sparse mapping means that not all target values will be overridden by source values, when mapped with Remap(). Remap(source, target, elementSize, defaultValue) → bool Typed remapping of data in an arbitrary, stl-like container. The source array provides a run of elementSize for each path in the em sourceOrder. These elements are remapped and copied over the target array. Prior to remapping, the target array is resized to the size of the em targetOrder (as given at mapper construction time) multiplied by the elementSize . New element created in the array are initialized to defaultValue , if provided. Parameters source (Container) – target (Container) – elementSize (int) – defaultValue (Container.value_type) – Remap(source, target, elementSize, defaultValue) -> bool Type-erased remapping of data from source into target . The source array provides a run of elementSize elements for each path in the em sourceOrder. These elements are remapped and copied over the target array. Prior to remapping, the target array is resized to the size of the em targetOrder (as given at mapper construction time) multiplied by the elementSize . New elements created in the array are initialized to defaultValue , if provided. Remapping is supported for registered Sdf array value types only. Parameters source (VtValue) – target (VtValue) – elementSize (int) – defaultValue (VtValue) – RemapTransforms(source, target, elementSize) → bool Convenience method for the common task of remapping transform arrays. This performs the same operation as Remap(), but sets the matrix identity as the default value. Parameters source (VtArray[Matrix4]) – target (VtArray[Matrix4]) – elementSize (int) – class pxr.UsdSkel.AnimQuery Class providing efficient queries of primitives that provide skel animation. Methods: BlendShapeWeightsMightBeTimeVarying() Return true if it possible, but not certain, that the blend shape weights computed through this animation query change over time, false otherwise. ComputeBlendShapeWeights(weights, time) param weights ComputeJointLocalTransformComponents(...) Compute translation,rotation,scale components of the joint transforms in joint-local space. ComputeJointLocalTransforms(xforms, time) Compute joint transforms in joint-local space. GetBlendShapeOrder() Returns an array of tokens describing the ordering of blend shape channels in the animation. GetBlendShapeWeightTimeSamples(attrs) Get the time samples at which values contributing to blend shape weights have been set. GetBlendShapeWeightTimeSamplesInInterval(...) Get the time samples at which values contributing to blend shape weights are set, over interval . GetJointOrder() Returns an array of tokens describing the ordering of joints in the animation. GetJointTransformTimeSamples(times) Get the time samples at which values contributing to joint transforms are set. GetJointTransformTimeSamplesInInterval(...) Get the time samples at which values contributing to joint transforms are set, over interval . GetPrim() Return the primitive this anim query reads from. JointTransformsMightBeTimeVarying() Return true if it possible, but not certain, that joint transforms computed through this animation query change over time, false otherwise. BlendShapeWeightsMightBeTimeVarying() → bool Return true if it possible, but not certain, that the blend shape weights computed through this animation query change over time, false otherwise. UsdAttribute::ValueMightBeTimeVayring ComputeBlendShapeWeights(weights, time) → bool Parameters weights (FloatArray) – time (TimeCode) – ComputeJointLocalTransformComponents(translations, rotations, scales, time) → bool Compute translation,rotation,scale components of the joint transforms in joint-local space. This is provided to facilitate direct streaming of animation data in a form that can efficiently be processed for animation blending. Parameters translations (Vec3fArray) – rotations (QuatfArray) – scales (Vec3hArray) – time (TimeCode) – ComputeJointLocalTransforms(xforms, time) → bool Compute joint transforms in joint-local space. Transforms are returned in the order specified by the joint ordering of the animation primitive itself. Parameters xforms (VtArray[Matrix4]) – time (TimeCode) – GetBlendShapeOrder() → TokenArray Returns an array of tokens describing the ordering of blend shape channels in the animation. GetBlendShapeWeightTimeSamples(attrs) → bool Get the time samples at which values contributing to blend shape weights have been set. UsdAttribute::GetTimeSamples Parameters attrs (list[float]) – GetBlendShapeWeightTimeSamplesInInterval(interval, times) → bool Get the time samples at which values contributing to blend shape weights are set, over interval . UsdAttribute::GetTimeSamplesInInterval Parameters interval (Interval) – times (list[float]) – GetJointOrder() → TokenArray Returns an array of tokens describing the ordering of joints in the animation. UsdSkelSkeleton::GetJointOrder GetJointTransformTimeSamples(times) → bool Get the time samples at which values contributing to joint transforms are set. This only computes the time samples for sampling transforms in joint- local space, and does not include time samples affecting the root transformation. UsdAttribute::GetTimeSamples Parameters times (list[float]) – GetJointTransformTimeSamplesInInterval(interval, times) → bool Get the time samples at which values contributing to joint transforms are set, over interval . This only computes the time samples for sampling transforms in joint- local space, and does not include time samples affecting the root transformation. UsdAttribute::GetTimeSamplesInInterval Parameters interval (Interval) – times (list[float]) – GetPrim() → Prim Return the primitive this anim query reads from. JointTransformsMightBeTimeVarying() → bool Return true if it possible, but not certain, that joint transforms computed through this animation query change over time, false otherwise. UsdAttribute::ValueMightBeTimeVayring class pxr.UsdSkel.Animation Describes a skel animation, where joint animation is stored in a vectorized form. See the extended Skel Animation documentation for more information. Methods: CreateBlendShapeWeightsAttr(defaultValue, ...) See GetBlendShapeWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBlendShapesAttr(defaultValue, ...) See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointsAttr(defaultValue, writeSparsely) See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRotationsAttr(defaultValue, writeSparsely) See GetRotationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateScalesAttr(defaultValue, writeSparsely) See GetScalesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateTranslationsAttr(defaultValue, ...) See GetTranslationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Animation Get classmethod Get(stage, path) -> Animation GetBlendShapeWeightsAttr() Array of weight values for each blend shape. GetBlendShapesAttr() Array of tokens identifying which blend shapes this animation's data applies to. GetJointsAttr() Array of tokens identifying which joints this animation's data applies to. GetRotationsAttr() Joint-local unit quaternion rotations of all affected joints, in 32-bit precision. GetScalesAttr() Joint-local scales of all affected joints, in 16 bit precision. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetTransforms(xforms, time) Convenience method for querying resolved transforms at time . GetTranslationsAttr() Joint-local translations of all affected joints. SetTransforms(xforms, time) Convenience method for setting an array of transforms. CreateBlendShapeWeightsAttr(defaultValue, writeSparsely) → Attribute See GetBlendShapeWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateBlendShapesAttr(defaultValue, writeSparsely) → Attribute See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointsAttr(defaultValue, writeSparsely) → Attribute See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateRotationsAttr(defaultValue, writeSparsely) → Attribute See GetRotationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateScalesAttr(defaultValue, writeSparsely) → Attribute See GetScalesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateTranslationsAttr(defaultValue, writeSparsely) → Attribute See GetTranslationsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Animation Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Animation Return a UsdSkelAnimation holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdSkelAnimation(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetBlendShapeWeightsAttr() → Attribute Array of weight values for each blend shape. Each weight value is associated with the corresponding blend shape identified within the blendShapes token array, and therefore must have the same length as *blendShapes. Declaration float[] blendShapeWeights C++ Type VtArray<float> Usd Type SdfValueTypeNames->FloatArray GetBlendShapesAttr() → Attribute Array of tokens identifying which blend shapes this animation’s data applies to. The tokens for blendShapes correspond to the tokens set in the skel:blendShapes binding property of the UsdSkelBindingAPI. Declaration uniform token[] blendShapes C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform GetJointsAttr() → Attribute Array of tokens identifying which joints this animation’s data applies to. The tokens for joints correspond to the tokens of Skeleton primitives. The order of the joints as listed here may vary from the order of joints on the Skeleton itself. Declaration uniform token[] joints C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform GetRotationsAttr() → Attribute Joint-local unit quaternion rotations of all affected joints, in 32-bit precision. Array length should match the size of the joints attribute. Declaration quatf[] rotations C++ Type VtArray<GfQuatf> Usd Type SdfValueTypeNames->QuatfArray GetScalesAttr() → Attribute Joint-local scales of all affected joints, in 16 bit precision. Array length should match the size of the joints attribute. Declaration half3[] scales C++ Type VtArray<GfVec3h> Usd Type SdfValueTypeNames->Half3Array static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetTransforms(xforms, time) → bool Convenience method for querying resolved transforms at time . Note that it is more efficient to query transforms through UsdSkelAnimQuery or UsdSkelSkeletonQuery. Parameters xforms (Matrix4dArray) – time (TimeCode) – GetTranslationsAttr() → Attribute Joint-local translations of all affected joints. Array length should match the size of the joints attribute. Declaration float3[] translations C++ Type VtArray<GfVec3f> Usd Type SdfValueTypeNames->Float3Array SetTransforms(xforms, time) → bool Convenience method for setting an array of transforms. The given transforms must be orthogonal. Parameters xforms (Matrix4dArray) – time (TimeCode) – class pxr.UsdSkel.Binding Helper object that describes the binding of a skeleton to a set of skinnable objects. The set of skinnable objects is given as UsdSkelSkinningQuery prims, which can be used both to identify the skinned prim as well compute skinning properties of the prim. Methods: GetSkeleton() Returns the bound skeleton. GetSkinningTargets() Returns the set skinning targets. GetSkeleton() → Skeleton Returns the bound skeleton. GetSkinningTargets() → VtArray[SkinningQuery] Returns the set skinning targets. class pxr.UsdSkel.BindingAPI Provides API for authoring and extracting all the skinning-related data that lives in the”geometry hierarchy”of prims and models that want to be skeletally deformed. See the extended UsdSkelBindingAPI schema documentation for more about bindings and how they apply in a scene graph. Methods: Apply classmethod Apply(prim) -> BindingAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateAnimationSourceRel() See GetAnimationSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBlendShapeTargetsRel() See GetBlendShapeTargetsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBlendShapesAttr(defaultValue, ...) See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateGeomBindTransformAttr(defaultValue, ...) See GetGeomBindTransformAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointIndicesAttr(defaultValue, ...) See GetJointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointIndicesPrimvar(constant, elementSize) Convenience function to create the jointIndices primvar, optionally specifying elementSize. CreateJointWeightsAttr(defaultValue, ...) See GetJointWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointWeightsPrimvar(constant, elementSize) Convenience function to create the jointWeights primvar, optionally specifying elementSize. CreateJointsAttr(defaultValue, writeSparsely) See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSkeletonRel() See GetSkeletonRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSkinningBlendWeightPrimvar CreateSkinningBlendWeightsAttr(defaultValue, ...) See GetSkinningBlendWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSkinningMethodAttr(defaultValue, ...) See GetSkinningMethodAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> BindingAPI GetAnimationSource(prim) Convenience method to query the animation source bound on this prim. GetAnimationSourceRel() Animation source to be bound to Skeleton primitives at or beneath the location at which this property is defined. GetBlendShapeTargetsRel() Ordered list of all target blend shapes. GetBlendShapesAttr() An array of tokens defining the order onto which blend shape weights from an animation source map onto the skel:blendShapeTargets rel of a binding site. GetGeomBindTransformAttr() Encodes the bind-time world space transforms of the prim. GetInheritedAnimationSource() Returns the animation source bound at this prim, or one of its ancestors. GetInheritedSkeleton() Returns the skeleton bound at this prim, or one of its ancestors. GetJointIndicesAttr() Indices into the joints attribute of the closest (in namespace) bound Skeleton that affect each point of a PointBased gprim. GetJointIndicesPrimvar() Convenience function to get the jointIndices attribute as a primvar. GetJointWeightsAttr() Weights for the joints that affect each point of a PointBased gprim. GetJointWeightsPrimvar() Convenience function to get the jointWeights attribute as a primvar. GetJointsAttr() An (optional) array of tokens defining the list of joints to which jointIndices apply. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetSkeleton(skel) Convenience method to query the Skeleton bound on this prim. GetSkeletonRel() Skeleton to be bound to this prim and its descendents that possess a mapping and weighting to the joints of the identified Skeleton. GetSkinningBlendWeightPrimvar GetSkinningBlendWeightsAttr() Weights for weighted blend skinning method. GetSkinningMethodAttr() Different calculation method for skinning. SetRigidJointInfluence(jointIndex, weight) Convenience method for defining joints influences that make a primitive rigidly deformed by a single joint. ValidateJointIndices classmethod ValidateJointIndices(indices, numJoints, reason) -> bool static Apply() classmethod Apply(prim) -> BindingAPI Applies this single-apply API schema to the given prim . This information is stored by adding”SkelBindingAPI”to the token- valued, listOp metadata apiSchemas on the prim. A valid UsdSkelBindingAPI object is returned upon success. An invalid (or empty) UsdSkelBindingAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateAnimationSourceRel() → Relationship See GetAnimationSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBlendShapeTargetsRel() → Relationship See GetBlendShapeTargetsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBlendShapesAttr(defaultValue, writeSparsely) → Attribute See GetBlendShapesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateGeomBindTransformAttr(defaultValue, writeSparsely) → Attribute See GetGeomBindTransformAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointIndicesAttr(defaultValue, writeSparsely) → Attribute See GetJointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointIndicesPrimvar(constant, elementSize) → Primvar Convenience function to create the jointIndices primvar, optionally specifying elementSize. If constant is true, the resulting primvar is configured with’constant’interpolation, and describes a rigid deformation. Otherwise, the primvar is configured with’vertex’interpolation, and describes joint influences that vary per point. CreateJointIndicesAttr() , GetJointIndicesPrimvar() Parameters constant (bool) – elementSize (int) – CreateJointWeightsAttr(defaultValue, writeSparsely) → Attribute See GetJointWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointWeightsPrimvar(constant, elementSize) → Primvar Convenience function to create the jointWeights primvar, optionally specifying elementSize. If constant is true, the resulting primvar is configured with’constant’interpolation, and describes a rigid deformation. Otherwise, the primvar is configured with’vertex’interpolation, and describes joint influences that vary per point. CreateJointWeightsAttr() , GetJointWeightsPrimvar() Parameters constant (bool) – elementSize (int) – CreateJointsAttr(defaultValue, writeSparsely) → Attribute See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSkeletonRel() → Relationship See GetSkeletonRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSkinningBlendWeightPrimvar() CreateSkinningBlendWeightsAttr(defaultValue, writeSparsely) → Attribute See GetSkinningBlendWeightsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSkinningMethodAttr(defaultValue, writeSparsely) → Attribute See GetSkinningMethodAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> BindingAPI Return a UsdSkelBindingAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdSkelBindingAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAnimationSource(prim) → bool Convenience method to query the animation source bound on this prim. Returns true if an animation source binding is defined, and sets prim to the target prim. The resulting primitive may still be invalid, if the prim has been explicitly unbound. This does not resolved inherited animation source bindings. Parameters prim (Prim) – GetAnimationSourceRel() → Relationship Animation source to be bound to Skeleton primitives at or beneath the location at which this property is defined. GetBlendShapeTargetsRel() → Relationship Ordered list of all target blend shapes. This property is not inherited hierarchically, and is expected to be authored directly on the skinnable primitive to which the the blend shapes apply. GetBlendShapesAttr() → Attribute An array of tokens defining the order onto which blend shape weights from an animation source map onto the skel:blendShapeTargets rel of a binding site. If authored, the number of elements must be equal to the number of targets in the blendShapeTargets rel. This property is not inherited hierarchically, and is expected to be authored directly on the skinnable primitive to which the blend shapes apply. Declaration uniform token[] skel:blendShapes C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform GetGeomBindTransformAttr() → Attribute Encodes the bind-time world space transforms of the prim. If the transform is identical for a group of gprims that share a common ancestor, the transform may be authored on the ancestor, to”inherit”down to all the leaf gprims. If this transform is unset, an identity transform is used instead. Declaration matrix4d primvars:skel:geomBindTransform C++ Type GfMatrix4d Usd Type SdfValueTypeNames->Matrix4d GetInheritedAnimationSource() → Prim Returns the animation source bound at this prim, or one of its ancestors. GetInheritedSkeleton() → Skeleton Returns the skeleton bound at this prim, or one of its ancestors. GetJointIndicesAttr() → Attribute Indices into the joints attribute of the closest (in namespace) bound Skeleton that affect each point of a PointBased gprim. The primvar can have either constant or vertex interpolation. This primvar’s elementSize will determine how many joint influences apply to each point. Indices must point be valid. Null influences should be defined by setting values in jointWeights to zero. See UsdGeomPrimvar for more information on interpolation and elementSize. Declaration int[] primvars:skel:jointIndices C++ Type VtArray<int> Usd Type SdfValueTypeNames->IntArray GetJointIndicesPrimvar() → Primvar Convenience function to get the jointIndices attribute as a primvar. GetJointIndicesAttr, GetInheritedJointWeightsPrimvar GetJointWeightsAttr() → Attribute Weights for the joints that affect each point of a PointBased gprim. The primvar can have either constant or vertex interpolation. This primvar’s elementSize will determine how many joints influences apply to each point. The length, interpolation, and elementSize of jointWeights must match that of jointIndices. See UsdGeomPrimvar for more information on interpolation and elementSize. Declaration float[] primvars:skel:jointWeights C++ Type VtArray<float> Usd Type SdfValueTypeNames->FloatArray GetJointWeightsPrimvar() → Primvar Convenience function to get the jointWeights attribute as a primvar. GetJointWeightsAttr, GetInheritedJointWeightsPrimvar GetJointsAttr() → Attribute An (optional) array of tokens defining the list of joints to which jointIndices apply. If not defined, jointIndices applies to the ordered list of joints defined in the bound Skeleton’s joints attribute. If undefined on a primitive, the primitive inherits the value of the nearest ancestor prim, if any. Declaration uniform token[] skel:joints C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSkeleton(skel) → bool Convenience method to query the Skeleton bound on this prim. Returns true if a Skeleton binding is defined, and sets skel to the target skel. The resulting Skeleton may still be invalid, if the Skeleton has been explicitly unbound. This does not resolved inherited skeleton bindings. Parameters skel (Skeleton) – GetSkeletonRel() → Relationship Skeleton to be bound to this prim and its descendents that possess a mapping and weighting to the joints of the identified Skeleton. GetSkinningBlendWeightPrimvar() GetSkinningBlendWeightsAttr() → Attribute Weights for weighted blend skinning method. The primvar can have either constant or vertex interpolation. Constant interpolation means every vertex share the same single blend weight. Vertex interpolation means every vertex has their own blend weight. The element size should match the vertices count in this case. C++ Type: VtArray<float> Usd Type: SdfValueTypeNames->FloatArray Variability: SdfVariabilityUniform Fallback Value: No Fallback GetSkinningMethodAttr() → Attribute Different calculation method for skinning. LBS, DQ, and blendWeight C++ Type: TfToken Usd Type: SdfValueTypeNames->Token Variability: SdfVariabilityUniform Fallback Value: ClassicLinear Allowed Values : [ClassicLinear, DualQuaternion, WeightedBlend] SetRigidJointInfluence(jointIndex, weight) → bool Convenience method for defining joints influences that make a primitive rigidly deformed by a single joint. Parameters jointIndex (int) – weight (float) – static ValidateJointIndices() classmethod ValidateJointIndices(indices, numJoints, reason) -> bool Validate an array of joint indices. This ensures that all indices are the in the range [0, numJoints). Returns true if the indices are valid, or false otherwise. If invalid and reason is non-null, an error message describing the first validation error will be set. Parameters indices (TfSpan[int]) – numJoints (int) – reason (str) – class pxr.UsdSkel.BlendShape Describes a target blend shape, possibly containing inbetween shapes. See the extended Blend Shape Schema documentation for information. Methods: CreateInbetween(name) Author scene description to create an attribute on this prim that will be recognized as an Inbetween (i.e. CreateNormalOffsetsAttr(defaultValue, ...) See GetNormalOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateOffsetsAttr(defaultValue, writeSparsely) See GetOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreatePointIndicesAttr(defaultValue, ...) See GetPointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> BlendShape Get classmethod Get(stage, path) -> BlendShape GetAuthoredInbetweens() Like GetInbetweens() , but exclude inbetwens that have no authored scene / description. GetInbetween(name) Return the Inbetween corresponding to the attribute named name , which will be valid if an Inbetween attribute definition already exists. GetInbetweens() Return valid UsdSkelInbetweenShape objects for all defined Inbetweens on this prim. GetNormalOffsetsAttr() Required property. GetOffsetsAttr() Required property. GetPointIndicesAttr() Optional property. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] HasInbetween(name) Return true if there is a defined Inbetween named name on this prim. ValidatePointIndices classmethod ValidatePointIndices(indices, numPoints, reason) -> bool CreateInbetween(name) → InbetweenShape Author scene description to create an attribute on this prim that will be recognized as an Inbetween (i.e. will present as a valid UsdSkelInbetweenShape). The name of the created attribute or may or may not be the specified attrName , due to the possible need to apply property namespacing. Creation may fail and return an invalid Inbetwen if attrName contains a reserved keyword. an invalid UsdSkelInbetweenShape if we failed to create a valid attribute, a valid UsdSkelInbetweenShape otherwise. It is not an error to create over an existing, compatible attribute. UsdSkelInbetweenShape::IsInbetween() Parameters name (str) – CreateNormalOffsetsAttr(defaultValue, writeSparsely) → Attribute See GetNormalOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateOffsetsAttr(defaultValue, writeSparsely) → Attribute See GetOffsetsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreatePointIndicesAttr(defaultValue, writeSparsely) → Attribute See GetPointIndicesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> BlendShape Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> BlendShape Return a UsdSkelBlendShape holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdSkelBlendShape(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAuthoredInbetweens() → list[InbetweenShape] Like GetInbetweens() , but exclude inbetwens that have no authored scene / description. GetInbetween(name) → InbetweenShape Return the Inbetween corresponding to the attribute named name , which will be valid if an Inbetween attribute definition already exists. Name lookup will account for Inbetween namespacing, which means that this method will succeed in some cases where UsdSkelInbetweenShape (prim->GetAttribute(name)) will not, unless name has the proper namespace prefix. HasInbetween() Parameters name (str) – GetInbetweens() → list[InbetweenShape] Return valid UsdSkelInbetweenShape objects for all defined Inbetweens on this prim. GetNormalOffsetsAttr() → Attribute Required property. Normal offsets which, when added to the base pose, provides the normals of the target shape. Declaration uniform vector3f[] normalOffsets C++ Type VtArray<GfVec3f> Usd Type SdfValueTypeNames->Vector3fArray Variability SdfVariabilityUniform GetOffsetsAttr() → Attribute Required property. Position offsets which, when added to the base pose, provides the target shape. Declaration uniform vector3f[] offsets C++ Type VtArray<GfVec3f> Usd Type SdfValueTypeNames->Vector3fArray Variability SdfVariabilityUniform GetPointIndicesAttr() → Attribute Optional property. Indices into the original mesh that correspond to the values in offsets and of any inbetween shapes. If authored, the number of elements must be equal to the number of elements in the offsets array. Declaration uniform int[] pointIndices C++ Type VtArray<int> Usd Type SdfValueTypeNames->IntArray Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – HasInbetween(name) → bool Return true if there is a defined Inbetween named name on this prim. Name lookup will account for Inbetween namespacing. GetInbetween() Parameters name (str) – static ValidatePointIndices() classmethod ValidatePointIndices(indices, numPoints, reason) -> bool Validates a set of point indices for a given point count. This ensures that all point indices are in the range [0, numPoints). Returns true if the indices are valid, or false otherwise. If invalid and reason is non-null, an error message describing the first validation error will be set. Parameters indices (TfSpan[int]) – numPoints (int) – reason (str) – class pxr.UsdSkel.BlendShapeQuery Helper class used to resolve blend shape weights, including inbetweens. Methods: ComputeBlendShapePointIndices() Compute an array holding the point indices of all shapes. ComputeDeformedPoints(subShapeWeights, ...) Deform points using the resolved sub-shapes given by subShapeWeights , blendShapeIndices and subShapeIndices . ComputeSubShapePointOffsets() Compute an array holding the point offsets of all sub-shapes. ComputeSubShapeWeights(weights, ...) Compute the resolved weights for all sub-shapes bound to this prim. GetBlendShape(blendShapeIndex) Returns the blend shape corresponding to blendShapeIndex . GetBlendShapeIndex(subShapeIndex) Returns the blend shape index corresponding to the i'th sub-shape. GetInbetween(subShapeIndex) Returns the inbetween shape corresponding to sub-shape i , if any. GetNumBlendShapes() GetNumSubShapes() ComputeBlendShapePointIndices() → list[IntArray] Compute an array holding the point indices of all shapes. This is indexed by the blendShapeIndices returned by ComputeSubShapes(). Since the pointIndices property of blend shapes is optional, some of the arrays may be empty. ComputeDeformedPoints(subShapeWeights, blendShapeIndices, subShapeIndices, blendShapePointIndices, subShapePointOffsets, points) → bool Deform points using the resolved sub-shapes given by subShapeWeights , blendShapeIndices and subShapeIndices . The blendShapePointIndices and blendShapePointOffsets arrays both provide the pre-computed point offsets and indices of each sub- shape, as computed by ComputeBlendShapePointIndices() and ComputeSubShapePointOffsets() . Parameters subShapeWeights (TfSpan[float]) – blendShapeIndices (TfSpan[unsigned]) – subShapeIndices (TfSpan[unsigned]) – blendShapePointIndices (list[IntArray]) – subShapePointOffsets (list[Vec3fArray]) – points (TfSpan[Vec3f]) – ComputeSubShapePointOffsets() → list[Vec3fArray] Compute an array holding the point offsets of all sub-shapes. This includes offsets of both primary shapes those stored directly on a BlendShape primitive as well as those of inbetween shapes. This is indexed by the subShapeIndices returned by ComputeSubShapeWeights() . ComputeSubShapeWeights(weights, subShapeWeights, blendShapeIndices, subShapeIndices) → bool Compute the resolved weights for all sub-shapes bound to this prim. The weights values are initial weight values, ordered according to the skel:blendShapeTargets relationship of the prim this query is associated with. If there are any inbetween shapes, a new set of weights is computed, providing weighting of the relevant inbetweens. All computed arrays shared the same size. Elements of the same index identify which sub-shape of which blend shape a given weight value is mapped to. Parameters weights (TfSpan[float]) – subShapeWeights (FloatArray) – blendShapeIndices (UIntArray) – subShapeIndices (UIntArray) – GetBlendShape(blendShapeIndex) → BlendShape Returns the blend shape corresponding to blendShapeIndex . Parameters blendShapeIndex (int) – GetBlendShapeIndex(subShapeIndex) → int Returns the blend shape index corresponding to the i'th sub-shape. Parameters subShapeIndex (int) – GetInbetween(subShapeIndex) → InbetweenShape Returns the inbetween shape corresponding to sub-shape i , if any. Parameters subShapeIndex (int) – GetNumBlendShapes() → int GetNumSubShapes() → int class pxr.UsdSkel.Cache Thread-safe cache for accessing query objects for evaluating skeletal data. This provides caching of major structural components, such as skeletal topology. In a streaming context, this cache is intended to persist. Methods: Clear() ComputeSkelBinding(skelRoot, skel, binding, ...) Compute the bindings corresponding to a single skeleton, bound beneath skelRoot , as discovered through a traversal using predicate . ComputeSkelBindings(skelRoot, bindings, ...) Compute the set of skeleton bindings beneath skelRoot , as discovered through a traversal using predicate . GetAnimQuery(anim) Get an anim query corresponding to anim . GetSkelQuery(skel) Get a skel query for computing properties of skel . GetSkinningQuery(prim) Get a skinning query at prim . Populate(root, predicate) Populate the cache for the skeletal data beneath prim root , as traversed using predicate . Clear() → None ComputeSkelBinding(skelRoot, skel, binding, predicate) → bool Compute the bindings corresponding to a single skeleton, bound beneath skelRoot , as discovered through a traversal using predicate . Skinnable prims are only discoverable by this method if Populate() has already been called for skelRoot , with an equivalent predicate. Parameters skelRoot (Root) – skel (Skeleton) – binding (Binding) – predicate (_PrimFlagsPredicate) – ComputeSkelBindings(skelRoot, bindings, predicate) → bool Compute the set of skeleton bindings beneath skelRoot , as discovered through a traversal using predicate . Skinnable prims are only discoverable by this method if Populate() has already been called for skelRoot , with an equivalent predicate. Parameters skelRoot (Root) – bindings (list[Binding]) – predicate (_PrimFlagsPredicate) – GetAnimQuery(anim) → AnimQuery Get an anim query corresponding to anim . This does not require Populate() to be called on the cache. Parameters anim (Animation) – GetAnimQuery(prim) -> AnimQuery This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Deprecated Parameters prim (Prim) – GetSkelQuery(skel) → SkeletonQuery Get a skel query for computing properties of skel . This does not require Populate() to be called on the cache. Parameters skel (Skeleton) – GetSkinningQuery(prim) → SkinningQuery Get a skinning query at prim . Skinning queries are defined at any skinnable prims (I.e., boundable prims with fully defined joint influences). The caller must first Populate() the cache with the skel root containing prim , with a predicate that will visit prim , in order for a skinning query to be discoverable. Parameters prim (Prim) – Populate(root, predicate) → bool Populate the cache for the skeletal data beneath prim root , as traversed using predicate . Population resolves inherited skel bindings set using the UsdSkelBindingAPI, making resolved bindings available through GetSkinningQuery() , ComputeSkelBdining() and ComputeSkelBindings() . Parameters root (Root) – predicate (_PrimFlagsPredicate) – class pxr.UsdSkel.InbetweenShape Schema wrapper for UsdAttribute for authoring and introspecting attributes that serve as inbetween shapes of a UsdSkelBlendShape. Inbetween shapes allow an explicit shape to be specified when the blendshape to which it’s bound is evaluated at a certain weight. For example, rather than performing piecewise linear interpolation between a primary shape and the rest shape at weight 0.5, an inbetween shape could be defined at the weight. For weight values greater than 0.5, a shape would then be resolved by linearly interpolating between the inbetween shape and the primary shape, while for weight values less than or equal to 0.5, the shape is resolved by linearly interpolating between the inbetween shape and the primary shape. Methods: CreateNormalOffsetsAttr(defaultValue) Returns the existing normal offsets attribute if the shape has normal offsets, or creates a new one. GetAttr() Explicit UsdAttribute extractor. GetNormalOffsets(offsets) Get the normal offsets authored for this shape. GetNormalOffsetsAttr() Returns a valid normal offsets attribute if the shape has normal offsets. GetOffsets(offsets) Get the point offsets corresponding to this shape. GetWeight(weight) Return the location at which the shape is applied. HasAuthoredWeight() Has a weight value been explicitly authored on this shape? IsDefined() Return true if the wrapped UsdAttribute::IsDefined() , and in addition the attribute is identified as an Inbetween. IsInbetween classmethod IsInbetween(attr) -> bool SetNormalOffsets(offsets) Set the normal offsets authored for this shape. SetOffsets(offsets) Set the point offsets corresponding to this shape. SetWeight(weight) Set the location at which the shape is applied. CreateNormalOffsetsAttr(defaultValue) → Attribute Returns the existing normal offsets attribute if the shape has normal offsets, or creates a new one. Parameters defaultValue (VtValue) – GetAttr() → Attribute Explicit UsdAttribute extractor. GetNormalOffsets(offsets) → bool Get the normal offsets authored for this shape. Normal offsets are optional, and may be left unspecified. Parameters offsets (Vec3fArray) – GetNormalOffsetsAttr() → Attribute Returns a valid normal offsets attribute if the shape has normal offsets. Returns an invalid attribute otherwise. GetOffsets(offsets) → bool Get the point offsets corresponding to this shape. Parameters offsets (Vec3fArray) – GetWeight(weight) → bool Return the location at which the shape is applied. Parameters weight (float) – HasAuthoredWeight() → bool Has a weight value been explicitly authored on this shape? GetWeight() IsDefined() → bool Return true if the wrapped UsdAttribute::IsDefined() , and in addition the attribute is identified as an Inbetween. static IsInbetween() classmethod IsInbetween(attr) -> bool Test whether a given UsdAttribute represents a valid Inbetween, which implies that creating a UsdSkelInbetweenShape from the attribute will succeed. Succes implies that attr.IsDefined() is true. Parameters attr (Attribute) – SetNormalOffsets(offsets) → bool Set the normal offsets authored for this shape. Parameters offsets (Vec3fArray) – SetOffsets(offsets) → bool Set the point offsets corresponding to this shape. Parameters offsets (Vec3fArray) – SetWeight(weight) → bool Set the location at which the shape is applied. Parameters weight (float) – class pxr.UsdSkel.PackedJointAnimation Deprecated. Please use SkelAnimation instead. Methods: Define classmethod Define(stage, path) -> PackedJointAnimation Get classmethod Get(stage, path) -> PackedJointAnimation GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Define() classmethod Define(stage, path) -> PackedJointAnimation Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> PackedJointAnimation Return a UsdSkelPackedJointAnimation holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdSkelPackedJointAnimation(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdSkel.Root Boundable prim type used to identify a scope beneath which skeletally- posed primitives are defined. A SkelRoot must be defined at or above a skinned primitive for any skinning behaviors in UsdSkel. See the extended Skel Root Schema documentation for more information. Methods: Define classmethod Define(stage, path) -> Root Find classmethod Find(prim) -> Root Get classmethod Get(stage, path) -> Root GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Define() classmethod Define(stage, path) -> Root Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Find() classmethod Find(prim) -> Root Returns the skel root at or above prim , or an invalid schema object if no ancestor prim is defined as a skel root. Parameters prim (Prim) – static Get() classmethod Get(stage, path) -> Root Return a UsdSkelRoot holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdSkelRoot(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdSkel.Skeleton Describes a skeleton. See the extended Skeleton Schema documentation for more information. Methods: CreateBindTransformsAttr(defaultValue, ...) See GetBindTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointNamesAttr(defaultValue, writeSparsely) See GetJointNamesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointsAttr(defaultValue, writeSparsely) See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRestTransformsAttr(defaultValue, ...) See GetRestTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Skeleton Get classmethod Get(stage, path) -> Skeleton GetBindTransformsAttr() Specifies the bind-pose transforms of each joint in world space, in the ordering imposed by joints. GetJointNamesAttr() If authored, provides a unique name per joint. GetJointsAttr() An array of path tokens identifying the set of joints that make up the skeleton, and their order. GetRestTransformsAttr() Specifies the rest-pose transforms of each joint in local space, in the ordering imposed by joints. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateBindTransformsAttr(defaultValue, writeSparsely) → Attribute See GetBindTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointNamesAttr(defaultValue, writeSparsely) → Attribute See GetJointNamesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointsAttr(defaultValue, writeSparsely) → Attribute See GetJointsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateRestTransformsAttr(defaultValue, writeSparsely) → Attribute See GetRestTransformsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Skeleton Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Skeleton Return a UsdSkelSkeleton holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdSkelSkeleton(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetBindTransformsAttr() → Attribute Specifies the bind-pose transforms of each joint in world space, in the ordering imposed by joints. Declaration uniform matrix4d[] bindTransforms C++ Type VtArray<GfMatrix4d> Usd Type SdfValueTypeNames->Matrix4dArray Variability SdfVariabilityUniform GetJointNamesAttr() → Attribute If authored, provides a unique name per joint. This may be optionally set to provide better names when translating to DCC apps that require unique joint names. Declaration uniform token[] jointNames C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform GetJointsAttr() → Attribute An array of path tokens identifying the set of joints that make up the skeleton, and their order. Each token in the array must be valid when parsed as an SdfPath. The parent-child relationships of the corresponding paths determine the parent-child relationships of each joint. It is not required that the name at the end of each path be unique, but rather only that the paths themselves be unique. Declaration uniform token[] joints C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform GetRestTransformsAttr() → Attribute Specifies the rest-pose transforms of each joint in local space, in the ordering imposed by joints. This provides fallback values for joint transforms when a Skeleton either has no bound animation source, or when that animation source only contains animation for a subset of a Skeleton’s joints. Declaration uniform matrix4d[] restTransforms C++ Type VtArray<GfMatrix4d> Usd Type SdfValueTypeNames->Matrix4dArray Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdSkel.SkeletonQuery Primary interface to reading bound skeleton data. This is used to query properties such as resolved transforms and animation bindings, as bound through the UsdSkelBindingAPI. A UsdSkelSkeletonQuery can not be constructed directly, and instead must be constructed through a UsdSkelCache instance. This is done as follows: // Global cache, intended to persist. UsdSkelCache skelCache; // Populate the cache for a skel root. skelCache.Populate(UsdSkelRoot(skelRootPrim)); if (UsdSkelSkeletonQuery skelQuery = skelCache.GetSkelQuery(skelPrim)) { \.\.\. } Methods: ComputeJointLocalTransforms(xforms, time, atRest) Compute joint transforms in joint-local space, at time . ComputeJointRestRelativeTransforms(xforms, time) Compute joint transforms which, when concatenated against the rest pose, produce joint transforms in joint-local space. ComputeJointSkelTransforms(xforms, time, atRest) Compute joint transforms in skeleton space, at time . ComputeJointWorldTransforms(xforms, xfCache, ...) Compute joint transforms in world space, at whatever time is configured on xfCache . ComputeSkinningTransforms(xforms, time) Compute transforms representing the change in transformation of a joint from its rest pose, in skeleton space. GetAnimQuery() Returns the animation query that provides animation for the bound skeleton instance, if any. GetJointOrder() Returns an array of joint paths, given as tokens, describing the order and parent-child relationships of joints in the skeleton. GetJointWorldBindTransforms(xforms) Returns the world space joint transforms at bind time. GetMapper() Returns a mapper for remapping from the bound animation, if any, to the Skeleton. GetPrim() Returns the underlying Skeleton primitive corresponding to the bound skeleton instance, if any. GetSkeleton() Returns the bound skeleton instance, if any. GetTopology() Returns the topology of the bound skeleton instance, if any. HasBindPose() Returns true if the size of the array returned by skeleton::GetBindTransformsAttr() matches the number of joints in the skeleton. HasRestPose() Returns true if the size of the array returned by skeleton::GetRestTransformsAttr() matches the number of joints in the skeleton. ComputeJointLocalTransforms(xforms, time, atRest) → bool Compute joint transforms in joint-local space, at time . This returns transforms in joint order of the skeleton. If atRest is false and an animation source is bound, local transforms defined by the animation are mapped into the skeleton’s joint order. Any transforms not defined by the animation source use the transforms from the rest pose as a fallback value. If valid transforms cannot be computed for the animation source, the xforms are instead set to the rest transforms. Parameters xforms (VtArray[Matrix4]) – time (TimeCode) – atRest (bool) – ComputeJointRestRelativeTransforms(xforms, time) → bool Compute joint transforms which, when concatenated against the rest pose, produce joint transforms in joint-local space. More specifically, this computes restRelativeTransform in: restRelativeTransform \* restTransform = jointLocalTransform Parameters xforms (VtArray[Matrix4]) – time (TimeCode) – ComputeJointSkelTransforms(xforms, time, atRest) → bool Compute joint transforms in skeleton space, at time . This concatenates joint transforms as computed from ComputeJointLocalTransforms() . If atRest is true, any bound animation source is ignored, and transforms are computed from the rest pose. The skeleton-space transforms of the rest pose are cached internally. Parameters xforms (VtArray[Matrix4]) – time (TimeCode) – atRest (bool) – ComputeJointWorldTransforms(xforms, xfCache, atRest) → bool Compute joint transforms in world space, at whatever time is configured on xfCache . This is equivalent to computing skel-space joint transforms with CmoputeJointSkelTransforms(), and then concatenating all transforms by the local-to-world transform of the Skeleton prim. If atRest is true, any bound animation source is ignored, and transforms are computed from the rest pose. Parameters xforms (VtArray[Matrix4]) – xfCache (XformCache) – atRest (bool) – ComputeSkinningTransforms(xforms, time) → bool Compute transforms representing the change in transformation of a joint from its rest pose, in skeleton space. I.e., inverse(bindTransform)\*jointTransform These are the transforms usually required for skinning. Parameters xforms (VtArray[Matrix4]) – time (TimeCode) – GetAnimQuery() → AnimQuery Returns the animation query that provides animation for the bound skeleton instance, if any. GetJointOrder() → TokenArray Returns an array of joint paths, given as tokens, describing the order and parent-child relationships of joints in the skeleton. UsdSkelSkeleton::GetJointOrder GetJointWorldBindTransforms(xforms) → bool Returns the world space joint transforms at bind time. Parameters xforms (VtArray[Matrix4]) – GetMapper() → AnimMapper Returns a mapper for remapping from the bound animation, if any, to the Skeleton. GetPrim() → Prim Returns the underlying Skeleton primitive corresponding to the bound skeleton instance, if any. GetSkeleton() → Skeleton Returns the bound skeleton instance, if any. GetTopology() → Topology Returns the topology of the bound skeleton instance, if any. HasBindPose() → bool Returns true if the size of the array returned by skeleton::GetBindTransformsAttr() matches the number of joints in the skeleton. HasRestPose() → bool Returns true if the size of the array returned by skeleton::GetRestTransformsAttr() matches the number of joints in the skeleton. class pxr.UsdSkel.SkinningQuery Object used for querying resolved bindings for skinning. Methods: ComputeExtentsPadding(skelRestXforms, boundable) Helper for computing an approximate padding for use in extents computations. ComputeJointInfluences(indices, weights, time) Convenience method for computing joint influences. ComputeSkinnedPoints(xforms, points, time) Compute skinned points using linear blend skinning. ComputeSkinnedTransform(xforms, xform, time) Compute a skinning transform using linear blend skinning. ComputeVaryingJointInfluences(numPoints, ...) Convenience method for computing joint influence, where constant influences are expanded to hold values per point. GetBlendShapeMapper() Return the mapper for remapping blend shapes from the order of the bound SkelAnimation to the local blend shape order of this prim. GetBlendShapeOrder(blendShapes) Get the blend shapes for this skinning site, if any. GetBlendShapeTargetsRel() GetBlendShapesAttr() GetGeomBindTransform(time) param time GetGeomBindTransformAttr() GetInterpolation() GetJointIndicesPrimvar() GetJointMapper() Return a mapper for remapping from the joint order of the skeleton to the local joint order of this prim, if any. GetJointOrder(jointOrder) Get the custom joint order for this skinning site, if any. GetJointWeightsPrimvar() GetMapper() Deprecated GetNumInfluencesPerComponent() Returns the number of influences encoded for each component. GetPrim() GetSkinningBlendWeightsPrimvar() GetSkinningMethodAttr() GetTimeSamples(times) Populate times with the union of time samples for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). GetTimeSamplesInInterval(interval, times) Populate times with the union of time samples within interval , for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). HasBlendShapes() Returns true if there are blend shapes associated with this prim. HasJointInfluences() Returns true if joint influence data is associated with this prim. IsRigidlyDeformed() Returns true if the held prim has the same joint influences across all points, or false otherwise. ComputeExtentsPadding(skelRestXforms, boundable) → float Helper for computing an approximate padding for use in extents computations. The padding is computed as the difference between the pivots of the skelRestXforms skeleton space joint transforms at rest and the extents of the skinned primitive. This is intended to provide a suitable, constant metric for padding joint extents as computed by UsdSkelComputeJointsExtent. Parameters skelRestXforms (VtArray[Matrix4]) – boundable (Boundable) – ComputeJointInfluences(indices, weights, time) → bool Convenience method for computing joint influences. In addition to querying influences, this will also perform validation of the basic form of the weight data although the array contents is not validated. Parameters indices (IntArray) – weights (FloatArray) – time (TimeCode) – ComputeSkinnedPoints(xforms, points, time) → bool Compute skinned points using linear blend skinning. Both xforms and points are given in skeleton space, using the joint order of the bound skeleton. Joint influences and the (optional) binding transform are computed at time time (which will typically be unvarying). UsdSkelSkeletonQuery::ComputeSkinningTransforms Parameters xforms (VtArray[Matrix4]) – points (Vec3fArray) – time (TimeCode) – ComputeSkinnedTransform(xforms, xform, time) → bool Compute a skinning transform using linear blend skinning. The xforms are given in skeleton space, using the joint order of the bound skeleton. Joint influences and the (optional) binding transform are computed at time time (which will typically be unvarying). If this skinning query holds non-constant joint influences, no transform will be computed, and the function will return false. UsdSkelSkeletonQuery::ComputeSkinningTransforms Parameters xforms (VtArray[Matrix4]) – xform (Matrix4) – time (TimeCode) – ComputeVaryingJointInfluences(numPoints, indices, weights, time) → bool Convenience method for computing joint influence, where constant influences are expanded to hold values per point. In addition to querying influences, this will also perform validation of the basic form of the weight data although the array contents is not validated. Parameters numPoints (int) – indices (IntArray) – weights (FloatArray) – time (TimeCode) – GetBlendShapeMapper() → AnimMapper Return the mapper for remapping blend shapes from the order of the bound SkelAnimation to the local blend shape order of this prim. Returns a null reference if the underlying prim has no blend shapes. The mapper maps data from the order given by the blendShapes order on the SkelAnimation to the order given by the skel:blendShapes property, as set through the UsdSkelBindingAPI. GetBlendShapeOrder(blendShapes) → bool Get the blend shapes for this skinning site, if any. Parameters blendShapes (TokenArray) – GetBlendShapeTargetsRel() → Relationship GetBlendShapesAttr() → Attribute GetGeomBindTransform(time) → Matrix4d Parameters time (TimeCode) – GetGeomBindTransformAttr() → Attribute GetInterpolation() → str GetJointIndicesPrimvar() → Primvar GetJointMapper() → AnimMapper Return a mapper for remapping from the joint order of the skeleton to the local joint order of this prim, if any. Returns a null pointer if the prim has no custom joint orer. The mapper maps data from the order given by the joints order on the Skeleton to the order given by the skel:joints property, as optionally set through the UsdSkelBindingAPI. GetJointOrder(jointOrder) → bool Get the custom joint order for this skinning site, if any. Parameters jointOrder (TokenArray) – GetJointWeightsPrimvar() → Primvar GetMapper() → AnimMapper Deprecated Use GetJointMapper. GetNumInfluencesPerComponent() → int Returns the number of influences encoded for each component. If the prim defines rigid joint influences, then this returns the number of influences that map to every point. Otherwise, this provides the number of influences per point. IsRigidlyDeformed GetPrim() → Prim GetSkinningBlendWeightsPrimvar() → Primvar GetSkinningMethodAttr() → Attribute GetTimeSamples(times) → bool Populate times with the union of time samples for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). UsdAttribute::GetTimeSamples Parameters times (list[float]) – GetTimeSamplesInInterval(interval, times) → bool Populate times with the union of time samples within interval , for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). UsdAttribute::GetTimeSamplesInInterval Parameters interval (Interval) – times (list[float]) – HasBlendShapes() → bool Returns true if there are blend shapes associated with this prim. HasJointInfluences() → bool Returns true if joint influence data is associated with this prim. IsRigidlyDeformed() → bool Returns true if the held prim has the same joint influences across all points, or false otherwise. class pxr.UsdSkel.Tokens Attributes: bindTransforms blendShapeWeights blendShapes classicLinear dualQuaternion jointNames joints normalOffsets offsets pointIndices primvarsSkelGeomBindTransform primvarsSkelJointIndices primvarsSkelJointWeights primvarsSkelSkinningBlendWeights restTransforms rotations scales skelAnimationSource skelBlendShapeTargets skelBlendShapes skelJoints skelSkeleton skelSkinningMethod translations weight weightedBlend bindTransforms = 'bindTransforms' blendShapeWeights = 'blendShapeWeights' blendShapes = 'blendShapes' classicLinear = 'ClassicLinear' dualQuaternion = 'DualQuaternion' jointNames = 'jointNames' joints = 'joints' normalOffsets = 'normalOffsets' offsets = 'offsets' pointIndices = 'pointIndices' primvarsSkelGeomBindTransform = 'primvars:skel:geomBindTransform' primvarsSkelJointIndices = 'primvars:skel:jointIndices' primvarsSkelJointWeights = 'primvars:skel:jointWeights' primvarsSkelSkinningBlendWeights = 'primvars:skel:skinningBlendWeights' restTransforms = 'restTransforms' rotations = 'rotations' scales = 'scales' skelAnimationSource = 'skel:animationSource' skelBlendShapeTargets = 'skel:blendShapeTargets' skelBlendShapes = 'skel:blendShapes' skelJoints = 'skel:joints' skelSkeleton = 'skel:skeleton' skelSkinningMethod = 'skel:skinningMethod' translations = 'translations' weight = 'weight' weightedBlend = 'WeightedBlend' class pxr.UsdSkel.Topology Object holding information describing skeleton topology. This provides the hierarchical information needed to reason about joint relationships in a manner suitable to computations. Methods: GetNumJoints() GetParent(index) Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots). GetParentIndices() IsRoot(index) Returns true if the index'th joint is a root joint. Validate(reason) Validate the topology. GetNumJoints() → int GetParent(index) → int Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots). Parameters index (int) – GetParentIndices() → IntArray IsRoot(index) → bool Returns true if the index'th joint is a root joint. Parameters index (int) – Validate(reason) → bool Validate the topology. If validation is unsuccessful, a reason why will be written to reason , if provided. Parameters reason (str) – © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
omni.ui.MultiIntDragField.md
MultiIntDragField — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » MultiIntDragField   # MultiIntDragField class omni.ui.MultiIntDragField Bases: AbstractMultiField MultiIntDragField is the widget that has a sub widget (IntDrag) per model item. It’s handy to use it for multi-component data, like for example, int3. Methods __init__(*args, **kwargs) Overloaded function. Attributes max This property holds the drag's maximum value. min This property holds the drag's minimum value. step This property controls the steping speed on the drag. __init__(*args, **kwargs) Overloaded function. __init__(self: omni.ui._ui.MultiIntDragField, **kwargs) -> None __init__(self: omni.ui._ui.MultiIntDragField, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None __init__(self: omni.ui._ui.MultiIntDragField, *args, **kwargs) -> None Constructs MultiIntDragField. ### Arguments: `model :`The widget’s model. If the model is not assigned, the default model is created. `kwargsdict`See below ### Keyword Arguments: `min`This property holds the drag’s minimum value. `max`This property holds the drag’s maximum value. `step`This property controls the steping speed on the drag. `column_count`The max number of fields in a line. `h_spacing`Sets a non-stretchable horizontal space in pixels between child fields. `v_spacing`Sets a non-stretchable vertical space in pixels between child fields. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. property max This property holds the drag’s maximum value. property min This property holds the drag’s minimum value. property step This property controls the steping speed on the drag. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
Glf.md
Glf module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » Glf module   # Glf module Summary: The Glf module contains Utility classes for OpenGL output. glf Classes: DrawTarget A class representing a GL render target with mutliple image attachments. GLQueryObject Represents a GL query object in Glf SimpleLight SimpleMaterial Texture Represents a texture object in Glf. class pxr.Glf.DrawTarget A class representing a GL render target with mutliple image attachments. A DrawTarget is essentially a custom render pass into which several arbitrary variables can be output into. These can later be used as texture samplers by GLSL shaders. The DrawTarget maintains a map of named attachments that correspond to GL_TEXTURE_2D mages. By default, DrawTargets also create a depth component that is used both as a depth buffer during the draw pass, and can later be accessed as a regular GL_TEXTURE_2D data. Stencils are also available (by setting the format to GL_DEPTH_STENCIL and the internalFormat to GL_DEPTH24_STENCIL8) Methods: AddAttachment(name, format, type, internalFormat) Add an attachment to the DrawTarget. Bind() Binds the framebuffer. Unbind() Unbinds the framebuffer. WriteToFile(name, filename, viewMatrix, ...) Write the Attachment buffer to an image file (debugging). Attributes: expired True if this object has expired, False otherwise. AddAttachment(name, format, type, internalFormat) → None Add an attachment to the DrawTarget. Parameters name (str) – format (GLenum) – type (GLenum) – internalFormat (GLenum) – Bind() → None Binds the framebuffer. Unbind() → None Unbinds the framebuffer. WriteToFile(name, filename, viewMatrix, projectionMatrix) → bool Write the Attachment buffer to an image file (debugging). Parameters name (str) – filename (str) – viewMatrix (Matrix4d) – projectionMatrix (Matrix4d) – property expired True if this object has expired, False otherwise. class pxr.Glf.GLQueryObject Represents a GL query object in Glf Methods: Begin(target) Begin query for the given target target has to be one of GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED, GL_TIMESTAMP. BeginPrimitivesGenerated() equivalent to Begin(GL_PRIMITIVES_GENERATED). BeginSamplesPassed() equivalent to Begin(GL_SAMPLES_PASSED). BeginTimeElapsed() equivalent to Begin(GL_TIME_ELAPSED). End() End query. GetResult() Return the query result (synchronous) stalls CPU until the result becomes available. GetResultNoWait() Return the query result (asynchronous) returns 0 if the result hasn't been available. Begin(target) → None Begin query for the given target target has to be one of GL_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED, GL_ANY_SAMPLES_PASSED_CONSERVATIVE, GL_PRIMITIVES_GENERATED GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN GL_TIME_ELAPSED, GL_TIMESTAMP. Parameters target (GLenum) – BeginPrimitivesGenerated() → None equivalent to Begin(GL_PRIMITIVES_GENERATED). The number of primitives sent to the rasterizer by the scoped drawing command will be returned. BeginSamplesPassed() → None equivalent to Begin(GL_SAMPLES_PASSED). The number of samples that pass the depth test for all drawing commands within the scope of the query will be returned. BeginTimeElapsed() → None equivalent to Begin(GL_TIME_ELAPSED). The time that it takes for the GPU to execute all of the scoped commands will be returned in nanoseconds. End() → None End query. GetResult() → int Return the query result (synchronous) stalls CPU until the result becomes available. GetResultNoWait() → int Return the query result (asynchronous) returns 0 if the result hasn’t been available. class pxr.Glf.SimpleLight Attributes: ambient None attenuation None diffuse None hasShadow None id isCameraSpaceLight None isDomeLight None position None shadowBias None shadowBlur None shadowIndexEnd None shadowIndexStart None shadowMatrices None shadowResolution None specular None spotCutoff None spotDirection None spotFalloff None transform None property ambient None type : Vec4f Type type property attenuation None type : Vec3f Type type property diffuse None type : Vec4f Type type property hasShadow None Type type property id property isCameraSpaceLight None type : bool Type type property isDomeLight None type : bool Type type property position None type : Vec4f Type type property shadowBias None type : float Type type property shadowBlur None type : float Type type property shadowIndexEnd None type : int Type type property shadowIndexStart None type : int Type type property shadowMatrices None type : list[Matrix4d] Type type property shadowResolution None type : int Type type property specular None type : Vec4f Type type property spotCutoff None type : float Type type property spotDirection None type : Vec3f Type type property spotFalloff None type : float Type type property transform None type : Matrix4d Type type class pxr.Glf.SimpleMaterial Attributes: ambient None diffuse None emission None shininess None specular None property ambient None type : Vec4f Type type property diffuse None type : Vec4f Type type property emission None type : Vec4f Type type property shininess None type : float Type type property specular None type : Vec4f Type type class pxr.Glf.Texture Represents a texture object in Glf. A texture is typically defined by reading texture image data from an image file but a texture might also represent an attachment of a draw target. Methods: GetTextureMemoryAllocated classmethod GetTextureMemoryAllocated() -> int Attributes: magFilterSupported bool memoryRequested None memoryUsed int minFilterSupported bool static GetTextureMemoryAllocated() classmethod GetTextureMemoryAllocated() -> int static reporting function property magFilterSupported bool Type type property memoryRequested None Specify the amount of memory the user wishes to allocate to the texture. type : int Amount of memory the user wishes to allocate to the texture. Type type property memoryUsed int Amount of memory used to store the texture. Type type property minFilterSupported bool Type type © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
1_8_7.md
1.8.7 — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Release Notes » 1.8.7   # 1.8.7 Release Date: May 2023 ## Added Show Nucleus update version on the Nucleus tab. Added a Data Opt-In checkbox allowing users to opt-in and opt-out of data collection. Display Cache version in the library. ## Fixed Updated Nucleus tab with Navigator 3.3. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.FreeLine.md
FreeLine — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » FreeLine   # FreeLine class omni.ui.FreeLine Bases: Line The Line widget provides a colored line to display. The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. Methods __init__(self, arg0, arg1, **kwargs) Initialize the shape with bounds limited to the positions of the given widgets. Attributes __init__(self: omni.ui._ui.FreeLine, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None Initialize the shape with bounds limited to the positions of the given widgets. ### Arguments: `start :`The bound corner is in the center of this given widget. `end :`The bound corner is in the center of this given widget. `kwargsdict`See below ### Keyword Arguments: `alignment`This property that holds the alignment of the Line can only be LEFT, RIGHT, V_CENTER, H_CENTER , BOTTOM, TOP. By default, the Line is H_Center. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. `anchor_position: `This property holds the parametric value of the curve anchor. `anchor_alignment: `This property holds the Alignment of the curve anchor. `set_anchor_fn: Callable`Sets the function that will be called for the curve anchor. `invalidate_anchor: `Function that causes the anchor frame to be redrawn. `get_closest_parametric_position: `Function that returns the closest parametric T value to a given x,y position. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.singleton.Singleton.md
Singleton — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Submodules » omni.ui.singleton » omni.ui.singleton Functions » Singleton   # Singleton omni.ui.singleton.Singleton(class_) A singleton decorator © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
1_0_0_48.md
1.00.48 — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Release Notes » 1.00.48   # 1.00.48 Release Date: Feb 2021 ## New Features News tab – shows the latest information about Omniverse Show Nucleus Web on the collaboration tab Improved keyboard navigation and accessibility Update info for installed apps and connectors automatically when the library tab is opened Improved the drag area for the main window Remove failed installers from the installation queue automatically Added a button to clear the search input Added a button to open logs location Allow users to copy notification text Hide Launcher when started with the system Change the bell color to red if notifications contain errors Added a header for error notifications Added a link to show open-source licenses used in the launcher Create a user session in System Monitor after Nucleus is installed Show loading indicators and errors on the startup window ## Improvements Fixed installation controls were not clickable Ignore OS errors during the installation cancel Fixed problems with loading internal launcher settings Fixed problems with initialization during the authentication Fixed a bug where users went back in collaboration tab and saw ‘null’ instead of a data path Fixed a bug where users got redirected to a broken Nucleus page when clicked on a notification Fixed left spacing in component details on the exchange tab Fixed issues with invalid usernames specified during the installation of the collaboration service Fixed users were not prompted to select data paths or install Cache Fixed previous Cache versions were not deleted automatically after updates Fixed the launch button on the library tab displaying “Up to date” when update is available Fixed “Cancel” button was visible when installing components Fixed text overflow in the installation progress © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
extensions_usd_schema.md
USD Schema Extensions — kit-manual 105.1 documentation kit-manual » USD Schema Extensions   # USD Schema Extensions USD libraries are part of omni.usd.libs extension and are loaded as one of the first extensions to ensure that USD dlls are available to other extensions. USD schemas itself are each an individual extension that can be a part of any repository. USD schema extensions are loaded after omni.usd.libs and ideally before omni.usd. Example of a schema extension config.toml file: [core] reloadable = false # Load at the start, load all schemas with order -100 (with order -1000 the USD libs are loaded) order = -100 [package] category = "Simulation" keywords = ["physics", "usd"] # pxr modules to load [[python.module]] name = "pxr.UsdPhysics" # python loader module [[python.module]] name = "usd.physics.schema" # pxr libraries to be preloaded [[native.library]] path = "bin/${lib_prefix}usdPhysics${lib_ext}" Schema extensions contain pxr::Schema, its plugin registry and config.toml definition file. Additionally it contains a loading module omni/schema/_schema_name that does have python init.py file containing the plugin registry code. Example: import os from pxr import Plug pluginsRoot = os.path.join(os.path.dirname(__file__), '../../../plugins') physicsSchemaPath = pluginsRoot + '/UsdPhysics/resources' Plug.Registry().RegisterPlugins(physicsSchemaPath) © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
omni.ui.FontStyle.md
FontStyle — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » FontStyle   # FontStyle class omni.ui.FontStyle Bases: pybind11_object Supported font styles. Members: NONE NORMAL LARGE SMALL EXTRA_LARGE XXL XXXL EXTRA_SMALL XXS XXXS ULTRA Methods __init__(self, value) Attributes EXTRA_LARGE EXTRA_SMALL LARGE NONE NORMAL SMALL ULTRA XXL XXS XXXL XXXS name value __init__(self: omni.ui._ui.FontStyle, value: int) → None property name © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
content_install.md
3D Content Pack Installation — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » 3D Content Pack Installation   # 3D Content Pack Installation For our Omniverse customers who need to run in a firewalled environment, here is how to configure the sample 3D content that comes with the Omniverse foundation applications. As there is currently a total of roughly 260GB of USD samples, materials and environments available, this document should help you identify the types of content packs that you need to provide to your internal Omniverse users to help them with their workflows. ## 3D Content Pack Download Process There are five steps for IT managers to follow to download and configure individual Omniverse content packs for firewalled environments and users. 1) Identify: The first step is to select which 3D content packs are required by your users. Given that users will often ask for content based on where it lives within certain Omniverse foundation app Browsers (e.g. “can I get all of the Base Materials in the Materials tab?”) this documentation organizes the downloadable packs by which Omniverse Browser they normally reside or which Omniverse Extension they relate to. See the following section on the various Omniverse browsers and extensions that include content. 2) Download: Once you’ve determined which content packs to download, the next step is to go to the Omniverse Enterprise Web Portal, and to click on the Content section to find all of the available archive files. When you find the pack that matches, click Download, and choose whether you’re downloading for a Windows or Linux workstation. The download will begin automatically for that pack. Given that many content packs are GBs in size, this process can take some time to complete. Note Certain Omniverse foundation applications contain the same browsers, but the content available within them may be slightly different or reduced. Wherever possible, we have indicated which content packs in each browser are included with those apps. 3) Unpack: After each content pack is downloaded, you need to unzip it. We’ve tried to make the unpacking process as simple as possible by configuring each zip archive so that it mirrors the same folder structure that exists on our AWS server so that all you have to do is create a top-level folder where you want ALL of your content to live, and then unpack the archives “as-is” into that root location. Doing so will create an exact copy of the NVIDIA folder structure normally available within every Nucleus install. By default, that top-level structure includes five (5) main folders (Assets / Demos / Environments / Materials / Samples): Each of the downloadable content packs is set up to reflect these top-level folders which should make organization of the assets themselves efficient and straightforward. For example, if you download the Base Materials pack, when you open the zip archive, you’ll see this: By default, the content itself lives inside of the sub-folder and is called package.zip. If you decompress the entire archive, you’ll end up with a sub-folder and when you open the package.zip file within it, you’ll see this: At the root is a /Materials folder, which matches the online AWS configuration, and within it are the various sub-folders and files that make up the Base Materials MDL library. By unpacking the archive with the folder structure intact, you’ll ensure that your library matches the one that exists online. Note There are two additional files in each archive: A PACKAGE-INFO.yaml file - this describes the package contents. A PACKAGE-LICENSES folder with a text document pointing users to the Omniverse Terms of Use. Neither of these is required for your users to access the content packs, and can be safely stored elsewhere or deleted upon the completion of unpacking each archive. 4) Deploy: In order to make the content visible within Omniverse for your users, you have a choice on how to deploy the content. Option 1: Copy all of the content to a local hard disk drive location Option 2: Copy all of the content to a shared Nucleus server behind your firewall Both options are straightforward as you simply need to transfer the entire content folder structure that you set up in Step 3 to a local physical hard drive location or you can use Nucleus Navigator to copy that content folder to a shared internal Nucleus Server that is accessible to your internal users. 5) Update firewalled TOML files: In order for a user to see the local files instead of trying to “dial-out” to get content via AWS, you need to add a set of known redirect paths to point those requests to your local hard disk or internal Enterprise Nucleus server. To do this, you must define the new content path root aliases within the omniverse.toml file stored in ~/.nvidia-omniverse/config (Linux) or \%USERPROFILE%\.nvidia-omniverse\config (Windows) for each user on the network. If you have opted to place the content on a local hard disk drive location, add the following section in its entirety to the omniverse.toml file and replace the <HardDrivePath> variable with the folder you chose in step 5 to store all of the content packs. [aliases] "http://omniverse-content-production.s3.us-west-2.amazonaws.com" = "<HardDrivePath>" "https://omniverse-content-production.s3.us-west-2.amazonaws.com" = "<HardDrivePath>" "http://omniverse-content-production.s3-us-west-2.amazonaws.com" = "<HardDrivePath>" "https://omniverse-content-production.s3-us-west-2.amazonaws.com" = "<HardDrivePath>" "https://twinbru.s3.eu-west-1.amazonaws.com/omniverse" = "<HardDrivePath>" As an example, if you have copied all of your content to the C:\Temp\NVIDIA_Assets folder on the local machine, the paths would look like this: [aliases] "http://omniverse-content-production.s3.us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" "https://omniverse-content-production.s3.us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" "http://omniverse-content-production.s3-us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" "https://omniverse-content-production.s3-us-west-2.amazonaws.com" = "C:\\Temp\\NVIDIA_Assets" "https://twinbru.s3.eu-west-1.amazonaws.com/omniverse" = "C:\\Temp\\NVIDIA_Assets" Note The need for double-backslashes (\\) in the path name if you’re on Windows. If you have opted to place the content on a shared Nucleus location, in the following section replace the <server_name> with the actual name of your server (i.e. <server_name> is replaced with localhost). [aliases] "http://omniverse-content-production.s3.us-west-2.amazonaws.com" = "omniverse://<server_name>/<path>" "https://omniverse-content-production.s3.us-west-2.amazonaws.com" = "omniverse://<server_name>/<path>" "http://omniverse-content-production.s3-us-west-2.amazonaws.com" = "omniverse://<server_name>/<path>" "https://omniverse-content-production.s3-us-west-2.amazonaws.com" = "omniverse://<server_name>/<path>" "https://twinbru.s3.eu-west-1.amazonaws.com/omniverse" = "omniverse://<server_name>/<path>" Once this process is complete, when a user launches their copy of an Omniverse foundation app, they should have direct access to the various content packs directly without the application trying to connect to the Internet. ## What 3D Content Packs Do I Need? As mentioned earlier, users will likely want access to content that lives in various Omniverse Foundation App Browsers. Most of the content is provided visually this way and as such, we’ve provided convenient links to each of the browsers so you can see what content lives within them and download what your users need. It’s important to note that many of the browsers contain sample content that is contained within multiple zip archives. For instance, while the Showcases Browser only lists a single zip file as being needed to display all of the content within it, others like the NVIDIA Assets Browser will indicate that 5 separate zip downloads are needed to provide all of the various 3D assets within it. Here is a list of the various Browsers that accompany the Omniverse foundation applications: Core Content (Strongly Recommended all users grab this) NVIDIA Assets Environments Materials Showcases SimReady Explorer Examples Physics Demo Scenes Additionally, some content shows up with specific Omniverse extensions, and if your users ask for any of these content packs by the extension they support, you can find them here: AnimGraph Rendering Particles ActionGraph Warp Flow Some Omniverse foundation applications also include unique content packs as well. You can find them here: Audio2Face IsaacSim ## Core Omniverse App Content When many Omniverse foundation applications start (USD Composer, USD Explorer, Code), it loads a set of default scene templates including the textured ground plane and lighting that comes up automatically. This pack should always be downloaded. It is very small but will help prevent errors in the console when an Omniverse application first starts in an firewalled environment. This content pack includes all of the templates and is essential for firewalled environments. Launcher Pack Name: Default Scene Templates Pack Included in Omniverse Apps: USD Composer / USD Explorer / Code / USD Presenter Pack: Scene_Templates_NVD@10010.zip Pack Size: 24MB Contents: All of the scene templates that can be accessed from the File->New from Stage Template menu in Omniverse Default Nucleus Location: NVIDIA/Assets/Scenes/Templates ## Browsers Content There are several different browsers where you can access and utilize content provided by NVIDIA. Some of these are visible by default (depending on which foundation Omniverse application you are running), while others are accessible via different menus inside of the applications. For each browser, here is a list of the content packs required. ### NVIDIA Assets Browser There are 5 individual content pack downloads that encompass all of the visible content available within this browser Launcher Pack Name: Commercial 3D Models Pack Included in Omniverse Apps: USD Composer / USD Explorer / Code Pack: Commercial_NVD@10013.zip Pack Size: 5.8GB Contents: Commercial furniture and entourage content Default Nucleus Location: NVIDIA/Assets/ArchVis/Commercial Note In order for the Commercial content within this pack to operate correctly, it needs to have the Materials / Base Materials Pack (Base_Materials_NVD@10012.zip) from the Materials Browser installed for the materials. Launcher Pack Name: Industrial 3D Models Pack Included in Omniverse Apps: USD Composer / USD Explorer / Code Pack: Industrial_NVD@10012.zip Pack Size: 1.8GB Contents: Industrials boxes/shelving and entourage content Default Nucleus Location: NVIDIA/Assets/ArchVis/Industrial Launcher Pack Name: Residential 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Residential_NVD@10012.zip Pack Size: 22.5GB Contents: Residential furniture and entourage content Default Nucleus Location: NVIDIA/Assets/ArchVis/Residential Launcher Pack Name: Vegetation 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Vegetation_NVD@10012.zip Pack Size: 2.7GB Contents: Selection of plants and tree content Default Nucleus Location: NVIDIA/Assets/Vegetation Launcher Pack Name: Warehouse 3D Models Pack Included in Omniverse Apps: USD Composer / USD Explorer / Code Pack: Warehouse_NVD@10012.zip Pack Size: 18GB Contents: Digital Twin warehouse elements content Default Nucleus Location: NVIDIA/Assets/DigitalTwin/Assets/Warehouse ### Showcases Browser Note In order for the content within this pack to operate correctly, it needs to have the Examples Browser / Sample Scenes Pack from the Examples Browser installed for the materials. Launcher Pack Name: Showcase Scenes 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Showcases_Content_NVD@10010.zip Pack Size: 2.3GB Contents: Full warehouse and Ragnarok vehicle content Default Nucleus Location: NVIDIA/Samples/Showcases ### Materials Browser There are 3 individual content pack downloads that encompass all of the visible content available through this browser and it is recommended that you download and install both the Base Materials and vMaterials 2 packs as they are often used within other sample content. Launcher Pack Name: Base Materials Pack Included in Omniverse Apps: USD Composer / USD Explorer / Code Pack: Base_Materials_NVD@10012.zip Pack Size: 8.2GB Contents: Base materials library Default Nucleus Location: NVIDIA/Materials/2023_1/Base Launcher Pack Name: VMaterials 2 Pack Included in Omniverse Apps: USD Composer / Code Pack: vMaterials_2_2_1_NVD@20022.zip Pack Size: 5.5GB Contents: vMaterials 2 library (v. 2.2.1 is the current release) Default Nucleus Location: NVIDIA/Materials/2023_1/vMaterials_2 Launcher Pack Name: Automotive Materials Pack Included in Omniverse Apps: USD Composer / Code Pack: Automotive_Materials_NVD@10010.zip Pack Size: 21GB Contents: Automotive materials library Default Nucleus Location: NVIDIA/Materials/2023_1/Automotive ### Environments Browser There are two content pack downloads that encompass all of the content available through this browser. Launcher Pack Name: Environments Skies Pack Included in Omniverse Apps: USD Composer / Code Pack: Environments_NVD@10012.zip Pack Size: 8.9GB Contents: HDRI skydomes and Dynamic sky environments Default Nucleus Location: NVIDIA/Environments/2023_1/DomeLights Launcher Pack Name: Environment Templates Pack Included in Omniverse Apps: USD Composer / Code Pack: Environments_Templates_NVD@10010.zip Pack Size: 16.0GB Contents: Templates that have been designed to assist with automotive presentations Default Nucleus Location: NVIDIA/Environments/2023_1/Templates ### SimReady Explorer There are 5 individual content pack downloads that encompass all of the content available through this browser. Note There is some redundancy in files between packs that are shared across the entire library, but if you are only interested in a small subset of the content, you will still get all of the supporting materials and configuration files in any one downloaded content pack. Launcher Pack Name: SimReady Warehouse 01 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: SimReady_Warehouse_01_NVD@10010.zip Pack Size: 13.9GB Contents: Warehouse elements (foot stools, ramps, shelving, pallets) Default Nucleus Location: NVIDIA/Assets/simready_content Launcher Pack Name: SimReady Warehouse 02 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: SimReady_Warehouse_02_NVD@10010.zip Pack Size: 20.5GB Contents: Warehouse elements (pallets, racks, ramps) Default Nucleus Location: NVIDIA/Assets/simready_content Launcher Pack Name: SimReady Furniture & Misc 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: SimReady_Furniture_Misc_NVD@10010.zip Pack Size: 9.4GB Contents: Assorted furniture and entourage elements (cones, chairs, sofas, utensils) Default Nucleus Location: NVIDIA/Assets/simready_content Launcher Pack Name: SimReady Containers & Shipping 01 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: SimReady_Containers_Shipping_01_NVD@10010.zip Pack Size: 21.4GB Contents: Industrial elements (bins, boxes, cases, drums, buckets) Default Nucleus Location: NVIDIA/Assets/simready_content Launcher Pack Name: SimReady Containers & Shipping 01 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: SimReady_Containers_Shipping_02_NVD@10010.zip Pack Size: 20.6GB Contents: Industrial elements (crates, jugs, IBC tank, bottles, etc.) Default Nucleus Location: NVIDIA/Assets/simready_content ### Examples Browser There are 5 individual content pack downloads that encompass all of the content available through this browser. Launcher Pack Name: AnimGraph Sample 3D Model Pack Included in Omniverse Apps: USD Composer Pack: AnimGraph_NVD@10010.zip Pack Size: 1.6GB Contents: This pack includes all of the character animation samples Default Nucleus Location: NVIDIA/Assets/AnimGraph Launcher Pack Name: Automotive Configurator 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Configurator_Content_NVD@10010.zip Pack Size: 2.0GB Contents: This pack contains content for building automotive configurators Default Nucleus Location: NVIDIA/Assets/Configurator Launcher Pack Name: Sample Scenes 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Sample_Scenes_NVD@10010.zip Pack Size: 26.0GB Contents: High fidelity rendering scenes including the Astronaut, Marbles and the Old Attic datasets Default Nucleus Location: NVIDIA/Samples/Examples/2023_1/Rendering Note The Sample_Scenes pack is also needed if you’ve downloaded the Showcases content pack to work as expected. Launcher Pack Name: Particle Systems 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Particles_NVD@10010.zip Pack Size: 159MB Contents: This pack includes all of the particle systems sample files Default Nucleus Location: NVIDIA/Assets/Particles Launcher Pack Name: Extensions Samples 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Extensions_Samples_NVD@10010.zip Pack Size: 900MB Contents: Contains sample data for Flow, Paint, Warp and ActionGraph extensions Default Nucleus Location: NVIDIA/Assets/Extensions/Samples ### Physics Demo Scenes Browser This browser is opened from the Window -> Simulation -> Demo Scenes menu option. Launcher Pack Name: Physics Demo Scenes 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Physics_Scenes_NVD@10010.zip Pack Size: 5.5GB Contents: All of the current Physics sample scene files that can be loaded from the Demo Scenes tab Default Nucleus Location: Not in a public Nucleus folder ## Extensions Content Extension content is mostly covered within the various Browsers inside of the foundation Omniverse applications. But if you’re interested in a specific extension and the content that showcases it, here’s a list of which downloadable pack contains that content. ### AnimGraph Samples AnimGraph: Available within the Examples Browser under the Animation header Launcher Pack Name: AnimGraph Sample 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: AnimGraph_NVD@10010.zip Pack Size: 1.6GB Contents: Character and motion sample data for use with AnimGraph Default Nucleus Location: NVIDIA/Assets/AnimGraph ### Rendering Samples Rendering: Available within the Examples Browser under the Rendering header Launcher Pack Name: Sample Scenes 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Sample_Scenes_NVD@10010.zip Pack Size: 26.0GB Contents: High fidelity rendering scenes including the Astronaut, Marbles and the Old Attic datasets Default Nucleus Location: NVIDIA/Samples/Examples/2023_1/Rendering ### Particle Systems Presets Particle Systems: Available within the Examples Browser under the Simulation header Launcher Pack Name: Particle Systems 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Particles_NVD@10010.zip Pack Size: 159MB Contents: Particles systems presets Default Nucleus Location: NVIDIA/Samples/Examples/2023_1/Visual Scripting Note The Ocean sample files are installed locally with the omni.ocean extension and can be found in the following Omniverse install location (USD Composer: - /Omniverse/Library/prod-create-2023.1.1/extscache/omni.ocean-0.4.1/data | Any installed Omniverse foundation application that includes the omni.ocean extension will include these files, so you can replace the library app path (e.g. prod-create-2023.1.1) to find those that are installed on your machine. ### ActionGraph Samples ActionGraph: Available within the Examples Browser under the Visual Scripting header Launcher Pack Name: Sample Scenes 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Sample_Scenes_NVD@10010.zip Pack Size: 26.0GB Contents: Tutorial samples for OmniGraph Default Nucleus Location: NVIDIA/Samples/Examples/2023_01/Visual Scripting ### Warp Samples Warp: Available within the Examples Browser under the Warp header Launcher Pack Name: Extensions Samples 3D Models Pack Included in Omniverse Apps: USD Composer / Code Pack: Extensions_Samples_NVD@10010.zip Pack Size: 878MB Contents: Tutorial samples for the Warp extension Default Nucleus Location: NVIDIA/Samples/Examples/Warp Note Some of the sample files are installed locally with the omni.warp extension and can be found in the following Omniverse install location (USD Composer: - /Omniverse/Library/extscache/omni.warp-0.8.2/data/scenes Any installed Omniverse foundation application that includes the omni.warp extension will include these files, so you can replace the library app path (e.g. prod-create-2023.1.1) to find those that are installed on your machine. ### Flow Presets Flow: Accessed through the Window -> Simulation -> Flow Presets menu Launcher Pack Name: Extensions Samples 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Extensions_Samples_NVD@10010.zip Pack Size: 878MB Contents: Tutorial samples for the Flow simulation extension Default Nucleus Location: NVIDIA/Samples/Examples/Flow XR: This content is accessed directly from within the Nucleus Content browser Launcher Pack Name: XR Samples 3D Models Pack Included in Omniverse Apps: USD Composer Pack: XR_Content_NVD@10010.zip Pack Size: 5.3GB Contents: Legacy Create XR templates and stages for working in XR environments Default Nucleus Location: NVIDIA/Assets/XR Core Demos: This content is accessed directly from within the Nucleus Content browser Launcher Pack Name: Core Demo Samples 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Core_Demos_NVD@10010.zip Pack Size: 8.9GB Contents: Contains multiple demo scenes for MFG, Cloudmaker, Connect and Warehouse Physics Default Nucleus Location: NVIDIA/Demos ## Foundation Apps Specific Content ### Audio2Face App Launcher Pack Name: Audio2Face Sample 3D Models Pack Included in Omniverse Apps: Audio2Face / USD Composer Pack: A2F_Content_NVD@10010.zip Pack Size: 6.2GB Contents: All of the core Audio2Face sample content that is available within the Example Browser in the Audio2Face app Default Nucleus Location: NVIDIA/Assets/Audio2Face ### IsaacSim IsaacSim content is versioned in folders inside of NVIDIA/Assets/Isaac on AWS and as such, it’s been configured in zip archives to mimic this folder structure. Each version of Isaac Sim uses only the specific versioned folder. In the Launcher IsaacSim Assets is split into 3 content packs. Launcher Pack Name: Isaac Sim Assets Pack 1 Included in Omniverse Apps: IsaacSim Pack Size: 19.9GB Contents: All of the core Isaac Sim sample content plus dependencies from the /NVIDIA folder. Split into 3 packs. Default Nucleus Location: NVIDIA/Assets/Isaac/2023.1.0 Launcher Pack Name: Isaac Sim Assets Pack 2 Included in Omniverse Apps: IsaacSim Pack Size: 27.8GB Contents: All of the core Isaac Sim sample content plus dependencies from the /NVIDIA folder. Split into 3 packs. Default Nucleus Location: NVIDIA/Assets/Isaac/2023.1.0 Launcher Pack Name: Isaac Sim Assets Pack 3 Included in Omniverse Apps: IsaacSim Pack Size: 28.4GB Contents: All of the core Isaac Sim sample content plus dependencies from the /NVIDIA folder. Split into 3 packs. Default Nucleus Location: NVIDIA/Assets/Isaac/2023.1.0 ## Extra Content Packs ### Datacenter Launcher Pack Name: Datacenter 3D Models Pack Included in Omniverse Apps: USD Composer Pack: Datacenter_NVD@10011.zip Pack Size: 187MB Contents: Datacenter assets for creating digital twins Default Nucleus Location: NVIDIA/Assets/DigitalTwin/Assets/Datacenter ### AECXR Launcher Pack Name: AEC XR 3D Models Pack Included in Omniverse Apps: USD Composer Pack: AEC_XR_NVD@10012.zip Pack Size: 13MB Contents: Architectural AEC elements for XR testing Default Nucleus Location: No default location on Nucleus - only available through download © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.Menu.md
Menu — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » Menu   # Menu class omni.ui.Menu Bases: Stack, MenuHelper The Menu class provides a menu widget for use in menu bars, context menus, and other popup menus. It can be either a pull-down menu in a menu bar or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item. Context menus are usually invoked by some special keyboard key or by right-clicking. Methods __init__(self[, text]) Construct Menu. call_on_build_fn(self) Called to re-create new children. get_current() Return the menu that is currently shown. has_on_build_fn(self) Called to re-create new children. hide(self) Close the menu window. invalidate(self) Make Menu dirty so onBuild will be executed to replace the children. set_on_build_fn(self, fn) Called to re-create new children. set_shown_changed_fn(self, fn) If the pulldown menu is shown on the screen. set_teared_changed_fn(self, fn) If the window is teared off. show(self) Create a popup window and show the menu in it. show_at(self, arg0, arg1) Create a popup window and show the menu in it. tear_at(self, arg0, arg1) Create a popup window and show the menu in it. Attributes shown If the pulldown menu is shown on the screen. tearable The ability to tear the window off. teared If the window is teared off. __init__(self: omni.ui._ui.Menu, text: str = '', **kwargs) → None Construct Menu. ### Arguments: `text :`The text for the menu. `kwargsdict`See below ### Keyword Arguments: `tearablebool`The ability to tear the window off. `shown_changed_fn`If the pulldown menu is shown on the screen. `teared_changed_fn`If the window is teared off. `on_build_fn`Called to re-create new children. `textstr`This property holds the menu’s text. `hotkey_textstr`This property holds the menu’s hotkey text. `checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. `hide_on_clickbool`Hide or keep the window when the user clicked this item. `delegateMenuDelegate`The delegate that generates a widget per menu item. `triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. `direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. `content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. `spacing`Sets a non-stretchable space in pixels between child items of this layout. `send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. call_on_build_fn(self: omni.ui._ui.Menu) → None Called to re-create new children. static get_current() → omni.ui._ui.Menu Return the menu that is currently shown. has_on_build_fn(self: omni.ui._ui.Menu) → bool Called to re-create new children. hide(self: omni.ui._ui.Menu) → None Close the menu window. It only works for pop-up context menu and for teared off menu. invalidate(self: omni.ui._ui.Menu) → None Make Menu dirty so onBuild will be executed to replace the children. set_on_build_fn(self: omni.ui._ui.Menu, fn: Callable[[], None]) → None Called to re-create new children. set_shown_changed_fn(self: omni.ui._ui.Menu, fn: Callable[[bool], None]) → None If the pulldown menu is shown on the screen. set_teared_changed_fn(self: omni.ui._ui.Menu, fn: Callable[[bool], None]) → None If the window is teared off. show(self: omni.ui._ui.Menu) → None Create a popup window and show the menu in it. It’s usually used for context menus that are typically invoked by some special keyboard key or by right-clicking. show_at(self: omni.ui._ui.Menu, arg0: float, arg1: float) → None Create a popup window and show the menu in it. This enable to popup the menu at specific position. X and Y are in points to make it easier to the Python users. tear_at(self: omni.ui._ui.Menu, arg0: float, arg1: float) → None Create a popup window and show the menu in it. This tear the menu at specific position. X and Y are in points to make it easier to the Python users. property shown If the pulldown menu is shown on the screen. property tearable The ability to tear the window off. property teared If the window is teared off. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.ZStack.md
ZStack — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » ZStack   # ZStack class omni.ui.ZStack Bases: Stack Shortcut for Stack{eBackToFront}. The widgets are placed sorted in a Z-order in top right corner with suitable sizes. Methods __init__(self, **kwargs) Construct a stack with the widgets placed in a Z-order with sorting from background to foreground. Attributes __init__(self: omni.ui._ui.ZStack, **kwargs) → None Construct a stack with the widgets placed in a Z-order with sorting from background to foreground. `kwargsdict`See below ### Keyword Arguments: `direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. `content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. `spacing`Sets a non-stretchable space in pixels between child items of this layout. `send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
data-collection-faq.md
Omniverse Data Collection & Use FAQ — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Omniverse Data Collection & Use FAQ   # Omniverse Data Collection & Use FAQ NVIDIA Omniverse Enterprise is a simple to deploy, end-to-end collaboration and true-to-reality simulation platform that fundamentally transforms complex design workflows for organizations of any scale. In order to improve the product, Omniverse software collects usage and performance behavior. When an enterprise manages Omniverse deployment via IT managed launcher, IT admin is responsible to configure the data collection setting. If consent is provided, data is collected in an aggregate manner at enterprise account level. Individual user data is completely anonymized. ## Frequently Asked Questions Q: What data is being collected and how is it used? A: Omniverse collects usage data when you install and start interacting with our platform technologies. The data we collect and how we use it are as follows. Installation and configuration details such as version of operating system, applications installed - This information allows us to recognize usage trends & patterns Identifiers, such as your unique NVIDIA Enterprise Account ID(org-name) and Session ID which allow us to recognize software usage trends and patterns. Hardware Details such as CPU, GPU, monitor information - This information allows us to optimize settings in order to provide best performance Product session and feature usage - This information allows us to understand user journey and product interaction to further enhance workflows Error and crash logs - This information allows to improve performance & stability for troubleshooting and diagnostic purposes of our software Q: Does NVIDIA collect personal information such as email id, name etc. ? A: When an enterprise manages Omniverse deployment via IT managed launcher, IT admin is responsible to configure the data collection setting. If consent is provided, data is collected in an aggregate manner at enterprise account level. Individual user data is completely anonymized. Q: How can I change my data collection setting - opt-in to data collection? A: NVIDIA provides full flexibility for an enterprise to opt-in to data collection. In the .config folder there is a privacy.toml file which can be set to “true”. For detailed instructions, review the appropriate installation guide: Installation Guide for Windows Installation Guide for Linux Q: How can I change my data collection setting - opt-out of data collection? A: NVIDIA provides full flexibility for an enterprise to opt-out of data collection. In the .config folder there is a privacy.toml file which can be set to “false”. For detailed instructions, review the appropriate installation guide: Installation Guide for Windows Installation Guide for Linux Q: How can I request the data Omniverse Enterprise has collected? A: If you are an Enterprise customer, please file a support ticket on NVIDIA ENterprise Portal. If any data was collected, NVIDIA will provide all data collected for your organization within 30 days. Q: How will Omniverse collect data in a scenario where my enterprise is firewalled with no Internet access? A: No data will be collected in a firewalled scenario. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
README.md
--- license: openrail task_categories: - text-generation language: - en ---
tutorial.md
Omni Asset Validator (Tutorial) — asset-validator 0.6.2 documentation asset-validator » Omni Asset Validator (Tutorial)   # Omni Asset Validator (Tutorial) ## Introduction Omniverse Asset Validator is an extensible framework to validate USD. Initially inspired from Pixar Compliance Checker, extends upon these ideas and adds more validation rules applicable throughout Omniverse, as well as adding the ability to automatically fix issues. Currently, there are two main components: Omni Asset Validator (Core): Core components for Validation engine. Feel free to use this component to implement programmatic functionality or extend Core functionality through its framework. Omni Asset Validator (UI): Convenient UI for Omniverse. Used for daily tasks with Omniverse tools as Create. The following tutorial will help you to: Run basic operations for Asset Validator, ValidationEngine and IssueFixer. Get familiar with existing Rules to diagnose and fix problems. Create your custom Rules. ## Tutorials ### Testing assets In order to run Asset Validator, we need to enable the extension Omni asset validator (Core). Optionally we can also enable Omni asset validator (UI) to perform similar operations using the user interface. Through this tutorial we will use Script Editor, enable it under the Window menu. The following tutorial uses the file BASIC_TUTORIAL_PATH which is bundled together with omni.asset_validator.core. We can see its contents with the following snippet: import omni.asset_validator.core from pxr import Usd stage = Usd.Stage.Open(omni.asset_validator.core.BASIC_TUTORIAL_PATH) print(stage.ExportToString()) The contents should be equivalent to: #usda 1.0 ( doc="""Generated from Composed Stage of root layer C:\\some\\location\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial.usda""" ) def Xform "Hello" { def Sphere "World" { } } To run a simple asset validation, with Script Editor execute the following code. import omni.asset_validator.core engine = omni.asset_validator.core.ValidationEngine() print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) Note For more information about ValidationEngine together with more examples can be found at the ValidationEngine API. The above code would produce similar results to. Results( asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", issues=[ Issue( message="Stage does not specify an upAxis.", severity=IssueSeverity.FAILURE, rule=StageMetadataChecker, at=None, suggestion=None ), Issue( message="Stage does not specify its linear scale in metersPerUnit.", severity=IssueSeverity.FAILURE, rule=StageMetadataChecker, at=None, suggestion=None ), Issue( message="Stage has missing or invalid defaultPrim.", severity=IssueSeverity.FAILURE, rule=StageMetadataChecker, at=None, suggestion=None ), Issue( message="Stage has missing or invalid defaultPrim.", severity=IssueSeverity.FAILURE, rule=OmniDefaultPrimChecker, at=StageId( identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" ), suggestion=Suggestion( callable=UpdateDefaultPrim, message="Updates the default prim" ) ) ] ) The main result of validation engine is called an Issue. The main task of Asset validation is to detect and fix issues. An Issue has important information on how to achieve both tasks. Detect. Once an issue has been found it offers a description of the problem (through a human-readable message), its severity, the Rule that found the issue and its location (i.e. the Usd.Prim). Fix. If a suggestion is available, it will help to address the Issue found. Information on the Rule and the location of the issue will be used to address it. In the following section we will walk you through on how to identify and fix issues. Note For more information see the Issue API. ### Understanding Rules Omni asset validator (Core) ships with multiple rules, in the previous example we already covered two: StageMetadataChecker: All stages should declare their upAxis and metersPerUnit. Stages that can be consumed as referencable assets should furthermore have a valid defaultPrim declared, and stages meant for consumer-level packaging should always have upAxis set to Y. OmniDefaultPrimChecker: Omniverse requires a single, active, Xformable root prim, also set to the layer’s defaultPrim. Refer to Rules for the rest of rules. In the previous example when calling ValidationEngine we invoked all rules available. ValidationRulesRegistry has a registry of all rules to be used by ValidationEngine. import omni.asset_validator.core for category in omni.asset_validator.core.ValidationRulesRegistry.categories(): for rule in omni.asset_validator.core.ValidationRulesRegistry.rules(category=category): print(rule.__name__) If we want to have finer control of what we can execute, we can also specify which rules to run, for example: import omni.asset_validator.core engine = omni.asset_validator.core.ValidationEngine(initRules=False) engine.enableRule(omni.asset_validator.core.OmniDefaultPrimChecker) print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) There are two new elements present here: initRules: By default set to true. if set to false, no rules will be automatically loaded. enableRule: A method of ValidationEngine to add rules. The above would produce the following result: Results( asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", issues=[ Issue( message="Stage has missing or invalid defaultPrim.", severity=IssueSeverity.FAILURE, rule=OmniDefaultPrimChecker, at=StageId( identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" ), suggestion=Suggestion( callable=UpdateDefaultPrim, message="Updates the default prim" ) ) ] ) In this particular case, OmniDefaultPrimChecker has implemented a suggestion for this specific issue. The second important class in Core we want to cover is IssueFixer, the way to invoke it is quite straightforward. import omni.asset_validator.core fixer = omni.asset_validator.core.IssueFixer(asset=omni.asset_validator.core.BASIC_TUTORIAL_PATH) fixer.fix([]) fixer.fix will receive the list of issues that should be addressed. The list of issues to address can be accessed through issues method in Results class. Note For more information about IssueFixer see IssueFixer API. By combining the previous two examples we can now, detect and fix issues for a specific rule. import omni.asset_validator.core # Detect issues engine = omni.asset_validator.core.ValidationEngine(initRules=False) engine.enableRule(omni.asset_validator.core.OmniDefaultPrimChecker) result = engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH) # Fix issues fixer = omni.asset_validator.core.IssueFixer(asset=omni.asset_validator.core.BASIC_TUTORIAL_PATH) fixer.fix(result.issues()) Warning In this tutorial we do temporary changes. To persist your changes uses fixer.save(). If we inspect the file BASIC_TUTORIAL_PATH: import omni.asset_validator.core from pxr import Usd stage = Usd.Stage.Open(omni.asset_validator.core.BASIC_TUTORIAL_PATH) print(stage.ExportToString()) We can find the issue reported by OmniDefaultPrimChecker is fixed: #usda 1.0 ( defaultPrim="Hello" doc="""Generated from Composed Stage of root layer C:\\some\\location\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial.usda""" ) def Xform "Hello" { def Sphere "World" { } } Note Try to repeat the same steps using the UI. ### Custom Rule: Detection If the shipped rules are not enough for your needs you can also implement your own rule. ValidationEngine allows to be extensible, by levering users to add its own rules. To add a new rule extend from BaseRuleChecker. The most simple code to achieve this is as follows: import omni.asset_validator.core from pxr import Usd class MyRule(omni.asset_validator.core.BaseRuleChecker): def CheckPrim(self, prim: Usd.Prim) -> None: pass engine = omni.asset_validator.core.ValidationEngine(initRules=False) engine.enableRule(MyRule) print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) We can see our method CheckPrim being invoked for every Prim. However, our output is empty because CheckPrim has not notified of any issues. Results( asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", issues=[ ] ) Note CheckPrim is not the only method available, see more at BaseRuleChecker API. To add a bit of logic we can change our class to report a single failure when we encounter the prim whose path is /Hello/World: import omni.asset_validator.core from pxr import Usd class MyRule(omni.asset_validator.core.BaseRuleChecker): def CheckPrim(self, prim: Usd.Prim) -> None: if prim.GetPath() == "/Hello/World": self._AddFailedCheck( message="Goodbye!", at=prim, ) engine = omni.asset_validator.core.ValidationEngine(initRules=False) engine.enableRule(MyRule) print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) There are three levels of issues: Errors: Errors are used to notify user that something unexpected happened that would not let the Rule run (i.e. File not found error). Added through the method _AddError. Warnings: Warnings are used to notify users that though correct data is found it could cause a potential problem. Added through the method _AddWarning. Failures: The most common way to report an Issue in Asset Validation. This can be done through _AddFailedCheck as seen in the example above. Above code will generate: Results( asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", issues=[ Issue( message="Goodbye!", severity=IssueSeverity.FAILURE, rule=MyRule, at=PrimId( stage_ref=StageId( identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" ), path="/Hello/World" ), suggestion=None ) ] ) With our Rule implemented the next step is to propose a suggestion to fix it. ### Custom Rule: Fix The fixing interface requires to implement a Suggestion. A Suggestion will take as parameters: Stage: The original stage where the issue was found. Location: The location defined in the Issue (i.e. the at attribute). This will help us to scope down our fix. import omni.asset_validator.core from pxr import Usd class MyRule(omni.asset_validator.core.BaseRuleChecker): def Callable(self, stage: Usd.Stage, location: Usd.Prim) -> None: raise NotImplementedError() def CheckPrim(self, prim: Usd.Prim) -> None: if prim.GetPath() == "/Hello/World": self._AddFailedCheck( message="Goodbye!", at=prim, suggestion=omni.asset_validator.core.Suggestion( message="Avoids saying goodbye!", callable=self.Callable, ) ) engine = omni.asset_validator.core.ValidationEngine(initRules=False) engine.enableRule(MyRule) print(engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH)) It will now produce the following output. Results( asset="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda", issues=[ Issue( message="Goodbye!", severity=IssueSeverity.FAILURE, rule=MyRule, at=PrimId( stage_ref=StageId( identifier="C:\some\location\exts\omni.asset_validator.core\omni\asset_validator\core\resources\tutorial.usda" ), path="/Hello/World" ), suggestion=Suggestion( callable=Callable, message="Avoids saying goodbye!" ) ) ] ) As we can see we have now a suggestion with a description and a method to invoke. The full example will be: import omni.asset_validator.core from pxr import Usd class MyRule(omni.asset_validator.core.BaseRuleChecker): def Callable(self, stage: Usd.Stage, location: Usd.Prim) -> None: raise NotImplementedError() def CheckPrim(self, prim: Usd.Prim) -> None: if prim.GetPath() == "/Hello/World": self._AddFailedCheck( message="Goodbye!", at=prim, suggestion=omni.asset_validator.core.Suggestion( message="Avoids saying goodbye!", callable=self.Callable, ) ) engine = omni.asset_validator.core.ValidationEngine(initRules=False) engine.enableRule(MyRule) result = engine.validate(omni.asset_validator.core.BASIC_TUTORIAL_PATH) fixer = omni.asset_validator.core.IssueFixer(asset=omni.asset_validator.core.BASIC_TUTORIAL_PATH) result = fixer.fix(result.issues()) print(result) Notice how the NotImplementedError error was not thrown during fixer.fix. However, we can access the result of execution by inspecting result: [ FixResult( issue=Issue( message='Goodbye!', severity=FAILURE, rule=<class '__main__.MyRule'>, at=PrimId( stage_ref=StageId(identifier='C:\\sources\\asset-validator\\_build\\windows-x86_64\\release\\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial.usda'), path='/Hello/World' ), suggestion=Suggestion(callable=Callable, message='Avoids saying goodbye!') ), status=FAILURE, exception=NotImplementedError() ) ] Finally, if you decide to run your custom Rule with the rest of the rules, it may be useful to register it in ValidationRulesRegistry, this can be done using registerRule. import omni.asset_validator.core from pxr import Usd @omni.asset_validator.core.registerRule("MyCategory") class MyRule(omni.asset_validator.core.BaseRuleChecker): def CheckPrim(self, prim: Usd.Prim) -> None: pass for rule in omni.asset_validator.core.ValidationRulesRegistry.rules(category="MyCategory"): print(rule.__name__) ### Custom Rule: Locations For this section, let us use LAYERS_TUTORIAL_PATH. We proceed like in the previous section: import omni.asset_validator.core from pxr import Usd stage = Usd.Stage.Open(omni.asset_validator.core.LAYERS_TUTORIAL_PATH) print(stage.ExportToString()) The contents should be equivalent to: #usda 1.0 ( doc="""Generated from Composed Stage of root layer C:\\some\\location\exts\\omni.asset_validator.core\\omni\\asset_validator\\core\\resources\\tutorial2.usda""" ) def Xform "Hello" { def Sphere "World" { double3 xformOp:translate = (-250, 0, 0) uniform token[] xformOpOrder = ["xformOp:translate"] } } What we are doing is adding an opinion to the prim “/Hello/World”. In the previous section we learned how to create a Rule and issue a Failure. The data model is similar to the following code snippet: from pxr import Usd import omni.asset_validator.core # We open the stage stage = Usd.Stage.Open(omni.asset_validator.core.LAYERS_TUTORIAL_PATH) # We inspect a specific prim prim = stage.GetPrimAtPath("/Hello/World") # We create the data model for the issue def Callable(stage: Usd.Stage, location: Usd.Prim) -> None: raise NotImplementedError() issue = omni.asset_validator.core.Issue( message="Goodbye!", at=prim, severity= omni.asset_validator.core.IssueSeverity.FAILURE, suggestion=omni.asset_validator.core.Suggestion( message="Avoids saying goodbye!", callable=Callable ), ) # Inspect the fixing points for the suggestion for fix_at in issue.all_fix_sites: layer_id = fix_at.layer_id path = fix_at.path print(layer_id, path) The output of the above snippet should show first the path of layers tutorial (i.e. LAYERS_TUTORIAL_PATH) and second the basic tutorial (i.e. BASIC_TUTORIAL_PATH). While this may be correct for above issue, different issues may need to override this information. Every issue, has associated fixing sites (i.e. property all_fix_sites). The fixing sites are all places that contribute opinions to the prim from strongest to weakest order. When no layer is provided to fix, by default will be the strongest. If no indicated (as above) the preferred site will be the Root layer. To change the preferred site to fix, we can add the at attribute to Suggestion. from pxr import Usd, Sdf import omni.asset_validator.core # We open the stage stage = Usd.Stage.Open(omni.asset_validator.core.LAYERS_TUTORIAL_PATH) # We inspect a specific prim prim = stage.GetPrimAtPath("/Hello/World") # We create the data model for the issue def Callable(stage: Usd.Stage, location: Usd.Prim) -> None: raise NotImplementedError() issue = omni.asset_validator.core.Issue( message="Goodbye!", at=prim, severity= omni.asset_validator.core.IssueSeverity.FAILURE, suggestion=omni.asset_validator.core.Suggestion( message="Avoids saying goodbye!", callable=Callable, at=[Sdf.Layer.FindOrOpen(omni.asset_validator.core.BASIC_TUTORIAL_PATH)] ), ) # Inspect the fixing points for the suggestion for fix_at in issue.all_fix_sites: layer_id = fix_at.layer_id path = fix_at.path print(layer_id, path) The output will change the order now, and you should see basic tutorial path first (i.e. BASIC_TUTORIAL_PATH). The previous tutorial should have helped you to: Create a custom Rule, generating an error and a suggestion to fix it. Run ValidationEngine with a specific rule. Run IssueFixer to fix specific issues and review the response. ### Frequently Asked Questions Are there any guards to make sure fixes are still relevant / don’t collide? In our general practice we have noticed: Fixing an issue may solve another issue. If a consecutive suggestion may fail to be applied, we just keep the exception in FixResult and continue execution. You will then decide the steps to take with FixResult. Fixing an issue may generate another issue. For the second case it is recommended to run ValidationEngine again, to discover those cases. Think of it as an iterative process with help of an automated tool. Are fixes addressed in the root layer? strongest layer? Currently, some Issues would perform the suggestion on the strongest layer, while many on the root layer. We are working into offer flexibility to decide in which layer aim the changes, while also offering a default layer for automated workflows. © Copyright 2021-2023, NVIDIA. Last updated on Jun 20, 2023.
testing_exts_cplusplus.md
Testing Extensions with C++ — kit-manual 105.1 documentation kit-manual » Testing Extensions with C++   # Testing Extensions with C++ For information on testing extensions with Python, look here ## Doctest omni.kit.test has a doctest library as a runner for C++ tests. Further, refer to Carbonite’s Testing.md to learn about using the Doctest testing system. List of doctest command line arguments You can also use –help on the command line for test.unit: test.unit.exe --help Although Omniverse adds additional options, there is also an online reference for Doctest command-line options. ## Set up testable libraries To write C++ tests, you first must have created a shared library with tests to be loaded: project_ext_tests(ext, "omni.appwindow.tests") add_files("impl", "tests.cpp") tests.cpp/AppWindowTests.cpp: #include <carb/BindingsUtils.h> #include <doctest/doctest.h> CARB_BINDINGS("omni.appwindow.tests") TEST_SUITE("some test suite") { TEST_CASE("test case success") { CHECK(5 == 5); } } Next specify in the test section to load this library: [[test]] cppTests.libraries = [ "bin/${lib_prefix}omni.appwindow.tests${lib_ext}", ] Run tests the same way with _build\windows-x86_64\release\tests-[extension_name].bat. omni.kit.test this: loads the library tests will be registered automatically in doctest runs doctest In this setup C++ and python tests will run in the same process. A separate [[test]] entry can be created to run separate processes. To run only subset of tests -f option can be used: > _build\windows-x86_64\release\tests-omni.appwindow.bat -f foo All arguments in the tested process after -- are passed to doctest. But to pass to the tested process, -- must be used. So to pass arguments to doctest, -- must be specified twice, like so: > _build\windows-x86_64\release\tests-omni.appwindow.bat -- -- -tc=*foo* -s When using the test.unit.exe workflow instead, check below. ## Running a single test case In order to run a single test case, use the -tc flag (short for –test-case) with wildcard filters: _build\windows-x86_64\release\tests-omni.appwindow.bat -- -- -tc="*[rtx]*" Commas can be used to add multiple filters: _build\windows-x86_64\release\tests-omni.appwindow.bat -- -- -tc="*[rtx]*,*[graphics]*" ## Unit Tests Some tests are written using an older approach. Carbonite is used directly without kit and all the required plugins are manually loaded. To run those tests use: > _build\windows-x86_64\release\test.unit.exe ## Image comparison with a golden image Some graphics tests allow you to compare visual tests with a golden image. This can be done by creating an instance of ImageComparison class. Each ImageComparison descriptor requires a unique GUID, and must be accompanied with the equivalent string version in C++ source as a comment for easy lookup. Defining a test case: ImageComparisonDesc desc = { { 0x2ae3d60e, 0xbc3b, 0x48b6, { 0xa8, 0x67, 0xe0, 0xa0, 0x7c, 0xaa, 0x9e, 0xd0 } }, // 2AE3D60E-BC3B-48B6-A867-E0A07CAA9ED0 "Depth-stencil-16bit", ComparisonMetric::eAbsoluteError, kBackBufferWidth, kBackBufferHeight }; // Create Image comparison imageComparison = new ImageComparison(); // register the test case (only once) status = imageComparison->registerTestCase(&desc); REQUIRE(status); ### Regression testing of an executable with a golden image: This is supported by any executable that uses carb.renderer (e.g. omnivserse-kit or rtx.example), in which it can capture and dump a frame. NVF is not yet supported. // 1- run an executable that supports CaptureFrame std::string execPath; std::string cmdLine; ImageComparison::makeCaptureFrameCmdLine(500, // Captures frame number 500 &desc, // ImageComparisonDesc desc "kit", // Executable's name execPath, // Returns the executable path needed for executeCommand() cmdLine); // Returns command line arguments needed for executeCommand() // 2- Append any command line arguments you need to cmdLine with proper spaces cmdLine += " --/rtx/debugView='normal'"; // 3- Run the application with a limited time-out status = executeCommand(execPath, cmdLine, kExecuteTimeoutMs); REQUIRE(status); // 4- compare the golden image with the dumped output of the captured frame (located at $Grapehene$/outputs) float result = 0.0f; CHECK(m_captureFrame->compareResult(&desc, result) == ImageComparisonStatus::eSuccess); CHECK(result <= Approx(kMaxMeanSqrError)); // With ComparisonMetric::eMeanErrorSquared ### Regression testing of a rendering test using comparison of backbuffer with a golden image: // 1- Create an instance of CaptureFrame and initialize it captureFrame = new CaptureFrame(m_gEnv->graphics, m_gEnv->device); captureFrame->initializeCaptureFrame(RenderOpTest::kBackBufferWidth, RenderOpTest::kBackBufferHeight); // 2- Render something // 3- copy BackBuffer to CaptureFrame captureFrame->copyBackBufferToHostBuffer(commandList, backBufferTexture); // 4- Submit commands and wait to finish // 5- compare the golden image with the BackBuffer (or dump it into the disk $Grapehene$/outputs) float result = 0.0f; CHECK(imageComparison->compareResult(&desc, captureFrame->readBufferData(true), captureFrame->getBufferSize(), result) == ImageComparisonStatus::eSuccess); CHECK(result == Approx(0.0f)); compareResult() also allows you to dump the BackBuffer into outputs folder on the disk. This can be done using the following option of test.unit executable: test.unit.exe --carb-golden -tc="*[graphics]*,*[visual]*" The following command allows executables to dump only the golden images of the test that fail our acceptable threshold: test.unit.exe --carb-golden-failure -tc="*[graphics]*,*[visual]*" ### How to update and upload a new golden image Run the test in release mode. // Example: regression testing of OmniverseKit executable test.unit.exe -tc="*[omniverse-kit][rtx]*" // Example: regression testing of visual rendering tests test.unit.exe --carb-golden -tc="*[graphics]*,*[visual]*" // Example: regression testing of visual rendering tests that fail our acceptable threshold test.unit.exe --carb-golden-failure -tc="*[graphics]*,*[visual]*" Verify and view the golden image that is added to outputs folder in Omniverse kit’s repo. It must be exactly what you expect to see. Name of the golden image is GUID of the test. Copy the golden image from outputs folder to data\golden. This is a folder for git lfs data. Open a merge request with git-lfs data changes. ### Troubleshooting All unit tests crash on textures or shaders: You must have git lfs installed and initialize it. Check files in data folder, and open them in a text editor. You should not see any URL or hash as content. Install the latest driver (refer to readme.md) executeCommand() fails: A possible crash or assert in release mode. A crash or hang during exit. Time-out reached. Note that any assert dialog box in release mode may cause time-out. compareResult() fails: Rendering is broken, or a regression is introduced beyond the threshold. outputs folder is empty for tests with a tag of [executable]: A regression caused the app to fail. ### How to use asset folder for storing data Perform the following command to delete the existing _build\asset.override folder. That folder must be gone before proceeding further. .\assets.bat clean Stage assets. It copies data from assets to assets.override. .\assets.bat stage Modify any data under asset.override. Do NOT modify assets folder. Upload and publish a new asset package: .\assets.bat publish Rebuild to download the new assets and run the the test to verify: .\build.bat --rebuild Open a merge request with new assets.packman.xml changes. ## Skipping Vulkan or Direct3D 12 graphics tests In order to skip running a specific backend for graphical tests, use --carb-no-vulkan or --carb-no-d3d12. test.unit.exe --carb-no-vulkan" © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
UsdRender.md
UsdRender module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » UsdRender module   # UsdRender module Summary: The UsdRender module provides schemas and behaviors for describing renders. Classes: DenoisePass A RenderDenoisePass generates renders via a denoising process. Pass A RenderPass prim encapsulates the necessary information to generate multipass renders. Product A UsdRenderProduct describes an image or other file-like artifact produced by a render. Settings A UsdRenderSettings prim specifies global settings for a render process, including an enumeration of the RenderProducts that should result, and the UsdGeomImageable purposes that should be rendered. SettingsBase Abstract base class that defines render settings that can be specified on either a RenderSettings prim or a RenderProduct prim. Tokens Var A UsdRenderVar describes a custom data variable for a render to produce. class pxr.UsdRender.DenoisePass A RenderDenoisePass generates renders via a denoising process. This may be the same renderer that a pipeline uses for UsdRender, or may be a separate one. Notably, a RenderDenoisePass requires another Pass to be present for it to operate. The denoising process itself is not generative, and requires images inputs to operate. As denoising integration varies so widely across pipelines, all implementation details are left to pipeline-specific prims that inherit from RenderDenoisePass. Methods: Define classmethod Define(stage, path) -> DenoisePass Get classmethod Get(stage, path) -> DenoisePass GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Define() classmethod Define(stage, path) -> DenoisePass Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> DenoisePass Return a UsdRenderDenoisePass holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdRenderDenoisePass(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdRender.Pass A RenderPass prim encapsulates the necessary information to generate multipass renders. It houses properties for generating dependencies and the necessary commands to run to generate renders, as well as visibility controls for the scene. While RenderSettings describes the information needed to generate images from a single invocation of a renderer, RenderPass describes the additional information needed to generate a time varying set of images. There are two consumers of RenderPass prims - a runtime executable that generates images from usdRender prims, and pipeline specific code that translates between usdRender prims and the pipeline’s resource scheduling software. We’ll refer to the latter as’job submission code’. The name of the prim is used as the pass’s name. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdRenderTokens. So to set an attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded as the value. Methods: CreateCommandAttr(defaultValue, writeSparsely) See GetCommandAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDenoiseEnableAttr(defaultValue, ...) See GetDenoiseEnableAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDenoisePassRel() See GetDenoisePassRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateFileNameAttr(defaultValue, writeSparsely) See GetFileNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateInputPassesRel() See GetInputPassesRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreatePassTypeAttr(defaultValue, writeSparsely) See GetPassTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRenderSourceRel() See GetRenderSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Pass Get classmethod Get(stage, path) -> Pass GetCommandAttr() The command to run in order to generate renders for this pass. GetDenoiseEnableAttr() When True, this Pass pass should be denoised. GetDenoisePassRel() The The UsdRenderDenoisePass prim from which to source denoise settings. GetFileNameAttr() The asset that contains the rendering prims or other information needed to render this pass. GetInputPassesRel() The set of other Passes that this Pass depends on in order to be constructed properly. GetPassTypeAttr() A string used to categorize differently structured or executed types of passes within a customized pipeline. GetRenderSourceRel() The source prim to render from. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateCommandAttr(defaultValue, writeSparsely) → Attribute See GetCommandAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDenoiseEnableAttr(defaultValue, writeSparsely) → Attribute See GetDenoiseEnableAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDenoisePassRel() → Relationship See GetDenoisePassRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateFileNameAttr(defaultValue, writeSparsely) → Attribute See GetFileNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateInputPassesRel() → Relationship See GetInputPassesRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreatePassTypeAttr(defaultValue, writeSparsely) → Attribute See GetPassTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateRenderSourceRel() → Relationship See GetRenderSourceRel() , and also Create vs Get Property Methods for when to use Get vs Create. static Define() classmethod Define(stage, path) -> Pass Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Pass Return a UsdRenderPass holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdRenderPass(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetCommandAttr() → Attribute The command to run in order to generate renders for this pass. The job submission code can use this to properly send tasks to the job scheduling software that will generate products. The command can contain variables that will be substituted appropriately during submission, as seen in the example below with {fileName}. For example: command[0] =”prman”command[1] =”-progress”command[2] =”-pixelvariance”command[3] =”-0.15”command[4] =”{fileName}”# the fileName property will be substituted Declaration uniform string[] command C++ Type VtArray<std::string> Usd Type SdfValueTypeNames->StringArray Variability SdfVariabilityUniform GetDenoiseEnableAttr() → Attribute When True, this Pass pass should be denoised. Declaration uniform bool denoise:enable = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool Variability SdfVariabilityUniform GetDenoisePassRel() → Relationship The The UsdRenderDenoisePass prim from which to source denoise settings. GetFileNameAttr() → Attribute The asset that contains the rendering prims or other information needed to render this pass. Declaration uniform asset fileName C++ Type SdfAssetPath Usd Type SdfValueTypeNames->Asset Variability SdfVariabilityUniform GetInputPassesRel() → Relationship The set of other Passes that this Pass depends on in order to be constructed properly. For example, a Pass A may generate a texture, which is then used as an input to Pass B. By default, usdRender makes some assumptions about the relationship between this prim and the prims listed in inputPasses. Namely, when per-frame tasks are generated from these pass prims, usdRender will assume a one-to-one relationship between tasks that share their frame number. Consider a pass named’composite’whose inputPasses targets a Pass prim named’beauty`. By default, each frame for’composite’will depend on the same frame from’beauty’: beauty.1 ->composite.1 beauty.2 ->composite.2 etc The consumer of this RenderPass graph of inputs will need to resolve the transitive dependencies. GetPassTypeAttr() → Attribute A string used to categorize differently structured or executed types of passes within a customized pipeline. For example, when multiple DCC’s (e.g. Houdini, Katana, Nuke) each compute and contribute different Products to a final result, it may be clearest and most flexible to create a separate RenderPass for each. Declaration uniform token passType C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform GetRenderSourceRel() → Relationship The source prim to render from. If fileName is not present, the source is assumed to be a RenderSettings prim present in the current Usd stage. If fileName is present, the source should be found in the file there. This relationship might target a string attribute on this or another prim that identifies the appropriate object in the external container. For example, for a Usd-backed pass, this would point to a RenderSettings prim. Houdini passes would point to a Rop. Nuke passes would point to a write node. static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdRender.Product A UsdRenderProduct describes an image or other file-like artifact produced by a render. A RenderProduct combines one or more RenderVars into a file or interactive buffer. It also provides all the controls established in UsdRenderSettingsBase as optional overrides to whatever the owning UsdRenderSettings prim dictates. Specific renderers may support additional settings, such as a way to configure compression settings, filetype metadata, and so forth. Such settings can be encoded using renderer-specific API schemas applied to the product prim. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdRenderTokens. So to set an attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded as the value. Methods: CreateOrderedVarsRel() See GetOrderedVarsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateProductNameAttr(defaultValue, ...) See GetProductNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateProductTypeAttr(defaultValue, ...) See GetProductTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Product Get classmethod Get(stage, path) -> Product GetOrderedVarsRel() Specifies the RenderVars that should be consumed and combined into the final product. GetProductNameAttr() Specifies the name that the output/display driver should give the product. GetProductTypeAttr() The type of output to produce. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateOrderedVarsRel() → Relationship See GetOrderedVarsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateProductNameAttr(defaultValue, writeSparsely) → Attribute See GetProductNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateProductTypeAttr(defaultValue, writeSparsely) → Attribute See GetProductTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Product Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Product Return a UsdRenderProduct holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdRenderProduct(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetOrderedVarsRel() → Relationship Specifies the RenderVars that should be consumed and combined into the final product. If ordering is relevant to the output driver, then the ordering of targets in this relationship provides the order to use. GetProductNameAttr() → Attribute Specifies the name that the output/display driver should give the product. This is provided as-authored to the driver, whose responsibility it is to situate the product on a filesystem or other storage, in the desired location. Declaration token productName ="" C++ Type TfToken Usd Type SdfValueTypeNames->Token GetProductTypeAttr() → Attribute The type of output to produce. The default,”raster”, indicates a 2D image. In the future, UsdRender may define additional product types. Declaration uniform token productType ="raster" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdRender.Settings A UsdRenderSettings prim specifies global settings for a render process, including an enumeration of the RenderProducts that should result, and the UsdGeomImageable purposes that should be rendered. How settings affect rendering For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdRenderTokens. So to set an attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded as the value. Methods: CreateIncludedPurposesAttr(defaultValue, ...) See GetIncludedPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateMaterialBindingPurposesAttr(...) See GetMaterialBindingPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateProductsRel() See GetProductsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRenderingColorSpaceAttr(defaultValue, ...) See GetRenderingColorSpaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Settings Get classmethod Get(stage, path) -> Settings GetIncludedPurposesAttr() The list of UsdGeomImageable purpose values that should be included in the render. GetMaterialBindingPurposesAttr() Ordered list of material purposes to consider when resolving material bindings in the scene. GetProductsRel() The set of RenderProducts the render should produce. GetRenderingColorSpaceAttr() Describes a renderer's working (linear) colorSpace where all the renderer/shader math is expected to happen. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetStageRenderSettings classmethod GetStageRenderSettings(stage) -> Settings CreateIncludedPurposesAttr(defaultValue, writeSparsely) → Attribute See GetIncludedPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateMaterialBindingPurposesAttr(defaultValue, writeSparsely) → Attribute See GetMaterialBindingPurposesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateProductsRel() → Relationship See GetProductsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRenderingColorSpaceAttr(defaultValue, writeSparsely) → Attribute See GetRenderingColorSpaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Settings Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Settings Return a UsdRenderSettings holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdRenderSettings(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetIncludedPurposesAttr() → Attribute The list of UsdGeomImageable purpose values that should be included in the render. Note this cannot be specified per-RenderProduct because it is a statement of which geometry is present. Declaration uniform token[] includedPurposes = ["default","render"] C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform GetMaterialBindingPurposesAttr() → Attribute Ordered list of material purposes to consider when resolving material bindings in the scene. The empty string indicates the”allPurpose”binding. Declaration uniform token[] materialBindingPurposes = ["full",""] C++ Type VtArray<TfToken> Usd Type SdfValueTypeNames->TokenArray Variability SdfVariabilityUniform Allowed Values full, preview,”” GetProductsRel() → Relationship The set of RenderProducts the render should produce. This relationship should target UsdRenderProduct prims. If no products are specified, an application should produce an rgb image according to the RenderSettings configuration, to a default display or image name. GetRenderingColorSpaceAttr() → Attribute Describes a renderer’s working (linear) colorSpace where all the renderer/shader math is expected to happen. When no renderingColorSpace is provided, renderer should use its own default. Declaration uniform token renderingColorSpace C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – static GetStageRenderSettings() classmethod GetStageRenderSettings(stage) -> Settings Fetch and return stage ‘s render settings, as indicated by root layer metadata. If unauthored, or the metadata does not refer to a valid UsdRenderSettings prim, this will return an invalid UsdRenderSettings prim. Parameters stage (UsdStageWeak) – class pxr.UsdRender.SettingsBase Abstract base class that defines render settings that can be specified on either a RenderSettings prim or a RenderProduct prim. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdRenderTokens. So to set an attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded as the value. Methods: CreateAspectRatioConformPolicyAttr(...) See GetAspectRatioConformPolicyAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateCameraRel() See GetCameraRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDataWindowNDCAttr(defaultValue, ...) See GetDataWindowNDCAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDisableMotionBlurAttr(defaultValue, ...) See GetDisableMotionBlurAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateInstantaneousShutterAttr(defaultValue, ...) See GetInstantaneousShutterAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreatePixelAspectRatioAttr(defaultValue, ...) See GetPixelAspectRatioAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateResolutionAttr(defaultValue, writeSparsely) See GetResolutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> SettingsBase GetAspectRatioConformPolicyAttr() Indicates the policy to use to resolve an aspect ratio mismatch between the camera aperture and image settings. GetCameraRel() The camera relationship specifies the primary camera to use in a render. GetDataWindowNDCAttr() dataWindowNDC specifies the axis-aligned rectangular region in the adjusted aperture window within which the renderer should produce data. GetDisableMotionBlurAttr() Disable all motion blur by setting the shutter interval of the targeted camera to [0,0] - that is, take only one sample, namely at the current time code. GetInstantaneousShutterAttr() Deprecated - use disableMotionBlur instead. GetPixelAspectRatioAttr() The aspect ratio (width/height) of image pixels. GetResolutionAttr() The image pixel resolution, corresponding to the camera's screen window. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateAspectRatioConformPolicyAttr(defaultValue, writeSparsely) → Attribute See GetAspectRatioConformPolicyAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateCameraRel() → Relationship See GetCameraRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDataWindowNDCAttr(defaultValue, writeSparsely) → Attribute See GetDataWindowNDCAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDisableMotionBlurAttr(defaultValue, writeSparsely) → Attribute See GetDisableMotionBlurAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateInstantaneousShutterAttr(defaultValue, writeSparsely) → Attribute See GetInstantaneousShutterAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreatePixelAspectRatioAttr(defaultValue, writeSparsely) → Attribute See GetPixelAspectRatioAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateResolutionAttr(defaultValue, writeSparsely) → Attribute See GetResolutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> SettingsBase Return a UsdRenderSettingsBase holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdRenderSettingsBase(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAspectRatioConformPolicyAttr() → Attribute Indicates the policy to use to resolve an aspect ratio mismatch between the camera aperture and image settings. This policy allows a standard render setting to do something reasonable given varying camera inputs. The camera aperture aspect ratio is determined by the aperture atributes on the UsdGeomCamera. The image aspect ratio is determined by the resolution and pixelAspectRatio attributes in the render settings. “expandAperture”: if necessary, expand the aperture to fit the image, exposing additional scene content “cropAperture”: if necessary, crop the aperture to fit the image, cropping scene content “adjustApertureWidth”: if necessary, adjust aperture width to make its aspect ratio match the image “adjustApertureHeight”: if necessary, adjust aperture height to make its aspect ratio match the image “adjustPixelAspectRatio”: compute pixelAspectRatio to make the image exactly cover the aperture; disregards existing attribute value of pixelAspectRatio Declaration uniform token aspectRatioConformPolicy ="expandAperture" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values expandAperture, cropAperture, adjustApertureWidth, adjustApertureHeight, adjustPixelAspectRatio GetCameraRel() → Relationship The camera relationship specifies the primary camera to use in a render. It must target a UsdGeomCamera. GetDataWindowNDCAttr() → Attribute dataWindowNDC specifies the axis-aligned rectangular region in the adjusted aperture window within which the renderer should produce data. It is specified as (xmin, ymin, xmax, ymax) in normalized device coordinates, where the range 0 to 1 corresponds to the aperture. (0,0) corresponds to the bottom-left corner and (1,1) corresponds to the upper-right corner. Specifying a window outside the unit square will produce overscan data. Specifying a window that does not cover the unit square will produce a cropped render. A pixel is included in the rendered result if the pixel center is contained by the data window. This is consistent with standard rules used by polygon rasterization engines. UsdRenderRasterization The data window is expressed in NDC so that cropping and overscan may be resolution independent. In interactive workflows, incremental cropping and resolution adjustment may be intermixed to isolate and examine parts of the scene. In compositing workflows, overscan may be used to support image post-processing kernels, and reduced-resolution proxy renders may be used for faster iteration. The dataWindow:ndc coordinate system references the aperture after any adjustments required by aspectRatioConformPolicy. Declaration uniform float4 dataWindowNDC = (0, 0, 1, 1) C++ Type GfVec4f Usd Type SdfValueTypeNames->Float4 Variability SdfVariabilityUniform GetDisableMotionBlurAttr() → Attribute Disable all motion blur by setting the shutter interval of the targeted camera to [0,0] - that is, take only one sample, namely at the current time code. Declaration uniform bool disableMotionBlur = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool Variability SdfVariabilityUniform GetInstantaneousShutterAttr() → Attribute Deprecated - use disableMotionBlur instead. Override the targeted camera ‘s shutterClose to be equal to the value of its shutterOpen, to produce a zero-width shutter interval. This gives us a convenient way to disable motion blur. Declaration uniform bool instantaneousShutter = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool Variability SdfVariabilityUniform GetPixelAspectRatioAttr() → Attribute The aspect ratio (width/height) of image pixels. The default ratio 1.0 indicates square pixels. Declaration uniform float pixelAspectRatio = 1 C++ Type float Usd Type SdfValueTypeNames->Float Variability SdfVariabilityUniform GetResolutionAttr() → Attribute The image pixel resolution, corresponding to the camera’s screen window. Declaration uniform int2 resolution = (2048, 1080) C++ Type GfVec2i Usd Type SdfValueTypeNames->Int2 Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdRender.Tokens Attributes: adjustApertureHeight adjustApertureWidth adjustPixelAspectRatio aspectRatioConformPolicy camera color3f command cropAperture dataType dataWindowNDC denoiseEnable denoisePass disableMotionBlur expandAperture fileName full includedPurposes inputPasses instantaneousShutter intrinsic lpe materialBindingPurposes orderedVars passType pixelAspectRatio preview primvar productName productType products raster raw renderSettingsPrimPath renderSource renderingColorSpace resolution sourceName sourceType adjustApertureHeight = 'adjustApertureHeight' adjustApertureWidth = 'adjustApertureWidth' adjustPixelAspectRatio = 'adjustPixelAspectRatio' aspectRatioConformPolicy = 'aspectRatioConformPolicy' camera = 'camera' color3f = 'color3f' command = 'command' cropAperture = 'cropAperture' dataType = 'dataType' dataWindowNDC = 'dataWindowNDC' denoiseEnable = 'denoise:enable' denoisePass = 'denoise:pass' disableMotionBlur = 'disableMotionBlur' expandAperture = 'expandAperture' fileName = 'fileName' full = 'full' includedPurposes = 'includedPurposes' inputPasses = 'inputPasses' instantaneousShutter = 'instantaneousShutter' intrinsic = 'intrinsic' lpe = 'lpe' materialBindingPurposes = 'materialBindingPurposes' orderedVars = 'orderedVars' passType = 'passType' pixelAspectRatio = 'pixelAspectRatio' preview = 'preview' primvar = 'primvar' productName = 'productName' productType = 'productType' products = 'products' raster = 'raster' raw = 'raw' renderSettingsPrimPath = 'renderSettingsPrimPath' renderSource = 'renderSource' renderingColorSpace = 'renderingColorSpace' resolution = 'resolution' sourceName = 'sourceName' sourceType = 'sourceType' class pxr.UsdRender.Var A UsdRenderVar describes a custom data variable for a render to produce. The prim describes the source of the data, which can be a shader output or an LPE (Light Path Expression), and also allows encoding of (generally renderer-specific) parameters that configure the renderer for computing the variable. The name of the RenderVar prim drives the name of the data variable that the renderer will produce. In the future, UsdRender may standardize RenderVar representation for well-known variables under the sourceType intrinsic , such as r, g, b, a, z, or id. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdRenderTokens. So to set an attribute to the value”rightHanded”, use UsdRenderTokens->rightHanded as the value. Methods: CreateDataTypeAttr(defaultValue, writeSparsely) See GetDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSourceNameAttr(defaultValue, writeSparsely) See GetSourceNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSourceTypeAttr(defaultValue, writeSparsely) See GetSourceTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Var Get classmethod Get(stage, path) -> Var GetDataTypeAttr() The type of this channel, as a USD attribute type. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetSourceNameAttr() The renderer should look for an output of this name as the computed value for the RenderVar. GetSourceTypeAttr() Indicates the type of the source. CreateDataTypeAttr(defaultValue, writeSparsely) → Attribute See GetDataTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSourceNameAttr(defaultValue, writeSparsely) → Attribute See GetSourceNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSourceTypeAttr(defaultValue, writeSparsely) → Attribute See GetSourceTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Var Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Var Return a UsdRenderVar holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdRenderVar(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetDataTypeAttr() → Attribute The type of this channel, as a USD attribute type. Declaration uniform token dataType ="color3f" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSourceNameAttr() → Attribute The renderer should look for an output of this name as the computed value for the RenderVar. Declaration uniform string sourceName ="" C++ Type std::string Usd Type SdfValueTypeNames->String Variability SdfVariabilityUniform GetSourceTypeAttr() → Attribute Indicates the type of the source. “raw”: The name should be passed directly to the renderer. This is the default behavior. “primvar”: This source represents the name of a primvar. Some renderers may use this to ensure that the primvar is provided; other renderers may require that a suitable material network be provided, in which case this is simply an advisory setting. “lpe”: Specifies a Light Path Expression in the OSL Light Path Expressions language as the source for this RenderVar. Some renderers may use extensions to that syntax, which will necessarily be non- portable. “intrinsic”: This setting is currently unimplemented, but represents a future namespace for UsdRender to provide portable baseline RenderVars, such as camera depth, that may have varying implementations for each renderer. Declaration uniform token sourceType ="raw" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values raw, primvar, lpe, intrinsic © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
known-issues.md
Known issues — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Known issues   # Known issues ## CentOS and Red Hat Enterprise Linux There is a known issue using CentOS and Red Hat Enterprise Linux using Omniverse Launcher. Include the --no-sandbox flag when launching from the terminal. ## Launcher (General) Internet Access is required to use the Workstation Launcher (Internet Access is not required when using the IT Managed Launcher.) Occasional graphical artifacts and errors in Launcher UI for certain driver OS combinations Some Connectors may be installed without the associated Application on Linux systems Launcher may show errors after downloading content on Linux systems © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.Pixel.md
Pixel — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » Pixel   # Pixel class omni.ui.Pixel Bases: Length Pixel length is exact length in pixels. Methods __init__(self, value) Construct Pixel. Attributes __init__(self: omni.ui._ui.Pixel, value: float) → None Construct Pixel. `kwargsdict`See below ### Keyword Arguments: © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.Style.md
Style — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » Style   # Style class omni.ui.Style Bases: pybind11_object A singleton that controls the global style of the session. Methods __init__(*args, **kwargs) get_instance() Get the instance of this singleton object. Attributes default Set the default root style. __init__(*args, **kwargs) static get_instance() → omni.ui._ui.Style Get the instance of this singleton object. property default Set the default root style. It’s the style that is preselected when no alternative is specified. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
UsdShade.md
UsdShade module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » UsdShade module   # UsdShade module Summary: The UsdShade module provides schemas and behaviors for creating and binding materials, which encapsulate shading networks. Classes: AttributeType ConnectableAPI UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and making connections between shading parameters and outputs. ConnectionModification ConnectionSourceInfo A compact struct to represent a bundle of information about an upstream source attribute. CoordSysAPI UsdShadeCoordSysAPI provides a way to designate, name, and discover coordinate systems. Input This class encapsulates a shader or node-graph input, which is a connectable attribute representing a typed value. Material A Material provides a container into which multiple"render targets"can add data that defines a"shading material"for a renderer. MaterialBindingAPI UsdShadeMaterialBindingAPI is an API schema that provides an interface for binding materials to prims or collections of prims (represented by UsdCollectionAPI objects). NodeDefAPI UsdShadeNodeDefAPI is an API schema that provides attributes for a prim to select a corresponding Shader Node Definition ("Sdr Node"), as well as to look up a runtime entry for that shader node in the form of an SdrShaderNode. NodeGraph A node-graph is a container for shading nodes, as well as other node- graphs. Output This class encapsulates a shader or node-graph output, which is a connectable attribute representing a typed, externally computed value. Shader Base class for all USD shaders. ShaderDefParserPlugin Parses shader definitions represented using USD scene description using the schemas provided by UsdShade. ShaderDefUtils This class contains a set of utility functions used for populating the shader registry with shaders definitions specified using UsdShade schemas. Tokens Utils This class contains a set of utility functions used when authoring and querying shading networks. class pxr.UsdShade.AttributeType Attributes: Input Invalid Output names values Input = pxr.UsdShade.AttributeType.Input Invalid = pxr.UsdShade.AttributeType.Invalid Output = pxr.UsdShade.AttributeType.Output names = {'Input': pxr.UsdShade.AttributeType.Input, 'Invalid': pxr.UsdShade.AttributeType.Invalid, 'Output': pxr.UsdShade.AttributeType.Output} values = {0: pxr.UsdShade.AttributeType.Invalid, 1: pxr.UsdShade.AttributeType.Input, 2: pxr.UsdShade.AttributeType.Output} class pxr.UsdShade.ConnectableAPI UsdShadeConnectableAPI is an API schema that provides a common interface for creating outputs and making connections between shading parameters and outputs. The interface is common to all UsdShade schemas that support Inputs and Outputs, which currently includes UsdShadeShader, UsdShadeNodeGraph, and UsdShadeMaterial. One can construct a UsdShadeConnectableAPI directly from a UsdPrim, or from objects of any of the schema classes listed above. If it seems onerous to need to construct a secondary schema object to interact with Inputs and Outputs, keep in mind that any function whose purpose is either to walk material/shader networks via their connections, or to create such networks, can typically be written entirely in terms of UsdShadeConnectableAPI objects, without needing to care what the underlying prim type is. Additionally, the most common UsdShadeConnectableAPI behaviors (creating Inputs and Outputs, and making connections) are wrapped as convenience methods on the prim schema classes (creation) and UsdShadeInput and UsdShadeOutput. Methods: CanConnect classmethod CanConnect(input, source) -> bool ClearSource classmethod ClearSource(shadingAttr) -> bool ClearSources classmethod ClearSources(shadingAttr) -> bool ConnectToSource classmethod ConnectToSource(shadingAttr, source, mod) -> bool CreateInput(name, typeName) Create an input which can both have a value and be connected. CreateOutput(name, typeName) Create an output, which represents and externally computed, typed value. DisconnectSource classmethod DisconnectSource(shadingAttr, sourceAttr) -> bool Get classmethod Get(stage, path) -> ConnectableAPI GetConnectedSource classmethod GetConnectedSource(shadingAttr, source, sourceName, sourceType) -> bool GetConnectedSources classmethod GetConnectedSources(shadingAttr, invalidSourcePaths) -> list[UsdShadeSourceInfo] GetInput(name) Return the requested input if it exists. GetInputs(onlyAuthored) Returns all inputs on the connectable prim (i.e. GetOutput(name) Return the requested output if it exists. GetOutputs(onlyAuthored) Returns all outputs on the connectable prim (i.e. GetRawConnectedSourcePaths classmethod GetRawConnectedSourcePaths(shadingAttr, sourcePaths) -> bool GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] HasConnectableAPI classmethod HasConnectableAPI(schemaType) -> bool HasConnectedSource classmethod HasConnectedSource(shadingAttr) -> bool IsContainer() Returns true if the prim is a container. IsSourceConnectionFromBaseMaterial classmethod IsSourceConnectionFromBaseMaterial(shadingAttr) -> bool RequiresEncapsulation() Returns true if container encapsulation rules should be respected when evaluating connectibility behavior, false otherwise. SetConnectedSources classmethod SetConnectedSources(shadingAttr, sourceInfos) -> bool static CanConnect() classmethod CanConnect(input, source) -> bool Determines whether the given input can be connected to the given source attribute, which can be an input or an output. The result depends on the”connectability”of the input and the source attributes. Depending on the prim type, this may require the plugin that defines connectability behavior for that prim type be loaded. UsdShadeInput::SetConnectability UsdShadeInput::GetConnectability Parameters input (Input) – source (Attribute) – CanConnect(input, sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourceInput (Input) – CanConnect(input, sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourceOutput (Output) – CanConnect(output, source) -> bool Determines whether the given output can be connected to the given source attribute, which can be an input or an output. An output is considered to be connectable only if it belongs to a node-graph. Shader outputs are not connectable. source is an optional argument. If a valid UsdAttribute is supplied for it, this method will return true only if the source attribute is owned by a descendant of the node-graph owning the output. Parameters output (Output) – source (Attribute) – CanConnect(output, sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourceInput (Input) – CanConnect(output, sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourceOutput (Output) – static ClearSource() classmethod ClearSource(shadingAttr) -> bool Deprecated This is the older version that only referenced a single source. Please use ClearSources instead. Parameters shadingAttr (Attribute) – ClearSource(input) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – ClearSource(output) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – static ClearSources() classmethod ClearSources(shadingAttr) -> bool Clears sources for this shading attribute in the current UsdEditTarget. Most of the time, what you probably want is DisconnectSource() rather than this function. DisconnectSource() Parameters shadingAttr (Attribute) – ClearSources(input) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – ClearSources(output) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – static ConnectToSource() classmethod ConnectToSource(shadingAttr, source, mod) -> bool Authors a connection for a given shading attribute shadingAttr . shadingAttr can represent a parameter, an input or an output. source is a struct that describes the upstream source attribute with all the information necessary to make a connection. See the documentation for UsdShadeConnectionSourceInfo. mod describes the operation that should be applied to the list of connections. By default the new connection will replace any existing connections, but it can add to the list of connections to represent multiple input connections. true if a connection was created successfully. false if shadingAttr or source is invalid. This method does not verify the connectability of the shading attribute to the source. Clients must invoke CanConnect() themselves to ensure compatibility. The source shading attribute is created if it doesn’t exist already. Parameters shadingAttr (Attribute) – source (ConnectionSourceInfo) – mod (ConnectionModification) – ConnectToSource(input, source, mod) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – source (ConnectionSourceInfo) – mod (ConnectionModification) – ConnectToSource(output, source, mod) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – source (ConnectionSourceInfo) – mod (ConnectionModification) – ConnectToSource(shadingAttr, source, sourceName, sourceType, typeName) -> bool Deprecated Please use the versions that take a UsdShadeConnectionSourceInfo to describe the upstream source This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters shadingAttr (Attribute) – source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – typeName (ValueTypeName) – ConnectToSource(input, source, sourceName, sourceType, typeName) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – typeName (ValueTypeName) – ConnectToSource(output, source, sourceName, sourceType, typeName) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – typeName (ValueTypeName) – ConnectToSource(shadingAttr, sourcePath) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Connect the given shading attribute to the source at path, sourcePath . sourcePath should be the fully namespaced property path. This overload is provided for convenience, for use in contexts where the prim types are unknown or unavailable. Parameters shadingAttr (Attribute) – sourcePath (Path) – ConnectToSource(input, sourcePath) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourcePath (Path) – ConnectToSource(output, sourcePath) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourcePath (Path) – ConnectToSource(shadingAttr, sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Connect the given shading attribute to the given source input. Parameters shadingAttr (Attribute) – sourceInput (Input) – ConnectToSource(input, sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourceInput (Input) – ConnectToSource(output, sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourceInput (Input) – ConnectToSource(shadingAttr, sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Connect the given shading attribute to the given source output. Parameters shadingAttr (Attribute) – sourceOutput (Output) – ConnectToSource(input, sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourceOutput (Output) – ConnectToSource(output, sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourceOutput (Output) – CreateInput(name, typeName) → Input Create an input which can both have a value and be connected. The attribute representing the input is created in the”inputs:”namespace. Parameters name (str) – typeName (ValueTypeName) – CreateOutput(name, typeName) → Output Create an output, which represents and externally computed, typed value. Outputs on node-graphs can be connected. The attribute representing an output is created in the”outputs:”namespace. Parameters name (str) – typeName (ValueTypeName) – static DisconnectSource() classmethod DisconnectSource(shadingAttr, sourceAttr) -> bool Disconnect source for this shading attribute. If sourceAttr is valid it will disconnect the connection to this upstream attribute. Otherwise it will disconnect all connections by authoring an empty list of connections for the attribute shadingAttr . This may author more scene description than you might expect - we define the behavior of disconnect to be that, even if a shading attribute becomes connected in a weaker layer than the current UsdEditTarget, the attribute will still be disconnected in the composition, therefore we must”block”it in the current UsdEditTarget. ConnectToSource() . Parameters shadingAttr (Attribute) – sourceAttr (Attribute) – DisconnectSource(input, sourceAttr) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourceAttr (Attribute) – DisconnectSource(output, sourceAttr) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourceAttr (Attribute) – static Get() classmethod Get(stage, path) -> ConnectableAPI Return a UsdShadeConnectableAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeConnectableAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetConnectedSource() classmethod GetConnectedSource(shadingAttr, source, sourceName, sourceType) -> bool Deprecated Shading attributes can have multiple connections and so using GetConnectedSources is needed in general Finds the source of a connection for the given shading attribute. shadingAttr is the shading attribute whose connection we want to interrogate. source is an output parameter which will be set to the source connectable prim. sourceName will be set to the name of the source shading attribute, which may be an input or an output, as specified by sourceType sourceType will have the type of the source shading attribute, i.e. whether it is an Input or Output true if the shading attribute is connected to a valid, defined source attribute. false if the shading attribute is not connected to a single, defined source attribute. Previously this method would silently return false for multiple connections. We are changing the behavior of this method to return the result for the first connection and issue a TfWarn about it. We want to encourage clients to use GetConnectedSources going forward. The python wrapping for this method returns a (source, sourceName, sourceType) tuple if the parameter is connected, else None Parameters shadingAttr (Attribute) – source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – GetConnectedSource(input, source, sourceName, sourceType) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – GetConnectedSource(output, source, sourceName, sourceType) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – static GetConnectedSources() classmethod GetConnectedSources(shadingAttr, invalidSourcePaths) -> list[UsdShadeSourceInfo] Finds the valid sources of connections for the given shading attribute. shadingAttr is the shading attribute whose connections we want to interrogate. invalidSourcePaths is an optional output parameter to collect the invalid source paths that have not been reported in the returned vector. Returns a vector of UsdShadeConnectionSourceInfo structs with information about each upsteam attribute. If the vector is empty, there have been no connections. A valid connection requires the existence of the source attribute and also requires that the source prim is UsdShadeConnectableAPI compatible. The python wrapping returns a tuple with the valid connections first, followed by the invalid source paths. Parameters shadingAttr (Attribute) – invalidSourcePaths (list[SdfPath]) – GetConnectedSources(input, invalidSourcePaths) -> list[UsdShadeSourceInfo] This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – invalidSourcePaths (list[SdfPath]) – GetConnectedSources(output, invalidSourcePaths) -> list[UsdShadeSourceInfo] This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – invalidSourcePaths (list[SdfPath]) – GetInput(name) → Input Return the requested input if it exists. name is the unnamespaced base name. Parameters name (str) – GetInputs(onlyAuthored) → list[Input] Returns all inputs on the connectable prim (i.e. shader or node-graph). Inputs are represented by attributes in the”inputs:”namespace. If onlyAuthored is true (the default), then only return authored attributes; otherwise, this also returns un- authored builtins. Parameters onlyAuthored (bool) – GetOutput(name) → Output Return the requested output if it exists. name is the unnamespaced base name. Parameters name (str) – GetOutputs(onlyAuthored) → list[Output] Returns all outputs on the connectable prim (i.e. shader or node-graph). Outputs are represented by attributes in the”outputs:”namespace. If onlyAuthored is true (the default), then only return authored attributes; otherwise, this also returns un- authored builtins. Parameters onlyAuthored (bool) – static GetRawConnectedSourcePaths() classmethod GetRawConnectedSourcePaths(shadingAttr, sourcePaths) -> bool Deprecated Please us GetConnectedSources to retrieve multiple connections Returns the”raw”(authored) connected source paths for the given shading attribute. Parameters shadingAttr (Attribute) – sourcePaths (list[SdfPath]) – GetRawConnectedSourcePaths(input, sourcePaths) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – sourcePaths (list[SdfPath]) – GetRawConnectedSourcePaths(output, sourcePaths) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – sourcePaths (list[SdfPath]) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – static HasConnectableAPI() classmethod HasConnectableAPI(schemaType) -> bool Return true if the schemaType has a valid connectableAPIBehavior registered, false otherwise. To check if a prim’s connectableAPI has a behavior defined, use UsdSchemaBase::operator bool() . Parameters schemaType (Type) – HasConnectableAPI() -> bool Return true if the schema type T has a connectableAPIBehavior registered, false otherwise. static HasConnectedSource() classmethod HasConnectedSource(shadingAttr) -> bool Returns true if and only if the shading attribute is currently connected to at least one valid (defined) source. If you will be calling GetConnectedSources() afterwards anyways, it will be much faster to instead check if the returned vector is empty: UsdShadeSourceInfoVector connections = UsdShadeConnectableAPI::GetConnectedSources(attribute); if (!connections.empty()){ // process connected attribute } else { // process unconnected attribute } Parameters shadingAttr (Attribute) – HasConnectedSource(input) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – HasConnectedSource(output) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – IsContainer() → bool Returns true if the prim is a container. The underlying prim type may provide runtime behavior that defines whether it is a container. static IsSourceConnectionFromBaseMaterial() classmethod IsSourceConnectionFromBaseMaterial(shadingAttr) -> bool Returns true if the connection to the given shading attribute’s source, as returned by UsdShadeConnectableAPI::GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. Parameters shadingAttr (Attribute) – IsSourceConnectionFromBaseMaterial(input) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters input (Input) – IsSourceConnectionFromBaseMaterial(output) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – RequiresEncapsulation() → bool Returns true if container encapsulation rules should be respected when evaluating connectibility behavior, false otherwise. The underlying prim type may provide runtime behavior that defines if encapsulation rules are respected or not. static SetConnectedSources() classmethod SetConnectedSources(shadingAttr, sourceInfos) -> bool Authors a list of connections for a given shading attribute shadingAttr . shadingAttr can represent a parameter, an input or an output. sourceInfos is a vector of structs that describes the upstream source attributes with all the information necessary to make all the connections. See the documentation for UsdShadeConnectionSourceInfo. true if all connection were created successfully. false if the shadingAttr or one of the sources are invalid. A valid connection is one that has a valid UsdShadeConnectionSourceInfo , which requires the existence of the upstream source prim. It does not require the existence of the source attribute as it will be create if necessary. Parameters shadingAttr (Attribute) – sourceInfos (list[ConnectionSourceInfo]) – class pxr.UsdShade.ConnectionModification Attributes: Append Prepend Replace names values Append = pxr.UsdShade.ConnectionModification.Append Prepend = pxr.UsdShade.ConnectionModification.Prepend Replace = pxr.UsdShade.ConnectionModification.Replace names = {'Append': pxr.UsdShade.ConnectionModification.Append, 'Prepend': pxr.UsdShade.ConnectionModification.Prepend, 'Replace': pxr.UsdShade.ConnectionModification.Replace} values = {0: pxr.UsdShade.ConnectionModification.Replace, 1: pxr.UsdShade.ConnectionModification.Prepend, 2: pxr.UsdShade.ConnectionModification.Append} class pxr.UsdShade.ConnectionSourceInfo A compact struct to represent a bundle of information about an upstream source attribute. Methods: IsValid() Return true if this source info is valid for setting up a connection. Attributes: source sourceName sourceType typeName IsValid() → bool Return true if this source info is valid for setting up a connection. property source property sourceName property sourceType property typeName class pxr.UsdShade.CoordSysAPI UsdShadeCoordSysAPI provides a way to designate, name, and discover coordinate systems. Coordinate systems are implicitly established by UsdGeomXformable prims, using their local space. That coordinate system may be bound (i.e., named) from another prim. The binding is encoded as a single- target relationship in the”coordSys:”namespace. Coordinate system bindings apply to descendants of the prim where the binding is expressed, but names may be re-bound by descendant prims. Named coordinate systems are useful in shading workflows. An example is projection paint, which projects a texture from a certain view (the paint coordinate system). Using the paint coordinate frame avoids the need to assign a UV set to the object, and can be a concise way to project paint across a collection of objects with a single shared paint coordinate system. This is a non-applied API schema. Methods: Bind(name, path) Bind the name to the given path. BlockBinding(name) Block the indicated coordinate system binding on this prim by blocking targets on the underlying relationship. CanContainPropertyName classmethod CanContainPropertyName(name) -> bool ClearBinding(name, removeSpec) Clear the indicated coordinate system binding on this prim from the current edit target. FindBindingsWithInheritance() Find the list of coordinate system bindings that apply to this prim, including inherited bindings. Get classmethod Get(stage, path) -> CoordSysAPI GetCoordSysRelationshipName classmethod GetCoordSysRelationshipName(coordSysName) -> str GetLocalBindings() Get the list of coordinate system bindings local to this prim. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] HasLocalBindings() Returns true if the prim has local coordinate system binding opinions. Bind(name, path) → bool Bind the name to the given path. The prim at the given path is expected to be UsdGeomXformable, in order for the binding to be succesfully resolved. Parameters name (str) – path (Path) – BlockBinding(name) → bool Block the indicated coordinate system binding on this prim by blocking targets on the underlying relationship. Parameters name (str) – static CanContainPropertyName() classmethod CanContainPropertyName(name) -> bool Test whether a given name contains the”coordSys:”prefix. Parameters name (str) – ClearBinding(name, removeSpec) → bool Clear the indicated coordinate system binding on this prim from the current edit target. Only remove the spec if removeSpec is true (leave the spec to preserve meta-data we may have intentionally authored on the relationship) Parameters name (str) – removeSpec (bool) – FindBindingsWithInheritance() → list[Binding] Find the list of coordinate system bindings that apply to this prim, including inherited bindings. This computation examines this prim and ancestors for the strongest binding for each name. A binding expressed by a child prim supercedes bindings on ancestors. Note that this API does not validate the prims at the target paths; they may be of incorrect type, or missing entirely. Binding relationships with no resolved targets are skipped. static Get() classmethod Get(stage, path) -> CoordSysAPI Return a UsdShadeCoordSysAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeCoordSysAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetCoordSysRelationshipName() classmethod GetCoordSysRelationshipName(coordSysName) -> str Returns the fully namespaced coordinate system relationship name, given the coordinate system name. Parameters coordSysName (str) – GetLocalBindings() → list[Binding] Get the list of coordinate system bindings local to this prim. This does not process inherited bindings. It does not validate that a prim exists at the indicated path. If the binding relationship has multiple targets, only the first is used. static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – HasLocalBindings() → bool Returns true if the prim has local coordinate system binding opinions. Note that the resulting binding list may still be empty. class pxr.UsdShade.Input This class encapsulates a shader or node-graph input, which is a connectable attribute representing a typed value. Methods: CanConnect(source) Determines whether this Input can be connected to the given source attribute, which can be an input or an output. ClearConnectability() Clears any authored connectability on the Input. ClearSdrMetadata() Clears any"sdrMetadata"value authored on the Input in the current EditTarget. ClearSdrMetadataByKey(key) Clears the entry corresponding to the given key in the"sdrMetadata"dictionary authored in the current EditTarget. ClearSource() Deprecated ClearSources() Clears sources for this Input in the current UsdEditTarget. ConnectToSource(source, mod) Authors a connection for this Input. DisconnectSource(sourceAttr) Disconnect source for this Input. Get(value, time) Convenience wrapper for the templated UsdAttribute::Get() . GetAttr() Explicit UsdAttribute extractor. GetBaseName() Returns the name of the input. GetConnectability() Returns the connectability of the Input. GetConnectedSource(source, sourceName, ...) Deprecated GetConnectedSources(invalidSourcePaths) Finds the valid sources of connections for the Input. GetDisplayGroup() Get the displayGroup metadata for this Input, i.e. GetDocumentation() Get documentation string for this Input. GetFullName() Get the name of the attribute associated with the Input. GetPrim() Get the prim that the input belongs to. GetRawConnectedSourcePaths(sourcePaths) Deprecated GetRenderType() Return this Input's specialized renderType, or an empty token if none was authored. GetSdrMetadata() Returns this Input's composed"sdrMetadata"dictionary as a NdrTokenMap. GetSdrMetadataByKey(key) Returns the value corresponding to key in the composed sdrMetadata dictionary. GetTypeName() Get the"scene description"value type name of the attribute associated with the Input. GetValueProducingAttribute(attrType) Deprecated GetValueProducingAttributes(shaderOutputsOnly) Find what is connected to this Input recursively. HasConnectedSource() Returns true if and only if this Input is currently connected to a valid (defined) source. HasRenderType() Return true if a renderType has been specified for this Input. HasSdrMetadata() Returns true if the Input has a non-empty composed"sdrMetadata"dictionary value. HasSdrMetadataByKey(key) Returns true if there is a value corresponding to the given key in the composed"sdrMetadata"dictionary. IsInput classmethod IsInput(attr) -> bool IsInterfaceInputName classmethod IsInterfaceInputName(name) -> bool IsSourceConnectionFromBaseMaterial() Returns true if the connection to this Input's source, as returned by GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. Set(value, time) Set a value for the Input at time . SetConnectability(connectability) Set the connectability of the Input. SetConnectedSources(sourceInfos) Connects this Input to the given sources, sourceInfos . SetDisplayGroup(displayGroup) Set the displayGroup metadata for this Input, i.e. SetDocumentation(docs) Set documentation string for this Input. SetRenderType(renderType) Specify an alternative, renderer-specific type to use when emitting/translating this Input, rather than translating based on its GetTypeName() SetSdrMetadata(sdrMetadata) Authors the given sdrMetadata value on this Input at the current EditTarget. SetSdrMetadataByKey(key, value) Sets the value corresponding to key to the given string value , in the Input's"sdrMetadata"dictionary at the current EditTarget. CanConnect(source) → bool Determines whether this Input can be connected to the given source attribute, which can be an input or an output. UsdShadeConnectableAPI::CanConnect Parameters source (Attribute) – CanConnect(sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters sourceInput (Input) – CanConnect(sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters sourceOutput (Output) – ClearConnectability() → bool Clears any authored connectability on the Input. ClearSdrMetadata() → None Clears any”sdrMetadata”value authored on the Input in the current EditTarget. ClearSdrMetadataByKey(key) → None Clears the entry corresponding to the given key in the”sdrMetadata”dictionary authored in the current EditTarget. Parameters key (str) – ClearSource() → bool Deprecated ClearSources() → bool Clears sources for this Input in the current UsdEditTarget. Most of the time, what you probably want is DisconnectSource() rather than this function. UsdShadeConnectableAPI::ClearSources ConnectToSource(source, mod) → bool Authors a connection for this Input. source is a struct that describes the upstream source attribute with all the information necessary to make a connection. See the documentation for UsdShadeConnectionSourceInfo. mod describes the operation that should be applied to the list of connections. By default the new connection will replace any existing connections, but it can add to the list of connections to represent multiple input connections. true if a connection was created successfully. false if this input or source is invalid. This method does not verify the connectability of the shading attribute to the source. Clients must invoke CanConnect() themselves to ensure compatibility. The source shading attribute is created if it doesn’t exist already. UsdShadeConnectableAPI::ConnectToSource Parameters source (ConnectionSourceInfo) – mod (ConnectionModification) – ConnectToSource(source, sourceName, sourceType, typeName) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – typeName (ValueTypeName) – ConnectToSource(sourcePath) -> bool Authors a connection for this Input to the source at the given path. UsdShadeConnectableAPI::ConnectToSource Parameters sourcePath (Path) – ConnectToSource(sourceInput) -> bool Connects this Input to the given input, sourceInput . UsdShadeConnectableAPI::ConnectToSource Parameters sourceInput (Input) – ConnectToSource(sourceOutput) -> bool Connects this Input to the given output, sourceOutput . UsdShadeConnectableAPI::ConnectToSource Parameters sourceOutput (Output) – DisconnectSource(sourceAttr) → bool Disconnect source for this Input. If sourceAttr is valid, only a connection to the specified attribute is disconnected, otherwise all connections are removed. UsdShadeConnectableAPI::DisconnectSource Parameters sourceAttr (Attribute) – Get(value, time) → bool Convenience wrapper for the templated UsdAttribute::Get() . Parameters value (T) – time (TimeCode) – Get(value, time) -> bool Convenience wrapper for VtValue version of UsdAttribute::Get() . Parameters value (VtValue) – time (TimeCode) – GetAttr() → Attribute Explicit UsdAttribute extractor. GetBaseName() → str Returns the name of the input. We call this the base name since it strips off the”inputs:”namespace prefix from the attribute name, and returns it. GetConnectability() → str Returns the connectability of the Input. SetConnectability() GetConnectedSource(source, sourceName, sourceType) → bool Deprecated Parameters source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – GetConnectedSources(invalidSourcePaths) → list[SourceInfo] Finds the valid sources of connections for the Input. invalidSourcePaths is an optional output parameter to collect the invalid source paths that have not been reported in the returned vector. Returns a vector of UsdShadeConnectionSourceInfo structs with information about each upsteam attribute. If the vector is empty, there have been no valid connections. A valid connection requires the existence of the source attribute and also requires that the source prim is UsdShadeConnectableAPI compatible. The python wrapping returns a tuple with the valid connections first, followed by the invalid source paths. UsdShadeConnectableAPI::GetConnectedSources Parameters invalidSourcePaths (list[SdfPath]) – GetDisplayGroup() → str Get the displayGroup metadata for this Input, i.e. hint for the location and nesting of the attribute. UsdProperty::GetDisplayGroup() , UsdProperty::GetNestedDisplayGroup() GetDocumentation() → str Get documentation string for this Input. UsdObject::GetDocumentation() GetFullName() → str Get the name of the attribute associated with the Input. GetPrim() → Prim Get the prim that the input belongs to. GetRawConnectedSourcePaths(sourcePaths) → bool Deprecated Returns the”raw”(authored) connected source paths for this Input. UsdShadeConnectableAPI::GetRawConnectedSourcePaths Parameters sourcePaths (list[SdfPath]) – GetRenderType() → str Return this Input’s specialized renderType, or an empty token if none was authored. SetRenderType() GetSdrMetadata() → NdrTokenMap Returns this Input’s composed”sdrMetadata”dictionary as a NdrTokenMap. GetSdrMetadataByKey(key) → str Returns the value corresponding to key in the composed sdrMetadata dictionary. Parameters key (str) – GetTypeName() → ValueTypeName Get the”scene description”value type name of the attribute associated with the Input. GetValueProducingAttribute(attrType) → Attribute Deprecated in favor of calling GetValueProducingAttributes Parameters attrType (AttributeType) – GetValueProducingAttributes(shaderOutputsOnly) → list[UsdShadeAttribute] Find what is connected to this Input recursively. UsdShadeUtils::GetValueProducingAttributes Parameters shaderOutputsOnly (bool) – HasConnectedSource() → bool Returns true if and only if this Input is currently connected to a valid (defined) source. UsdShadeConnectableAPI::HasConnectedSource HasRenderType() → bool Return true if a renderType has been specified for this Input. SetRenderType() HasSdrMetadata() → bool Returns true if the Input has a non-empty composed”sdrMetadata”dictionary value. HasSdrMetadataByKey(key) → bool Returns true if there is a value corresponding to the given key in the composed”sdrMetadata”dictionary. Parameters key (str) – static IsInput() classmethod IsInput(attr) -> bool Test whether a given UsdAttribute represents a valid Input, which implies that creating a UsdShadeInput from the attribute will succeed. Success implies that attr.IsDefined() is true. Parameters attr (Attribute) – static IsInterfaceInputName() classmethod IsInterfaceInputName(name) -> bool Test if this name has a namespace that indicates it could be an input. Parameters name (str) – IsSourceConnectionFromBaseMaterial() → bool Returns true if the connection to this Input’s source, as returned by GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. UsdShadeConnectableAPI::IsSourceConnectionFromBaseMaterial Set(value, time) → bool Set a value for the Input at time . Parameters value (VtValue) – time (TimeCode) – Set(value, time) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set a value of the Input at time . Parameters value (T) – time (TimeCode) – SetConnectability(connectability) → bool Set the connectability of the Input. In certain shading data models, there is a need to distinguish which inputs can vary over a surface from those that must be uniform. This is accomplished in UsdShade by limiting the connectability of the input. This is done by setting the”connectability”metadata on the associated attribute. Connectability of an Input can be set to UsdShadeTokens->full or UsdShadeTokens->interfaceOnly. full implies that the Input can be connected to any other Input or Output. interfaceOnly implies that the Input can only be connected to a NodeGraph Input (which represents an interface override, not a render-time dataflow connection), or another Input whose connectability is also”interfaceOnly”. The default connectability of an input is UsdShadeTokens->full. SetConnectability() Parameters connectability (str) – SetConnectedSources(sourceInfos) → bool Connects this Input to the given sources, sourceInfos . UsdShadeConnectableAPI::SetConnectedSources Parameters sourceInfos (list[ConnectionSourceInfo]) – SetDisplayGroup(displayGroup) → bool Set the displayGroup metadata for this Input, i.e. hinting for the location and nesting of the attribute. Note for an input representing a nested SdrShaderProperty, its expected to have the scope delimited by a”:”. UsdProperty::SetDisplayGroup() , UsdProperty::SetNestedDisplayGroup() SdrShaderProperty::GetPage() Parameters displayGroup (str) – SetDocumentation(docs) → bool Set documentation string for this Input. UsdObject::SetDocumentation() Parameters docs (str) – SetRenderType(renderType) → bool Specify an alternative, renderer-specific type to use when emitting/translating this Input, rather than translating based on its GetTypeName() For example, we set the renderType to”struct”for Inputs that are of renderman custom struct types. true on success. Parameters renderType (str) – SetSdrMetadata(sdrMetadata) → None Authors the given sdrMetadata value on this Input at the current EditTarget. Parameters sdrMetadata (NdrTokenMap) – SetSdrMetadataByKey(key, value) → None Sets the value corresponding to key to the given string value , in the Input’s”sdrMetadata”dictionary at the current EditTarget. Parameters key (str) – value (str) – class pxr.UsdShade.Material A Material provides a container into which multiple”render targets”can add data that defines a”shading material”for a renderer. Typically this consists of one or more UsdRelationship properties that target other prims of type Shader - though a target/client is free to add any data that is suitable. We strongly advise that all targets adopt the convention that all properties be prefixed with a namespace that identifies the target, e.g.”rel ri:surface =</Shaders/mySurf>”. In the UsdShading model, geometry expresses a binding to a single Material or to a set of Materials partitioned by UsdGeomSubsets defined beneath the geometry; it is legal to bind a Material at the root (or other sub-prim) of a model, and then bind a different Material to individual gprims, but the meaning of inheritance and”ancestral overriding”of Material bindings is left to each render- target to determine. Since UsdGeom has no concept of shading, we provide the API for binding and unbinding geometry on the API schema UsdShadeMaterialBindingAPI. The entire power of USD VariantSets and all the other composition operators can leveraged when encoding shading variation. UsdShadeMaterial provides facilities for a particular way of building”Material variants”in which neither the identity of the Materials themselves nor the geometry Material-bindings need to change - instead we vary the targeted networks, interface values, and even parameter values within a single variantSet. See Authoring Material Variations for more details. UsdShade requires that all of the shaders that”belong”to the Material live under the Material in namespace. This supports powerful, easy reuse of Materials, because it allows us to reference a Material from one asset (the asset might be a module of Materials) into another asset: USD references compose all descendant prims of the reference target into the referencer’s namespace, which means that all of the referenced Material’s shader networks will come along with the Material. When referenced in this way, Materials can also be instanced, for ease of deduplication and compactness. Finally, Material encapsulation also allows us to specialize child materials from parent materials. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdShadeTokens. So to set an attribute to the value”rightHanded”, use UsdShadeTokens->rightHanded as the value. Methods: ClearBaseMaterial() Clear the base Material of this Material. ComputeDisplacementSource(renderContext, ...) Deprecated ComputeSurfaceSource(renderContext, ...) Deprecated ComputeVolumeSource(renderContext, ...) Deprecated CreateDisplacementAttr(defaultValue, ...) See GetDisplacementAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDisplacementOutput(renderContext) Creates and returns the"displacement"output on this material for the specified renderContext . CreateMasterMaterialVariant classmethod CreateMasterMaterialVariant(masterPrim, MaterialPrims, masterVariantSetName) -> bool CreateSurfaceAttr(defaultValue, writeSparsely) See GetSurfaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSurfaceOutput(renderContext) Creates and returns the"surface"output on this material for the specified renderContext . CreateVolumeAttr(defaultValue, writeSparsely) See GetVolumeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateVolumeOutput(renderContext) Creates and returns the"volume"output on this material for the specified renderContext . Define classmethod Define(stage, path) -> Material Get classmethod Get(stage, path) -> Material GetBaseMaterial() Get the path to the base Material of this Material. GetBaseMaterialPath() Get the base Material of this Material. GetDisplacementAttr() Represents the universal"displacement"output terminal of a material. GetDisplacementOutput(renderContext) Returns the"displacement"output of this material for the specified renderContext. GetDisplacementOutputs() Returns the"displacement"outputs of this material for all available renderContexts. GetEditContextForVariant(...) Helper function for configuring a UsdStage 's UsdEditTarget to author Material variations. GetMaterialVariant() Return a UsdVariantSet object for interacting with the Material variant variantSet. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetSurfaceAttr() Represents the universal"surface"output terminal of a material. GetSurfaceOutput(renderContext) Returns the"surface"output of this material for the specified renderContext . GetSurfaceOutputs() Returns the"surface"outputs of this material for all available renderContexts. GetVolumeAttr() Represents the universal"volume"output terminal of a material. GetVolumeOutput(renderContext) Returns the"volume"output of this material for the specified renderContext. GetVolumeOutputs() Returns the"volume"outputs of this material for all available renderContexts. HasBaseMaterial() SetBaseMaterial(baseMaterial) Set the base Material of this Material. SetBaseMaterialPath(baseMaterialPath) Set the path to the base Material of this Material. ClearBaseMaterial() → None Clear the base Material of this Material. ComputeDisplacementSource(renderContext, sourceName, sourceType) → Shader Deprecated Use the form that takes a TfTokenVector or renderContexts Parameters renderContext (str) – sourceName (str) – sourceType (AttributeType) – ComputeDisplacementSource(contextVector, sourceName, sourceType) -> Shader Computes the resolved”displacement”output source for the given contextVector . Using the earliest renderContext in the contextVector that produces a valid Shader object. If a”displacement”output corresponding to each of the renderContexts does not exist or is not connected to a valid source, then this checks the universal displacement output. Returns an empty Shader object if there is no valid displacement output source for any of the renderContexts in the contextVector . The python version of this method returns a tuple containing three elements (the source displacement shader, sourceName, sourceType). Parameters contextVector (list[TfToken]) – sourceName (str) – sourceType (AttributeType) – ComputeSurfaceSource(renderContext, sourceName, sourceType) → Shader Deprecated Use the form that takes a TfTokenVector or renderContexts. Parameters renderContext (str) – sourceName (str) – sourceType (AttributeType) – ComputeSurfaceSource(contextVector, sourceName, sourceType) -> Shader Computes the resolved”surface”output source for the given contextVector . Using the earliest renderContext in the contextVector that produces a valid Shader object. If a”surface”output corresponding to each of the renderContexts does not exist or is not connected to a valid source, then this checks the universal surface output. Returns an empty Shader object if there is no valid surface output source for any of the renderContexts in the contextVector . The python version of this method returns a tuple containing three elements (the source surface shader, sourceName, sourceType). Parameters contextVector (list[TfToken]) – sourceName (str) – sourceType (AttributeType) – ComputeVolumeSource(renderContext, sourceName, sourceType) → Shader Deprecated Use the form that takes a TfTokenVector or renderContexts Parameters renderContext (str) – sourceName (str) – sourceType (AttributeType) – ComputeVolumeSource(contextVector, sourceName, sourceType) -> Shader Computes the resolved”volume”output source for the given contextVector . Using the earliest renderContext in the contextVector that produces a valid Shader object. If a”volume”output corresponding to each of the renderContexts does not exist or is not connected to a valid source, then this checks the universal volume output. Returns an empty Shader object if there is no valid volume output output source for any of the renderContexts in the contextVector . The python version of this method returns a tuple containing three elements (the source volume shader, sourceName, sourceType). Parameters contextVector (list[TfToken]) – sourceName (str) – sourceType (AttributeType) – CreateDisplacementAttr(defaultValue, writeSparsely) → Attribute See GetDisplacementAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDisplacementOutput(renderContext) → Output Creates and returns the”displacement”output on this material for the specified renderContext . If the output already exists on the material, it is returned and no authoring is performed. The returned output will always have the requested renderContext. Parameters renderContext (str) – static CreateMasterMaterialVariant() classmethod CreateMasterMaterialVariant(masterPrim, MaterialPrims, masterVariantSetName) -> bool Create a variantSet on masterPrim that will set the MaterialVariant on each of the given MaterialPrims. The variantSet, whose name can be specified with masterVariantSetName and defaults to the same MaterialVariant name created on Materials by GetEditContextForVariant() , will have the same variants as the Materials, and each Master variant will set every MaterialPrims' MaterialVariant selection to the same variant as the master. Thus, it allows all Materials to be switched with a single variant selection, on masterPrim . If masterPrim is an ancestor of any given member of MaterialPrims , then we will author variant selections directly on the MaterialPrims. However, it is often preferable to create a master MaterialVariant in a separately rooted tree from the MaterialPrims, so that it can be layered more strongly on top of the Materials. Therefore, for any MaterialPrim in a different tree than masterPrim, we will create”overs”as children of masterPrim that recreate the path to the MaterialPrim, substituting masterPrim’s full path for the MaterialPrim’s root path component. Upon successful completion, the new variantSet we created on masterPrim will have its variant selection authored to the”last”variant (determined lexicographically). It is up to the calling client to either UsdVariantSet::ClearVariantSelection() on masterPrim , or set the selection to the desired default setting. Return true on success. It is an error if any of Materials have a different set of variants for the MaterialVariant than the others. Parameters masterPrim (Prim) – MaterialPrims (list[Prim]) – masterVariantSetName (str) – CreateSurfaceAttr(defaultValue, writeSparsely) → Attribute See GetSurfaceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSurfaceOutput(renderContext) → Output Creates and returns the”surface”output on this material for the specified renderContext . If the output already exists on the material, it is returned and no authoring is performed. The returned output will always have the requested renderContext. Parameters renderContext (str) – CreateVolumeAttr(defaultValue, writeSparsely) → Attribute See GetVolumeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateVolumeOutput(renderContext) → Output Creates and returns the”volume”output on this material for the specified renderContext . If the output already exists on the material, it is returned and no authoring is performed. The returned output will always have the requested renderContext. Parameters renderContext (str) – static Define() classmethod Define(stage, path) -> Material Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Material Return a UsdShadeMaterial holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeMaterial(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetBaseMaterial() → Material Get the path to the base Material of this Material. If there is no base Material, an empty Material is returned GetBaseMaterialPath() → Path Get the base Material of this Material. If there is no base Material, an empty path is returned GetDisplacementAttr() → Attribute Represents the universal”displacement”output terminal of a material. Declaration token outputs:displacement C++ Type TfToken Usd Type SdfValueTypeNames->Token GetDisplacementOutput(renderContext) → Output Returns the”displacement”output of this material for the specified renderContext. The returned output will always have the requested renderContext. An invalid output is returned if an output corresponding to the requested specific-renderContext does not exist. UsdShadeMaterial::ComputeDisplacementSource() Parameters renderContext (str) – GetDisplacementOutputs() → list[Output] Returns the”displacement”outputs of this material for all available renderContexts. The returned vector will include all authored”displacement”outputs with the universal renderContext output first, if present. Outputs are returned regardless of whether they are connected to a valid source. GetEditContextForVariant(MaterialVariantName, layer) → tuple[Stage, EditTarget] Helper function for configuring a UsdStage ‘s UsdEditTarget to author Material variations. Takes care of creating the Material variantSet and specified variant, if necessary. Let’s assume that we are authoring Materials into the Stage’s current UsdEditTarget, and that we are iterating over the variations of a UsdShadeMaterial clothMaterial, and currVariant is the variant we are processing (e.g.”denim”). In C++, then, we would use the following pattern: { UsdEditContext ctxt(clothMaterial.GetEditContextForVariant(currVariant)); // All USD mutation of the UsdStage on which clothMaterial sits will // now go "inside" the currVariant of the "MaterialVariant" variantSet } In python, the pattern is: with clothMaterial.GetEditContextForVariant(currVariant): # Now sending mutations to currVariant If layer is specified, then we will use it, rather than the stage’s current UsdEditTarget ‘s layer as the destination layer for the edit context we are building. If layer does not actually contribute to the Material prim’s definition, any editing will have no effect on this Material. Note: As just stated, using this method involves authoring a selection for the MaterialVariant in the stage’s current EditTarget. When client is done authoring variations on this prim, they will likely want to either UsdVariantSet::SetVariantSelection() to the appropriate default selection, or possibly UsdVariantSet::ClearVariantSelection() on the UsdShadeMaterial::GetMaterialVariant() UsdVariantSet. UsdVariantSet::GetVariantEditContext() Parameters MaterialVariantName (str) – layer (Layer) – GetMaterialVariant() → VariantSet Return a UsdVariantSet object for interacting with the Material variant variantSet. static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSurfaceAttr() → Attribute Represents the universal”surface”output terminal of a material. Declaration token outputs:surface C++ Type TfToken Usd Type SdfValueTypeNames->Token GetSurfaceOutput(renderContext) → Output Returns the”surface”output of this material for the specified renderContext . The returned output will always have the requested renderContext. An invalid output is returned if an output corresponding to the requested specific-renderContext does not exist. UsdShadeMaterial::ComputeSurfaceSource() Parameters renderContext (str) – GetSurfaceOutputs() → list[Output] Returns the”surface”outputs of this material for all available renderContexts. The returned vector will include all authored”surface”outputs with the universal renderContext output first, if present. Outputs are returned regardless of whether they are connected to a valid source. GetVolumeAttr() → Attribute Represents the universal”volume”output terminal of a material. Declaration token outputs:volume C++ Type TfToken Usd Type SdfValueTypeNames->Token GetVolumeOutput(renderContext) → Output Returns the”volume”output of this material for the specified renderContext. The returned output will always have the requested renderContext. An invalid output is returned if an output corresponding to the requested specific-renderContext does not exist. UsdShadeMaterial::ComputeVolumeSource() Parameters renderContext (str) – GetVolumeOutputs() → list[Output] Returns the”volume”outputs of this material for all available renderContexts. The returned vector will include all authored”volume”outputs with the universal renderContext output first, if present. Outputs are returned regardless of whether they are connected to a valid source. HasBaseMaterial() → bool SetBaseMaterial(baseMaterial) → None Set the base Material of this Material. An empty Material is equivalent to clearing the base Material. Parameters baseMaterial (Material) – SetBaseMaterialPath(baseMaterialPath) → None Set the path to the base Material of this Material. An empty path is equivalent to clearing the base Material. Parameters baseMaterialPath (Path) – class pxr.UsdShade.MaterialBindingAPI UsdShadeMaterialBindingAPI is an API schema that provides an interface for binding materials to prims or collections of prims (represented by UsdCollectionAPI objects). In the USD shading model, each renderable gprim computes a single resolved Material that will be used to shade the gprim (exceptions, of course, for gprims that possess UsdGeomSubsets, as each subset can be shaded by a different Material). A gprim and each of its ancestor prims can possess, through the MaterialBindingAPI, both a direct binding to a Material, and any number of collection-based bindings to Materials; each binding can be generic or declared for a particular purpose, and given a specific binding strength. It is the process of”material resolution”(see UsdShadeMaterialBindingAPI_MaterialResolution) that examines all of these bindings, and selects the one Material that best matches the client’s needs. The intent of purpose is that each gprim should be able to resolve a Material for any given purpose, which implies it can have differently bound materials for different purposes. There are two special values of purpose defined in UsdShade, although the API fully supports specifying arbitrary values for it, for the sake of extensibility: UsdShadeTokens->full : to be used when the purpose of the render is entirely to visualize the truest representation of a scene, considering all lighting and material information, at highest fidelity. UsdShadeTokens->preview : to be used when the render is in service of a goal other than a high fidelity”full”render (such as scene manipulation, modeling, or realtime playback). Latency and speed are generally of greater concern for preview renders, therefore preview materials are generally designed to be”lighterweight”compared to full materials. A binding can also have no specific purpose at all, in which case, it is considered to be the fallback or all-purpose binding (denoted by the empty-valued token UsdShadeTokens->allPurpose). The purpose of a material binding is encoded in the name of the binding relationship. In the case of a direct binding, the allPurpose binding is represented by the relationship named “material:binding”. Special- purpose direct bindings are represented by relationships named “material:binding: *purpose*. A direct binding relationship must have a single target path that points to a UsdShadeMaterial. In the case of a collection-based binding, the allPurpose binding is represented by a relationship named”material:binding:collection:<i>bindingName</i>”, where bindingName establishes an identity for the binding that is unique on the prim. Attempting to establish two collection bindings of the same name on the same prim will result in the first binding simply being overridden. A special-purpose collection-based binding is represented by a relationship named”material:binding:collection:<i>purpose:bindingName</i>”. A collection-based binding relationship must have exacly two targets, one of which should be a collection-path (see ef UsdCollectionAPI::GetCollectionPath() ) and the other should point to a UsdShadeMaterial. In the future, we may allow a single collection binding to target multiple collections, if we can establish a reasonable round-tripping pattern for applications that only allow a single collection to be associated with each Material. Note: Both bindingName and purpose must be non-namespaced tokens. This allows us to know the role of a binding relationship simply from the number of tokens in it. Two tokens : the fallback,”all purpose”, direct binding, material:binding Three tokens : a purpose-restricted, direct, fallback binding, e.g. material:binding:preview Four tokens : an all-purpose, collection-based binding, e.g. material:binding:collection:metalBits Five tokens : a purpose-restricted, collection-based binding, e.g. material:binding:collection:full:metalBits A binding-strength value is used to specify whether a binding authored on a prim should be weaker or stronger than bindings that appear lower in namespace. We encode the binding strength with as token-valued metadata ‘bindMaterialAs’ for future flexibility, even though for now, there are only two possible values: UsdShadeTokens->weakerThanDescendants and UsdShadeTokens->strongerThanDescendants. When binding-strength is not authored (i.e. empty) on a binding-relationship, the default behavior matches UsdShadeTokens->weakerThanDescendants. If a material binding relationship is a built-in property defined as part of a typed prim’s schema, a fallback value should not be provided for it. This is because the”material resolution”algorithm only conisders authored properties. Classes: CollectionBinding DirectBinding Methods: AddPrimToBindingCollection(prim, ...) Adds the specified prim to the collection targeted by the binding relationship corresponding to given bindingName and materialPurpose . Apply classmethod Apply(prim) -> MaterialBindingAPI Bind(material, bindingStrength, materialPurpose) Authors a direct binding to the given material on this prim. CanApply classmethod CanApply(prim, whyNot) -> bool CanContainPropertyName classmethod CanContainPropertyName(name) -> bool ComputeBoundMaterial(bindingsCache, ...) Computes the resolved bound material for this prim, for the given material purpose. ComputeBoundMaterials classmethod ComputeBoundMaterials(prims, materialPurpose, bindingRels) -> list[Material] CreateMaterialBindSubset(subsetName, ...) Creates a GeomSubset named subsetName with element type, elementType and familyName materialBind **below this prim.** Get classmethod Get(stage, path) -> MaterialBindingAPI GetCollectionBindingRel(bindingName, ...) Returns the collection-based material-binding relationship with the given bindingName and materialPurpose on this prim. GetCollectionBindingRels(materialPurpose) Returns the list of collection-based material binding relationships on this prim for the given material purpose, materialPurpose . GetCollectionBindings(materialPurpose) Returns all the collection-based bindings on this prim for the given material purpose. GetDirectBinding(materialPurpose) Computes and returns the direct binding for the given material purpose on this prim. GetDirectBindingRel(materialPurpose) Returns the direct material-binding relationship on this prim for the given material purpose. GetMaterialBindSubsets() Returns all the existing GeomSubsets with familyName=UsdShadeTokens->materialBind below this prim. GetMaterialBindSubsetsFamilyType() Returns the familyType of the family of"materialBind"GeomSubsets on this prim. GetMaterialBindingStrength classmethod GetMaterialBindingStrength(bindingRel) -> str GetMaterialPurposes classmethod GetMaterialPurposes() -> list[TfToken] GetResolvedTargetPathFromBindingRel classmethod GetResolvedTargetPathFromBindingRel(bindingRel) -> Path GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] RemovePrimFromBindingCollection(prim, ...) Removes the specified prim from the collection targeted by the binding relationship corresponding to given bindingName and materialPurpose . SetMaterialBindSubsetsFamilyType(familyType) Author the familyType of the"materialBind"family of GeomSubsets on this prim. SetMaterialBindingStrength classmethod SetMaterialBindingStrength(bindingRel, bindingStrength) -> bool UnbindAllBindings() Unbinds all direct and collection-based bindings on this prim. UnbindCollectionBinding(bindingName, ...) Unbinds the collection-based binding with the given bindingName , for the given materialPurpose on this prim. UnbindDirectBinding(materialPurpose) Unbinds the direct binding for the given material purpose ( materialPurpose ) on this prim. class CollectionBinding Methods: GetBindingRel GetCollection GetCollectionPath GetMaterial GetMaterialPath IsCollectionBindingRel IsValid GetBindingRel() GetCollection() GetCollectionPath() GetMaterial() GetMaterialPath() static IsCollectionBindingRel() IsValid() class DirectBinding Methods: GetBindingRel GetMaterial GetMaterialPath GetMaterialPurpose GetBindingRel() GetMaterial() GetMaterialPath() GetMaterialPurpose() AddPrimToBindingCollection(prim, bindingName, materialPurpose) → bool Adds the specified prim to the collection targeted by the binding relationship corresponding to given bindingName and materialPurpose . If the collection-binding relationship doesn’t exist or if the targeted collection already includes the prim , then this does nothing and returns true. If the targeted collection does not include prim (or excludes it explicitly), then this modifies the collection by adding the prim to it (by invoking UsdCollectionAPI::AddPrim()). Parameters prim (Prim) – bindingName (str) – materialPurpose (str) – static Apply() classmethod Apply(prim) -> MaterialBindingAPI Applies this single-apply API schema to the given prim . This information is stored by adding”MaterialBindingAPI”to the token- valued, listOp metadata apiSchemas on the prim. A valid UsdShadeMaterialBindingAPI object is returned upon success. An invalid (or empty) UsdShadeMaterialBindingAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – Bind(material, bindingStrength, materialPurpose) → bool Authors a direct binding to the given material on this prim. If bindingStrength is UsdShadeTokens->fallbackStrength, the value UsdShadeTokens->weakerThanDescendants is authored sparsely. To stamp out the bindingStrength value explicitly, clients can pass in UsdShadeTokens->weakerThanDescendants or UsdShadeTokens->strongerThanDescendants directly. If materialPurpose is specified and isn’t equal to UsdShadeTokens->allPurpose, the binding only applies to the specified material purpose. Note that UsdShadeMaterialBindingAPI is a SingleAppliedAPI schema which when applied updates the prim definition accordingly. This information on the prim definition is helpful in multiple queries and more performant. Hence its recommended to call UsdShadeMaterialBindingAPI::Apply() when Binding a material. Returns true on success, false otherwise. Parameters material (Material) – bindingStrength (str) – materialPurpose (str) – Bind(collection, material, bindingName, bindingStrength, materialPurpose) -> bool Authors a collection-based binding, which binds the given material to the given collection on this prim. bindingName establishes an identity for the binding that is unique on the prim. Attempting to establish two collection bindings of the same name on the same prim will result in the first binding simply being overridden. If bindingName is empty, it is set to the base- name of the collection being bound (which is the collection-name with any namespaces stripped out). If there are multiple collections with the same base-name being bound at the same prim, clients should pass in a unique binding name per binding, in order to preserve all bindings. The binding name used in constructing the collection-binding relationship name shoud not contain namespaces. Hence, a coding error is issued and no binding is authored if the provided value of bindingName is non-empty and contains namespaces. If bindingStrength is UsdShadeTokens->fallbackStrength, the value UsdShadeTokens->weakerThanDescendants is authored sparsely, i.e. only when there is an existing binding with a different bindingStrength. To stamp out the bindingStrength value explicitly, clients can pass in UsdShadeTokens->weakerThanDescendants or UsdShadeTokens->strongerThanDescendants directly. If materialPurpose is specified and isn’t equal to UsdShadeTokens->allPurpose, the binding only applies to the specified material purpose. Note that UsdShadeMaterialBindingAPI is a SingleAppliedAPI schema which when applied updates the prim definition accordingly. This information on the prim definition is helpful in multiple queries and more performant. Hence its recommended to call UsdShadeMaterialBindingAPI::Apply() when Binding a material. Returns true on success, false otherwise. Parameters collection (CollectionAPI) – material (Material) – bindingName (str) – bindingStrength (str) – materialPurpose (str) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – static CanContainPropertyName() classmethod CanContainPropertyName(name) -> bool Test whether a given name contains the”material:binding:”prefix. Parameters name (str) – ComputeBoundMaterial(bindingsCache, collectionQueryCache, materialPurpose, bindingRel) → Material Computes the resolved bound material for this prim, for the given material purpose. This overload of ComputeBoundMaterial makes use of the BindingsCache ( bindingsCache ) and CollectionQueryCache ( collectionQueryCache ) that are passed in, to avoid redundant binding computations and computations of MembershipQuery objects for collections. It would be beneficial to make use of these when resolving bindings for a tree of prims. These caches are populated lazily as more and more bindings are resolved. When the goal is to compute the bound material for a range (or list) of prims, it is recommended to use this version of ComputeBoundMaterial() . Here’s how you could compute the bindings of a range of prims efficiently in C++: std::vector<std::pair<UsdPrim, UsdShadeMaterial> primBindings; UsdShadeMaterialBindingAPI::BindingsCache bindingsCache; UsdShadeMaterialBindingAPI::CollectionQueryCache collQueryCache; for (auto prim : UsdPrimRange(rootPrim)) { UsdShadeMaterial boundMaterial = UsdShadeMaterialBindingAPI(prim).ComputeBoundMaterial( & bindingsCache, & collQueryCache); if (boundMaterial) { primBindings.emplace_back({prim, boundMaterial}); } } If bindingRel is not null, then it is set to the”winning”binding relationship. Note the resolved bound material is considered valid if the target path of the binding relationship is a valid non-empty prim path. This makes sure winning binding relationship and the bound material remain consistent consistent irrespective of the presence/absence of prim at material path. For ascenario where ComputeBoundMaterial returns a invalid UsdShadeMaterial with a valid winning bindingRel, clients can use the static method UsdShadeMaterialBindingAPI::GetResolvedTargetPathFromBindingRel to get the path of the resolved target identified by the winning bindingRel. See Bound Material Resolution for details on the material resolution process. The python version of this method returns a tuple containing the bound material and the”winning”binding relationship. Parameters bindingsCache (BindingsCache) – collectionQueryCache (CollectionQueryCache) – materialPurpose (str) – bindingRel (Relationship) – ComputeBoundMaterial(materialPurpose, bindingRel) -> Material This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Computes the resolved bound material for this prim, for the given material purpose. This overload does not utilize cached MembershipQuery object. However, it only computes the MembershipQuery of every collection that bound in the ancestor chain at most once. If bindingRel is not null, then it is set to the winning binding relationship. See Bound Material Resolution for details on the material resolution process. The python version of this method returns a tuple containing the bound material and the”winning”binding relationship. Parameters materialPurpose (str) – bindingRel (Relationship) – static ComputeBoundMaterials() classmethod ComputeBoundMaterials(prims, materialPurpose, bindingRels) -> list[Material] Static API for efficiently and concurrently computing the resolved material bindings for a vector of UsdPrims, prims for the given materialPurpose . The size of the returned vector always matches the size of the input vector, prims . If a prim is not bound to any material, an invalid or empty UsdShadeMaterial is returned at the index corresponding to it. If the pointer bindingRels points to a valid vector, then it is populated with the set of all”winning”binding relationships. The python version of this method returns a tuple containing two lists - the bound materials and the corresponding”winning”binding relationships. Parameters prims (list[Prim]) – materialPurpose (str) – bindingRels (list[Relationship]) – CreateMaterialBindSubset(subsetName, indices, elementType) → Subset Creates a GeomSubset named subsetName with element type, elementType and familyName materialBind **below this prim.** If a GeomSubset named subsetName already exists, then its”familyName”is updated to be UsdShadeTokens->materialBind and its indices (at default timeCode) are updated with the provided indices value before returning. This method forces the familyType of the”materialBind”family of subsets to UsdGeomTokens->nonOverlapping if it’s unset or explicitly set to UsdGeomTokens->unrestricted. The default value elementType is UsdGeomTokens->face, as we expect materials to be bound most often to subsets of faces on meshes. Parameters subsetName (str) – indices (IntArray) – elementType (str) – static Get() classmethod Get(stage, path) -> MaterialBindingAPI Return a UsdShadeMaterialBindingAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeMaterialBindingAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetCollectionBindingRel(bindingName, materialPurpose) → Relationship Returns the collection-based material-binding relationship with the given bindingName and materialPurpose on this prim. For info on bindingName , see UsdShadeMaterialBindingAPI::Bind() . The material purpose of the relationship that’s returned will match the specified materialPurpose . Parameters bindingName (str) – materialPurpose (str) – GetCollectionBindingRels(materialPurpose) → list[Relationship] Returns the list of collection-based material binding relationships on this prim for the given material purpose, materialPurpose . The returned list of binding relationships will be in native property order. See UsdPrim::GetPropertyOrder() , UsdPrim::SetPropertyOrder() . Bindings that appear earlier in the property order are considered to be stronger than the ones that come later. See rule #6 in UsdShadeMaterialBindingAPI_MaterialResolution. Parameters materialPurpose (str) – GetCollectionBindings(materialPurpose) → list[CollectionBinding] Returns all the collection-based bindings on this prim for the given material purpose. The returned CollectionBinding objects always have the specified materialPurpose (i.e. the all-purpose binding is not returned if a special purpose binding is requested). If one or more collection based bindings are to prims that are not Materials, this does not generate an error, but the corresponding Material(s) will be invalid (i.e. evaluate to false). The python version of this API returns a tuple containing the vector of CollectionBinding objects and the corresponding vector of binding relationships. The returned list of collection-bindings will be in native property order of the associated binding relationships. See UsdPrim::GetPropertyOrder() , UsdPrim::SetPropertyOrder() . Binding relationships that come earlier in the list are considered to be stronger than the ones that come later. See rule #6 in UsdShadeMaterialBindingAPI_MaterialResolution. Parameters materialPurpose (str) – GetDirectBinding(materialPurpose) → DirectBinding Computes and returns the direct binding for the given material purpose on this prim. The returned binding always has the specified materialPurpose (i.e. the all-purpose binding is not returned if a special purpose binding is requested). If the direct binding is to a prim that is not a Material, this does not generate an error, but the returned Material will be invalid (i.e. evaluate to false). Parameters materialPurpose (str) – GetDirectBindingRel(materialPurpose) → Relationship Returns the direct material-binding relationship on this prim for the given material purpose. The material purpose of the relationship that’s returned will match the specified materialPurpose . Parameters materialPurpose (str) – GetMaterialBindSubsets() → list[Subset] Returns all the existing GeomSubsets with familyName=UsdShadeTokens->materialBind below this prim. GetMaterialBindSubsetsFamilyType() → str Returns the familyType of the family of”materialBind”GeomSubsets on this prim. By default, materialBind subsets have familyType=”nonOverlapping”, but they can also be tagged as a”partition”, using SetMaterialBindFaceSubsetsFamilyType(). UsdGeomSubset::GetFamilyNameAttr static GetMaterialBindingStrength() classmethod GetMaterialBindingStrength(bindingRel) -> str Resolves the’bindMaterialAs’token-valued metadata on the given binding relationship and returns it. If the resolved value is empty, this returns the fallback value UsdShadeTokens->weakerThanDescendants. UsdShadeMaterialBindingAPI::SetMaterialBindingStrength() Parameters bindingRel (Relationship) – static GetMaterialPurposes() classmethod GetMaterialPurposes() -> list[TfToken] Returns a vector of the possible values for the’material purpose’. static GetResolvedTargetPathFromBindingRel() classmethod GetResolvedTargetPathFromBindingRel(bindingRel) -> Path returns the path of the resolved target identified by bindingRel . Parameters bindingRel (Relationship) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – RemovePrimFromBindingCollection(prim, bindingName, materialPurpose) → bool Removes the specified prim from the collection targeted by the binding relationship corresponding to given bindingName and materialPurpose . If the collection-binding relationship doesn’t exist or if the targeted collection does not include the prim , then this does nothing and returns true. If the targeted collection includes prim , then this modifies the collection by removing the prim from it (by invoking UsdCollectionAPI::RemovePrim()). This method can be used in conjunction with the Unbind*() methods (if desired) to guarantee that a prim has no resolved material binding. Parameters prim (Prim) – bindingName (str) – materialPurpose (str) – SetMaterialBindSubsetsFamilyType(familyType) → bool Author the familyType of the”materialBind”family of GeomSubsets on this prim. The default familyType is UsdGeomTokens->nonOverlapping *. It can be set to *UsdGeomTokens->partition to indicate that the entire imageable prim is included in the union of all the”materialBind”subsets. The family type should never be set to UsdGeomTokens->unrestricted, since it is invalid for a single piece of geometry (in this case, a subset) to be bound to more than one material. Hence, a coding error is issued if familyType is UsdGeomTokens->unrestricted.** ** UsdGeomSubset::SetFamilyType** Parameters familyType (str) – static SetMaterialBindingStrength() classmethod SetMaterialBindingStrength(bindingRel, bindingStrength) -> bool Sets the’bindMaterialAs’token-valued metadata on the given binding relationship. If bindingStrength is UsdShadeTokens->fallbackStrength, the value UsdShadeTokens->weakerThanDescendants is authored sparsely, i.e. only when there is a different existing bindingStrength value. To stamp out the bindingStrength value explicitly, clients can pass in UsdShadeTokens->weakerThanDescendants or UsdShadeTokens->strongerThanDescendants directly. Returns true on success, false otherwise. UsdShadeMaterialBindingAPI::GetMaterialBindingStrength() Parameters bindingRel (Relationship) – bindingStrength (str) – UnbindAllBindings() → bool Unbinds all direct and collection-based bindings on this prim. UnbindCollectionBinding(bindingName, materialPurpose) → bool Unbinds the collection-based binding with the given bindingName , for the given materialPurpose on this prim. It accomplishes this by blocking the targets of the associated binding relationship in the current edit target. If a binding was created without specifying a bindingName , then the correct bindingName to use for unbinding is the instance name of the targetted collection. Parameters bindingName (str) – materialPurpose (str) – UnbindDirectBinding(materialPurpose) → bool Unbinds the direct binding for the given material purpose ( materialPurpose ) on this prim. It accomplishes this by blocking the targets of the binding relationship in the current edit target. Parameters materialPurpose (str) – class pxr.UsdShade.NodeDefAPI UsdShadeNodeDefAPI is an API schema that provides attributes for a prim to select a corresponding Shader Node Definition (“Sdr Node”), as well as to look up a runtime entry for that shader node in the form of an SdrShaderNode. UsdShadeNodeDefAPI is intended to be a pre-applied API schema for any prim type that wants to refer to the SdrRegistry for further implementation details about the behavior of that prim. The primary use in UsdShade itself is as UsdShadeShader, which is a basis for material shading networks (UsdShadeMaterial), but this is intended to be used in other domains that also use the Sdr node mechanism. This schema provides properties that allow a prim to identify an external node definition, either by a direct identifier key into the SdrRegistry (info:id), an asset to be parsed by a suitable NdrParserPlugin (info:sourceAsset), or an inline source code that must also be parsed (info:sourceCode); as well as a selector attribute to determine which specifier is active (info:implementationSource). For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdShadeTokens. So to set an attribute to the value”rightHanded”, use UsdShadeTokens->rightHanded as the value. Methods: Apply classmethod Apply(prim) -> NodeDefAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateIdAttr(defaultValue, writeSparsely) See GetIdAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateImplementationSourceAttr(defaultValue, ...) See GetImplementationSourceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> NodeDefAPI GetIdAttr() The id is an identifier for the type or purpose of the shader. GetImplementationSource() Reads the value of info:implementationSource attribute and returns a token identifying the attribute that must be consulted to identify the shader's source program. GetImplementationSourceAttr() Specifies the attribute that should be consulted to get the shader's implementation or its source code. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetShaderId(id) Fetches the shader's ID value from the info:id attribute, if the shader's info:implementationSource is id. GetShaderNodeForSourceType(sourceType) This method attempts to ensure that there is a ShaderNode in the shader registry (i.e. GetSourceAsset(sourceAsset, sourceType) Fetches the shader's source asset value for the specified sourceType value from the info: *sourceType*: sourceAsset attribute, if the shader's info:implementationSource is sourceAsset. GetSourceAssetSubIdentifier(subIdentifier, ...) Fetches the shader's sub-identifier for the source asset with the specified sourceType value from the info: *sourceType*: sourceAsset:subIdentifier attribute, if the shader's info: implementationSource is sourceAsset. GetSourceCode(sourceCode, sourceType) Fetches the shader's source code for the specified sourceType value by reading the info: *sourceType*: sourceCode attribute, if the shader's info:implementationSource is sourceCode. SetShaderId(id) Sets the shader's ID value. SetSourceAsset(sourceAsset, sourceType) Sets the shader's source-asset path value to sourceAsset for the given source type, sourceType . SetSourceAssetSubIdentifier(subIdentifier, ...) Set a sub-identifier to be used with a source asset of the given source type. SetSourceCode(sourceCode, sourceType) Sets the shader's source-code value to sourceCode for the given source type, sourceType . static Apply() classmethod Apply(prim) -> NodeDefAPI Applies this single-apply API schema to the given prim . This information is stored by adding”NodeDefAPI”to the token-valued, listOp metadata apiSchemas on the prim. A valid UsdShadeNodeDefAPI object is returned upon success. An invalid (or empty) UsdShadeNodeDefAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateIdAttr(defaultValue, writeSparsely) → Attribute See GetIdAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateImplementationSourceAttr(defaultValue, writeSparsely) → Attribute See GetImplementationSourceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> NodeDefAPI Return a UsdShadeNodeDefAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeNodeDefAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetIdAttr() → Attribute The id is an identifier for the type or purpose of the shader. E.g.: Texture or FractalFloat. The use of this id will depend on the render target: some will turn it into an actual shader path, some will use it to generate shader source code dynamically. SetShaderId() Declaration uniform token info:id C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform GetImplementationSource() → str Reads the value of info:implementationSource attribute and returns a token identifying the attribute that must be consulted to identify the shader’s source program. This returns id, to indicate that the”info:id”attribute must be consulted. sourceAsset to indicate that the asset- valued”info:{sourceType}:sourceAsset”attribute associated with the desired sourceType should be consulted to locate the asset with the shader’s source. sourceCode to indicate that the string- valued”info:{sourceType}:sourceCode”attribute associated with the desired sourceType should be read to get shader’s source. This issues a warning and returns id if the info:implementationSource attribute has an invalid value. {sourceType} above is a place holder for a token that identifies the type of shader source or its implementation. For example: osl, glslfx, riCpp etc. This allows a shader to specify different sourceAsset (or sourceCode) values for different sourceTypes. The sourceType tokens usually correspond to the sourceType value of the NdrParserPlugin that’s used to parse the shader source (NdrParserPlugin::SourceType). When sourceType is empty, the corresponding sourceAsset or sourceCode is considered to be”universal”(or fallback), which is represented by the empty-valued token UsdShadeTokens->universalSourceType. When the sourceAsset (or sourceCode) corresponding to a specific, requested sourceType is unavailable, the universal sourceAsset (or sourceCode) is returned by GetSourceAsset (and GetSourceCode} API, if present. GetShaderId() GetSourceAsset() GetSourceCode() GetImplementationSourceAttr() → Attribute Specifies the attribute that should be consulted to get the shader’s implementation or its source code. If set to”id”, the”info:id”attribute’s value is used to determine the shader source from the shader registry. If set to”sourceAsset”, the resolved value of the”info:sourceAsset”attribute corresponding to the desired implementation (or source-type) is used to locate the shader source. A source asset file may also specify multiple shader definitions, so there is an optional attribute”info:sourceAsset:subIdentifier”whose value should be used to indicate a particular shader definition from a source asset file. If set to”sourceCode”, the value of”info:sourceCode”attribute corresponding to the desired implementation (or source type) is used as the shader source. Declaration uniform token info:implementationSource ="id" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values id, sourceAsset, sourceCode static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetShaderId(id) → bool Fetches the shader’s ID value from the info:id attribute, if the shader’s info:implementationSource is id. Returns true if the shader’s implementation source is id and the value was fetched properly into id . Returns false otherwise. GetImplementationSource() Parameters id (str) – GetShaderNodeForSourceType(sourceType) → ShaderNode This method attempts to ensure that there is a ShaderNode in the shader registry (i.e. SdrRegistry) representing this shader for the given sourceType . It may return a null pointer if none could be found or created. Parameters sourceType (str) – GetSourceAsset(sourceAsset, sourceType) → bool Fetches the shader’s source asset value for the specified sourceType value from the info: *sourceType*: sourceAsset attribute, if the shader’s info:implementationSource is sourceAsset. If the sourceAsset attribute corresponding to the requested sourceType isn’t present on the shader, then the universal fallback sourceAsset attribute, i.e. info:sourceAsset is consulted, if present, to get the source asset path. Returns true if the shader’s implementation source is sourceAsset and the source asset path value was fetched successfully into sourceAsset . Returns false otherwise. GetImplementationSource() Parameters sourceAsset (AssetPath) – sourceType (str) – GetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool Fetches the shader’s sub-identifier for the source asset with the specified sourceType value from the info: *sourceType*: sourceAsset:subIdentifier attribute, if the shader’s info: implementationSource is sourceAsset. If the subIdentifier attribute corresponding to the requested sourceType isn’t present on the shader, then the universal fallback sub-identifier attribute, i.e. info:sourceAsset: subIdentifier is consulted, if present, to get the sub-identifier name. Returns true if the shader’s implementation source is sourceAsset and the sub-identifier for the given source type was fetched successfully into subIdentifier . Returns false otherwise. Parameters subIdentifier (str) – sourceType (str) – GetSourceCode(sourceCode, sourceType) → bool Fetches the shader’s source code for the specified sourceType value by reading the info: *sourceType*: sourceCode attribute, if the shader’s info:implementationSource is sourceCode. If the sourceCode attribute corresponding to the requested sourceType isn’t present on the shader, then the universal or fallback sourceCode attribute (i.e. info:sourceCode) is consulted, if present, to get the source code. Returns true if the shader’s implementation source is sourceCode and the source code string was fetched successfully into sourceCode . Returns false otherwise. GetImplementationSource() Parameters sourceCode (str) – sourceType (str) – SetShaderId(id) → bool Sets the shader’s ID value. This also sets the info:implementationSource attribute on the shader to UsdShadeTokens->id, if the existing value is different. Parameters id (str) – SetSourceAsset(sourceAsset, sourceType) → bool Sets the shader’s source-asset path value to sourceAsset for the given source type, sourceType . This also sets the info:implementationSource attribute on the shader to UsdShadeTokens->sourceAsset. Parameters sourceAsset (AssetPath) – sourceType (str) – SetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool Set a sub-identifier to be used with a source asset of the given source type. This sets the info: *sourceType*: sourceAsset:subIdentifier. This also sets the info:implementationSource attribute on the shader to UsdShadeTokens->sourceAsset Parameters subIdentifier (str) – sourceType (str) – SetSourceCode(sourceCode, sourceType) → bool Sets the shader’s source-code value to sourceCode for the given source type, sourceType . This also sets the info:implementationSource attribute on the shader to UsdShadeTokens->sourceCode. Parameters sourceCode (str) – sourceType (str) – class pxr.UsdShade.NodeGraph A node-graph is a container for shading nodes, as well as other node- graphs. It has a public input interface and provides a list of public outputs. Node Graph Interfaces One of the most important functions of a node-graph is to host the”interface”with which clients of already-built shading networks will interact. Please see Interface Inputs for a detailed explanation of what the interface provides, and how to construct and use it, to effectively share/instance shader networks. Node Graph Outputs These behave like outputs on a shader and are typically connected to an output on a shader inside the node-graph. Methods: ComputeInterfaceInputConsumersMap(...) Walks the namespace subtree below the node-graph and computes a map containing the list of all inputs on the node-graph and the associated vector of consumers of their values. ComputeOutputSource(outputName, sourceName, ...) Deprecated ConnectableAPI() Contructs and returns a UsdShadeConnectableAPI object with this node- graph. CreateInput(name, typeName) Create an Input which can either have a value or can be connected. CreateOutput(name, typeName) Create an output which can either have a value or can be connected. Define classmethod Define(stage, path) -> NodeGraph Get classmethod Get(stage, path) -> NodeGraph GetInput(name) Return the requested input if it exists. GetInputs(onlyAuthored) Returns all inputs present on the node-graph. GetInterfaceInputs() Returns all the"Interface Inputs"of the node-graph. GetOutput(name) Return the requested output if it exists. GetOutputs(onlyAuthored) Outputs are represented by attributes in the"outputs:"namespace. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] ComputeInterfaceInputConsumersMap(computeTransitiveConsumers) → InterfaceInputConsumersMap Walks the namespace subtree below the node-graph and computes a map containing the list of all inputs on the node-graph and the associated vector of consumers of their values. The consumers can be inputs on shaders within the node-graph or on nested node-graphs). If computeTransitiveConsumers is true, then value consumers belonging to node-graphs are resolved transitively to compute the transitive mapping from inputs on the node-graph to inputs on shaders inside the material. Note that inputs on node-graphs that don’t have value consumers will continue to be included in the result. This API is provided for use by DCC’s that want to present node-graph interface / shader connections in the opposite direction than they are encoded in USD. Parameters computeTransitiveConsumers (bool) – ComputeOutputSource(outputName, sourceName, sourceType) → Shader Deprecated in favor of GetValueProducingAttributes on UsdShadeOutput Resolves the connection source of the requested output, identified by outputName to a shader output. sourceName is an output parameter that is set to the name of the resolved output, if the node-graph output is connected to a valid shader source. sourceType is an output parameter that is set to the type of the resolved output, if the node-graph output is connected to a valid shader source. Returns a valid shader object if the specified output exists and is connected to one. Return an empty shader object otherwise. The python version of this method returns a tuple containing three elements (the source shader, sourceName, sourceType). Parameters outputName (str) – sourceName (str) – sourceType (AttributeType) – ConnectableAPI() → ConnectableAPI Contructs and returns a UsdShadeConnectableAPI object with this node- graph. Note that most tasks can be accomplished without explicitly constructing a UsdShadeConnectable API, since connection-related API such as UsdShadeConnectableAPI::ConnectToSource() are static methods, and UsdShadeNodeGraph will auto-convert to a UsdShadeConnectableAPI when passed to functions that want to act generically on a connectable UsdShadeConnectableAPI object. CreateInput(name, typeName) → Input Create an Input which can either have a value or can be connected. The attribute representing the input is created in the”inputs:”namespace. Parameters name (str) – typeName (ValueTypeName) – CreateOutput(name, typeName) → Output Create an output which can either have a value or can be connected. The attribute representing the output is created in the”outputs:”namespace. Parameters name (str) – typeName (ValueTypeName) – static Define() classmethod Define(stage, path) -> NodeGraph Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> NodeGraph Return a UsdShadeNodeGraph holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeNodeGraph(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetInput(name) → Input Return the requested input if it exists. Parameters name (str) – GetInputs(onlyAuthored) → list[Input] Returns all inputs present on the node-graph. These are represented by attributes in the”inputs:”namespace. If onlyAuthored is true (the default), then only return authored attributes; otherwise, this also returns un-authored builtins. Parameters onlyAuthored (bool) – GetInterfaceInputs() → list[Input] Returns all the”Interface Inputs”of the node-graph. This is the same as GetInputs() , but is provided as a convenience, to allow clients to distinguish between inputs on shaders vs. interface- inputs on node-graphs. GetOutput(name) → Output Return the requested output if it exists. Parameters name (str) – GetOutputs(onlyAuthored) → list[Output] Outputs are represented by attributes in the”outputs:”namespace. If onlyAuthored is true (the default), then only return authored attributes; otherwise, this also returns un-authored builtins. Parameters onlyAuthored (bool) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdShade.Output This class encapsulates a shader or node-graph output, which is a connectable attribute representing a typed, externally computed value. Methods: CanConnect(source) Determines whether this Output can be connected to the given source attribute, which can be an input or an output. ClearSdrMetadata() Clears any"sdrMetadata"value authored on the Output in the current EditTarget. ClearSdrMetadataByKey(key) Clears the entry corresponding to the given key in the"sdrMetadata"dictionary authored in the current EditTarget. ClearSource() Deprecated ClearSources() Clears sources for this Output in the current UsdEditTarget. ConnectToSource(source, mod) Authors a connection for this Output. DisconnectSource(sourceAttr) Disconnect source for this Output. GetAttr() Explicit UsdAttribute extractor. GetBaseName() Returns the name of the output. GetConnectedSource(source, sourceName, ...) Deprecated GetConnectedSources(invalidSourcePaths) Finds the valid sources of connections for the Output. GetFullName() Get the name of the attribute associated with the output. GetPrim() Get the prim that the output belongs to. GetRawConnectedSourcePaths(sourcePaths) Deprecated GetRenderType() Return this output's specialized renderType, or an empty token if none was authored. GetSdrMetadata() Returns this Output's composed"sdrMetadata"dictionary as a NdrTokenMap. GetSdrMetadataByKey(key) Returns the value corresponding to key in the composed sdrMetadata dictionary. GetTypeName() Get the"scene description"value type name of the attribute associated with the output. GetValueProducingAttributes(shaderOutputsOnly) Find what is connected to this Output recursively. HasConnectedSource() Returns true if and only if this Output is currently connected to a valid (defined) source. HasRenderType() Return true if a renderType has been specified for this output. HasSdrMetadata() Returns true if the Output has a non-empty composed"sdrMetadata"dictionary value. HasSdrMetadataByKey(key) Returns true if there is a value corresponding to the given key in the composed"sdrMetadata"dictionary. IsOutput classmethod IsOutput(attr) -> bool IsSourceConnectionFromBaseMaterial() Returns true if the connection to this Output's source, as returned by GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. Set(value, time) Set a value for the output. SetConnectedSources(sourceInfos) Connects this Output to the given sources, sourceInfos . SetRenderType(renderType) Specify an alternative, renderer-specific type to use when emitting/translating this output, rather than translating based on its GetTypeName() SetSdrMetadata(sdrMetadata) Authors the given sdrMetadata value on this Output at the current EditTarget. SetSdrMetadataByKey(key, value) Sets the value corresponding to key to the given string value , in the Output's"sdrMetadata"dictionary at the current EditTarget. CanConnect(source) → bool Determines whether this Output can be connected to the given source attribute, which can be an input or an output. An output is considered to be connectable only if it belongs to a node-graph. Shader outputs are not connectable. UsdShadeConnectableAPI::CanConnect Parameters source (Attribute) – CanConnect(sourceInput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters sourceInput (Input) – CanConnect(sourceOutput) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters sourceOutput (Output) – ClearSdrMetadata() → None Clears any”sdrMetadata”value authored on the Output in the current EditTarget. ClearSdrMetadataByKey(key) → None Clears the entry corresponding to the given key in the”sdrMetadata”dictionary authored in the current EditTarget. Parameters key (str) – ClearSource() → bool Deprecated ClearSources() → bool Clears sources for this Output in the current UsdEditTarget. Most of the time, what you probably want is DisconnectSource() rather than this function. UsdShadeConnectableAPI::ClearSources ConnectToSource(source, mod) → bool Authors a connection for this Output. source is a struct that describes the upstream source attribute with all the information necessary to make a connection. See the documentation for UsdShadeConnectionSourceInfo. mod describes the operation that should be applied to the list of connections. By default the new connection will replace any existing connections, but it can add to the list of connections to represent multiple input connections. true if a connection was created successfully. false if shadingAttr or source is invalid. This method does not verify the connectability of the shading attribute to the source. Clients must invoke CanConnect() themselves to ensure compatibility. The source shading attribute is created if it doesn’t exist already. UsdShadeConnectableAPI::ConnectToSource Parameters source (ConnectionSourceInfo) – mod (ConnectionModification) – ConnectToSource(source, sourceName, sourceType, typeName) -> bool Deprecated This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – typeName (ValueTypeName) – ConnectToSource(sourcePath) -> bool Authors a connection for this Output to the source at the given path. UsdShadeConnectableAPI::ConnectToSource Parameters sourcePath (Path) – ConnectToSource(sourceInput) -> bool Connects this Output to the given input, sourceInput . UsdShadeConnectableAPI::ConnectToSource Parameters sourceInput (Input) – ConnectToSource(sourceOutput) -> bool Connects this Output to the given output, sourceOutput . UsdShadeConnectableAPI::ConnectToSource Parameters sourceOutput (Output) – DisconnectSource(sourceAttr) → bool Disconnect source for this Output. If sourceAttr is valid, only a connection to the specified attribute is disconnected, otherwise all connections are removed. UsdShadeConnectableAPI::DisconnectSource Parameters sourceAttr (Attribute) – GetAttr() → Attribute Explicit UsdAttribute extractor. GetBaseName() → str Returns the name of the output. We call this the base name since it strips off the”outputs:”namespace prefix from the attribute name, and returns it. GetConnectedSource(source, sourceName, sourceType) → bool Deprecated Please use GetConnectedSources instead Parameters source (ConnectableAPI) – sourceName (str) – sourceType (AttributeType) – GetConnectedSources(invalidSourcePaths) → list[SourceInfo] Finds the valid sources of connections for the Output. invalidSourcePaths is an optional output parameter to collect the invalid source paths that have not been reported in the returned vector. Returns a vector of UsdShadeConnectionSourceInfo structs with information about each upsteam attribute. If the vector is empty, there have been no valid connections. A valid connection requires the existence of the source attribute and also requires that the source prim is UsdShadeConnectableAPI compatible. The python wrapping returns a tuple with the valid connections first, followed by the invalid source paths. UsdShadeConnectableAPI::GetConnectedSources Parameters invalidSourcePaths (list[SdfPath]) – GetFullName() → str Get the name of the attribute associated with the output. GetPrim() → Prim Get the prim that the output belongs to. GetRawConnectedSourcePaths(sourcePaths) → bool Deprecated Returns the”raw”(authored) connected source paths for this Output. UsdShadeConnectableAPI::GetRawConnectedSourcePaths Parameters sourcePaths (list[SdfPath]) – GetRenderType() → str Return this output’s specialized renderType, or an empty token if none was authored. SetRenderType() GetSdrMetadata() → NdrTokenMap Returns this Output’s composed”sdrMetadata”dictionary as a NdrTokenMap. GetSdrMetadataByKey(key) → str Returns the value corresponding to key in the composed sdrMetadata dictionary. Parameters key (str) – GetTypeName() → ValueTypeName Get the”scene description”value type name of the attribute associated with the output. GetValueProducingAttributes(shaderOutputsOnly) → list[UsdShadeAttribute] Find what is connected to this Output recursively. UsdShadeUtils::GetValueProducingAttributes Parameters shaderOutputsOnly (bool) – HasConnectedSource() → bool Returns true if and only if this Output is currently connected to a valid (defined) source. UsdShadeConnectableAPI::HasConnectedSource HasRenderType() → bool Return true if a renderType has been specified for this output. SetRenderType() HasSdrMetadata() → bool Returns true if the Output has a non-empty composed”sdrMetadata”dictionary value. HasSdrMetadataByKey(key) → bool Returns true if there is a value corresponding to the given key in the composed”sdrMetadata”dictionary. Parameters key (str) – static IsOutput() classmethod IsOutput(attr) -> bool Test whether a given UsdAttribute represents a valid Output, which implies that creating a UsdShadeOutput from the attribute will succeed. Success implies that attr.IsDefined() is true. Parameters attr (Attribute) – IsSourceConnectionFromBaseMaterial() → bool Returns true if the connection to this Output’s source, as returned by GetConnectedSource() , is authored across a specializes arc, which is used to denote a base material. UsdShadeConnectableAPI::IsSourceConnectionFromBaseMaterial Set(value, time) → bool Set a value for the output. It’s unusual to be setting a value on an output since it represents an externally computed value. The Set API is provided here just for the sake of completeness and uniformity with other property schema. Parameters value (VtValue) – time (TimeCode) – Set(value, time) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Set the attribute value of the Output at time . Parameters value (T) – time (TimeCode) – SetConnectedSources(sourceInfos) → bool Connects this Output to the given sources, sourceInfos . UsdShadeConnectableAPI::SetConnectedSources Parameters sourceInfos (list[ConnectionSourceInfo]) – SetRenderType(renderType) → bool Specify an alternative, renderer-specific type to use when emitting/translating this output, rather than translating based on its GetTypeName() For example, we set the renderType to”struct”for outputs that are of renderman custom struct types. true on success Parameters renderType (str) – SetSdrMetadata(sdrMetadata) → None Authors the given sdrMetadata value on this Output at the current EditTarget. Parameters sdrMetadata (NdrTokenMap) – SetSdrMetadataByKey(key, value) → None Sets the value corresponding to key to the given string value , in the Output’s”sdrMetadata”dictionary at the current EditTarget. Parameters key (str) – value (str) – class pxr.UsdShade.Shader Base class for all USD shaders. Shaders are the building blocks of shading networks. While UsdShadeShader objects are not target specific, each renderer or application target may derive its own renderer-specific shader object types from this base, if needed. Objects of this class generally represent a single shading object, whether it exists in the target renderer or not. For example, a texture, a fractal, or a mix node. The UsdShadeNodeDefAPI provides attributes to uniquely identify the type of this node. The id resolution into a renderable shader target type of this node. The id resolution into a renderable shader target is deferred to the consuming application. The purpose of representing them in Usd is two-fold: To represent, via”connections”the topology of the shading network that must be reconstructed in the renderer. Facilities for authoring and manipulating connections are encapsulated in the API schema UsdShadeConnectableAPI. To present a (partial or full) interface of typed input parameters whose values can be set and overridden in Usd, to be provided later at render-time as parameter values to the actual render shader objects. Shader input parameters are encapsulated in the property schema UsdShadeInput. Methods: ClearSdrMetadata() Clears any"sdrMetadata"value authored on the shader in the current EditTarget. ClearSdrMetadataByKey(key) Clears the entry corresponding to the given key in the"sdrMetadata"dictionary authored in the current EditTarget. ConnectableAPI() Contructs and returns a UsdShadeConnectableAPI object with this shader. CreateIdAttr(defaultValue, writeSparsely) Forwards to UsdShadeNodeDefAPI(prim). CreateImplementationSourceAttr(defaultValue, ...) Forwards to UsdShadeNodeDefAPI(prim). CreateInput(name, typeName) Create an input which can either have a value or can be connected. CreateOutput(name, typeName) Create an output which can either have a value or can be connected. Define classmethod Define(stage, path) -> Shader Get classmethod Get(stage, path) -> Shader GetIdAttr() Forwards to UsdShadeNodeDefAPI(prim). GetImplementationSource() Forwards to UsdShadeNodeDefAPI(prim). GetImplementationSourceAttr() Forwards to UsdShadeNodeDefAPI(prim). GetInput(name) Return the requested input if it exists. GetInputs(onlyAuthored) Inputs are represented by attributes in the"inputs:"namespace. GetOutput(name) Return the requested output if it exists. GetOutputs(onlyAuthored) Outputs are represented by attributes in the"outputs:"namespace. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetSdrMetadata() Returns this shader's composed"sdrMetadata"dictionary as a NdrTokenMap. GetSdrMetadataByKey(key) Returns the value corresponding to key in the composed sdrMetadata dictionary. GetShaderId(id) Forwards to UsdShadeNodeDefAPI(prim). GetShaderNodeForSourceType(sourceType) Forwards to UsdShadeNodeDefAPI(prim). GetSourceAsset(sourceAsset, sourceType) Forwards to UsdShadeNodeDefAPI(prim). GetSourceAssetSubIdentifier(subIdentifier, ...) Forwards to UsdShadeNodeDefAPI(prim). GetSourceCode(sourceCode, sourceType) Forwards to UsdShadeNodeDefAPI(prim). HasSdrMetadata() Returns true if the shader has a non-empty composed"sdrMetadata"dictionary value. HasSdrMetadataByKey(key) Returns true if there is a value corresponding to the given key in the composed"sdrMetadata"dictionary. SetSdrMetadata(sdrMetadata) Authors the given sdrMetadata on this shader at the current EditTarget. SetSdrMetadataByKey(key, value) Sets the value corresponding to key to the given string value , in the shader's"sdrMetadata"dictionary at the current EditTarget. SetShaderId(id) Forwards to UsdShadeNodeDefAPI(prim). SetSourceAsset(sourceAsset, sourceType) Forwards to UsdShadeNodeDefAPI(prim). SetSourceAssetSubIdentifier(subIdentifier, ...) Forwards to UsdShadeNodeDefAPI(prim). SetSourceCode(sourceCode, sourceType) Forwards to UsdShadeNodeDefAPI(prim). ClearSdrMetadata() → None Clears any”sdrMetadata”value authored on the shader in the current EditTarget. ClearSdrMetadataByKey(key) → None Clears the entry corresponding to the given key in the”sdrMetadata”dictionary authored in the current EditTarget. Parameters key (str) – ConnectableAPI() → ConnectableAPI Contructs and returns a UsdShadeConnectableAPI object with this shader. Note that most tasks can be accomplished without explicitly constructing a UsdShadeConnectable API, since connection-related API such as UsdShadeConnectableAPI::ConnectToSource() are static methods, and UsdShadeShader will auto-convert to a UsdShadeConnectableAPI when passed to functions that want to act generically on a connectable UsdShadeConnectableAPI object. CreateIdAttr(defaultValue, writeSparsely) → Attribute Forwards to UsdShadeNodeDefAPI(prim). Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateImplementationSourceAttr(defaultValue, writeSparsely) → Attribute Forwards to UsdShadeNodeDefAPI(prim). Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateInput(name, typeName) → Input Create an input which can either have a value or can be connected. The attribute representing the input is created in the”inputs:”namespace. Inputs on both shaders and node-graphs are connectable. Parameters name (str) – typeName (ValueTypeName) – CreateOutput(name, typeName) → Output Create an output which can either have a value or can be connected. The attribute representing the output is created in the”outputs:”namespace. Outputs on a shader cannot be connected, as their value is assumed to be computed externally. Parameters name (str) – typeName (ValueTypeName) – static Define() classmethod Define(stage, path) -> Shader Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Shader Return a UsdShadeShader holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdShadeShader(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetIdAttr() → Attribute Forwards to UsdShadeNodeDefAPI(prim). GetImplementationSource() → str Forwards to UsdShadeNodeDefAPI(prim). GetImplementationSourceAttr() → Attribute Forwards to UsdShadeNodeDefAPI(prim). GetInput(name) → Input Return the requested input if it exists. Parameters name (str) – GetInputs(onlyAuthored) → list[Input] Inputs are represented by attributes in the”inputs:”namespace. If onlyAuthored is true (the default), then only return authored attributes; otherwise, this also returns un-authored builtins. Parameters onlyAuthored (bool) – GetOutput(name) → Output Return the requested output if it exists. Parameters name (str) – GetOutputs(onlyAuthored) → list[Output] Outputs are represented by attributes in the”outputs:”namespace. If onlyAuthored is true (the default), then only return authored attributes; otherwise, this also returns un-authored builtins. Parameters onlyAuthored (bool) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSdrMetadata() → NdrTokenMap Returns this shader’s composed”sdrMetadata”dictionary as a NdrTokenMap. GetSdrMetadataByKey(key) → str Returns the value corresponding to key in the composed sdrMetadata dictionary. Parameters key (str) – GetShaderId(id) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters id (str) – GetShaderNodeForSourceType(sourceType) → ShaderNode Forwards to UsdShadeNodeDefAPI(prim). Parameters sourceType (str) – GetSourceAsset(sourceAsset, sourceType) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters sourceAsset (AssetPath) – sourceType (str) – GetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters subIdentifier (str) – sourceType (str) – GetSourceCode(sourceCode, sourceType) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters sourceCode (str) – sourceType (str) – HasSdrMetadata() → bool Returns true if the shader has a non-empty composed”sdrMetadata”dictionary value. HasSdrMetadataByKey(key) → bool Returns true if there is a value corresponding to the given key in the composed”sdrMetadata”dictionary. Parameters key (str) – SetSdrMetadata(sdrMetadata) → None Authors the given sdrMetadata on this shader at the current EditTarget. Parameters sdrMetadata (NdrTokenMap) – SetSdrMetadataByKey(key, value) → None Sets the value corresponding to key to the given string value , in the shader’s”sdrMetadata”dictionary at the current EditTarget. Parameters key (str) – value (str) – SetShaderId(id) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters id (str) – SetSourceAsset(sourceAsset, sourceType) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters sourceAsset (AssetPath) – sourceType (str) – SetSourceAssetSubIdentifier(subIdentifier, sourceType) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters subIdentifier (str) – sourceType (str) – SetSourceCode(sourceCode, sourceType) → bool Forwards to UsdShadeNodeDefAPI(prim). Parameters sourceCode (str) – sourceType (str) – class pxr.UsdShade.ShaderDefParserPlugin Parses shader definitions represented using USD scene description using the schemas provided by UsdShade. Methods: GetDiscoveryTypes() Returns the types of nodes that this plugin can parse. GetSourceType() Returns the source type that this parser operates on. Parse(discoveryResult) Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new NdrNode . GetDiscoveryTypes() → NdrTokenVec Returns the types of nodes that this plugin can parse. “Type”here is the discovery type (in the case of files, this will probably be the file extension, but in other systems will be data that can be determined during discovery). This type should only be used to match up a NdrNodeDiscoveryResult to its parser plugin; this value is not exposed in the node’s API. GetSourceType() → str Returns the source type that this parser operates on. A source type is the most general type for a node. The parser plugin is responsible for parsing all discovery results that have the types declared under GetDiscoveryTypes() , and those types are collectively identified as one”source type”. Parse(discoveryResult) → NdrNodeUnique Takes the specified NdrNodeDiscoveryResult instance, which was a result of the discovery process, and generates a new NdrNode . The node’s name, source type, and family must match. Parameters discoveryResult (NodeDiscoveryResult) – class pxr.UsdShade.ShaderDefUtils This class contains a set of utility functions used for populating the shader registry with shaders definitions specified using UsdShade schemas. Methods: GetNodeDiscoveryResults classmethod GetNodeDiscoveryResults(shaderDef, sourceUri) -> NdrNodeDiscoveryResultVec GetPrimvarNamesMetadataString classmethod GetPrimvarNamesMetadataString(metadata, shaderDef) -> str GetShaderProperties classmethod GetShaderProperties(shaderDef) -> NdrPropertyUniquePtrVec static GetNodeDiscoveryResults() classmethod GetNodeDiscoveryResults(shaderDef, sourceUri) -> NdrNodeDiscoveryResultVec Returns the list of NdrNodeDiscoveryResult objects that must be added to the shader registry for the given shader shaderDef , assuming it is found in a shader definition file found by an Ndr discovery plugin. To enable the shaderDef parser to find and parse this shader, sourceUri should have the resolved path to the usd file containing this shader prim. Parameters shaderDef (Shader) – sourceUri (str) – static GetPrimvarNamesMetadataString() classmethod GetPrimvarNamesMetadataString(metadata, shaderDef) -> str Collects all the names of valid primvar inputs of the given metadata and the given shaderDef and returns the string used to represent them in SdrShaderNode metadata. Parameters metadata (NdrTokenMap) – shaderDef (ConnectableAPI) – static GetShaderProperties() classmethod GetShaderProperties(shaderDef) -> NdrPropertyUniquePtrVec Gets all input and output properties of the given shaderDef and translates them into NdrProperties that can be used as the properties for an SdrShaderNode. Parameters shaderDef (ConnectableAPI) – class pxr.UsdShade.Tokens Attributes: allPurpose bindMaterialAs coordSys displacement fallbackStrength full id infoId infoImplementationSource inputs interfaceOnly materialBind materialBinding materialBindingCollection materialVariant outputs outputsDisplacement outputsSurface outputsVolume preview sdrMetadata sourceAsset sourceCode strongerThanDescendants subIdentifier surface universalRenderContext universalSourceType volume weakerThanDescendants allPurpose = '' bindMaterialAs = 'bindMaterialAs' coordSys = 'coordSys:' displacement = 'displacement' fallbackStrength = 'fallbackStrength' full = 'full' id = 'id' infoId = 'info:id' infoImplementationSource = 'info:implementationSource' inputs = 'inputs:' interfaceOnly = 'interfaceOnly' materialBind = 'materialBind' materialBinding = 'material:binding' materialBindingCollection = 'material:binding:collection' materialVariant = 'materialVariant' outputs = 'outputs:' outputsDisplacement = 'outputs:displacement' outputsSurface = 'outputs:surface' outputsVolume = 'outputs:volume' preview = 'preview' sdrMetadata = 'sdrMetadata' sourceAsset = 'sourceAsset' sourceCode = 'sourceCode' strongerThanDescendants = 'strongerThanDescendants' subIdentifier = 'subIdentifier' surface = 'surface' universalRenderContext = '' universalSourceType = '' volume = 'volume' weakerThanDescendants = 'weakerThanDescendants' class pxr.UsdShade.Utils This class contains a set of utility functions used when authoring and querying shading networks. Methods: GetBaseNameAndType classmethod GetBaseNameAndType(fullName) -> tuple[str, AttributeType] GetConnectedSourcePath classmethod GetConnectedSourcePath(srcInfo) -> Path GetFullName classmethod GetFullName(baseName, type) -> str GetPrefixForAttributeType classmethod GetPrefixForAttributeType(sourceType) -> str GetType classmethod GetType(fullName) -> AttributeType GetValueProducingAttributes classmethod GetValueProducingAttributes(input, shaderOutputsOnly) -> list[UsdShadeAttribute] static GetBaseNameAndType() classmethod GetBaseNameAndType(fullName) -> tuple[str, AttributeType] Given the full name of a shading attribute, returns it’s base name and shading attribute type. Parameters fullName (str) – static GetConnectedSourcePath() classmethod GetConnectedSourcePath(srcInfo) -> Path For a valid UsdShadeConnectionSourceInfo, return the complete path to the source property; otherwise the empty path. Parameters srcInfo (ConnectionSourceInfo) – static GetFullName() classmethod GetFullName(baseName, type) -> str Returns the full shading attribute name given the basename and the shading attribute type. baseName is the name of the input or output on the shading node. type is the UsdShadeAttributeType of the shading attribute. Parameters baseName (str) – type (AttributeType) – static GetPrefixForAttributeType() classmethod GetPrefixForAttributeType(sourceType) -> str Returns the namespace prefix of the USD attribute associated with the given shading attribute type. Parameters sourceType (AttributeType) – static GetType() classmethod GetType(fullName) -> AttributeType Given the full name of a shading attribute, returns its shading attribute type. Parameters fullName (str) – static GetValueProducingAttributes() classmethod GetValueProducingAttributes(input, shaderOutputsOnly) -> list[UsdShadeAttribute] Find what is connected to an Input or Output recursively. GetValueProducingAttributes implements the UsdShade connectivity rules described in Connection Resolution Utilities. When tracing connections within networks that contain containers like UsdShadeNodeGraph nodes, the actual output(s) or value(s) at the end of an input or output might be multiple connections removed. The methods below resolves this across multiple physical connections. An UsdShadeInput is getting its value from one of these sources: If the input is not connected the UsdAttribute for this input is returned, but only if it has an authored value. The input attribute itself carries the value for this input. If the input is connected we follow the connection(s) until we reach a valid output of a UsdShadeShader node or if we reach a valid UsdShadeInput attribute of a UsdShadeNodeGraph or UsdShadeMaterial that has an authored value. An UsdShadeOutput on a container can get its value from the same type of sources as a UsdShadeInput on either a UsdShadeShader or UsdShadeNodeGraph. Outputs on non-containers (UsdShadeShaders) cannot be connected. This function returns a vector of UsdAttributes. The vector is empty if no valid attribute was found. The type of each attribute can be determined with the UsdShadeUtils::GetType function. If shaderOutputsOnly is true, it will only report attributes that are outputs of non-containers (UsdShadeShaders). This is a bit faster and what is need when determining the connections for Material terminals. This will return the last attribute along the connection chain that has an authored value, which might not be the last attribute in the chain itself. When the network contains multi-connections, this function can return multiple attributes for a single input or output. The list of attributes is build by a depth-first search, following the underlying connection paths in order. The list can contain both UsdShadeOutput and UsdShadeInput attributes. It is up to the caller to decide how to process such a mixture. Parameters input (Input) – shaderOutputsOnly (bool) – GetValueProducingAttributes(output, shaderOutputsOnly) -> list[UsdShadeAttribute] This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters output (Output) – shaderOutputsOnly (bool) – © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
omni.ui.MenuItemCollection.md
MenuItemCollection — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » MenuItemCollection   # MenuItemCollection class omni.ui.MenuItemCollection Bases: Menu The MenuItemCollection is the menu that unchecks children when one of them is checked. Methods __init__(self[, text]) Construct MenuItemCollection. Attributes __init__(self: omni.ui._ui.MenuItemCollection, text: str = '', **kwargs) → None Construct MenuItemCollection. `kwargsdict`See below ### Keyword Arguments: `tearablebool`The ability to tear the window off. `shown_changed_fn`If the pulldown menu is shown on the screen. `teared_changed_fn`If the window is teared off. `on_build_fn`Called to re-create new children. `textstr`This property holds the menu’s text. `hotkey_textstr`This property holds the menu’s hotkey text. `checkablebool`This property holds whether this menu item is checkable. A checkable item is one which has an on/off state. `hide_on_clickbool`Hide or keep the window when the user clicked this item. `delegateMenuDelegate`The delegate that generates a widget per menu item. `triggered_fnvoid`Sets the function that is called when an action is activated by the user; for example, when the user clicks a menu option, or presses an action’s shortcut key combination. `direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. `content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. `spacing`Sets a non-stretchable space in pixels between child items of this layout. `send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
enterprise-install.md
Enterprise Install Guide — Omniverse Install Guide latest documentation Omniverse Install Guide » Omniverse Install Guide » Enterprise Install Guide   # Enterprise Install Guide Omniverse Enterprise accommodates and supports both on-premises and scalable virtual and cloud deployments. ## Licensing Need walkthrough steps on setting up your Omniverse Enterprise account and getting your licenses in order? Review the Omniverse Enterprise Licensing Quick Start Guide for more information. ## Enterprise Nucleus Server The following documentation is available to help you properly plan, deploy, and configure an Enterprise Nucleus Server: Hardware Sizing Guide - Information on server sizing for your environment Planning Your Installation - Best practices, requirements, and prerequisites Installing an Enterprise Nucleus Server - An easy step-by-step guide for successful installation ## Launcher Deployment Options The Omniverse Launcher is available in two versions: the Workstation Launcher and the IT Managed Launcher. Omniverse Enterprise customers may choose either version depending on their deployment preference. The Workstation Launcher offers a complete experience and does not require IT management for application installation or updates. The Omniverse Workstation Launcher requires network connectivity and an NVIDIA account. The IT Managed Launcher is designed to be used in an air-gapped or tightly controlled environment, and does not require network connectivity or an NVIDIA account. Installation and updates of Omniverse applications are managed by the IT administrator for end users. Both the Workstation Launcher and the IT Managed Launcher are available from the NVIDIA Licensing Portal. ## Virtual Workstation Deployments Kit based apps (including USD Composer, USD Presenter, etc.) can be run in a virtualized environment using NVIDIA’s vGPU products. The Virtual Deployment Guide provides an overview of how to set up a vGPU environment capable of hosting Omniverse. Additionally, Omniverse Virtual Workstations can be run in a Cloud Service Provider (CSP) using the how-to guides here. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
kit_overview.md
Overview — kit-manual 105.1 documentation kit-manual » Overview   # Overview ## Omniverse Kit Omniverse Kit is the SDK for building Omniverse applications like Create and View. It can also be used to develop your own Omniverse applications. It brings together a few major components: USD/Hydra (see also omni.usd) Omniverse (via Omniverse client library) Carbonite Omniverse RTX Renderer Scripting A UI Toolkit (omni.ui) As a developer you can use any combination of those to build your own application or just extend or modify what’s already there. ### USD/Hydra USD is the primary Scene Description used by Kit, both for in-memory/authoring/runtime use, and as the serialisation format. USD can be accessed directly via an external shared library. If your plugin uses USD through C++ it must link to this library. You can also use USD from python using USD’s own python bindings, which cover the whole USD API (but not all of it’s dependencies like Tf, SDF etc). We generated reference documentation for it, see the Modules. Hydra allows USD to stream it’s content to any Renderer which has a Hydra Scene Delegate - these include Pixar’s HDStorm (currently shipped with the USD package shipped as part of Kit) as well as the Omniverse RTX Renderer and IRay (both of which ship with Kit) ### Omni.USD Omni.USD (See the omni.usd module for API docs) is an API written in C++ which sits on top of USD, Kit’s core, and the OmniClient library, and provides application-related services such as: Events/Listeners Selection handling Access to the Omniverse USD Audio subsystem Access to the Omniverse Client Library, and handling of Omniverse Assets/URIs USD Layer handling A USDContext which provides convenient access to the main USDStage and its layers, as well as various Hydra, Renderer and Viewport related services MDL support Python bindings to all of the above, using the Python-3 async API in most cases ### Omniverse Client Library This is the library that Omniverse clients such as Kit use to communicate with both Omniverse servers and with local filesystems when loading and saving Assets (such as USD, MDL and textures). It contains: a USD AssetResolver for parsing omniverse:// URIs some SDF FileFormat plugins to support specialised use cases, including Omniverse’s Live Edit mode an API to read/write/copy data/files and filesystem-like queries on Omniverse Nucleus servers Support for managing connections with Omniverse servers Python bindings to all of the above, using Python-3 async API in most cases ### Carbonite The Carbonite SDK provides the core functionality of all Omniverse apps. This is a C++ based SDK that provides features such as: Plugin management Input handling File access Persistent settings management Audio Asset loading and management Thread and task management Image loading Localization Synchronization Basic windowing All of this is provided with a single platform independent API. #### Plugins Carbonite Plugins are basically shared libraries with C-style interfaces, which can be dynamically loaded and unloaded. Interfaces are semantically versioned and backward compatibility is supported. Most plugin interfaces have python bindings, i.e they are accessible from python. The pybind11 library is used. For your own plugins you can also write python bindings and make them directly accessible from python. ### Omniverse RTX Renderer As mentioned above, Pixar’s Hydra is used to interface between USD and RTX. This is an area of high architectural complexity, as Kit is required to support a large number of Renderers, multiple custom Scene delegates, multiple Hydra Engines (to support GL, Vulkan, DX12) and a host of other requirements, providing a Viewport inside Kit Applications with Gizmos and other controls, all rendering asynchronously at high frame rates ### Scripting Kit comes with a version of python (currently 3.7) . You can run arbitrary python scripts in Kit based apps which can: Access all plugins that are exposed via python bindings Access the USD python API Access Kit python-only modules Load and access your C++ Carbonite plugins Currently there are 3 ways to run scripts: At app startup time by passing cmd arguments. E.g.: kit.exe --exec "some_script.py" Using the Console window Using the Script Editor Window ### Kit Extensions Building on top of scripting and Carbonite Plugins there is the highest-level and probably most crucial building block: Kit Extensions. You can think of Extensions as versioned packages with a runtime enabled/disabled state. These extensions can depend on other extensions. ### omni.ui Omni.ui, our UI framework, is built on top of Dear Imgui. and written in C++, but exposes only a Python API. © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
Ndr.md
Ndr module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » Ndr module   # Ndr module Summary: The Ndr (Node Definition Registry) provides a node-domain-agmostic framework for registering and querying information about nodes. Python bindings for libNdr Classes: DiscoveryPlugin Interface for discovery plugins. DiscoveryPluginContext A context for discovery. DiscoveryPluginList DiscoveryUri Struct for holding a URI and its resolved URI for a file discovered by NdrFsHelpersDiscoverFiles. Node Represents an abstract node. NodeDiscoveryResult Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDiscoveryPlugin . NodeList Property Represents a property (input or output) that is part of a NdrNode instance. Registry The registry provides access to node information."Discovery Plugins"are responsible for finding the nodes that should be included in the registry. Version VersionFilter class pxr.Ndr.DiscoveryPlugin Interface for discovery plugins. Discovery plugins, like the name implies, find nodes. Where the plugin searches is up to the plugin that implements this interface. Examples of discovery plugins could include plugins that look for nodes on the filesystem, another that finds nodes in a cloud service, and another that searches a local database. Multiple discovery plugins that search the filesystem in specific locations/ways could also be created. All discovery plugins are executed as soon as the registry is instantiated. These plugins simply report back to the registry what nodes they found in a generic way. The registry doesn’t know much about the innards of the nodes yet, just that the nodes exist. Understanding the nodes is the responsibility of another set of plugins defined by the NdrParserPlugin interface. Discovery plugins report back to the registry via NdrNodeDiscoveryResult s. These are small, lightweight classes that contain the information for a single node that was found during discovery. The discovery result only includes node information that can be gleaned pre-parse, so the data is fairly limited; to see exactly what’s included, and what is expected to be populated, see the documentation for NdrNodeDiscoveryResult . ## How to Create a Discovery Plugin There are three steps to creating a discovery plugin: Implement the discovery plugin interface, NdrDiscoveryPlugin Register your new plugin with the registry. The registration macro must be called in your plugin’s implementation file: NDR_REGISTER_DISCOVERY_PLUGIN(YOUR_DISCOVERY_PLUGIN_CLASS_NAME) This macro is available in discoveryPlugin.h. - In the same folder as your plugin, create a ``plugInfo.json`` file. This file must be formatted like so, substituting ``YOUR_LIBRARY_NAME`` , ``YOUR_CLASS_NAME`` , and ``YOUR_DISPLAY_NAME`` : { "Plugins": [{ "Type": "module", "Name": "YOUR_LIBRARY_NAME", "Root": "@PLUG_INFO_ROOT@", "LibraryPath": "@PLUG_INFO_LIBRARY_PATH@", "ResourcePath": "@PLUG_INFO_RESOURCE_PATH@", "Info": { "Types": { "YOUR_CLASS_NAME" : { "bases": ["NdrDiscoveryPlugin"], "displayName": "YOUR_DISPLAY_NAME" } } } }] } The NDR ships with one discovery plugin, the _NdrFilesystemDiscoveryPlugin . Take a look at NDR’s plugInfo.json file for example values for YOUR_LIBRARY_NAME , YOUR_CLASS_NAME , and YOUR_DISPLAY_NAME . If multiple discovery plugins exist in the same folder, you can continue adding additional plugins under the Types key in the JSON. More detailed information about the plugInfo.json format can be found in the documentation for the plug module (in pxr/base). Methods: DiscoverNodes(arg1) Finds and returns all nodes that the implementing plugin should be aware of. GetSearchURIs() Gets the URIs that this plugin is searching for nodes in. Attributes: expired True if this object has expired, False otherwise. DiscoverNodes(arg1) → NdrNodeDiscoveryResultVec Finds and returns all nodes that the implementing plugin should be aware of. Parameters arg1 (Context) – GetSearchURIs() → NdrStringVec Gets the URIs that this plugin is searching for nodes in. property expired True if this object has expired, False otherwise. class pxr.Ndr.DiscoveryPluginContext A context for discovery. Discovery plugins can use this to get a limited set of non-local information without direct coupling between plugins. Methods: GetSourceType(discoveryType) Returns the source type associated with the discovery type. Attributes: expired True if this object has expired, False otherwise. GetSourceType(discoveryType) → str Returns the source type associated with the discovery type. This may return an empty token if there is no such association. Parameters discoveryType (str) – property expired True if this object has expired, False otherwise. class pxr.Ndr.DiscoveryPluginList Methods: append extend append() extend() class pxr.Ndr.DiscoveryUri Struct for holding a URI and its resolved URI for a file discovered by NdrFsHelpersDiscoverFiles. Attributes: resolvedUri uri property resolvedUri property uri class pxr.Ndr.Node Represents an abstract node. Describes information like the name of the node, what its inputs and outputs are, and any associated metadata. In almost all cases, this class will not be used directly. More specialized nodes can be created that derive from NdrNode ; those specialized nodes can add their own domain-specific data and methods. Methods: GetContext() Gets the context of the node. GetFamily() Gets the name of the family that the node belongs to. GetIdentifier() Return the identifier of the node. GetInfoString() Gets a string with basic information about this node. GetInput(inputName) Get an input property by name. GetInputNames() Get an ordered list of all the input names on this node. GetMetadata() All metadata that came from the parse process. GetName() Gets the name of the node. GetOutput(outputName) Get an output property by name. GetOutputNames() Get an ordered list of all the output names on this node. GetResolvedDefinitionURI() Gets the URI to the resource that provided this node's definition. GetResolvedImplementationURI() Gets the URI to the resource that provides this node's implementation. GetSourceCode() Returns the source code for this node. GetSourceType() Gets the type of source that this node originated from. GetVersion() Return the version of the node. IsValid() Whether or not this node is valid. GetContext() → str Gets the context of the node. The context is the context that the node declares itself as having (or, if a particular node does not declare a context, it will be assigned a default context by the parser). As a concrete example from the Sdr module, a shader with a specific source type may perform different duties vs. another shader with the same source type. For example, one shader with a source type of SdrArgsParser::SourceType may declare itself as having a context of’pattern’, while another shader of the same source type may say it is used for lighting, and thus has a context of’light’. GetFamily() → str Gets the name of the family that the node belongs to. An empty token will be returned if the node does not belong to a family. GetIdentifier() → NdrIdentifier Return the identifier of the node. GetInfoString() → str Gets a string with basic information about this node. Helpful for things like adding this node to a log. GetInput(inputName) → Property Get an input property by name. nullptr is returned if an input with the given name does not exist. Parameters inputName (str) – GetInputNames() → NdrTokenVec Get an ordered list of all the input names on this node. GetMetadata() → NdrTokenMap All metadata that came from the parse process. Specialized nodes may isolate values in the metadata (with possible manipulations and/or additional parsing) and expose those values in their API. GetName() → str Gets the name of the node. GetOutput(outputName) → Property Get an output property by name. nullptr is returned if an output with the given name does not exist. Parameters outputName (str) – GetOutputNames() → NdrTokenVec Get an ordered list of all the output names on this node. GetResolvedDefinitionURI() → str Gets the URI to the resource that provided this node’s definition. Could be a path to a file, or some other resource identifier. This URI should be fully resolved. NdrNode::GetResolvedImplementationURI() GetResolvedImplementationURI() → str Gets the URI to the resource that provides this node’s implementation. Could be a path to a file, or some other resource identifier. This URI should be fully resolved. NdrNode::GetResolvedDefinitionURI() GetSourceCode() → str Returns the source code for this node. This will be empty for most nodes. It will be non-empty only for the nodes that are constructed using NdrRegistry::GetNodeFromSourceCode() , in which case, the source code has not been parsed (or even compiled) yet. An unparsed node with non-empty source-code but no properties is considered to be invalid. Once the node is parsed and the relevant properties and metadata are extracted from the source code, the node becomes valid. NdrNode::IsValid GetSourceType() → str Gets the type of source that this node originated from. Note that this is distinct from GetContext() , which is the type that the node declares itself as having. As a concrete example from the Sdr module, several shader parsers exist and operate on different types of shaders. In this scenario, each distinct type of shader (OSL, Args, etc) is considered a different source, even though they are all shaders. In addition, the shaders under each source type may declare themselves as having a specific context (shaders can serve different roles). See GetContext() for more information on this. GetVersion() → Version Return the version of the node. IsValid() → bool Whether or not this node is valid. A node that is valid indicates that the parser plugin was able to successfully parse the contents of this node. Note that if a node is not valid, some data like its name, URI, source code etc. could still be available (data that was obtained during the discovery process). However, other data that must be gathered from the parsing process will NOT be available (eg, inputs and outputs). class pxr.Ndr.NodeDiscoveryResult Represents the raw data of a node, and some other bits of metadata, that were determined via a NdrDiscoveryPlugin . Attributes: blindData discoveryType family identifier metadata name resolvedUri sourceCode sourceType subIdentifier uri version property blindData property discoveryType property family property identifier property metadata property name property resolvedUri property sourceCode property sourceType property subIdentifier property uri property version class pxr.Ndr.NodeList Methods: append extend append() extend() class pxr.Ndr.Property Represents a property (input or output) that is part of a NdrNode instance. A property must have a name and type, but may also specify a host of additional metadata. Instances can also be queried to determine if another NdrProperty instance can be connected to it. In almost all cases, this class will not be used directly. More specialized properties can be created that derive from NdrProperty ; those specialized properties can add their own domain-specific data and methods. Methods: CanConnectTo(other) Determines if this property can be connected to the specified property. GetArraySize() Gets this property's array size. GetDefaultValue() Gets this property's default value associated with the type of the property. GetInfoString() Gets a string with basic information about this property. GetMetadata() All of the metadata that came from the parse process. GetName() Gets the name of the property. GetType() Gets the type of the property. GetTypeAsSdfType() Converts the property's type from GetType() into a SdfValueTypeName . IsArray() Whether this property's type is an array type. IsConnectable() Whether this property can be connected to other properties. IsDynamicArray() Whether this property's array type is dynamically-sized. IsOutput() Whether this property is an output. CanConnectTo(other) → bool Determines if this property can be connected to the specified property. Parameters other (Property) – GetArraySize() → int Gets this property’s array size. If this property is a fixed-size array type, the array size is returned. In the case of a dynamically-sized array, this method returns the array size that the parser reports, and should not be relied upon to be accurate. A parser may report -1 for the array size, for example, to indicate a dynamically-sized array. For types that are not a fixed-size array or dynamic array, this returns 0. GetDefaultValue() → VtValue Gets this property’s default value associated with the type of the property. GetType() GetInfoString() → str Gets a string with basic information about this property. Helpful for things like adding this property to a log. GetMetadata() → NdrTokenMap All of the metadata that came from the parse process. GetName() → str Gets the name of the property. GetType() → str Gets the type of the property. GetTypeAsSdfType() → NdrSdfTypeIndicator Converts the property’s type from GetType() into a SdfValueTypeName . Two scenarios can result: an exact mapping from property type to Sdf type, and an inexact mapping. In the first scenario, the first element in the pair will be the cleanly-mapped Sdf type, and the second element, a TfToken, will be empty. In the second scenario, the Sdf type will be set to Token to indicate an unclean mapping, and the second element will be set to the original type returned by GetType() . GetDefaultValueAsSdfType IsArray() → bool Whether this property’s type is an array type. IsConnectable() → bool Whether this property can be connected to other properties. If this returns true , connectability to a specific property can be tested via CanConnectTo() . IsDynamicArray() → bool Whether this property’s array type is dynamically-sized. IsOutput() → bool Whether this property is an output. class pxr.Ndr.Registry The registry provides access to node information.”Discovery Plugins”are responsible for finding the nodes that should be included in the registry. Discovery plugins are found through the plugin system. If additional discovery plugins need to be specified, a client can pass them to SetExtraDiscoveryPlugins() . When the registry is first told about the discovery plugins, the plugins will be asked to discover nodes. These plugins will generate NdrNodeDiscoveryResult instances, which only contain basic metadata. Once the client asks for information that would require the node’s contents to be parsed (eg, what its inputs and outputs are), the registry will begin the parsing process on an as-needed basis. See NdrNodeDiscoveryResult for the information that can be retrieved without triggering a parse. Some methods in this module may allow for a”family”to be provided. A family is simply a generic grouping which is optional. Methods: GetAllNodeSourceTypes() Get a sorted list of all node source types that may be present on the nodes in the registry. GetNodeByIdentifier(identifier, ...) Get the node with the specified identifier , and an optional sourceTypePriority list specifying the set of node SOURCE types (see NdrNode::GetSourceType() ) that should be searched. GetNodeByIdentifierAndType(identifier, ...) Get the node with the specified identifier and sourceType . GetNodeByName(name, sourceTypePriority, filter) Get the node with the specified name. GetNodeByNameAndType(name, sourceType, filter) A convenience wrapper around GetNodeByName() . GetNodeFromAsset(asset, metadata, ...) Parses the given asset , constructs a NdrNode from it and adds it to the registry. GetNodeFromSourceCode(sourceCode, ...) Parses the given sourceCode string, constructs a NdrNode from it and adds it to the registry. GetNodeIdentifiers(family, filter) Get the identifiers of all the nodes that the registry is aware of. GetNodeNames(family) Get the names of all the nodes that the registry is aware of. GetNodesByFamily(family, filter) Get all nodes from the registry, optionally restricted to the nodes that fall under a specified family and/or the default version. GetNodesByIdentifier(identifier) Get all nodes matching the specified identifier (multiple nodes of the same identifier, but different source types, may exist). GetNodesByName(name, filter) Get all nodes matching the specified name. GetSearchURIs() Get the locations where the registry is searching for nodes. SetExtraDiscoveryPlugins(plugins) Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system. SetExtraParserPlugins(pluginTypes) Allows the client to set any additional parser plugins that would otherwise NOT be found through the plugin system. GetAllNodeSourceTypes() → NdrTokenVec Get a sorted list of all node source types that may be present on the nodes in the registry. Source types originate from the discovery process, but there is no guarantee that the discovered source types will also have a registered parser plugin. The actual supported source types here depend on the parsers that are available. Also note that some parser plugins may not advertise a source type. See the documentation for NdrParserPlugin and NdrNode::GetSourceType() for more information. GetNodeByIdentifier(identifier, sourceTypePriority) → Node Get the node with the specified identifier , and an optional sourceTypePriority list specifying the set of node SOURCE types (see NdrNode::GetSourceType() ) that should be searched. If no sourceTypePriority is specified, the first encountered node with the specified identifier will be returned (first is arbitrary) if found. If a sourceTypePriority list is specified, then this will iterate through each source type and try to find a node matching by identifier. This is equivalent to calling NdrRegistry::GetNodeByIdentifierAndType for each source type until a node is found. Nodes of the same identifier but different source type can exist in the registry. If a node’Foo’with source types’abc’and’xyz’exist in the registry, and you want to make sure the’abc’version is fetched before the’xyz’version, the priority list would be specified as [‘abc’,’xyz’]. If the’abc’version did not exist in the registry, then the’xyz’version would be returned. Returns nullptr if a node matching the arguments can’t be found. Parameters identifier (NdrIdentifier) – sourceTypePriority (NdrTokenVec) – GetNodeByIdentifierAndType(identifier, sourceType) → Node Get the node with the specified identifier and sourceType . If there is no matching node for the sourceType, nullptr is returned. Parameters identifier (NdrIdentifier) – sourceType (str) – GetNodeByName(name, sourceTypePriority, filter) → Node Get the node with the specified name. An optional priority list specifies the set of node SOURCE types ( NdrNode::GetSourceType() ) that should be searched and in what order. Optionally, a filter can be specified to consider just the default versions of nodes matching name (the default) or all versions of the nodes. GetNodeByIdentifier() . Parameters name (str) – sourceTypePriority (NdrTokenVec) – filter (VersionFilter) – GetNodeByNameAndType(name, sourceType, filter) → Node A convenience wrapper around GetNodeByName() . Instead of providing a priority list, an exact type is specified, and nullptr is returned if a node with the exact identifier and type does not exist. Optionally, a filter can be specified to consider just the default versions of nodes matching name (the default) or all versions of the nodes. Parameters name (str) – sourceType (str) – filter (VersionFilter) – GetNodeFromAsset(asset, metadata, subIdentifier, sourceType) → Node Parses the given asset , constructs a NdrNode from it and adds it to the registry. Nodes created from an asset using this API can be looked up by the unique identifier and sourceType of the returned node, or by URI, which will be set to the unresolved asset path value. metadata contains additional metadata needed for parsing and compiling the source code in the file pointed to by asset correctly. This metadata supplements the metadata available in the asset and overrides it in cases where there are key collisions. subidentifier is optional, and it would be used to indicate a particular definition in the asset file if the asset contains multiple node definitions. sourceType is optional, and it is only needed to indicate a particular type if the asset file is capable of representing a node definition of multiple source types. Returns a valid node if the asset is parsed successfully using one of the registered parser plugins. Parameters asset (AssetPath) – metadata (NdrTokenMap) – subIdentifier (str) – sourceType (str) – GetNodeFromSourceCode(sourceCode, sourceType, metadata) → Node Parses the given sourceCode string, constructs a NdrNode from it and adds it to the registry. The parser to be used is determined by the specified sourceType . Nodes created from source code using this API can be looked up by the unique identifier and sourceType of the returned node. metadata contains additional metadata needed for parsing and compiling the source code correctly. This metadata supplements the metadata available in sourceCode and overrides it cases where there are key collisions. Returns a valid node if the given source code is parsed successfully using the parser plugins that is registered for the specified sourceType . Parameters sourceCode (str) – sourceType (str) – metadata (NdrTokenMap) – GetNodeIdentifiers(family, filter) → NdrIdentifierVec Get the identifiers of all the nodes that the registry is aware of. This will not run the parsing plugins on the nodes that have been discovered, so this method is relatively quick. Optionally, a”family”name can be specified to only get the identifiers of nodes that belong to that family and a filter can be specified to get just the default version (the default) or all versions of the node. Parameters family (str) – filter (VersionFilter) – GetNodeNames(family) → NdrStringVec Get the names of all the nodes that the registry is aware of. This will not run the parsing plugins on the nodes that have been discovered, so this method is relatively quick. Optionally, a”family”name can be specified to only get the names of nodes that belong to that family. Parameters family (str) – GetNodesByFamily(family, filter) → NdrNodeConstPtrVec Get all nodes from the registry, optionally restricted to the nodes that fall under a specified family and/or the default version. Note that this will parse all nodes that the registry is aware of (unless a family is specified), so this may take some time to run the first time it is called. Parameters family (str) – filter (VersionFilter) – GetNodesByIdentifier(identifier) → NdrNodeConstPtrVec Get all nodes matching the specified identifier (multiple nodes of the same identifier, but different source types, may exist). If no nodes match the identifier, an empty vector is returned. Parameters identifier (NdrIdentifier) – GetNodesByName(name, filter) → NdrNodeConstPtrVec Get all nodes matching the specified name. Only nodes matching the specified name will be parsed. Optionally, a filter can be specified to get just the default version (the default) or all versions of the node. If no nodes match an empty vector is returned. Parameters name (str) – filter (VersionFilter) – GetSearchURIs() → NdrStringVec Get the locations where the registry is searching for nodes. Depending on which discovery plugins were used, this may include non- filesystem paths. SetExtraDiscoveryPlugins(plugins) → None Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system. Runs the discovery process for the specified plugins immediately. Note that this method cannot be called after any nodes in the registry have been parsed (eg, through GetNode*()), otherwise an error will result. Parameters plugins (DiscoveryPluginRefPtrVec) – SetExtraDiscoveryPlugins(pluginTypes) -> None Allows the client to set any additional discovery plugins that would otherwise NOT be found through the plugin system. Runs the discovery process for the specified plugins immediately. Note that this method cannot be called after any nodes in the registry have been parsed (eg, through GetNode*()), otherwise an error will result. Parameters pluginTypes (list[Type]) – SetExtraParserPlugins(pluginTypes) → None Allows the client to set any additional parser plugins that would otherwise NOT be found through the plugin system. Note that this method cannot be called after any nodes in the registry have been parsed (eg, through GetNode*()), otherwise an error will result. Parameters pluginTypes (list[Type]) – class pxr.Ndr.Version Methods: GetAsDefault() Return an equal version marked as default. GetMajor() Return the major version number or zero for an invalid version. GetMinor() Return the minor version number or zero for an invalid version. GetStringSuffix() Return the version as a identifier suffix. IsDefault() Return true iff this version is marked as default. GetAsDefault() → Version Return an equal version marked as default. It’s permitted to mark an invalid version as the default. GetMajor() → int Return the major version number or zero for an invalid version. GetMinor() → int Return the minor version number or zero for an invalid version. GetStringSuffix() → str Return the version as a identifier suffix. IsDefault() → bool Return true iff this version is marked as default. class pxr.Ndr.VersionFilter Methods: GetValueFromName Attributes: allValues static GetValueFromName() allValues = (Ndr.VersionFilterDefaultOnly, Ndr.VersionFilterAllVersions) © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
Trace.md
Trace module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » Trace module   # Trace module Summary: The Trace module provides performance tracking utility classes for counting, timing, measuring, recording, and reporting events. Trace – Utilities for counting and recording events. Classes: AggregateNode A representation of a call tree. Collector This is a singleton class that records TraceEvent instances and populates TraceCollection instances. Reporter This class converts streams of TraceEvent objects into call trees which can then be used as a data source to a GUI or written out to a file. Functions: TraceFunction(obj) A decorator that enables tracing the function that it decorates. TraceMethod(obj) A convenience. TraceScope(label) A context manager that calls BeginEvent on the global collector on enter and EndEvent on exit. class pxr.Trace.AggregateNode A representation of a call tree. Each node represents one or more calls that occurred in the trace. Multiple calls to a child node are aggregated into one node. Attributes: children list[TraceAggregateNodePtr] count int exclusiveCount int exclusiveTime TimeStamp expanded bool expired True if this object has expired, False otherwise. id Id inclusiveTime TimeStamp key str property children list[TraceAggregateNodePtr] Type type property count int Returns the call count of this node. recursive determines if recursive calls are counted. Type type property exclusiveCount int Returns the exclusive count. Type type property exclusiveTime TimeStamp Returns the time spent in this node but not its children. Type type property expanded bool Returns whether this node is expanded in a gui. type : None Sets whether or not this node is expanded in a gui. Type type property expired True if this object has expired, False otherwise. property id Id Returns the node’s id. Type type property inclusiveTime TimeStamp Returns the total time of this node ands its children. Type type property key str Returns the node’s key. Type type class pxr.Trace.Collector This is a singleton class that records TraceEvent instances and populates TraceCollection instances. All public methods of TraceCollector are safe to call from any thread. Methods: BeginEvent(key) Record a begin event with key if Category is enabled. BeginEventAtTime(key, ms) Record a begin event with key at a specified time if Category is enabled. Clear() Clear all pending events from the collector. EndEvent(key) Record an end event with key if Category is enabled. EndEventAtTime(key, ms) Record an end event with key at a specified time if Category is enabled. GetLabel() Return the label associated with this collector. Attributes: enabled bool expired True if this object has expired, False otherwise. pythonTracingEnabled None BeginEvent(key) → TimeStamp Record a begin event with key if Category is enabled. A matching end event is expected some time in the future. If the key is known at compile time BeginScope and Scope methods are preferred because they have lower overhead. The TimeStamp of the TraceEvent or 0 if the collector is disabled. BeginScope Scope Parameters key (Key) – BeginEventAtTime(key, ms) → None Record a begin event with key at a specified time if Category is enabled. This version of the method allows the passing of a specific number of elapsed milliseconds, ms, to use for this event. This method is used for testing and debugging code. Parameters key (Key) – ms (float) – Clear() → None Clear all pending events from the collector. No TraceCollection will be made for these events. EndEvent(key) → TimeStamp Record an end event with key if Category is enabled. A matching begin event must have preceded this end event. If the key is known at compile time EndScope and Scope methods are preferred because they have lower overhead. The TimeStamp of the TraceEvent or 0 if the collector is disabled. EndScope Scope Parameters key (Key) – EndEventAtTime(key, ms) → None Record an end event with key at a specified time if Category is enabled. This version of the method allows the passing of a specific number of elapsed milliseconds, ms, to use for this event. This method is used for testing and debugging code. Parameters key (Key) – ms (float) – GetLabel() → str Return the label associated with this collector. property enabled bool Returns whether collection of events is enabled for DefaultCategory. type : None Enables or disables collection of events for DefaultCategory. Type classmethod type property expired True if this object has expired, False otherwise. property pythonTracingEnabled None Set whether automatic tracing of all python scopes is enabled. type : bool Returns whether automatic tracing of all python scopes is enabled. Type type class pxr.Trace.Reporter This class converts streams of TraceEvent objects into call trees which can then be used as a data source to a GUI or written out to a file. Methods: ClearTree() Clears event tree and counters. GetLabel() Return the label associated with this reporter. Report(s, iterationCount) Generates a report to the ostream s, dividing all times by iterationCount. ReportChromeTracing(s) Generates a timeline trace report suitable for viewing in Chrome's trace viewer. ReportChromeTracingToFile ReportTimes(s) Generates a report of the times to the ostream s. UpdateTraceTrees() This fully re-builds the event and aggregate trees from whatever the current collection holds. Attributes: aggregateTreeRoot AggregateNode expired True if this object has expired, False otherwise. foldRecursiveCalls bool globalReporter groupByFunction bool shouldAdjustForOverheadAndNoise None ClearTree() → None Clears event tree and counters. GetLabel() → str Return the label associated with this reporter. Report(s, iterationCount) → None Generates a report to the ostream s, dividing all times by iterationCount. Parameters s (ostream) – iterationCount (int) – ReportChromeTracing(s) → None Generates a timeline trace report suitable for viewing in Chrome’s trace viewer. Parameters s (ostream) – ReportChromeTracingToFile() ReportTimes(s) → None Generates a report of the times to the ostream s. Parameters s (ostream) – UpdateTraceTrees() → None This fully re-builds the event and aggregate trees from whatever the current collection holds. It is ok to call this multiple times in case the collection gets appended on inbetween. If we want to have multiple reporters per collector, this will need to be changed so that all reporters reporting on a collector update their respective trees. property aggregateTreeRoot AggregateNode Returns the root node of the aggregated call tree. Type type property expired True if this object has expired, False otherwise. property foldRecursiveCalls bool Returns the current setting for recursion folding for stack trace event reporting. type : None When stack trace event reporting, this sets whether or not recursive calls are folded in the output. Recursion folding is useful when the stacks contain deep recursive structures. Type type globalReporter = <pxr.Trace.Reporter object> property groupByFunction bool Returns the current group-by-function state. type : None This affects only stack trace event reporting. If true then all events in a function are grouped together otherwise events are split out by address. Type type property shouldAdjustForOverheadAndNoise None Set whether or not the reporter should adjust scope times for overhead and noise. Type type pxr.Trace.TraceFunction(obj) A decorator that enables tracing the function that it decorates. If you decorate with ‘TraceFunction’ the function will be traced in the global collector. pxr.Trace.TraceMethod(obj) A convenience. Same as TraceFunction but changes the recorded label to use the term ‘method’ rather than ‘function’. pxr.Trace.TraceScope(label) A context manager that calls BeginEvent on the global collector on enter and EndEvent on exit. © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
UsdPhysics.md
UsdPhysics module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » UsdPhysics module   # UsdPhysics module Summary: The UsdPhysics module defines the physics-related prim and property schemas that together form a physics simulation representation. Classes: ArticulationRootAPI PhysicsArticulationRootAPI can be applied to a scene graph node, and marks the subtree rooted here for inclusion in one or more reduced coordinate articulations. CollisionAPI Applies collision attributes to a UsdGeomXformable prim. CollisionGroup Defines a collision group for coarse filtering. CollisionGroupTable DistanceJoint Predefined distance joint type (Distance between rigid bodies may be limited to given minimum or maximum distance.) DriveAPI The PhysicsDriveAPI when applied to any joint primitive will drive the joint towards a given target. FilteredPairsAPI API to describe fine-grained filtering. FixedJoint Predefined fixed joint type (All degrees of freedom are removed.) Joint A joint constrains the movement of rigid bodies. LimitAPI The PhysicsLimitAPI can be applied to a PhysicsJoint and will restrict the movement along an axis. MassAPI Defines explicit mass properties (mass, density, inertia etc.). MassUnits Container class for static double-precision symbols representing common mass units of measure expressed in kilograms. MaterialAPI Adds simulation material properties to a Material. MeshCollisionAPI Attributes to control how a Mesh is made into a collider. PrismaticJoint Predefined prismatic joint type (translation along prismatic joint axis is permitted.) RevoluteJoint Predefined revolute joint type (rotation along revolute joint axis is permitted.) RigidBodyAPI Applies physics body attributes to any UsdGeomXformable prim and marks that prim to be driven by a simulation. Scene General physics simulation properties, required for simulation. SphericalJoint Predefined spherical joint type (Removes linear degrees of freedom, cone limit may restrict the motion in a given range.) It allows two limit values, which when equal create a circular, else an elliptic cone limit around the limit axis. Tokens class pxr.UsdPhysics.ArticulationRootAPI PhysicsArticulationRootAPI can be applied to a scene graph node, and marks the subtree rooted here for inclusion in one or more reduced coordinate articulations. For floating articulations, this should be on the root body. For fixed articulations (robotics jargon for e.g. a robot arm for welding that is bolted to the floor), this API can be on a direct or indirect parent of the root joint which is connected to the world, or on the joint itself.. Methods: Apply classmethod Apply(prim) -> ArticulationRootAPI CanApply classmethod CanApply(prim, whyNot) -> bool Get classmethod Get(stage, path) -> ArticulationRootAPI GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Apply() classmethod Apply(prim) -> ArticulationRootAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsArticulationRootAPI”to the token-valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsArticulationRootAPI object is returned upon success. An invalid (or empty) UsdPhysicsArticulationRootAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – static Get() classmethod Get(stage, path) -> ArticulationRootAPI Return a UsdPhysicsArticulationRootAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsArticulationRootAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.CollisionAPI Applies collision attributes to a UsdGeomXformable prim. If a simulation is running, this geometry will collide with other geometries that have PhysicsCollisionAPI applied. If a prim in the parent hierarchy has the RigidBodyAPI applied, this collider is a part of that body. If there is no body in the parent hierarchy, this collider is considered to be static. Methods: Apply classmethod Apply(prim) -> CollisionAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateCollisionEnabledAttr(defaultValue, ...) See GetCollisionEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSimulationOwnerRel() See GetSimulationOwnerRel() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> CollisionAPI GetCollisionEnabledAttr() Determines if the PhysicsCollisionAPI is enabled. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetSimulationOwnerRel() Single PhysicsScene that will simulate this collider. static Apply() classmethod Apply(prim) -> CollisionAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsCollisionAPI”to the token- valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsCollisionAPI object is returned upon success. An invalid (or empty) UsdPhysicsCollisionAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateCollisionEnabledAttr(defaultValue, writeSparsely) → Attribute See GetCollisionEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSimulationOwnerRel() → Relationship See GetSimulationOwnerRel() , and also Create vs Get Property Methods for when to use Get vs Create. static Get() classmethod Get(stage, path) -> CollisionAPI Return a UsdPhysicsCollisionAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsCollisionAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetCollisionEnabledAttr() → Attribute Determines if the PhysicsCollisionAPI is enabled. Declaration bool physics:collisionEnabled = 1 C++ Type bool Usd Type SdfValueTypeNames->Bool static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSimulationOwnerRel() → Relationship Single PhysicsScene that will simulate this collider. By default this object belongs to the first PhysicsScene. Note that if a RigidBodyAPI in the hierarchy above has a different simulationOwner then it has a precedence over this relationship. class pxr.UsdPhysics.CollisionGroup Defines a collision group for coarse filtering. When a collision occurs between two objects that have a PhysicsCollisionGroup assigned, they will collide with each other unless this PhysicsCollisionGroup pair is filtered. See filteredGroups attribute. A CollectionAPI:colliders maintains a list of PhysicsCollisionAPI rel-s that defines the members of this Collisiongroup. Methods: ComputeCollisionGroupTable classmethod ComputeCollisionGroupTable(stage) -> CollisionGroupTable CreateFilteredGroupsRel() See GetFilteredGroupsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateInvertFilteredGroupsAttr(defaultValue, ...) See GetInvertFilteredGroupsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateMergeGroupNameAttr(defaultValue, ...) See GetMergeGroupNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> CollisionGroup Get classmethod Get(stage, path) -> CollisionGroup GetCollidersCollectionAPI() Return the UsdCollectionAPI interface used for defining what colliders belong to the CollisionGroup. GetFilteredGroupsRel() References a list of PhysicsCollisionGroups with which collisions should be ignored. GetInvertFilteredGroupsAttr() Normally, the filter will disable collisions against the selected filter groups. GetMergeGroupNameAttr() If non-empty, any collision groups in a stage with a matching mergeGroup should be considered to refer to the same collection. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static ComputeCollisionGroupTable() classmethod ComputeCollisionGroupTable(stage) -> CollisionGroupTable Compute a table encoding all the collision groups filter rules for a stage. This can be used as a reference to validate an implementation of the collision groups filters. The returned table is diagonally symmetric. Parameters stage (Stage) – CreateFilteredGroupsRel() → Relationship See GetFilteredGroupsRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateInvertFilteredGroupsAttr(defaultValue, writeSparsely) → Attribute See GetInvertFilteredGroupsAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateMergeGroupNameAttr(defaultValue, writeSparsely) → Attribute See GetMergeGroupNameAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> CollisionGroup Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> CollisionGroup Return a UsdPhysicsCollisionGroup holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsCollisionGroup(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetCollidersCollectionAPI() → CollectionAPI Return the UsdCollectionAPI interface used for defining what colliders belong to the CollisionGroup. GetFilteredGroupsRel() → Relationship References a list of PhysicsCollisionGroups with which collisions should be ignored. GetInvertFilteredGroupsAttr() → Attribute Normally, the filter will disable collisions against the selected filter groups. However, if this option is set, the filter will disable collisions against all colliders except for those in the selected filter groups. Declaration bool physics:invertFilteredGroups C++ Type bool Usd Type SdfValueTypeNames->Bool GetMergeGroupNameAttr() → Attribute If non-empty, any collision groups in a stage with a matching mergeGroup should be considered to refer to the same collection. Matching collision groups should behave as if there were a single group containing referenced colliders and filter groups from both collections. Declaration string physics:mergeGroup C++ Type std::string Usd Type SdfValueTypeNames->String static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.CollisionGroupTable Methods: GetGroups IsCollisionEnabled GetGroups() IsCollisionEnabled() class pxr.UsdPhysics.DistanceJoint Predefined distance joint type (Distance between rigid bodies may be limited to given minimum or maximum distance.) Methods: CreateMaxDistanceAttr(defaultValue, ...) See GetMaxDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateMinDistanceAttr(defaultValue, ...) See GetMinDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> DistanceJoint Get classmethod Get(stage, path) -> DistanceJoint GetMaxDistanceAttr() Maximum distance. GetMinDistanceAttr() Minimum distance. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateMaxDistanceAttr(defaultValue, writeSparsely) → Attribute See GetMaxDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateMinDistanceAttr(defaultValue, writeSparsely) → Attribute See GetMinDistanceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> DistanceJoint Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> DistanceJoint Return a UsdPhysicsDistanceJoint holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsDistanceJoint(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetMaxDistanceAttr() → Attribute Maximum distance. If attribute is negative, the joint is not limited. Units: distance. Declaration float physics:maxDistance = -1 C++ Type float Usd Type SdfValueTypeNames->Float GetMinDistanceAttr() → Attribute Minimum distance. If attribute is negative, the joint is not limited. Units: distance. Declaration float physics:minDistance = -1 C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.DriveAPI The PhysicsDriveAPI when applied to any joint primitive will drive the joint towards a given target. The PhysicsDriveAPI is a multipleApply schema: drive can be set per axis”transX”,”transY”,”transZ”,”rotX”,”rotY”,”rotZ”or its”linear”for prismatic joint or”angular”for revolute joints. Setting these as a multipleApply schema TfToken name will define the degree of freedom the DriveAPI is applied to. Each drive is an implicit force-limited damped spring: Force or acceleration = stiffness * (targetPosition - position) damping * (targetVelocity - velocity) For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, use UsdPhysicsTokens->rightHanded as the value. Methods: Apply classmethod Apply(prim, name) -> DriveAPI CanApply classmethod CanApply(prim, name, whyNot) -> bool CreateDampingAttr(defaultValue, writeSparsely) See GetDampingAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateMaxForceAttr(defaultValue, writeSparsely) See GetMaxForceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateStiffnessAttr(defaultValue, writeSparsely) See GetStiffnessAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateTargetPositionAttr(defaultValue, ...) See GetTargetPositionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateTargetVelocityAttr(defaultValue, ...) See GetTargetVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateTypeAttr(defaultValue, writeSparsely) See GetTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> DriveAPI GetAll classmethod GetAll(prim) -> list[DriveAPI] GetDampingAttr() Damping of the drive. GetMaxForceAttr() Maximum force that can be applied to drive. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetStiffnessAttr() Stiffness of the drive. GetTargetPositionAttr() Target value for position. GetTargetVelocityAttr() Target value for velocity. GetTypeAttr() Drive spring is for the acceleration at the joint (rather than the force). IsPhysicsDriveAPIPath classmethod IsPhysicsDriveAPIPath(path, name) -> bool static Apply() classmethod Apply(prim, name) -> DriveAPI Applies this multiple-apply API schema to the given prim along with the given instance name, name . This information is stored by adding”PhysicsDriveAPI:<i>name</i>”to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is’instance1’, the token’PhysicsDriveAPI:instance1’is added to’apiSchemas’. A valid UsdPhysicsDriveAPI object is returned upon success. An invalid (or empty) UsdPhysicsDriveAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – name (str) – static CanApply() classmethod CanApply(prim, name, whyNot) -> bool Returns true if this multiple-apply API schema can be applied, with the given instance name, name , to the given prim . If this schema can not be a applied the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – name (str) – whyNot (str) – CreateDampingAttr(defaultValue, writeSparsely) → Attribute See GetDampingAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateMaxForceAttr(defaultValue, writeSparsely) → Attribute See GetMaxForceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateStiffnessAttr(defaultValue, writeSparsely) → Attribute See GetStiffnessAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateTargetPositionAttr(defaultValue, writeSparsely) → Attribute See GetTargetPositionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateTargetVelocityAttr(defaultValue, writeSparsely) → Attribute See GetTargetVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateTypeAttr(defaultValue, writeSparsely) → Attribute See GetTypeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> DriveAPI Return a UsdPhysicsDriveAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. path must be of the format<path>.drive:name. This is shorthand for the following: TfToken name = SdfPath::StripNamespace(path.GetToken()); UsdPhysicsDriveAPI( stage->GetPrimAtPath(path.GetPrimPath()), name); Parameters stage (Stage) – path (Path) – Get(prim, name) -> DriveAPI Return a UsdPhysicsDriveAPI with name name holding the prim prim . Shorthand for UsdPhysicsDriveAPI(prim, name); Parameters prim (Prim) – name (str) – static GetAll() classmethod GetAll(prim) -> list[DriveAPI] Return a vector of all named instances of UsdPhysicsDriveAPI on the given prim . Parameters prim (Prim) – GetDampingAttr() → Attribute Damping of the drive. Units: if linear drive: mass/second If angular drive: mass*DIST_UNITS*DIST_UNITS/second/second/degrees. Declaration float physics:damping = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetMaxForceAttr() → Attribute Maximum force that can be applied to drive. Units: if linear drive: mass*DIST_UNITS/second/second if angular drive: mass*DIST_UNITS*DIST_UNITS/second/second inf means not limited. Must be non-negative. Declaration float physics:maxForce = inf C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSchemaAttributeNames(includeInherited, instanceName) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name. Does not include attributes that may be authored by custom/extended methods of the schemas involved. The names returned will have the proper namespace prefix. Parameters includeInherited (bool) – instanceName (str) – GetStiffnessAttr() → Attribute Stiffness of the drive. Units: if linear drive: mass/second/second if angular drive: mass*DIST_UNITS*DIST_UNITS/degree/second/second. Declaration float physics:stiffness = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetTargetPositionAttr() → Attribute Target value for position. Units: if linear drive: distance if angular drive: degrees. Declaration float physics:targetPosition = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetTargetVelocityAttr() → Attribute Target value for velocity. Units: if linear drive: distance/second if angular drive: degrees/second. Declaration float physics:targetVelocity = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetTypeAttr() → Attribute Drive spring is for the acceleration at the joint (rather than the force). Declaration uniform token physics:type ="force" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values force, acceleration static IsPhysicsDriveAPIPath() classmethod IsPhysicsDriveAPIPath(path, name) -> bool Checks if the given path path is of an API schema of type PhysicsDriveAPI. If so, it stores the instance name of the schema in name and returns true. Otherwise, it returns false. Parameters path (Path) – name (str) – class pxr.UsdPhysics.FilteredPairsAPI API to describe fine-grained filtering. If a collision between two objects occurs, this pair might be filtered if the pair is defined through this API. This API can be applied either to a body or collision or even articulation. The”filteredPairs”defines what objects it should not collide against. Note that FilteredPairsAPI filtering has precedence over CollisionGroup filtering. Methods: Apply classmethod Apply(prim) -> FilteredPairsAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateFilteredPairsRel() See GetFilteredPairsRel() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> FilteredPairsAPI GetFilteredPairsRel() Relationship to objects that should be filtered. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Apply() classmethod Apply(prim) -> FilteredPairsAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsFilteredPairsAPI”to the token-valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsFilteredPairsAPI object is returned upon success. An invalid (or empty) UsdPhysicsFilteredPairsAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateFilteredPairsRel() → Relationship See GetFilteredPairsRel() , and also Create vs Get Property Methods for when to use Get vs Create. static Get() classmethod Get(stage, path) -> FilteredPairsAPI Return a UsdPhysicsFilteredPairsAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsFilteredPairsAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetFilteredPairsRel() → Relationship Relationship to objects that should be filtered. static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.FixedJoint Predefined fixed joint type (All degrees of freedom are removed.) Methods: Define classmethod Define(stage, path) -> FixedJoint Get classmethod Get(stage, path) -> FixedJoint GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Define() classmethod Define(stage, path) -> FixedJoint Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> FixedJoint Return a UsdPhysicsFixedJoint holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsFixedJoint(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.Joint A joint constrains the movement of rigid bodies. Joint can be created between two rigid bodies or between one rigid body and world. By default joint primitive defines a D6 joint where all degrees of freedom are free. Three linear and three angular degrees of freedom. Note that default behavior is to disable collision between jointed bodies. Methods: CreateBody0Rel() See GetBody0Rel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBody1Rel() See GetBody1Rel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBreakForceAttr(defaultValue, writeSparsely) See GetBreakForceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBreakTorqueAttr(defaultValue, ...) See GetBreakTorqueAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateCollisionEnabledAttr(defaultValue, ...) See GetCollisionEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateExcludeFromArticulationAttr(...) See GetExcludeFromArticulationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateJointEnabledAttr(defaultValue, ...) See GetJointEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLocalPos0Attr(defaultValue, writeSparsely) See GetLocalPos0Attr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLocalPos1Attr(defaultValue, writeSparsely) See GetLocalPos1Attr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLocalRot0Attr(defaultValue, writeSparsely) See GetLocalRot0Attr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLocalRot1Attr(defaultValue, writeSparsely) See GetLocalRot1Attr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Joint Get classmethod Get(stage, path) -> Joint GetBody0Rel() Relationship to any UsdGeomXformable. GetBody1Rel() Relationship to any UsdGeomXformable. GetBreakForceAttr() Joint break force. GetBreakTorqueAttr() Joint break torque. GetCollisionEnabledAttr() Determines if the jointed subtrees should collide or not. GetExcludeFromArticulationAttr() Determines if the joint can be included in an Articulation. GetJointEnabledAttr() Determines if the joint is enabled. GetLocalPos0Attr() Relative position of the joint frame to body0's frame. GetLocalPos1Attr() Relative position of the joint frame to body1's frame. GetLocalRot0Attr() Relative orientation of the joint frame to body0's frame. GetLocalRot1Attr() Relative orientation of the joint frame to body1's frame. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateBody0Rel() → Relationship See GetBody0Rel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBody1Rel() → Relationship See GetBody1Rel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateBreakForceAttr(defaultValue, writeSparsely) → Attribute See GetBreakForceAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateBreakTorqueAttr(defaultValue, writeSparsely) → Attribute See GetBreakTorqueAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateCollisionEnabledAttr(defaultValue, writeSparsely) → Attribute See GetCollisionEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateExcludeFromArticulationAttr(defaultValue, writeSparsely) → Attribute See GetExcludeFromArticulationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateJointEnabledAttr(defaultValue, writeSparsely) → Attribute See GetJointEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLocalPos0Attr(defaultValue, writeSparsely) → Attribute See GetLocalPos0Attr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLocalPos1Attr(defaultValue, writeSparsely) → Attribute See GetLocalPos1Attr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLocalRot0Attr(defaultValue, writeSparsely) → Attribute See GetLocalRot0Attr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLocalRot1Attr(defaultValue, writeSparsely) → Attribute See GetLocalRot1Attr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Joint Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Joint Return a UsdPhysicsJoint holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsJoint(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetBody0Rel() → Relationship Relationship to any UsdGeomXformable. GetBody1Rel() → Relationship Relationship to any UsdGeomXformable. GetBreakForceAttr() → Attribute Joint break force. If set, joint is to break when this force limit is reached. (Used for linear DOFs.) Units: mass * distance / second / second Declaration float physics:breakForce = inf C++ Type float Usd Type SdfValueTypeNames->Float GetBreakTorqueAttr() → Attribute Joint break torque. If set, joint is to break when this torque limit is reached. (Used for angular DOFs.) Units: mass * distance * distance / second / second Declaration float physics:breakTorque = inf C++ Type float Usd Type SdfValueTypeNames->Float GetCollisionEnabledAttr() → Attribute Determines if the jointed subtrees should collide or not. Declaration bool physics:collisionEnabled = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool GetExcludeFromArticulationAttr() → Attribute Determines if the joint can be included in an Articulation. Declaration uniform bool physics:excludeFromArticulation = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool Variability SdfVariabilityUniform GetJointEnabledAttr() → Attribute Determines if the joint is enabled. Declaration bool physics:jointEnabled = 1 C++ Type bool Usd Type SdfValueTypeNames->Bool GetLocalPos0Attr() → Attribute Relative position of the joint frame to body0’s frame. Declaration point3f physics:localPos0 = (0, 0, 0) C++ Type GfVec3f Usd Type SdfValueTypeNames->Point3f GetLocalPos1Attr() → Attribute Relative position of the joint frame to body1’s frame. Declaration point3f physics:localPos1 = (0, 0, 0) C++ Type GfVec3f Usd Type SdfValueTypeNames->Point3f GetLocalRot0Attr() → Attribute Relative orientation of the joint frame to body0’s frame. Declaration quatf physics:localRot0 = (1, 0, 0, 0) C++ Type GfQuatf Usd Type SdfValueTypeNames->Quatf GetLocalRot1Attr() → Attribute Relative orientation of the joint frame to body1’s frame. Declaration quatf physics:localRot1 = (1, 0, 0, 0) C++ Type GfQuatf Usd Type SdfValueTypeNames->Quatf static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.LimitAPI The PhysicsLimitAPI can be applied to a PhysicsJoint and will restrict the movement along an axis. PhysicsLimitAPI is a multipleApply schema: The PhysicsJoint can be restricted along”transX”,”transY”,”transZ”,”rotX”,”rotY”,”rotZ”,”distance”. Setting these as a multipleApply schema TfToken name will define the degree of freedom the PhysicsLimitAPI is applied to. Note that if the low limit is higher than the high limit, motion along this axis is considered locked. Methods: Apply classmethod Apply(prim, name) -> LimitAPI CanApply classmethod CanApply(prim, name, whyNot) -> bool CreateHighAttr(defaultValue, writeSparsely) See GetHighAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLowAttr(defaultValue, writeSparsely) See GetLowAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> LimitAPI GetAll classmethod GetAll(prim) -> list[LimitAPI] GetHighAttr() Upper limit. GetLowAttr() Lower limit. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] IsPhysicsLimitAPIPath classmethod IsPhysicsLimitAPIPath(path, name) -> bool static Apply() classmethod Apply(prim, name) -> LimitAPI Applies this multiple-apply API schema to the given prim along with the given instance name, name . This information is stored by adding”PhysicsLimitAPI:<i>name</i>”to the token-valued, listOp metadata apiSchemas on the prim. For example, if name is’instance1’, the token’PhysicsLimitAPI:instance1’is added to’apiSchemas’. A valid UsdPhysicsLimitAPI object is returned upon success. An invalid (or empty) UsdPhysicsLimitAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – name (str) – static CanApply() classmethod CanApply(prim, name, whyNot) -> bool Returns true if this multiple-apply API schema can be applied, with the given instance name, name , to the given prim . If this schema can not be a applied the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – name (str) – whyNot (str) – CreateHighAttr(defaultValue, writeSparsely) → Attribute See GetHighAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLowAttr(defaultValue, writeSparsely) → Attribute See GetLowAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> LimitAPI Return a UsdPhysicsLimitAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. path must be of the format<path>.limit:name. This is shorthand for the following: TfToken name = SdfPath::StripNamespace(path.GetToken()); UsdPhysicsLimitAPI( stage->GetPrimAtPath(path.GetPrimPath()), name); Parameters stage (Stage) – path (Path) – Get(prim, name) -> LimitAPI Return a UsdPhysicsLimitAPI with name name holding the prim prim . Shorthand for UsdPhysicsLimitAPI(prim, name); Parameters prim (Prim) – name (str) – static GetAll() classmethod GetAll(prim) -> list[LimitAPI] Return a vector of all named instances of UsdPhysicsLimitAPI on the given prim . Parameters prim (Prim) – GetHighAttr() → Attribute Upper limit. Units: degrees or distance depending on trans or rot axis applied to. inf means not limited in positive direction. Declaration float physics:high = inf C++ Type float Usd Type SdfValueTypeNames->Float GetLowAttr() → Attribute Lower limit. Units: degrees or distance depending on trans or rot axis applied to. -inf means not limited in negative direction. Declaration float physics:low = -inf C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSchemaAttributeNames(includeInherited, instanceName) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes for a given instance name. Does not include attributes that may be authored by custom/extended methods of the schemas involved. The names returned will have the proper namespace prefix. Parameters includeInherited (bool) – instanceName (str) – static IsPhysicsLimitAPIPath() classmethod IsPhysicsLimitAPIPath(path, name) -> bool Checks if the given path path is of an API schema of type PhysicsLimitAPI. If so, it stores the instance name of the schema in name and returns true. Otherwise, it returns false. Parameters path (Path) – name (str) – class pxr.UsdPhysics.MassAPI Defines explicit mass properties (mass, density, inertia etc.). MassAPI can be applied to any object that has a PhysicsCollisionAPI or a PhysicsRigidBodyAPI. Methods: Apply classmethod Apply(prim) -> MassAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateCenterOfMassAttr(defaultValue, ...) See GetCenterOfMassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDensityAttr(defaultValue, writeSparsely) See GetDensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDiagonalInertiaAttr(defaultValue, ...) See GetDiagonalInertiaAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateMassAttr(defaultValue, writeSparsely) See GetMassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreatePrincipalAxesAttr(defaultValue, ...) See GetPrincipalAxesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> MassAPI GetCenterOfMassAttr() Center of mass in the prim's local space. GetDensityAttr() If non-zero, specifies the density of the object. GetDiagonalInertiaAttr() If non-zero, specifies diagonalized inertia tensor along the principal axes. GetMassAttr() If non-zero, directly specifies the mass of the object. GetPrincipalAxesAttr() Orientation of the inertia tensor's principal axes in the prim's local space. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Apply() classmethod Apply(prim) -> MassAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsMassAPI”to the token- valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsMassAPI object is returned upon success. An invalid (or empty) UsdPhysicsMassAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateCenterOfMassAttr(defaultValue, writeSparsely) → Attribute See GetCenterOfMassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDensityAttr(defaultValue, writeSparsely) → Attribute See GetDensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDiagonalInertiaAttr(defaultValue, writeSparsely) → Attribute See GetDiagonalInertiaAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateMassAttr(defaultValue, writeSparsely) → Attribute See GetMassAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreatePrincipalAxesAttr(defaultValue, writeSparsely) → Attribute See GetPrincipalAxesAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> MassAPI Return a UsdPhysicsMassAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsMassAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetCenterOfMassAttr() → Attribute Center of mass in the prim’s local space. Units: distance. Declaration point3f physics:centerOfMass = (-inf, -inf, -inf) C++ Type GfVec3f Usd Type SdfValueTypeNames->Point3f GetDensityAttr() → Attribute If non-zero, specifies the density of the object. In the context of rigid body physics, density indirectly results in setting mass via (mass = density x volume of the object). How the volume is computed is up to implementation of the physics system. It is generally computed from the collision approximation rather than the graphical mesh. In the case where both density and mass are specified for the same object, mass has precedence over density. Unlike mass, child’s prim’s density overrides parent prim’s density as it is accumulative. Note that density of a collisionAPI can be also alternatively set through a PhysicsMaterialAPI. The material density has the weakest precedence in density definition. Note if density is 0.0 it is ignored. Units: mass/distance/distance/distance. Declaration float physics:density = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetDiagonalInertiaAttr() → Attribute If non-zero, specifies diagonalized inertia tensor along the principal axes. Note if diagonalInertial is (0.0, 0.0, 0.0) it is ignored. Units: mass*distance*distance. Declaration float3 physics:diagonalInertia = (0, 0, 0) C++ Type GfVec3f Usd Type SdfValueTypeNames->Float3 GetMassAttr() → Attribute If non-zero, directly specifies the mass of the object. Note that any child prim can also have a mass when they apply massAPI. In this case, the precedence rule is’parent mass overrides the child’s’. This may come as counter-intuitive, but mass is a computed quantity and in general not accumulative. For example, if a parent has mass of 10, and one of two children has mass of 20, allowing child’s mass to override its parent results in a mass of -10 for the other child. Note if mass is 0.0 it is ignored. Units: mass. Declaration float physics:mass = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetPrincipalAxesAttr() → Attribute Orientation of the inertia tensor’s principal axes in the prim’s local space. Declaration quatf physics:principalAxes = (0, 0, 0, 0) C++ Type GfQuatf Usd Type SdfValueTypeNames->Quatf static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.MassUnits Container class for static double-precision symbols representing common mass units of measure expressed in kilograms. Attributes: grams kilograms slugs grams = 0.001 kilograms = 1.0 slugs = 14.5939 class pxr.UsdPhysics.MaterialAPI Adds simulation material properties to a Material. All collisions that have a relationship to this material will have their collision response defined through this material. Methods: Apply classmethod Apply(prim) -> MaterialAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateDensityAttr(defaultValue, writeSparsely) See GetDensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateDynamicFrictionAttr(defaultValue, ...) See GetDynamicFrictionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRestitutionAttr(defaultValue, ...) See GetRestitutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateStaticFrictionAttr(defaultValue, ...) See GetStaticFrictionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> MaterialAPI GetDensityAttr() If non-zero, defines the density of the material. GetDynamicFrictionAttr() Dynamic friction coefficient. GetRestitutionAttr() Restitution coefficient. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetStaticFrictionAttr() Static friction coefficient. static Apply() classmethod Apply(prim) -> MaterialAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsMaterialAPI”to the token- valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsMaterialAPI object is returned upon success. An invalid (or empty) UsdPhysicsMaterialAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateDensityAttr(defaultValue, writeSparsely) → Attribute See GetDensityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateDynamicFrictionAttr(defaultValue, writeSparsely) → Attribute See GetDynamicFrictionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateRestitutionAttr(defaultValue, writeSparsely) → Attribute See GetRestitutionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateStaticFrictionAttr(defaultValue, writeSparsely) → Attribute See GetStaticFrictionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> MaterialAPI Return a UsdPhysicsMaterialAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsMaterialAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetDensityAttr() → Attribute If non-zero, defines the density of the material. This can be used for body mass computation, see PhysicsMassAPI. Note that if the density is 0.0 it is ignored. Units: mass/distance/distance/distance. Declaration float physics:density = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetDynamicFrictionAttr() → Attribute Dynamic friction coefficient. Unitless. Declaration float physics:dynamicFriction = 0 C++ Type float Usd Type SdfValueTypeNames->Float GetRestitutionAttr() → Attribute Restitution coefficient. Unitless. Declaration float physics:restitution = 0 C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetStaticFrictionAttr() → Attribute Static friction coefficient. Unitless. Declaration float physics:staticFriction = 0 C++ Type float Usd Type SdfValueTypeNames->Float class pxr.UsdPhysics.MeshCollisionAPI Attributes to control how a Mesh is made into a collider. Can be applied to only a USDGeomMesh in addition to its PhysicsCollisionAPI. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, use UsdPhysicsTokens->rightHanded as the value. Methods: Apply classmethod Apply(prim) -> MeshCollisionAPI CanApply classmethod CanApply(prim, whyNot) -> bool CreateApproximationAttr(defaultValue, ...) See GetApproximationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> MeshCollisionAPI GetApproximationAttr() Determines the mesh's collision approximation:"none"- The mesh geometry is used directly as a collider without any approximation. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] static Apply() classmethod Apply(prim) -> MeshCollisionAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsMeshCollisionAPI”to the token-valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsMeshCollisionAPI object is returned upon success. An invalid (or empty) UsdPhysicsMeshCollisionAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – CreateApproximationAttr(defaultValue, writeSparsely) → Attribute See GetApproximationAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> MeshCollisionAPI Return a UsdPhysicsMeshCollisionAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsMeshCollisionAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetApproximationAttr() → Attribute Determines the mesh’s collision approximation:”none”- The mesh geometry is used directly as a collider without any approximation. “convexDecomposition”- A convex mesh decomposition is performed. This results in a set of convex mesh colliders.”convexHull”- A convex hull of the mesh is generated and used as the collider.”boundingSphere”- A bounding sphere is computed around the mesh and used as a collider.”boundingCube”- An optimally fitting box collider is computed around the mesh.”meshSimplification”- A mesh simplification step is performed, resulting in a simplified triangle mesh collider. Declaration uniform token physics:approximation ="none" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values none, convexDecomposition, convexHull, boundingSphere, boundingCube, meshSimplification static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.PrismaticJoint Predefined prismatic joint type (translation along prismatic joint axis is permitted.) For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, use UsdPhysicsTokens->rightHanded as the value. Methods: CreateAxisAttr(defaultValue, writeSparsely) See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLowerLimitAttr(defaultValue, writeSparsely) See GetLowerLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateUpperLimitAttr(defaultValue, writeSparsely) See GetUpperLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> PrismaticJoint Get classmethod Get(stage, path) -> PrismaticJoint GetAxisAttr() Joint axis. GetLowerLimitAttr() Lower limit. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetUpperLimitAttr() Upper limit. CreateAxisAttr(defaultValue, writeSparsely) → Attribute See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLowerLimitAttr(defaultValue, writeSparsely) → Attribute See GetLowerLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateUpperLimitAttr(defaultValue, writeSparsely) → Attribute See GetUpperLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> PrismaticJoint Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> PrismaticJoint Return a UsdPhysicsPrismaticJoint holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsPrismaticJoint(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAxisAttr() → Attribute Joint axis. Declaration uniform token physics:axis ="X" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values X, Y, Z GetLowerLimitAttr() → Attribute Lower limit. Units: distance. -inf means not limited in negative direction. Declaration float physics:lowerLimit = -inf C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetUpperLimitAttr() → Attribute Upper limit. Units: distance. inf means not limited in positive direction. Declaration float physics:upperLimit = inf C++ Type float Usd Type SdfValueTypeNames->Float class pxr.UsdPhysics.RevoluteJoint Predefined revolute joint type (rotation along revolute joint axis is permitted.) For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, use UsdPhysicsTokens->rightHanded as the value. Methods: CreateAxisAttr(defaultValue, writeSparsely) See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateLowerLimitAttr(defaultValue, writeSparsely) See GetLowerLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateUpperLimitAttr(defaultValue, writeSparsely) See GetUpperLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> RevoluteJoint Get classmethod Get(stage, path) -> RevoluteJoint GetAxisAttr() Joint axis. GetLowerLimitAttr() Lower limit. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetUpperLimitAttr() Upper limit. CreateAxisAttr(defaultValue, writeSparsely) → Attribute See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateLowerLimitAttr(defaultValue, writeSparsely) → Attribute See GetLowerLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateUpperLimitAttr(defaultValue, writeSparsely) → Attribute See GetUpperLimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> RevoluteJoint Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> RevoluteJoint Return a UsdPhysicsRevoluteJoint holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsRevoluteJoint(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAxisAttr() → Attribute Joint axis. Declaration uniform token physics:axis ="X" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values X, Y, Z GetLowerLimitAttr() → Attribute Lower limit. Units: degrees. -inf means not limited in negative direction. Declaration float physics:lowerLimit = -inf C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetUpperLimitAttr() → Attribute Upper limit. Units: degrees. inf means not limited in positive direction. Declaration float physics:upperLimit = inf C++ Type float Usd Type SdfValueTypeNames->Float class pxr.UsdPhysics.RigidBodyAPI Applies physics body attributes to any UsdGeomXformable prim and marks that prim to be driven by a simulation. If a simulation is running it will update this prim’s pose. All prims in the hierarchy below this prim should move accordingly. Classes: MassInformation Methods: Apply classmethod Apply(prim) -> RigidBodyAPI CanApply classmethod CanApply(prim, whyNot) -> bool ComputeMassProperties(diagonalInertia, com, ...) Compute mass properties of the rigid body diagonalInertia Computed diagonal of the inertial tensor for the rigid body. CreateAngularVelocityAttr(defaultValue, ...) See GetAngularVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateKinematicEnabledAttr(defaultValue, ...) See GetKinematicEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateRigidBodyEnabledAttr(defaultValue, ...) See GetRigidBodyEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateSimulationOwnerRel() See GetSimulationOwnerRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateStartsAsleepAttr(defaultValue, ...) See GetStartsAsleepAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateVelocityAttr(defaultValue, writeSparsely) See GetVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Get classmethod Get(stage, path) -> RigidBodyAPI GetAngularVelocityAttr() Angular velocity in the same space as the node's xform. GetKinematicEnabledAttr() Determines whether the body is kinematic or not. GetRigidBodyEnabledAttr() Determines if this PhysicsRigidBodyAPI is enabled. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetSimulationOwnerRel() Single PhysicsScene that will simulate this body. GetStartsAsleepAttr() Determines if the body is asleep when the simulation starts. GetVelocityAttr() Linear velocity in the same space as the node's xform. class MassInformation Attributes: centerOfMass inertia localPos localRot volume property centerOfMass property inertia property localPos property localRot property volume static Apply() classmethod Apply(prim) -> RigidBodyAPI Applies this single-apply API schema to the given prim . This information is stored by adding”PhysicsRigidBodyAPI”to the token- valued, listOp metadata apiSchemas on the prim. A valid UsdPhysicsRigidBodyAPI object is returned upon success. An invalid (or empty) UsdPhysicsRigidBodyAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI() Parameters prim (Prim) – whyNot (str) – ComputeMassProperties(diagonalInertia, com, principalAxes, massInfoFn) → float Compute mass properties of the rigid body diagonalInertia Computed diagonal of the inertial tensor for the rigid body. com Computed center of mass for the rigid body. principalAxes Inertia tensor’s principal axes orienttion for the rigid body. massInfoFn Callback function to get collision mass information. Computed mass of the rigid body Parameters diagonalInertia (Vec3f) – com (Vec3f) – principalAxes (Quatf) – massInfoFn (MassInformationFn) – CreateAngularVelocityAttr(defaultValue, writeSparsely) → Attribute See GetAngularVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateKinematicEnabledAttr(defaultValue, writeSparsely) → Attribute See GetKinematicEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateRigidBodyEnabledAttr(defaultValue, writeSparsely) → Attribute See GetRigidBodyEnabledAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateSimulationOwnerRel() → Relationship See GetSimulationOwnerRel() , and also Create vs Get Property Methods for when to use Get vs Create. CreateStartsAsleepAttr(defaultValue, writeSparsely) → Attribute See GetStartsAsleepAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateVelocityAttr(defaultValue, writeSparsely) → Attribute See GetVelocityAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Get() classmethod Get(stage, path) -> RigidBodyAPI Return a UsdPhysicsRigidBodyAPI holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsRigidBodyAPI(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAngularVelocityAttr() → Attribute Angular velocity in the same space as the node’s xform. Units: degrees/second. Declaration vector3f physics:angularVelocity = (0, 0, 0) C++ Type GfVec3f Usd Type SdfValueTypeNames->Vector3f GetKinematicEnabledAttr() → Attribute Determines whether the body is kinematic or not. A kinematic body is a body that is moved through animated poses or through user defined poses. The simulation derives velocities for the kinematic body based on the external motion. When a continuous motion is not desired, this kinematic flag should be set to false. Declaration bool physics:kinematicEnabled = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool GetRigidBodyEnabledAttr() → Attribute Determines if this PhysicsRigidBodyAPI is enabled. Declaration bool physics:rigidBodyEnabled = 1 C++ Type bool Usd Type SdfValueTypeNames->Bool static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetSimulationOwnerRel() → Relationship Single PhysicsScene that will simulate this body. By default this is the first PhysicsScene found in the stage using UsdStage::Traverse() . GetStartsAsleepAttr() → Attribute Determines if the body is asleep when the simulation starts. Declaration uniform bool physics:startsAsleep = 0 C++ Type bool Usd Type SdfValueTypeNames->Bool Variability SdfVariabilityUniform GetVelocityAttr() → Attribute Linear velocity in the same space as the node’s xform. Units: distance/second. Declaration vector3f physics:velocity = (0, 0, 0) C++ Type GfVec3f Usd Type SdfValueTypeNames->Vector3f class pxr.UsdPhysics.Scene General physics simulation properties, required for simulation. Methods: CreateGravityDirectionAttr(defaultValue, ...) See GetGravityDirectionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateGravityMagnitudeAttr(defaultValue, ...) See GetGravityMagnitudeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> Scene Get classmethod Get(stage, path) -> Scene GetGravityDirectionAttr() Gravity direction vector in simulation world space. GetGravityMagnitudeAttr() Gravity acceleration magnitude in simulation world space. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateGravityDirectionAttr(defaultValue, writeSparsely) → Attribute See GetGravityDirectionAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateGravityMagnitudeAttr(defaultValue, writeSparsely) → Attribute See GetGravityMagnitudeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> Scene Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> Scene Return a UsdPhysicsScene holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsScene(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetGravityDirectionAttr() → Attribute Gravity direction vector in simulation world space. Will be normalized before use. A zero vector is a request to use the negative upAxis. Unitless. Declaration vector3f physics:gravityDirection = (0, 0, 0) C++ Type GfVec3f Usd Type SdfValueTypeNames->Vector3f GetGravityMagnitudeAttr() → Attribute Gravity acceleration magnitude in simulation world space. A negative value is a request to use a value equivalent to earth gravity regardless of the metersPerUnit scaling used by this scene. Units: distance/second/second. Declaration float physics:gravityMagnitude = -inf C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.SphericalJoint Predefined spherical joint type (Removes linear degrees of freedom, cone limit may restrict the motion in a given range.) It allows two limit values, which when equal create a circular, else an elliptic cone limit around the limit axis. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdPhysicsTokens. So to set an attribute to the value”rightHanded”, use UsdPhysicsTokens->rightHanded as the value. Methods: CreateAxisAttr(defaultValue, writeSparsely) See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateConeAngle0LimitAttr(defaultValue, ...) See GetConeAngle0LimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateConeAngle1LimitAttr(defaultValue, ...) See GetConeAngle1LimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> SphericalJoint Get classmethod Get(stage, path) -> SphericalJoint GetAxisAttr() Cone limit axis. GetConeAngle0LimitAttr() Cone limit from the primary joint axis in the local0 frame toward the next axis. GetConeAngle1LimitAttr() Cone limit from the primary joint axis in the local0 frame toward the second to next axis. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] CreateAxisAttr(defaultValue, writeSparsely) → Attribute See GetAxisAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateConeAngle0LimitAttr(defaultValue, writeSparsely) → Attribute See GetConeAngle0LimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateConeAngle1LimitAttr(defaultValue, writeSparsely) → Attribute See GetConeAngle1LimitAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> SphericalJoint Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> SphericalJoint Return a UsdPhysicsSphericalJoint holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdPhysicsSphericalJoint(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAxisAttr() → Attribute Cone limit axis. Declaration uniform token physics:axis ="X" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values X, Y, Z GetConeAngle0LimitAttr() → Attribute Cone limit from the primary joint axis in the local0 frame toward the next axis. (Next axis of X is Y, and of Z is X.) A negative value means not limited. Units: degrees. Declaration float physics:coneAngle0Limit = -1 C++ Type float Usd Type SdfValueTypeNames->Float GetConeAngle1LimitAttr() → Attribute Cone limit from the primary joint axis in the local0 frame toward the second to next axis. A negative value means not limited. Units: degrees. Declaration float physics:coneAngle1Limit = -1 C++ Type float Usd Type SdfValueTypeNames->Float static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – class pxr.UsdPhysics.Tokens Attributes: acceleration angular boundingCube boundingSphere colliders convexDecomposition convexHull distance drive drive_MultipleApplyTemplate_PhysicsDamping drive_MultipleApplyTemplate_PhysicsMaxForce drive_MultipleApplyTemplate_PhysicsStiffness drive_MultipleApplyTemplate_PhysicsTargetPosition drive_MultipleApplyTemplate_PhysicsTargetVelocity drive_MultipleApplyTemplate_PhysicsType force kilogramsPerUnit limit limit_MultipleApplyTemplate_PhysicsHigh limit_MultipleApplyTemplate_PhysicsLow linear meshSimplification none physicsAngularVelocity physicsApproximation physicsAxis physicsBody0 physicsBody1 physicsBreakForce physicsBreakTorque physicsCenterOfMass physicsCollisionEnabled physicsConeAngle0Limit physicsConeAngle1Limit physicsDensity physicsDiagonalInertia physicsDynamicFriction physicsExcludeFromArticulation physicsFilteredGroups physicsFilteredPairs physicsGravityDirection physicsGravityMagnitude physicsInvertFilteredGroups physicsJointEnabled physicsKinematicEnabled physicsLocalPos0 physicsLocalPos1 physicsLocalRot0 physicsLocalRot1 physicsLowerLimit physicsMass physicsMaxDistance physicsMergeGroup physicsMinDistance physicsPrincipalAxes physicsRestitution physicsRigidBodyEnabled physicsSimulationOwner physicsStartsAsleep physicsStaticFriction physicsUpperLimit physicsVelocity rotX rotY rotZ transX transY transZ x y z acceleration = 'acceleration' angular = 'angular' boundingCube = 'boundingCube' boundingSphere = 'boundingSphere' colliders = 'colliders' convexDecomposition = 'convexDecomposition' convexHull = 'convexHull' distance = 'distance' drive = 'drive' drive_MultipleApplyTemplate_PhysicsDamping = 'drive:__INSTANCE_NAME__:physics:damping' drive_MultipleApplyTemplate_PhysicsMaxForce = 'drive:__INSTANCE_NAME__:physics:maxForce' drive_MultipleApplyTemplate_PhysicsStiffness = 'drive:__INSTANCE_NAME__:physics:stiffness' drive_MultipleApplyTemplate_PhysicsTargetPosition = 'drive:__INSTANCE_NAME__:physics:targetPosition' drive_MultipleApplyTemplate_PhysicsTargetVelocity = 'drive:__INSTANCE_NAME__:physics:targetVelocity' drive_MultipleApplyTemplate_PhysicsType = 'drive:__INSTANCE_NAME__:physics:type' force = 'force' kilogramsPerUnit = 'kilogramsPerUnit' limit = 'limit' limit_MultipleApplyTemplate_PhysicsHigh = 'limit:__INSTANCE_NAME__:physics:high' limit_MultipleApplyTemplate_PhysicsLow = 'limit:__INSTANCE_NAME__:physics:low' linear = 'linear' meshSimplification = 'meshSimplification' none = 'none' physicsAngularVelocity = 'physics:angularVelocity' physicsApproximation = 'physics:approximation' physicsAxis = 'physics:axis' physicsBody0 = 'physics:body0' physicsBody1 = 'physics:body1' physicsBreakForce = 'physics:breakForce' physicsBreakTorque = 'physics:breakTorque' physicsCenterOfMass = 'physics:centerOfMass' physicsCollisionEnabled = 'physics:collisionEnabled' physicsConeAngle0Limit = 'physics:coneAngle0Limit' physicsConeAngle1Limit = 'physics:coneAngle1Limit' physicsDensity = 'physics:density' physicsDiagonalInertia = 'physics:diagonalInertia' physicsDynamicFriction = 'physics:dynamicFriction' physicsExcludeFromArticulation = 'physics:excludeFromArticulation' physicsFilteredGroups = 'physics:filteredGroups' physicsFilteredPairs = 'physics:filteredPairs' physicsGravityDirection = 'physics:gravityDirection' physicsGravityMagnitude = 'physics:gravityMagnitude' physicsInvertFilteredGroups = 'physics:invertFilteredGroups' physicsJointEnabled = 'physics:jointEnabled' physicsKinematicEnabled = 'physics:kinematicEnabled' physicsLocalPos0 = 'physics:localPos0' physicsLocalPos1 = 'physics:localPos1' physicsLocalRot0 = 'physics:localRot0' physicsLocalRot1 = 'physics:localRot1' physicsLowerLimit = 'physics:lowerLimit' physicsMass = 'physics:mass' physicsMaxDistance = 'physics:maxDistance' physicsMergeGroup = 'physics:mergeGroup' physicsMinDistance = 'physics:minDistance' physicsPrincipalAxes = 'physics:principalAxes' physicsRestitution = 'physics:restitution' physicsRigidBodyEnabled = 'physics:rigidBodyEnabled' physicsSimulationOwner = 'physics:simulationOwner' physicsStartsAsleep = 'physics:startsAsleep' physicsStaticFriction = 'physics:staticFriction' physicsUpperLimit = 'physics:upperLimit' physicsVelocity = 'physics:velocity' rotX = 'rotX' rotY = 'rotY' rotZ = 'rotZ' transX = 'transX' transY = 'transY' transZ = 'transZ' x = 'X' y = 'Y' z = 'Z' © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
create.md
Create a Project — Omniverse Developer Guide latest documentation Omniverse Developer Guide » Omniverse Developer Guide » Create a Project   # Create a Project Before development can begin, you must first create a new Project. There are many ways to create an Omniverse Project, and the method you choose depends on what you intend to build and how you prefer to work. Projects tend to align within distinct categories, yet there remains remarkable flexibility within each category to help you address the needs of the user. Here we will give instructions on how to begin the most common types of Projects using the Omniverse platform. ## Extensions Introduction Extensions are a common development path within Omniverse and they serve as the fundamental building blocks of Applications and Services. In effect, all user-facing elements in an Omniverse Application are created using Extensions. Extensions such as the Content Browser, Viewport and Stage elements are used by the Omniverse USD Composer and Omniverse USD Presenter Applications among many others. Extensions are persistent within Applications so long as they are configured as an application dependency or they are set to load in the Extension Manager. In creating Omniverse Extensions, multiple options are available: One powerful and flexible technique involves cloning our template from Github, which can be discovered under the Automated (Repo Tool) tab above. For a simpler route, we offer a method via the UI (Extension Manager) tab. This provides a straightforward UI workflow to create your extension in another application, such as Omniverse Code. Automated (Repo Tool) Requirements: Git, Command-Line Optional: VS Code A template for Omniverse Project development can be accessed via the following GitHub repository: Advanced Template Repository. Below we describe the procedure to create an Extension development Project using this template. Fork and/or Clone the Kit App Template repository link into a local directory using Git. The Windows/Linux command-line might resemble: From the chosen local directory: git clone https://github.com/NVIDIA-Omniverse/kit-app-template This command will generate a subfolder named kit-app-template with multiple files and folders designed to help you customize your Omniverse Project including sample Extension and Application files. Navigate to the newly created ‘kit-app-template’: cd kit-app-template optional If you have VS Code installed, you can now open the Project template in VSCode: code . Once completed, you should have a folder structure which looks like this. From either the integrated terminal in VSCode or from the command line, create a new Extension: repo template new This action will trigger a sequence of options. Make the following selections: What do you want to add : extension Choose a template : python-extension-window Enter a name: my_company.my_app.extension_name Select a version, for instance: 0.1.0 The newly created Extension is located at: kit-app-template/source/extensions/my_company.my_app.extension_name You have now created an Extension template and are ready to begin development. Additional information The ‘repo’ command is a useful tool within an Omniverse Project. This command is both configurable and customizable to suit your requirements. To review the tools accessible within any Project, enter the following command: repo -h More details on this tool can be found in the Repo Tools Documentation. If you prefer a comprehensive tutorial that guides you through Application and Extension development see the Kit App Template Tutorial. UI (Extension Manager) With the Extension Manager UI, you have the ability to quickly create an extension directly within an existing application. Step-by-step instructions on creating an extension this way are available under Getting Started with Extensions in the Kit Manual . You have now created an Extension template and are ready to begin development. ## Apps Introduction Omniverse Applications are simply a collection of Extensions. By configuring these collections, you can create high-performance, custom solutions suited to your organization’s needs without necessarily writing any code. NVIDIA develops and maintains a suite of Omniverse Applications to demonstrate what possible solutions you can create from these collections. An Omniverse Application is a .kit configuration file that instructs the Kit executable to load a predetermined set of Extensions. Either a .bat file (for Windows) or a .sh file (for Linux) is employed to launch your Application, by passing your Application .kit file to the Kit executable. Applications serve as an ideal option when you need tailor-made software with a unique layout and features. Omniverse Applications offer the flexibility to select from existing Extensions or create novel ones to add desired functionality. For inspiration, you can reference additional applications on the Omniverse Launcher. Download those which appeal to you and explore their installation folders and related .kit files. Application Template Requirements: Git, Command-Line Optional: VS Code A template for Omniverse Project development can be accessed via the following GitHub repository: Advanced Template Repository. Below we describe the procedure to create an Extension development Project using this template. Fork and/or Clone the Kit App Template repository link into a local directory using Git. The Windows/Linux command-line might resemble: From the chosen local directory: git clone https://github.com/NVIDIA-Omniverse/kit-app-template This command will generate a subfolder named kit-app-template with multiple files and folders designed to help you customize your Omniverse Project including sample Extension and Application files. Navigate to the newly created ‘kit-app-template’: cd kit-app-template optional If you have VS Code installed, you can now open the Project template in VSCode: code . Once completed, you should have a folder structure which looks like this. Navigate to /source/apps folder and examine the sample .kit files found there. You have now created an Application template and are ready to begin development and learn to manipulate your .kit files. Additional information If you prefer a comprehensive tutorial that guides you through Application and Extension development see the Kit App Template Tutorial. ## Connectors Introduction Omniverse Connectors serve as middleware, enabling communication between Omniverse and various software applications. They allow for the import and export of 3D assets, data, and models between different workflows and tools through the use of Universal Scene Description (OpenUSD) as the interchange format. Creating a Connector can be beneficial when connecting a third-party application to Omniverse, providing the ability to import, export, and synchronize 3D data via the USD format. A practical use case of this could involve generating a 3D model in Maya, then exporting it to an Omniverse Application like Omniverse USD Composer for rendering with our photo-realistic RTX or Path Tracing renderers. Connector Resources To equip you with an understanding of creating Omniverse Connectors, we’ve compiled some beneficial resources below: Video Overview Gain insight into Omniverse Connectors with this concise overview. This video helps you understand the basics of Connectors and the unique value they bring. Omniverse Connectors overview Documentation Learn about what you can create with Connectors following our samples using OpenUSD and Omniverse Client Library APIs Connect Sample Video Tutorial Learn how to connect with the Omniverse platform by syncing data to it via OpenUSD. Establish a live sync session and get an OpenUSD 101 overview to get you started. Making a Connector for Omniverse ## Services Introduction Omniverse offers a Services framework based on its foundational Kit SDK. This framework is designed to simplify the construction of Services that can leverage the capabilities of custom Extensions. Developers can choose to run their Services in various settings, such as local machines, virtual machines, or in the cloud. The framework is flexible, allowing Services to be migrated to different infrastructures easily without changing the Service’s code. The framework promotes loose coupling, with its components serving as building blocks that foster scalability and resilience. These reusable components help accelerate the development of your tools and features for databases, logging, metrics collection, and progress monitoring. Creating a Service project employs the same tools used for Extensions, with a similar development process. However, certain aspects, such as configuration and dependencies, are unique to Services. More information is available here Automated (Repo Tool) Requirements: Git, Command-Line Optional: VS Code A template for Omniverse Project development can be accessed via the following GitHub repository: Advanced Template Repository. Below we describe the procedure to create an Extension development Project using this template. Fork and/or Clone the Kit App Template repository link into a local directory using Git. The Windows/Linux command-line might resemble: From the chosen local directory: git clone https://github.com/NVIDIA-Omniverse/kit-app-template This command will generate a subfolder named kit-app-template with multiple files and folders designed to help you customize your Omniverse Project including sample Extension and Application files. Navigate to the newly created ‘kit-app-template’: cd kit-app-template optional If you have VS Code installed, you can now open the Project template in VSCode: code . Once completed, you should have a folder structure which looks like this. From either integrated terminal in VSCode or from the command line, create a new Extension: repo template new This action will trigger a sequence of options. Make the following selections: What do you want to add : extension Choose a template : python-extension-main Enter a name: my_company.my_app.extension_name Select a version, for instance: 0.1.0 The newly created Extension is located at: kit-app-template/source/extensions/my_company.my_app.extension_name You have now created an Extension template and are ready to begin development of your Service. Additional information The ‘repo’ command is a useful tool within an Omniverse Project. This command is both configurable and customizable to suit your requirements. To review the tools accessible within any Project, enter the following command: repo -h More details on this tool can be found in the Repo Tools Documentation. If you prefer a comprehensive tutorial that guides you through Application and Extension development see the Kit App Template Tutorial. UI (Extension Manager) With the Extension Manager UI, you have the ability to quickly create an extension directly within an existing application. Step-by-step instructions on creating an extension this way are available under Getting Started with Extensions in the Kit Manual . You have now created an Extension template and are ready to begin development of your Service. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.SliderDrawMode.md
SliderDrawMode — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » SliderDrawMode   # SliderDrawMode class omni.ui.SliderDrawMode Bases: pybind11_object Members: FILLED HANDLE DRAG Methods __init__(self, value) Attributes DRAG FILLED HANDLE name value __init__(self: omni.ui._ui.SliderDrawMode, value: int) → None property name © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
ui.md
Omni Asset Validator (UI) — asset-validator 0.6.2 documentation asset-validator » Omni Asset Validator (UI)   # Omni Asset Validator (UI) Kit UIs for validating assets against Omniverse specific rules to ensure they run smoothly across Omniverse products. It includes the following components: An Asset Validator Window to select rules and run validation on individual USD layer files, recursively search a folder for layer files and validate them all, or validate a live / in-memory Usd.Stage, such as the main stage in OV Create or other USD based applications. Content Browser context menus to launch the Asset Validator Window preset to the selected file/folder. Layer Window context menus to launch the Asset Validator Window preset to either the in-memory layer or the selected layer’s file URI. Stage Window context menus to launch the Asset Validator Window preset to the currently open stage (e.g the main stage of the application). ## Launching the Asset Validator Window In the main menu of any Kit based application (e.g. Create, View) you will find a Window > Asset Validator submenu. Click this menu item to open or close the Asset Validator Window. The window state will be preserved, so do not worry about losing your settings. For other ways to launch the Asset Validator Window, see Launching from other Windows. # Option Description 1 Asset Mode Selector Switches between URI Mode and Stage Mode. See Choosing your Asset Mode for more details. 2 Asset Description Describes the selected Asset. In URI Mode this should be the fully qualified URI. In Stage Mode it will be an automated message. 3 Asset URI Browser Button Click the button to launch a File Picker and select any USD layer or folder. Only available in URI Mode. 4 Enable/Disable Rules Buttons These buttons toggle all Rules or the Rules within each category. 5 Rule Checkboxes These checkboxes will enable/disable individual Rules. 6 Rule Labels Hover on the labels to reveal a tooltip description for each Rule. 7 Analyze Asset Validation Button Click this to analyze the current asset with the enabled Rules. 8 Fix errors on Selected Click this to run the validation using the current Asset & enabled Rules. 9 Clear Results Clears out the information produced when analyzing or fixing errors. ## Choosing your Asset Mode The Asset Validator Window operates in 2 distinct modes, called Asset Modes. URI Mode operates on an Omniverse URI, including files & folders on you local disk, networked drives, nucleus servers, or any other protocol supported by Omniverse (e.g. https). Stage Mode operates on a live / in-memory Usd.Stage. This can be the main stage of an Omniverse application like Create or View, or any other stage in memory within the application (e.g. a bespoke stage authored in the Script Editor). Once the window has been launched, you can freely switch between these modes using the dropdown menu at the top left corner. Your asset and rule selections will be preserved when you switch modes, so do not worry about losing your place. By default, the window opens in URI Mode (1): To locate an Asset URI, use the Asset URI Browser Button (2) or paste a link into the Asset Description (3). In this mode, the description must be the fully qualified URI of the Asset (e.g. omniverse://localhost/NVIDIA/Samples/Astronaut/Astronaut.usd). Alternatively, you can switch to Stage Mode (1), which is preset to validate the main stage of the application (2): Caution Using Stage Mode on the main stage is a live operation that will temporarily alter the main stage. Any edits will occur on a bespoke session sublayer, which requires switching the authoring layer temporarily. It will not alter your actual layers, so you don’t need to save or lock the layers first, and the authoring layer will be restored when the validation completes. ## Validating the selected Asset Regardless of which Asset Mode you have chosen, you will be presented with a list of pre-defined validation rules, organized by category, which has been configured based on the extensions you have loaded and the particular app you are running. If you would like to configure this further, see the section below called Configuring Rules with Carbonite Settings. ### Enabling and Disabling Rules You are free to enable/disable any of the individual rules using the checkboxes (1), or you may use the Enable/Disable Rules Buttons (2) to do this in-bulk or per-category. If you want to reset the rules to their default state, use the Reset Default Rules Button (3). Tip While the rule names may seem a bit cryptic, the tooltips help to explain the reasoning behind each rule. ### Running the Validator When you are ready, press the “Analyze Asset Validation” button at the bottom of the window (1): Caution There may be a brief pause while the system contacts the appropriate server, particularly if you have not interacted with this file or folder recently. The Asset Validator Window will now advance to an in-progress results listing of individual assets. This may initially be a blank page, but as each asset is located by the Omni Client Library, a new section will appear with a grey Waiting status. Tip These sections are clickable and will expand to show you more details. ### Reviewing Results As validation of each asset completes, the relevant section will update to one of the following statuses: Valid : Assets that pass all rules without issue will be blue with a check-mark icon. Failure : Assets that failed or errored on any of the validation rules will be marked in red. Warning : Assets that generated no failures may have still generated warnings and will be marked in yellow. Regardless of status, you can hover on the section header for a quick summary (1): Or click the section header for detailed reports of each issue (1). There may be many issues, as some rules run per-prim-per-variant: #### Copying Issues To generate a report we have added a simple functionality of Copy Output. Just select the issues or assets you are interested and click on the (1) Copy Output button. This will put in your clipboard the contents of the selected issues in a human readable format. You can also (2) Save Outputto a .csv file. #### Fixing Issues Asset validation includes new functionality to fix issues. Issues that have suggestions can make use of Fix errors on Selected. Just select the issue(s) you are interested to fix and select the corresponding action. Fix errors on Selected will perform the fix. Once the scene is fixed, you can save your changes by saving the scene. Some issues may offer multiple locations to fix (ComboBox at At). Asset validation would offer a default option, but you can choose the one that suits you better. Note Repeated validation of the same asset will be substantially quicker. Any interaction with servers should be cached and the stage itself may still be in-memory. ## Launching from other Windows ### Using the Content Browser You may have already located your USD layer file or folder in the Content Browser. For convenience, you can right click on any USD layer file and select “Validate USD” from the context menu: Doing the same on a folder will provide a context menu entry called “Search for USD files and Validate”: Clicking either of these will not run a validation directly, it will instead launch the Asset Validator Window, preset to URI Mode and pointing to the file or folder that you just specified in the Content Browser. ### Using the Layer Window If you want to validate layers that you already have open, begin in the Layer Window. Right clicking on any layer (except session layers) will provide related context menus. Clicking any of the related menu entires will not run a validation directly, but will instead launch the Asset Validator Window, preset to either URI Mode or Stage Mode, and pointing to the asset you requested to validate. Layers will provide either “Validate Layer (w/unsaved changes)” (1) or “Validate Layer (in-memory)” entires, depending if there are currently unsaved changes to the layer. Both of these “live” options will operate in Stage Mode, on a bespoke stage containing only that layer and its sublayers: Important Any edits will occur on a session sublayer, so neither option will save or alter the layer you have selected. You don’t need to lock the layer first. Layers that are associated with a file (i.e are not anonymous) will also provide an entry called “Validate Layer (from file)”. Use this entry to operate in URI Mode on the file, ignoring any changes you have made in the application: ### Using the Stage Window If you want to validate the application’s main stage (i.e. the entire layer stack), begin in the Stage Window. Right clicking on the empty space (with no prims selected) will provide a context menu entry called “Validate Stage” (1): Clicking this will not run a validation directly, it will instead launch the Asset Validator Window, preset to Stage Mode and pointing to the same live Usd.Stage that you are currently authoring: Caution This is a live operation that will temporarily alter the main stage. Any edits will occur on a bespoke session sublayer, which requires switching the authoring layer temporarily. It will not alter your actual layers, so you don’t need to save or lock the layers first, and the authoring layer will be restored when the validation completes. ## Configuring Rules with Carbonite Settings As with many Omniverse tools, the Asset Validator Window is configurable at runtime using Carbonite settings. The following Asset Validator Window settings work in concert with the omni.asset_validator.core settings to hide rules that may not be of use in a particular app, company, or team. Any rules hidden from the UI via these settings will not be used during validation runs initiated from the Asset Validator Window nor the omni.asset_validator.ui Python API. ### Settings hideDisabledCategories can be used to exclude rules in the UI based on the enabledCategories/disabledCategories settings in omni.asset_validator.core hideDisabledRules can be used to exclude rules in the UI based on the enabledRules/disabledRules settings in omni.asset_validator.core ## API and Changelog We provide a public Python API for controlling the Asset Validation Window. Client code is able to: Show and hide the window. Change Asset Mode and set the selected URI or Stage (including bespoke in-memory stages authored at runtime by the client). Enable and disable individual rules (e.g. click the checkboxes). Initiate validation runs (e.g. click the run button) and await the results. Results will be both displayed in the UI and returned by the coroutine. Reset the window back to the selection page (e.g. click the back button) or reset to the default state. Python API Changelog © Copyright 2021-2023, NVIDIA. Last updated on Jun 20, 2023.
omni.ui.FreeCircle.md
FreeCircle — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » FreeCircle   # FreeCircle class omni.ui.FreeCircle Bases: Circle The Circle widget provides a colored circle to display. The free widget is the widget that is independent of the layout. It means it is stuck to other widgets. When initializing, it’s necessary to provide two widgets, and the shape is drawn from one widget position to the another. Methods __init__(self, arg0, arg1, **kwargs) Initialize the shape with bounds limited to the positions of the given widgets. Attributes __init__(self: omni.ui._ui.FreeCircle, arg0: omni.ui._ui.Widget, arg1: omni.ui._ui.Widget, **kwargs) → None Initialize the shape with bounds limited to the positions of the given widgets. ### Arguments: `start :`The bound corner is in the center of this given widget. `end :`The bound corner is in the center of this given widget. `kwargsdict`See below ### Keyword Arguments: `alignment :`This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered. `radius :`This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0. `arc :`This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered. `size_policy :`Define what happens when the source image has a different size than the item. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
linux-troubleshooting.md
Linux Troubleshooting — Omniverse Developer Guide latest documentation Omniverse Developer Guide » Omniverse Developer Guide » Linux Troubleshooting   # Linux Troubleshooting Instructions for resolving issues when running Omniverse-kit or Omniverse-Create on Linux. ## Q1) How to install a driver. Always install .run executable driver files. e.g. downloaded from: https://www.nvidia.com/Download/Find.aspx Do NOT install PPA drivers. PPA drivers are packaged with Linux distribution, and installed with add-apt or Software & Updates. These drivers are not easy to uninstall or clean up. It requires purging them and cleaning up Vulkan ICD files manually. Driver installation steps: Go to TTYs mode (CRL + ALT + F3), or use systemctl approach. Uninstall all previous drivers: sudo nvidia-uninstall The following clean-up steps are only required if you have leftovers from PPA drivers: sudo apt-get remove --purge nvidia-* sudo apt autoremove sudo apt autoclean Reboot your machine and then go to TTYs mode from the login screen: sudo chmod +x NVIDIA-Linux-x86_64-460.67.run sudo ./NVIDIA-Linux-x86_64-460.67.run If the kernel could not be compiled, make sure to download headers and image files related to your Linux kernel before the driver installation. Ignore errors related to missing 32-bit libraries, and build any missing library if it required a confirmation. Driver installation over SSH on remote machines: Stop X, install the driver with NVIDIA driver installer, and restart X. On Ubuntu 18.04 to stop X, run the following command, then wait a bit, and ensure X is not running. e.g.: run ps auxfw and verify no X or Window manager process is running. sudo systemctl isolate multi-user.target To restart X, run: sudo systemctl isolate graphical.target Installing a driver on a system with HP Anyware already configured should work just the same. Installing HP Anyware however requires following their instructions the first time around, before installing the NVIDIA driver. ## Q2) Omniverse kit logs only listed one of my GPUs, but nvidia-smi shows multiple GPUs. How to support enumeration of multiple GPUs in Vulkan xserver-xorg-core 1.20.7 or newer is required for multi-GPU systems. Otherwise, Vulkan applications cannot see multiple GPUs. Ubuntu 20.04 ships with Xorg 1.20.8 by default. Ubuntu 20 is known to work, but not exhaustively tested by Omniverse QA Ubuntu 16 is not supported. How to update xorg: Update Ubuntu 18.04.x LTS through software update to the latest Ubuntu 18.04.5 LTS. Install LTS Enablement Stacks to upgrade xorg: https://wiki.ubuntu.com/Kernel/LTSEnablementStack ## Q3) How to verify a correct Vulkan setup with vulkaninfo or vulkaninfoSDK utility Download the latest Vulkan SDK tar.gz from https://vulkan.lunarg.com/sdk/home and unzip it. Do NOT install Vulkan SDK through apt-install, unless you know what exact version Omniverse supports and you need validation layers for debugging (refer to readme.md). Just simply download the zip file. Execute the following utility from the unzipped pack. bin/vulkaninfo It should enumerate all the GPUs. If it failed, your driver or the required xorg is not installed properly. Do NOT install vulkan-utils or other MESA tools to fix your driver, as they might install old incompatible validation layers. nvidia-smi GPU table is unrelated to the list of GPUs that Vulkan driver reports. ## Q4) I have a single GPU, but I see multiple GPUs of the same type reported in Omniverse kit logs. You likely have leftover components from other PPA drivers in addition to the one you installed from the .run driver packages. You can confirm this by checking that vulkaninfo only shows a single GPU. These extra ICD files should be cleaned up. These extra files will not affect the output of nvidia-smi, as it is a Vulkan driver issue. Steps to clean up duplicate ICD files: If you see both of the following folders have some json files, such as nvidia_icd.json, then delete the duplicate icd.d folder from /usr/share/vulkan/ path. "/etc/vulkan/icd.d": Location of ICDs installed from non-Linux-distribution-provided packages "/usr/share/vulkan/icd.d": Location of ICDs installed from Linux-distribution-provided packages Run vulkaninfo to verify the fix, instead of nvidia-smi. ## Q5) Startup failure with: VkResult: ERROR_DEVICE_LOST A startup device lost is typically a system setup bug. Potential bugs: A bad driver installation. Uninstall and re-install it. Driver bugs prior to the 460.67 driver when you have different GPU models. e.g. Turing + Ampere GPUs. Solution: Install driver 460.67 or higher, which has the bug fix. Workaround on older drivers: Remove non-RTX cards, and re-install the driver after removing any GPU. This issue has been known to crash other raytracing applications. However, regular raster vulkan applications won’t be affected. If you have multiple GPUs, --/renderer/activeGpu=1 setting cannot change this behavior. Old Shader caches are left in the folder Delete the contents of folder /home/USERNAME/.cache/ov/Kit/101.0/rendering It is known with omniverse-kit SDK packages that are not built from the source, or not using the omniverse installer to remove the caches. ## Q6) Startup failure with: GLFW initialization failed This is a driver or display issue: A physical display must be connected to your GPU, unless you are running kit/Create headless with --no-window for streaming. No visual rendering can happen on the X11 window without a display and presentable swapchain. Test the display setup with the following command. echo $DISPLAY If nothing is returned, set the environment. Set the display environment as following persistently export DISPLAY=:0.0 Reboot upon completion. echo $DISPLAY to verify again after the reboot. Re-install the driver if above steps did not help. ## Q7) Startup failure with: Failed to find a graphics and/or presenting queue. Your GPU is not connected to a physical display. Required, except when running Kit/Create headless in --no-windows mode Your GPU is connected to a physical display, however, it is not set as the default GPU in xorg for Ubuntu’s GUI rendering: Choose what GPU to use for both Ubuntu UI and Omniverse rendering to present the output to the screen. Set its busid as follows and reboot: sudo nvidia-xconfig --busid PCI:103:0:0 busid is in decimal format, taken from NVIDIA X Server Settings Connect the physical display to that GPU and boot up. If you have multiple GPUs, --/renderer/activeGpu=1 setting cannot change what GPU to run on. busid must be set in the xorg config, and then activeGpu should be set to the same device if it is not zero. NVIDIA Colossus involves a lot more work. Refer to Issac setup. ## Q8) Startup failure for carb::glinterop with X Error of failed request:  GLXBadFBConfig OpenGL Interop support is optional for RTX renderer in the latest build, and is only needed for Storm renderer. However, such failures typically reveals other system setup issues that might also affect Vulkan applications. A few potential issues: Unsupported driver or hardware. Currently, OpenGL 4.6 is the minimum required. Uninstall OpenGL utilities such as Mesa-utils and re-install your NVIDIA driver. ## Q9) How to specify what GPUs to run Omniverse apps on Single-GPU mode: Follow Q8 instructions to set the desired main GPU for presentation, and then set index of that GPU with the following option during launch if it is not zero. --/renderer/activeGpu=1 Multi-GPU mode: Follow Q8 instructions and then set indices of the desired GPUs with the following option during launch. The first device in the list performs the presentation and should be set in Xorg config. --/renderer/multiGpu/activeGpus='1,2' Note Always verify that your desired GPUs are set as Active with a “Yes” in the GPU table of omniverse .log file under [gpu.foundation]. GPU index in above options are from this table and not from nvidia-smi. CUDA_VISIBLE_DEVICES and other CUDA commands cannot change what GPUs to run on for Vulkan applications. ## Q10) Viewport is gray and nothing is rendered. This means that RTX renderer has failed and the reason of the failure will be printed in the full .log file as errors, such as an unsupported driver, hardware or etc. The log file is typically located at /home/USERNAME/**/logs/**/*.log ## Q11) Getting many failures similar to: Failed to create change watch for xxx: errno=28, No space left on device This is a file change watcher limitation on Linux which is usually set to 8k. Either close other applications that use watchers, or increase max_user_watches to 512k. Note that this will increase your system RAM usage. ### To view the current watcher limit: cat /proc/sys/fs/inotify/max_user_watches ### To update the watcher limit: Edit /etc/sysctl.conf and add fs.inotify.max_user_watches=524288 line. Load the new value: sudo sysctl -p You may follow the full instructions listed for Visual Studio Code Watcher limit ## Q12) How to increase the file descriptor limit on Linux to render on more than 2 GPUs If you are rendering with multiple GPUs, file descriptor limit is required to be increased. The default limit is 1024, but we recommend a higher value, like 65535, for systems with more than 2 GPUs. Without that, Omniverse applications will fail during the creation of shared resources, such as Vulkan fences, and will lead to crash at startup. ### To increase the file descriptor limit Modify /etc/systemd/user.conf and /etc/systemd/system.conf with the following line. This takes care of graphical login: DefaultLimitNOFILE=65535 Modify /etc/security/limits.conf with the following lines. This takes care of non-GUI console login: hard nofile 65535 soft nofile 65535 Reboot your computer for changes to take effect. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
omni.ui.VGrid.md
VGrid — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » VGrid   # VGrid class omni.ui.VGrid Bases: Grid Shortcut for Grid{eTopToBottom}. The grid grows from top to bottom with the widgets placed. Methods __init__(self, **kwargs) Construct a grid that grows from top to bottom with the widgets placed. Attributes __init__(self: omni.ui._ui.VGrid, **kwargs) → None Construct a grid that grows from top to bottom with the widgets placed. `kwargsdict`See below ### Keyword Arguments: `column_width`The width of the column. It’s only possible to set it if the grid is vertical. Once it’s set, the column count depends on the size of the widget. `row_height`The height of the row. It’s only possible to set it if the grid is horizontal. Once it’s set, the row count depends on the size of the widget. `column_count`The number of columns. It’s only possible to set it if the grid is vertical. Once it’s set, the column width depends on the widget size. `row_count`The number of rows. It’s only possible to set it if the grid is horizontal. Once it’s set, the row height depends on the widget size. `direction`This type is used to determine the direction of the layout. If the Stack’s orientation is eLeftToRight the widgets are placed in a horizontal row, from left to right. If the Stack’s orientation is eRightToLeft the widgets are placed in a horizontal row, from right to left. If the Stack’s orientation is eTopToBottom, the widgets are placed in a vertical column, from top to bottom. If the Stack’s orientation is eBottomToTop, the widgets are placed in a vertical column, from bottom to top. If the Stack’s orientation is eBackToFront, the widgets are placed sorted in a Z-order in top right corner. If the Stack’s orientation is eFrontToBack, the widgets are placed sorted in a Z-order in top right corner, the first widget goes to front. `content_clipping`Determines if the child widgets should be clipped by the rectangle of this Stack. `spacing`Sets a non-stretchable space in pixels between child items of this layout. `send_mouse_events_to_back`When children of a Z-based stack overlap mouse events are normally sent to the topmost one. Setting this property true will invert that behavior, sending mouse events to the bottom-most child. `widthui.Length`This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. `heightui.Length`This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. `namestr`The name of the widget that user can set. `style_type_name_overridestr`By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. `identifierstr`An optional identifier of the widget we can use to refer to it in queries. `visiblebool`This property holds whether the widget is visible. `visibleMinfloat`If the current zoom factor and DPI is less than this value, the widget is not visible. `visibleMaxfloat`If the current zoom factor and DPI is bigger than this value, the widget is not visible. `tooltipstr`Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style `tooltip_fnCallable`Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. `tooltip_offset_xfloat`Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `tooltip_offset_yfloat`Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. `enabledbool`This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. `selectedbool`This property holds a flag that specifies the widget has to use eSelected state of the style. `checkedbool`This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. `draggingbool`This property holds if the widget is being dragged. `opaque_for_mouse_eventsbool`If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either `skip_draw_when_clippedbool`The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. `mouse_moved_fnCallable`Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) `mouse_pressed_fnCallable`Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. `mouse_released_fnCallable`Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_double_clicked_fnCallable`Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) `mouse_wheel_fnCallable`Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) `mouse_hovered_fnCallable`Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) `drag_fnCallable`Specify that this Widget is draggable, and set the callback that is attached to the drag operation. `accept_drop_fnCallable`Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. `drop_fnCallable`Specify that this Widget accepts drops and set the callback to the drop operation. `computed_content_size_changed_fnCallable`Called when the size of the widget is changed. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.SimpleStringModel.md
SimpleStringModel — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » SimpleStringModel   # SimpleStringModel class omni.ui.SimpleStringModel Bases: AbstractValueModel A very simple value model that holds a single string. Methods __init__(self[, defaultValue]) Attributes __init__(self: omni.ui._ui.SimpleStringModel, defaultValue: str = '') → None © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.MenuDelegate.md
MenuDelegate — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » MenuDelegate   # MenuDelegate class omni.ui.MenuDelegate Bases: pybind11_object MenuDelegate is used to generate widgets that represent the menu item. Methods __init__(self, **kwargs) Constructor. build_item(self, item) This method must be reimplemented to generate custom item. build_status(self, item) This method must be reimplemented to generate custom widgets on the bottom of the window. build_title(self, item) This method must be reimplemented to generate custom title. call_on_build_item_fn(self, arg0) Called to create a new item. call_on_build_status_fn(self, arg0) Called to create a new widget on the bottom of the window. call_on_build_title_fn(self, arg0) Called to create a new title. has_on_build_item_fn(self) Called to create a new item. has_on_build_status_fn(self) Called to create a new widget on the bottom of the window. has_on_build_title_fn(self) Called to create a new title. set_default_delegate(delegate) Set the default delegate to use it when the item doesn't have a delegate. set_on_build_item_fn(self, fn, None]) Called to create a new item. set_on_build_status_fn(self, fn, None]) Called to create a new widget on the bottom of the window. set_on_build_title_fn(self, fn, None]) Called to create a new title. Attributes propagate __init__(self: omni.ui._ui.MenuDelegate, **kwargs) → None Constructor. `kwargsdict`See below ### Keyword Arguments: `on_build_item`Called to create a new item. `on_build_title`Called to create a new title. `on_build_status`Called to create a new widget on the bottom of the window. `propagate`Determine if Menu children should use this delegate when they don’t have the own one. build_item(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) → None This method must be reimplemented to generate custom item. build_status(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) → None This method must be reimplemented to generate custom widgets on the bottom of the window. build_title(self: omni.ui._ui.MenuDelegate, item: omni::ui::MenuHelper) → None This method must be reimplemented to generate custom title. call_on_build_item_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper) → None Called to create a new item. call_on_build_status_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper) → None Called to create a new widget on the bottom of the window. call_on_build_title_fn(self: omni.ui._ui.MenuDelegate, arg0: omni::ui::MenuHelper) → None Called to create a new title. has_on_build_item_fn(self: omni.ui._ui.MenuDelegate) → bool Called to create a new item. has_on_build_status_fn(self: omni.ui._ui.MenuDelegate) → bool Called to create a new widget on the bottom of the window. has_on_build_title_fn(self: omni.ui._ui.MenuDelegate) → bool Called to create a new title. static set_default_delegate(delegate: MenuDelegate) → None Set the default delegate to use it when the item doesn’t have a delegate. set_on_build_item_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None Called to create a new item. set_on_build_status_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None Called to create a new widget on the bottom of the window. set_on_build_title_fn(self: omni.ui._ui.MenuDelegate, fn: Callable[[omni::ui::MenuHelper], None]) → None Called to create a new title. © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
1_9_8.md
1.9.8 — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Release Notes » 1.9.8   # 1.9.8 Release Date: Nov 2023 ## Added Featured Collections section added to the Exchange tab. Collection Side Nav expanded by default in Exchange tab. Pass proxy settings to launched applications with OMNI_PROXY_SERVER environment variable. Add custom UI for Omniverse Hub app. Add window titles for News and Learn tabs. Block user navigation on the Nucleus tab if Navigator tasks are active. Support displaying server notifications until a specific date. Support sending server notifications for specific platforms or Launcher versions. Add splash notifications displayed as a modal dialog. ## Changed Update Nucleus Navigator to 3.3.3. Updated the UI for collection menu on the Exchange tab. Updated the suggestion for installing the default Omniverse application. Updated IT Managed Web Launcher Documentation tab to be a link to online omniverse documentation. Changed the default page to Library for IT Managed Launcher. Updated the look for featured collections. Updated the look for the side menu on the Exchange tab (only display categories). ## Fixed Display an error when user tries to delete version that is not installed. Fixed an issue that displayed an Update button for installed connectors and apps in IT Managed Launcher. Fixed an issue where “New” badges were displayed incorrectly for IT Managed Launcher. Fixed displaying duplicate connectors after installing with IT Managed Launcher. Fixed displaying a spinner for connectors page in IT Managed Launcher. Fixed displaying applications and connectors on the Library tab after calling omniverse-launcher://uninstall command. Fixed an issue when uninstall notification was not shown if triggered by omniverse-launcher://uninstall command. Fixed an issue where filtering content by collections that do not exist could crash the application. Fixed an issue where tags were not displayed for components on the Exchange tab. Fixed displaying regular notifications instead of errors if installer returned an empty error message. Fixed displaying Cache installation suggestion in IT Managed Launcher. Fixed an issue with webview links not opening in a browser window. Fixed an issue where IT Managed Launcher didn’t work without internet connection. Fixed an issue where custom protocol commands args were persisted to Linux .desktop files. Fixed an issue where Collaboration packages were not displayed on the Enterprise portal. Disable bringing IT Managed Launcher in front of other apps when custom protocol commands are used. Fixed issues with focusing input elements inside modal dialogs. Fixed an issue where login result page opened Launcher or brought it in front of other applications. Fixed opening Nucleus settings from the menu on the Nucleus tab. Fixed incorrect coloring for the beta banner. Fixed an issue where buttons and pagination controls could be scrolled in the version dialog. Fixed an issue where autostart registry keys were kept after uninstall. Fixed the color for the name displayed in the channel dropdown. Fixed an issue where Launcher API wasn’t hosted on 127.0.0.1. Fixed an issue where users could not close modal dialogs. Fixed an issue where the beta overlay was displayed compressed sometimes. Fixed an issue where UI and Navigator logs were not being saved to a log file. Fixed an issue blocking custom protocol commands on Ubuntu. Use 127.0.0.1 address for registering new account during Nucleus installation. ## Security Fix for CVE-2023-5217 Fix for CVE-2023-4863 Fix for CVE-2023-44270 © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
Ar.md
Ar module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » Ar module   # Ar module Summary: The Ar (Asset Resolution) library is responsible for querying, reading, and writing asset data. Classes: DefaultResolver Default asset resolution implementation used when no plugin implementation is provided. DefaultResolverContext Resolver context object that specifies a search path to use during asset resolution. Notice ResolvedPath Represents a resolved asset path. Resolver Interface for the asset resolution system. ResolverContext An asset resolver context allows clients to provide additional data to the resolver for use during resolution. ResolverContextBinder Helper object for managing the binding and unbinding of ArResolverContext objects with the asset resolver. ResolverScopedCache Helper object for managing asset resolver cache scopes. Timestamp Represents a timestamp for an asset. class pxr.Ar.DefaultResolver Default asset resolution implementation used when no plugin implementation is provided. In order to resolve assets specified by relative paths, this resolver implements a simple”search path”scheme. The resolver will anchor the relative path to a series of directories and return the first absolute path where the asset exists. The first directory will always be the current working directory. The resolver will then examine the directories specified via the following mechanisms (in order): The currently-bound ArDefaultResolverContext for the calling thread ArDefaultResolver::SetDefaultSearchPath The environment variable PXR_AR_DEFAULT_SEARCH_PATH. This is expected to be a list of directories delimited by the platform’s standard path separator. ArDefaultResolver supports creating an ArDefaultResolverContext via ArResolver::CreateContextFromString by passing a list of directories delimited by the platform’s standard path separator. Methods: SetDefaultSearchPath classmethod SetDefaultSearchPath(searchPath) -> None static SetDefaultSearchPath() classmethod SetDefaultSearchPath(searchPath) -> None Set the default search path that will be used during asset resolution. This must be called before the first call to ArGetResolver. The specified paths will be searched in addition to, and before paths specified via the environment variable PXR_AR_DEFAULT_SEARCH_PATH Parameters searchPath (list[str]) – class pxr.Ar.DefaultResolverContext Resolver context object that specifies a search path to use during asset resolution. This object is intended for use with the default ArDefaultResolver asset resolution implementation; see documentation for that class for more details on the search path resolution algorithm. Example usage: ArDefaultResolverContext ctx({"/Local/Models", "/Installed/Models"}); { // Bind the context object: ArResolverContextBinder binder(ctx); // While the context is bound, all calls to ArResolver::Resolve // (assuming ArDefaultResolver is the underlying implementation being // used) will include the specified paths during resolution. std::string resolvedPath = resolver.Resolve("ModelName/File.txt") } // Once the context is no longer bound (due to the ArResolverContextBinder // going out of scope), its search path no longer factors into asset // resolution. Methods: GetSearchPath() Return this context's search path. GetSearchPath() → list[str] Return this context’s search path. class pxr.Ar.Notice Classes: ResolverChanged ResolverNotice class ResolverChanged Methods: AffectsContext AffectsContext() class ResolverNotice class pxr.Ar.ResolvedPath Represents a resolved asset path. Methods: GetPathString() Return the resolved path held by this object as a string. GetPathString() → str Return the resolved path held by this object as a string. class pxr.Ar.Resolver Interface for the asset resolution system. An asset resolver is responsible for resolving asset information (including the asset’s physical path) from a logical path. See ar_implementing_resolver for information on how to customize asset resolution behavior by implementing a subclass of ArResolver. Clients may use ArGetResolver to access the configured asset resolver. Methods: CanWriteAssetToPath(resolvedPath, whyNot) Returns true if an asset may be written to the given resolvedPath , false otherwise. CreateContextFromString(contextStr) Return an ArResolverContext created from the primary ArResolver implementation using the given contextStr . CreateContextFromStrings(contextStrs) Return an ArResolverContext created by combining the ArResolverContext objects created from the given contextStrs . CreateDefaultContext() Return an ArResolverContext that may be bound to this resolver to resolve assets when no other context is explicitly specified. CreateDefaultContextForAsset(assetPath) Return an ArResolverContext that may be bound to this resolver to resolve the asset located at assetPath or referenced by that asset when no other context is explicitly specified. CreateIdentifier(assetPath, anchorAssetPath) Returns an identifier for the asset specified by assetPath . CreateIdentifierForNewAsset(assetPath, ...) Returns an identifier for a new asset specified by assetPath . GetAssetInfo(assetPath, resolvedPath) Returns an ArAssetInfo populated with additional metadata (if any) about the asset at the given assetPath . GetCurrentContext() Returns the asset resolver context currently bound in this thread. GetExtension(assetPath) Returns the file extension for the given assetPath . GetModificationTimestamp(assetPath, resolvedPath) Returns an ArTimestamp representing the last time the asset at assetPath was modified. IsContextDependentPath(assetPath) Returns true if assetPath is a context-dependent path, false otherwise. RefreshContext(context) Refresh any caches associated with the given context. Resolve(assetPath) Returns the resolved path for the asset identified by the given assetPath if it exists. ResolveForNewAsset(assetPath) Returns the resolved path for the given assetPath that may be used to create a new asset. CanWriteAssetToPath(resolvedPath, whyNot) → bool Returns true if an asset may be written to the given resolvedPath , false otherwise. If this function returns false and whyNot is not nullptr , it may be filled with an explanation. Parameters resolvedPath (ResolvedPath) – whyNot (str) – CreateContextFromString(contextStr) → ResolverContext Return an ArResolverContext created from the primary ArResolver implementation using the given contextStr . Parameters contextStr (str) – CreateContextFromString(uriScheme, contextStr) -> ResolverContext Return an ArResolverContext created from the ArResolver registered for the given uriScheme using the given contextStr . An empty uriScheme indicates the primary resolver and is equivalent to CreateContextFromString(string). If no resolver is registered for uriScheme , returns an empty ArResolverContext. Parameters uriScheme (str) – contextStr (str) – CreateContextFromStrings(contextStrs) → ResolverContext Return an ArResolverContext created by combining the ArResolverContext objects created from the given contextStrs . contextStrs is a list of pairs of strings. The first element in the pair is the URI scheme for the ArResolver that will be used to create the ArResolverContext from the second element in the pair. An empty URI scheme indicates the primary resolver. For example: ArResolverContext ctx = ArGetResolver().CreateContextFromStrings( { {"", "context str 1"}, {"my_scheme", "context str 2"} }); This will use the primary resolver to create an ArResolverContext using the string”context str 1”and use the resolver registered for the”my_scheme”URI scheme to create an ArResolverContext using”context str 2”. These contexts will be combined into a single ArResolverContext and returned. If no resolver is registered for a URI scheme in an entry in contextStrs , that entry will be ignored. Parameters contextStrs (list[tuple[str, str]]) – CreateDefaultContext() → ResolverContext Return an ArResolverContext that may be bound to this resolver to resolve assets when no other context is explicitly specified. The returned ArResolverContext will contain the default context returned by the primary resolver and all URI resolvers. CreateDefaultContextForAsset(assetPath) → ResolverContext Return an ArResolverContext that may be bound to this resolver to resolve the asset located at assetPath or referenced by that asset when no other context is explicitly specified. The returned ArResolverContext will contain the default context for assetPath returned by the primary resolver and all URI resolvers. Parameters assetPath (str) – CreateIdentifier(assetPath, anchorAssetPath) → str Returns an identifier for the asset specified by assetPath . If anchorAssetPath is not empty, it is the resolved asset path that assetPath should be anchored to if it is a relative path. Parameters assetPath (str) – anchorAssetPath (ResolvedPath) – CreateIdentifierForNewAsset(assetPath, anchorAssetPath) → str Returns an identifier for a new asset specified by assetPath . If anchorAssetPath is not empty, it is the resolved asset path that assetPath should be anchored to if it is a relative path. Parameters assetPath (str) – anchorAssetPath (ResolvedPath) – GetAssetInfo(assetPath, resolvedPath) → ArAssetInfo Returns an ArAssetInfo populated with additional metadata (if any) about the asset at the given assetPath . resolvedPath is the resolved path computed for the given assetPath . Parameters assetPath (str) – resolvedPath (ResolvedPath) – GetCurrentContext() → ResolverContext Returns the asset resolver context currently bound in this thread. ArResolver::BindContext, ArResolver::UnbindContext GetExtension(assetPath) → str Returns the file extension for the given assetPath . The returned extension does not include a”.”at the beginning. Parameters assetPath (str) – GetModificationTimestamp(assetPath, resolvedPath) → Timestamp Returns an ArTimestamp representing the last time the asset at assetPath was modified. resolvedPath is the resolved path computed for the given assetPath . If a timestamp cannot be retrieved, return an invalid ArTimestamp. Parameters assetPath (str) – resolvedPath (ResolvedPath) – IsContextDependentPath(assetPath) → bool Returns true if assetPath is a context-dependent path, false otherwise. A context-dependent path may result in different resolved paths depending on what asset resolver context is bound when Resolve is called. Assets located at the same context-dependent path may not be the same since those assets may have been loaded from different resolved paths. In this case, the assets’resolved paths must be consulted to determine if they are the same. Parameters assetPath (str) – RefreshContext(context) → None Refresh any caches associated with the given context. If doing so would invalidate asset paths that had previously been resolved, an ArNotice::ResolverChanged notice will be sent to inform clients of this. Parameters context (ResolverContext) – Resolve(assetPath) → ResolvedPath Returns the resolved path for the asset identified by the given assetPath if it exists. If the asset does not exist, returns an empty ArResolvedPath. Parameters assetPath (str) – ResolveForNewAsset(assetPath) → ResolvedPath Returns the resolved path for the given assetPath that may be used to create a new asset. If such a path cannot be computed for assetPath , returns an empty ArResolvedPath. Note that an asset might or might not already exist at the returned resolved path. Parameters assetPath (str) – class pxr.Ar.ResolverContext An asset resolver context allows clients to provide additional data to the resolver for use during resolution. Clients may provide this data via context objects of their own (subject to restrictions below). An ArResolverContext is simply a wrapper around these objects that allows it to be treated as a single type. Note that an ArResolverContext may not hold multiple context objects with the same type. A client-defined context object must provide the following: Default and copy constructors operator< operator== An overload for size_t hash_value(const T&) Note that the user may define a free function: std::string ArGetDebugString(const Context & ctx); (Where Context is the type of the user’s path resolver context.) This is optional; a default generic implementation has been predefined. This function should return a string representation of the context to be utilized for debugging purposes(such as in TF_DEBUG statements). The ArIsContextObject template must also be specialized for this object to declare that it can be used as a context object. This is to avoid accidental use of an unexpected object as a context object. The AR_DECLARE_RESOLVER_CONTEXT macro can be used to do this as a convenience. AR_DECLARE_RESOLVER_CONTEXT ArResolver::BindContext ArResolver::UnbindContext ArResolverContextBinder Methods: Get() Returns pointer to the context object of the given type held in this resolver context. GetDebugString() Returns a debug string representing the contained context objects. IsEmpty() Returns whether this resolver context is empty. Get() → ContextObj Returns pointer to the context object of the given type held in this resolver context. Returns None if this resolver context is not holding an object of the requested type. GetDebugString() → str Returns a debug string representing the contained context objects. IsEmpty() → bool Returns whether this resolver context is empty. class pxr.Ar.ResolverContextBinder Helper object for managing the binding and unbinding of ArResolverContext objects with the asset resolver. Asset Resolver Context Operations class pxr.Ar.ResolverScopedCache Helper object for managing asset resolver cache scopes. A scoped resolution cache indicates to the resolver that results of calls to Resolve should be cached for a certain scope. This is important for performance and also for consistency it ensures that repeated calls to Resolve with the same parameters will return the same result. Scoped Resolution Cache class pxr.Ar.Timestamp Represents a timestamp for an asset. Timestamps are represented by Unix time, the number of seconds elapsed since 00:00:00 UTC 1/1/1970. Methods: GetTime() Return the time represented by this timestamp as a double. IsValid() Return true if this timestamp is valid, false otherwise. GetTime() → float Return the time represented by this timestamp as a double. If this timestamp is invalid, issue a coding error and return a quiet NaN value. IsValid() → bool Return true if this timestamp is valid, false otherwise. © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
omni.ui.AbstractField.md
AbstractField — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » AbstractField   # AbstractField class omni.ui.AbstractField Bases: Widget, ValueModelHelper The abstract widget that is base for any field, which is a one-line text editor. A field allows the user to enter and edit a single line of plain text. It’s implemented using the model-view pattern and uses AbstractValueModel as the central component of the system. Methods __init__(*args, **kwargs) focus_keyboard(self[, focus]) Puts cursor to this field or removes focus if focus Attributes __init__(*args, **kwargs) focus_keyboard(self: omni.ui._ui.AbstractField, focus: bool = True) → None Puts cursor to this field or removes focus if focus © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
omni.ui.Axis.md
Axis — Omniverse Kit 2.25.9 documentation Omniverse Kit » API (python) » Modules » omni.ui » omni.ui Classes » Axis   # Axis class omni.ui.Axis Bases: pybind11_object Members: None X Y XY Methods __init__(self, value) Attributes None X XY Y name value __init__(self: omni.ui._ui.Axis, value: int) → None property name © Copyright 2019-2024, NVIDIA. Last updated on Mar 25, 2024.
UsdMedia.md
UsdMedia module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » UsdMedia module   # UsdMedia module Summary: The UsdMedia module provides a representation for including other media, such as audio, in the context of a stage. UsdMedia currently contains one media type, UsdMediaSpatialAudio, which allows the playback of audio files both spatially and non-spatially. Classes: SpatialAudio The SpatialAudio primitive defines basic properties for encoding playback of an audio file or stream within a USD Stage. Tokens class pxr.UsdMedia.SpatialAudio The SpatialAudio primitive defines basic properties for encoding playback of an audio file or stream within a USD Stage. The SpatialAudio schema derives from UsdGeomXformable since it can support full spatial audio while also supporting non-spatial mono and stereo sounds. One or more SpatialAudio prims can be placed anywhere in the namespace, though it is advantageous to place truly spatial audio prims under/inside the models from which the sound emanates, so that the audio prim need only be transformed relative to the model, rather than copying its animation. ## Timecode Attributes and Time Scaling startTime and endTime are timecode valued attributes which gives them the special behavior that layer offsets affecting the layer in which one of these values is authored are applied to the attribute’s value itself during value resolution. This allows audio playback to be kept in sync with time sampled animation as the animation is affected by layer offsets in the composition. But this behavior brings with it some interesting edge cases and caveats when it comes to layer offsets that include scale. Although authored layer offsets may have a time scale which can scale the duration between an authored startTime and endTime, we make no attempt to infer any playback dilation of the actual audio media itself. Given that startTime and endTime can be independently authored in different layers with differing time scales, it is not possible, in general, to define an”original timeframe”from which we can compute a dilation to composed stage-time. Even if we could compute a composed dilation this way, it would still be impossible to flatten a stage or layer stack into a single layer and still retain the composed audio dilation using this schema. Although we do not expect it to be common, it is possible to apply a negative time scale to USD layers, which mostly has the effect of reversing animation in the affected composition. If a negative scale is applied to a composition that contains authored startTime and endTime, it will reverse their relative ordering in time. Therefore, we stipulate when playbackMode is”onceFromStartToEnd”or”loopFromStartToEnd”, if endTime is less than startTime, then begin playback at endTime, and continue until startTime. When startTime and endTime are inverted, we do not, however, stipulate that playback of the audio media itself be inverted, since doing so”successfully”would require perfect knowledge of when, within the audio clip, relevant audio ends (so that we know how to offset the reversed audio to align it so that we reach the”beginning”at startTime), and sounds played in reverse are not likely to produce desirable results. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdMediaTokens. So to set an attribute to the value”rightHanded”, use UsdMediaTokens->rightHanded as the value. Methods: CreateAuralModeAttr(defaultValue, writeSparsely) See GetAuralModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateEndTimeAttr(defaultValue, writeSparsely) See GetEndTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateFilePathAttr(defaultValue, writeSparsely) See GetFilePathAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateGainAttr(defaultValue, writeSparsely) See GetGainAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateMediaOffsetAttr(defaultValue, ...) See GetMediaOffsetAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreatePlaybackModeAttr(defaultValue, ...) See GetPlaybackModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. CreateStartTimeAttr(defaultValue, writeSparsely) See GetStartTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. Define classmethod Define(stage, path) -> SpatialAudio Get classmethod Get(stage, path) -> SpatialAudio GetAuralModeAttr() Determines how audio should be played. GetEndTimeAttr() Expressed in the timeCodesPerSecond of the containing stage, endTime specifies when the audio stream will cease playing during animation playback if the length of the referenced audio clip is longer than desired. GetFilePathAttr() Path to the audio file. GetGainAttr() Multiplier on the incoming audio signal. GetMediaOffsetAttr() Expressed in seconds, mediaOffset specifies the offset from the referenced audio file's beginning at which we should begin playback when stage playback reaches the time that prim's audio should start. GetPlaybackModeAttr() Along with startTime and endTime, determines when the audio playback should start and stop during the stage's animation playback and whether the audio should loop during its duration. GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] GetStartTimeAttr() Expressed in the timeCodesPerSecond of the containing stage, startTime specifies when the audio stream will start playing during animation playback. CreateAuralModeAttr(defaultValue, writeSparsely) → Attribute See GetAuralModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateEndTimeAttr(defaultValue, writeSparsely) → Attribute See GetEndTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateFilePathAttr(defaultValue, writeSparsely) → Attribute See GetFilePathAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateGainAttr(defaultValue, writeSparsely) → Attribute See GetGainAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateMediaOffsetAttr(defaultValue, writeSparsely) → Attribute See GetMediaOffsetAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreatePlaybackModeAttr(defaultValue, writeSparsely) → Attribute See GetPlaybackModeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – CreateStartTimeAttr(defaultValue, writeSparsely) → Attribute See GetStartTimeAttr() , and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false . Parameters defaultValue (VtValue) – writeSparsely (bool) – static Define() classmethod Define(stage, path) -> SpatialAudio Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined() ) on this stage. If a prim adhering to this schema at path is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim at path at the current EditTarget. Author SdfPrimSpec s with specifier == SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors. The given path must be an absolute prim path that does not contain any variant selections. If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim. Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget. Parameters stage (Stage) – path (Path) – static Get() classmethod Get(stage, path) -> SpatialAudio Return a UsdMediaSpatialAudio holding the prim adhering to this schema at path on stage . If no prim exists at path on stage , or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following: UsdMediaSpatialAudio(stage->GetPrimAtPath(path)); Parameters stage (Stage) – path (Path) – GetAuralModeAttr() → Attribute Determines how audio should be played. Valid values are: spatial: Play the audio in 3D space if the device can support spatial audio. if not, fall back to mono. nonSpatial: Play the audio without regard to the SpatialAudio prim’s position. If the audio media contains any form of stereo or other multi-channel sound, it is left to the application to determine whether the listener’s position should be taken into account. We expect nonSpatial to be the choice for ambient sounds and music sound- tracks. Declaration uniform token auralMode ="spatial" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values spatial, nonSpatial GetEndTimeAttr() → Attribute Expressed in the timeCodesPerSecond of the containing stage, endTime specifies when the audio stream will cease playing during animation playback if the length of the referenced audio clip is longer than desired. This only applies if playbackMode is set to onceFromStartToEnd or loopFromStartToEnd, otherwise the endTimeCode of the stage is used instead of endTime. If endTime is less than startTime, it is expected that the audio will instead be played from endTime to startTime. Note that endTime is expressed as a timecode so that the stage can properly apply layer offsets when resolving its value. See Timecode Attributes and Time Scaling for more details and caveats. Declaration uniform timecode endTime = 0 C++ Type SdfTimeCode Usd Type SdfValueTypeNames->TimeCode Variability SdfVariabilityUniform GetFilePathAttr() → Attribute Path to the audio file. In general, the formats allowed for audio files is no more constrained by USD than is image-type. As with images, however, usdz has stricter requirements based on DMA and format support in browsers and consumer devices. The allowed audio filetypes for usdz are M4A, MP3, WAV (in order of preference). Usdz Specification Declaration uniform asset filePath = @@ C++ Type SdfAssetPath Usd Type SdfValueTypeNames->Asset Variability SdfVariabilityUniform GetGainAttr() → Attribute Multiplier on the incoming audio signal. A value of 0”mutes”the signal. Negative values will be clamped to 0. Declaration double gain = 1 C++ Type double Usd Type SdfValueTypeNames->Double GetMediaOffsetAttr() → Attribute Expressed in seconds, mediaOffset specifies the offset from the referenced audio file’s beginning at which we should begin playback when stage playback reaches the time that prim’s audio should start. If the prim’s playbackMode is a looping mode, mediaOffset is applied only to the first run-through of the audio clip; the second and all other loops begin from the start of the audio clip. Declaration uniform double mediaOffset = 0 C++ Type double Usd Type SdfValueTypeNames->Double Variability SdfVariabilityUniform GetPlaybackModeAttr() → Attribute Along with startTime and endTime, determines when the audio playback should start and stop during the stage’s animation playback and whether the audio should loop during its duration. Valid values are: onceFromStart: Play the audio once, starting at startTime, continuing until the audio completes. onceFromStartToEnd: Play the audio once beginning at startTime, continuing until endTime or until the audio completes, whichever comes first. loopFromStart: Start playing the audio at startTime and continue looping through to the stage’s authored endTimeCode. loopFromStartToEnd: Start playing the audio at startTime and continue looping through, stopping the audio at endTime. loopFromStage: Start playing the audio at the stage’s authored startTimeCode and continue looping through to the stage’s authored endTimeCode. This can be useful for ambient sounds that should always be active. Declaration uniform token playbackMode ="onceFromStart" C++ Type TfToken Usd Type SdfValueTypeNames->Token Variability SdfVariabilityUniform Allowed Values onceFromStart, onceFromStartToEnd, loopFromStart, loopFromStartToEnd, loopFromStage static GetSchemaAttributeNames() classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken] Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. Does not include attributes that may be authored by custom/extended methods of the schemas involved. Parameters includeInherited (bool) – GetStartTimeAttr() → Attribute Expressed in the timeCodesPerSecond of the containing stage, startTime specifies when the audio stream will start playing during animation playback. This value is ignored when playbackMode is set to loopFromStage as, in this mode, the audio will always start at the stage’s authored startTimeCode. Note that startTime is expressed as a timecode so that the stage can properly apply layer offsets when resolving its value. See Timecode Attributes and Time Scaling for more details and caveats. Declaration uniform timecode startTime = 0 C++ Type SdfTimeCode Usd Type SdfValueTypeNames->TimeCode Variability SdfVariabilityUniform class pxr.UsdMedia.Tokens Attributes: auralMode endTime filePath gain loopFromStage loopFromStart loopFromStartToEnd mediaOffset nonSpatial onceFromStart onceFromStartToEnd playbackMode spatial startTime auralMode = 'auralMode' endTime = 'endTime' filePath = 'filePath' gain = 'gain' loopFromStage = 'loopFromStage' loopFromStart = 'loopFromStart' loopFromStartToEnd = 'loopFromStartToEnd' mediaOffset = 'mediaOffset' nonSpatial = 'nonSpatial' onceFromStart = 'onceFromStart' onceFromStartToEnd = 'onceFromStartToEnd' playbackMode = 'playbackMode' spatial = 'spatial' startTime = 'startTime' © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
overview_external.md
Launcher Overview — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Launcher Overview   # Launcher Overview The NVIDIA Omniverse™ Launcher is your first step into the Omniverse. Giving you immediate access to all the apps, connectors and other downloads the Omniverse Launcher is your gateway to the Omniverse. You can download the launcher here. Click here for Launcher installation instructions. ## Features ### Quick Access to Omniverse Apps With an intuitive Interface, Launcher allows a lightning quick experience for opening Omniverse Apps. ### Updating Made Easy Staying current is easy with Omniverse Apps and Connectors. The Launcher provides all you need to download, install, and update Omniverse Apps and Connectors through an elegant user interface. When you see a green bell icon next to an app, that means a new version is available. Click the hamburger icon next to “Launch” to open the version dropdown, then click the green “Install/bell icon” to install the latest version. ### Learning Content With quick easy access links, the Launcher puts all the help you need front and center. Learn via video tutorials, documentation or other Omniverse users on the Omniverse Forums. Whatever way you wish to learn, Launcher makes available. ### Get Connected Entering the Omniverse is much easier when you do so through tools you are already familiar with. Launcher offers quick access to download and install Omniverse Connectors. These Connectors allow applications like Maya, 3Ds-Max, Revit and many other DCC Applications to contribute to an Omniverse project. Interested in learning more? Open the Omniverse Launcher documentation portal © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.
kit_architecture.md
Architecture — kit-manual 105.1 documentation kit-manual » Architecture   # Architecture Kit is a platform for building applications and experiences. They may or may not have much in common. Some of these may use RTX, omni.ui or other libraries to create rich applications, others may be cut-down windowless services (e.g one to process USD files offline for example). To achieve this goal, Kit aims to be extremely modular: everything is an extension. ## Extensions An Extension is a uniquely named and versioned package loaded at runtime. It can have any or all of the following properties: Contain python code. Contain shared libraries and/or Carbonite plugins. Provide a C++ API. Provide a python API. Depend on other extensions. Be reloadable (can be unloaded, changed and loaded again at runtime). It is the basic building block of Kit-based Applications like Create. More info in the Extensions part of the guide. ## Kit Kernel (kit.exe/IApp) Is a minimal core required to run an extension. It is an entry point for any Kit-based Application. It includes extension manager and basic interface. It is the core which holds everything together. ## omni.kit.app (omni::kit::IApp) omni.kit.app is the basic interface that can be used by any extension, and provides a minimal set of Carbonite plugins to load and set up extensions. It is the main front part of Kit Kernel. C++: omni::kit::IApp python: omni.kit.app It contains: Carbonite framework startup Extension manager Event system Update loop Settings Python context / runtime (edited) It can run from either a Kit executable (kit.exe / kit) or from python. ## Bundled Extensions The Kit SDK comes with a lot of included extensions. Even more extensions are developed outside of Kit SDK and delivered using Extension Registry. Note Try kit.exe --list-exts and then enable one of them, e.g. kit.exe --enable omni.usd ## Different Modes Example ### CLI utility graph RL usd[omni.kit.usd] -.- app(omni.kit.app) con[omni.kit.connection] -.- app user[user.tool] --> usd usd --> con user --> con user -.- app Note Arrows are extension dependencies. User writes an extension user.tool, which depends only on omni.kit.usd and omni.kit.app. User runs Kit kit.exe --enable user.tool Notice that only one extension is specified. omni.kit.app will automatically figure out which extensions are required by resolving dependencies and will load and start them up in the correct order. user.tool can for instance parse command-line args, do some processing and then exit. ### GUI CLI utility graph RL ren[omni.kit.rendering] --> win[omni.kit.window] ui[omni.kit.ui] --> ren user[user.tool] --> usd usd[omni.kit.usd] --> con[omni.kit.connection] user --> con userui[user.tool.ui] --> ui userui --> user user -.- app(omni.kit.app) userui -.- app con -.- app ren -.- app usd -.- app win -.- app The dependency on the UI unrolls the whole tree of required extensions. © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
Pcp.md
Pcp module — pxr-usd-api 105.1 documentation pxr-usd-api » Modules » Pcp module   # Pcp module Summary: The PrimCache Population module implements core scenegraph composition semantics - behaviors informally referred to as Layering & Referencing. Classes: ArcType Cache PcpCache is the context required to make requests of the Pcp composition algorithm and cache the results. Dependency Description of a dependency. DependencyType DynamicFileFormatDependencyData Contains the necessary information for storing a prim index's dependency on dynamic file format arguments and determining if a field change affects the prim index. ErrorArcCycle Arcs between PcpNodes that form a cycle. ErrorArcPermissionDenied Arcs that were not made between PcpNodes because of permission restrictions. ErrorBase Base class for all error types. ErrorCapacityExceeded Exceeded the capacity for composition arcs at a single site. ErrorInconsistentAttributeType Attributes that have specs with conflicting definitions. ErrorInconsistentAttributeVariability Attributes that have specs with conflicting variability. ErrorInconsistentPropertyType Properties that have specs with conflicting definitions. ErrorInvalidAssetPath Invalid asset paths used by references or payloads. ErrorInvalidAssetPathBase ErrorInvalidExternalTargetPath Invalid target or connection path in some scope that points to an object outside of that scope. ErrorInvalidInstanceTargetPath Invalid target or connection path authored in an inherited class that points to an instance of that class. ErrorInvalidPrimPath Invalid prim paths used by references or payloads. ErrorInvalidReferenceOffset References or payloads that use invalid layer offsets. ErrorInvalidSublayerOffset Sublayers that use invalid layer offsets. ErrorInvalidSublayerOwnership Sibling layers that have the same owner. ErrorInvalidSublayerPath Asset paths that could not be both resolved and loaded. ErrorInvalidTargetPath Invalid target or connection path. ErrorMutedAssetPath Muted asset paths used by references or payloads. ErrorOpinionAtRelocationSource Opinions were found at a relocation source path. ErrorPrimPermissionDenied Layers with illegal opinions about private prims. ErrorPropertyPermissionDenied Layers with illegal opinions about private properties. ErrorSublayerCycle Layers that recursively sublayer themselves. ErrorTargetPathBase Base class for composition errors related to target or connection paths. ErrorTargetPermissionDenied Paths with illegal opinions about private targets. ErrorType ErrorUnresolvedPrimPath Asset paths that could not be both resolved and loaded. InstanceKey A PcpInstanceKey identifies instanceable prim indexes that share the same set of opinions. LayerStack Represents a stack of layers that contribute opinions to composition. LayerStackIdentifier Arguments used to identify a layer stack. LayerStackSite A site specifies a path in a layer stack of scene description. MapExpression An expression that yields a PcpMapFunction value. MapFunction A function that maps values from one namespace (and time domain) to another. NodeRef PcpNode represents a node in an expression tree for compositing scene description. PrimIndex PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics. PropertyIndex PcpPropertyIndex is an index of all sites in scene description that contribute opinions to a specific property, under composition semantics. Site A site specifies a path in a layer stack of scene description. class pxr.Pcp.ArcType Methods: GetValueFromName Attributes: allValues static GetValueFromName() allValues = (Pcp.ArcTypeRoot, Pcp.ArcTypeInherit, Pcp.ArcTypeRelocate, Pcp.ArcTypeVariant, Pcp.ArcTypeReference, Pcp.ArcTypePayload, Pcp.ArcTypeSpecialize) class pxr.Pcp.Cache PcpCache is the context required to make requests of the Pcp composition algorithm and cache the results. Because the algorithms are recursive making a request typically makes other internal requests to solve subproblems caching subproblem results is required for reasonable performance, and so this cache is the only entrypoint to the algorithms. There is a set of parameters that affect the composition results: variant fallbacks: per named variant set, an ordered list of fallback values to use when composing a prim that defines a variant set but does not specify a selection payload inclusion set: an SdfPath set used to identify which prims should have their payloads included during composition; this is the basis for explicit control over the”working set”of composition file format target: the file format target that Pcp will request when opening scene description layers “USD mode”configures the Pcp composition algorithm to provide only a custom, lighter subset of the full feature set, as needed by the Universal Scene Description system There are a number of different computations that can be requested. These include computing a layer stack from a PcpLayerStackIdentifier, computing a prim index or prim stack, and computing a property index. Methods: ComputeAttributeConnectionPaths(...) Compute the attribute connection paths for the attribute at attributePath into paths . ComputeLayerStack(identifier, allErrors) Returns the layer stack for identifier if it exists, otherwise creates a new layer stack for identifier . ComputePrimIndex(primPath, allErrors) Compute and return a reference to the cached result for the prim index for the given path. ComputePropertyIndex(propPath, allErrors) Compute and return a reference to the cached result for the property index for the given path. ComputeRelationshipTargetPaths(...) Compute the relationship target paths for the relationship at relationshipPath into paths . FindAllLayerStacksUsingLayer(layer) Returns every computed & cached layer stack that includes layer . FindPrimIndex(primPath) Returns a pointer to the cached computed prim index for the given path, or None if it has not been computed. FindPropertyIndex(propPath) Returns a pointer to the cached computed property index for the given path, or None if it has not been computed. FindSiteDependencies(siteLayerStack, ...) Returns dependencies on the given site of scene description, as discovered by the cached index computations. GetDynamicFileFormatArgumentDependencyData(...) Returns the dynamic file format dependency data object for the prim index with the given primIndexPath . GetLayerStackIdentifier() Get the identifier of the layerStack used for composition. GetMutedLayers() Returns the list of canonical identifiers for muted layers in this cache. GetUsedLayers() Returns set of all layers used by this cache. GetUsedLayersRevision() Return a number that can be used to determine whether or not the set of layers used by this cache may have changed or not. GetVariantFallbacks() Get the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection. HasAnyDynamicFileFormatArgumentDependencies() Returns true if any prim index in this cache has a dependency on a dynamic file format argument field. HasRootLayerStack(layerStack) Return true if this cache's root layer stack is layerStack , false otherwise. IsInvalidAssetPath(resolvedAssetPath) Returns true if resolvedAssetPath was used by a prim (e.g. IsInvalidSublayerIdentifier(identifier) Returns true if identifier was used as a sublayer path in a layer stack but did not identify a valid layer. IsLayerMuted(layerIdentifier) Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise. IsPayloadIncluded(path) Return true if the payload is included for the given path. IsPossibleDynamicFileFormatArgumentField(field) Returns true if the given field is the name of a field that was composed while generating dynamic file format arguments for any prim index in this cache. PrintStatistics() Prints various statistics about the data stored in this cache. Reload(changes) Reload the layers of the layer stack, except session layers and sublayers of session layers. RequestLayerMuting(layersToMute, ...) Request layers to be muted or unmuted in this cache. RequestPayloads(pathsToInclude, ...) Request payloads to be included or excluded from composition. SetVariantFallbacks(map, changes) Set the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection. UsesLayerStack(layerStack) Return true if layerStack is used by this cache in its composition, false otherwise. Attributes: fileFormatTarget str layerStack LayerStack ComputeAttributeConnectionPaths(attributePath, paths, localOnly, stopProperty, includeStopProperty, deletedPaths, allErrors) → None Compute the attribute connection paths for the attribute at attributePath into paths . If localOnly is true then this will compose attribute connections from local nodes only. If stopProperty is not None then this will stop composing attribute connections at stopProperty , including stopProperty iff includeStopProperty is true . If not None , deletedPaths will be populated with connection paths whose deletion contributed to the computed result. allErrors will contain any errors encountered while performing this operation. Parameters attributePath (Path) – paths (list[SdfPath]) – localOnly (bool) – stopProperty (Spec) – includeStopProperty (bool) – deletedPaths (list[SdfPath]) – allErrors (list[PcpError]) – ComputeLayerStack(identifier, allErrors) → LayerStack Returns the layer stack for identifier if it exists, otherwise creates a new layer stack for identifier . This returns None if identifier is invalid (i.e. its root layer is None ). allErrors will contain any errors encountered while creating a new layer stack. It’ll be unchanged if the layer stack already existed. Parameters identifier (LayerStackIdentifier) – allErrors (list[PcpError]) – ComputePrimIndex(primPath, allErrors) → PrimIndex Compute and return a reference to the cached result for the prim index for the given path. allErrors will contain any errors encountered while performing this operation. Parameters primPath (Path) – allErrors (list[PcpError]) – ComputePropertyIndex(propPath, allErrors) → PropertyIndex Compute and return a reference to the cached result for the property index for the given path. allErrors will contain any errors encountered while performing this operation. Parameters propPath (Path) – allErrors (list[PcpError]) – ComputeRelationshipTargetPaths(relationshipPath, paths, localOnly, stopProperty, includeStopProperty, deletedPaths, allErrors) → None Compute the relationship target paths for the relationship at relationshipPath into paths . If localOnly is true then this will compose relationship targets from local nodes only. If stopProperty is not None then this will stop composing relationship targets at stopProperty , including stopProperty iff includeStopProperty is true . If not None , deletedPaths will be populated with target paths whose deletion contributed to the computed result. allErrors will contain any errors encountered while performing this operation. Parameters relationshipPath (Path) – paths (list[SdfPath]) – localOnly (bool) – stopProperty (Spec) – includeStopProperty (bool) – deletedPaths (list[SdfPath]) – allErrors (list[PcpError]) – FindAllLayerStacksUsingLayer(layer) → list[PcpLayerStackPtr] Returns every computed & cached layer stack that includes layer . Parameters layer (Layer) – FindPrimIndex(primPath) → PrimIndex Returns a pointer to the cached computed prim index for the given path, or None if it has not been computed. Parameters primPath (Path) – FindPropertyIndex(propPath) → PropertyIndex Returns a pointer to the cached computed property index for the given path, or None if it has not been computed. Parameters propPath (Path) – FindSiteDependencies(siteLayerStack, sitePath, depMask, recurseOnSite, recurseOnIndex, filterForExistingCachesOnly) → list[PcpDependency] Returns dependencies on the given site of scene description, as discovered by the cached index computations. depMask specifies what classes of dependency to include; see PcpDependencyFlags for details recurseOnSite includes incoming dependencies on children of sitePath recurseOnIndex extends the result to include all PcpCache child indexes below discovered results filterForExistingCachesOnly filters the results to only paths representing computed prim and property index caches; otherwise a recursively-expanded result can include un-computed paths that are expected to depend on the site Parameters siteLayerStack (LayerStack) – sitePath (Path) – depMask (PcpDependencyFlags) – recurseOnSite (bool) – recurseOnIndex (bool) – filterForExistingCachesOnly (bool) – FindSiteDependencies(siteLayer, sitePath, depMask, recurseOnSite, recurseOnIndex, filterForExistingCachesOnly) -> list[PcpDependency] Returns dependencies on the given site of scene description, as discovered by the cached index computations. This method overload takes a site layer rather than a layer stack. It will check every layer stack using that layer, and apply any relevant sublayer offsets to the map functions in the returned PcpDependencyVector. See the other method for parameter details. Parameters siteLayer (Layer) – sitePath (Path) – depMask (PcpDependencyFlags) – recurseOnSite (bool) – recurseOnIndex (bool) – filterForExistingCachesOnly (bool) – GetDynamicFileFormatArgumentDependencyData(primIndexPath) → DynamicFileFormatDependencyData Returns the dynamic file format dependency data object for the prim index with the given primIndexPath . This will return an empty dependency data if either there is no cache prim index for the path or if the prim index has no dynamic file formats that it depends on. Parameters primIndexPath (Path) – GetLayerStackIdentifier() → LayerStackIdentifier Get the identifier of the layerStack used for composition. GetMutedLayers() → list[str] Returns the list of canonical identifiers for muted layers in this cache. See documentation on RequestLayerMuting for more details. GetUsedLayers() → SdfLayerHandleSet Returns set of all layers used by this cache. GetUsedLayersRevision() → int Return a number that can be used to determine whether or not the set of layers used by this cache may have changed or not. For example, if one calls GetUsedLayers() and saves the GetUsedLayersRevision() , and then later calls GetUsedLayersRevision() again, if the number is unchanged, then GetUsedLayers() is guaranteed to be unchanged as well. GetVariantFallbacks() → PcpVariantFallbackMap Get the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection. HasAnyDynamicFileFormatArgumentDependencies() → bool Returns true if any prim index in this cache has a dependency on a dynamic file format argument field. HasRootLayerStack(layerStack) → bool Return true if this cache’s root layer stack is layerStack , false otherwise. This is functionally equivalent to comparing against the result of GetLayerStack() , but does not require constructing a TfWeakPtr or any refcount operations. Parameters layerStack (LayerStack) – HasRootLayerStack(layerStack) -> bool This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Parameters layerStack (LayerStack) – IsInvalidAssetPath(resolvedAssetPath) → bool Returns true if resolvedAssetPath was used by a prim (e.g. in a reference) but did not resolve to a valid asset. This is functionally equivalent to examining the values in the map returned by GetInvalidAssetPaths, but more efficient. Parameters resolvedAssetPath (str) – IsInvalidSublayerIdentifier(identifier) → bool Returns true if identifier was used as a sublayer path in a layer stack but did not identify a valid layer. This is functionally equivalent to examining the values in the vector returned by GetInvalidSublayerIdentifiers, but more efficient. Parameters identifier (str) – IsLayerMuted(layerIdentifier) → bool Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise. If layerIdentifier is relative, it is assumed to be relative to this cache’s root layer. See documentation on RequestLayerMuting for more details. Parameters layerIdentifier (str) – IsLayerMuted(anchorLayer, layerIdentifier, canonicalMutedLayerIdentifier) -> bool Returns true if the layer specified by layerIdentifier is muted in this cache, false otherwise. If layerIdentifier is relative, it is assumed to be relative to anchorLayer . If canonicalMutedLayerIdentifier is supplied, it will be populated with the canonical identifier of the muted layer if this function returns true. See documentation on RequestLayerMuting for more details. Parameters anchorLayer (Layer) – layerIdentifier (str) – canonicalMutedLayerIdentifier (str) – IsPayloadIncluded(path) → bool Return true if the payload is included for the given path. Parameters path (Path) – IsPossibleDynamicFileFormatArgumentField(field) → bool Returns true if the given field is the name of a field that was composed while generating dynamic file format arguments for any prim index in this cache. Parameters field (str) – PrintStatistics() → None Prints various statistics about the data stored in this cache. Reload(changes) → None Reload the layers of the layer stack, except session layers and sublayers of session layers. This will also try to load sublayers in this cache’s layer stack that could not be loaded previously. It will also try to load any referenced or payloaded layer that could not be loaded previously. Clients should subsequently Apply() changes to use any now- valid layers. Parameters changes (PcpChanges) – RequestLayerMuting(layersToMute, layersToUnmute, changes, newLayersMuted, newLayersUnmuted) → None Request layers to be muted or unmuted in this cache. Muted layers are ignored during composition and do not appear in any layer stacks. The root layer of this stage may not be muted; attempting to do so will generate a coding error. If the root layer of a reference or payload layer stack is muted, the behavior is as if the muted layer did not exist, which means a composition error will be generated. A canonical identifier for each layer in layersToMute will be computed using ArResolver::CreateIdentifier using the cache’s root layer as the anchoring asset. Any layer encountered during composition with the same identifier will be considered muted and ignored. Note that muting a layer will cause this cache to release all references to that layer. If no other client is holding on to references to that layer, it will be unloaded. In this case, if there are unsaved edits to the muted layer, those edits are lost. Since anonymous layers are not serialized, muting an anonymous layer will cause that layer and its contents to be lost in this case. If changes is not nullptr , it is adjusted to reflect the changes necessary to see the change in muted layers. Otherwise, those changes are applied immediately. newLayersMuted and newLayersUnmuted contains the pruned vector of layers which are muted or unmuted by this call to RequestLayerMuting. Parameters layersToMute (list[str]) – layersToUnmute (list[str]) – changes (PcpChanges) – newLayersMuted (list[str]) – newLayersUnmuted (list[str]) – RequestPayloads(pathsToInclude, pathsToExclude, changes) → None Request payloads to be included or excluded from composition. pathsToInclude is a set of paths to add to the set for payload inclusion. pathsToExclude is a set of paths to remove from the set for payload inclusion. changes if not None , is adjusted to reflect the changes necessary to see the change in payloads; otherwise those changes are applied immediately. If a path is listed in both pathsToInclude and pathsToExclude, it will be treated as an inclusion only. Parameters pathsToInclude (SdfPathSet) – pathsToExclude (SdfPathSet) – changes (PcpChanges) – SetVariantFallbacks(map, changes) → None Set the list of fallbacks to attempt to use when evaluating variant sets that lack an authored selection. If changes is not None then it’s adjusted to reflect the changes necessary to see the change in standin preferences, otherwise those changes are applied immediately. Parameters map (PcpVariantFallbackMap) – changes (PcpChanges) – UsesLayerStack(layerStack) → bool Return true if layerStack is used by this cache in its composition, false otherwise. Parameters layerStack (LayerStack) – property fileFormatTarget str Returns the file format target this cache is configured for. Type type property layerStack LayerStack Get the layer stack for GetLayerStackIdentifier() . Note that this will neither compute the layer stack nor report errors. So if the layer stack has not been computed yet this will return None . Use ComputeLayerStack() if you need to compute the layer stack if it hasn’t been computed already and/or get errors caused by computing the layer stack. Type type class pxr.Pcp.Dependency Description of a dependency. Attributes: indexPath mapFunc sitePath property indexPath property mapFunc property sitePath class pxr.Pcp.DependencyType Methods: GetValueFromName Attributes: allValues static GetValueFromName() allValues = (Pcp.DependencyTypeNone, Pcp.DependencyTypeRoot, Pcp.DependencyTypePurelyDirect, Pcp.DependencyTypePartlyDirect, Pcp.DependencyTypeDirect, Pcp.DependencyTypeAncestral, Pcp.DependencyTypeVirtual, Pcp.DependencyTypeNonVirtual, Pcp.DependencyTypeAnyNonVirtual, Pcp.DependencyTypeAnyIncludingVirtual) class pxr.Pcp.DynamicFileFormatDependencyData Contains the necessary information for storing a prim index’s dependency on dynamic file format arguments and determining if a field change affects the prim index. This data structure does not store the prim index or its path itself and is expected to be the data in some other data structure that maps prim indexes to its dependencies. Methods: CanFieldChangeAffectFileFormatArguments(...) Given a field name and the changed field values in oldAndNewValues this return whether this change can affect any of the file format arguments generated by any of the contexts stored in this dependency. GetRelevantFieldNames() Returns a list of field names that were composed for any of the dependency contexts that were added to this dependency. IsEmpty() Returns whether this dependency data is empty. CanFieldChangeAffectFileFormatArguments(fieldName, oldValue, newValue) → bool Given a field name and the changed field values in oldAndNewValues this return whether this change can affect any of the file format arguments generated by any of the contexts stored in this dependency. Parameters fieldName (str) – oldValue (VtValue) – newValue (VtValue) – GetRelevantFieldNames() → str.Set Returns a list of field names that were composed for any of the dependency contexts that were added to this dependency. IsEmpty() → bool Returns whether this dependency data is empty. class pxr.Pcp.ErrorArcCycle Arcs between PcpNodes that form a cycle. class pxr.Pcp.ErrorArcPermissionDenied Arcs that were not made between PcpNodes because of permission restrictions. class pxr.Pcp.ErrorBase Base class for all error types. Attributes: errorType property errorType class pxr.Pcp.ErrorCapacityExceeded Exceeded the capacity for composition arcs at a single site. class pxr.Pcp.ErrorInconsistentAttributeType Attributes that have specs with conflicting definitions. class pxr.Pcp.ErrorInconsistentAttributeVariability Attributes that have specs with conflicting variability. class pxr.Pcp.ErrorInconsistentPropertyType Properties that have specs with conflicting definitions. class pxr.Pcp.ErrorInvalidAssetPath Invalid asset paths used by references or payloads. class pxr.Pcp.ErrorInvalidAssetPathBase class pxr.Pcp.ErrorInvalidExternalTargetPath Invalid target or connection path in some scope that points to an object outside of that scope. class pxr.Pcp.ErrorInvalidInstanceTargetPath Invalid target or connection path authored in an inherited class that points to an instance of that class. class pxr.Pcp.ErrorInvalidPrimPath Invalid prim paths used by references or payloads. class pxr.Pcp.ErrorInvalidReferenceOffset References or payloads that use invalid layer offsets. class pxr.Pcp.ErrorInvalidSublayerOffset Sublayers that use invalid layer offsets. class pxr.Pcp.ErrorInvalidSublayerOwnership Sibling layers that have the same owner. class pxr.Pcp.ErrorInvalidSublayerPath Asset paths that could not be both resolved and loaded. class pxr.Pcp.ErrorInvalidTargetPath Invalid target or connection path. class pxr.Pcp.ErrorMutedAssetPath Muted asset paths used by references or payloads. class pxr.Pcp.ErrorOpinionAtRelocationSource Opinions were found at a relocation source path. class pxr.Pcp.ErrorPrimPermissionDenied Layers with illegal opinions about private prims. class pxr.Pcp.ErrorPropertyPermissionDenied Layers with illegal opinions about private properties. class pxr.Pcp.ErrorSublayerCycle Layers that recursively sublayer themselves. class pxr.Pcp.ErrorTargetPathBase Base class for composition errors related to target or connection paths. class pxr.Pcp.ErrorTargetPermissionDenied Paths with illegal opinions about private targets. class pxr.Pcp.ErrorType Methods: GetValueFromName Attributes: allValues static GetValueFromName() allValues = (Pcp.ErrorType_ArcCycle, Pcp.ErrorType_ArcPermissionDenied, Pcp.ErrorType_IndexCapacityExceeded, Pcp.ErrorType_ArcCapacityExceeded, Pcp.ErrorType_ArcNamespaceDepthCapacityExceeded, Pcp.ErrorType_InconsistentPropertyType, Pcp.ErrorType_InconsistentAttributeType, Pcp.ErrorType_InconsistentAttributeVariability, Pcp.ErrorType_InternalAssetPath, Pcp.ErrorType_InvalidPrimPath, Pcp.ErrorType_InvalidAssetPath, Pcp.ErrorType_InvalidInstanceTargetPath, Pcp.ErrorType_InvalidExternalTargetPath, Pcp.ErrorType_InvalidTargetPath, Pcp.ErrorType_InvalidReferenceOffset, Pcp.ErrorType_InvalidSublayerOffset, Pcp.ErrorType_InvalidSublayerOwnership, Pcp.ErrorType_InvalidSublayerPath, Pcp.ErrorType_InvalidVariantSelection, Pcp.ErrorType_OpinionAtRelocationSource, Pcp.ErrorType_PrimPermissionDenied, Pcp.ErrorType_PropertyPermissionDenied, Pcp.ErrorType_SublayerCycle, Pcp.ErrorType_TargetPermissionDenied, Pcp.ErrorType_UnresolvedPrimPath) class pxr.Pcp.ErrorUnresolvedPrimPath Asset paths that could not be both resolved and loaded. class pxr.Pcp.InstanceKey A PcpInstanceKey identifies instanceable prim indexes that share the same set of opinions. Instanceable prim indexes with equal instance keys are guaranteed to have the same opinions for name children and properties beneath those name children. They are NOT guaranteed to have the same opinions for direct properties of the prim indexes themselves. class pxr.Pcp.LayerStack Represents a stack of layers that contribute opinions to composition. Each PcpLayerStack is identified by a PcpLayerStackIdentifier. This identifier contains all of the parameters needed to construct a layer stack, such as the root layer, session layer, and path resolver context. PcpLayerStacks are constructed and managed by a Pcp_LayerStackRegistry. Attributes: expired True if this object has expired, False otherwise. identifier LayerStackIdentifier incrementalRelocatesSourceToTarget SdfRelocatesMap incrementalRelocatesTargetToSource SdfRelocatesMap layerOffsets layerTree LayerTree layers list[SdfLayerRefPtr] localErrors list[PcpError] mutedLayers set[str] pathsToPrimsWithRelocates list[SdfPath] relocatesSourceToTarget SdfRelocatesMap relocatesTargetToSource SdfRelocatesMap property expired True if this object has expired, False otherwise. property identifier LayerStackIdentifier Returns the identifier for this layer stack. Type type property incrementalRelocatesSourceToTarget SdfRelocatesMap Returns incremental relocation source-to-target mapping for this layer stack. This map contains the individual relocation entries found across all layers in this layer stack; it does not combine ancestral entries with descendant entries. For instance, if this layer stack contains relocations { /A: /B} and { /A/C: /A/D}, this map will contain { /A: /B} and { /A/C: /A/D}. Type type property incrementalRelocatesTargetToSource SdfRelocatesMap Returns incremental relocation target-to-source mapping for this layer stack. See GetIncrementalRelocatesTargetToSource for more details. Type type property layerOffsets property layerTree LayerTree Returns the layer tree representing the structure of this layer stack. Type type property layers list[SdfLayerRefPtr] Returns the layers in this layer stack in strong-to-weak order. Note that this is only the local layer stack it does not include any layers brought in by references inside prims. Type type property localErrors list[PcpError] Return the list of errors local to this layer stack. Type type property mutedLayers set[str] Returns the set of layers that were muted in this layer stack. Type type property pathsToPrimsWithRelocates list[SdfPath] Returns a list of paths to all prims across all layers in this layer stack that contained relocates. Type type property relocatesSourceToTarget SdfRelocatesMap Returns relocation source-to-target mapping for this layer stack. This map combines the individual relocation entries found across all layers in this layer stack; multiple entries that affect a single prim will be combined into a single entry. For instance, if this layer stack contains relocations { /A: /B} and { /A/C: /A/D}, this map will contain { /A: /B} and { /B/C: /B/D}. This allows consumers to go from unrelocated namespace to relocated namespace in a single step. Type type property relocatesTargetToSource SdfRelocatesMap Returns relocation target-to-source mapping for this layer stack. See GetRelocatesSourceToTarget for more details. Type type class pxr.Pcp.LayerStackIdentifier Arguments used to identify a layer stack. Objects of this type are immutable. Attributes: pathResolverContext rootLayer sessionLayer property pathResolverContext property rootLayer property sessionLayer class pxr.Pcp.LayerStackSite A site specifies a path in a layer stack of scene description. Attributes: layerStack path property layerStack property path class pxr.Pcp.MapExpression An expression that yields a PcpMapFunction value. Expressions comprise constant values, variables, and operators applied to sub-expressions. Expressions cache their computed values internally. Assigning a new value to a variable automatically invalidates the cached values of dependent expressions. Common (sub-)expressions are automatically detected and shared. PcpMapExpression exists solely to support efficient incremental handling of relocates edits. It represents a tree of the namespace mapping operations and their inputs, so we can narrowly redo the computation when one of the inputs changes. Methods: AddRootIdentity() Return a new expression representing this expression with an added (if necessary) mapping from</>to</>. Compose(f) Create a new PcpMapExpression representing the application of f's value, followed by the application of this expression's value. Constant classmethod Constant(constValue) -> MapExpression Evaluate() Evaluate this expression, yielding a PcpMapFunction value. Identity classmethod Identity() -> MapExpression Inverse() Create a new PcpMapExpression representing the inverse of f. MapSourceToTarget(path) Map a path in the source namespace to the target. MapTargetToSource(path) Map a path in the target namespace to the source. Attributes: isIdentity bool isNull bool timeOffset LayerOffset AddRootIdentity() → MapExpression Return a new expression representing this expression with an added (if necessary) mapping from</>to</>. Compose(f) → MapExpression Create a new PcpMapExpression representing the application of f’s value, followed by the application of this expression’s value. Parameters f (MapExpression) – static Constant() classmethod Constant(constValue) -> MapExpression Create a new constant. Parameters constValue (Value) – Evaluate() → Value Evaluate this expression, yielding a PcpMapFunction value. The computed result is cached. The return value is a reference to the internal cached value. The cache is automatically invalidated as needed. static Identity() classmethod Identity() -> MapExpression Return an expression representing PcpMapFunction::Identity() . static Inverse() → MapExpression Create a new PcpMapExpression representing the inverse of f. MapSourceToTarget(path) → Path Map a path in the source namespace to the target. If the path is not in the domain, returns an empty path. Parameters path (Path) – MapTargetToSource(path) → Path Map a path in the target namespace to the source. If the path is not in the co-domain, returns an empty path. Parameters path (Path) – property isIdentity bool Return true if the evaluated map function is the identity function. For identity, MapSourceToTarget() always returns the path unchanged. Type type property isNull bool Return true if this is a null expression. Type type property timeOffset LayerOffset The time offset of the mapping. Type type class pxr.Pcp.MapFunction A function that maps values from one namespace (and time domain) to another. It represents the transformation that an arc such as a reference arc applies as it incorporates values across the arc. Take the example of a reference arc, where a source path</Model>is referenced as a target path,</Model_1>. The source path</Model>is the source of the opinions; the target path</Model_1>is where they are incorporated in the scene. Values in the model that refer to paths relative to</Model>must be transformed to be relative to</Model_1>instead. The PcpMapFunction for the arc provides this service. Map functions have a specific domain, or set of values they can operate on. Any values outside the domain cannot be mapped. The domain precisely tracks what areas of namespace can be referred to across various forms of arcs. Map functions can be chained to represent a series of map operations applied in sequence. The map function represent the cumulative effect as efficiently as possible. For example, in the case of a chained reference from</Model>to</Model>to</Model>to</Model_1>, this is effectively the same as a mapping directly from</Model>to</Model_1>. Representing the cumulative effect of arcs in this way is important for handling larger scenes efficiently. Map functions can be inverted. Formally, map functions are bijections (one-to-one and onto), which ensures that they can be inverted. Put differently, no information is lost by applying a map function to set of values within its domain; they retain their distinct identities and can always be mapped back. One analogy that may or may not be helpful: In the same way a geometric transform maps a model’s points in its rest space into the world coordinates for a particular instance, a PcpMapFunction maps values about a referenced model into the composed scene for a particular instance of that model. But rather than translating and rotating points, the map function shifts the values in namespace (and time). Methods: Compose(f) Compose this map over the given map function. ComposeOffset(newOffset) Compose this map function over a hypothetical map function that has an identity path mapping and offset . GetInverse() Return the inverse of this map function. Identity classmethod Identity() -> MapFunction IdentityPathMap classmethod IdentityPathMap() -> PathMap MapSourceToTarget(path) Map a path in the source namespace to the target. MapTargetToSource(path) Map a path in the target namespace to the source. Attributes: isIdentity bool isIdentityPathMapping bool isNull bool sourceToTargetMap PathMap timeOffset LayerOffset Compose(f) → MapFunction Compose this map over the given map function. The result will represent the application of f followed by the application of this function. Parameters f (MapFunction) – ComposeOffset(newOffset) → MapFunction Compose this map function over a hypothetical map function that has an identity path mapping and offset . This is equivalent to building such a map function and invoking Compose() , but is faster. Parameters newOffset (LayerOffset) – GetInverse() → MapFunction Return the inverse of this map function. This returns a true inverse inv: for any path p in this function’s domain that it maps to p’, inv(p’) ->p. static Identity() classmethod Identity() -> MapFunction Construct an identity map function. static IdentityPathMap() classmethod IdentityPathMap() -> PathMap Returns an identity path mapping. MapSourceToTarget(path) → Path Map a path in the source namespace to the target. If the path is not in the domain, returns an empty path. Parameters path (Path) – MapTargetToSource(path) → Path Map a path in the target namespace to the source. If the path is not in the co-domain, returns an empty path. Parameters path (Path) – property isIdentity bool Return true if the map function is the identity function. The identity function has an identity path mapping and time offset. Type type property isIdentityPathMapping bool Return true if the map function uses the identity path mapping. If true, MapSourceToTarget() always returns the path unchanged. However, this map function may have a non-identity time offset. Type type property isNull bool Return true if this map function is the null function. For a null function, MapSourceToTarget() always returns an empty path. Type type property sourceToTargetMap PathMap The set of path mappings, from source to target. Type type property timeOffset LayerOffset The time offset of the mapping. Type type class pxr.Pcp.NodeRef PcpNode represents a node in an expression tree for compositing scene description. A node represents the opinions from a particular site. In addition, it may have child nodes, representing nested expressions that are composited over/under this node. Child nodes are stored and composited in strength order. Each node holds information about the arc to its parent. This captures both the relative strength of the sub-expression as well as any value- mapping needed, such as to rename opinions from a model to use in a particular instance. Methods: CanContributeSpecs() Returns true if this node is allowed to contribute opinions for composition, false otherwise. GetDepthBelowIntroduction() Return the number of levels of namespace this node's site is below the level at which it was introduced by an arc. GetIntroPath() Get the path that introduced this node. GetOriginRootNode() Walk up to the root origin node for this node. GetPathAtIntroduction() Returns the path for this node's site when it was introduced. GetRootNode() Walk up to the root node of this expression. IsDueToAncestor() IsRootNode() Returns true if this node is the root node of the prim index graph. Attributes: arcType ArcType children hasSpecs None hasSymmetry None isCulled bool isInert bool isRestricted bool layerStack LayerStack mapToParent MapExpression mapToRoot MapExpression namespaceDepth int origin parent path Path permission Permission siblingNumAtOrigin int site LayerStackSite CanContributeSpecs() → bool Returns true if this node is allowed to contribute opinions for composition, false otherwise. GetDepthBelowIntroduction() → int Return the number of levels of namespace this node’s site is below the level at which it was introduced by an arc. GetIntroPath() → Path Get the path that introduced this node. Specifically, this is the path the parent node had at the level of namespace where this node was added as a child. For a root node, this returns the absolute root path. See also GetDepthBelowIntroduction() . GetOriginRootNode() → NodeRef Walk up to the root origin node for this node. This is the very first node that caused this node to be added to the graph. For instance, the root origin node of an implied inherit is the original inherit node. GetPathAtIntroduction() → Path Returns the path for this node’s site when it was introduced. GetRootNode() → NodeRef Walk up to the root node of this expression. IsDueToAncestor() → bool IsRootNode() → bool Returns true if this node is the root node of the prim index graph. property arcType ArcType Returns the type of arc connecting this node to its parent node. Type type property children property hasSpecs None Returns true if this node has opinions authored for composition, false otherwise. Type type property hasSymmetry None Get/set whether this node provides any symmetry opinions, either directly or from a namespace ancestor. Type type property isCulled bool Type type property isInert bool Type type property isRestricted bool Type type property layerStack LayerStack Returns the layer stack for the site this node represents. Type type property mapToParent MapExpression Returns mapping function used to translate paths and values from this node to its parent node. Type type property mapToRoot MapExpression Returns mapping function used to translate paths and values from this node directly to the root node. Type type property namespaceDepth int Returns the absolute namespace depth of the node that introduced this node. Note that this does not count any variant selections. Type type property origin property parent property path Path Returns the path for the site this node represents. Type type property permission Permission type : None Get/set the permission for this node. This indicates whether specs on this node can be accessed from other nodes. Type type property siblingNumAtOrigin int Returns this node’s index among siblings with the same arc type at this node’s origin. Type type property site LayerStackSite Get the site this node represents. Type type class pxr.Pcp.PrimIndex PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics. PcpComputePrimIndex() builds an index (“indexes”) the given prim site. At any site there may be scene description values expressing arcs that represent instructions to pull in further scene description. PcpComputePrimIndex() recursively follows these arcs, building and ordering the results. Methods: ComposeAuthoredVariantSelections() Compose the authored prim variant selections. ComputePrimChildNames(nameOrder, ...) Compute the prim child names for the given path. ComputePrimPropertyNames(nameOrder) Compute the prim property names for the given path. DumpToDotGraph(filename, ...) Dump the prim index in dot format to the file named filename . DumpToString(includeInheritOriginInfo, ...) Dump the prim index contents to a string. GetNodeProvidingSpec(primSpec) Returns the node that brings opinions from primSpec into this prim index. GetSelectionAppliedForVariantSet(variantSet) Return the variant selection applied for the named variant set. IsInstanceable() Returns true if this prim index is instanceable. IsValid() Return true if this index is valid. PrintStatistics() Prints various statistics about this prim index. Attributes: hasAnyPayloads localErrors list[PcpError] primStack rootNode NodeRef ComposeAuthoredVariantSelections() → SdfVariantSelectionMap Compose the authored prim variant selections. These are the variant selections expressed in scene description. Note that these selections may not have actually been applied, if they are invalid. This result is not cached, but computed each time. ComputePrimChildNames(nameOrder, prohibitedNameSet) → None Compute the prim child names for the given path. errors will contain any errors encountered while performing this operation. Parameters nameOrder (list[TfToken]) – prohibitedNameSet (PcpTokenSet) – ComputePrimPropertyNames(nameOrder) → None Compute the prim property names for the given path. errors will contain any errors encountered while performing this operation. The nameOrder vector must not contain any duplicate entries. Parameters nameOrder (list[TfToken]) – DumpToDotGraph(filename, includeInheritOriginInfo, includeMaps) → None Dump the prim index in dot format to the file named filename . See Dump(...) for information regarding arguments. Parameters filename (str) – includeInheritOriginInfo (bool) – includeMaps (bool) – DumpToString(includeInheritOriginInfo, includeMaps) → str Dump the prim index contents to a string. If includeInheritOriginInfo is true , output for implied inherit nodes will include information about the originating inherit node. If includeMaps is true , output for each node will include the mappings to the parent and root node. Parameters includeInheritOriginInfo (bool) – includeMaps (bool) – GetNodeProvidingSpec(primSpec) → NodeRef Returns the node that brings opinions from primSpec into this prim index. If no such node exists, returns an invalid PcpNodeRef. Parameters primSpec (PrimSpec) – GetNodeProvidingSpec(layer, path) -> NodeRef Returns the node that brings opinions from the Sd prim spec at layer and path into this prim index. If no such node exists, returns an invalid PcpNodeRef. Parameters layer (Layer) – path (Path) – GetSelectionAppliedForVariantSet(variantSet) → str Return the variant selection applied for the named variant set. If none was applied, this returns an empty string. This can be different from the authored variant selection; for example, if the authored selection is invalid. Parameters variantSet (str) – IsInstanceable() → bool Returns true if this prim index is instanceable. Instanceable prim indexes with the same instance key are guaranteed to have the same set of opinions, but may not have local opinions about name children. PcpInstanceKey IsValid() → bool Return true if this index is valid. A default-constructed index is invalid. PrintStatistics() → None Prints various statistics about this prim index. property hasAnyPayloads property localErrors list[PcpError] Return the list of errors local to this prim. Type type property primStack property rootNode NodeRef Returns the root node of the prim index graph. Type type class pxr.Pcp.PropertyIndex PcpPropertyIndex is an index of all sites in scene description that contribute opinions to a specific property, under composition semantics. Attributes: localErrors list[PcpError] localPropertyStack propertyStack property localErrors list[PcpError] Return the list of errors local to this property. Type type property localPropertyStack property propertyStack class pxr.Pcp.Site A site specifies a path in a layer stack of scene description. Attributes: layerStack path property layerStack property path © Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.
install_guide_linux.md
Installation on Linux — Omniverse Launcher latest documentation Omniverse Launcher » Omniverse Launcher » Installation Guide » Installation on Linux   # Installation on Linux ## Prerequisites for Installation There are two elements that you need to have prior to starting the installation process. Both components are available within the NVIDIA Licensing Portal (NLP). It’s important to note that the entitlements themselves are provided to the person at the company who makes the purchase, and that person can add others (including the IT Managers) to the Licensing Portal so that they can grab the components listed below. You can read more about this process as part of Enterprise Quick Start Guide. Download the IT Managed Launcher Installer. (.AppImage) AppImage since you’re running Linux Your Organization Name Identifier (org-name). To find the IT Managed Launcher executable on the NLP: Once you’ve logged into the Portal, go to the Software Downloads section and look for the NVIDIA Omniverse IT Managed Launcher for your platform of choice (Linux in this case). Click Download to initiate the download process of the installer. Note Once the installer is downloaded, you should place it onto your designated staging hardware inside of your company firewall. Next you’ll grab your Organization’s Name Identifier (org-name). To do this, at the top of the portal, hover your mouse over your user account until you see a View Settings message pop up. (See image below) Within the resulting My Info dialog, under the Organization area, you will see an org-name section. The information that is presented there represents your Organization Name and will be required later. View Settings: Be sure to capture this information before you begin the installation process. You will need it to install the IT Managed Launcher as well as configure your enterprise enablement. Organization Name Once you have this information, it’s time to install the IT Managed Launcher. There are two ways to install the IT Managed Launcher on Linux. Manually: You can install the Launcher manually on a user’s workstation directly (e.g. Terminal / Bash) Deployment: You can pre-configure the Launcher to be installed as part of a deployment software strategy (e.g. SaltStack). We will cover both options below. ## Terminal / Bash ### Deploying Launcher To install the IT Managed Launcher on Linux (Ubuntu 20.04 and 22.04), follow these steps: Run the IT Managed Launcher by launching the AppImage you downloaded from the Licensing Portal locally on users workstations. Important On Linux, instead of running the IT Managed Launcher installer, you first need to set the AppImage as an executable program and launch it. This will register the app as the default handler for omniverse-launcher:// custom URLs described elsewhere in this document that installs the applications themselves.. For Ubuntu users, make sure you have done the following so that the AppImage will launch. From the Terminal, first run: > sudo apt install libfuse2 Then make sure you check the permissions of the downloaded AppImage file to verify that it can be run as a program. Using the UI, right-click on the AppImage and choose Properties. Go to the Permissions section and ensure that the Allow executing file as program checkbox is checked. Or, from the Terminal, in the directory where the AppImage was saved: > chmod +x omniverse-launcher-linux-enterprise.AppImage Once those items are completed, you should be able to double-click on the AppImage package and have it run. Or, run it from the Terminal: > ./omniverse-launcher-linux-enterprise.AppImage ### Setting up TOML Files ( Learn more about TOML syntax: https://toml.io/en/ ) 1) When the AppImage launches, you’ll immediately be prompted to set a number of default locations for Omniverse. These paths determine where Omniverse will place the installed applications (Library Path), data files (Data Path), content files (Content Path) and Cache information. All of the paths set here will be recorded and stored within an omniverse.toml file for later editing as needed. It’s important to note that all of the paths can be changed as per preference and/or IT Policy at a later time. By default, the installer takes all of your path preferences and stores them in the following folder structure: ~/Home/.nvidia-omniverse/config 2) Once you’ve set the default paths for Omniverse to use, click on the Continue Button. You should now be presented with a blank Library window inside of the launcher. 3) Close the IT Managed Launcher. At this point, the IT Managed Launcher is installed. However, before you start to install Omniverse applications, you’ll need to add two additional, important configuration files. When you look at the default configuration location in Linux (~/Home/.nvidia-omniverse/config), you should see the omniverse.toml file that the installer added as shown below. This omniverse.toml file is the primary configuration file for the IT Managed Launcher. Within this configuration file, the following paths are described, and they should match the selections you made in step 1. Be aware that you can set these after the installation to different paths as needed for security policy at any time. [paths] library_root = "/home/myuser/.local/share/ov/pkg" # Path where to install all applications data_root = "/home/myuser/.local/share/ov/data" # Folder where Launcher and Omniverse apps store their data files cache_root = "/home/myuser/.cache/ov" # Folder where Omniverse apps store their cache and temporary files logs_root = "/home/myuser/.nvidia-omniverse/logs" # Folder where Launcher and Omniverse apps store their logs extension_root = /home/myuser/Documents/kit/shared/exts # Folder where all Omniverse shared extensions are stored content_root = "/home/myuser/Downloads" # Folder where Launcher saves downloaded content packs confirmed = true # Confirmation that all paths are set correctly, must be set to `true` Note If a system administrator doesn’t want to allow users to change these paths, the omniverse.toml file can be marked as read-only. Also, if a System Administrator plans to install the IT Managed Launcher to a shared location like ~/Home/Shared on Linux, they need to specify a shared folder for library_root and logs_root path in the omniverse.toml file. You’re now going to add two additional files to this /config folder in addition to the omniverse.toml file. privacy.toml file to record consent choices for data collection and capture of crash logs. license.toml to provide your license details. Important By opting into telemetry, you can help improve the performance & stability of the software. For more details on what data is collected and how it is processed see this section. 4) Within the /config folder, create a text file named privacy.toml, which is the configuration file for Omniverse telemetry. Within this privacy file, specify the following: [privacy] performance = true personalization = true usage = true Once this file contains these four lines, save the file. Note If your IT or Security Policy prohibits the collection of telemetry, set all of these values to false. 5) For the last file needed in this folder, create a text file named license.toml, which is the licensing configuration file for Omniverse. Within this licensing file, specify the Organization Name Identifier (org-name) you retrieved from the Licensing Portal: [ovlicense] org-name = "<insert-your-org-name-here>" Once this file contains these two lines, save the file. When you’ve completed these steps, your ~/Home/.nvidia-omniverse/config folder should have the directory and .toml files like the screenshot below: That completes the IT Managed Launcher installation for Linux and Omniverse applications can now be installed to users’ workstations. ### Setting Up Packages Once the Omniverse IT Managed Launcher is installed and configured, you’re ready to install the Omniverse foundation applications for your users. As an IT Manager, you now need to download the various Omniverse foundation applications from the Omniverse Enterprise Web Portal. Each application will come in the form of an archived .zip file that you can take to a user’s machine and install either manually, or via your internal deployment framework. 1) To begin, log into the Omniverse Enterprise Web Portal. 2) In the left-hand navigation area, select Apps, and from the resulting view, click on the tile of the Omniverse foundation application you want to install. 3) Available releases are categorized by release channel. A release is classified as Beta, Release, or Enterprise, depending on its maturity and stability. Beta Beta builds may or may not be feature complete or fully stable. These are good for testing new Omniverse functionality, but aren’t guaranteed to be ready for production. Release Release builds (also known as GA or General Availability) are feature complete and stable builds ready for production. Enterprise Enterprise builds are provided for Enterprise customers and represent supported production versions of Omniverse software. 4) Select a package version in the dropdown list and click Download. 5) Clicking the download button will prompt you to select the Windows or Linux version of the application to install. Choose the OS version that matches the user’s workstation’s OS. 6) Once downloaded, the application archive must then be transferred to the user’s machine or hosted on your chosen local network staging hardware so it can be accessed and installed on a user’s workstation. Once you’ve downloaded the various Omniverse foundation applications, you are ready to proceed to the installation. ### Deploying the Apps Installation of the Omniverse applications is handled via a custom protocol URL on the user’s machine or using a deployment framework like SaltStack to manage the process and trigger the IT Managed Launcher to run and install the chosen application. The most basic way to install Omniverse foundation applications is to open a custom protocol URL directly on the user’s machine. The simple command below will trigger the IT Managed Launcher to run the installation routine for the given Omniverse application .zip archive. The format of the custom protocol can vary depending on the command line interface used, but as a general rule of thumb, the settings are as follows: omniverse-launcher://install?path=<package.zip> Where <package.zip> represents the name and path where the downloaded application archive is on the local workstation. Be aware that it does not matter where you place the archive, the custom protocol will install the application to its default location based on the library_root path in the omniverse.toml file that you configured earlier as part of the IT Managed Launcher installation process. Terminal Example: xdg-open omniverse-launcher://install?path=/var/packages/usd_explorer.zip When the command is run, it will trigger the IT Managed Launcher to open and it will begin the installation process. You should see a screen similar to the one below that shows the progress bar for the application being installed in the upper right of the Launcher window. Once the installation is complete, the Omniverse application will appear in the Library section of the Launcher window and these steps can be repeated for any additional applications you want to make available to your users. ## SaltStack To deploy the IT Managed Launcher executable file to users’ Linux workstations you will need to perform several tasks. You’ll need to download and stage the IT Managed Launcher .AppImage file and place it on the Salt master under the file storage location listed under files_roots in /etc/salt/master. For example: file_roots: base: - /srv/salt Next, you’ll create and pre-configure a user’s omniverse.toml, policy.toml and license.toml files and stage them in the same shared network location. After that, you’ll create an omniverse.SLS template Salt file to control the installation process and reference .toml files you’ve set up. Finally, you’ll configure the top.sls Salt file within the Windows Local Group Policy to execute at user logon to trigger the installation and configuration of the IT Managed Launcher for the user on their local workstation. As per the prerequisite section of this document, you should have already downloaded the Linux version of the IT Managed Launcher install file from the Enterprise Web Portal. If not, please do that first and place it in the Salt master under the file storage location as described above. ### Setting up TOML Files The first step is to create and stage the three .toml files for deployment. omniverse.toml: Copy the following information into a new text document, replacing the path information with the location you want Omniverse and its data installed on each user’s workstation. Once done, save it to the Salt master file storage location (/srv/salt). [paths] library_root = "/home/myuser/.local/share/ov/pkg" # Path where to install all applications data_root = "/home/myuser/.local/share/ov/data" # Folder where Launcher and Omniverse apps store their data files cache_root = "/home/myuser/.cache/ov" # Folder where Omniverse apps store their cache and temporary files logs_root = "/home/myuser/.nvidia-omniverse/logs" # Folder where Launcher and Omniverse apps store their logs extension_root = /home/myuser/Documents/kit/shared/exts # Folder where all Omniverse shared extensions are stored content_root = "/home/myuser/Downloads" # Folder where Launcher saves downloaded content packs confirmed = true # Confirmation that all paths are set correctly, must be set to `true` Where /myuser/ represents the local user’s account. privacy.toml: Copy the following information into a new text document. This is the configuration file for Omniverse telemetry capture for each user’s workstation. Once done, save it to the Salt master file storage location (/srv/salt). [privacy] performance = true personalization = true usage = true Note If your IT or Security Policy prohibits the collection of telemetry on a user’s workstation, set all of the values in the file to false. license.toml: This is the licensing configuration file for Omniverse. Within this licensing file, specify the Organization Name Identifier (org-name) you retrieved from the Licensing Portal in the prerequisites section. Once done, save it to the staging location (/srv/salt`). [ovlicense] org-name = "<insert-your-org-name-here>" Once you’ve saved all three .toml files, it’s time to build the script file that will be used to help deploy the files to each user’s workstation. ### Deploying Launcher 1) Create a new omniverse.SLS Salt template in /srv/salt with the following information: omniverse_enterprise_launcher: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/Omniverse/launcher.AppImage - source: salt://Launcher.AppImage omniverse_config_toml: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/.nvidia-omniverse/config/omniverse.toml - source: salt://omniverse.toml omniverse_privacy_toml: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/.nvidia-omniverse/config/privacy.toml - source: salt://privacy.toml omniverse_license_toml: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/.nvidia-omniverse/config/license.toml - source: salt://license.toml omniverse_dirs: file.directory: - user: ubuntu - group: ubuntu - mode: 777 - names: - /home/ubuntu/Omniverse - /home/ubuntu/Omniverse/logs - /home/ubuntu/Omniverse/data - /home/ubuntu/Omniverse/cache - /home/ubuntu/.nvidia-omniverse/logs 2) With that ready, you now need to add this omniverse template to your top.sls file. base: 'omni*': # All minions with a minion_id that begins with "omni" - omniverse 3) Apply the Salt state: salt 'omni*' state.apply 4) When the user logs into their desktop, have them run ./Omniverse/launcher.AppImage from a terminal. This will open the IT Managed Launcher. ### Setting up Packages Once the Omniverse IT Managed Launcher is installed and configured, you’re ready to install the Omniverse foundation applications for your users. As an IT Manager, you now need to download the various Omniverse foundation applications from the Omniverse Enterprise Web Portal. Each application will come in the form of an archived .zip file that you can take to a user’s machine and install either manually, or via your internal deployment framework. 1) To begin, log into the Omniverse Enterprise Web Portal. 2) In the left-hand navigation area, select Apps, and from the resulting view, click on the tile of the Omniverse foundation application you want to install. Available releases are categorized by release channel. A release is classified as Beta, Release, or Enterprise, depending on its maturity and stability. Beta Beta builds may or may not be feature complete or fully stable. These are good for testing new Omniverse functionality, but aren’t guaranteed to be ready for production. Release Release builds (also known as GA or General Availability) are feature complete and stable builds ready for production. Enterprise Enterprise builds are provided for Enterprise customers and represent supported production versions of Omniverse software. 3) Select a package version in the dropdown list and click Download. 4) Clicking the download button will prompt you to select the Windows or Linux version of the application to install. Choose the OS version that matches the user’s workstation. 5) Once downloaded, the application archive must then be transferred to the user’s machine or hosted on your chosen local network staging hardware so it can be accessed and installed on a user’s workstation. Once you’ve downloaded the various Omniverse foundation applications, you are ready to proceed to the installation. ### Deploying the Apps 1) To deploy usd_explorer in your SaltStack, update your omniverse.SLS Salt template in /srv/salt to include the following information: omniverse_enterprise_launcher: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/Omniverse/launcher.AppImage - source: salt://Launcher.AppImage omniverse_usd_explorer_zip: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/Omniverse/usd_explorer.zip - source: salt://usd_explorer.zip omniverse_config_toml: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/.nvidia-omniverse/config/omniverse.toml - source: salt://omniverse.toml omniverse_privacy_toml: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/.nvidia-omniverse/config/privacy.toml - source: salt://privacy.toml omniverse_license_toml: file.managed: - user: ubuntu - group: ubuntu - mode: 777 - name: /home/ubuntu/.nvidia-omniverse/config/license.toml - source: salt://license.toml omniverse_dirs: file.directory: - user: ubuntu - group: ubuntu - mode: 777 - names: - /home/ubuntu/Omniverse - /home/ubuntu/Omniverse/logs - /home/ubuntu/Omniverse/data - /home/ubuntu/Omniverse/cache - /home/ubuntu/.nvidia-omniverse/logs 2) Apply the Salt state: salt ‘omni*’ state.apply. 3) When the user logs in to the desktop, have them run: > ./Omniverse/launcher.AppImage This will open the launcher. 4) From a separate terminal, have them run: > xdg-open omniverse-launcher://install?path=./Omniverse/code.zip When it completes, they will have the code extension installed in their launcher. © Copyright 2023-2024, NVIDIA. Last updated on Apr 15, 2024.