Grasshopper Python Editor even a bigger mess in the latest WIP!

ghpython
grasshopper
(P1r4t3b0y) #1

Hello everybody,

It is probably already widely recognised that the Grasshopper Python editor has, up to now, never been really great, and only barely even a shadow of what its distant cousin on Windows offers the user.

However, with an external editor and laborious copy-pasting back and fourth, it is still a pretty good, shallow GUI for executing pythonic code in Grasshopper.
Sure, its bottom half window, used on Windows as a sort of console, is unused and thus superfluous on macOS. Your debugging is usually done with a panel, fed from the Out output, which really isn’t even that bad. Panels can be easily customised.
The Python editing features of the editor are also very reduced. It does not do code suggestions or completion, and doesn’t allow constant indentations (i.e. 4 spaces) by pressing tab on your keyboard. You have to manually indent with the spacebar on your keyboard for each line with indentation levels often deeper than just one. When using tab, the editor indents about 4 spaces (one tab?), but then throws a mixed indentation error, when you run your code.
Furthermore, the default text in the editor is rather small and barely readable, since the serif font is very light. You can change this, but the editor resets each time that you restart Rhino.

What a mess, you might think? Well, the latest version of the editor in Rhino WIP (6.15.19086.09026) is even worse.
Not only have none of the above features been added yet, but it turns out other even more basic features have been lost along its apparently very stony development path.
In the latest, golden Rhino version for Mac (5.5.3), you could at least select all the code from the editor with CMD + A, in order to replace it with your latest code, from the supperior external editor. Not possible anymore! Isn’t ‘select all’ by shortcut usually a system wide feature, supported by even the most ‘minimalist’ text editors?
Furthermore, when running your code, some errors are not output from the Out output to a panel anymore, but only display in the tiny error bubble of the editor component. Remember that debugging has to be done through a panel, since the small window doesn’t print any information.

I get it! Rhino for Mac 6 is a work in progress, but what I don’t get is, why some features that worked well in Rhino 5, miraculasly don’t work anymore or have been omitted. The results surely is a crippled component!

Please, improve the Grasshopper Python editor component for Rhino Mac!

1 Like
(Dan Belcher) #2

Hi @p1r4t3b0y-

This is great feedback to hear and we understand what you are getting at.

I just wanted to clear up your question above: in order to make a major leap forward with the script editors, we are moving to a completely different technology. This requires ripping out all the old stuff and replacing it with new stuff. Think of it as tearing everything down “to the studs” - sure the house doesn’t have any walls right now - but it should have much better walls when we rebuild it.

It’s our goal to at least have the features you highlighted from Rhino 5 for Mac’s script editors by the time we ship Rhino 6 for Mac and then slowly and carefully add even more as we go.

CC: @Alain, @stevebaer

1 Like
#3

While this won’t change the actual usability of the built-in editor, this may alleviate some of your pain.

Right click on the GHPython component and click “show code input param”. Then you can use the read file component in order to read a Python from your filesystem. You can then edit your Python code from the editor of your choice.

2 Likes