opensim-gui
opensim-gui copied to clipboard
Mac users need a way to access/load plugins in the GUI
Where should the plugins folder be? Perhaps we could consider /Applications/OpenSim 4.0.Beta/Plugins
.
Note that macOS has some of its own conventions for where plugins should be located (see here).
Not sure what to do on this issue @chrisdembia Since you opened this, can you advise? Thanks
Related: #487, https://github.com/opensim-org/opensim-core/issues/2049
In the past, the GUI had a plugins folder where users could place plugins. We no longer have such a folder on either Mac or Windows. For Windows, I had assumed we could continue using the same location (<install-dir>/Plugins
) but I wasn't sure what we should use for Mac, especially because the application folder requires elevated permissions. If we do not follow #487, some options are:
-
/Applications/OpenSim 4.0/Plugins
(to be visible to users) -
/Applications/OpenSim 4.0/OpenSim 4.0.app/Contents/Resources/Plugins
(to match the Windows location) -
<resources-dir>/Plugins
Or perhaps we no longer need a plugins folder.
I ran into this today as well. The User documentation always pointed to a folder in the Installation called Plugins, where users could store all the plugins. That doesn't exist anymore so it is no longer clear how to install plugins.
I would like to see the installer generate a Plugins folder that users can copy plugins to as well as including a GUI menu item for installing plugins.
it is no longer clear how to install plugins
@aymanhab said to just create a "plugins" directory in the installation directory (where "bin", "cmake", "etc", etc. live), which worked for me on Windows (AppVeyor artifact OpenSim-d8bfa962-2018-05-09-win64.exe) with Ajay's ScapulothoracicJointPlugin40.dll.
Thanks, Tom. I tried your suggestion (add plugins folder with the plugin in the install dir) but it doesn't seem to work on Mac. I spoke to Ayman and it will require a fix that can be done down the line. Right now, you can add the plugin by calling modeling.Model.LoadOpenSimLibrary("FullPath2Plugin")
in the scripting shell.
Shoulder model plugin is with world congress files.
While plugins can be loaded using scripting shell, a better solution may be needed. I'd lean to keep this open for now.
While plugins can be loaded using scripting shell, a better solution may be needed. I'd lean to keep this open for now.
How can we do this? I tired LoadOpenSimLibrary but it is not defined.
If you are using the ScriptingShell, try modeling.Model.LoadOpenSimLibrary()
.
I think it would be useful if the user add the path to the plugin, e.g. as in Edit>Preferences>Paths: Plugin search path, then restart Opensim to make use of it.
@chrisdembia thanks for the info. It works in terms of no error message :
modeling.Model.LoadOpenSimLibrary("/somePath/libBodyDragForce.so")
but when I try to load ThreeMasses model example from the GUI interface in BodyDragForce, I get:
Object::newInstanceOfType(): object type 'BodyDragForce' is not a registered Object!
Object type BodyDragForce not recognized
ok I solved the above problem by using this in python as well
loadModel("/someath/ThreeMasses.osim")
Thanks for the update.