Add mjs_findElement() to find any element in a spec by name.
Also, remove mjs_findMesh() and mjs_findKeyframe(). PiperOrigin-RevId: 670978980 Change-Id: Id88b800eb8a4c5efc40866f72a4442bf1d1437d0
This commit is contained in:
committed by
Copybara-Service
parent
0e8c0b80eb
commit
d3dfa6f970
+1
-1
@@ -592,7 +592,7 @@ mjsGeom* mjXURDF::Geom(XMLElement* geom_elem, mjsBody* pbody, bool collision) {
|
||||
meshname = mjuu_stripext(meshname);
|
||||
|
||||
// look for existing mesh
|
||||
mjsMesh* mesh = mjs_findMesh(spec, meshname.c_str());
|
||||
mjsMesh* mesh = mjs_asMesh(mjs_findElement(spec, mjOBJ_MESH, meshname.c_str()));
|
||||
mjsMesh* pmesh = 0;
|
||||
|
||||
// does not exist: create
|
||||
|
||||
Reference in New Issue
Block a user