diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-22 01:12:12 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-22 01:12:12 +0300 |
commit | 68aa35ae74226fbed936b1879302fc155d9acfac (patch) | |
tree | 5289756598b91f4bd019c7e2014479fc15848c7b /source/blender/blenkernel | |
parent | 294ab849099828d49ee4492083d9ba15e2678fe3 (diff) |
Fix T94967: Sculpt mode crashes with missing normals
From an error in rBcfa53e0fbeed, the vertex normals in `SculptSession`
seem to be used, but in the case when no "pbvh" is used, the value of
the pointer is never assigned.
Normals were not generally dirty before this "ensure" function with
regular sculpting operations, so this addition shouldn't have any cost.
Differential Revision: https://developer.blender.org/D13854
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 72210eea71d..407375c4d22 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1648,6 +1648,7 @@ static void sculpt_update_object(Depsgraph *depsgraph, ss->totvert = me->totvert; ss->totpoly = me->totpoly; ss->totfaces = me->totpoly; + ss->vert_normals = BKE_mesh_vertex_normals_ensure(me); ss->mvert = me->mvert; ss->mpoly = me->mpoly; ss->mloop = me->mloop; |