Merging r37908 through r37945 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 29 Jun 2011 12:39:01 +0000 (12:39 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 29 Jun 2011 12:39:01 +0000 (12:39 +0000)
12 files changed:
CMakeLists.txt
release/scripts/modules/bpy/__init__.py
release/scripts/modules/console/intellisense.py
source/blender/editors/object/object_edit.c
source/blender/editors/render/render_internal.c
source/blender/editors/space_image/image_buttons.c
source/blender/makesrna/intern/rna_render.c
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/pipeline.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator.c

index 4e1e592f243998d773217f6aa26049464b7eab8d..067a5418899ff1e6314f29e2ecc904020c05cbac 100644 (file)
@@ -53,11 +53,6 @@ if(NOT EXECUTABLE_OUTPUT_PATH)
        set(FIRST_RUN "TRUE")
 endif()
 
-# set default build type to Release
-if(NOT CMAKE_BUILD_TYPE)
-       set(CMAKE_BUILD_TYPE "Release")
-endif()
-
 # this starts out unset
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
 
@@ -149,7 +144,7 @@ option(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
 option(WITH_IMAGE_REDCODE       "Enable RedCode Image Support" OFF)
 
 # Audio/Video format support
-option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF)
+option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.org)" OFF)
 option(WITH_CODEC_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
 if(APPLE OR (WIN32 AND NOT UNIX))
        option(WITH_CODEC_QUICKTIME     "Enable Quicktime Support" OFF)
@@ -623,8 +618,8 @@ elseif(WIN32)
                set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
 
                set(FREETYPE_INCLUDE_DIRS
-                       ${FREETYPE}/include
-                       ${FREETYPE}/include/freetype2
+                       ${LIBDIR}/freetype/include
+                       ${LIBDIR}/freetype/include/freetype2
                )
                set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
 
index 1df8e9e5588531d39124fffe3d26d55d1b7ba04c..6dcc5d7b2850cc48ae90458eff0f7331ea130c45 100644 (file)
 Give access to blender data and utility functions.
 """
 
-# internal blender C module
-import _bpy
-from _bpy import types, props, app
+__all__ = (
+    "app",
+    "context",
+    "data",
+    "ops",
+    "path",
+    "props",
+    "types",
+    "utils",
+)
+
 
-data = _bpy.data
-context = _bpy.context
+# internal blender C module
+from _bpy import types, props, app, data, context
 
 # python modules
-from . import utils, path
-from . import ops as _ops_module
+from . import utils, path, ops
 
 # fake operator module
-ops = _ops_module.ops_fake_module
-
-import sys as _sys
-
+ops = ops.ops_fake_module
 
 def _main():
+    import sys as _sys
 
     # Possibly temp. addons path
     from os.path import join, dirname, normpath
@@ -59,3 +64,5 @@ def _main():
 
 
 _main()
+
+del _main
\ No newline at end of file
index 072d467ff86855c10436ba9b4a6374085513e256..a4793e1a9b6231ad7219443e6856651b89881d45 100644 (file)
@@ -53,7 +53,7 @@ RE_UNQUOTED_WORD = re.compile(
     re.UNICODE)
 
 
-def complete(line, cursor, namespace, private=True):
+def complete(line, cursor, namespace, private):
     """Returns a list of possible completions:
 
     * name completion
@@ -82,6 +82,10 @@ def complete(line, cursor, namespace, private=True):
         if RE_MODULE.match(line):
             from . import complete_import
             matches = complete_import.complete(line)
+            print(private)
+            if not private:
+                matches[:] = [m for m in matches if m[:1] != "_"]
+            matches.sort()
         else:
             from . import complete_namespace
             matches = complete_namespace.complete(word, namespace, private)
@@ -130,11 +134,15 @@ def expand(line, cursor, namespace, private=True):
         else:
             # causes blender bug [#27495] since string keys may contain '.'
             # scrollback = '  '.join([m.split('.')[-1] for m in matches])
+
+            # add white space to align with the cursor
+            white_space = "    " + (" " * (cursor + len(prefix)))
             word_prefix = word + prefix
-            scrollback = '  '.join(
-                    [m[len(word_prefix):]
+            scrollback = '\n'.join(
+                    [white_space + m[len(word_prefix):]
                      if (word_prefix and m.startswith(word_prefix))
-                     else m.split('.')[-1]
+                     else
+                     white_space + m.split('.')[-1]
                      for m in matches])
 
         no_calltip = True
index 527b97a6082ee0a0bc23bba01f153ee89c8c9f79..2dfb799f1ade8278d9eeb09e901eeda3150f7863 100644 (file)
@@ -1689,7 +1689,7 @@ void OBJECT_OT_shade_flat(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Shade Flat";
-       ot->description= "Display faces 'smooth' (using vertext normals)";
+       ot->description= "Display faces 'flat'";
        ot->idname= "OBJECT_OT_shade_flat";
        
        /* api callbacks */
@@ -1704,7 +1704,7 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Shade Smooth";
-       ot->description= "Display faces 'flat'";
+       ot->description= "Display faces 'smooth' (using vertext normals)";
        ot->idname= "OBJECT_OT_shade_smooth";
        
        /* api callbacks */
index d4de1386871396f9deb76b407554751df1465b32..42a163d3da50dd7a6b3e37ac457eaee8e41b54d2 100644 (file)
@@ -189,11 +189,6 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat
 /* set callbacks, exported to sequence render too.
  Only call in foreground (UI) renders. */
 
-static void render_error_reports(void *reports, const char *str)
-{
-       BKE_report(reports, RPT_ERROR, str);
-}
-
 /* executes blocking render */
 static int screen_render_exec(bContext *C, wmOperator *op)
 {
@@ -214,7 +209,6 @@ static int screen_render_exec(bContext *C, wmOperator *op)
 
        G.afbreek= 0;
        RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break);
-       RE_error_cb(re, op->reports, render_error_reports);
 
        ima= BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result");
        BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
@@ -226,11 +220,15 @@ static int screen_render_exec(bContext *C, wmOperator *op)
           since sequence rendering can call that recursively... (peter) */
        seq_stripelem_cache_cleanup();
 
+       RE_SetReports(re, op->reports);
+
        if(is_animation)
-               RE_BlenderAnim(re, mainp, scene, camera_override, lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, op->reports);
+               RE_BlenderAnim(re, mainp, scene, camera_override, lay, scene->r.sfra, scene->r.efra, scene->r.frame_step);
        else
                RE_BlenderFrame(re, mainp, scene, NULL, camera_override, lay, scene->r.cfra, is_write_still);
 
+       RE_SetReports(re, NULL);
+
        // no redraw needed, we leave state as we entered it
        ED_update_for_newframe(mainp, scene, CTX_wm_screen(C), 1);
 
@@ -374,10 +372,14 @@ static void render_startjob(void *rjv, short *stop, short *do_update, float *pro
        rj->do_update= do_update;
        rj->progress= progress;
 
+       RE_SetReports(rj->re, rj->reports);
+
        if(rj->anim)
-               RE_BlenderAnim(rj->re, rj->main, rj->scene, rj->camera_override, rj->lay, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step, rj->reports);
+               RE_BlenderAnim(rj->re, rj->main, rj->scene, rj->camera_override, rj->lay, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step);
        else
                RE_BlenderFrame(rj->re, rj->main, rj->scene, rj->srl, rj->camera_override, rj->lay, rj->scene->r.cfra, rj->write_still);
+
+       RE_SetReports(rj->re, NULL);
 }
 
 static void render_endjob(void *rjv)
@@ -470,7 +472,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
        if(WM_jobs_test(CTX_wm_manager(C), scene))
                return OPERATOR_CANCELLED;
 
-       if(!RE_is_rendering_allowed(scene, camera_override, op->reports, render_error_reports)) {
+       if(!RE_is_rendering_allowed(scene, camera_override, op->reports)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -578,8 +580,6 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
        rj->re= re;
        G.afbreek= 0;
 
-       RE_error_cb(re, op->reports, render_error_reports);
-
        WM_jobs_start(CTX_wm_manager(C), steve);
 
        WM_cursor_wait(0);
@@ -596,7 +596,6 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
        return OPERATOR_RUNNING_MODAL;
 }
 
-
 /* contextual render, using current scene, view3d? */
 void RENDER_OT_render(wmOperatorType *ot)
 {
index 0210b0dd78d3f99929a74e6cbe4e476974fb1ad8..e9ebe78da296d302b49217e932566d291c9a69ba 100644 (file)
@@ -792,7 +792,9 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
                                uiItemR(col, userptr, "frame_offset", 0, NULL, ICON_NONE);
 
                                col= uiLayoutColumn(split, 0);
-                               uiItemR(col, userptr, "fields_per_frame", 0, "Fields", ICON_NONE);
+                               row= uiLayoutRow(col, 0);
+                               uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "use_fields"));
+                               uiItemR(row, userptr, "fields_per_frame", 0, "Fields", ICON_NONE);
                                uiItemR(col, userptr, "use_auto_refresh", 0, NULL, ICON_NONE);
                                uiItemR(col, userptr, "use_cyclic", 0, NULL, ICON_NONE);
                        }
index 6638a9d76d3f3424ad9e8ac911fc6e6e455f0fd6..3a6cebef1787f6c4c01312ed55d6a6d87bf4d257 100644 (file)
@@ -32,6 +32,7 @@
 #include "DNA_scene_types.h"
 
 #include "RNA_define.h"
+#include "RNA_enum_types.h"
 
 #include "rna_internal.h"
 
@@ -271,6 +272,12 @@ static void rna_def_render_engine(BlenderRNA *brna)
        prop= RNA_def_string(func, "info", "", 0, "Info", "");
        RNA_def_property_flag(prop, PROP_REQUIRED);
 
+       func= RNA_def_function(srna, "report", "RE_engine_report");
+       prop= RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
+       RNA_def_property_flag(prop, PROP_REQUIRED);
+       prop= RNA_def_string(func, "message", "", 0, "Report Message", "");
+       RNA_def_property_flag(prop, PROP_REQUIRED);
+
        /* registration */
        RNA_define_verify_sdna(0);
 
index 23f301249bafc1377bf239392f014039a47ca475..6debe8c9bc3e4ebb826073d8e3d32a27636d2794 100644 (file)
@@ -218,7 +218,10 @@ void RE_TileProcessor(struct Render *re);
 
 /* only RE_NewRender() needed, main Blender render calls */
 void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay, int frame, const short write_still);
-void RE_BlenderAnim(struct Render *re, struct Main *bmain, struct Scene *scene, struct Object *camera_override, unsigned int lay, int sfra, int efra, int tfra, struct ReportList *reports);
+void RE_BlenderAnim(struct Render *re, struct Main *bmain, struct Scene *scene, struct Object *camera_override, unsigned int lay, int sfra, int efra, int tfra);
+
+/* error reporting */
+void RE_SetReports(struct Render *re, struct ReportList *reports);
 
 /* main preview render call */
 void RE_PreviewRender(struct Render *re, struct Main *bmain, struct Scene *scene);
@@ -242,7 +245,6 @@ void RE_stats_draw_cb       (struct Render *re, void *handle, void (*f)(void *handle,
 void RE_progress_cb    (struct Render *re, void *handle, void (*f)(void *handle, float));
 void RE_draw_lock_cb           (struct Render *re, void *handle, void (*f)(void *handle, int));
 void RE_test_break_cb  (struct Render *re, void *handle, int (*f)(void *handle));
-void RE_error_cb               (struct Render *re, void *handle, void (*f)(void *handle, const char *str));
 
 /* should move to kernel once... still unsure on how/where */
 float RE_filter_value(int type, float x);
@@ -308,11 +310,12 @@ void RE_engine_end_result(RenderEngine *engine, struct RenderResult *result);
 
 int RE_engine_test_break(RenderEngine *engine);
 void RE_engine_update_stats(RenderEngine *engine, const char *stats, const char *info);
+void RE_engine_report(RenderEngine *engine, int type, const char *msg);
 
 void RE_engines_init(void);
 void RE_engines_exit(void);
 
-int RE_is_rendering_allowed(struct Scene *scene, struct Object *camera_override, void *erh, void (*error)(void *handle, const char *str));
+int RE_is_rendering_allowed(struct Scene *scene, struct Object *camera_override, struct ReportList *reports);
 
 #endif /* RE_PIPELINE_H */
 
index b2535ebc9ea8763b904629dd113a5b48b63bd24e..13ca40bfd206bd29d6b94d7084aa3b198e0e46c2 100644 (file)
@@ -60,6 +60,7 @@ struct RenderBuckets;
 struct ObjectInstanceRen;
 struct RayObject;
 struct RayFace;
+struct ReportList;
 struct Main;
 
 #define TABLEINITSIZE 1024
@@ -252,10 +253,9 @@ struct Render
        int (*test_break)(void *handle);
        void *tbh;
        
-       void (*error)(void *handle, const char *str);
-       void *erh;
-       
        RenderStats i;
+
+       struct ReportList *reports;
 };
 
 /* ------------------------------------------------------------------------- */
index b1c9820337c779f6c03c9d41233a60f0ac35832d..1d4014aac3e2a8a6e4694e6ce228797d1cacad92 100644 (file)
@@ -128,7 +128,7 @@ Render R;
 
 /* ********* alloc and free ******** */
 
-static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, ReportList *reports, const char *name_override);
+static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, const char *name_override);
 
 static volatile int g_break= 0;
 static int thread_break(void *UNUSED(arg))
@@ -141,7 +141,6 @@ static void result_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr)) {}
 static void result_rcti_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr), volatile struct rcti *UNUSED(rect)) {}
 static void stats_nothing(void *UNUSED(arg), RenderStats *UNUSED(rs)) {}
 static void float_nothing(void *UNUSED(arg), float UNUSED(val)) {}
