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])
评论列表
文章目录