Add digitgrade legs tool

This commit is contained in:
989onan
2024-07-24 17:41:17 -04:00
parent 97e44f7420
commit ce7c6aa664
4 changed files with 132 additions and 2 deletions
+11
View File
@@ -57,3 +57,14 @@ def get_armature(context, armature_name=None) -> Optional[Object]:
if obj.type == "ARMATURE":
return obj
return next((obj for obj in context.view_layer.objects if obj.type == 'ARMATURE'), None)
def duplicatebone(b: bpy.types.EditBone) -> bpy.types.EditBone:
arm = bpy.context.object.data
cb = arm.edit_bones.new(b.name)
cb.head = b.head
cb.tail = b.tail
cb.matrix = b.matrix
cb.parent = b.parent
return cb