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:
authorPablo Dobarro <pablodp606@gmail.com>2020-03-03 15:30:31 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-03-03 18:16:34 +0300
commitdaca00f187ea2cc8906094058f45ed9e4c0b13da (patch)
tree935343729b73e536e6340bcf3c50487e80417186 /source/blender/editors
parentb39273c071be288a3cc587eb211d0357ed53d97f (diff)
Fix Snake Hook rake on rotated objects
It was missing this local space conversion before calculating the rake angle. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7008
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c0f843a47bb..4e321306d91 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -6767,6 +6767,9 @@ static void sculpt_update_brush_delta(UnifiedPaintSettings *ups, Object *ob, Bru
/* Handle 'rake' */
cache->is_rake_rotation_valid = false;
+ invert_m4_m4(imat, ob->obmat);
+ mul_mat3_m4_v3(imat, grab_location);
+
if (cache->first_time) {
copy_v3_v3(cache->rake_data.follow_co, grab_location);
}