Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

ScriptEditor, First Impressions, Ideas, and Improvements

$
0
0

Hello

Usually, I am not a big fan of code editors integrated into software, but I have to admit that you have managed to create an editor that integrates perfectly with all the languages and specificities of Rhino development.

But of course, I have some things to say! :slight_smile:

Since Rhino 6, I have had my own C# compilation system, which is a makeshift setup with lots of bugs, and I am very happy that it can be replaced by the new ScriptEditor. However, it has some advantages that I would like to see implemented in this new system.

Editor

First of all, the editor itself, there are a few features that I sorely miss in ScriptEditor:

  • Zoom Wheel
  • Custom shortcuts for FoldAll and UnFoldAll (the default keyboard shortcuts of MonacoEditor have never worked for me, so I don’t even know if you have left them active or not)
  • The play button does not execute the file on the right when we simply click in the explorer.
    I always get caught, it would seem logical to me that the play button executes the displayed file.

Language

Next, without going as far as the full features of OmnisCharp:

  • It would be nice if tooltips displayed function arguments when opening a parenthesis or when the mouse hovers over a function name.
  • And since I tend to section my code into many small functions, I use the Ctrl+Click combination a lot to jump from one function to another.

API

  • Add callback functions to the Script_Instance class before each recompilation and when the Grasshopper document changes.
    In this example, the mouse listener is therefore a static object unique to each compilation that is cleaned up before each recompilation or disabled when the document changes.

  • Ability to define custom script options, i.e., static variables that are not directly related to the component’s result calculation. For example, debugging variables or, in this example, a variable allowing a visual aid to be displayed. These are variables that do not directly impact the result, and to avoid overloading the input parameters or the context menu, I have grouped them in a separate window.


File Explorer

  • Allow adding, moving, or renaming files in the explorer.
    Well, maybe that’s not a small task. But the file explorer in ScriptEditor is great, and it’s quite frustrating not being able to manage your code library directly in the interface.

jmv

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles