diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-10-31 14:51:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-10-31 14:51:10 +0300 |
commit | 06abc862b0d67c2e7d1274ef0c90f55d24d8f625 (patch) | |
tree | e0a1c80ef412ed75699e1b91ca2a4e91b9699d76 /source/blender | |
parent | beb5f84991ad9ab40b7187bf7e327ff938c9f747 (diff) |
Fix crashing running read full sample layers operator.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 3 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_pipeline.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index b8bfed2b75e..c9f51078cec 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1904,13 +1904,14 @@ void NODE_OT_read_renderlayers(wmOperatorType *ot) static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op)) { + Main *bmain= CTX_data_main(C); SpaceNode *snode= CTX_wm_space_node(C); Scene *curscene= CTX_data_scene(C); Render *re= RE_NewRender(curscene->id.name); // WM_cursor_wait(1); - RE_MergeFullSample(re, curscene, snode->nodetree); + RE_MergeFullSample(re, bmain, curscene, snode->nodetree); snode_notify(C, snode); // WM_cursor_wait(0); diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index b12e45ecd9c..faa14231584 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -220,7 +220,7 @@ void RE_WriteRenderResult(RenderResult *rr, char *filename, int compress); struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty); /* do a full sample buffer compo */ -void RE_MergeFullSample(struct Render *re, struct Scene *sce, struct bNodeTree *ntree); +void RE_MergeFullSample(struct Render *re, struct Main *bmain, struct Scene *sce, struct bNodeTree *ntree); /* ancient stars function... go away! */ void RE_make_stars(struct Render *re, struct Scene *scenev3d, void (*initfunc)(void), diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 68b6a04035e..6fac7e7b4aa 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2313,10 +2313,12 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree) BLI_rw_mutex_unlock(&re->resultmutex); } -void RE_MergeFullSample(Render *re, Scene *sce, bNodeTree *ntree) +void RE_MergeFullSample(Render *re, Main *bmain, Scene *sce, bNodeTree *ntree) { Scene *scene; bNode *node; + + re->main= bmain; /* first call RE_ReadRenderResult on every renderlayer scene. this creates Render structs */ |