diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-24 17:31:58 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-24 17:31:58 +0300 |
commit | db421408ce3eb21be3e04cae3e1c987e9b747311 (patch) | |
tree | 47b199fe03d18d5252f4bc6a55257bbd23325fc5 /source | |
parent | d5e839d2abc830e2a2dd237b82bbb84873df3d88 (diff) |
Bugfix #26584
- Colormanagement code was gamma correcting non-RGBA buffers in composite.
(Like vector buffers).
- Crash on using "use Color Management" button during composites, because
it was freeing all node images. Added code to stop first jobs before
freeing. It sends notifier for recomposites after free anyway.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 4 | ||||
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_image.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 812e991831b..e00ceeafd99 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -54,6 +54,7 @@ #include <libavformat/avformat.h> #endif +#include "WM_api.h" #include "WM_types.h" #include "BLI_threads.h" @@ -754,6 +755,9 @@ static void rna_RenderSettings_color_management_update(Main *bmain, Scene *unuse bNode *node; if(ntree && scene->use_nodes) { + /* XXX images are freed here, stop render and preview threads, until Image is threadsafe */ + WM_jobs_stop_all(bmain->wm.first); + for (node=ntree->nodes.first; node; node=node->next) { if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_IMAGE)) { ED_node_changed_update(&scene->id, node); diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/intern/CMP_nodes/CMP_image.c index a7be5ac6f8a..1ea3cf96ad0 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_image.c @@ -80,9 +80,9 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i IMB_float_from_rect(ibuf); } - /* now we need a float buffer from the image - * with matching color management */ - if(ibuf->channels == 4) { + /* now we need a float buffer from the image with matching color management */ + /* XXX weak code, multilayer is excluded from this */ + if(ibuf->channels == 4 && ima->rr==NULL) { if(rd->color_mgt_flag & R_COLOR_MANAGEMENT) { if(ibuf->profile != IB_PROFILE_NONE) { rect= ibuf->rect_float; |