[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [721] trunk/py/scripts/addons/ curve_simplify.py: -probably fixed curvature mode for fcurves_simplify

Florian Meyer florianfelix at web.de
Wed Jun 9 02:18:50 CEST 2010


Revision: 721
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=721
Author:   testscreenings
Date:     2010-06-09 02:18:50 +0200 (Wed, 09 Jun 2010)

Log Message:
-----------
-probably fixed curvature mode for fcurves_simplify
-some better defaults

Modified Paths:
--------------
    trunk/py/scripts/addons/curve_simplify.py

Modified: trunk/py/scripts/addons/curve_simplify.py
===================================================================
--- trunk/py/scripts/addons/curve_simplify.py	2010-06-08 22:22:13 UTC (rev 720)
+++ trunk/py/scripts/addons/curve_simplify.py	2010-06-09 00:18:50 UTC (rev 721)
@@ -78,8 +78,8 @@
     # tested against averaged curvatures and distances of neighbour verts
     newVerts.append(0) # first vert is always kept
     for i, curv in enumerate(curvatures):
-        if (curv > k_thresh*0.1
-        or distances[i] > dis_error*0.1):
+        if (curv >= k_thresh*0.1
+        or distances[i] >= dis_error*0.1):
             newVerts.append(i)
     newVerts.append(len(curvatures)-1) # last vert is always kept
 
@@ -366,18 +366,18 @@
                             items=opModes)
     k_thresh = FloatProperty(name="k",
                             min=0, soft_min=0,
-                            default=0,
+                            default=0, precision=3,
                             description="threshold")
     pointsNr = IntProperty(name="n",
                             min=5, soft_min=5,
                             max=16, soft_max=9,
                             default=5,
                             description="degree of curve to get averaged curvatures")
-    error = FloatProperty(name="error in Bu",
-                            description="maximum error in Blenderunits to allow - distance",
+    error = FloatProperty(name="error",
+                            description="maximum error to allow - distance",
                             min=0.0,
                             soft_min=0.0,
-                            default=0.001)
+                            default=0.00, precision=3)
     degreeOut = IntProperty(name="degree",
                             min=3, soft_min=3,
                             max=7, soft_max=7,
@@ -386,15 +386,15 @@
     dis_error = FloatProperty(name="distance error",
                             description="maximum error in Blenderunits to allow - distance",
                             min=0, soft_min=0,
-                            default=0.0)
+                            default=0.0, precision=3)
     fcurves = []
 
     def draw(self, context):
         props = self.properties
         layout = self.layout
         col = layout.column()
-        #col.label('Mode:')
-        #col.prop(props, 'mode', expand=True)
+        col.label('Mode:')
+        col.prop(props, 'mode', expand=True)
         if self.properties.mode == 'distance':
             box = layout.box()
             box.label(props.mode, icon='ARROW_LEFTRIGHT')




More information about the Bf-extensions-cvs mailing list