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:
authorJoshua Leung <aligorith@gmail.com>2018-04-20 18:17:10 +0300
committerJoshua Leung <aligorith@gmail.com>2018-04-20 19:55:56 +0300
commit5374865523faf253a524a002ebcbefe05172fd8d (patch)
tree123f6725a5d2fb9a587e27aed0b776a6881d84a1 /source/blender/editors/animation/anim_ops.c
parentb5b4802af6cda44b48f845c2f866c107c2d46a7c (diff)
Dopesheet-Timeline: Removal of Timeline Editor!
This commit removes all references to the old timeline editor. Unfortuantely, the removal of the Timeline spacetype defining functions has ended up breaking the version patching code I'd been working on earlier (as now, the editor gets marked as "unknown/info" before we get a chance to patch it!)
Diffstat (limited to 'source/blender/editors/animation/anim_ops.c')
-rw-r--r--source/blender/editors/animation/anim_ops.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index 08d7d1d6780..8ea46e55b49 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -75,7 +75,7 @@ static int change_frame_poll(bContext *C)
* this shouldn't show up in 3D editor (or others without 2D timeline view) via search
*/
if (sa) {
- if (ELEM(sa->spacetype, SPACE_TIME, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
+ if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
return true;
}
else if (sa->spacetype == SPACE_IPO) {
@@ -86,7 +86,7 @@ static int change_frame_poll(bContext *C)
}
}
- CTX_wm_operator_poll_msg_set(C, "Expected an timeline/animation area to be active");
+ CTX_wm_operator_poll_msg_set(C, "Expected an animation area to be active");
return false;
}
@@ -279,6 +279,26 @@ static void ANIM_OT_change_frame(wmOperatorType *ot)
/* ****************** Start/End Frame Operators *******************************/
+static int anim_set_end_frames_poll(bContext *C)
+{
+ ScrArea *sa = CTX_wm_area(C);
+
+ /* XXX temp? prevent changes during render */
+ if (G.is_rendering) return false;
+
+ /* although it's only included in keymaps for regions using ED_KEYMAP_ANIMATION,
+ * this shouldn't show up in 3D editor (or others without 2D timeline view) via search
+ */
+ if (sa) {
+ if (ELEM(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) {
+ return true;
+ }
+ }
+
+ CTX_wm_operator_poll_msg_set(C, "Expected an animation area to be active");
+ return false;
+}
+
static int anim_set_sfra_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
@@ -316,7 +336,7 @@ static void ANIM_OT_start_frame_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = anim_set_sfra_exec;
- ot->poll = ED_operator_timeline_active;
+ ot->poll = anim_set_end_frames_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@@ -360,7 +380,7 @@ static void ANIM_OT_end_frame_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = anim_set_efra_exec;
- ot->poll = ED_operator_timeline_active;
+ ot->poll = anim_set_end_frames_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;