[Bf-blender-cvs] [0e590f90784] master: Fix sequencer sample poll function
Campbell Barton
noreply at git.blender.org
Wed Oct 6 05:54:51 CEST 2021
Commit: 0e590f90784a4c7b2f427ba133c0b0f749d4d6b4
Author: Campbell Barton
Date: Wed Oct 6 14:07:20 2021 +1100
Branches: master
https://developer.blender.org/rB0e590f90784a4c7b2f427ba133c0b0f749d4d6b4
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.
===================================================================
M source/blender/editors/util/ed_util_imbuf.c
===================================================================
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;
}
}
More information about the Bf-blender-cvs
mailing list