Attach the tree of defaults recursively and with namespacing.

PiperOrigin-RevId: 650664018
Change-Id: I17751a02a406dcb2a2ca218c316b5eb0370071b8
This commit is contained in:
Alessio Quaglino
2024-07-09 09:53:05 -07:00
committed by Copybara-Service
parent d0f86bc2c5
commit 462cfa5ceb
6 changed files with 111 additions and 50 deletions
+1 -1
View File
@@ -491,7 +491,7 @@ bool mjCComposite::MakeParticle(mjCModel* model, mjsBody* body, char* error, int
// add user-specified joints
else {
for (auto defjnt : defjoint[mjCOMPKIND_PARTICLE]) {
for (auto& defjnt : defjoint[mjCOMPKIND_PARTICLE]) {
mjsJoint* jnt = mjs_addJoint(b, &defjnt.spec);
mjs_setDefault(jnt->element, mjs_getDefault(body->element));
}