# Creating variations of a Schema Type

**URL:** <https://forum.aousd.org/t/creating-variations-of-a-schema-type/1980>\
**Category:** USD\
**Created:** [November 7, 2024, 11:13pm UTC](https://forum.aousd.org/t/creating-variations-of-a-schema-type/1980 "2024-11-07T23:13:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [November 7, 2024, 11:13pm UTC](https://forum.aousd.org/t/creating-variations-of-a-schema-type/1980/1 "2024-11-07T23:13:28Z")

</div>

I’m defining a custom schema and I want to have two versions of a prim, one that’s spatial (Xform) and another that’s not

I was hoping to define one “ApplePie” and then make the spatial one inherit from both it and Xform. “AppleSpatialPie”

But usdGenSchema says Schemas can only inherit from one other schema at most. This schema inherits from 2

Any ideas on how to achieve something like this?  
Of course, I could always duplicate everything, but it would be nice to make use of inheritance here.

---

<div class="post-metadata">

**Author:** ![dhruvgovil](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/dhruvgovil/32/3_2.png) [@dhruvgovil](https://forum.aousd.org/u/dhruvgovil)\
**Post date:** [November 7, 2024, 11:20pm UTC](https://forum.aousd.org/t/creating-variations-of-a-schema-type/1980/2 "2024-11-07T23:20:58Z")

</div>

Actually it turns out there’s an example in the docs further down which does the trick

```auto
# Example of a concrete, typed (IsA) schema with built-in applied API schemas
class MyCustomPrim "MyCustomPrim" (
    inherits = </Typed>
 
    # These listed applied API schemas will be built-in to this schema type.
    prepend apiSchemas = ["ExampleSingleApplyAPI", "ExampleMultiApplyAPI:foo"]
) {
    # Example of a fallback value override for a theoretical property defined in 
    # the API schema instance "ExampleMultiApplyAPI:foo"
    bool exampleMulti:foo:boolAttr = true (
        customData = {
            bool apiSchemaOverride = true
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)\
**Post date:** [November 27, 2024, 1:06am UTC](https://forum.aousd.org/t/creating-variations-of-a-schema-type/1980/3 "2024-11-27T01:06:02Z")

</div>

Right on, @dhruvgovil. The concrete UsdLux light types use this pattern, and we might be leveraging it pretty significantly in the not-too-distant future to support other new features with existing schemas.
