Some months ago I was checking the sources and I know that the comp nodes were written in C. I was going to write a node for compositor , remembering that it was in C. So I went ahead and got the latest update however it looks like all the nodes were ported to Cpp I guess I missed a good portion of development news there.
Anyway my question is this. Can I use c for writing the node? Is C out of question? The reason I am asking is that naturally all these Cpp abstractions seems to add more layers and more files. For example the gamma node was a simple c file back couple months ago. And it seems like now it relies on many more files.
I would appreciate some suggestions comments here:) Basically I was going to write a better gamma correction and linear workflow tool (srgb to raw etc)
Nodes always required changing something like 10 different files to add a new one so I don’t think it was even possible for them to make it any more difficult than before…
I was poking around in the new comp nodes C++ code a few weeks back and it doesn’t seem like too much trouble to add a new Comp-O-Exeu-Engine-Whatevertheydbecalled.
Uncle Entity
I see that in the code tree there is the compositor and there is the nodes/composite. Are both of them supported at the same time? I mean if I compile which one has precedence?
@kkar, while Im not a big C++ fan, most of the logic for these compositing nodes normally ends up in the executePixel callback.
This can be written in quite a C’ish style.
While some class methods are used - this is reasonably C style IMHO.
Thanks for the pointers. After your post I went ahead and start digging. And I actually adding new nodes does not sound as horrible as I have thought. There are couple dependencies to find out and a good text search tool definitely helps there. The Gamma node is an easy one to start hacking along with the one you have mentioned.
I am hitting couple blocks with my new node but I believbe it is all solvable.
Meanwhile it would be great to have some python script project generators. Like a python script would named “create node project”, which would create the proper list of files in place with proper directives to edit the proper kernel headers. I will look into this while working on this.