- # if ORG-face is not a child of DEF-spine.006, parent it
- # TODO: this ought to be done on import!
- if reparent_face:
- print("Reparenting face bone to head bone")
- _reparent_face()
-
-
-func _reparent_face() -> void:
- var face_idx = find_bone("ORG-face")
- var head_idx = find_bone("DEF-spine.005")
- if face_idx > -1 and head_idx > -1:
- set_bone_enabled(face_idx, false)
- set_bone_parent(face_idx, head_idx)
- set_bone_rest(face_idx, get_bone_rest(head_idx))
- set_bone_pose(face_idx, get_bone_pose(head_idx))
- else:
- printerr("Couldn't find face and head bones")
-