diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-12 19:55:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-12 19:55:38 +0400 |
commit | d14738a5603389cecc582c10cf90fe650d368909 (patch) | |
tree | 80b1750f931c29b3b7bd3ce88e075eef7bee6822 /source/blender/windowmanager | |
parent | bfa332e275a0ac109847c6754e76dd8aff8d961d (diff) |
report missing engines on file load. (request from Martin).
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 51a04b28a12..c85b6767a33 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -33,7 +33,7 @@ /* placed up here because of crappy * winsock stuff. */ -#include <stdio.h> +#include <stddef.h> #include <string.h> #include <errno.h> @@ -96,6 +96,8 @@ #include "ED_view3d.h" #include "ED_util.h" +#include "RE_pipeline.h" /* only to report missing engine */ + #include "GHOST_C-api.h" #include "GHOST_Path-api.h" @@ -338,6 +340,17 @@ void WM_read_file(bContext *C, const char *name, ReportList *reports) #endif CTX_wm_window_set(C, NULL); /* exits queues */ + /* TODO, make this show in header info window */ + { + Scene *sce; + for(sce= G.main->scene.first; sce; sce= sce->id.next) { + if(BLI_findstring(&R_engines, sce->r.engine, offsetof(RenderEngineType, idname)) == NULL) { + BKE_reportf(reports, RPT_WARNING, "Engine not available: '%s' for scene: %s, an addon may need to be installed or enabled", sce->r.engine, sce->id.name+2); + } + } + } + + // XXX undo_editmode_clear(); BKE_reset_undo(); BKE_write_undo(C, "original"); /* save current state */ |