hkb_editor.workflows.mirror_skeleton
¶
auto_mirror_bones
¶
auto_mirror_bones(bones: list[str]) -> dict[int, str]
Guess each bone's mirror from its L_/R_ or _L/_R affix.
Returns a mapping of bone index to mirror bone name, leaving out bones with no recognizable affix or no existing counterpart.
bone_pairs_to_csv
¶
bone_pairs_to_csv(
bones: list[str], mirrors: list[str]
) -> str
Render the pairings as CSV with index, bone, mirror index, mirror bone.
update_bone_pair_map
¶
update_bone_pair_map(
mirror_info: HkbRecord,
bones: list[str],
mirrors: list[str],
) -> None
Write the mirror pairings into a hkbMirroredSkeletonInfo.
mirrors holds the mirror bone name for each index of bones.
Raises ValueError naming the offending entry if a name is unknown.