-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Port-Based Node-Graph #1277
Conversation
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. |
7496da5
to
7d20f37
Compare
I have implemented support for looping, this can be done sequentially, via thread or multiprocessing using the |
884d9c7
to
6cac134
Compare
Add `colour.utilities.Port`, `colour.utilities.PortNode`, `colour.utilities.PortGraph`, `colour.utilities.For`, `colour.utilities.ParallelForThread`, and `colour.utilities.ParallelForMultiProcess` classes.
I'll have more time for a review on Sunday time in central US. Looks promising! |
…h.to_graphviz` method.
…ode` to provide native composition.
…here a sub-process crashes. References python/cpython#66587
I'm going to merge this one! The feature is at a point where it works really well. What might happen in the future though is that we will extract this in its own repository but for now here is good as colour is the lowest common denominator in our projects. |
Summary
This PR implements support for a port-based node-graph via 6 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