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
path: root/source
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2006-10-18 09:45:47 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2006-10-18 09:45:47 +0400
commit88446eeca4b6f9d31928a538e3a39d04f1d06976 (patch)
tree069b6135aa98b631a1e37485562190bd0428d084 /source
parent134e5622193cd4eb168b0457208ed6794b5935df (diff)
Patch 5105 by Joshua Leung (Aligorith), slightly modified by me
* Add WITH_BF_YAFRAY, which per default is 'true', so no visible changes for developers (and users). Set WITH_BF_YAFRAY to 'false', and you'll save some major compile time :) Also handy if you're strapped for memory and compilation fails on yafray compilation due to this. - this commit also has a few whitespace changes and - made BF_NO_ELBEEM a proper BoolOption. This will be renamed to WITH_BF_ELBEEM in the near future...
Diffstat (limited to 'source')
-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
6 files changed, 48 insertions, 6 deletions
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)");