@@ -170,11 +170,11 @@ bool mjCFlexcomp::Make(mjsBody* body, char* error, int error_sz) {
170
170
break ;
171
171
172
172
case mjFCOMPTYPE_MESH:
173
- res = MakeMesh (model, error, error_sz);
173
+ res = MakeMesh (model, compiler, error, error_sz);
174
174
break ;
175
175
176
176
case mjFCOMPTYPE_GMSH:
177
- res = MakeGMSH (model, error, error_sz);
177
+ res = MakeGMSH (model, compiler, error, error_sz);
178
178
break ;
179
179
180
180
case mjFCOMPTYPE_DIRECT:
@@ -1075,7 +1075,7 @@ template <typename T> static T* VecToArray(std::vector<T>& vector, bool clear =
1075
1075
1076
1076
1077
1077
// make mesh
1078
- bool mjCFlexcomp::MakeMesh (mjCModel* model, char * error, int error_sz) {
1078
+ bool mjCFlexcomp::MakeMesh (mjCModel* model, mjsCompiler* compiler, char * error, int error_sz) {
1079
1079
// strip path
1080
1080
if (!file.empty () && model->spec .strippath ) {
1081
1081
file = mjuu_strippath (file);
@@ -1092,7 +1092,7 @@ bool mjCFlexcomp::MakeMesh(mjCModel* model, char* error, int error_sz) {
1092
1092
}
1093
1093
1094
1094
// load resource
1095
- std::string filename = mjuu_combinePaths (mjs_getString (model-> spec . meshdir ), file);
1095
+ std::string filename = mjuu_combinePaths (mjs_getString (compiler-> meshdir ), file);
1096
1096
mjResource* resource = nullptr ;
1097
1097
1098
1098
@@ -1194,7 +1194,7 @@ static int findstring(const char* buffer, int buffer_sz, const char* str) {
1194
1194
1195
1195
1196
1196
// load points and elements from GMSH file
1197
- bool mjCFlexcomp::MakeGMSH (mjCModel* model, char * error, int error_sz) {
1197
+ bool mjCFlexcomp::MakeGMSH (mjCModel* model, mjsCompiler* compiler, char * error, int error_sz) {
1198
1198
// strip path
1199
1199
if (!file.empty () && model->spec .strippath ) {
1200
1200
file = mjuu_strippath (file);
@@ -1208,7 +1208,7 @@ bool mjCFlexcomp::MakeGMSH(mjCModel* model, char* error, int error_sz) {
1208
1208
// open resource
1209
1209
mjResource* resource = nullptr ;
1210
1210
try {
1211
- std::string filename = mjuu_combinePaths (mjs_getString (model-> spec . meshdir ), file);
1211
+ std::string filename = mjuu_combinePaths (mjs_getString (compiler-> meshdir ), file);
1212
1212
resource = mjCBase::LoadResource (mjs_getString (model->spec .modelfiledir ),
1213
1213
filename, 0 );
1214
1214
} catch (mjCError err) {
0 commit comments