Bug: Script Editor resets code when re-entering a Cluster (Rhino 9)

Bug: Script Editor resets code when re-entering a Cluster (Rhino 9)

Description:

I’ve encountered a severe persistence issue with the new Script Editor in Rhino 9 WIP.

The C# script content is being wiped and reset to the default template (a = null;) not only during copy-paste actions but also simply by re-entering a Cluster.

Steps to Reproduce:

  1. Create a C# Script component inside a Cluster.
  2. Write custom code and ensure it compiles (e.g., using ref object A).
  3. Save and Close the Cluster.
  4. Double-click to enter the Cluster again.
  5. Open the C# Script Editor.

Actual Behavior: The previously written code is gone, replaced by the boilerplate C# template. It seems the component fails to serialize/save the script source properly when it’s nested inside a Cluster environment.

Expected Behavior: The script content should be persistent and remain unchanged regardless of entering/leaving the Cluster.

Environment:

  • Rhino 9 WIP
  • Grasshopper 1.0

@eirannejad
sysinfo.txt (3.2 KB)

Let me do it from the very beginning.

Looking into it right now…

This bug has also happened for me - both C# and python nodes are resetting

same here

RH-95093 Script in cluster reverts back to default

Sorry for the late reply. This was a hard bug to track but I think I have found it and pushing a fix now.

RH-95093 is fixed in Rhino WIP