Browse Source

UI: warning for mantis error in GetCurvePoint

Joseph Brandenburg 5 months ago
parent
commit
280d1e531c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      misc_nodes.py

+ 4 - 1
misc_nodes.py

@@ -520,7 +520,10 @@ class UtilityGetCurvePoint(MantisNode):
     
     def bPrepare(self, bContext=None):
         import bpy
-        curve = bpy.data.objects.get(self.evaluate_input("Curve"))
+        my_curve=self.evaluate_input("Curve")
+        if my_curve is None:
+            raise RuntimeError(f"Error with curve name for {self}, {my_curve}")
+        curve = bpy.data.objects.get(my_curve)
         if not curve:
             raise RuntimeError(f"No curve found for {self}.")
         elif curve.type != "CURVE":