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...
This commit is contained in:
+12
-12
@@ -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;
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-4
@@ -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'])
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)");
|
||||
|
||||
+3
-1
@@ -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', ''),
|
||||
|
||||
Reference in New Issue
Block a user