- scene sequencer camera override wasnt working for render strips (only opengl)

- temp disable camera switching with override by clearning markers (hack)
- check for GAMEBLENDER define else eclipse gets confused by multiple definitions of functons in the stub.
This commit is contained in:
Campbell Barton 2010-03-10 08:17:18 +00:00
parent b9211135ef
commit 3d222c3de6
5 changed files with 26 additions and 15 deletions

@ -2107,7 +2107,6 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
}
} else if(seq->type == SEQ_SCENE) { // scene can be NULL after deletions
Scene *sce= seq->scene;// *oldsce= scene;
Render *re;
int have_seq= FALSE;
int sce_valid= FALSE;
@ -2137,6 +2136,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
int frame= seq->sfra + se->nr + seq->anim_startofs;
int oldcfra = seq->scene->r.cfra;
Object *oldcamera= seq->scene->camera;
ListBase oldmarkers;
/* Hack! This function can be called from do_render_seq(), in that case
the seq->scene can already have a Render initialized with same name,
@ -2158,23 +2158,24 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
scene->r.scemode &= ~R_DOSEQ;
seq->scene->r.cfra= frame;
if(seq->scene_camera) seq->scene->camera= seq->scene_camera;
else scene_camera_switch_update(seq->scene);
#ifdef DURIAN_CAMERA_SWITCH
/* stooping to new low's in hackyness :( */
oldmarkers= seq->scene->markers;
seq->scene->markers.first= seq->scene->markers.last= NULL;
#endif
if(sequencer_view3d_cb && (seq->flag & SEQ_USE_SCENE_OPENGL) && (seq->scene == scene || have_seq==0)) {
/* opengl offscreen render */
if(seq->scene_camera) seq->scene->camera= seq->scene_camera;
else scene_camera_switch_update(seq->scene);
scene_update_for_newframe(seq->scene, seq->scene->lay);
se->ibuf= sequencer_view3d_cb(seq->scene, seqrectx, seqrecty);
}
else {
Render *re;
RenderResult rres;
#ifdef DURIAN_CAMERA_SWITCH
/* stooping to new low's in hackyness :( */
scene_marker_tfm_translate(seq->scene, MAXFRAME*2, 0);
#endif
if(rendering)
re= RE_NewRender(" do_build_seq_ibuf", RE_SLOT_DEFAULT);
else
@ -2199,11 +2200,6 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
RE_ReleaseResultImage(re);
// BIF_end_render_callbacks();
#ifdef DURIAN_CAMERA_SWITCH
/* stooping to new low's in hackyness :( */
scene_marker_tfm_translate(seq->scene, MAXFRAME*-2, 0);
#endif
}
/* restore */
@ -2212,6 +2208,11 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
seq->scene->r.cfra = oldcfra;
seq->scene->camera= oldcamera;
#ifdef DURIAN_CAMERA_SWITCH
/* stooping to new low's in hackyness :( */
seq->scene->markers= oldmarkers;
#endif
copy_to_ibuf_still(seq, se);
if (!build_proxy_run) {

@ -44,7 +44,7 @@ if env['BF_UNIT_TEST']:
if env['OURPLATFORM'] == 'linux2':
cflags='-pthread'
incs += ' ../../../extern/binreloc/include'
incs += ' ../../../extern/binreloc/include'
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']

@ -38,6 +38,10 @@ SET(INC
../../../source/blender/makesrna
)
IF(WITH_GAMEENGINE)
ADD_DEFINITIONS(-DGAMEBLENDER)
ENDIF(WITH_GAMEENGINE)
IF(WITH_INTERNATIONAL)
ADD_DEFINITIONS(-DWITH_FREETYPE2)
ENDIF(WITH_INTERNATIONAL)

@ -10,4 +10,7 @@ defs = ''
if env['WITH_BF_INTERNATIONAL']:
defs += 'WITH_FREETYPE2'
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
env.BlenderLib ('blenkernel_blc', sources = Split(sources), includes=Split(incs), defines=Split(defs), libtype=['player'],priority=[220] )

@ -28,6 +28,7 @@
* BKE_bad_level_calls function stubs
*/
#if GAMEBLENDER == 1
#include <stdlib.h>
#include "DNA_listBase.h"
#include "RNA_types.h"
@ -373,3 +374,5 @@ int CSG_PerformBooleanOperation(
CSG_FaceIteratorDescriptor obBFaces,
CSG_VertexIteratorDescriptor obBVertices)
{ return 0;}
#endif // GAMEBLENDER == 1