diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-06 06:07:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-06 06:54:05 +0300 |
commit | 0e590f90784a4c7b2f427ba133c0b0f749d4d6b4 (patch) | |
tree | b25decbde563a823afc66e0c540f4d4a796a2d0a /source/blender/editors | |
parent | df8f507f411fd71e649e9a896f53c2e574558525 (diff) |
Fix sequencer sample poll function
Sequencer poll was succeeding outside of a preview region.
This meant it couldn't be used in tool key maps which are currently
shared between preview & sequencer regions.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/util/ed_util_imbuf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/util/ed_util_imbuf.c b/source/blender/editors/util/ed_util_imbuf.c index d57640e16dc..ca21f88b230 100644 --- a/source/blender/editors/util/ed_util_imbuf.c +++ b/source/blender/editors/util/ed_util_imbuf.c @@ -565,6 +565,10 @@ bool ED_imbuf_sample_poll(bContext *C) if (SEQ_editing_get(CTX_data_scene(C)) == NULL) { return false; } + ARegion *region = CTX_wm_region(C); + if (!(region && (region->regiontype == RGN_TYPE_PREVIEW))) { + return false; + } return true; } } |