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:
Diffstat (limited to 'source/blender/editors/transform/transform_mode_edge_seq_slide.c')
-rw-r--r--source/blender/editors/transform/transform_mode_edge_seq_slide.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform_mode_edge_seq_slide.c b/source/blender/editors/transform/transform_mode_edge_seq_slide.c
index 141f9acdeb4..d2474d78387 100644
--- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c
+++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c
@@ -93,22 +93,29 @@ static void applySeqSlideValue(TransInfo *t, const float val[2])
static void applySeqSlide(TransInfo *t, const int mval[2])
{
char str[UI_MAX_DRAW_STR];
+ float values_final[3];
snapSequenceBounds(t, mval);
-
- if (t->con.mode & CON_APPLY) {
- float tvec[3];
- t->con.applyVec(t, NULL, NULL, t->values, tvec);
- copy_v3_v3(t->values_final, tvec);
+ if (applyNumInput(&t->num, values_final)) {
+ if (t->con.mode & CON_APPLY) {
+ if (t->con.mode & CON_AXIS0) {
+ /* Do nothing. */
+ }
+ else {
+ mul_v2_v2fl(values_final, t->spacemtx[1], values_final[0]);
+ }
+ }
+ }
+ else if (t->con.mode & CON_APPLY) {
+ t->con.applyVec(t, NULL, NULL, t->values, values_final);
}
else {
- // transform_snap_increment(t, t->values);
- applyNumInput(&t->num, t->values);
- copy_v3_v3(t->values_final, t->values);
+ copy_v2_v2(values_final, t->values);
}
- t->values_final[0] = floorf(t->values_final[0] + 0.5f);
- t->values_final[1] = floorf(t->values_final[1] + 0.5f);
+ values_final[0] = floorf(values_final[0] + 0.5f);
+ values_final[1] = floorf(values_final[1] + 0.5f);
+ copy_v2_v2(t->values_final, values_final);
headerSeqSlide(t, t->values_final, str);
applySeqSlideValue(t, t->values_final);