diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-12 17:58:10 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-08-12 17:58:10 +0400 |
commit | e81df3a6fa158a5aba3e22b357b44f512f728f88 (patch) | |
tree | c21d7b01d186ef83296ab6c83c28ed95141f2616 /source/blender/render | |
parent | 702ce76cd28392745132feb2dfb6592d220cb8ec (diff) |
Fix #23238: crash rendering multiple scenes from compositor.
Diffstat (limited to 'source/blender/render')
4 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index af7f3fcf387..b12e45ecd9c 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -193,7 +193,7 @@ void RE_SetPixelSize(struct Render *re, float pixsize); void RE_SetView (struct Render *re, float mat[][4]); /* make or free the dbase */ -void RE_Database_FromScene(struct Render *re, struct Scene *scene, unsigned int lay, int use_camera_view); +void RE_Database_FromScene(struct Render *re, struct Main *bmain, struct Scene *scene, unsigned int lay, int use_camera_view); void RE_Database_Free (struct Render *re); /* project dbase again, when viewplane/perspective changed */ diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h index 76e7fe7b4f3..4c80616665d 100644 --- a/source/blender/render/intern/include/renderdatabase.h +++ b/source/blender/render/intern/include/renderdatabase.h @@ -34,6 +34,7 @@ struct Object; struct VlakRen; struct VertRen; struct HaloRen; +struct Main; struct Material; struct Render; struct MCol; @@ -137,7 +138,7 @@ void RE_set_customdata_names(struct ObjectRen *obr, struct CustomData *data); /* convertblender.c */ void init_render_world(Render *re); -void RE_Database_FromScene_Vectors(Render *re, struct Scene *sce, unsigned int lay); +void RE_Database_FromScene_Vectors(Render *re, struct Main *bmain, struct Scene *sce, unsigned int lay); #endif /* RENDERDATABASE_H */ diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 26783d21da7..149890f830d 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -4889,13 +4889,14 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp } /* used to be 'rotate scene' */ -void RE_Database_FromScene(Render *re, Scene *scene, unsigned int lay, int use_camera_view) +void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int lay, int use_camera_view) { extern int slurph_opt; /* key.c */ Scene *sce; float mat[4][4]; float amb[3]; + re->main= bmain; re->scene= scene; re->lay= lay; @@ -5433,7 +5434,7 @@ static void free_dbase_object_vectors(ListBase *lb) BLI_freelistN(lb); } -void RE_Database_FromScene_Vectors(Render *re, Scene *sce, unsigned int lay) +void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned int lay) { ObjectInstanceRen *obi, *oldobi; StrandSurface *mesh; @@ -5475,7 +5476,7 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce, unsigned int lay) re->strandsurface= strandsurface; if(!re->test_break(re->tbh)) - RE_Database_FromScene(re, sce, lay, 1); + RE_Database_FromScene(re, bmain, sce, lay, 1); if(!re->test_break(re->tbh)) { for(step= 0; step<2; step++) { diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 6c6e200a74e..183b46af863 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1768,9 +1768,9 @@ static void do_render_3d(Render *re) /* make render verts/faces/halos/lamps */ if(render_scene_needs_vector(re)) - RE_Database_FromScene_Vectors(re, re->scene, re->lay); + RE_Database_FromScene_Vectors(re, re->main, re->scene, re->lay); else - RE_Database_FromScene(re, re->scene, re->lay, 1); + RE_Database_FromScene(re, re->main, re->scene, re->lay, 1); threaded_tile_processor(re); @@ -2142,6 +2142,7 @@ static void render_scene(Render *re, Scene *sce, int cfra) RE_InitState(resc, re, &sce->r, NULL, winx, winy, &re->disprect); /* still unsure entity this... */ + resc->main= re->main; resc->scene= sce; resc->lay= sce->lay; |