Features#
A feature is a reusable validation unit. It selects one or more requirements and can depend on other features.
For the factory profile, the custom feature adds a bounding-box check while depending on the built-in Minimal Placeable Visual feature. Enabling this one feature therefore enables both the factory dimensions and the baseline requirements needed for a placeable visual asset.
Metadata#
Feature descriptors can be authored as TOML:
id = "factory_bounds"
version = "1.0.0"
dependencies = ["com.nvidia.usd.minimal_placeable_visual@1.0.0"]
Use fully-qualified IDs, such as com.nvidia.usd.minimal_placeable_visual@1.0.0, when dependencies belong to another
package. The validation engine resolves them from the registered features at runtime.
When authoring Markdown feature descriptors, the feature ID is derived from the filename. In TOML, set id explicitly.
Requirements#
List the requirements contributed by the feature with the requirements field:
requirements = ["GEOMETRY.001@1.0.0"]
Requirements from dependent features are not repeated in this list. The validation engine resolves them from the
feature’s dependencies when the feature or a profile containing it is enabled.
Parameters#
A feature can define parameters. If a requirement defines a parameter and is part of the feature, the value defined by the feature overrides the requirement’s default. Parameters are matched by name, so no requirement code is needed.
In Markdown, add the table under a Parameters heading, using the same columns as a requirement:
| Parameter | Type | Default Value |
|---------------------|-------|---------------|
| TRANSFORM_TOLERANCE | float | 0.001 |
In TOML and JSON, use a parameters list whose items have the same fields as a requirement parameter:
[[parameters]]
display_name = "TRANSFORM_TOLERANCE"
type = "float"
assigned_value = 0.001
Parsing exposes the parameters as Feature.parameters. The type is declared again in the feature; it is not yet
checked against the requirement declaration, and the override is not yet applied to the requirement.
Configuration Pattern#
The feature selects the parameterized requirement; the requirement supplies default values. Runtime callers can then override those values:
nvidia_usd_validate \
--feature com.example.factory.factory_bounds \
--parameter MAX_X_METERS=4.0 \
--parameter MAX_Y_METERS=3.0 \
--parameter MAX_Z_METERS=2.5 \
path/to/factory_prop.usda
When a factory needs a different default policy, create a new requirement version with different defaults and point a new feature version at that requirement.
Complete Example#
id = "factory_bounds"
version = "1.0.0"
dependencies = [
"com.nvidia.usd.minimal_placeable_visual@1.0.0",
]
requirements = [
"GEOMETRY.001@1.0.0",
]