vvvv / VL-Language

The official repo for the design of the VL programming language
31 stars 0 forks source link

[Proposal] Referencing files and folders and generate node definitions for them #29

Open azeno opened 4 years ago

azeno commented 4 years ago

The ability to reference a file or a folder from within a document and somehow generate node definitions for them based on some kind of node factory plugin mechanism would be very useful in scenarios like scripting, shader programming, asset management etc.

For each document the compiler would first collect all the node factories from the set of referenced documents and assemblies. It would then ask those factories to produce node definitions for each referenced file or folder. It would maybe also be useful for a factory to provide a set of nodes based on the document itself - it could be that it has some sense of a default folder it wants to scan.

To make things easier on the system it would be ok that those node factories can only be written in C# - otherwise it might get a little tricky as we'd need to compile a VL document in order to instantiate node factories contained in it.

During export those factories could also get some callbacks in order to copy certain files to the output directory.

azeno commented 4 years ago

This is more of a proposal already, the quests would be what I wrote in the first sentence, like how to accomplish having a node for a shader file beside the document as we know it from vvvv beta.