This repository was archived by the owner on May 9, 2025. It is now read-only.
File tree 2 files changed +10
-5
lines changed 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 6
6
"name" : "Curve Tools" ,
7
7
"description" : "Adds some functionality for bezier/nurbs curve/surface modeling" ,
8
8
"author" : "Mackraken, Spivak Vladimir (cwolf3d)" ,
9
- "version" : (0 , 4 , 5 ),
9
+ "version" : (0 , 4 , 6 ),
10
10
"blender" : (2 , 80 , 0 ),
11
11
"location" : "View3D > Tool Shelf > Edit Tab" ,
12
12
"doc_url" : "{BLENDER_MANUAL_URL}/addons/add_curve/curve_tools.html" ,
Original file line number Diff line number Diff line change @@ -52,18 +52,23 @@ def execute(self, context):
52
52
class OperatorCurveLength (bpy .types .Operator ):
53
53
bl_idname = "curvetools.operatorcurvelength"
54
54
bl_label = "Length"
55
- bl_description = "Calculates the length of the active/selected curve "
55
+ bl_description = "Calculates the length of the active/selected curves "
56
56
57
57
58
58
@classmethod
59
59
def poll (cls , context ):
60
- return util .Selected1Curve ()
60
+ return util .Selected1OrMoreCurves ()
61
61
62
62
63
63
def execute (self , context ):
64
- curve = curves .Curve (context .active_object )
64
+ selCurves = util .GetSelectedCurves ()
65
+
66
+ length = 0
67
+ for blCurve in selCurves :
68
+ curve = curves .Curve (blCurve )
69
+ length += curve .length
65
70
66
- context .scene .curvetools .CurveLength = curve . length
71
+ context .scene .curvetools .CurveLength = length
67
72
68
73
return {'FINISHED' }
69
74
You can’t perform that action at this time.
0 commit comments