Browse Source

fix message when wrong data plugged into Armature Constraint target

Joseph Brandenburg 5 months ago
parent
commit
8e23e230c1
1 changed files with 5 additions and 1 deletions
  1. 5 1
      base_definitions.py

+ 5 - 1
base_definitions.py

@@ -901,7 +901,11 @@ class MantisNode:
         subtarget = ''; target = self.evaluate_input(input_name)
         if target:
             if not hasattr(target, "bGetObject"):
-                prRed(f"No {input_name} target found for {constraint_or_deformer.name} in {self} because there is no connected node, or node is wrong type")
+                if hasattr(constraint_or_deformer, 'name'):
+                    name = constraint_or_deformer.name
+                else:
+                    name = 'NAME NOT FOUND'
+                prRed(f"No {input_name} target found for {name} in {self} because there is no connected node, or node is wrong type")
                 return 
             if (isinstance(target.bGetObject(), PoseBone)):
                 subtarget = target.bGetObject().name