[Bf-committers] Node Refactor
Bob Holcomb
bob_holcomb at hotmail.com
Wed Mar 21 04:22:49 CET 2007
First, sorry for the long email. It's got "stuff" in it, but I think it
may be helpful. I've been working on the node refactor for the last
couple of weeks between my day job and real life. I presented what I
had to Ton earlier today and would like to get the rest of the
communities opinion. I have removed all of node_composite.c and
node_shader.c from the blenkernel directory as well as many of the
functions from drawnode.c and node.c (some of the rendering functions
will be restored).
The goal is to generate a node plug-in API in the near future, whether
that is before 2.44 is release or not is still up in the air. My gut
feeling is it will be before 2.44, but may need revision in the future.
I would prefer to get it right the first time so please respond tho this
email if you have input. I do plan on following Peter's recommendation
for a plug-in api for the nodes for the most part, any deviations I make
will be noted on the wiki.
I created a new directory in the source under the /blender/source
directory called nodes. In this directory is /node and it has the
following structure:
.:
total 32
drwxr-sr-x 3 bob bob 4096 2007-03-20 23:11 .
drwsrwsr-x 69 bob bob 4096 2007-03-20 23:11 ..
-rw-rw-rw- 1 bob bob 6503 2007-03-20 00:50 CMP_node.h
drwxrwxrwx 4 bob bob 4096 2007-03-03 14:25 intern
-rw-rw-rw- 1 bob bob 5936 2007-03-20 00:22 node.h
-rw-rw-rw- 1 bob bob 3899 2007-03-20 00:50 SHD_node.h
./intern:
total 120
drwxrwxrwx 4 bob bob 4096 2007-03-03 14:25 .
drwxr-sr-x 3 bob bob 4096 2007-03-20 23:11 ..
drwxrwxrwx 2 bob bob 4096 2007-03-18 11:54 CMP_nodes
-rw-rw-rw- 1 bob bob 19721 2007-03-20 01:13 CMP_util.c
-rw-rw-rw- 1 bob bob 6514 2007-03-20 01:13 CMP_util.h
-rw-rw-rw- 1 bob bob 61236 2007-03-20 01:01 node.c
drwxrwxrwx 2 bob bob 4096 2007-03-18 19:51 SHD_nodes
-rw-rw-rw- 1 bob bob 5147 2007-03-20 00:57 SHD_util.c
-rw-rw-rw- 1 bob bob 3779 2007-03-20 00:23 SHD_util.h
./intern/CMP_nodes:
total 324
drwxrwxrwx 2 bob bob 4096 2007-03-18 11:54 .
drwxrwxrwx 4 bob bob 4096 2007-03-03 14:25 ..
-rw-rw-rw- 1 bob bob 4225 2007-03-20 00:47 CMP_alphaOver.c
-rw-rw-rw- 1 bob bob 16548 2007-03-20 01:13 CMP_blur.c
-rw-rw-rw- 1 bob bob 7406 2007-03-20 00:47 CMP_channelMatte.c
-rw-rw-rw- 1 bob bob 6588 2007-03-20 00:47 CMP_chromaMatte.c
-rw-rw-rw- 1 bob bob 4552 2007-03-20 00:47 CMP_colorSpill.c
-rw-rw-rw- 1 bob bob 3416 2007-03-20 00:47 CMP_composite.c
-rw-rw-rw- 1 bob bob 6339 2007-03-20 00:47 CMP_curves.c
-rw-rw-rw- 1 bob bob 29056 2007-03-20 00:47 CMP_defocus.c
-rw-rw-rw- 1 bob bob 8225 2007-03-20 00:47 CMP_diffMatte.c
-rw-rw-rw- 1 bob bob 4450 2007-03-20 00:47 CMP_dilate.c
-rw-rw-rw- 1 bob bob 4926 2007-03-20 00:47 CMP_displace.c
-rw-rw-rw- 1 bob bob 7967 2007-03-20 00:47 CMP_filter.c
-rw-rw-rw- 1 bob bob 3389 2007-03-20 00:47 CMP_flip.c
-rw-rw-rw- 1 bob bob 4238 2007-03-20 00:47 CMP_hueSatVal.c
-rw-rw-rw- 1 bob bob 3108 2007-03-20 00:47 CMP_idMask.c
-rw-rw-rw- 1 bob bob 21635 2007-03-20 00:47 CMP_image.c
-rw-rw-rw- 1 bob bob 4050 2007-03-20 00:47 CMP_lummaMatte.c
-rw-rw-rw- 1 bob bob 4638 2007-03-20 00:47 CMP_mapUV.c
-rw-rw-rw- 1 bob bob 4057 2007-03-20 00:47 CMP_mapValue.c
-rw-rw-rw- 1 bob bob 4258 2007-03-20 00:47 CMP_math.c
-rw-rw-rw- 1 bob bob 3103 2007-03-20 00:47 CMP_mixrgb.c
-rw-rw-rw- 1 bob bob 2934 2007-03-20 00:47 CMP_normal.c
-rw-rw-rw- 1 bob bob 5222 2007-03-20 00:47 CMP_outputFile.c
-rw-rw-rw- 1 bob bob 1825 2007-03-20 00:47 CMP_rgb.c
-rw-rw-rw- 1 bob bob 4557 2007-03-20 00:47 CMP_rotate.c
-rw-rw-rw- 1 bob bob 4477 2007-03-20 00:47 CMP_scale.c
-rw-rw-rw- 1 bob bob 5917 2007-03-20 00:47 CMP_sepcombHSVA.c
-rw-rw-rw- 1 bob bob 5206 2007-03-20 00:47 CMP_sepcombRGBA.c
-rw-rw-rw- 1 bob bob 6021 2007-03-20 00:47 CMP_sepcombYCCA.c
-rw-rw-rw- 1 bob bob 5843 2007-03-20 00:47 CMP_sepcombYUVA.c
-rw-rw-rw- 1 bob bob 2915 2007-03-20 00:47 CMP_setalpha.c
-rw-rw-rw- 1 bob bob 4954 2007-03-20 00:47 CMP_splitViewer.c
-rw-rw-rw- 1 bob bob 4028 2007-03-20 00:47 CMP_texture.c
-rw-rw-rw- 1 bob bob 2303 2007-03-20 00:47 CMP_translate.c
-rw-rw-rw- 1 bob bob 4289 2007-03-20 00:47 CMP_valToRgb.c
-rw-rw-rw- 1 bob bob 1835 2007-03-20 00:47 CMP_value.c
-rw-rw-rw- 1 bob bob 4194 2007-03-20 00:47 CMP_vecBlur.c
-rw-rw-rw- 1 bob bob 3857 2007-03-20 00:47 CMP_viewer.c
-rw-rw-rw- 1 bob bob 4593 2007-03-20 00:47 CMP_zcombine.c
./intern/SHD_nodes:
total 92
drwxrwxrwx 2 bob bob 4096 2007-03-18 19:51 .
drwxrwxrwx 4 bob bob 4096 2007-03-03 14:25 ..
-rw-rw-rw- 1 bob bob 2297 2007-03-20 00:48 SHD_camera.c
-rw-rw-rw- 1 bob bob 3192 2007-03-20 00:48 SHD_curves.c
-rw-rw-rw- 1 bob bob 4740 2007-03-20 00:48 SHD_geom.c
-rw-rw-rw- 1 bob bob 5821 2007-03-20 00:48 SHD_mapping.c
-rw-rw-rw- 1 bob bob 9089 2007-03-20 00:48 SHD_material.c
-rw-rw-rw- 1 bob bob 5522 2007-03-20 00:48 SHD_math.c
-rw-rw-rw- 1 bob bob 2418 2007-03-20 00:48 SHD_mixRgb.c
-rw-rw-rw- 1 bob bob 2350 2007-03-20 00:48 SHD_normal.c
-rw-rw-rw- 1 bob bob 2363 2007-03-20 00:48 SHD_output.c
-rw-rw-rw- 1 bob bob 1810 2007-03-20 00:48 SHD_rgb.c
-rw-rw-rw- 1 bob bob 2334 2007-03-20 00:48 SHD_squeeze.c
-rw-rw-rw- 1 bob bob 3880 2007-03-20 00:48 SHD_texture.c
-rw-rw-rw- 1 bob bob 3211 2007-03-20 01:11 SHD_valToRgb.c
-rw-rw-rw- 1 bob bob 1836 2007-03-20 00:48 SHD_value.c
-rw-rw-rw- 1 bob bob 4247 2007-03-20 00:48 SHD_vectMath.c
The point of all this is to move the rendering and initialization code
the the individual node files so that they can be moved to shared
libraries and loaded dynamically. This will involve new functions to
change the add node menu's (still to be done). I will be moving some
code back to blenkernel (mostly node.h and node.c). Please let me know
what your opinion is on this. It currently runs fine in this state in
case anybody is wondering. Since I started working on this, I haven't
been updating CVS (and have conflicts now). It'll take me a few hours,
but patches are available on request.
cheers,
Bob
More information about the Bf-committers
mailing list