From 02677ec4e0fadc9b2bec694fd14155ea16e48adf Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Wed, 4 Nov 2020 23:39:36 +0100 Subject: Fix T81915: Draw Face Sets not working with deformed sculpt mesh The draw face sets brush uses the poly center when used in meshes to increase its precision when working in low poly geometry. For this to work with deformed meshes, the deformed coordinates from the PBVH should be used instead. Reviewed By: sergey Maniphest Tasks: T81915 Differential Revision: https://developer.blender.org/D9424 --- source/blender/editors/sculpt_paint/sculpt_intern.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h') diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 6313c934774..1a596909d8d 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -170,6 +170,10 @@ int SCULPT_active_vertex_get(SculptSession *ss); const float *SCULPT_active_vertex_co_get(SculptSession *ss); void SCULPT_active_vertex_normal_get(SculptSession *ss, float normal[3]); +/* Returns PBVH deformed vertices array if shape keys or deform modifiers are used, otherwise + * returns mesh original vertices array. */ +struct MVert *SCULPT_mesh_deformed_mverts_get(SculptSession *ss); + /* Fake Neighbors */ #define FAKE_NEIGHBOR_NONE -1 -- cgit v1.2.3