예제 #1
0
 def test_build(self):
     chron = ChronoRender()
     job = chron.createJob(self.infile)
     for robj in job._rndrdoc.renderables:
         print robj
     for rpass in job._rndrdoc.rndrpasses:
         print rpass
예제 #2
0
    def renderSimulations(self):
        md = self.verifyMetaData()
        frame = int(self.args['framenumber'])

        chron = ChronoRender()
        job = chron.createJob(md)
        job.typefilter = [Simulation]
        job.frames = [frame, frame]
        job.bOptions = False
        chron.runJob(job)
예제 #3
0
    def startDistributedJob(self):
        md = self.verifyMetaData()
        stream = self.args['renderer']
        frames = self.args['framerange']

        cr = ChronoRender()
        job = cr.createJob(md)
        job.frames = frames
        # prog = CRLocal()
        prog = CRenderLocal()
        cr.submitJob(job, prog)
예제 #4
0
    def startLocalRenderJob(self):
        md = self.verifyMetaData()
        stream = self.args["renderer"]
        frange = self.args["framerange"]

        # why does cr get what acts like a ChronoRenderBase object
        # instead of a ChronoRender object???? (from cr_base not cr.py)
        # ANSWER: it calles /light/cr.py's CHronRender which extends
        # ChronoRenderBase
        cr = ChronoRender()
        job = cr.createJob(md, frange, stream)
        # job.frames = frange
        # print "startLocalRenderJob job.stream = " + job.stream
        cr.runRenderJob(job)
예제 #5
0
class DataObjectTestCase(unittest.TestCase):
    def setUp(self):
        self._factories = ChronoRender().getFactories(dat.DataObject.getTypeName())

    def tearDown(self):
        del self._factories

    def test_build(self):
        meta = md.MetaData('./input/metadata/yaml/1.yaml')
        ddata = meta.listFromType(dat.DataObject)
        self.assertTrue(len(ddata) > 0)

        for data in ddata:
            dobj = self._factories.build(dat.DataObject.getTypeName(), **data)
            self.assertTrue(len(dobj._datasrcs) > 0)
            self.assertTrue(len(dobj._dataprocs) > 0)

    def test_multipleResources(self):
        cr = ChronoRender()
        meta = md.MetaData('./input/metadata/yaml/1.yaml')
        args = meta.singleFromType(dat.DataObject)
        dataobj = dat.DataObject(cr._factories, **args)
        dataobj._resolveSources()

        poses = []
        for i in range(0, 3):
            for row in dataobj.getData(i):
                poses.append(row['pos_x'])
        self.assertTrue(0.0 in poses)
        self.assertTrue(1.0 in poses)
        self.assertTrue(2.0 in poses)

    def test_datasrcScript(self):
        cr = ChronoRender()
        meta = md.MetaData('./input/metadata/yaml/datasrc_script.yml')
        args = meta.singleFromType(dat.DataObject)
        dataobj = dat.DataObject(cr._factories, **args)
        finder = FinderFactory.build(['./input'])
        dataobj.resolveAssets(finder)

        poses = []
        for i in range(0, 3):
            for row in dataobj.getData(i):
                poses.append(row['pos_x'])
        self.assertTrue(0.0 in poses)
        self.assertTrue(1.0 in poses)
        self.assertTrue(2.0 in poses)
예제 #6
0
class ChronoRenderTestCase(unittest.TestCase):
    def setUp(self):
        self._cr = ChronoRender()

    def tearDown(self):
        del self._cr

    def test_create(self):
        self.assertTrue(True)
    # def test_createAndRunRenderJob(self):
        # inxml = './input/metadata/xml/0.xml'

        # self._cr.createAndRunRenderJob(inxml)

    def test_FactoryClasses(self):
        factories = self._cr.getFactories()
        fact = factories.getFactory('datasource')

        for cls in fact.getClasses():
            print cls, cls.getTypeName()
예제 #7
0
 def setUp(self):
     cr = ChronoRender()
     self._factories = cr.getFactories(dp.DataProcess.getTypeName())
     self._srcfactories = cr.getFactories(ds.DataSource.getTypeName())
예제 #8
0
 def setUp(self):
     self._cr = ChronoRender()
예제 #9
0
 def initNewRenderJob(self):
     cr = ChronoRender()
     job = cr.createJob()
     cr.writeJobToDisk(job, self.args['outpath'])
예제 #10
0
 def updateJobAssets(self):
     md = self.verifyMetaData()
     cr = ChronoRender()
     job = cr.createJob(md)
     cr.updateJobAssets(job)
예제 #11
0
 def _createGeoFactories():
     cr = ChronoRender()
     factories = cr.getFactories()
     fact = factories.getFactory('geometry')
     return fact
예제 #12
0
 def setUp(self):
     self._factories = ChronoRender().getFactories(dat.DataObject.getTypeName())