def test_execute_component_with_array_of_containers(self):
data = {
'spheres': [
{'sphere_name': 'sphere1', 'radius': 2.5},
{'sphere_name': 'sphere2', 'radius': 5.0},
]
}
comp = ContainerComponent()
comp.set_data(data)
comp.execute()
self.assertTrue(cmds.objExists('sphere1'))
self.assertEqual(2.5, cmds.getAttr('polySphere1.radius'))
self.assertTrue(cmds.objExists('sphere2'))
self.assertEqual(5.0, cmds.getAttr('polySphere2.radius'))
评论列表
文章目录