-static void print_error(void *UNUSED(arg), const char *str) {printf("ERROR: %s\n", str);}
 static int default_break(void *UNUSED(arg)) {return G.afbreek == 1;}
 
 static void stats_background(void *UNUSED(arg), RenderStats *rs)
@@ -1190,13 +1189,12 @@ void RE_InitRenderCB(Render *re)
        re->display_draw= result_rcti_nothing;
        re->progress= float_nothing;
        re->test_break= default_break;
-       re->error= print_error;
        if(G.background)
                re->stats_draw= stats_background;
        else
                re->stats_draw= stats_nothing;
        /* clear callback handles */
-       re->dih= re->dch= re->ddh= re->sdh= re->prh= re->tbh= re->erh= NULL;
+       re->dih= re->dch= re->ddh= re->sdh= re->prh= re->tbh= NULL;
 }
 
 /* only call this while you know it will remove the link too */
@@ -1251,7 +1249,7 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *
        
        if(re->rectx < 2 || re->recty < 2 || (BKE_imtype_is_movie(rd->imtype) &&
                                                                                  (re->rectx < 16 || re->recty < 16) )) {
-               re->error(re->erh, "Image too small");
+               BKE_report(re->reports, RPT_ERROR, "Image too small");
                re->ok= 0;
                return;
        }
