Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-04-02 16:41:11 +0400
committerTon Roosendaal <ton@blender.org>2013-04-02 16:41:11 +0400
commit58530a5affce93388937064e6dadd1eadc2b1b0c (patch)
tree5e5ed13f899b1194f79956b24d8cb37c431c1cf7 /source/blender/editors/space_image
parenta78aa15cd653c18bc0b3b486cf4c7dab39f85fd3 (diff)
Usability fix, for color grading.
The Scopes and Histogram (Image editor, Sequencer) were not updating on changes in color or display settings. - Missing notifiers for refreshing - Missing code to draw correct for managed byte buffers.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/space_image.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 761becdbf8e..1b4ff44bb6b 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -435,6 +435,12 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn)
/* context changes */
switch (wmn->category) {
+ case NC_WINDOW:
+ /* notifier comes from editing color space */
+ image_scopes_tag_refresh(sa);
+ ED_area_tag_refresh(sa);
+ ED_area_tag_redraw(sa);
+ break;
case NC_SCENE:
switch (wmn->data) {
case ND_FRAME:
@@ -801,11 +807,15 @@ static void image_scope_area_draw(const bContext *C, ARegion *ar)
Scene *scene = CTX_data_scene(C);
void *lock;
ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock);
+
if (ibuf) {
if (!sima->scopes.ok) {
BKE_histogram_update_sample_line(&sima->sample_line_hist, ibuf, &scene->view_settings, &scene->display_settings);
}
- scopes_update(&sima->scopes, ibuf, &scene->view_settings, &scene->display_settings);
+ if (sima->image->flag & IMA_VIEW_AS_RENDER)
+ scopes_update(&sima->scopes, ibuf, &scene->view_settings, &scene->display_settings);
+ else
+ scopes_update(&sima->scopes, ibuf, NULL, &scene->display_settings);
}
ED_space_image_release_buffer(sima, ibuf, lock);