Am Freitag, 14. Oktober 2016, 11:10:08 CEST schrieb Jan Ingwer Baer: > Am 13.10.2016 um 23:56 schrieb Tobias Ellinghaus: > > Am Donnerstag, 13. Oktober 2016, 23:00:42 CEST schrieb Jan Ingwer Baer: > >> I would like to see a more simple way to add custom iop modules to > >> darktable. > >> > >> I think it should be possible to load the iop modules at startup and > >> calculate the processing order at runtime instead of calculating it in > >> "iop_dependencies.py" at build time. > > > > That would be great. > > > >> For this the iop modules must have there constraints about the > >> processing order inline and darktable can calculate the processing order > >> from the constraints after loading all iop modules. > > > > And what would those constraints look like? > > in develop/imageop.h : > > typedef struct iop_constraint_t { > char* first; > char* second; > } iop_constraint_t; > > typedef iop_constraint_t iop_constraint_list_t[]; > > And every imageop modul has a list : > > const iop_constraint_list_t constraint_list = { > { "colorcorrection", "colorreconstruction"}, > { "colorreconstruction", "colorin"}, > ... > { NULL, NULL } > }; > > The entrys in the list are the same as in io_dependencies.py. Every > modul have there own constraints. If there are the same entrys in > different modules they are deleted in the processing of the constraints > list. > > In develop/imageop.c after loading all imageop modules: > > dt_set_module_prioritys() > combine all contraint_list to one pipe_constraints_list > alpha sort pipe_constraints_list by first entry > delete all double entrys from pipe_constraints_list > delete all entrys from pipe_constraints_list where a module is missing > topological sort with data from pipe_constraints_list > set priority for all loaded imageop modules > > After setting the priority of all loaded imageop modules all the other > processing can be the same as now. > > If you think that is usefull, i can write the code for setting the > prioritys.
That wouldn't work for two reasons: - iops may not know about each other or assume that they are not the only one. - keeping that data in sync sounds like a big burden. So eventually the constraints will be contradicting each other and what then? > >> Jan > > > > Tobias > > Jan Tobias PS: Please keep your answers on the list.
signature.asc
Description: This is a digitally signed message part.