Throw an error if a child attached by reference to a parent is compiled.

Fixes #2482.

PiperOrigin-RevId: 735665098
Change-Id: Ia3436fdd2ff572f8f0c1ded434742a4a9186f2f7
This commit is contained in:
Alessio Quaglino
2025-03-11 01:23:31 -07:00
committed by Copybara-Service
parent 14dc6fd33b
commit 019e0a806c
5 changed files with 38 additions and 2 deletions
+4 -2
View File
@@ -147,8 +147,10 @@ or :ref:`attach a frame to a body<mjs_attachFrame>`:
Note that in the above examples, the parent and child models have different values for ``compiler.degree``,
corresponding to the :ref:`compiler/angle<compiler-angle>` attribute, specifying the units in which angles are
interperted. Compiler options are carried over during attachment, so the child model will be compiled using X, while the
parent will be compiled using Y.
interperted. Compiler flags are carried over during attachment, so the child model will be compiled using the child
flags, while the parent will be compiled using the parent flags.
Note also that once a child is attached by reference to a parent, the child cannot be compiled on its own.
.. _meDefault: