Testing a Scene with Static Analysis
The Static Analysis viewport analyzes your scene using a default set of tests. The tests run against elements in the scene and report back on whether certain criteria have failed, such as floating vertices, empty groups, and unused images. Each failed test has preset actions that you can perform to cause failing tests to complete successfully, either by remedying the problem or setting the test to a known fail state.
Static Analysis is similar to Mesh Cleanup and Scene Cleanup, but it has a richer set of test criteria. Static Analysis also provides the tools to create your own scene tests using six static analysis functions. You can find example tests in the Modo bundle here:
<install_directory>/resrc/Python2Kit/extra64/Python/Scripts/lxserv/
• staticanalysis_MiscTests.py
• staticAnalysis_SceneCleanup.py
• staticAnalysis_USD.py
Running the Analysis
-
Load the scene you want to analyze using the File > Open menu.
-
In the Modo layout, click the custom viewports button and set Custom A to Expanded.
-
Click the new custom viewport button to display the side-by-side viewport and then click the Viewport Widget Menu arrow to display a list of viewports.
-
Navigate to Application > Static Analysis Viewport to load the default tests.
-
Select the tests you want to run against the scene using the Category and Items dropdowns. You can also control which tests are visible in the test run using the Settings button.
-
Click Refresh to run the selected tests against the scene. Successful tests are displayed in green and failed tests in orange.
-
Expand nested test results using the arrows on the left of the viewport and select an action for the test using the dropdown on the right of the viewport.
-
For example, the USD - Space in Item Name test has failed in this analysis run. Click the dropdown to display the available options.
-
Run the analysis as many times as required by clicking the Refresh button.
• Select - highlights the item in the Scenes tab that has failed the selected test.
• Fix - fix the failing item, in this case by adding another underscore to the name Lipstick_Lower_Mesh.
• Ignore - set this test to a known fail state, which removes it from future test runs. You might do this if you know that the test is failing for a valid reason, such as you client asked for this particular naming convention.
• Options - displays a list of other actions that apply to the this test. In this example, you can replace the space in the item name with a character of your choice.
Fixed and Ignored tests are removed from future runs, so when the analysis returns no failures you can be sure that your scene is in the best state possible before you render the results.