Script Compiler & Grasshopper Player

I want to distribute RHPs with Rhino Commands compiled from Grasshopper Player scripts. I have several scripts that work perfectly in Grasshopper Player and the goal of these scripts is to bake dimensioned geometries into Rhino. I would like to bake these geometries with colors on to specific layers, and for each command to have an icon in its own toolbar from an RUI. It would be messy to bake 1000s of loose objects into users’ files, so that precludes me from using the Context Bake tool (which works when compiled), so I have tested using Human & Elefront. Both of these tools work on the first run of the compiled command, but on the second they bake the geometry every time a parameter in the Grasshopper Player dialogue is changed, as the ‘True’ from the previous bake seems to remain persistent. I have made a simple illustration of this problem below.

Has anyone found a way to compile Grasshopper Player scripts which bake geometry with material/layer?

Compiled GH Player Bake Test.rhp (43 KB)
Compiled GH Player Bake Test 1 (Context Bake).gh (4.8 KB)
Compiled GH Player Bake Test 2 (Human).gh (14.4 KB)
Compiled GH Player Bake Test 3 (Elefront).gh (7.3 KB)

Hi James, I know exactly what you mean, been facing these issues and still looking for a proper solution.
One thing you can try is the C# component to bake atributes from here, it’s an old code made for an old GH version, there are a few errors on the current Rhino V7 but it might work depending what you need. Already tryed to contact Giulio Piacentino about it but he didnt even bother to reply.
By other hand, @AndyPayne recently told me they are working on a new set of native GH components to do these tasks and should be available very soon under G1 for Rhino8 wip only.
The main issue I found with RhinoScriptCompiler is that, as you mentioned, it wont run the commands for the second time like they did on the first run, unless you restart Rhino of course. It’s storing some information even when using the G1 to save GH files on the wip version to make sure the command is closed after run…
Snag_34f7e9e

1 Like

Hi Mats, thank you for your quick and helpful reply. The C# components from Giulio are very useful - would help for doing everything without loading external packages on a user’s PC.
I have the box for ‘keep open after command completes’ unchecked using Rhino WIP and grasshopper, but it doesn’t seem to work as I expected.
It seems there’s not an obvious immediate solution, but hopefully the native components that allow baking with attributes will help.

1 Like

Hey, @AndyPayne any input on this? Do you have an estimate when this will be implemented?

Hi @James_Walker. I don’t have a definite release date yet… but we plan to do an internal review next week and hopefully it will be shortly after that if all goes well. I will update here once the initial release is made. Thanks for checking back.

3 Likes

Great, thanks for the quick reply and let us know what happens :slight_smile:

@AndyPayne Any update on this issue after your internal review? I am sitting with the exact same issue as @James_Walker. As of now it makes the script compiler more or less useless for this purpose.

1 Like

Object attributes are already available on the lastest wip update, I’m trying it now but so far can’t find a way to make it work with the context bake

1 Like

Hmm. Those components weren’t quite supposed to be exposed yet while we wrap up one or two bugs… but here we are. We will be posting a much more in depth preview about these components and how they work over the next few days. We appreciate your patience. Also, these components do not yet work with the context baker component (yet) so they may not work for your particular use case until we get that sorted. I’ll post more soon.

1 Like

Hi Andy, it makes sense, I imagined it wasn’t ready yet since it’s not listed on the change log.
So far everything looks very promising and it looks like this is the proper place to add block instance components which are also very requested by the entire comunity. Keep it up the great work.

Hi @mats_magnunson @Jacob_Thuesen and @James_Walker. I just wanted to report that the first release of the GH1 components which lets you set object attributes (among other things) is now out. You can find out more about the tools here.

3 Likes