PackageManager questions

Hi,
How do I make a package visible to package manager? And how do I designate a package as pre-release?

For your info please see Package Manager Guides (pushing to the package server).

To mark as prerelease add beta or prerelease in the metadata of the version.

Thanks!

Is packagemanager the only way to load plugins on macs?

You can also create .macrhi files:

I would recommend against macrhi if possible. If there is a scenario that the yak format doesn’t fit, please let us know and we’ll see what can be done.

Yak works fine (a little painful for any iterations or experimentation, but I can work with it. Kinda wish there were a sandbox or a local way to test it, especially on macs) but I want to distribute a toolbar with my plugin, and I previously distributed it in a zip file with the plugin. Users would unzip the file and install the plugin, and they would hopefully see the toolbar file in there too & use it (or at least would know where to look for it.) With Yak, I don’t see how users will have any clue about where to look.
I guess, using Food4Rhino, I can also have a downloadable toolbar as a separate download, so maybe that will help (unless there’s a way to install a toolbar automatically or ?)

You can even put in a local folder where you place your packages by copying them there manually.

See this topic regarding toolbars:

Thanks - I’ll check those out.

Good to see what’s really going on with the toolbars - I was wondering. But I’m not seeing it on mac. Actually, I don’t see how to load custom toolbars on the mac at all. How does that work?

I’ll have to defer that question to @dan, @curtisw or @JohnM .

It’s not as straightforward as in Rhino for Windows, but it can be done: Loading Tool Palettes (Mac) with C#

Ok, thanks I’ll try that out.

Thanks Dan. Unfortunately, I get stuck at “Add the Palette to your Project” - I don’t have or use Visual Studio for Mac (or pc) - I’m just using Rhino’s built-in python editor. But I was able to make a plist file (it was weird that the toolbar converter shows an image for left and right mouse buttons - and I’m not sure why they didn’t always match, but that’s a different topic.)

Is there no interface for adding/sharing custom toolbars on mac at all? I mean, from the Rhino interface (not via a plugin at all) In windows I can do Tools-Toolbar layout-File-Open but I don’t see the equivalent on mac.

It seems like you’re asking about sharing tool palettes from Mac-to-Mac, if I’m reading that correctly. If so, then yes, the tool palettes are stored in the user’s preferences. The following two command might be helpful:

  • ExportPreferences
  • ImportPreferences
    The latter allows you to filter on various preferences, such as palettes.

Yes, that’s what I meant. I’ll try that out - thanks!

Dan, I created a .plist file using TestEditToolPaletteCollection, but when I try to import it using importpreferences, Rhino (mac) says it’s not valid. Am I missing some step?
palette test 1.plist (984.3 KB)
PetersToolsMac.plist (983.7 KB)

Hi Peter-

No, ImportPreferences only supports preferences files.

Sorry, I guess I missed this key detail:

Is this a RhinoCommon plugin you are building and distributing?

Basically, you’re going to need to:

  1. Put YourToolPalette.plist somewhere in the plugin bundle - if you’re working with Yak - and @will can correct this if I’m wrong - you can place it in the root of the package. That’s the equivalent of the Adding the Palette to your Project step. My presumption here is that Yak will include that plist along with the rest of the bundle (Will can correct me here).

  2. Load YourToolPalette.plist. These instructions are for a full-on RhinoCommon plugin, but I’m not sure what you are authoring here as it sounds like it might be a python script run as RhinoCommon plugin. In which case, we’ll need to figure out which calls to make to RhinoMac.Runtime.MacPlatformService.LoadToolPaletteCollection (plistPath);

If we can figure that out, we might be able to at least document that in a less convoluted way for this use-case.

Sorry this is a pain. Toolbar/Tool Palette sharing is something we’d like to make much better for Rhino 8 (cold-comfort here, I know).

-Dan

@dan you’re correct. All the package manager will do is unpack the contents of the package in a known location. It’s up to the plug-in to load the toolbars.

Yes, you’re correct - I’m making a plugin of python scripts using Rhino’s script compiler.