示例#1
0
 def execute(self, context):
     splRes = context.scene.curvetools.SplineResolution
     selCurves = Util.GetSelectedCurves()
     
     for blCurve in selCurves:
         for spline in blCurve.data.splines:
             spline.resolution_u = splRes
     
     return {'FINISHED'}
示例#2
0
 def execute(self, context):
     threshold = context.scene.curvetools.SplineRemoveLength
     selCurves = Util.GetSelectedCurves()
     
     for blCurve in selCurves:
         curve = Curves.Curve(blCurve)
         nrSplines = curve.nrSplines
         
         nrRemovedSplines = curve.RemoveShortSplines(threshold)
         if nrRemovedSplines > 0: curve.RebuildInScene()
         
         self.report({'INFO'}, "Removed %d of %d splines" % (nrRemovedSplines, nrSplines))
     
     return {'FINISHED'}
示例#3
0
 def execute(self, context):
     selCurves = Util.GetSelectedCurves()
     
     for blCurve in selCurves:
         curve = Curves.Curve(blCurve)
         nrSplines = curve.nrSplines
         
         threshold = context.scene.curvetools.SplineJoinDistance
         startEnd = context.scene.curvetools.SplineJoinStartEnd
         mode = context.scene.curvetools.SplineJoinMode
         
         nrJoins = curve.JoinNeighbouringSplines(startEnd, threshold, mode)
         if nrJoins > 0: curve.RebuildInScene()
         
         self.report({'INFO'}, "Applied %d joins on %d splines; resulting nrSplines: %d" % (nrJoins, nrSplines, curve.nrSplines))
     
     return {'FINISHED'}
示例#4
0
 def execute(self, context):
     selCurves = Util.GetSelectedCurves()
     
     for blCurve in selCurves:
         curve = Curves.Curve(blCurve)
         nrSplines = curve.nrSplines
         
         splinesToRemove = []
         for spline in curve.splines:
             if len(spline.segments) < 1: splinesToRemove.append(spline)
         nrRemovedSplines = len(splinesToRemove)    
             
         for spline in splinesToRemove: curve.splines.remove(spline)
         
         if nrRemovedSplines > 0: curve.RebuildInScene()
         
         self.report({'INFO'}, "Removed %d of %d splines" % (nrRemovedSplines, nrSplines))
     
     return {'FINISHED'}