예제 #1
0
def render(scene, filename):
    scheduler = Scheduler.getInstance()
    for i in range(multiprocessing.cpu_count()):
        scheduler.registerWorker(LocalWorker(i, "wrk{}".format(i)))
    scheduler.start()

    queue = RenderQueue()
    scene.setDestinationFile(filename)
    job = RenderJob("myRenderJob", scene, queue)
    job.start()
    queue.waitLeft(0)
    queue.join()
    print(Statistics.getInstance().getStats())
예제 #2
0
def render(scene, filename):
    scheduler = Scheduler.getInstance()
    for i in range(multiprocessing.cpu_count()):
        scheduler.registerWorker(LocalWorker(i, "wrk{}".format(i)))
    scheduler.start()

    queue = RenderQueue()
    scene.setDestinationFile(filename)
    job = RenderJob("myRenderJob", scene, queue)
    job.start()
    queue.waitLeft(0)
    queue.join()
    print(Statistics.getInstance().getStats())
예제 #3
0
    def __run_mitsuba(self):
        self.mitsuba_scene.configure()

        scheduler = Scheduler.getInstance()
        for i in range(multiprocessing.cpu_count()):
            scheduler.registerWorker(LocalWorker(i, "worker_{}".format(i)))
        scheduler.start()

        queue = RenderQueue()
        self.mitsuba_scene.setDestinationFile(self.image_name)

        job = RenderJob("render job: {}".format(self.image_name),
                        self.mitsuba_scene, queue)
        job.start()

        queue.waitLeft(0)
        queue.join()

        print(Statistics.getInstance().getStats())
        scheduler.stop()