diff options
author | Pablo Dobarro <pablodp606> | 2020-04-20 03:06:12 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-04-20 03:07:49 +0300 |
commit | 35cbf3b5dcd21e327922dbc16e5abae047da68c4 (patch) | |
tree | e1b8895b508f39ba942620a6feb53abdd22de3f5 /source/blender/blenkernel/intern/paint.c | |
parent | d290bdd42abb6a8878eeee0933a06d1950ed23d1 (diff) |
Fix crash on Multires Face Set visibility sync
Multires uses the data of the Face Sets stored in the base mesh to
manage the grid's visibility, so these pointers can no longer be set to
NULL when editing Multires objects as they are requried for some operations.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7431
Diffstat (limited to 'source/blender/blenkernel/intern/paint.c')
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 420538061bb..d4408291712 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1514,9 +1514,12 @@ static void sculpt_update_object( ss->totvert = me_eval->totvert; ss->totpoly = me_eval->totpoly; ss->totfaces = me->totpoly; - ss->mvert = NULL; - ss->mpoly = NULL; - ss->mloop = NULL; + + /* These are assigned to the base mesh in Multires. This is needed because Face Sets operators + * and tools use the Face Sets data from the base mesh when Multires is active. */ + ss->mvert = me->mvert; + ss->mpoly = me->mpoly; + ss->mloop = me->mloop; } else { ss->totvert = me->totvert; |