Skip to content

Instantly share code, notes, and snippets.

@esetomo
Created June 16, 2018 10:45
Show Gist options
  • Save esetomo/6d4127546c79896056ce0553c7313f9f to your computer and use it in GitHub Desktop.
Save esetomo/6d4127546c79896056ce0553c7313f9f to your computer and use it in GitHub Desktop.
アークトラスちゃんでCats Blender PluginのFull Body Tracking Fixがエラーになるのを何とかするやつ
import bpy
bone_map = {
"Root_J_New": "Hips",
"Leg_L_J": "LeftLeg",
"Leg_R_J": "RightLeg",
"Hiza_L_J": "LeftKnee",
"Hiza_R_J": "RightKnee",
"Ashikubi_L_J": "LeftFoot",
"Ashikubi_R_J": "RightFoot",
"Koshi_1_J": "Spine",
"Koshi_2_J": "Chest",
"Neck_J": "Neck",
"Head_J": "Head",
"Sako_L_J": "LeftShoulder",
"Sako_R_J": "RightShoulder",
"Kata_L_J": "LeftArm",
"Kata_R_J": "RightArm",
"Hizi_L_J": "LeftElbow",
"Hizi_R_J": "RightElbow",
"Tekubi_L_J": "LeftHand",
"Tekubi_R_J": "RightHand"
}
armature = bpy.context.scene.objects['Armature']
for old_name, new_name in bone_map.items():
pb = armature.pose.bones.get(old_name)
if pb is None:
continue
pb.name = new_name
@esetomo
Copy link
Author

esetomo commented Jun 16, 2018

BlenderのTextビューで読み込んでRun ScriptすればCats Pluginが期待しているものにボーン名が変更されます。
map部分書き換えたら他のモデルでも行けるんじゃないかな

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment