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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-21 18:37:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-21 18:37:56 +0400
commit5def0b6c55d13b07bd59863174379110395e1fed (patch)
tree200766f14226d049ed858ac51108467bf28b9923 /source/blender/editors/space_node/node_edit.c
parentc896a9921371a01b95046dd3522a7758a4e9a878 (diff)
display a sample line in the hue correct, handy to sample the image to know what to change
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r--source/blender/editors/space_node/node_edit.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index fc7bf473f8f..48f772e8008 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1676,10 +1676,12 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info)
Scene *scene = CTX_data_scene(C);
ImageSampleInfo *info = arg_info;
- ED_image_draw_info(ar, (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
- info->x, info->y, info->col, info->colf,
- NULL, NULL /* zbuf - unused for nodes */
- );
+ if (info->draw) {
+ ED_image_draw_info(ar, (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT), info->channels,
+ info->x, info->y, info->col, info->colf,
+ NULL, NULL /* zbuf - unused for nodes */
+ );
+ }
}
static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
@@ -1694,8 +1696,10 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
- if (!ibuf)
+ if (!ibuf) {
+ info->draw = 0;
return;
+ }
if (!ibuf->rect) {
if (info->color_manage)