Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform.c
| Context not available. | |||||
| static void initTimeSlide(TransInfo *t); | static void initTimeSlide(TransInfo *t); | ||||
| static void applyTimeSlide(TransInfo *t, const int mval[2]); | static void applyTimeSlide(TransInfo *t, const int mval[2]); | ||||
| static void initTimeScale(TransInfo *t); | static void initTimeScale(TransInfo *t, const wmEvent *event); | ||||
| static void applyTimeScale(TransInfo *t, const int mval[2]); | static void applyTimeScale(TransInfo *t, const int mval[2]); | ||||
| static void initBakeTime(TransInfo *t); | static void initBakeTime(TransInfo *t); | ||||
| Context not available. | |||||
| calculatePropRatio(t); | calculatePropRatio(t); | ||||
| calculateCenter(t); | calculateCenter(t); | ||||
| initMouseInput(t, &t->mouse, t->center2d, event->mval); | initMouseInput(t, &t->mouse, event->mval); | ||||
| switch (mode) { | switch (mode) { | ||||
| case TFM_TRANSLATION: | case TFM_TRANSLATION: | ||||
| Context not available. | |||||
| initTimeSlide(t); | initTimeSlide(t); | ||||
| break; | break; | ||||
| case TFM_TIME_SCALE: | case TFM_TIME_SCALE: | ||||
| initTimeScale(t); | initTimeScale(t,event); | ||||
| break; | break; | ||||
| case TFM_TIME_DUPLICATE: | case TFM_TIME_DUPLICATE: | ||||
| /* same as TFM_TIME_EXTEND, but we need the mode info for later | /* same as TFM_TIME_EXTEND, but we need the mode info for later | ||||
| Context not available. | |||||
| /** \name Transform Animation Time Scale | /** \name Transform Animation Time Scale | ||||
| * \{ */ | * \{ */ | ||||
| static void initTimeScale(TransInfo *t) | static void initTimeScale(TransInfo *t, const wmEvent *event) | ||||
| { | { | ||||
| float center[2]; | |||||
| /* this tool is only really available in the Action Editor | /* this tool is only really available in the Action Editor | ||||
| * AND NLA Editor (for strip scaling) | * AND NLA Editor (for strip scaling) | ||||
| */ | */ | ||||
| Context not available. | |||||
| /* recalculate center2d to use CFRA and mouse Y, since that's | /* recalculate center2d to use CFRA and mouse Y, since that's | ||||
| * what is used in time scale */ | * what is used in time scale */ | ||||
| t->center[0] = t->scene->r.cfra; | t->center[0] = t->scene->r.cfra; | ||||
| projectFloatView(t, t->center, center); | projectFloatView(t, t->center, t->center2d); | ||||
| center[1] = t->mouse.imval[1]; | t->center2d[1] = event->mval[0]; | ||||
| /* force a reinit with the center2d used here */ | |||||
| initMouseInput(t, &t->mouse, center, t->mouse.imval); | |||||
| initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP); | initMouseInputMode(t, &t->mouse, INPUT_SPRING_FLIP); | ||||
| Context not available. | |||||