OnLoad() plugin method does not de-register commands on failure

,

Hello,

I noticed that on macOS when returning an unsuccessful state from

protected override LoadReturnCode OnLoad(ref string errorMessage) {
  // Some logic here, like license check or similar...
  if (!IsLicensed()) {
    return LoadReturnCode.ErrorNoDialog;
    // or... return LoadReturnCode.ErrorShowDialog;
  }

  // Other initialisations (panels, plugin classes, etc.)

  return LoadReturnCode.Success;
}

the plugin commands are already registered and can be invoked from the Rhino App command line. Of course they do not work because other plugin classes and panels are not initialised, but on Windows this doesn’t happen.
On Rhino for Windows commands are not even recognised if the plugin load state is unsuccessful.

Note: I installed the plugin as a Yak package.
Is this something that can be fixed?

1 Like