Add basic site support to Mjcf SdfFileFormat plugin.

We will still need to tag these with a custom API schema to ease round-tripping but that will follow creation of such a schema.

PiperOrigin-RevId: 746421793
Change-Id: I2df2209b4bc90d763718fb4bea8158b8598755c6
This commit is contained in:
Sam Haves
2025-04-11 05:26:59 -07:00
committed by Copybara-Service
parent 440ce5eb7a
commit 446a8f1742
5 changed files with 214 additions and 55 deletions
@@ -29,12 +29,26 @@
#define EXPECT_PRIM_VALID(stage, path) \
EXPECT_TRUE((stage)->GetPrimAtPath(SdfPath(path)).IsValid());
#define EXPECT_PRIM_IS_A(stage, path, type) \
{ \
EXPECT_TRUE((stage)->GetPrimAtPath(SdfPath(path)).IsA<type>()); \
}
#define EXPECT_PRIM_KIND(stage, path, kind) \
{ \
pxr::TfToken prim_kind; \
pxr::UsdModelAPI::Get(stage, SdfPath(path)).GetKind(&prim_kind); \
EXPECT_EQ(kind, prim_kind); \
}
#define EXPECT_PRIM_PURPOSE(stage, path, purpose) \
{ \
pxr::TfToken prim_purpose; \
pxr::UsdGeomImageable::Get(stage, SdfPath(path)) \
.GetPurposeAttr() \
.Get(&prim_purpose); \
EXPECT_EQ(prim_purpose, purpose); \
}
namespace mujoco {
pxr::SdfLayerRefPtr LoadLayer(const std::string& xml);