diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-03-14 13:45:42 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-03-14 13:45:42 +0300 |
commit | 7609370d504de51371b96d8e6807ec6f62ee6c69 (patch) | |
tree | 70c34d8fd214dd963602ceff0f2f247704fd1295 /source/blender/editors/transform/transform_conversions.c | |
parent | 2d1ef275f2299c71dade74743cdca0c771648333 (diff) |
Bugfixes:
- Sync Markers option works for local markers (or any other list of
markers in future) too now.
- Apply Pose to Restpose operator now displays a warning if an action
was found (warning about the action now being invalid)
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 12dbf7f5c71..05bf96461a8 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4707,10 +4707,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t) if(t->mode == TFM_SEQ_SLIDE) { if(t->frame_side == 'B') - scene_marker_tfm_translate(t->scene, floor(t->values[0] + 0.5f), SELECT); + ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_TRANSLATE, t->vec[0], t->frame_side); } else if (ELEM(t->frame_side, 'L', 'R')) { - scene_marker_tfm_extend(t->scene, floor(t->vec[0] + 0.5f), SELECT, t->scene->r.cfra, t->frame_side); + ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_EXTEND, t->vec[0], t->frame_side); } } @@ -4783,22 +4783,6 @@ void special_aftertrans_update(bContext *C, TransInfo *t) posttrans_action_clean(&ac, (bAction *)ac.data); } } - - /* marker transform, not especially nice but we may want to move markers - * at the same time as keyframes in the dope sheet. */ - // FIXME: this only does scene markers, but fails when action editor is displaying local markers only... - if ((saction->flag & SACTION_MARKERS_MOVE) && (cancelled == 0)) { - if (t->mode == TFM_TIME_TRANSLATE) { - if (ELEM(t->frame_side, 'L', 'R')) /* TFM_TIME_EXTEND */ - scene_marker_tfm_extend(t->scene, floor(t->vec[0] + 0.5f), SELECT, t->scene->r.cfra, t->frame_side); - else /* TFM_TIME_TRANSLATE */ - scene_marker_tfm_translate(t->scene, floor(t->vec[0] + 0.5f), SELECT); - } - else if (t->mode == TFM_TIME_SCALE) { - scene_marker_tfm_scale(t->scene, t->vec[0], SELECT); - } - } - else if (ac.datatype == ANIMCONT_GPENCIL) { /* remove duplicate frames and also make sure points are in order! */ /* 3 cases here for curve cleanups: @@ -4820,6 +4804,21 @@ void special_aftertrans_update(bContext *C, TransInfo *t) } } + /* marker transform, not especially nice but we may want to move markers + * at the same time as keyframes in the dope sheet. + */ + if ((saction->flag & SACTION_MARKERS_MOVE) && (cancelled == 0)) { + if (t->mode == TFM_TIME_TRANSLATE) { + if (ELEM(t->frame_side, 'L', 'R')) /* TFM_TIME_EXTEND */ + ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side); + else /* TFM_TIME_TRANSLATE */ + ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side); + } + else if (t->mode == TFM_TIME_SCALE) { + ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side); + } + } + /* make sure all F-Curves are set correctly */ ANIM_editkeyframes_refresh(&ac); |