def apply(self, bone, json_obj, MhNoLocation):
# the dots in collada exported bone names are replaced with '_', check for data with that changed back
name = bone.name.replace("_", ".") if not self.haveDots else bone.name
if name in json_obj.data:
bone.matrix = Matrix(json_obj.data[name])
if MhNoLocation:
bone.location[0] = 0
bone.location[1] = 0
bone.location[2] = 0
# this operation every bone causes all matrices to be applied in one run
bpy.ops.pose.select_all(action='SELECT')
else:
print(name + ' bone not found coming from MH')
评论列表
文章目录