[Bf-blender-cvs] [951396a9bda] master: Fix T64274: Crash with more than 1 subdivision with the Multiresolution Modifier
Sergey Sharybin
noreply at git.blender.org
Wed May 8 10:43:04 CEST 2019
Commit: 951396a9bdafec0b641196a108198f9fa63e16b8
Author: Sergey Sharybin
Date: Wed May 8 10:40:56 2019 +0200
Branches: master
https://developer.blender.org/rB951396a9bdafec0b641196a108198f9fa63e16b8
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.
===================================================================
M source/blender/modifiers/intern/MOD_multires.c
===================================================================
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
More information about the Bf-blender-cvs
mailing list