Browse Source

Added warnings to Armature Deform node execution

Joseph Brandenburg 9 months ago
parent
commit
7ea49c80ef
1 changed files with 3 additions and 1 deletions
  1. 3 1
      deformer_containers.py

+ 3 - 1
deformer_containers.py

@@ -112,7 +112,7 @@ class DeformerArmature:
                 elif ( isinstance(trace[i], InputExistingGeometryObject)):
                     if (ob := trace[i].bGetObject()).type == "ARMATURE":
                         return ob
-
+        raise RuntimeError(f"Cannot find armature for node {self}")
         return None
         #should do the trick...
 
@@ -167,6 +167,8 @@ class DeformerArmature:
             d = self.GetxForm().bGetObject().modifiers[mod_name]
         except KeyError:
             d = self.GetxForm().bGetObject().modifiers.new(mod_name, type='ARMATURE')
+        if d is None:
+            raise RuntimeError(f"Modifier was not created in node {self} -- the object is invalid.")
         self.bObject = d
         d.object = self.bGetParentArmature()
         props_sockets = {