Rhino 6 Python Plugin to Rhino 7 Package

I’ve searched, but can’t find a straightforward answer to what must be a very common issue.

I have a couple of commands that I’ve implemented as Python plugins for Rhino 6 for Mac. I would like to implement them in Rhino 7, which I gather means I need to create a package for the Package Manager to install.

Can someone point me to the precise steps I need to port these Python commands from Rhino 6 to Rhino 7 for Mac?

Your python code for Rhino 6 should work without any changes in Rhino 7

OK, but how do I get Rhino 7 to recognize them? Since I’ve installed them as plugins in Rhino 6 for Mac, they come up like any other command. I just want to get to the same place with Rhino 7 for Mac. I don’t want to have to run them as a script that I have to run from a file each time.

I opened the Rhino 7 package manager, but it didn’t find any plugins.

AFAIK currently best approach to create plugin from scripts, including python, is by using Rhino Script Compiler. Plugins created this way should work on macOS and Windows, but this tool itself is for Windows only.

When plugin is created it can be distributed to other users by Package Manager (aka yak).

If you have created yak package for Rhino 6, with small name modification it could be used in Rhino 7.

No, I haven’t created any Yak packages. I did install my Python plugins in Rhino 6 for Windows, but that was mainly for completeness and because I wanted to be able to pass on the plugin to others. Also, I’d purchased Rhino 6 for Windows before it came out for Mac and ran it in a Fusion virtual machine. But now I only have 7 for Mac and I want to stick with Mac native applications.

I guess I’ll just drop back to Rhino 6 when I want to use those tools.

I’m not a software developer, I’m a user, and it’s more important to me to get the job done than to try to learn the most sophisticated ways of programming things. For me, the Rhino 6 Python plugin capability hit a sweet spot - it gave me the ability to create new commands that were more convenient than running scripts from file every time, but didn’t require me to be a full-blown software developer to do it.

If you have access to Rhino 6 for Windows, then easily you could create your rhp file with Rhino script compiler and it will work on Rhino 6 or 7, Windows or Mac (I have some Rhino 5 plugin created with RhinoScript Compiler and it still works in Rhino 7). It is really quite seamless workflow if scripts are preparted correctly. I suggest to give it a go.

I am not sure how you have created your python plugin for Rhino 6 on Mac, but it may by possible that you could do same thing also with Rhino 7. It may still work, but it may not be the suggested method.

I created the Mac plugin in accordance with Rhino - Creating Rhino Commands Using Python. For Rhino 6, the plugin had to be located in ~/Library/Application Support/McNeel/Rhinoceros/6.0/Plug-ins/PythonPlugIns/PlugInName{GUID}/dev. There is no ~/Library/Application Support/McNeel/Rhinoceros/7.0/Plug-ins/PythonPlugIns/ directory, so it wasn’t clear if Python plugins were still supported.

Well, that turned out to be ridiculously easy! I just copied the whole PythonPlugIns directory from 6.0 to 7.0 and the commands work! I didn’t have to generate new GUIDs or anything. (I guess that makes sense because the GUIDs came from Windows to begin with.)

So this all looks like just a Rhino 7 documentation issue. You don’t need to create yak packages at all for 7.0.