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
This commit is contained in:
parent
e41437b16e
commit
b6f15d5d47
Notes:
blender-bot
2023-02-14 06:42:53 +01:00
Referenced by issue #80873, Shapekeys not targeting the right vertex position with Subdiv
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue