Rhino 8 Grasshopper Script Editor - Design Feedback

I prefer different components like in Rhino 7.
C#, an updated GhPython to Ironpython3, and a new one for Python 3.

4 Likes

RH-78322 ā€œOutā€ parameter on new Script component is not removable from ZUI interface

1 Like

Awesome, thanks Ehsan. Think my Beta might be dying, so just one last thing for now: The menu bar items are maybe a wee bit jumbled and verbose with their current structure:

Grasshopper:
	Convert To GH_Scriptlnstance (GH_Component SDK Mode)
	Add Solvelnstance Overrides
	Add Preview Overrides

File:
	Save
	Revert
	Revert To State
	Close

Edit:
	Search and Replace
	Find Next
	--------------------
	Go To Line:Column
	--------------------
	Toggle Minimap
	Toggle White Spaces
	--------------------
	Convert Indentation to Spaces
	Convert Indentation to Tabs

Run:
	Run
	--------------------
	Step Over
	Step Into
	Step Out
	--------------------
	Toggle Breakpoints
	Remove All Breakpoints
	--------------------
	Stop Debug
	Reset Debugger
	--------------------
	Toggle Breakpoints Tray
	Toggle Variables Tray
	Toggle Watch Tray
	Toggle Call Stack Tray

Tools:
	Open Command Prompt
	Options
	--------------------
	Reset Python 3 (CPython) Engine
	Reset Python 2 (IronPython) Engine

Window:
	Toggle Browser
	Toggle Console
	--------------------
	Toggle Search Panel
	Toggle Templates Pane
	Toggle Examples Panel
	Toggle Help Panel
	--------------------
	Toggle Terminal Tray
	Toggle Problems Tray

Help:
	Help Topics...
	--------------------
	Toggle Help Panel
	Toggle Examples Panel
	Show Rhino 7 Libraries in Help
	--------------------
	Rhino.Python Fundamentals...
	Rhino.Python Online...
	Rhino.Python Samples...
	--------------------
	Scripting Discussion on Discourse...

I think removing the Grasshopper menu point and moving those items to Tools, while moving around/shortening some of the toggles might help simplify things a bit. Adding an item to quickly toggle the dashboard on/off without going into options would be great too. And adding toggle options to turn on/off the tabs indicator and an 80 character vertical line indicator (like the GHPython components has) would be cherries on top. Something like this:

File:
	Save
	Revert
	Revert To State
	Close

Edit:
	Search and Replace
	Find Next
	--------------------
	Go To Line
	--------------------
	Convert Indentation to Spaces
	Convert Indentation to Tabs

Run:
	Run
	--------------------
	Step Over
	Step Into
	Step Out
	--------------------
	Toggle Breakpoints
	Remove All Breakpoints
	--------------------
	Stop Debug
	Reset Debugger

Show (or Toggle, was called Window):
	Dashboard (moved from Tools > Options)
	Browser
	Console
	--------------------
	Minimap
	White Spaces
	Tabs Indicator (new option)
	80 Character Indicator (new option)
	--------------------
	Search Panel
	Templates Panel
	Examples Panel
	Help Panel
	--------------------
	Terminal Tray
	Problems Tray
	--------------------
	Breakpoints Tray
	Variables Tray
	Watch Tray
	Call Stack Tray

Tools:
	Command Prompt
	Options
	--------------------
	Reset CPython Engine
	Reset IronPython Engine
	--------------------
	Convert To GH_Scriptlnstance
	Add Solvelnstance Overrides
	Add Preview Overrides

Help:
	Help Topics
	--------------------
	Show Rhino 7 Libraries in Help
	--------------------
	Rhino.Python Fundamentals
	Rhino.Python Online
	Rhino.Python Samples
	--------------------
	Scripting Discussion on Discourse

Cheerio and best,

Anders

1 Like

Hi.
Updated my Rhino 8 today.
Wanted to give it a checkā€¦ here what Iā€™ve found in 5 min use (or better, attempted use):

This is a proper bug/malfunction:

  1. Setting an input ā€œas listā€, inside the code editor is shown as IEnumerableā€¦ and bracket [] indexing doesnā€™t work.
    2023-11-17 11_42_54-Script Editor

    I can understand things not working in beta. But I canā€™t even test stuff in current release.
    :smiling_face_with_tear:

Here now some non-destructive problems (but imo any of them are really bad UX side)

  1. closing script editor now prompts a ā€œDo you want to save before closing?ā€ so it require an additional click to close it. ā€œXā€ and ā€œOkā€ buttons like in old gh c# script in Rhino 7 were WAY better, imo.

  2. if, while script editor is open, another program (firefox) is put foreground, closing+saving script editor now trigger Rhino 8 to minimize; anyway this seems to randomly trigger also in other scenarios.

  3. GH undo and script editor undo are still unsynched! I canā€™t stress enough how this is absolutely objectively BAD!
    Undos of grasshopper components/content and typed scripts components should be synched!
    @DavidRutten do you agree with me in this?
    Undo operation, from user POV should basically mean ā€œletā€™s go back through time when my definition worked properlyā€, undo should go ā€œback in timeā€ from any edits.
    Unsynched undos means one might not be able to pin-point an old working state of the project.
    Iā€™ve already reported this but got no feedback.
    Sorry for ā€œturning the knife in the woundā€ but, again, this no longer beta.

  4. adding before/after overrides is bugged. I can see the added code only after copying the whole script component.

  5. no UI side bar to scroll up/down the code

  6. script editor is pre-bloated:
    left = current state , right = how it could/should be

  7. Simply create a c# script, add inputs and outputs like this:


    We are now forced to ā€œfillā€ empty outputs? Please no.
    Also, no code given (never even edited once), it lags! Dragging the slider literally lags!
    (50ish milliseconds forā€¦ ???)

  8. If current gh definition is not yet saved, closing+saving a script will prompt for the saving of the whole .gh file. You canā€™t test/edit simple script without being forced to create a .gh file?

  9. Dropdown autocompletation is too ā€œaggressiveā€:
    2023-11-17 13_06_26-Script Editor
    Any letter is enough to trigger a huge window that hide most of your code = you canā€™t code.
    I feel like Iā€™m hitting the ā€œEscā€ key WAY more in GH8 script editor or ā€œobsoleteā€ editor compared to GH7 editor, because of this de-feature.
    Gh7 editor only dropdown sub-methods (after the . dot) , Gh8 or ā€œobsoleteā€ editors will dropdown with any simple letter. Imo itā€™s too much. Maybe set it to 2 or 3 letter? Or make this an user-variable option.


Absolutely.


