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>2011-05-01 20:07:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-01 20:07:18 +0400
commit7cc98cbb0b6f2ef113a568532eb0921e77cc973d (patch)
tree44d9613581a01452eb2018d611ab7b4a598a6a95 /source/blender/modifiers/intern/MOD_warp.c
parent6b0d932c0d27dbce5e62e2a422e388e02f341a52 (diff)
warp modifier, using negative strength inverts the transformation matrix but the location it gave wasnt useful when rotation was used too, just negate the translation.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_warp.c')
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 44eea3f9332..8825f640c03 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -198,8 +198,14 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
unit_m4(mat_unit);
if(strength < 0.0f) {
+ float loc[3];
strength = -strength;
+
+ /* inverted location is not useful, just use the negative */
+ copy_v3_v3(loc, mat_final[3]);
invert_m4(mat_final);
+ negate_v3_v3(mat_final[3], loc);
+
}
weight= strength;