예제 #1
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreatePrimitive5(self):
     count = 5000
     commands = [(1.0, revl.createPrimitive, (), {
         'parent': True,
         'forceTransformCreation': False
     })]
     revl.run(commands, count)
예제 #2
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreateTransform1(self):
     count = 5000
     commands = [(
         1.0,
         revl.createTransform,
     )]
     revl.run(commands, count)
예제 #3
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreatePrimitive1(self):
     count = 5000
     commands = [(
         1.0,
         revl.createPrimitive,
     )]
     revl.run(commands, count)
예제 #4
0
파일: test_main.py 프로젝트: jonike/revl
    def testRun7(self):
        commands = [
            [0, incrementA],
            [-1.23, incrementB],
        ]
        self.assertTrue(revl.validate(commands))

        context = revl.run(commands, 123)
        self.assertIsInstance(context, revl.Context)
예제 #5
0
파일: test_main.py 프로젝트: jonike/revl
    def testRun2(self):
        commands = [
            (1.0, incrementA),
            (0.0, incrementB),
        ]
        self.assertTrue(revl.validate(commands))

        context = revl.run(commands, 123)
        self.assertIsInstance(context, revl.Context)
        self.assertEqual(globalA, 123)
        self.assertEqual(globalB, 0)
예제 #6
0
파일: test_main.py 프로젝트: jonike/revl
    def testRun4(self):
        global globalA, globalB
        commands = [
            (2.34, incrementA),
            (1.23, incrementB),
        ]
        self.assertTrue(revl.validate(commands))

        aValues = []
        bValues = []
        for _ in range(123):
            globalA = 0
            globalB = 0
            context = revl.run(commands, 123, seed=1.23)
            self.assertIsInstance(context, revl.Context)
            aValues.append(globalA)
            bValues.append(globalB)

        self.assertTrue(all(a == globalA for a in aValues))
        self.assertTrue(all(b == globalB for b in bValues))
예제 #7
0
 def setUpClass(cls):
     OpenMaya.MFileIO.newFile(True)
     revl.run(benchmarks._preset.DEEP, 10000, seed=1.23)
예제 #8
0
파일: test_main.py 프로젝트: jonike/revl
    def testRun6(self):
        commands = []
        self.assertTrue(revl.validate(commands))

        context = revl.run(commands, 123, context=revl.Context())
        self.assertIsInstance(context, revl.Context)
예제 #9
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreateTransform3(self):
     count = 5000
     commands = [(1.0, revl.createTransform, (), {'parent': True})]
     revl.run(commands, count)
예제 #10
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreateTransform2(self):
     count = 5000
     commands = [(1.0, revl.createTransform, (), {'name': 'xform'})]
     revl.run(commands, count)
예제 #11
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreatePrimitive4(self):
     count = 5000
     commands = [(1.0, revl.createPrimitive, (), {'parent': True})]
     revl.run(commands, count)
예제 #12
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreatePrimitive3(self):
     count = 5000
     commands = [(1.0, revl.createPrimitive, (), {'name': 'primitive'})]
     revl.run(commands, count)
예제 #13
0
파일: bench_main.py 프로젝트: jonike/revl
 def benchCreatePrimitive2(self):
     count = 5000
     commands = [(1.0, revl.createPrimitive, (), {
         'type': revl.PrimitiveType.POLY_CUBE
     })]
     revl.run(commands, count)
 def setUpClass(cls):
     OpenMaya.MFileIO.newFile(True)
     revl.run(benchmarks._preset.DEEP, 10000, seed=1.23)