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:
authorCampbell Barton <ideasman42@gmail.com>2012-10-23 09:20:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-23 09:20:02 +0400
commitbbe0deb8afb0094b169a9abb04df7458cd49786b (patch)
treefc32d80adbdef16059de1a3dac27fa5494d93efe /source/blender/modifiers
parent0636886715b4c5ac56ed7f903bf37a00cfbdc841 (diff)
add limited dissolve as a decimation type to the decimate modifier.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index 6eb2f8d6c79..71b3b6c883b 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -64,6 +64,7 @@ static void initData(ModifierData *md)
DecimateModifierData *dmd = (DecimateModifierData *) md;
dmd->percent = 1.0;
+ dmd->angle = DEG2RADF(15.0f);
}
static void copyData(ModifierData *md, ModifierData *target)
@@ -73,6 +74,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tdmd->percent = dmd->percent;
tdmd->iter = dmd->iter;
+ tdmd->angle = dmd->angle;
BLI_strncpy(tdmd->defgrp_name, dmd->defgrp_name, sizeof(tdmd->defgrp_name));
tdmd->flag = dmd->flag;
tdmd->mode = dmd->mode;
@@ -149,9 +151,11 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
case MOD_DECIM_MODE_UNSUBDIV:
BM_mesh_decimate_unsubdivide(bm, dmd->iter);
break;
+ case MOD_DECIM_MODE_DISSOLVE:
+ BM_mesh_decimate_dissolve(bm, dmd->angle);
+ break;
}
-
if (vweights) {
MEM_freeN(vweights);
}