I prefer different components like in Rhino 7.
C#, an updated GhPython to Ironpython3, and a new one for Python 3.
RH-78322 āOutā parameter on new Script component is not removable from ZUI interface
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
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:
- Setting an input āas listā, inside the code editor is shown as IEnumerableā¦ and bracket
[]
indexing doesnāt work.
I can understand things not working in beta. But I canāt even test stuff in current release.
Here now some non-destructive problems (but imo any of them are really bad UX side)
-
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.
-
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.
-
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. -
adding before/after overrides is bugged. I can see the added code only after copying the whole script component.
-
no UI side bar to scroll up/down the code
-
script editor is pre-bloated:
left = current state , right = how it could/should be
-
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ā¦ ???) -
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?
-
Dropdown autocompletation is too āaggressiveā:
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 ā¦)
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!
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
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 - 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 - 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
@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
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
Thanks to @AndersDeleuran and @maje90 for great feedback. See above for related tickets please
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
:
- 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!
@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ā
Yup. Aware of that. RH-75781 Script editor ā Component cone wrong.
Thanks for reporting
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:
-
āShortcut or button which āCollapsesā all functions, classes etc.ā See this Github issue.
-
āMinimize GHPython Editorā. See this GitHub issue.
-
Comment/uncomment line shortcut that works with nordic ISO keyboard (e.g. Ctrl + T). See this old Grasshopper topic.
One set of auto-init script components coming up in Rhino 8.3 RC
Plus a save button that works like OK button in the old editor
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
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
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
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
Thanks @eirannejad , happy to test the latest build whenever itās available, just shoot me a message. Cheers!