Variants Example in Katana
VERIFIED ON USD VERSION 18.11
Ensure that you have setup your Katana USD Plugins properly.
This is a proof-of-concept example of how one might expose USD variant switching in Katana. The scene shown here is located at USD/extras/usd/tutorials/exampleModelingVariantsKatana , which contains the katana file (exampleModelingVariants.katana) and a USD asset with modeling variants (ExampleModelingVariants.usd and associated usd files).
When bringing up the USD asset in usdview, we can select our prim, /ExampleModelingVariants which will populate a pane in the lower right hand side called " Meta Data". In this section, we can select different variants. For illustration, click that selector and choose "Torus".
From there you will see the variant change.
Now open exampleModelingVariants.katana in Katana. The model, ExampleModelingVariants, can be toggled between its various shapes with the provided PxrUsdInVariantSelect node. Simply target the model scenegraph location and the authored variant set names will auto-populate. Select "modelingVariant" in the variantSetName parameter and the variantSelection list will populate with the shape variants.