Add displayColor authoring to site geometry when converting MJCF to USD.
PiperOrigin-RevId: 789311878 Change-Id: I70027cd5d8d02f4ee26043f3b9fb03311e38984b
This commit is contained in:
committed by
Copybara-Service
parent
82cf27992d
commit
b5368a3385
@@ -350,6 +350,25 @@ TEST_F(MjcfSdfFileFormatPluginTest, TestGeomRgba) {
|
||||
pxr::VtArray<float>{0.9});
|
||||
}
|
||||
|
||||
TEST_F(MjcfSdfFileFormatPluginTest, TestSiteRgba) {
|
||||
static constexpr char kXml[] = R"(
|
||||
<mujoco model="test">
|
||||
<worldbody>
|
||||
<site type="sphere" name="sphere_red" size="1" rgba="1 0 0 1"/>
|
||||
</worldbody>
|
||||
</mujoco>
|
||||
)";
|
||||
|
||||
pxr::SdfLayerRefPtr layer = LoadLayer(kXml);
|
||||
auto stage = pxr::UsdStage::Open(layer);
|
||||
|
||||
EXPECT_PRIM_VALID(stage, "/test/sphere_red");
|
||||
ExpectAttributeEqual(stage, "/test/sphere_red.primvars:displayColor",
|
||||
pxr::VtArray<pxr::GfVec3f>{{1, 0, 0}});
|
||||
EXPECT_ATTRIBUTE_HAS_NO_VALUE(stage,
|
||||
"/test/sphere_red.primvars:displayOpacity");
|
||||
}
|
||||
|
||||
TEST_F(MjcfSdfFileFormatPluginTest, TestFaceVaryingMeshSourcesSimpleMjcfMesh) {
|
||||
static constexpr char kXml[] = R"(
|
||||
<mujoco model="mesh test">
|
||||
|
||||
Reference in New Issue
Block a user