Enable attaching plugins not instantiated in the extension section.

Fixes #2217.

PiperOrigin-RevId: 695766524
Change-Id: I534b63400810bd6ef888f39f6665213280fd93ac
This commit is contained in:
Alessio Quaglino
2024-11-12 09:33:32 -08:00
committed by Copybara-Service
parent eb77d5b933
commit 45f908c165
6 changed files with 164 additions and 16 deletions
+4 -2
View File
@@ -366,9 +366,11 @@ class mjCModel : public mjCModel_, private mjSpec {
template <class T> void CopyList(std::vector<T*>& dest,
const std::vector<T*>& sources);
// copy plugins that are explicitly instantiated by the argument object to this model
template <class T> void CopyExplicitPlugin(T* obj);
// copy vector of plugins to this model
template <class T> void CopyPlugin(std::vector<mjCPlugin*>& dest,
const std::vector<mjCPlugin*>& sources,
template <class T> void CopyPlugin(const std::vector<mjCPlugin*>& sources,
const std::vector<T*>& list);
// delete from list the elements that cause an error