Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_mode_edge_seq_slide.c
| Show All 29 Lines | |||||
| #include "BKE_unit.h" | #include "BKE_unit.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_view2d.h" | |||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "transform.h" | #include "transform.h" | ||||
| #include "transform_convert.h" | |||||
| #include "transform_mode.h" | #include "transform_mode.h" | ||||
| #include "transform_snap.h" | #include "transform_snap.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Transform (Sequencer Slide) | /** \name Transform (Sequencer Slide) | ||||
| * \{ */ | * \{ */ | ||||
| static eRedrawFlag seq_slide_handleEvent(struct TransInfo *t, const wmEvent *event) | static eRedrawFlag seq_slide_handleEvent(struct TransInfo *t, const wmEvent *event) | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void applySeqSlide(TransInfo *t, const int mval[2]) | static void applySeqSlide(TransInfo *t, const int mval[2]) | ||||
| { | { | ||||
| char str[UI_MAX_DRAW_STR]; | char str[UI_MAX_DRAW_STR]; | ||||
| float values_final[3] = {0.0f}; | float values_final[3] = {0.0f}; | ||||
| snapSequenceBounds(t, mval); | snapSequenceBounds(t, mval); | ||||
| transform_convert_sequencer_channel_clamp(t); | |||||
| if (applyNumInput(&t->num, values_final)) { | if (applyNumInput(&t->num, values_final)) { | ||||
| if (t->con.mode & CON_APPLY) { | if (t->con.mode & CON_APPLY) { | ||||
| if (t->con.mode & CON_AXIS0) { | if (t->con.mode & CON_AXIS0) { | ||||
| mul_v2_v2fl(values_final, t->spacemtx[0], values_final[0]); | mul_v2_v2fl(values_final, t->spacemtx[0], values_final[0]); | ||||
| } | } | ||||
| else { | else { | ||||
| mul_v2_v2fl(values_final, t->spacemtx[1], values_final[0]); | mul_v2_v2fl(values_final, t->spacemtx[1], values_final[0]); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||