Skip to content

Commit

Permalink
Allow removing variant specs
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy committed Nov 30, 2023
1 parent 3e27bd0 commit 84de175
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion usd_qtpy/lib/usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ def remove_spec(spec):
del spec.owner.properties[spec.name]

elif isinstance(spec, Sdf.VariantSetSpec):
# Owner is Sdf.PrimSpec (or can also be Sdf.VariantSpec)
del spec.owner.variantSets[spec.name]

elif isinstance(spec, Sdf.VariantSpec):
# Owner is Sdf.VariantSetSpec
spec.owner.RemoveVariant(spec)

else:
raise TypeError(f"Unsupported spec type: {spec}")
raise TypeError(f"Unsupported spec type: {spec}")

0 comments on commit 84de175

Please sign in to comment.