test_skeleton.py 文件源码

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

项目:cmt 作者: chadmv 项目源码 文件源码
def assert_hierarachies_match(self):
        self.assertEqual(7, len(cmds.ls(type='joint')))
        # Make sure the joint orients are the same
        translates = [cmds.getAttr('{0}.t'.format(x))[0] for x in cmds.ls(type='joint')]
        rotates = [cmds.getAttr('{0}.r'.format(x))[0] for x in cmds.ls(type='joint')]
        orients = [cmds.getAttr('{0}.jo'.format(x))[0] for x in cmds.ls(type='joint')]
        for orient, new_orient in zip(self.orients, orients):
            self.assertListAlmostEqual(orient, new_orient)
        for translate, new_translate in zip(self.translates, translates):
            self.assertListAlmostEqual(translate, new_translate)
        for rotate, new_rotate in zip(self.rotates, rotates):
            self.assertListAlmostEqual(rotate, new_rotate)
        # The geometry should not have been exported
        self.assertFalse(cmds.objExists(self.cube))
        self.assertTrue(cmds.objExists(self.group))
        self.assertEqual('joint1', cmds.listRelatives(self.group, children=True)[0])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号