No public description
PiperOrigin-RevId: 809074980 Change-Id: Ib3e3522addceddba6a057cfef80fcbd30a420b3d
This commit is contained in:
committed by
Copybara-Service
parent
77e025ea98
commit
26ea20a21f
+12
-5
@@ -303,6 +303,9 @@ void mjCMesh::NameSpace(const mjCModel* m) {
|
||||
if (modelfiledir_.empty()) {
|
||||
modelfiledir_ = FilePath(m->spec_modelfiledir_);
|
||||
}
|
||||
if (meshdir_.empty()) {
|
||||
meshdir_ = FilePath(m->spec_meshdir_);
|
||||
}
|
||||
if (!plugin_instance_name.empty()) {
|
||||
plugin_instance_name = m->prefix + plugin_instance_name + m->suffix;
|
||||
}
|
||||
@@ -702,12 +705,12 @@ void mjCMesh::TryCompile(const mjVFS* vfs) {
|
||||
}
|
||||
|
||||
// copy paths from model if not already defined
|
||||
mujoco::user::FilePath meshdir_;
|
||||
meshdir_ = FilePath(mjs_getString(compiler->meshdir));
|
||||
|
||||
if (modelfiledir_.empty()) {
|
||||
modelfiledir_ = FilePath(model->modelfiledir_);
|
||||
}
|
||||
if (meshdir_.empty()) {
|
||||
meshdir_ = FilePath(model->meshdir_);
|
||||
}
|
||||
|
||||
// remove path from file if necessary
|
||||
if (model->strippath) {
|
||||
@@ -3128,6 +3131,9 @@ void mjCSkin::NameSpace(const mjCModel* m) {
|
||||
if (modelfiledir_.empty()) {
|
||||
modelfiledir_ = FilePath(m->spec_modelfiledir_);
|
||||
}
|
||||
if (meshdir_.empty()) {
|
||||
meshdir_ = FilePath(m->spec_meshdir_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3218,8 +3224,9 @@ void mjCSkin::Compile(const mjVFS* vfs) {
|
||||
if (modelfiledir_.empty()) {
|
||||
modelfiledir_ = FilePath(model->modelfiledir_);
|
||||
}
|
||||
mujoco::user::FilePath meshdir_;
|
||||
meshdir_ = FilePath(mjs_getString(compiler->meshdir));
|
||||
if (meshdir_.empty()) {
|
||||
meshdir_ = FilePath(model->meshdir_);
|
||||
}
|
||||
|
||||
FilePath filename = meshdir_ + FilePath(file_);
|
||||
mjResource* resource = LoadResource(modelfiledir_.Str(), filename.Str(), vfs);
|
||||
|
||||
Reference in New Issue
Block a user