Add ignored folder

This commit is contained in:
2024-08-01 13:45:19 +02:00
parent 0e19f20200
commit a2e4bacb16
16 changed files with 797 additions and 2 deletions
+39
View File
@@ -0,0 +1,39 @@
import bpy
from .bones_pose import *
from .bones_data import *
from ..definitions import naming
def get_mixamo_prefix():
p = ""
rig = bpy.context.active_object
if 'mixamo_prefix' in rig.data.keys():
p = rig.data["mixamo_prefix"]
else:
for dbone in rig.data.bones:
if dbone.name.startswith("mixamorig") and ':' in dbone.name:
p = dbone.name.split(':')[0]+':'
break
try:
rig.data["mixamo_prefix"] = p
except:# context error
pass
return p
def get_mix_name(name, use_prefix):
if not use_prefix:
return name
else:
p = get_mixamo_prefix()
return p+name
def get_bone_side(bone_name):
if bone_name.endswith("_Left"):
return "Left"
elif bone_name.endswith("_Right"):
return "Right"