API quality of life updates

The API right now is really impressive, and I love the ability to reload my code in real time with every change so that development is as easy as just putting down the headset! The console placement is also excellent. After spending ~5 hours working with the plugin API, though, I have some suggestions:

1. EASY PRIMITIVE DRAWING FOR PLUGIN UI.
I would like it so that if the API needs to draw a sphere, cube, or circle, I can just specify a Vector3D and change one other parameter to have the shape be filled or hollow. Another parameter should be color (RGBA). The texture doesn’t matter – the purpose is entirely UI. (although I guess some folks are going to want to be able to change the texture, because no one really wants to define how to draw a cube path by path themselves).

2. EASIER TEMPORARY DRAWING.
One command should delete every stroke a plug-in has generated. Perhaps even the strokes from a plug-in should be kept in a separate stroke object for a greater ease of management.

This would simplify UI work GREATLY (it’s currently just really hard to delete strokes right now).

4. PLEASE NO NULLS.
Right now Sketch.stroke.count gives a NULL if the sketch has been cleared. I lied: I have substantial programming experience, but not in Lua.

I think, if a sketch has just been cleared, Sketch.stroke.count should return 0. This would simplify scripting Open Brush.

5: COPYING ERROR MESSAGES?

As I was saying, the console placement in open brush is excellent. However, I could not find a way to copy error messages on the desktop system I was using. Perhaps introduce a keyboard shortcut that copies console output or one that opens a text. Based console on the computer that open brush is running on for ease of copy/pasting error messages.
Was this page helpful?