sync_pose.py 文件源码

python
阅读 15 收藏 0 点赞 0 评论 0

项目:community-plugins 作者: makehumancommunity 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号