Exemplo n.º 1
0
 def test_create_curve_new_reg_node(self):
     reg_node, cnt = control.create_curve(name='temp',
                                          typ='circle',
                                          scale=3.0,
                                          color='light_blue')
     for s in cnt.getShapes():
         self.assertEqual(s.overrideColor.get(), 6)
     self.assertEqual(reg_node.temp.listConnections()[0], cnt)
     self.assertTrue(isinstance(cnt, pm.nt.Transform))
     self.assertTrue(isinstance(cnt.getShape(), pm.nt.NurbsCurve))
Exemplo n.º 2
0
 def test_create_curve_existing_reg_node(self):
     reg_node = pm.group(empty=1)
     reg_node.addAttr('version', dt="string")
     reg_node.addAttr('reg_node', dt="string")
     reg_node2, cnt = control.create_curve(name='temp',
                                           typ='circle',
                                           scale=3.0,
                                           color='light_blue',
                                           reg_node=reg_node)
     for s in cnt.getShapes():
         self.assertEqual(s.overrideColor.get(), 6)
     self.assertEqual(reg_node, reg_node2)
     self.assertEqual(reg_node.temp.listConnections()[0], cnt)
     self.assertTrue(isinstance(cnt, pm.nt.Transform))
     self.assertTrue(isinstance(cnt.getShape(), pm.nt.NurbsCurve))