All this (and probably more I couldnā€™t find in 5 minutes of attempts) make me ask again:
Can you, please, give us the old c# script component + editor inside GH of Rhino 8?
(or at leastā€¦ how to manually create an old ā€œobsoleteā€ c# script?)

Even the old ā€œobsoleteā€ c# scripts from Rhino 7, if opened in Rhino 8, the script editor is different and worse (for example you canā€™t get sub-methods while accessing an object from an array, like "mypoints[5]. " trigger no dropdown UI :frowning: ā€¦)


Iā€™m sorry to seem negative over this. I really want to work with Rhino 8.
I never even used anything from the new ā€œRhinoā€ tab in GH in Rh8, because Iā€™m literally scared to have to turn around back to 7 on my projectsā€¦ but I really want to!
Iā€™m struggling to handle annotations/layers in GH+Rhino7 !

Thank you for all the work!
:see_no_evil:

6 Likes

My feelings exactly. Couldnā€™t have said it better.

Hi @eirannejad, one final thing for now, I swear: Just noticed you have added options that require holding down shift while right-clicking the component:

Right-Click:

Shift + Right-Click:

Iā€™m neither pro/con this feature, but I donā€™t know that itā€™s very Grasshoppery. If I recall, but I may have missed other components that require one to hold down shift. Anywho, assuming you keep the shift layer, maybe you can also add it to the input parameters. I keep missing the parameter name input box, because of 10+ years of this:

So requiring holding down shift for the Variable Name label and Name (for humans, optional) label/menu item to appear would be nice:

Best,

Anders

1 Like

@maje90

Thank you for the feedback. You can use the legacy components by typing #python or #C# in grasshopper search prompt. But I hope we can fix these issues so you donā€™t have to for long:

1 - I have a ticket for this and will get it fixed:
RH-76311 Allow indexing and slicing on grasshopper inputs lists in python 3
RH-78321 Pass Grasshopper list inputs as List<> into the scripts. Figure out a way to generate python 3 lists for inputs

2 - Agreed. Will fix
RH-78543 Applying modified script to component is awkward now with the ā€œDo you want to saveā€ prompt addition

3 - :warning: Will investigate

  • @maje90 Would you mind providing steps to replicate this?

4 - Agreed. Will fix
RH-78544 Record component script saves in Grasshopper undo history

5 - :warning: Will investigate

  • @maje90 Would you mind providing steps to replicate this? It works on my machine.

7 - Agreed. I will attempt to fix
RH-78545 Allow manually collapsing certain sections
RH-78546 Fold using and notes sections in Grasshopper init scripts

8 - Ok. Will fix
RH-78547 Modify C# script and add default assignments to out parameters
RH-78353 Improve script component exec performance

9 - This is matching legacy behavour but fixing this ticket should match save and ok options to the legacy script editors
RH-78543

10 - Agreed. Will fix:
RH-78548 Provide an option to turn off autocompletion from the tokens found in the script

1 Like

@AndersDeleuran Keepā€™em coming please.

I am going to keep the Grasshopper menu in there since this editor is a bit modular and will have an sdk that others can also use in their plugins.

Will fix these two:

RH-78549 Move Toggle debug trays from Run menu to Window menu
RH-78550 Simplify menu items names. Maybe bring the icons back to visualize state?
RH-78551 Allow modifying compact options from the Window menu

2 Likes

Shift and Ctrl have been introduced to the Grasshopper component to allow expanding and collapsing when a component can have too many parameters so shift+clicking is not too far off now.

I will figure out a way to make the input parameter ā€œNameā€ field be less on the nose:
RH-78552 Input parameter Name filed is a little visually distracting from the Variable Name field

2 Likes

Thanks to @AndersDeleuran and @maje90 for great feedback. See above for related tickets please :point_up:

4 Likes

Ah yeah, that makes sense. Do you think it maybe could be moved over in between Tools and Help though? Similar to the Mode menu item placement in GHPython:

It feels weird having Grasshopper as the first menu point, when it is usually File followed by Edit:

1 Like
  • in RH8 + GH , create a script, open editor, make a simple code edit (like a new empty line), donā€™t close editor
  • put another app in foreground (like a browser, excel or whatever)
  • back to script editor, close and save
  • after closing the previous app will be again in foreground and not Rhino 8.

After this:

  • open the same script editor
  • make a simple code edit
  • close editor (saving or not make no difference)
  • the other app will still become foreground, even though it was not used again. (if that app is still runnning)

(This happened for me by simply trying to copy code from Rhino7 or from the web.)



I can no longer replicate this. Good. Iā€™ll report here if it happens again.


Thank you!

1 Like

@eirannejad
A tiny display bug:

Rhino 8 SR1 2023-11-21 (Rhino 8, 8.1.23325.13001, Git hash:master @ 8a4a437248efac5d9cb04d3904481b83e4c23a64)
License type: Educational, build 2023-11-21
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 32Gb)
.NET 7.0.13

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Non-hybrid graphics configuration.
Primary display and OpenGL: NVIDIA Quadro RTX 3000 (NVidia) Memory: 6GB, Driver date: 10-18-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.70
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptopā€™s integrated screen or built-in port
Primary OpenGL: NVIDIA Quadro RTX 3000 (NVidia) Memory: 6GB, Driver date: 10-18-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 537.70
> Integrated accelerated graphics device with 4 adapter port(s)
- Windows Main Display is laptopā€™s integrated screen or built-in port

Secondary graphics devices.
Intel(R) UHD Graphics (Intel) Memory: 1GB, Driver date: 11-15-2021 (M-D-Y).
> Integrated graphics device with 3 adapter port(s)
- There are no monitors attached to this device. Laptop lid is probably closed

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPUā€™s maximum)

Anti-alias mode: 4x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 10-18-2023
Driver Version: 31.0.15.3770
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 6 GB

Rhino plugins that do not ship with Rhino
C:\Users\silvano\04_Programming\Rhino\C#\GHCompute\bin\Debug\net48\GHCompute.rhp ā€œGHComputeā€ 1.0.0.0
C:\Users\silvano\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\ColorPicker\6.0.0\ColorPicker.rhp ā€œColorPickerā€
C:\Users\silvano\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\rhinopbrmaterial\1.1.4+v6.16\RhinoPbrMaterial.rhp ā€œRhinoPbrMaterialā€ 1.1.2.0
C:\Users\silvano\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\EleFront\4.2.2\ElefrontProperties.rhp ā€œElefrontPropertiesā€ 1.0.0.0

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp ā€œCommandsā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\WebBrowser.rhp ā€œWebBrowserā€
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp ā€œRenderer Development Kitā€
C:\Program Files\Rhino 8\Plug-ins\RhinoScript.rhp ā€œRhinoScriptā€
C:\Program Files\Rhino 8\Plug-ins\RhinoBonusTools.rhp ā€œRhino Bonus Toolsā€
C:\Program Files\Rhino 8\Plug-ins\IdleProcessor.rhp ā€œIdleProcessorā€
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp ā€œRhino Renderā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp ā€œRDK_EtoUIā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp ā€œSnapshotsā€
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp ā€œMeshCommandsā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\IronPython\RhinoDLR_Python.rhp ā€œIronPythonā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp ā€œRhinoCyclesā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp ā€œGrasshopperā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp ā€œRhinoCodePluginā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp ā€œToolbarsā€ 8.1.23325.13001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp ā€œ3Dconnexion 3D Mouseā€
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp ā€œDisplacementā€
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp ā€œSectionToolsā€
C:\Program Files\Rhino 8\Plug-ins\NamedPositions.rhp ā€œNamed Positionā€

