Add recursive call to FindSpec for handling nested attachments.

PiperOrigin-RevId: 713629578
Change-Id: I23efa5a86bac187fc42eb955d29cc03cbacfd9e0
This commit is contained in:
Alessio Quaglino
2025-01-09 04:55:19 -08:00
committed by Copybara-Service
parent 40ef08c8ed
commit f7d38dac62
3 changed files with 39 additions and 7 deletions
+3
View File
@@ -151,6 +151,7 @@ mjCMesh::mjCMesh(mjCModel* _model, mjCDef* _def) {
// set model, def
model = _model;
if (_model) compiler = &_model->spec.compiler;
classname = (_def ? _def->name : (_model ? "main" : ""));
// in case this body is not compiled
@@ -1981,6 +1982,7 @@ mjCSkin::mjCSkin(mjCModel* _model) {
// set model pointer
model = _model;
if (model) compiler = &model->spec.compiler;
// clear data
spec_file_.clear();
@@ -2638,6 +2640,7 @@ mjCFlex::mjCFlex(mjCModel* _model) {
// set model
model = _model;
if (_model) compiler = &_model->spec.compiler;
// clear internal variables
nvert = 0;