[Bf-blender-cvs] [b6f15d5d47b] master: Fix T80873: Grab active vertex preview not working with shape keys
Pablo Dobarro
noreply at git.blender.org
Thu Oct 1 19:24:55 CEST 2020
Commit: b6f15d5d47bfdc1b24d5b17e46bac280d8b9a63d
Author: Pablo Dobarro
Date: Thu Oct 1 19:22:10 2020 +0200
Branches: master
https://developer.blender.org/rBb6f15d5d47bfdc1b24d5b17e46bac280d8b9a63d
Fix T80873: Grab active vertex preview not working with shape keys
When a Shape Key is active, use the PBVH deformed coordinates for the
preview.
Reviewed By: sergey
Maniphest Tasks: T80873
Differential Revision: https://developer.blender.org/D8921
===================================================================
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 f9dbfaa5da9..2bc19b625cd 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -206,9 +206,18 @@ const float *SCULPT_vertex_persistent_co_get(SculptSession *ss, int index)
const float *SCULPT_vertex_co_for_grab_active_get(SculptSession *ss, int index)
{
+ /* Always grab active shape key if the sculpt happens on shapekey. */
+ if (ss->shapekey_active) {
+ const MVert *mverts = BKE_pbvh_get_verts(ss->pbvh);
+ return mverts[index].co;
+ }
+
+ /* Sculpting on the base mesh. */
if (ss->mvert) {
return ss->mvert[index].co;
}
+
+ /* Everything else, such as sculpting on multires. */
return SCULPT_vertex_co_get(ss, index);
}
More information about the Bf-blender-cvs
mailing list