[Bf-blender-cvs] [a488a21f4fa] master: Fix T64257: Scrubbing in the Clip Editor Graph Editor doesn't work
Sergey Sharybin
noreply at git.blender.org
Tue May 7 17:08:10 CEST 2019
Commit: a488a21f4fa0202c1760a8f77ec2752510f1fe76
Author: Sergey Sharybin
Date: Tue May 7 17:07:04 2019 +0200
Branches: master
https://developer.blender.org/rBa488a21f4fa0202c1760a8f77ec2752510f1fe76
Fix T64257: Scrubbing in the Clip Editor Graph Editor doesn't work
While intent of such action is not very clear, there is no real
reason to forbid it.
===================================================================
M source/blender/editors/space_clip/clip_ops.c
M source/blender/editors/space_clip/tracking_ops.c
===================================================================
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 3f971c4444a..a6b1db1aa83 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -955,10 +955,10 @@ static bool change_frame_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering) {
- return 0;
+ return false;
}
-
- return ED_space_clip_poll(C);
+ SpaceClip *space_clip = CTX_wm_space_clip(C);
+ return space_clip != NULL;
}
static void change_frame_apply(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 18d48b426e0..b51baafbcf5 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1299,6 +1299,12 @@ void CLIP_OT_hide_tracks_clear(wmOperatorType *ot)
/********************** frame jump operator *********************/
+static bool frame_jump_poll(bContext *C)
+{
+ SpaceClip *space_clip = CTX_wm_space_clip(C);
+ return space_clip != NULL;
+}
+
static int frame_jump_exec(bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
@@ -1377,7 +1383,7 @@ void CLIP_OT_frame_jump(wmOperatorType *ot)
/* api callbacks */
ot->exec = frame_jump_exec;
- ot->poll = ED_space_clip_poll;
+ ot->poll = frame_jump_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
More information about the Bf-blender-cvs
mailing list