2 Likes

Yup. Aware of that. RH-75781 Script editor ā†” Component cone wrong.

Thanks for reporting

2 Likes

Hi @eirannejad, I wonā€™t have Rhino 8 for a while. But I just recalled a couple of old wishes/issues, that would be great to see finally make their way into the new script editor:

  1. ā€œShortcut or button which ā€œCollapsesā€ all functions, classes etc.ā€ See this Github issue.

  2. ā€œMinimize GHPython Editorā€. See this GitHub issue.

  3. Comment/uncomment line shortcut that works with nordic ISO keyboard (e.g. Ctrl + T). See this old Grasshopper topic.

2 Likes

One set of auto-init script components coming up in Rhino 8.3 RC

Rhino_ZrlOVe8Kda

Plus a save button that works like OK button in the old editor

Rhino_qJwViDbHhZ

Plus less annoying inputs on parameter context menu. Itā€™s now a using GH1 text menus to set the human-readable name and tootlip. This will take the second name textbox out of view


Rhino_iASDB93t6x
Rhino_vKvVmr6UkU

Plus out parameters in C# script component are now back to ref so they donā€™t require a default value

Plus lists are now IList instead of IEnumerable so they allow indexing

9 Likes

1 - RH-78882 Add shortcuts for code folding
2 - RH-78881 Support collapsing editor window by double-clicking on the title bar like GH1
3 - RH-78883 Add shortcuts for code commenting that supports non-english keyboards

2 Likes

Hi @eirannejad ,

Iā€™m running an 8.3 build and noticing a quirk with the output parameters and specifically the ā€œoutā€ parameter.

I used to be able to use Python code such as this:

ghenv.Component.Params.Input[0].Name ="Value"
ghenv.Component.Params.Input[0].NickName ="V"
ghenv.Component.Params.Input[0].Description ="Values To Convert"

ghenv.Component.Params.Output[0].Name ="Converted Value"
ghenv.Component.Params.Output[0].NickName ="Cv"
ghenv.Component.Params.Output[0].Description ="Values In Model Units"

To automatically setup the tooltips of input/outputs.

However, the outputs return null now when I do it this way because it seems to overwrite the standard ā€œoutā€ output.

I figured out a temporary workaround by enabling the standard ā€œoutā€ output and then setting the parameter tooltip index to 1 instead of 0. If I leave it at 0 it overwrites the ā€œoutā€ and causes issues, if I set it to 1 it leaves the ā€œoutā€ alone.

The caveat is that if I turn off the standard ā€œoutā€ option then it wonā€™t work because it doesnā€™t see the output index of 1 if there is only a single output.

In the snip you can see the script up top used to work just fine (despite it showing null now)
Now I need to have the ā€œoutā€ showing at all times or it wonā€™t yield any output values.

Additionally it seems I no longer can have the same input and output parameter names. The script above worked before and now I need to change the output to something other than V for it to work. (Which arguably is better for clarity anyways so thatā€™s fine I guess)

EDIT: I rolled back to the last 8.2 Service Release Candidate for now, thanks!

Iā€™d be happy to share the code in a message if needed.

Thanks for your help!

I see where the problem is. This seems to be a regression and a bug that does not trigger component solve when out parameter is toggled .I didnā€™t have a test for this. Iā€™ll add and make sure this is fixed for next build.

P.S.
There has been a massive amount of improvement to the Script component stability and performance between 8.2 and 8.3. Iā€™d still appreciate if you can update before 8.3 is public and test so I know there arenā€™t more regressions :smiley: :pray:

4 Likes

Thanks @eirannejad , happy to test the latest build whenever itā€™s available, just shoot me a message. Cheers!