Move meshdir and texturedir to mjsCompiler.
For backwards compatibility in the Python bindings, both `spec.compiler.meshdir` and `spec.meshdir` are now allowed. Fixes #2834. PiperOrigin-RevId: 809060113 Change-Id: Ie23f1c5dd57de43568312a8e062906f4013bb474
This commit is contained in:
committed by
Copybara-Service
parent
681f5767b2
commit
77e025ea98
@@ -1067,16 +1067,16 @@ void mjXReader::Compiler(XMLElement* section, mjSpec* s) {
|
||||
memcpy(s->compiler.eulerseq, text.c_str(), 3);
|
||||
}
|
||||
if (ReadAttrTxt(section, "assetdir", text)) {
|
||||
mjs_setString(s->meshdir, text.c_str());
|
||||
mjs_setString(s->texturedir, text.c_str());
|
||||
mjs_setString(s->compiler.meshdir, text.c_str());
|
||||
mjs_setString(s->compiler.texturedir, text.c_str());
|
||||
}
|
||||
// meshdir and texturedir take precedence over assetdir
|
||||
string meshdir, texturedir;
|
||||
if (ReadAttrTxt(section, "meshdir", meshdir)) {
|
||||
mjs_setString(s->meshdir, meshdir.c_str());
|
||||
mjs_setString(s->compiler.meshdir, meshdir.c_str());
|
||||
};
|
||||
if (ReadAttrTxt(section, "texturedir", texturedir)) {
|
||||
mjs_setString(s->texturedir, texturedir.c_str());
|
||||
mjs_setString(s->compiler.texturedir, texturedir.c_str());
|
||||
}
|
||||
if (MapValue(section, "discardvisual", &n, bool_map, 2)) {
|
||||
s->compiler.discardvisual = (n == 1);
|
||||
|
||||
Reference in New Issue
Block a user