Do not delete pending keyframes during body detachment.

PiperOrigin-RevId: 685670895
Change-Id: Iadd0ba8ca7e74a280559168ac0ac855405a1cfd9
This commit is contained in:
Alessio Quaglino
2024-10-14 05:22:50 -07:00
committed by Copybara-Service
parent c5a677a9de
commit c84f35b425
3 changed files with 13 additions and 9 deletions
+1 -4
View File
@@ -462,11 +462,8 @@ mjCModel& mjCModel::operator-=(const mjCBody& subtree) {
ProcessLists(/*checkrepeat=*/false);
}
// TODO: carry over pending keyframes
key_pending_.clear();
StoreKeyframes();
// all keyframes are now pending and they will be resized
StoreKeyframes();
DeleteAll(keys_);
// remove body from tree