Copy pasting custom widget as json text

Hi !

I've been experimenting with generating .json interfaces files with python to create interfaces on the fly. In my python code, I have some modified base widgets / more advanced panels with sub widgets. It works well when I'm generating the whole .json file. But sometimes I want to add a custom widget to an existing .json file. The approach I have is to either keep all my custom widgets in a "dev" tab inside the file and copy paste them from there (but make the file quite heavy) or open another session file, copy what I need and re-open the original interface file but that's not super practical

I'm a big user of TouchDesigner (interactive art / live video processing tool) and It has a "palette" features that gather all the custom modules that you develop and want to drop directly in your project.

I would like to have a similar workflow in OSC where I could have a view on all my custom widgets (stored in a folder in the osc root path ?) and be able to drop them on the grid either as a fragment or as an editable widget.

An alternative could be to store the code of all my custom widgets in a series of .md file and copy paste the json as text in the interface.

Would any of those two options be feasable ?

Thanks

Nicolas

Option 1 would be nice and has been discussed a long time ago, but I never found the time to work on it, so I'd say it's not impossible to happen someday but honestly I don't know when.
Option 2 could be a cheaper alternative, I will keep it in mind.

Meanwhile, note that you can open multiple sessions at a time on the same server (just open a second client with a browser). You could open that dev session of yours and copy-paste across clients (the clipboard is shared).

Thanks for your feedback. The multiple session on the same server is a great idea ! I always assumed 1 server = 1 client.

To add to option 2, it could nice to do the other way around : aka paste from O S C to any text file editor the widget as json text, maybe with a modified ctrl + c ?

Nicolas