Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/CMakeLists.txt24
-rw-r--r--source/blender/nodes/Makefile4
-rw-r--r--source/blender/nodes/SConscript15
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_blur.c4
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_composite.c6
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_curves.c7
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_defocus.c2
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_filter.c4
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_image.c30
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c4
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c26
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_texture.c10
-rw-r--r--source/blender/nodes/intern/CMP_nodes/Makefile3
-rw-r--r--source/blender/nodes/intern/CMP_util.h24
-rw-r--r--source/blender/nodes/intern/Makefile6
-rw-r--r--source/blender/nodes/intern/SHD_nodes/Makefile3
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c11
-rw-r--r--source/blender/nodes/intern/SHD_util.h26
-rw-r--r--source/blender/nodes/intern/TEX_nodes/Makefile1
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_curves.c9
-rw-r--r--source/blender/nodes/intern/TEX_util.c5
-rw-r--r--source/blender/nodes/intern/TEX_util.h7
22 files changed, 108 insertions, 123 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 4e9e4c2f84f..664aacf11ab 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -26,21 +26,15 @@
FILE(GLOB SRC intern/*.c intern/CMP_nodes/*.c intern/SHD_nodes/*.c intern/TEX_nodes/*.c)
SET(INC
- . ../../../intern/guardedalloc ../include ../blenlib ../makesdna
- ../python ../render/extern/include ../../../intern/decimation/extern
+ . ../../../intern/guardedalloc ../editors/include ../blenlib ../makesdna
+ ../render/extern/include ../../../intern/decimation/extern ../makesrna
../imbuf ../avi ../../../intern/elbeem/extern
../../../intern/iksolver/extern ../blenloader ../quicktime
../blenkernel ../../../extern/glew/include ../gpu
${SDL_INC}
${ZLIB_INC}
- ${PYTHON_INC}
)
-IF(WITH_VERSE)
- ADD_DEFINITIONS(-DWITH_VERSE)
- SET(INC ${INC} ${VERSE_INC})
-ENDIF(WITH_VERSE)
-
IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
@@ -55,13 +49,11 @@ IF(WITH_FFMPEG)
ADD_DEFINITIONS(-DWITH_FFMPEG)
ENDIF(WITH_FFMPEG)
-BLENDERLIB(bf_nodes "${SRC}" "${INC}")
-
-IF(WITH_VERSE)
- ADD_DEPENDENCIES(bf_nodes mkprot verse)
-ENDIF(WITH_VERSE)
+IF(WITH_PYTHON)
+ SET(INC ${INC} ../python ${PYTHON_INC})
+ELSE(WITH_PYTHON)
+ ADD_DEFINITIONS(-DDISABLE_PYTHON)
+ENDIF(WITH_PYTHON)
-IF(WITH_INTERNATIONAL)
- ADD_DEFINITIONS(-DWITH_FREETYPE2)
-ENDIF(WITH_INTERNATIONAL)
+BLENDERLIB(bf_nodes "${SRC}" "${INC}")
diff --git a/source/blender/nodes/Makefile b/source/blender/nodes/Makefile
index 39d85d26fef..400064f24b8 100644
--- a/source/blender/nodes/Makefile
+++ b/source/blender/nodes/Makefile
@@ -1,5 +1,5 @@
#
-# $Id$
+# $Id: Makefile
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -17,7 +17,7 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# The Original Code is Copyright (C) Blender Foundation.
# All rights reserved.
#
# The Original Code is: all of this file.
diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript
index bf8df8a9156..0b35db3b4b7 100644
--- a/source/blender/nodes/SConscript
+++ b/source/blender/nodes/SConscript
@@ -7,8 +7,8 @@ shdsources = env.Glob('intern/SHD_nodes/*.c')
texsources = env.Glob('intern/TEX_nodes/*.c')
incs = '. ./intern '
-incs += '#/intern/guardedalloc ../include ../blenlib ../makesdna'
-incs += ' ../render/extern/include '
+incs += '#/intern/guardedalloc ../editors/include ../blenlib ../makesdna'
+incs += ' ../render/extern/include ../makesrna '
incs += ' ../imbuf ../avi '
incs += ' ../blenloader'
incs += ' ../blenkernel ../renderconverter '
@@ -27,9 +27,6 @@ if env['WITH_BF_PYTHON']:
else:
defs.append('DISABLE_PYTHON')
-if env['WITH_BF_INTERNATIONAL']:
- defs.append('WITH_FREETYPE2')
-
if env['WITH_BF_OPENEXR']:
defs.append('WITH_OPENEXR')
@@ -41,7 +38,7 @@ if env['WITH_BF_QUICKTIME']:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']
-env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['intern', 'core', 'player'], priority = [200, 200, 400] )
-env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['intern', 'core', 'player'], priority = [200, 175, 300] )
-env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['intern', 'core', 'player'], priority = [200, 175, 300] )
-env.BlenderLib ( libname = 'bf_texnodes', sources = texsources, includes = Split(incs), defines = defs, libtype=['intern', 'core', 'player'], priority = [200, 175, 300] )
+env.BlenderLib ( libname = 'bf_nodes', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [190] )
+env.BlenderLib ( libname = 'bf_cmpnodes', sources = cmpsources, includes = Split(incs), defines = defs, libtype=['core'], priority = [175] )
+env.BlenderLib ( libname = 'bf_shdnodes', sources = shdsources, includes = Split(incs), defines = defs, libtype=['core'], priority = [175] )
+env.BlenderLib ( libname = 'bf_texnodes', sources = texsources, includes = Split(incs), defines = defs, libtype=['core'], priority = [175] )
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
index f9be9533658..a96f3489978 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
@@ -670,6 +670,8 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
if(img!=in[0]->data)
free_compbuf(img);
}
+
+ generate_preview(node, out[0]->data);
}
static void node_composit_init_blur(bNode* node)
@@ -682,7 +684,7 @@ bNodeType cmp_node_blur= {
/* type code */ CMP_NODE_BLUR,
/* name */ "Blur",
/* width+range */ 120, 80, 200,
- /* class+opts */ NODE_CLASS_OP_FILTER, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS,
/* input sock */ cmp_node_blur_in,
/* output sock */ cmp_node_blur_out,
/* storage */ "NodeBlurData",
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c b/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
index 89bd8e43694..ee9545c3196 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
@@ -46,9 +46,11 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
/* stack order input sockets: col, alpha, z */
if(node->flag & NODE_DO_OUTPUT) { /* only one works on out */
+ Scene *scene= (Scene *)node->id;
RenderData *rd= data;
- if(rd->scemode & R_DOCOMP) {
- RenderResult *rr= RE_GetResult(RE_GetRender(G.scene->id.name)); /* G.scene is WEAK! */
+
+ if(scene && (rd->scemode & R_DOCOMP)) {
+ RenderResult *rr= RE_GetResult(RE_GetRender(scene->id.name));
if(rr) {
CompBuf *outbuf, *zbuf=NULL;
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
index 01af0e1db1d..3d536788263 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
@@ -40,11 +40,12 @@ static bNodeSocketType cmp_node_time_out[]= {
static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
+ RenderData *rd= data;
/* stack order output: fac */
float fac= 0.0f;
if(node->custom1 < node->custom2)
- fac= (G.scene->r.cfra - node->custom1)/(float)(node->custom2-node->custom1);
+ fac= (rd->cfra - node->custom1)/(float)(node->custom2-node->custom1);
fac= curvemapping_evaluateF(node->storage, 0, fac);
out[0]->vec[0]= CLAMPIS(fac, 0.0f, 1.0f);
@@ -53,8 +54,8 @@ static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack *
static void node_composit_init_curves_time(bNode* node)
{
- node->custom1= G.scene->r.sfra;
- node->custom2= G.scene->r.efra;
+ node->custom1= 1;
+ node->custom2= 250;
node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
index 6f175671296..b9a4f4c0cc5 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
@@ -253,7 +253,7 @@ static void defocus_blur(bNode *node, CompBuf *new, CompBuf *img, CompBuf *zbuf,
// get some required params from the current scene camera
// (ton) this is wrong, needs fixed
- Object* camob = G.scene->camera;
+ Object* camob = NULL; // XXX G.scene->camera;
if (camob && camob->type==OB_CAMERA) {
Camera* cam = (Camera*)camob->data;
cam_lens = cam->lens;
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
index 6011ac3b58a..2c3b78e13a3 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
@@ -211,6 +211,8 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
}
out[0]->data= stackbuf;
+
+ generate_preview(node, out[0]->data);
}
}
@@ -220,7 +222,7 @@ bNodeType cmp_node_filter= {
/* type code */ CMP_NODE_FILTER,
/* name */ "Filter",
/* width+range */ 80, 40, 120,
- /* class+opts */ NODE_CLASS_OP_FILTER, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS,
/* input sock */ cmp_node_filter_in,
/* output sock */ cmp_node_filter_out,
/* storage */ "",
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
index be5a1d7241b..5f444357776 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c
@@ -65,9 +65,28 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
if(ibuf==NULL)
return NULL;
- if(ibuf->rect_float==NULL)
- IMB_float_from_rect(ibuf);
+ if (rd->color_mgt_flag & R_COLOR_MANAGEMENT) {
+ if (ibuf->profile == IB_PROFILE_NONE) {
+ if (ibuf->rect_float != NULL) {
+ imb_freerectfloatImBuf(ibuf);
+ }
+ ibuf->profile = IB_PROFILE_SRGB;
+ IMB_float_from_rect(ibuf);
+ }
+ } else {
+ if (ibuf->profile == IB_PROFILE_SRGB) {
+ if (ibuf->rect_float != NULL) {
+ imb_freerectfloatImBuf(ibuf);
+ }
+ ibuf->profile = IB_PROFILE_NONE;
+ IMB_float_from_rect(ibuf);
+ }
+ }
+ if (ibuf->rect_float == NULL) {
+ IMB_float_from_rect(ibuf);
+ }
+
type= ibuf->channels;
if(rd->scemode & R_COMP_CROP) {
@@ -330,11 +349,12 @@ void node_composit_rlayers_out(RenderData *rd, RenderLayer *rl, bNodeStack **out
static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- Scene *sce= node->id?(Scene *)node->id:G.scene; /* G.scene is WEAK! */
+ Scene *sce= (Scene *)node->id;
RenderData *rd= data;
- RenderResult *rr;
+ RenderResult *rr= NULL;
- rr= RE_GetResult(RE_GetRender(sce->id.name));
+ if(sce)
+ rr= RE_GetResult(RE_GetRender(sce->id.name));
if(rr) {
SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
index 6a4916b3fac..ca6de027b1d 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
@@ -73,6 +73,8 @@ static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in,
composit3_pixel_processor(node, stackbuf, in[1]->data, in[1]->vec, in[2]->data, in[2]->vec, in[0]->data, fac, do_mix_rgb, CB_RGBA, CB_RGBA, CB_VAL);
out[0]->data= stackbuf;
+
+ generate_preview(node, out[0]->data);
}
}
@@ -82,7 +84,7 @@ bNodeType cmp_node_mix_rgb= {
/* type code */ CMP_NODE_MIX_RGB,
/* name */ "Mix",
/* width+range */ 110, 60, 120,
- /* class+opts */ NODE_CLASS_OP_COLOR, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS,
/* input sock */ cmp_node_mix_rgb_in,
/* output sock */ cmp_node_mix_rgb_out,
/* storage */ "",
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
index 722b00d57a9..8c63c348b57 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
@@ -62,9 +62,9 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack *
}
}
- BKE_makepicstring(string, nif->name, rd->cfra, nif->imtype);
+ BKE_makepicstring((Scene *)node->id, string, nif->name, rd->cfra, nif->imtype);
- if(0 == BKE_write_ibuf(ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality))
+ if(0 == BKE_write_ibuf((Scene *)node->id, ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality))
printf("Cannot save Node File Output to %s\n", string);
else
printf("Saved: %s\n", string);
@@ -81,15 +81,19 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack *
static void node_composit_init_output_file(bNode *node)
{
- NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file");
- node->storage= nif;
- BLI_strncpy(nif->name, G.scene->r.pic, sizeof(nif->name));
- nif->imtype= G.scene->r.imtype;
- nif->subimtype= G.scene->r.subimtype;
- nif->quality= G.scene->r.quality;
- nif->sfra= G.scene->r.sfra;
- nif->efra= G.scene->r.efra;
-};
+ Scene *scene= (Scene *)node->id;
+ NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file");
+ node->storage= nif;
+
+ if(scene) {
+ BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name));
+ nif->imtype= scene->r.imtype;
+ nif->subimtype= scene->r.subimtype;
+ nif->quality= scene->r.quality;
+ nif->sfra= scene->r.sfra;
+ nif->efra= scene->r.efra;
+ }
+}
bNodeType cmp_node_output_file= {
/* *next,*prev */ NULL, NULL,
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
index c1f1948dba1..b4d04076032 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
@@ -91,19 +91,13 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
if(node->id) {
RenderData *rd= data;
- RenderResult *rr= RE_GetResult(RE_GetRender(G.scene->id.name)); /* G.scene is WEAK! */
short sizex, sizey;
/* first make the preview image */
CompBuf *prevbuf= alloc_compbuf(140, 140, CB_RGBA, 1); /* alloc */
- if (rr) {
- sizex = rr->rectx;
- sizey = rr->recty;
- } else {
- sizex = rd->xsch;
- sizey = rd->ysch;
- }
+ sizex = rd->xsch;
+ sizey = rd->ysch;
prevbuf->rect_procedural= texture_procedural;
prevbuf->node= node;
diff --git a/source/blender/nodes/intern/CMP_nodes/Makefile b/source/blender/nodes/intern/CMP_nodes/Makefile
index 8a8d323ac5b..5e8753570af 100644
--- a/source/blender/nodes/intern/CMP_nodes/Makefile
+++ b/source/blender/nodes/intern/CMP_nodes/Makefile
@@ -38,8 +38,9 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I../../../blenkernel
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../../makesdna
+CPPFLAGS += -I../../../makesrna
CPPFLAGS += -I../../../blenlib
-CPPFLAGS += -I../../../include
+CPPFLAGS += -I../../../editors/include
CPPFLAGS += -I../../../imbuf
CPPFLAGS += -I../../../render/extern/include
CPPFLAGS += -I$(NAN_GLEW)/include
diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/intern/CMP_util.h
index e111632a195..19e41f5c118 100644
--- a/source/blender/nodes/intern/CMP_util.h
+++ b/source/blender/nodes/intern/CMP_util.h
@@ -37,19 +37,14 @@
#include "MEM_guardedalloc.h"
#include "DNA_camera_types.h" /* qdn: defocus node, need camera info */
-#include "DNA_action_types.h"
#include "DNA_color_types.h"
-#include "DNA_ipo_types.h"
#include "DNA_ID.h"
#include "DNA_image_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_space_types.h"
-#include "DNA_screen_types.h"
#include "DNA_texture_types.h"
-#include "DNA_userdef_types.h"
#include "BKE_blender.h"
#include "BKE_colortools.h"
@@ -65,17 +60,6 @@
#include "../CMP_node.h"
#include "node_util.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-#include "BIF_interface.h"
-#include "BIF_interface_icons.h"
-#include "BIF_language.h"
-#include "BIF_mywindow.h"
-#include "BIF_previewrender.h"
-#include "BIF_resources.h"
-#include "BIF_screen.h"
-#include "BIF_space.h"
-
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLI_rand.h"
@@ -84,18 +68,10 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-#include "BSE_drawipo.h"
-#include "BSE_node.h"
-#include "BSE_view.h"
-
#include "RE_pipeline.h"
#include "RE_shader_ext.h"
#include "RE_render_ext.h"
-#include "butspace.h"
-#include "blendef.h"
-#include "mydevice.h"
-
/* *************************** operations support *************************** */
/* general signal that's in output sockets, and goes over the wires */
diff --git a/source/blender/nodes/intern/Makefile b/source/blender/nodes/intern/Makefile
index 6167cf6bc72..08f4b936c76 100644
--- a/source/blender/nodes/intern/Makefile
+++ b/source/blender/nodes/intern/Makefile
@@ -38,10 +38,14 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I../../blenkernel
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../makesdna
+CPPFLAGS += -I../../makesrna
CPPFLAGS += -I../../blenlib
-CPPFLAGS += -I../../include
+CPPFLAGS += -I../../editors/include
CPPFLAGS += -I../../imbuf
CPPFLAGS += -I../../render/extern/include
CPPFLAGS += -I../../gpu
CPPFLAGS += -I$(NAN_GLEW)/include
CPPFLAGS += -I$(OPENGL_HEADERS)
+
+DIRS = SHD_nodes CMP_nodes TEX_nodes
+include nan_subdirs.mk
diff --git a/source/blender/nodes/intern/SHD_nodes/Makefile b/source/blender/nodes/intern/SHD_nodes/Makefile
index ae3cae029d2..b6b21d5f5f8 100644
--- a/source/blender/nodes/intern/SHD_nodes/Makefile
+++ b/source/blender/nodes/intern/SHD_nodes/Makefile
@@ -40,8 +40,9 @@ CPPFLAGS += -I../../../python
CPPFLAGS += -I../../../blenkernel
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../../makesdna
+CPPFLAGS += -I../../../makesrna
CPPFLAGS += -I../../../blenlib
-CPPFLAGS += -I../../../include
+CPPFLAGS += -I../../../editors/include
CPPFLAGS += -I../../../imbuf
CPPFLAGS += -I../../../render/extern/include
CPPFLAGS += -I../../../gpu
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c b/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
index 4b20ca9da21..fbc56dfcc83 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
@@ -42,14 +42,19 @@
#include "BKE_text.h"
#include "BKE_utildefines.h"
+// XXX
+#if 0
#ifndef DISABLE_PYTHON
#include "api2_2x/Node.h"
#include "api2_2x/gen_utils.h"
#include "BPY_extern.h"
#endif
+#endif
#include "../SHD_util.h"
+// XXX
+#if 0
static void node_dynamic_setup(bNode *node);
static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out);
static void node_dynamic_free_storage_cb(bNode *node);
@@ -772,4 +777,10 @@ bNodeType node_dynamic_typeinfo = {
/* id */ NULL
};
+#else
+
+bNodeType node_dynamic_typeinfo = {NULL};
+
+#endif
+
diff --git a/source/blender/nodes/intern/SHD_util.h b/source/blender/nodes/intern/SHD_util.h
index eda985529c1..a6fe5f4e9cc 100644
--- a/source/blender/nodes/intern/SHD_util.h
+++ b/source/blender/nodes/intern/SHD_util.h
@@ -31,23 +31,19 @@
#define SHD_NODE_UTIL_H_
#include <math.h>
+#include <float.h>
#include <string.h>
#include "MEM_guardedalloc.h"
-#include "DNA_action_types.h"
#include "DNA_color_types.h"
-#include "DNA_ipo_types.h"
#include "DNA_ID.h"
#include "DNA_image_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_space_types.h"
-#include "DNA_screen_types.h"
#include "DNA_texture_types.h"
-#include "DNA_userdef_types.h"
#include "BKE_blender.h"
#include "BKE_colortools.h"
@@ -62,17 +58,6 @@
#include "../SHD_node.h"
#include "node_util.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-#include "BIF_interface.h"
-#include "BIF_interface_icons.h"
-#include "BIF_language.h"
-#include "BIF_mywindow.h"
-#include "BIF_previewrender.h"
-#include "BIF_resources.h"
-#include "BIF_screen.h"
-#include "BIF_space.h"
-
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLI_rand.h"
@@ -81,20 +66,11 @@
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
-#include "BSE_drawipo.h"
-#include "BSE_node.h"
-#include "BSE_view.h"
-
#include "RE_pipeline.h"
#include "RE_shader_ext.h"
#include "GPU_material.h"
-#include "butspace.h"
-#include "blendef.h"
-#include "mydevice.h"
-
-
/* ********* exec data struct, remains internal *********** */
typedef struct ShaderCallData {
diff --git a/source/blender/nodes/intern/TEX_nodes/Makefile b/source/blender/nodes/intern/TEX_nodes/Makefile
index ac741280478..f42660bd562 100644
--- a/source/blender/nodes/intern/TEX_nodes/Makefile
+++ b/source/blender/nodes/intern/TEX_nodes/Makefile
@@ -41,6 +41,7 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
CPPFLAGS += -I../../../blenkernel
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
CPPFLAGS += -I../../../makesdna
+CPPFLAGS += -I../../../makesrna
CPPFLAGS += -I../../../blenlib
CPPFLAGS += -I../../../include
CPPFLAGS += -I../../../imbuf
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
index 8c86656b4f3..7d1366b5b18 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
@@ -41,8 +41,9 @@ static void time_colorfn(float *out, float *coord, bNode *node, bNodeStack **in,
/* stack order output: fac */
float fac= 0.0f;
- if(node->custom1 < node->custom2)
- fac = (G.scene->r.cfra - node->custom1)/(float)(node->custom2-node->custom1);
+ // XXX SOLVE! these functions should get the TexCallData pointer
+// if(node->custom1 < node->custom2)
+// fac = (scene->r.cfra - node->custom1)/(float)(node->custom2-node->custom1);
fac = curvemapping_evaluateF(node->storage, 0, fac);
out[0] = CLAMPIS(fac, 0.0f, 1.0f);
@@ -56,8 +57,8 @@ static void time_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out
static void time_init(bNode* node)
{
- node->custom1= G.scene->r.sfra;
- node->custom2= G.scene->r.efra;
+ node->custom1= 1;
+ node->custom2= 250;
node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/intern/TEX_util.c
index 1aabb7ae514..867e754f960 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/intern/TEX_util.c
@@ -192,7 +192,7 @@ void ntreeTexCheckCyclics(struct bNodeTree *ntree)
}
}
-void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, char do_preview, short thread, Tex *tex, short which_output)
+void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, char do_preview, short thread, Tex *tex, short which_output, int cfra)
{
TexResult dummy_texres;
TexCallData data;
@@ -203,6 +203,7 @@ void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, char do
data.do_preview = do_preview;
data.thread = thread;
data.which_output = which_output;
+ data.cfra= cfra;
ntreeExecTree(nodes, &data, thread);
}
@@ -220,7 +221,7 @@ void ntreeTexUpdatePreviews(bNodeTree* nodetree)
dummy_texres.nor = 0;
ntreeBeginExecTree(nodetree);
- ntreeTexExecTree(nodetree, &dummy_texres, coord, 1, 0, tex, 0);
+ ntreeTexExecTree(nodetree, &dummy_texres, coord, 1, 0, tex, 0, 0);
ntreeEndExecTree(nodetree);
}
diff --git a/source/blender/nodes/intern/TEX_util.h b/source/blender/nodes/intern/TEX_util.h
index 69cf20794c9..e560aa57921 100644
--- a/source/blender/nodes/intern/TEX_util.h
+++ b/source/blender/nodes/intern/TEX_util.h
@@ -34,7 +34,6 @@
#include "MEM_guardedalloc.h"
-#include "DNA_action_types.h"
#include "DNA_color_types.h"
#include "DNA_ipo_types.h"
#include "DNA_ID.h"
@@ -43,10 +42,7 @@
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
-#include "DNA_space_types.h"
-#include "DNA_screen_types.h"
#include "DNA_texture_types.h"
-#include "DNA_userdef_types.h"
#include "BKE_blender.h"
#include "BKE_colortools.h"
@@ -78,6 +74,7 @@ typedef struct TexCallData {
char do_preview;
short thread;
short which_output;
+ int cfra;
} TexCallData;
typedef void(*TexFn) (float *out, float *coord, bNode *node, bNodeStack **in, short thread);
@@ -99,6 +96,6 @@ void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn);
void tex_do_preview(bNode *node, bNodeStack *ns, TexCallData *cdata);
void ntreeTexUpdatePreviews( bNodeTree* nodetree );
-void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, char do_preview, short thread, struct Tex *tex, short which_output);
+void ntreeTexExecTree(bNodeTree *nodes, TexResult *texres, float *coord, char do_preview, short thread, struct Tex *tex, short which_output, int cfra);
#endif