def loadScene(self): self.progressBar.setValue(0) r = Renderer() r.setOnProgress(self.loadProgress) r.load("C:/work/scenes/vray/test/sphere.vrscene") r.save("C:/work/tmp/test/sphere.vrscene") r.close()
def run(self): if True: r = Renderer() r.setOnProgress(self.loadProgress) r.load("C:/work/scenes/vray/test/labo.vrscene") r.save("C:/work/tmp/test/labo.vrscene") r.close() else: for i in range(1, 101): self.loadProgress(None, "plop", i, 100) time.sleep(0.1) print "." * 80 print threading.current_thread()
r.start() r.waitForImageReady() ''' print "---" po = r.plugins[pn] print po.material print r.plugins[sn] po.setValueAsString('material', sn) print "---" ''' print "SAVE" r.save(out_path) print "CLOSE" r.close() ''' print "---" r2 = Renderer(renderMode='production') r2.load(out_path) print "---" ps = r2.plugins[pn] # ps.setValueAsString('material', sn) print ps.material print r2.plugins[sn] print "---" if do_render: