소스 검색

UI: warning for mantis error in GetCurvePoint

Joseph Brandenburg 5 달 전
부모
커밋
280d1e531c
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  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":