The main goal here is to move towards more self contained node definitions. Previously, one would have to change blenkernel to add a new node which is not necessary anymore. There is no need for all these register functions to "leak out" of the nodes module.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- register-nodes-refactor (branched from master)
- Build Status
Buildable 24823 Build 24823: arc lint + arc unit
Event Timeline
Big picture I think this is an improvement.
Looking at the current code, ED_init_standard_node_socket_type is called from nodes rather then blenkernel, so the patch description isn't quite right.
I wonder if you could expand the description to briefly describe how the modules are supposed to depend on each other.
AFAIK, theoretically nodes is supposed to live on top of blenkernel, so the kernel shouldn't call any functions from nodes. And editors is supposed to live on top of that.
We're pretty far away from that right now, though this patch gets us a bit closer.
Looking at the current code, ED_init_standard_node_socket_type is called from nodes rather then blenkernel, so the patch description isn't quite right.
Oh right, I kind of got this mixed up. Will move the socket stuff back to where it was.
I wonder if you could expand the description to briefly describe how the modules are supposed to depend on each other. AFAIK, theoretically nodes is supposed to live on top of blenkernel, so the kernel shouldn't call any functions from nodes. And editors is supposed to live on top of that.
Yeah, it's not totally clear whether the "node system" (as opposed to the individual nodes) should live in blenkernel or nodes or somewhere else. What I am quite sure about is that actual nodes implementations should be able to depend on APIs provided by the editors module. Also, the editors module has to be able to depend on node APIs. The editors module should generally not depend on knowing about individual nodes, but it's hard to say where node specific operators should live...
My next goal is to put the new API from D16596: Nodes: Refactor how socket positions are determined. (WIP) into ED_node.hh which is included by individual nodes, so that they can tell the editors module how they want to be drawn.