Page 1 of 1

How to add Plugin force to a model?

Posted: Sun Jun 21, 2020 4:47 pm
by tyjjr
Dear All,
Follow the instruction, i successfully built the "coupledbushingforce" as a plugin. i can found this plugin in "User plugins" in the GUI and load this plugin without any problem.

But when I try to use scripting shell window to add this force to my model(the same way as I load TorqueAcuator), I found it can't be accessed.

Is there any instruction or examples shows how to add a force plugin into my model? can it be done in GUI or scripting?
Any help would be really appreciated
Thanks~

Re: How to add Plugin force to a model?

Posted: Thu Jun 25, 2020 10:04 am
by aymanh
Hello,

While plugins are loaded during runtime and can generally be used after loading by (for example in XML files), the classes defined in the plugins are not available to scripting since they have no corresponding Java/Python classes (we go the extra mile to create these for OpenSim's built in types).

Once a plugin is loaded in the GUI you can check the XMLBrowser and see the object type and corresponding XML layout to include in models/files.
The primary way to interface with objects in plugins are through XML or using the properties interface to access/modify values (which is how the GUI allows showing/editing for plugin provided types).

Hope this helps,
-Ayman