Fix #29406: show Sequence as render layer when rendering from sequencer, to make
[blender.git] / source / blender / render / intern / source / external_engine.c
index 9d48e257154177b245edd3946a862001c8eb0ffb..2b44bad82ab1418e3955b3d4c23da9a1d40cf5e1 100644 (file)
@@ -26,7 +26,7 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/render/intern/pipeline/engine.c
+/** \file blender/render/intern/source/external_engine.c
  *  \ingroup render
  */
 
@@ -61,7 +61,7 @@
 static RenderEngineType internal_render_type = {
        NULL, NULL,
        "BLENDER_RENDER", "Blender Render", RE_INTERNAL,
-       NULL, NULL,
+       NULL, NULL, NULL, NULL,
        {NULL, NULL, NULL}};
 
 #ifdef WITH_GAMEENGINE
@@ -69,7 +69,7 @@ static RenderEngineType internal_render_type = {
 static RenderEngineType internal_game_type = {
        NULL, NULL,
        "BLENDER_GAME", "Blender Game", RE_INTERNAL|RE_GAME,
-       NULL, NULL,
+       NULL, NULL, NULL, NULL,
        {NULL, NULL, NULL}};
 
 #endif
@@ -113,6 +113,12 @@ RenderEngineType *RE_engines_find(const char *idname)
        return type;
 }
 
+int RE_engine_is_external(Render *re)
+{
+       RenderEngineType *type= RE_engines_find(re->r.engine);
+       return (type && type->render);
+}
+
 /* Create, Free */
 
 RenderEngine *RE_engine_create(RenderEngineType *type)
@@ -283,6 +289,11 @@ int RE_engine_render(Render *re, int do_all)
        if(re->result==NULL)
                return 1;
 
+       /* set render info */
+       re->i.cfra= re->scene->r.cfra;
+       BLI_strncpy(re->i.scenename, re->scene->id.name+2, sizeof(re->i.scenename));
+       re->i.totface=re->i.totvert=re->i.totstrand=re->i.totlamp=re->i.tothalo= 0;
+
        /* render */
        engine = RE_engine_create(type);
        engine->re= re;