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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_bevel.c')
-rw-r--r--source/blender/modifiers/intern/MOD_bevel.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c
index c0cd28ae27a..1bc768a73c2 100644
--- a/source/blender/modifiers/intern/MOD_bevel.c
+++ b/source/blender/modifiers/intern/MOD_bevel.c
@@ -110,20 +110,16 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob,
int UNUSED(useRenderParams),
int UNUSED(isFinalCalc))
{
+ DerivedMesh *result;
BMesh *bm;
BMEditMesh *em;
- DerivedMesh *cddm;
BMIter iter;
BMEdge *e;
BevelModifierData *bmd = (BevelModifierData*) md;
/* int allocsize[] = {512, 512, 2048, 512}; */ /* UNUSED */
float threshold = cos((bmd->bevel_angle + 0.00001) * M_PI / 180.0);
- if (!CDDM_Check(dm)) {
- cddm = CDDM_copy(dm);
- } else cddm = dm;
-
- em = CDDM_To_BMesh(ob, dm, NULL, FALSE);
+ em = DM_to_editbmesh(ob, dm, NULL, FALSE);
bm = em->bm;
BM_mesh_normals_update(bm);
@@ -153,17 +149,12 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *ob,
EDGE_MARK, bmd->value, (bmd->flags & BME_BEVEL_EVEN)!=0, (bmd->flags & BME_BEVEL_DIST)!=0);
BMO_pop(bm);
- if (cddm != dm) {
- cddm->needsFree = 1;
- cddm->release(cddm);
- }
-
BLI_assert(em->looptris == NULL);
- cddm = CDDM_from_BMEditMesh(em, NULL, TRUE, FALSE);
+ result = CDDM_from_BMEditMesh(em, NULL, TRUE, FALSE);
BMEdit_Free(em);
MEM_freeN(em);
- return cddm;
+ return result;
}