@@ -1417,11 +1415,6 @@ void RE_test_break_cb(Render *re, void *handle, int (*f)(void *handle))
        re->test_break= f;
        re->tbh= handle;
 }
-void RE_error_cb(Render *re, void *handle, void (*f)(void *handle, const char *str))
-{
-       re->error= f;
-       re->erh= handle;
-}
 
 
 /* ********* add object data (later) ******** */
@@ -2710,14 +2703,14 @@ static int check_valid_camera(Scene *scene, Object *camera_override)
        return 1;
 }
 
-int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, void (*error)(void *handle, const char *str))
+int RE_is_rendering_allowed(Scene *scene, Object *camera_override, ReportList *reports)
 {
        SceneRenderLayer *srl;
        
        if(scene->r.mode & R_BORDER) {
                if(scene->r.border.xmax <= scene->r.border.xmin ||
                   scene->r.border.ymax <= scene->r.border.ymin) {
-                       error(erh, "No border area selected.");
+                       BKE_report(reports, RPT_ERROR, "No border area selected.");
                        return 0;
                }
        }
@@ -2728,13 +2721,13 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, vo
                scene_unique_exr_name(scene, str, 0);
                
                if (BLI_is_writable(str)==0) {
-                       error(erh, "Can not save render buffers, check the temp default path");
+                       BKE_report(reports, RPT_ERROR, "Can not save render buffers, check the temp default path");
                        return 0;
                }
                
                /* no fullsample and edge */
                if((scene->r.scemode & R_FULL_SAMPLE) && (scene->r.mode & R_EDGE)) {
-                       error(erh, "Full Sample doesn't support Edge Enhance");
+                       BKE_report(reports, RPT_ERROR, "Full Sample doesn't support Edge Enhance");
                        return 0;
                }
                
@@ -2748,7 +2741,7 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, vo
                        bNode *node;
                
                        if(ntree==NULL) {
-                               error(erh, "No Nodetree in Scene");
+                               BKE_report(reports, RPT_ERROR, "No Nodetree in Scene");
                                return 0;
                        }
                        
@@ -2757,13 +2750,13 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, vo
                                        break;
                        
                        if(node==NULL) {
-                               error(erh, "No Render Output Node in Scene");
+                               BKE_report(reports, RPT_ERROR, "No Render Output Node in Scene");
                                return 0;
                        }
                        
                        if(scene->r.scemode & R_FULL_SAMPLE) {
                                if(composite_needs_render(scene, 0)==0) {
-                                       error(erh, "Full Sample AA not supported without 3d rendering");
+                                       BKE_report(reports, RPT_ERROR, "Full Sample AA not supported without 3d rendering");
                                        return 0;
                                }
                        }
@@ -2772,7 +2765,7 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, vo
        
         /* check valid camera, without camera render is OK (compo, seq) */
        if(!check_valid_camera(scene, camera_override)) {
-               error(erh, "No camera");
+               BKE_report(reports, RPT_ERROR, "No camera");
                return 0;
        }
        
@@ -2782,7 +2775,7 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, vo
        /* forbidden combinations */
        if(scene->r.mode & R_PANORAMA) {
                if(scene->r.mode & R_ORTHO) {
-                       error(erh, "No Ortho render possible for Panorama");
+                       BKE_report(reports, RPT_ERROR, "No Ortho render possible for Panorama");
                        return 0;
                }
        }
@@ -2798,13 +2791,13 @@ int RE_is_rendering_allowed(Scene *scene, Object *camera_override, void *erh, vo
                if(!(srl->layflag & SCE_LAY_DISABLE))
                        break;
        if(srl==NULL) {
-               error(erh, "All RenderLayers are disabled");
+               BKE_report(reports, RPT_ERROR, "All RenderLayers are disabled");
                return 0;
        }
        
        /* renderer */
        if(!ELEM(scene->r.renderer, R_INTERN, R_YAFRAY)) {
-               error(erh, "Unknown render engine set");
+               BKE_report(reports, RPT_ERROR, "Unknown render engine set");
                return 0;
        }
 
@@ -2906,6 +2899,11 @@ static int render_initialize_from_main(Render *re, Main *bmain, Scene *scene, Sc
        return 1;
 }
 
+void RE_SetReports(Render *re, ReportList *reports)
+{
+       re->reports= reports;
+}
+
 /* general Blender frame render call */
 void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, unsigned int lay, int frame, const short write_still)
 {
@@ -2931,7 +2929,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
                                BKE_makepicstring(name, scene->r.pic, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION, FALSE);
        
                                /* reports only used for Movie */
-                               do_write_image_or_movie(re, scene, NULL, NULL, name);
+                               do_write_image_or_movie(re, scene, NULL, name);
                        }
                }
 
