opensim-gui icon indicating copy to clipboard operation
opensim-gui copied to clipboard

Mac users need a way to access/load plugins in the GUI

Open chrisdembia opened this issue 7 years ago • 13 comments

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).

chrisdembia avatar Aug 04 '17 05:08 chrisdembia

Not sure what to do on this issue @chrisdembia Since you opened this, can you advise? Thanks

aymanhab avatar Jun 12 '18 22:06 aymanhab

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.

chrisdembia avatar Jun 12 '18 22:06 chrisdembia

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.

jimmyDunne avatar Jul 05 '18 17:07 jimmyDunne

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.

tkuchida avatar Jul 05 '18 19:07 tkuchida

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.

jimmyDunne avatar Jul 05 '18 21:07 jimmyDunne

Shoulder model plugin is with world congress files.

jenhicks avatar Aug 06 '18 18:08 jenhicks

While plugins can be loaded using scripting shell, a better solution may be needed. I'd lean to keep this open for now.

aymanhab avatar Feb 28 '19 21:02 aymanhab

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.

idhamari avatar Jan 08 '20 17:01 idhamari

If you are using the ScriptingShell, try modeling.Model.LoadOpenSimLibrary().

chrisdembia avatar Jan 08 '20 17:01 chrisdembia

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.

idhamari avatar Jan 08 '20 17:01 idhamari

@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

idhamari avatar Jan 08 '20 17:01 idhamari

ok I solved the above problem by using this in python as well

  loadModel("/someath/ThreeMasses.osim")

idhamari avatar Jan 08 '20 17:01 idhamari

Thanks for the update.

chrisdembia avatar Jan 08 '20 18:01 chrisdembia