Copy texture coordinates from OBJ into flex. Fixes #2464.
PiperOrigin-RevId: 732109960 Change-Id: I506b3540ab5d489ce8f10d0c473919611ccb654a
This commit is contained in:
committed by
Copybara-Service
parent
06e217df7e
commit
7651cb1b33
@@ -324,8 +324,8 @@ const char* MJCF[nMJCF][mjXATTRNUM] = {
|
||||
|
||||
{"deformable", "*", "0"},
|
||||
{"<"},
|
||||
{"flex", "*", "12", "name", "group", "dim", "radius", "material",
|
||||
"rgba", "flatskin", "body", "vertex", "element", "texcoord", "node"},
|
||||
{"flex", "*", "13", "name", "group", "dim", "radius", "material",
|
||||
"rgba", "flatskin", "body", "vertex", "element", "texcoord", "facetexcoord", "node"},
|
||||
{"<"},
|
||||
{"contact", "?", "13", "contype", "conaffinity", "condim", "priority",
|
||||
"friction", "solmix", "solref", "solimp", "margin", "gap",
|
||||
@@ -1354,6 +1354,10 @@ void mjXReader::OneFlex(XMLElement* elem, mjsFlex* flex) {
|
||||
if (texcoord.has_value()) {
|
||||
mjs_setFloat(flex->texcoord, texcoord->data(), texcoord->size());
|
||||
}
|
||||
auto facetexcoord = ReadAttrVec<int>(elem, "facetexcoord");
|
||||
if (facetexcoord.has_value()) {
|
||||
mjs_setInt(flex->facetexcoord, facetexcoord->data(), facetexcoord->size());
|
||||
}
|
||||
|
||||
// contact subelement
|
||||
XMLElement* cont = FirstChildElement(elem, "contact");
|
||||
|
||||
Reference in New Issue
Block a user