int usd_setcollectionexpansionrule(int stagehandle, string collectionpath, string rule)
This function sets the expansion rule on the collection.
A handle to the stage to write to. Currently the only valid value is
0, which means the current stage in a node. (This argument may be used in the future to allow writing to other stages.)
The path to the collection.
The expansion rule to set on the collection.
USD supports a few standard expansion rules
explicitOnly- only paths in the include list and not in the exclude list belong to the collection
expandPrims- all the primitives at or below the includes (but not excludes) belong to the collection
expandPrimsbut also includes properties of matched primitives
The value of
stagehandle on success or
-1 on failure.
// Set the expansion rule on the cube's collection. string collection_path = usd_makecollectionpath(0, "/geo/cube", "some_collection"); usd_setcollectionexpansionrule(0, collection_foo, "explicitOnly");