Created
June 16, 2018 10:45
-
-
Save esetomo/6d4127546c79896056ce0553c7313f9f to your computer and use it in GitHub Desktop.
アークトラスちゃんでCats Blender PluginのFull Body Tracking Fixがエラーになるのを何とかするやつ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BlenderのTextビューで読み込んでRun ScriptすればCats Pluginが期待しているものにボーン名が変更されます。
map部分書き換えたら他のモデルでも行けるんじゃないかな