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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-15 10:54:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-15 10:56:53 +0300
commit93867cfafcf5474c565505f4f54e89e1cda6c99f (patch)
treeab09696c5103bc0de8cf71ee57f32c14d5ebb722 /source/blender/editors/transform/transform_input.c
parentb3791d59f66998ef0552c1c01a95bbecd35afa09 (diff)
Correct last commit
Diffstat (limited to 'source/blender/editors/transform/transform_input.c')
-rw-r--r--source/blender/editors/transform/transform_input.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 20c442d5881..190bc57fcfd 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -387,12 +387,6 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
if (mi_data_prev && (mi_data_prev != mi->data)) {
MEM_freeN(mi_data_prev);
}
-
- /* Don't write into the values when non-modal because they are already set from operator redo values. */
- if (t->flag & T_MODAL) {
- /* bootstrap mouse input with initial values */
- applyMouseInput(t, mi, mi->imval, t->values);
- }
}
void setInputPostFct(MouseInput *mi, void (*post)(struct TransInfo *t, float values[3]))
@@ -435,6 +429,17 @@ void applyMouseInput(TransInfo *t, MouseInput *mi, const int mval[2], float outp
mi->apply(t, mi, mval_db, output);
}
+ if (!is_zero_v3(t->values_modal_offset)) {
+ float values_ofs[3];
+ if (t->con.mode & CON_APPLY) {
+ mul_v3_m3v3(values_ofs, t->spacemtx, t->values_modal_offset);
+ }
+ else {
+ copy_v3_v3(values_ofs, t->values_modal_offset);
+ }
+ add_v3_v3(t->values, values_ofs);
+ }
+
if (mi->post) {
mi->post(t, output);
}