From 388c954cb537c4d560da99ed1534e57b8d4127cb Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Mon, 21 Oct 2019 20:06:46 +0200 Subject: [PATCH] Fix T70888: GPencil Sculpt tools don't work properly in a particular situation Thanks to @charlie for his help fixing this bug. --- source/blender/editors/gpencil/gpencil_brush.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index af9cadfb938..741521f3140 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -637,7 +637,9 @@ static bool gp_brush_push_apply(tGP_BrushEditData *gso, mul_v3_v3fl(delta, gso->dvec, inf); /* apply */ - mul_mat3_m4_v3(gso->object->obmat, delta); /* only rotation component */ + float inv_mat[4][4]; + invert_m4_m4(inv_mat, gso->object->obmat); + mul_mat3_m4_v3(inv_mat, delta); /* only rotation component */ add_v3_v3(&pt->x, delta); /* compute lock axis */