Namespace plugin instances when attaching.
Fixes #2112. PiperOrigin-RevId: 681045462 Change-Id: I2c945c5405fcb91e0f9a1b0b1e94f68d174c84ee
This commit is contained in:
committed by
Copybara-Service
parent
89aea5e217
commit
dfe8e45101
@@ -341,6 +341,7 @@ mjCModel& mjCModel::operator+=(const mjCModel& other) {
|
||||
std::unordered_map<mjCPlugin*, mjCPlugin*> plugin_map;
|
||||
for (const auto& plugin : other.plugins_) {
|
||||
plugins_.push_back(new mjCPlugin(*plugin));
|
||||
plugins_.back()->NameSpace(&other);
|
||||
plugin_map[plugin] = plugins_.back();
|
||||
}
|
||||
mapplugin(plugin_map, bodies_);
|
||||
|
||||
Reference in New Issue
Block a user