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