Prechádzať zdrojové kódy

Fix: bFinalize TypeError on Blender 5.2 (bbone scale cleanup)

bFinalize clears the bbone driver-source properties by assigning scalar 0, relying on a ValueError fallback for the vector bbone_scalein/out. Blender 5.2 raises TypeError for a scalar assigned to a vector RNA property, so finalize dies after the rig is fully built. Widen the except; ValueError still covers older versions.
whalemenace 1 mesiac pred
rodič
commit
82a57aa680
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      xForm_nodes.py

+ 1 - 1
xForm_nodes.py

@@ -574,7 +574,7 @@ class xFormBone(xFormNode):
             for attr_name in props_sockets.keys():
                 try:
                     setattr(pb, attr_name, 0) # just clear it
-                except ValueError:
+                except (ValueError, TypeError): # Blender 5.2 raises TypeError for scalar -> vector
                     setattr(pb, attr_name, (1.0,1.0,1.0)) # scale needs to be set to 1