report missing engines on file load. (request from Martin).
[blender.git] / source / blender / render / intern / source / pipeline.c
index 645d0ac0578ad5da021ded29fa5094d65c19ed0d..458fe8ff2c1be26779a8bf31b36264d24c27f97d 100644 (file)
@@ -35,6 +35,7 @@
 #include <limits.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stddef.h>
 
 #include "DNA_group_types.h"
 #include "DNA_image_types.h"
@@ -3349,13 +3350,9 @@ void RE_result_load_from_file(RenderResult *result, ReportList *reports, const c
 
 static int external_render_3d(Render *re, int do_all)
 {
-       RenderEngineType *type;
+       RenderEngineType *type= BLI_findstring(&R_engines, re->r.engine, offsetof(RenderEngineType, idname));
        RenderEngine engine;
 
-       for(type=R_engines.first; type; type=type->next)
-               if(strcmp(type->idname, re->r.engine) == 0)
-                       break;
-
        if(!(type && type->render))
                return 0;
        if((re->r.scemode & R_PREVIEWBUTS) && !(type->flag & RE_DO_PREVIEW))