Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-02-01 05:35:55 +0300
committerCampbell Barton <campbell@blender.org>2022-02-01 05:39:19 +0300
commit9ce1135440f2fa69c14d393971fcf6c671f35cc3 (patch)
tree233a94d6edcce8af464595657087cf57a9fd4c43 /source/blender/editors/sculpt_paint
parent2e4a1a70da475c7a9b5caf716ceff622b4161a5c (diff)
Cleanup: remove duplicate vertex normal array in SculptSession
From investigating T95185, it's important the normal returned by SCULPT_vertex_normal_get always match the PBVH normal array. Since this is always initialized in the PBVH, there is no advantage in storing the normal array in two places, it only adds the possibility that changes in the future causing different meshes normals to be used. Split out from D13975.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 2725fc1eae4..07e26a3d931 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -178,13 +178,8 @@ void SCULPT_vertex_normal_get(SculptSession *ss, int index, float no[3])
{
switch (BKE_pbvh_type(ss->pbvh)) {
case PBVH_FACES: {
- if (ss->shapekey_active || ss->deform_modifiers_active) {
- const float(*vert_normals)[3] = BKE_pbvh_get_vert_normals(ss->pbvh);
- copy_v3_v3(no, vert_normals[index]);
- }
- else {
- copy_v3_v3(no, ss->vert_normals[index]);
- }
+ const float(*vert_normals)[3] = BKE_pbvh_get_vert_normals(ss->pbvh);
+ copy_v3_v3(no, vert_normals[index]);
break;
}
case PBVH_BMESH: