Raise warning when attaching a spec with pending keyframes to a different spec.

PiperOrigin-RevId: 685677622
Change-Id: Iba522c523ebd2afe64d6ab28c6b6b4b3cd399cf8
This commit is contained in:
Alessio Quaglino
2024-10-14 05:53:12 -07:00
committed by Copybara-Service
parent c84f35b425
commit 1e7c109887
4 changed files with 58 additions and 10 deletions
+2 -2
View File
@@ -848,7 +848,7 @@ mjCBody& mjCBody::operator+=(const mjCFrame& other) {
mjCBody* subtree = other.body;
other.model->prefix = other.prefix;
other.model->suffix = other.suffix;
other.model->StoreKeyframes();
other.model->StoreKeyframes(model);
// attach defaults
if (other.model != model) {
@@ -1808,7 +1808,7 @@ mjCFrame& mjCFrame::operator=(const mjCFrame& other) {
mjCFrame& mjCFrame::operator+=(const mjCBody& other) {
other.model->prefix = other.prefix;
other.model->suffix = other.suffix;
other.model->StoreKeyframes();
other.model->StoreKeyframes(model);
other.model->prefix = "";
other.model->suffix = "";