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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-22 06:09:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-22 06:09:41 +0400
commit2342209c95af153cc4c250e943a95835217db0af (patch)
tree707d11528f556883d275518cfb24d1ee27425be9 /source
parent39ed660bc64a216489fee25a2a009296c66ca379 (diff)
enable bmesh decimator by default.
Diffstat (limited to 'source')
-rw-r--r--source/blender/bmesh/intern/bmesh_decimate.c2
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c2
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c13
3 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_decimate.c b/source/blender/bmesh/intern/bmesh_decimate.c
index 600b67f2bb0..dbdd6008e89 100644
--- a/source/blender/bmesh/intern/bmesh_decimate.c
+++ b/source/blender/bmesh/intern/bmesh_decimate.c
@@ -830,7 +830,7 @@ static void bm_decim_edge_collapse(BMesh *bm, BMEdge *e,
}
#if 0
- /* optional, update edges around the face fan */
+ /* optional, update edges around the vertex face fan */
{
BMIter liter;
BMLoop *l;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 8a8bb2a2384..1fcf4107682 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1115,7 +1115,7 @@ static void rna_def_modifier_decimate(BlenderRNA *brna)
prop = RNA_def_property(srna, "ratio", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "percent");
RNA_def_property_range(prop, 0, 1);
- RNA_def_property_ui_range(prop, 0, 1, 1, 2);
+ RNA_def_property_ui_range(prop, 0, 1, 1, 4);
RNA_def_property_ui_text(prop, "Ratio", "Ratio of triangles to reduce to");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index fefb3838edd..54c31148405 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -49,10 +49,13 @@
#include "BKE_tessmesh.h"
-/* testing only! - Campbell */
-// #define USE_DECIMATE_BMESH
-#include "PIL_time.h"
+// #define USE_TIMEIT
+/* testing only! - Campbell */
+#define USE_DECIMATE_BMESH
+#ifdef USE_TIMEIT
+# include "PIL_time.h"
+#endif
#ifdef WITH_MOD_DECIMATE
#include "LOD_decimation.h"
@@ -89,7 +92,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
BMEditMesh *em;
BMesh *bm;
+#ifdef USE_TIMEIT
TIMEIT_START(decim);
+#endif
if (dmd->percent == 1.0f) {
return dm;
@@ -111,7 +116,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
BMEdit_Free(em);
MEM_freeN(em);
+#ifdef USE_TIMEIT
TIMEIT_END(decim);
+#endif
return result;
}