2.5:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 9 Jun 2009 10:30:16 +0000 (10:30 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 9 Jun 2009 10:30:16 +0000 (10:30 +0000)
* Fix compilation with FFMPEG.
* Ensure FFMPEG and similar flags are set during RNA compile,
  so the right output formats show.

source/blender/blenkernel/intern/writeffmpeg.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/Makefile
source/blender/makesrna/intern/SConscript

index 0277da5f90883fae6f76282dde971eaa32d8240a..25dc6fa2fd7b10184104cc78ca11e83ca39e4872 100644 (file)
@@ -242,8 +242,8 @@ static void write_video_frame(RenderData *rd, AVFrame* frame)
 #ifdef FFMPEG_CODEC_TIME_BASE
        frame->pts = rd->cfra - rd->sfra;
 #endif
-       if (G.scene->r.mode & R_FIELDS) {
-               frame->top_field_first = ((G.scene->r.mode & R_ODDFIELD) != 0);
+       if (rd->mode & R_FIELDS) {
+               frame->top_field_first = ((rd->mode & R_ODDFIELD) != 0);
        }
 
        outsize = avcodec_encode_video(c, video_buffer, video_buffersize, 
index 0971727cbf68d3d5dd23472214805fabba6d0a65..bc3be44aec940e1a02ccec2b6ff5acf620c76b24 100644 (file)
@@ -41,6 +41,26 @@ SET(SRC
 INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include .)
 FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
 
+IF(WITH_OPENEXR)
+  ADD_DEFINITIONS(-DWITH_OPENEXR)
+ENDIF(WITH_OPENEXR)
+
+IF(WITH_OPENJPEG)
+  ADD_DEFINITIONS(-DWITH_OPENJPEG)
+ENDIF(WITH_OPENJPEG)
+
+IF(WITH_DDS)
+  ADD_DEFINITIONS(-DWITH_DDS)
+ENDIF(WITH_DDS)
+
+IF(WITH_QUICKTIME)
+  ADD_DEFINITIONS(-DWITH_QUICKTIME)
+ENDIF(WITH_QUICKTIME)
+
+IF(WITH_FFMPEG)
+  ADD_DEFINITIONS(-DWITH_FFMPEG)
+ENDIF(WITH_FFMPEG)
+
 # Build makesrna executable
 ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
 TARGET_LINK_LIBRARIES(makesrna bf_dna)
index 241067692ff51b6c82e106e21ec865127c03de33..cd1f27f43b7cdeb59cdcca6e3d474f3a46e4fd96 100644 (file)
@@ -53,6 +53,26 @@ CPPFLAGS += -I../../editors/include
 CPPFLAGS += -I..
 CPPFLAGS += -I.
 
+ifeq ($(WITH_FFMPEG),true)
+    CPPFLAGS += -DWITH_FFMPEG
+endif
+
+ifeq ($(WITH_OPENEXR), true)
+    CPPFLAGS += -DWITH_OPENEXR
+endif
+
+ifeq ($(WITH_DDS), true)
+    CPPFLAGS += -DWITH_DDS
+endif
+
+ifeq ($(WITH_OPENJPEG), true)
+    CPPFLAGS += -DWITH_OPENJPEG
+endif
+
+ifeq ($(WITH_QUICKTIME), true)
+       CPPFLAGS += -DWITH_QUICKTIME
+endif
+
 ifeq ($(OS),windows)
     # Windows needs these extra libs because of winstuff... It is not 
     # _really_ needed, but it is the easiest fix for now. If you have 
index 83f14b9ef14cadd2ccd26c76830b33b882df3dc8..9c8e00da16d617246a5600423dc0622cb79a0e1c 100644 (file)
@@ -24,6 +24,25 @@ makesrna_tool = env.Clone()
 rna = env.Clone()
 makesrna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesrna/\\"" ')
 
+defs = []
+
+if env['WITH_BF_OPENEXR']:
+       defs.append('WITH_OPENEXR')
+
+if env['WITH_BF_OPENJPEG']:
+       defs.append('WITH_OPENJPEG')
+
+if env['WITH_BF_DDS']:
+       defs.append('WITH_DDS')
+
+if env['WITH_BF_FFMPEG']:
+       defs.append('WITH_FFMPEG')
+
+if env['WITH_BF_QUICKTIME']:
+       defs.append('WITH_QUICKTIME')
+
+makesrna_tool.Append(CPPDEFINES=defs)
+
 makesrna_tool.Append (CPPPATH = ['#/intern/guardedalloc',
                                                                 '../../blenlib',
                                                                 '../../blenkernel',