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 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. |
10 |
Save fixes |
Additional option when fixing issues. Saving fixes can be useful when dealing with multiple layers or multiple fixes. |
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 Output
to a .csv file.
Fixing Issues
Asset validation includes new functionality to fix issues. Issues that have suggestions can make use of Fix Selected
and Fix and Save Selected
.
Just select the issue(s) you are interested to fix and select the corresponding action.
Fix Selected
will perform the fix. Once the scene is fixed, you can save your changes by saving the scene.
Additionally, you can change the persist selection to Save fixes
. You do not need to save the scene anymore. This is useful for reference layers or when dealing with multiple issues and/or files.
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.
Finally, clicking on the Suggestion
(in the example above Compute the extents
) will fix a single issue. It will persist the fix if you have chosen the option Do persist fixes
.
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 theenabledCategories
/disabledCategories
settings inomni.asset_validator.core
hideDisabledRules
can be used to exclude rules in the UI based on theenabledRules
/disabledRules
settings inomni.asset_validator.core
selectedCategories
can be used to select rules in the UI. While the above settings allow to show/hide rules/categories in the UI, this setting will default check them.
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.