示例#1
0
 def test_basic_transform(self):
     transform, sphere = cmds.sphere()
     attr = transform + '.translateX'
     with ctx.attrs({attr: 1}) as original:
         self.assertEqual(original.get(attr), 0)
         self.assertEqual(cmds.getAttr(attr), 1)
     self.assertEqual(cmds.getAttr(attr), 0)
示例#2
0
 def test_basic_transform(self):
     transform, sphere = cmds.sphere()
     attr = transform + '.translateX'
     with ctx.attrs({attr: 1}) as original:
         self.assertEqual(original.get(attr), 0)
         self.assertEqual(cmds.getAttr(attr), 1) 
     self.assertEqual(cmds.getAttr(attr), 0)
示例#3
0
 def test_mutate_transform(self):
     transform, sphere = cmds.sphere()
     attr = transform + '.translateX'
     with ctx.attrs({attr: 1}) as original:
         original[attr] = 2
         self.assertEqual(cmds.getAttr(attr), 1)
     self.assertEqual(cmds.getAttr(attr), 2)
示例#4
0
 def test_mutate_transform(self):
     transform, sphere = cmds.sphere()
     attr = transform + '.translateX'
     with ctx.attrs({attr: 1}) as original:
         original[attr] = 2
         self.assertEqual(cmds.getAttr(attr), 1) 
     self.assertEqual(cmds.getAttr(attr), 2)