Yak Grasshopper 2 and 1

Hi,

I have a yak package that bundles: Rhino Plugin, Grasshopper1 and Grasshopper2.

Problem happens when a user does not have GH2 and installation fails. How Yak can be configured to install or dont install GH2 plugin depending on a user computer?

I refer to Rhino8, and yes I know GH2 is alpha :slight_smile:


System.IO.FileNotFoundException: Could not load file or assembly ‘Grasshopper2, Version=2.0.9225.14721, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
File name: ‘Grasshopper2, Version=2.0.9225.14721, Culture=neutral, PublicKeyToken=null’
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at Rhino.PlugIns.PlugIn.CreateFromAssembly(Assembly pluginAssembly, Boolean displayDebugInfo, Boolean useRhinoDotNet)
Command: Grasshopper

GH2 is only really available on Rhino9/Wip/Beta, and it’s shipped as part of Rhino9. There is a vestigial (years old) version still available for Rhino8, but since that version was released the GH2 SDK has been broken in numerous ways. Shipping GH2 plugins targeting the R8 version sounds like an awful lot of work for very little benefit.

Does it mean, that in rhino 9 WIP or Rhino 9, users wont have this issue?

Correct. GH2 is always* available on Rhino9, just as GH1 is always available on R8 and R9.

* Note that “is” is not exactly the same as “will be”. There is still a very small and shrinking chance GH2 won’t become production ready by the time R9 ships, that decision is ultimately not up to me.

Those decisions makers… The GH2 is awesome!

Another question, since I can actually speak with you:

I don’t know if I have an old version of GH2 but can one reference a rhino object as GUID as we had in GH1?

You mean set a value in the Guid parameter by picking an object from Rhino?

Yes, only guid.

Not yet it seems. I added it to the list:

Done for points, only 20 more geometry types to go…

edit: All done (except for sphere, box, and tube detection, they just import as surfaces now). However this probably won’t make it into tomorrow’s Rhino9 WIP release.

One difference is that shapes created from GUIDs do not automatically update. This does work in GH1, but I think the feature was added after I stopped being involved in new features.

:smiley: Very nice!

The graphics is astonishing, what is the framework behind? Is ETO?

Yes, all GH2 is drawn using standard Eto. Sometimes I “cheat” by drawing stuff directly to textures which are then drawn as bitmaps. This is how the colour models in the colour picker are drawn.

The image I screenshotted above is available in the Solver->Conversions menu item. It shows all defined type conversions, and lists the merit and explanations for each one.

I ship a GH2 plugin (opennest_gh2.rhp, a Grasshopper2.Framework.Plugin, R9 SDK) as a Yak package for Rhino WIP, nevertheless our discussion as experimental try. The components load and work fine in GH2, but every Rhino 9 startup shows:

Plug-in opennest_gh2.rhp could not be loaded: initialization failed

So: what’s the way to stop the core loader from throwing this meesage?
Should the assembly also carry a minimal Rhino.PlugIns.PlugIn class (my command
.rhp in the same package does, and loads silently), or is there a manifest flag / layout that marks a .rhp as GH2-only?

Thanks!