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:
authorPablo Dobarro <pablodp606>2020-04-20 03:06:12 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-04-20 03:07:49 +0300
commit35cbf3b5dcd21e327922dbc16e5abae047da68c4 (patch)
treee1b8895b508f39ba942620a6feb53abdd22de3f5
parentd290bdd42abb6a8878eeee0933a06d1950ed23d1 (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
m---------release/scripts/addons0
-rw-r--r--source/blender/blenkernel/BKE_paint.h6
-rw-r--r--source/blender/blenkernel/intern/paint.c9
m---------source/tools0
4 files changed, 12 insertions, 3 deletions
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject cc1a2f5af8681158905be040099ea14bb814b33
+Subproject f12430cae606db8aeeb72f99fe15ebbd71d4a92
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index f78a142704b..7822f285c3b 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -294,10 +294,15 @@ typedef struct SculptSession {
struct MultiresModifierData *modifier;
int level;
} multires;
+
+ /* These are always assigned to base mesh data when using PBVH_FACES and PBVH_GRIDS. */
struct MVert *mvert;
struct MPoly *mpoly;
struct MLoop *mloop;
+
+ /* These contain the vertex and poly counts of the final mesh. */
int totvert, totpoly;
+
struct KeyBlock *shapekey_active;
float *vmask;
@@ -306,6 +311,7 @@ typedef struct SculptSession {
int *pmap_mem;
/* Mesh Face Sets */
+ /* Total number of polys of the base mesh. */
int totfaces;
int *face_sets;
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;
diff --git a/source/tools b/source/tools
-Subproject 35dd27ded664b1068e773c27988ee221f3ce39d
+Subproject 8a36c2833db48ed78c436ee19534ce5cf3b2eee