fix pointers

fix pointers in operators to point to class bl_idname property
This commit is contained in:
989onan
2025-04-02 20:35:59 -04:00
parent e4d3f676a2
commit 5cad28a41b
14 changed files with 103 additions and 63 deletions
+14
View File
@@ -495,6 +495,20 @@ def fix_zero_length_bones(armature: Object) -> None:
bone.length = 0.001
bpy.ops.object.mode_set(mode='OBJECT')
def remove_unused_vertex_groups(mesh: Object) -> None:
"""Remove vertex groups with no weights"""
for vg in mesh.vertex_groups:
has_weights: bool = False
for vert in mesh.data.vertices:
for group in vert.groups:
if group.group == vg.index and group.weight > 0.001:
has_weights = True
break
if has_weights:
break
if not has_weights:
mesh.vertex_groups.remove(vg)
def calculate_bone_orientation(mesh: Object, vertices: List[Any]) -> Tuple[Vector, float]:
"""Calculate optimal bone orientation based on mesh geometry"""
if not vertices: