[Bf-blender-cvs] [daca00f187e] master: Fix Snake Hook rake on rotated objects
Pablo Dobarro
noreply at git.blender.org
Tue Mar 3 16:17:24 CET 2020
Commit: daca00f187ea2cc8906094058f45ed9e4c0b13da
Author: Pablo Dobarro
Date: Tue Mar 3 13:30:31 2020 +0100
Branches: master
https://developer.blender.org/rBdaca00f187ea2cc8906094058f45ed9e4c0b13da
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
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list