This is correct
Thank you for your help!! (I was able to install the Grasshopper plugins I wanted)
When I tested lunchbox, I installed it first on windows, then brought the GHA over to osx.
Very excited to move onto the mac. A lot of plugins are working as reported above.
How is scripting support coming along?
I can’t see any C# or Python options at this point.
Thanks!
Script components are a high priority. We don’t see any technical roadblocks. In fact, as of RhinoWIP 5C179w, the Gh.Python component is available. Check it out. At this point, Python script components will execute, but the editor is a way off from being done. The same will likely happen with C# script components: we’ll get the underlying infrastructure in place first, then address the issue of the script editors (which is much harder to get right).
Thanks, Dan. Python scripting is great.
Is there any way to reference external libraries yet, like plankton and kangaroo?
On windows we need the add the GH Libraries folder to the Python search paths using the EditPythonScript editor. As there isnt a script editor on the Mac maybe there is a Python config file somewhere to add to manually?
There is no need for an extra layer, unless you want to add to the Python sys module, too (to control where .py libraries are looked up).
This should work:
import clr
clr.AddReferenceToFileAndPath('path/to/mylib.dll')
import mylib
However, I know that there is no autocompletion on the Mac, so it might be difficult to get this right.
Thanks, Giulio.
The easiest way to generate a full path/to/mylib.dll on the Mac is to open a terminal window and drag and drop the file from the finder into the terminal:
/Users/hiaz/Library/Application\ Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/Libraries/Plankton.dll
If I do this in the python script it looks like this
import clr
clr.AddReferenceToFileAndPath("/Users/hiaz/Library/Application\ Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/Libraries/Plankton.dll")
import Plankton
clr.AddReferenceToFileAndPath("/Users/hiaz/Library/Application\ Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/Libraries/Plankton.gha")
import PlanktonGh`
but I end up getting this error:
1. Solution exception:file does not exist: /Users/hiaz/Library/Application\ Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/Libraries/Plankton.dll
Hey Guys,
Do you know where I can get plugin files for FIREFLY? It looks like they have only Windows installer and I can’t extract actual dll files.
Thank you
I was having trouble installing plugins to explicit history (grasshopper). Found solution, may be obvious to many but documenting for people like myself.
Basically works the same as installing on a Windows machine. I had my mac brain in so didn’t think of this initially:
-
Open “Explicit History” in Rhino WIP
-
In Grassshopper open: File> Special Folders> Component Folder
-
Drop in the .gha and.dll files into the folder
@piac macOS uses unix fill path names and the peculiar space you’re referring to in the path name is for a folder called “Application Support”
unix allows spaces in file names by using the backslash character followed by a space, thus
/Application\ Support/
is a valid name for a single folder.
Yeah, but the runtime seems to think otherwise and says clearly it is not
finding them. Maybe there’s another way to reference the folder here. I’d
have to look.
Btw, Mathias, both Daniel Piker @DanielPiker and Will Pearson @will, the developers of
Plankton, work for McNeel, so you might ask them to investigate.
@mathias_gmachl, @LeoPedersen: As it turns out, the problem is coming from the mixture of forward and backward slashes with spaces. It seems that the runtime is having no issues by using the standardized path, like so:
To get this, in Grasshopper, use File → Special Folders → Component Folder.
Then, use ‘Obtain info’ on the item. You can copy cmd-C the path, although it is rendered in a fancy way. That worked well here for me.
I checked if this was a matter of character escaping and it seems it is not. Just use the normalized path.