| 32 | } // anonymous namespace |
| 33 | |
| 34 | void wrapVariantSpec() |
| 35 | { |
| 36 | def("CreateVariantInLayer", SdfCreateVariantInLayer); |
| 37 | |
| 38 | typedef SdfVariantSpec This; |
| 39 | |
| 40 | class_<This, SdfHandle<This>, bases<SdfSpec>, noncopyable> |
| 41 | ("VariantSpec", no_init) |
| 42 | .def(SdfPySpec()) |
| 43 | .def(SdfMakePySpecConstructor(&This::New)) |
| 44 | |
| 45 | .add_property("primSpec", &This::GetPrimSpec, |
| 46 | "The root prim of this variant.") |
| 47 | .add_property("owner", &This::GetOwner, |
| 48 | "The variant set that this variant belongs to.") |
| 49 | .add_property("name", |
| 50 | make_function(&This::GetName, |
| 51 | return_value_policy<return_by_value>()), |
| 52 | "The variant's name.") |
| 53 | .add_property("variantSets", |
| 54 | &_WrapGetVariantSetsProxy) |
| 55 | .def("GetVariantNames", &This::GetVariantNames) |
| 56 | ; |
| 57 | } |
nothing calls this directly
no test coverage detected