X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=swig%2Fenglishmap.py;h=301f3bca147a53a318aa025ef04fbdf8975b9568;hb=59248f7c8ad435bb5b52e22b8186413350ce31ec;hp=a17380e8fa4fb567fce240c677224bc92085efd6;hpb=692ea38238c7d5f4199734b3941a2fcc7bd19f57;p=meshio%2Fmeshio.git diff --git a/swig/englishmap.py b/swig/englishmap.py index a17380e..301f3bc 100644 --- a/swig/englishmap.py +++ b/swig/englishmap.py @@ -1,10 +1,13 @@ #!/usr/bin/env python # coding: utf8 +""" +日本語名との変換マップ +""" import sys -############################################################################### -# 日本語名との変換マップ -############################################################################### +""" +ボーン名変換 +""" boneMap=[ ("center", "センター", 1), ("upper body", "上半身"), @@ -157,6 +160,16 @@ boneMap=[ ("arm twist1_R_t", "右腕捩1先"), ("arm twist2_R_t", "右腕捩2先"), ("arm twist3_R_t", "右腕捩3先"), + +# 追加ボーン +("root", "全ての親"), +("root_t", "全ての親先"), +("group", "グループ"), +("group_t", "グループ先"), +("front_shirt_L", "左シャツ前"), +("front_shirt_R", "右シャツ前"), +("back_shirt_L", "左シャツ後"), +("back_shirt_R", "右シャツ後"), ] def getEnglishBoneName(name): for v in boneMap: @@ -173,6 +186,9 @@ def getUnicodeBoneName(name): if v[0]==name: return v +""" +モーフ名変換 +""" skinMap=[ ("base", "base", 0), ("serious", "真面目", 1), @@ -216,6 +232,32 @@ def getUnicodeSkinName(name): if v[0]==name: return v +""" +ボーングループ名変換 +""" +boneGroupMap=[ + ("IK", "IK"), + ("Body[u]", "体(上)"), + ("Hair", "髪"), + ("Arms", "腕"), + ("Fingers", "指"), + ("Body[l]", "体(下)"), + ("Legs", "足"), + ] +def getEnglishBoneGroupName(name): + for v in boneGroupMap: + if v[1]==name: + return v[0] + +def getUnicodeBoneGroupName(name): + for v in boneGroupMap: + if v[0]==name: + return v[1] + + +############################################################################### +# blender2.4 str to unicode +############################################################################### if sys.version_info[0]<3: print('convert boneMap and skinMap to unicode...') # python2.x