@@ -2942,7 +2940,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
        G.rendering= 0;
 }
 
-static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, ReportList *reports, const char *name_override)
+static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, const char *name_override)
 {
        char name[FILE_MAX];
        RenderResult rres;
@@ -2960,7 +2958,7 @@ static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, R
                        dofree = 1;
                }
                RE_ResultGet32(re, (unsigned int *)rres.rect32);
-               ok= mh->append_movie(&re->r, scene->r.cfra, rres.rect32, rres.rectx, rres.recty, reports);
+               ok= mh->append_movie(&re->r, scene->r.cfra, rres.rect32, rres.rectx, rres.recty, re->reports);
                if(dofree) {
                        MEM_freeN(rres.rect32);
                }
@@ -3042,7 +3040,7 @@ static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, R
 }
 
 /* saves images to disk */
-void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay, int sfra, int efra, int tfra, ReportList *reports)
+void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay, int sfra, int efra, int tfra)
 {
        bMovieHandle *mh= BKE_get_movie_handle(scene->r.imtype);
        int cfrao= scene->r.cfra;
@@ -3055,14 +3053,14 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
        /* ugly global still... is to prevent renderwin events and signal subsurfs etc to make full resol */
        /* is also set by caller renderwin.c */
        G.rendering= 1;
-       
+
        if(BKE_imtype_is_movie(scene->r.imtype))
-               if(!mh->start_movie(scene, &re->r, re->rectx, re->recty, reports))
+               if(!mh->start_movie(scene, &re->r, re->rectx, re->recty, re->reports))
                        G.afbreek= 1;
 
        if (mh->get_next_frame) {
                while (!(G.afbreek == 1)) {
-                       int nf = mh->get_next_frame(&re->r, reports);
+                       int nf = mh->get_next_frame(&re->r, re->reports);
                        if (nf >= 0 && nf >= scene->r.sfra && nf <= scene->r.efra) {
                                scene->r.cfra = re->r.cfra = nf;
 
@@ -3071,7 +3069,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
                                do_render_all_options(re);
 
                                if(re->test_break(re->tbh) == 0) {
-                                       if(!do_write_image_or_movie(re, scene, mh, reports, NULL))
+                                       if(!do_write_image_or_movie(re, scene, mh, NULL))
                                                G.afbreek= 1;
                                }
 
@@ -3135,7 +3133,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
                        
                        if(re->test_break(re->tbh) == 0) {
                                if(!G.afbreek)
-                                       if(!do_write_image_or_movie(re, scene, mh, reports, NULL))
+                                       if(!do_write_image_or_movie(re, scene, mh, NULL))
                                                G.afbreek= 1;
                        }
                        else
@@ -3343,6 +3341,11 @@ void RE_engine_update_stats(RenderEngine *engine, const char *stats, const char
        re->i.statstr= NULL;
 }
 
+void RE_engine_report(RenderEngine *engine, int type, const char *msg)
+{
+       BKE_report(engine->re->reports, type, msg);
+}
+
 /* loads in image into a result, size must match
  * x/y offsets are only used on a partial copy when dimensions dont match */
 void RE_layer_load_from_file(RenderLayer *layer, ReportList *reports, const char *filename, int x, int y)
index f994aa0653b1cadd48c5609a0715ea0d531d55a3..f649540881e13102a019515fc70510fe946d238f 100644 (file)
@@ -380,6 +380,7 @@ void RE_AcquireResultImage(struct Render *re, struct RenderResult *rr){}
 void RE_ReleaseResult(struct Render *re){}
 void RE_ReleaseResultImage(struct Render *re){}
 int RE_engine_test_break(struct RenderEngine *engine){return 0;}
+void RE_engine_report(struct RenderEngine *engine, int type, const char *msg) {}
 
 /* python */
 struct wmOperatorType *WM_operatortype_find(const char *idname, int quiet){return (struct wmOperatorType *) NULL;}
index 28447ac8e462ad4a8073b6877e503b99545297e4..a8b24d0c9bcbc4938deef8cd8e403d972895ba59 100644 (file)
@@ -768,7 +768,9 @@ static int render_frame(int argc, const char **argv, void *data)
 
                        frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame));
 
-                       RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, frame, frame, scene->r.frame_step, &reports);
+                       RE_SetReports(re, &reports);
+                       RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, frame, frame, scene->r.frame_step);
+                       RE_SetReports(re, NULL);
                        return 1;
                } else {
                        printf("\nError: frame number must follow '-f / --render-frame'.\n");
@@ -789,7 +791,9 @@ static int render_animation(int UNUSED(argc), const char **UNUSED(argv), void *d
                Render *re= RE_NewRender(scene->id.name);
                ReportList reports;
                BKE_reports_init(&reports, RPT_PRINT);
-               RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports);
+               RE_SetReports(re, &reports);
+               RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step);
+               RE_SetReports(re, NULL);
        } else {
                printf("\nError: no blend loaded. cannot use '-a'.\n");
        }