瀏覽代碼

Meta-Rig node: message for incorrect input

Joseph Brandenburg 5 月之前
父節點
當前提交
bbef914420
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      misc_nodes.py

+ 4 - 0
misc_nodes.py

@@ -719,7 +719,11 @@ class UtilityMetaRig(MantisNode):
         m = Matrix.Identity(4)
         
         meta_rig  = self.evaluate_input("Meta-Armature")
+        if meta_rig is None:
+            raise RuntimeError("Invalid input for Meta-Armature.")
         meta_bone = self.evaluate_input("Meta-Bone")
+        if meta_rig is None or meta_bone is None:
+            raise RuntimeError("Invalid input for Meta-Bone.")
         
         if meta_rig:
             if ( armOb := bpy.data.objects.get(meta_rig) ):