Skip to content

Commit

Permalink
Adding info on changing metadata via variants
Browse files Browse the repository at this point in the history
Fixes #2326

(Internal change: 2271575)
  • Loading branch information
pixar-oss committed Apr 21, 2023
1 parent 51aa3fe commit 5fe81af
Showing 1 changed file with 32 additions and 8 deletions.
40 changes: 32 additions & 8 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3350,6 +3350,38 @@ with the addition of allowing the "-" character, and an optional leading ".".
{
}
A variant can contain overriding opinions (for properties, metadata, and more),
as well as any arbitrary scene description (entire child prim subtrees, etc).
Variants can also **include additional composition arcs**. This gives us great
flexibility in building up variations out of existing, modular pieces that
can be `referenced <#usdglossary-references>`_, `inherited
<#usdglossary-inherits>`_, etc. In the following example snippet, the
"referenceVariantSet" VariantSet contains two variants that reference different
USD assets. Changing the variant selection controls which asset is referenced in
the scene.

.. code-block:: usda
:caption: VariantSet with references
over "Model" (
prepend variantSets = "referenceVariantSet"
variants = {
string referenceVariantSet = "asset1"
}
)
{
variantSet "referenceVariantSet" = {
"asset1" (
prepend references = @Asset1.usda@
) {
}
"asset2" (
prepend references = @Asset2.usda@
) {
}
}
}
.. _usdglossary-variantset:

VariantSet
Expand Down Expand Up @@ -3447,14 +3479,6 @@ Here is an example of a very simple VariantSet:

..
* Each Variant can contain arbitrary scene description **including the
introduction of additional composition arcs**. This gives us great
flexibility in building up variations out of existing, modular pieces that
can be `referenced <#usdglossary-references>`_, `inherited
<#usdglossary-inherits>`_, etc.

..
* Because VariantSets are just composition arcs, this implies that
**VariantSets can be directly nested inside each other**, by allowing a
Variant of a VariantSet to introduce a new VariantSet. This allows a
Expand Down

0 comments on commit 5fe81af

Please sign in to comment.