diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_multires.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 7bdc1da33c2..03e7f0a235b 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -205,6 +205,13 @@ static Mesh *multires_as_ccg(MultiresModifierData *mmd, } BKE_subdiv_displacement_attach_from_multires(subdiv, mesh, mmd); result = BKE_subdiv_to_ccg_mesh(subdiv, &ccg_settings, mesh); + + /* 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 + * on the ownership model here. */ + MultiresRuntimeData *runtime_data = mmd->modifier.runtime; + runtime_data->subdiv = NULL; + return result; } @@ -261,10 +268,6 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * 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 - * on the ownership model here. */ - runtime_data->subdiv = NULL; // BKE_subdiv_stats_print(&subdiv->stats); } else { |