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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-05-08 11:40:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-08 11:42:21 +0300
commit951396a9bdafec0b641196a108198f9fa63e16b8 (patch)
treeec26810681eb75841ae0036811812451d6ca7f2f /source/blender/modifiers
parent8287f31876b4c252f9eae042c4a6f27d69c45598 (diff)
Fix T64274: Crash with more than 1 subdivision with the Multiresolution Modifier
Update more relevant fields in the sculpt session. Really becoming annoying, but was also annoying in the old code as well.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_multires.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c
index 6e5426bbf40..c61ebe0448c 100644
--- a/source/blender/modifiers/intern/MOD_multires.c
+++ b/source/blender/modifiers/intern/MOD_multires.c
@@ -195,7 +195,14 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
* Annoying and not so much black-boxed as far as sculpting goes, and
* surely there is a better way of solving this. */
if (ctx->object->sculpt != NULL) {
- ctx->object->sculpt->subdiv_ccg = result->runtime.subdiv_ccg;
+ SculptSession *sculpt_session = ctx->object->sculpt;
+ sculpt_session->subdiv_ccg = result->runtime.subdiv_ccg;
+ sculpt_session->multires = mmd;
+ sculpt_session->totvert = mesh->totvert;
+ sculpt_session->totpoly = mesh->totpoly;
+ sculpt_session->mvert = NULL;
+ sculpt_session->mpoly = NULL;
+ sculpt_session->mloop = NULL;
}
/* NOTE: CCG becomes an owner of Subdiv descriptor, so can not share
* this pointer. Not sure if it's needed, but might have a second look