diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-20 14:38:12 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-20 14:38:12 +0400 |
commit | 414bb1a5f0427442a317acdd9f3d2ae88083f63f (patch) | |
tree | 2ee18918189950fb41090301207b2e6232f90a51 | |
parent | ddcc3f612a33de6cc1ed7ecb2b2fd66290952a31 (diff) |
Fix #32607: Color picker tool doesn't work properly: always pick black.
Regressions since color picking support from background image.
-rw-r--r-- | source/blender/editors/space_node/node_view.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c index 747ccfe7957..ccf5c4b540f 100644 --- a/source/blender/editors/space_node/node_view.c +++ b/source/blender/editors/space_node/node_view.c @@ -358,6 +358,13 @@ int ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], float float fx, fy, bufx, bufy; int ret = FALSE; + if (snode->treetype != NTREE_COMPOSIT || (snode->flag & SNODE_BACKDRAW) == 0) { + /* use viewer image for color sampling only if we're in compositor tree + * with backdrop enabled + */ + return FALSE; + } + ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node"); ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock); if (!ibuf) { |