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:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-05-20 00:54:46 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-05-20 00:54:57 +0300
commit5ca8875f69d3b3644ca30882428608773fcc4481 (patch)
treea0faa6d7879718644397f20784144f03645fb98f /source/blender/editors/transform/transform_mode_translate.c
parent3bced3b30686bb6154d3b340ef740522c34e7d2a (diff)
Fix T73148: Incorrect Repeat Last for transforms with Individual Origins and Normal orientation
`pvec` was confusing and was adding steps that are apparently unnecessary. So the code has been redone so as not to use this pvec.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_translate.c')
-rw-r--r--source/blender/editors/transform/transform_mode_translate.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c
index 0a7d8bd90d3..4b380264dde 100644
--- a/source/blender/editors/transform/transform_mode_translate.c
+++ b/source/blender/editors/transform/transform_mode_translate.c
@@ -277,8 +277,7 @@ static void applyTranslationValue(TransInfo *t, const float vec[3])
}
if (t->con.applyVec) {
- float pvec[3];
- t->con.applyVec(t, tc, td, vec, tvec, pvec);
+ t->con.applyVec(t, tc, td, vec, tvec);
}
else {
copy_v3_v3(tvec, vec);
@@ -319,7 +318,6 @@ static void applyTranslationValue(TransInfo *t, const float vec[3])
static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
{
char str[UI_MAX_DRAW_STR];
- float values_final[3];
if (t->flag & T_INPUT_IS_VALUES_FINAL) {
copy_v3_v3(t->values_final, t->values);
@@ -336,28 +334,24 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
applySnapping(t, t->values_final);
}
- copy_v3_v3(values_final, t->values_final);
if (t->con.mode & CON_APPLY) {
- float pvec[3] = {0.0f, 0.0f, 0.0f};
- t->con.applyVec(t, NULL, NULL, t->values_final, values_final, pvec);
- headerTranslation(t, pvec, str);
-
- /* only so we have re-usable value with redo, see T46741. */
- mul_v3_m3v3(t->values_final, t->con.imtx, values_final);
+ float values_final[3];
+ copy_v3_v3(values_final, t->values_final);
+ t->con.applyVec(t, NULL, NULL, values_final, t->values_final);
+ headerTranslation(t, t->values_final, str);
}
else {
headerTranslation(t, t->values_final, str);
- copy_v3_v3(values_final, t->values_final);
}
/* don't use 't->values' now on */
- applyTranslationValue(t, values_final);
+ applyTranslationValue(t, t->values_final);
/* evil hack - redo translation if clipping needed */
- if (t->flag & T_CLIP_UV && clipUVTransform(t, values_final, 0)) {
- applyTranslationValue(t, values_final);
+ if (t->flag & T_CLIP_UV && clipUVTransform(t, t->values_final, 0)) {
+ applyTranslationValue(t, t->values_final);
/* In proportional edit it can happen that */
/* vertices in the radius of the brush end */