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
This commit is contained in:
Pablo Dobarro 2020-03-03 13:30:31 +01:00
parent b39273c071
commit daca00f187
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}