A new Hops function manager lets you add function sources (ie. local folders, localhost servers, and/or remote server locations) to easily access functions in the Hops component. Once a valid source has been added, a new menu item will be added to the Hops component. This menu item will enumerate valid functions - either grasshopper files or function endpoints. Right-clicking on a menu item will open the file while left-clicking will reference the file in the Hops component (ie. like setting the path). This feature is currently only available for Windows.
In the video above, you can see three function sources:
- Local Folder points to Grasshopper files that are in a network directory.
Localhost points to a local python server running in Visual Studio Code and listening on
http://127.0.0.1:5000/. Note: that you need to update your version of the
ghhops_serverto version 1.5.1 to get this to work. Run the command
pip install ghhops_server==1.5.1to upgrade.
Remote Server points to an App Server instance deployed on Heroku at
https://compute-rhino3d-appserver.herokuapp.com/. To find out more about setting up your own App Server, visit this page.
In the video you can see the local instance of the rhino.compute server running in the lower left-hand corner. In the upper left-hand corner shows the running python server. When the first Hops component is added to the canvas, I selected a local file (
FindMaximum.gh) on my machine which then sends the request to the local rhino.compute server. When the second Hops component is added, I selected one of the python functions that was setup in my server code. Notice the requests hitting the server as I moved the slider to get a point on the curve. Lastly, I added a final component which created a series of curves around a selection of points. This definition is being computed on a remote server setup during the App Server installation.
Ideally, this new feature will allow you to easily access Hops functions from a varienty of frequently used sources. We look forward to seeing how you use it!
- A bug was fixed which prevented the local rhino.compute server from launching on machines which had the checkbox turned on for loading .gha assemblies using COFF byte arrays in the Grasshopper developer settings.
As usual, the change log for this build can be viewed here