diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 14:15:58 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 14:15:58 +0400 |
commit | 71b8469e3b48d179c18b36d1c45c56a5d14e1180 (patch) | |
tree | 53761eb276f233c49c4972e0d335f0b7a87f5d6e /source/blender/editors/transform | |
parent | 6d8e55545d0f163c2a9c0440928fdd943b79c925 (diff) |
Slight better solution for sequencer's transform with alt holded down
Set T_ALT_TRANSFORM flag event handling function rather than accessing
window manager form flushing sequencer transform data.
Visual feedback about what exactly will happen on placing strip between
two other strips could be also improved.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 12 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index afe53401e1e..fec69167644 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1221,6 +1221,12 @@ int transformEvent(TransInfo *t, wmEvent *event) else view_editmove(event->type); t->redraw = 1; break; + case LEFTALTKEY: + case RIGHTALTKEY: + if(t->spacetype == SPACE_SEQ) + t->flag |= T_ALT_TRANSFORM; + + break; default: handled = 0; break; @@ -1254,6 +1260,12 @@ int transformEvent(TransInfo *t, wmEvent *event) //// if (t->options & CTX_TWEAK) // t->state = TRANS_CONFIRM; // break; + case LEFTALTKEY: + case RIGHTALTKEY: + if(t->spacetype == SPACE_SEQ) + t->flag &= ~T_ALT_TRANSFORM; + + break; default: handled = 0; break; diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 2a01b03ec14..f6b888d4881 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4275,8 +4275,7 @@ static void freeSeqData(TransInfo *t) } } -#if 1 /* (mango hack! - for Ian) this is truely bad - should _never_ be in a release :| */ - if (CTX_wm_window(t->context)->eventstate->alt) { + if (t->flag & T_ALT_TRANSFORM) { int minframe = MAXFRAME; td = t->data; seq_prev = NULL; @@ -4313,9 +4312,6 @@ static void freeSeqData(TransInfo *t) else { BKE_sequence_base_shuffle_time(seqbasep, t->scene); } -#else - BKE_sequence_base_shuffle_time(seqbasep, t->scene); -#endif if (has_effect) { /* update effects strips based on strips just moved in time */ |