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:
-rw-r--r--SConstruct24
-rw-r--r--config/darwin-config.py2
-rw-r--r--config/linux2-config.py2
-rw-r--r--config/linuxcross-config.py2
-rw-r--r--config/openbsd3-config.py2
-rw-r--r--config/sunos5-config.py2
-rw-r--r--config/win32-mingw-config.py2
-rw-r--r--config/win32-vc-config.py2
-rw-r--r--intern/SConscript8
-rw-r--r--source/blender/SConscript6
-rw-r--r--source/blender/render/SConscript7
-rw-r--r--source/blender/render/intern/source/convertblender.c18
-rw-r--r--source/blender/render/intern/source/pipeline.c11
-rw-r--r--source/blender/src/SConscript7
-rw-r--r--source/blender/src/buttons_scene.c5
-rwxr-xr-xtools/btools.py4
16 files changed, 81 insertions, 23 deletions
diff --git a/SConstruct b/SConstruct
index 46a563300ec..017fed45921 100644
--- a/SConstruct
+++ b/SConstruct
@@ -92,10 +92,10 @@ quickie = B.arguments.get('BF_QUICK', None)
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
if quickdebug:
- B.quickdebug=string.split(quickdebug, ',')
+ B.quickdebug=string.split(quickdebug, ',')
else:
- B.quickdebug=[]
-
+ B.quickdebug=[]
+
if quickie:
B.quickie=string.split(quickie,',')
else:
@@ -120,9 +120,9 @@ env.SConscriptChdir(0)
cc = B.arguments.get('CC', None)
cxx = B.arguments.get('CXX', None)
if cc:
- env['CC'] = cc
+ env['CC'] = cc
if cxx:
- env['CXX'] = cxx
+ env['CXX'] = cxx
if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
platform = 'win32-vc'
@@ -161,15 +161,15 @@ opts = btools.read_opts(optfiles, B.arguments)
opts.Update(env)
# disable elbeem (fluidsim) compilation?
-if env['BF_NO_ELBEEM'] == 'true':
- env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
- env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
- env['CCFLAGS'].append('-DDISABLE_ELBEEM')
+if env['BF_NO_ELBEEM'] == 1:
+ env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
+ env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
+ env['CCFLAGS'].append('-DDISABLE_ELBEEM')
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):
- B.quickdebug += env['BF_DEBUG_LIBS']
+ B.quickdebug += env['BF_DEBUG_LIBS']
printdebug = B.arguments.get('BF_LISTDEBUG', 0)
@@ -181,8 +181,8 @@ if env['OURPLATFORM'] == 'linux2' :
#include "AL/alut.h"
int main(int argc, char **argv)
{
- alutGetMajorVersion();
- return 0;
+ alutGetMajorVersion();
+ return 0;
}
"""
diff --git a/config/darwin-config.py b/config/darwin-config.py
index 7257485d8c7..0d4bc5c0be0 100644
--- a/config/darwin-config.py
+++ b/config/darwin-config.py
@@ -82,6 +82,8 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
+WITH_BF_YAFRAY = 'true'
+
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/linux2-config.py b/config/linux2-config.py
index f77ffe47b22..f7d84d228f3 100644
--- a/config/linux2-config.py
+++ b/config/linux2-config.py
@@ -75,6 +75,8 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
+WITH_BF_YAFRAY = 'true'
+
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/linuxcross-config.py b/config/linuxcross-config.py
index fba10bbb089..2d833d2fcfc 100644
--- a/config/linuxcross-config.py
+++ b/config/linuxcross-config.py
@@ -4,6 +4,8 @@ LIBDIR = '${LCGDIR}'
WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist"
+WITH_BF_YAFRAY = 'true'
+
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.4'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
diff --git a/config/openbsd3-config.py b/config/openbsd3-config.py
index abeb9186bb8..b44e79eb2a6 100644
--- a/config/openbsd3-config.py
+++ b/config/openbsd3-config.py
@@ -76,6 +76,8 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
+WITH_BF_YAFRAY = 'true'
+
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/sunos5-config.py b/config/sunos5-config.py
index 436217c1be1..de342c40158 100644
--- a/config/sunos5-config.py
+++ b/config/sunos5-config.py
@@ -78,6 +78,8 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
+WITH_BF_YAFRAY = 'true'
+
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/win32-mingw-config.py b/config/win32-mingw-config.py
index 6208c266b5b..e23e6436c59 100644
--- a/config/win32-mingw-config.py
+++ b/config/win32-mingw-config.py
@@ -91,6 +91,8 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
+WITH_BF_YAFRAY = 'true'
+
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/config/win32-vc-config.py b/config/win32-vc-config.py
index b3edcab7e2b..cbed1ccbc5e 100644
--- a/config/win32-vc-config.py
+++ b/config/win32-vc-config.py
@@ -92,6 +92,8 @@ BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
+WITH_BF_YAFRAY = 'true'
+
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
diff --git a/intern/SConscript b/intern/SConscript
index ecb7f29fab6..f6092b7bd02 100644
--- a/intern/SConscript
+++ b/intern/SConscript
@@ -20,10 +20,10 @@ SConscript(['SoundSystem/SConscript',
# perhaps get rid of intern/csg?
NEW_CSG='false'
-if env['BF_NO_ELBEEM'] == 'false':
- SConscript(['elbeem/SConscript'])
+if env['BF_NO_ELBEEM'] == 0:
+ SConscript(['elbeem/SConscript'])
if NEW_CSG=='false':
- SConscript(['bsp/SConscript'])
+ SConscript(['bsp/SConscript'])
else:
- SConscript(['csg/SConscript'])
+ SConscript(['csg/SConscript'])
diff --git a/source/blender/SConscript b/source/blender/SConscript
index 9ead445aab1..75bd5d34822 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -15,8 +15,10 @@ SConscript(['avi/SConscript',
'radiosity/SConscript',
'readblenfile/SConscript',
'render/SConscript',
- 'src/SConscript',
- 'yafray/SConscript'])
+ 'src/SConscript'])
+
+if env['WITH_BF_YAFRAY'] == 1:
+ SConscript(['yafray/SConscript'])
if env['WITH_BF_INTERNATIONAL'] == 1:
SConscript (['ftfont/SConscript'])
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript
index 6c1f67d69df..b1bc9673f23 100644
--- a/source/blender/render/SConscript
+++ b/source/blender/render/SConscript
@@ -6,10 +6,15 @@ sources = env.Glob('intern/source/*.c')
incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna'
incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
-incs += ' ../quicktime ../include ../../kernel/gen_messaging ../yafray'
+incs += ' ../quicktime ../include ../../kernel/gen_messaging'
defs = []
+if env['WITH_BF_YAFRAY'] == 1:
+ incs += ' ../yafray'
+else:
+ defs.append('DISABLE_YAFRAY')
+
if env['WITH_BF_QUICKTIME'] == 1:
defs.append('WITH_QUICKTIME')
incs += ' ' + env['BF_QUICKTIME_INC']
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index aedb5aa13c0..8d23269166c 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -101,6 +101,8 @@
#include "texture.h"
#include "zbuf.h"
+#ifndef DISABLE_YAFRAY /* disable yafray */
+
#include "YafRay_Api.h"
/* yafray: Identity transform 'hack' removed, exporter now transforms vertices back to world.
@@ -110,6 +112,8 @@
* The main changes are in RE_rotateBlenderScene().
*/
+#endif /* disable yafray */
+
/* ------------------------------------------------------------------------- */
/* Local functions */
/* ------------------------------------------------------------------------- */
@@ -2294,6 +2298,7 @@ static LampRen *add_render_lamp(Render *re, Object *ob)
}
else lar->ray_totsamp= 0;
+#ifndef DISABLE_YAFRAY
/* yafray: photonlight and other params */
if (re->r.renderer==R_YAFRAY) {
lar->YF_numphotons = la->YF_numphotons;
@@ -2307,6 +2312,7 @@ static LampRen *add_render_lamp(Render *re, Object *ob)
lar->YF_glowofs = la->YF_glowofs;
lar->YF_glowtype = la->YF_glowtype;
}
+#endif /* disable yafray */
lar->spotsi= la->spotsize;
if(lar->mode & LA_HALO) {
@@ -3258,6 +3264,7 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
/* OB_DONE means the object itself got duplicated, so was already converted */
if (ob->flag & OB_DONE) {
+#ifndef DISABLE_YAFRAY
/* yafray: for some reason this part was removed, but yafray really needs it...
Dupliverts objects are treated as instances of an original 'sourceobject',
which needs to be included in the renderlist here.
@@ -3270,11 +3277,13 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
init_render_object(re, ob, NULL, 0, 0);
ob->flag |= OB_DONE;
}
+#endif /* disable yafray */
}
else if( (base->lay & lay) || (ob->type==OB_LAMP && (base->lay & re->scene->lay)) ) {
if(ob->transflag & OB_DUPLI) {
/* exception: mballs! */
+#ifndef DISABLE_YAFRAY
/* yafray: except for mballs, include at least one copy of a dupliframe object in the renderlist. */
if (re->r.renderer==R_YAFRAY) {
if ((ob->type!=OB_MBALL) && ((ob->transflag & OB_DUPLIFRAMES)!=0)) {
@@ -3282,6 +3291,7 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
init_render_object(re, ob, NULL, 0, 0);
}
}
+#endif /* disable yafray */
/* before make duplis, update particle for current frame */
if(ob->transflag & OB_DUPLIVERTS) {
PartEff *paf= give_parteff(ob);
@@ -3303,6 +3313,7 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
Mat4CpyMat4(obd->obmat, dob->mat);
if(obd->type!=OB_MBALL) {
+#ifndef DISABLE_YAFRAY
/* yafray: special case handling of duplivert/dupligroup objects.
Only one copy included in renderlist(see above), all others treated as instance of that.
So only need to store name and matrix. Exception are lamps. lattices, armatures and camera's */
@@ -3321,6 +3332,9 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
else init_render_object(re, obd, ob, dob->index, 0);
}
else init_render_object(re, obd, ob, dob->index, 0);
+#else
+ init_render_object(re, obd, ob, dob->index, 0);
+#endif /* disable yafray */
}
if(re->test_break()) break;
@@ -3329,6 +3343,7 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
}
}
else {
+#ifndef DISABLE_YAFRAY
/* yafray: linked data objects treated similarly to dupliverts,
If object not known yet (not in renderlist), include in the renderlist,
otherwise treat as instance of it, so only name and matrix are stored
@@ -3350,6 +3365,9 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
init_render_object(re, ob, NULL, 0, 0);
}
else init_render_object(re, ob, NULL, 0, 0);
+#else
+ init_render_object(re, ob, NULL, 0, 0);
+#endif /* disable yafray */
}
}
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 5bbc3174a3c..f21ee9c0c1a 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -63,9 +63,12 @@
#include "BSE_sequence.h" /* <----------------- bad!!! */
+#ifndef DISABLE_YAFRAY
/* yafray: include for yafray export/render */
#include "YafRay_Api.h"
+#endif /* disable yafray */
+
/* internal */
#include "render_types.h"
#include "renderpipeline.h"
@@ -1675,7 +1678,7 @@ static void do_render_composite_fields_blur_3d(Render *re)
re->display_draw(re->result, NULL);
}
-
+#ifndef DISABLE_YAFRAY
/* yafray: main yafray render/export call */
static void yafrayRender(Render *re)
{
@@ -1734,6 +1737,8 @@ static void yafrayRender(Render *re)
RE_Database_Free(re);
}
+#endif /* disable yafray */
+
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -1753,10 +1758,14 @@ static void do_render_all_options(Render *re)
}
else {
+#ifndef DISABLE_YAFRAY
if(re->r.renderer==R_YAFRAY)
yafrayRender(re);
else
do_render_composite_fields_blur_3d(re);
+#else
+ do_render_composite_fields_blur_3d(re);
+#endif
}
re->i.lastframetime= PIL_check_seconds_timer()- re->i.starttime;
diff --git a/source/blender/src/SConscript b/source/blender/src/SConscript
index 0663cb01c5d..2e0f632ca85 100644
--- a/source/blender/src/SConscript
+++ b/source/blender/src/SConscript
@@ -20,6 +20,9 @@ incs += ' ' + env['BF_OPENGL_INC']
defs = []
+if env['WITH_BF_YAFRAY'] == 0:
+ defs.append('DISABLE_YAFRAY')
+
if env['WITH_BF_INTERNATIONAL'] == 1:
incs += ' ../ftfont'
defs.append('INTERNATIONAL')
@@ -37,8 +40,8 @@ if env['WITH_BF_FFMPEG'] == 1:
incs += ' ' + env['BF_FFMPEG_INC']
if env['WITH_BF_VERSE']:
- defs.append('WITH_VERSE')
- incs += ' ' + env['BF_VERSE_INCLUDE']
+ defs.append('WITH_VERSE')
+ incs += ' ' + env['BF_VERSE_INCLUDE']
# TODO buildinfo
if env['BF_BUILDINFO'] == 1:
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index f5f19cbc09f..af203021898 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -1210,9 +1210,14 @@ static void render_panel_render(void)
uiBlockBeginAlign(block);
uiDefBut(block, BUT,B_DORENDER,"RENDER", 369, 164, 191,37, 0, 0, 0, 0, 0, "Start the rendering");
+#ifndef DISABLE_YAFRAY
/* yafray: on request, render engine menu is back again, and moved to Render panel */
uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0|YafRay %x1",
369, 142, 191, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine");
+#else
+ uiDefButS(block, MENU, B_SWITCHRENDER, "Rendering Engine %t|Blender Internal %x0",
+ 369, 142, 191, 20, &G.scene->r.renderer, 0, 0, 0, 0, "Choose rendering engine");
+#endif /* disable yafray */
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_OSA, 0, "OSA", 369,109,122,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
diff --git a/tools/btools.py b/tools/btools.py
index 796d0b19552..6b4dfd0cb46 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -32,6 +32,7 @@ def validate_arguments(args, bc):
'WITH_BF_ODE', 'BF_ODE', 'BF_ODE_INC', 'BF_ODE_LIB',
'WITH_BF_GAMEENGINE', 'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
'BF_SOLID', 'BF_SOLID_INC',
+ 'WITH_BF_YAFRAY',
'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH',
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC', 'BF_OPENGL_LINKFLAGS',
@@ -129,7 +130,8 @@ def read_opts(cfg, args):
('BF_PYTHON_LIB', 'Python library', ''),
('BF_PYTHON_LIBPATH', 'Library path', ''),
('BF_PYTHON_LINKFLAGS', 'Python link flags', ''),
- ('BF_NO_ELBEEM', 'Disable Fluid Sim', 'false'),
+ (BoolOption('BF_NO_ELBEEM', 'Disable Fluid Sim', 'false')),
+ (BoolOption('WITH_BF_YAFRAY', 'Enable Yafray', 'true')),
(BoolOption('WITH_BF_OPENAL', 'Use OpenAL if true', '')),
('BF_OPENAL', 'base path for OpenAL', ''),
('BF_OPENAL_INC', 'include path for python headers', ''),