Idea about code editors

I had been thinking about the issue of code editing in VUO and how it works inside of input ports.

It is very helpful to be able to have a free standing window to edit code within, as would be typical in Xcode, or QC.

The GUI of the VUO editor does not have this, and relies on typing into input ports. (edit: well, there is the code editor spawned when selecting to create a shader, but it doesn’t appear that this can be spawned in the typical composition building context?)

Clicking on an input port to enter code is fine itself, but VUO has generally adopted the QC metaphor of the little text box….unsure of how to describe this. Perhaps there could be a way to spawn a typical code entry window from clicking on a text input port in some cases.

Second thought, is that a code editing node could have output ports that send “did finish typing” style events to output. This could be looped back around to create a new fire event, so that when users finish typing, a code run could be initialized automatically. This could give similar results to the way QC would attempt to run a piece of code when the user finishes typing, and the user doesn’t have to constantly recompile for each change, the way that is needed on something like Shadertoy.

Anyway, just some thoughts on how that could possibly work, hopefully it is of some use.

This sounds great.
And, how about this for a dopey idea:

 

1 Like

I guess what I was envisioning is that the programmer of a given node would specify that clicking on the input port of the node could create this sort of text entry window, similar to what you have posted above Keith. And that the output of the node itself would loop back around to create fire events, when a user stops typing…things like that.

I was just trying to think of what VUO-type metaphor makes sense for that level of function. It seems the current kind of window spawned by the “shadertoy” node when clicking in the input port works adequately for code entry itself, at least imo.

That said, looking at that above, I think it’s a really good idea to have text entry work that way, as its own node. It could output strings directly into all needed nodes. It could have additional outputs for typical events, like when a user clicks in the entry field, starts typing, ends typing, etc, which could be used to fire off nodes downstream.

I think the appearance of all nodes in VUO is basically that QC looking patch style, but a few other types like this could really open up things. There is probably a bit of (unplanned!) overlap between this and the discussion jersmi is having about having a knob object in the editor.  

Max/MSP is an obvious reference point here.

2 Likes

max looks nice these days…

1 Like