diff options
Diffstat (limited to 'source/blender/blenkernel/intern/shrinkwrap.c')
-rw-r--r-- | source/blender/blenkernel/intern/shrinkwrap.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index e2a4dc6f852..d095320f49d 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -624,7 +624,6 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) /* auxiliary target */ Mesh *auxMesh = NULL; - bool auxMesh_free; ShrinkwrapTreeData *aux_tree = NULL; ShrinkwrapTreeData aux_tree_stack; SpaceTransform local2aux; @@ -654,7 +653,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) } if (calc->aux_target) { - auxMesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(calc->aux_target, &auxMesh_free); + auxMesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(calc->aux_target, false); if (!auxMesh) return; BLI_SPACE_TRANSFORM_SETUP(&local2aux, calc->ob, calc->aux_target); @@ -683,9 +682,6 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) if (aux_tree) { BKE_shrinkwrap_free_tree(aux_tree); } - if (auxMesh != NULL && auxMesh_free) { - BKE_id_free(NULL, auxMesh); - } } /* @@ -1285,7 +1281,6 @@ void shrinkwrapModifier_deform( DerivedMesh *ss_mesh = NULL; ShrinkwrapCalcData calc = NULL_ShrinkwrapCalcData; - bool target_free = false; /* remove loop dependencies on derived meshes (TODO should this be done elsewhere?) */ if (smd->target == ob) smd->target = NULL; @@ -1303,7 +1298,7 @@ void shrinkwrapModifier_deform( if (smd->target != NULL) { Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, smd->target); - calc.target = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target, &target_free); + calc.target = BKE_modifier_get_evaluated_mesh_from_evaluated_object(ob_target, false); /* TODO there might be several "bugs" on non-uniform scales matrixs * because it will no longer be nearest surface, not sphere projection @@ -1374,8 +1369,4 @@ void shrinkwrapModifier_deform( /* free memory */ if (ss_mesh) ss_mesh->release(ss_mesh); - - if (target_free && calc.target) { - BKE_id_free(NULL, calc.target); - } } |