|
@@ -24,6 +24,7 @@ def TellClasses():
|
|
|
UtilityMatrixFromCurve,
|
|
UtilityMatrixFromCurve,
|
|
|
UtilityMatricesFromCurve,
|
|
UtilityMatricesFromCurve,
|
|
|
UtilityNumberOfCurveSegments,
|
|
UtilityNumberOfCurveSegments,
|
|
|
|
|
+ UtilityNumberOfSplines,
|
|
|
UtilityMatrixFromCurveSegment,
|
|
UtilityMatrixFromCurveSegment,
|
|
|
UtilityGetCurvePoint,
|
|
UtilityGetCurvePoint,
|
|
|
UtilityGetNearestFactorOnCurve,
|
|
UtilityGetNearestFactorOnCurve,
|
|
@@ -471,7 +472,6 @@ class UtilityNumberOfCurveSegments(MantisNode):
|
|
|
self.node_type = "UTILITY"
|
|
self.node_type = "UTILITY"
|
|
|
|
|
|
|
|
def bPrepare(self, bContext = None,):
|
|
def bPrepare(self, bContext = None,):
|
|
|
- import bpy
|
|
|
|
|
curve_name = self.evaluate_input("Curve")
|
|
curve_name = self.evaluate_input("Curve")
|
|
|
curve = bpy_object_get_guarded( curve_name, self)
|
|
curve = bpy_object_get_guarded( curve_name, self)
|
|
|
spline = curve.data.splines[self.evaluate_input("Spline Index")]
|
|
spline = curve.data.splines[self.evaluate_input("Spline Index")]
|
|
@@ -482,6 +482,18 @@ class UtilityNumberOfCurveSegments(MantisNode):
|
|
|
self.prepared = True
|
|
self.prepared = True
|
|
|
self.executed = True
|
|
self.executed = True
|
|
|
|
|
|
|
|
|
|
+class UtilityNumberOfSplines(MantisNode):
|
|
|
|
|
+ def __init__(self, signature, base_tree):
|
|
|
|
|
+ super().__init__(signature, base_tree, NumberOfSplinesSockets)
|
|
|
|
|
+ self.init_parameters()
|
|
|
|
|
+ self.node_type = "UTILITY"
|
|
|
|
|
+
|
|
|
|
|
+ def bPrepare(self, bContext = None,):
|
|
|
|
|
+ curve_name = self.evaluate_input("Curve")
|
|
|
|
|
+ curve = bpy_object_get_guarded( curve_name, self)
|
|
|
|
|
+ self.parameters["Number of Splines"] = len(curve.data.splines)
|
|
|
|
|
+ self.prepared, self.executed = True, True
|
|
|
|
|
+
|
|
|
class UtilityMatrixFromCurveSegment(MantisNode):
|
|
class UtilityMatrixFromCurveSegment(MantisNode):
|
|
|
def __init__(self, signature, base_tree):
|
|
def __init__(self, signature, base_tree):
|
|
|
super().__init__(signature, base_tree, MatrixFromCurveSegmentSockets)
|
|
super().__init__(signature, base_tree, MatrixFromCurveSegmentSockets)
|