From f882f4b065199c3618087e3abc7d07af7e0dd6b0 Mon Sep 17 00:00:00 2001 From: Alessio Quaglino Date: Thu, 5 Dec 2024 03:18:51 -0800 Subject: [PATCH] Remove requirement to specify a name prefix or suffix during attach. PiperOrigin-RevId: 703049862 Change-Id: I5fd6da0581331b1b716110292a8160ae16934157 --- src/user/user_objects.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/user/user_objects.cc b/src/user/user_objects.cc index 3e4c61bf..9654182c 100644 --- a/src/user/user_objects.cc +++ b/src/user/user_objects.cc @@ -873,10 +873,6 @@ mjCBody& mjCBody::operator+=(const mjCFrame& other) { other.model->suffix = other.suffix; other.model->StoreKeyframes(model); - if (other.prefix.empty() && other.suffix.empty()) { - throw mjCError(this, "either prefix or suffix must be non-empty"); - } - // attach defaults if (other.model != model) { mjCDef* subdef = new mjCDef(*other.model->Default()); @@ -1845,10 +1841,6 @@ mjCFrame& mjCFrame::operator+=(const mjCBody& other) { other.model->prefix = ""; other.model->suffix = ""; - if (other.prefix.empty() && other.suffix.empty()) { - throw mjCError(this, "either prefix or suffix must be non-empty"); - } - mjCBody* subtree = new mjCBody(other, model); other.ForgetKeyframes(); other.model->prefix = subtree->prefix;