We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 28ccdbe commit 9486628Copy full SHA for 9486628
src/user/user_model.cc
@@ -4049,8 +4049,12 @@ void mjCModel::StoreKeyframes(mjCModel* dest) {
4049
"To prevent this, compile the child model before attaching it again.");
4050
}
4051
4052
- // do not change compilation quantities in case the user wants to recompile preserving the state
+ // rebuild tree lists so that SaveDofOffsets computes correct sizes even when including
4053
+ // things like `replicate` tags.
4054
if (!compiled) {
4055
+ ResetTreeLists();
4056
+ MakeTreeLists();
4057
+ ProcessLists(/*checkrepeat=*/false);
4058
SaveDofOffsets(/*computesize=*/true);
4059
ComputeReference();
4060
0 commit comments