Open KelSolaar opened 1 week ago
I will look at creating some subclasses that have an execution route instead of relying on the ports, that would allow for adding some control flow nodes, e.g., for loop and conditional branching.
I have implemented support for looping, this can be done sequentially, via thread or multiprocessing using the colour.utilities.For
, colour.utilities.ParallelForThread
and colour.utilities.ParallelForMultiProcess
nodes respectively.
I'll have more time for a review on Sunday time in central US. Looks promising!
Summary
This PR implements support for a port-based node-graph via 3 new classes:
colour.utilities.Port
colour.utilities.PortNode
colour.utilities.PortGraph
colour.utilities.For
colour.utilities.ParallelForThread
colour.utilities.ParallelForMultiProcess
The idea behind it is to be able to construct processing graph, initially with code but possibly using a UI in the future.
The API is as follows:
This is obviously a simple and naive example but the immediate use case is for colour-hdri:
Preflight
Code Style and Quality
colour
,colour.models
.Documentation