def main(): root = None start_time = Blender.sys.time() gui.debug(1, "started", SCRIPT) call_baker = False try: root = gui.ModalRoot() app = GuiApp(root) app.redraw() root.mainloop() call_baker = app.doBake root.destroy() if gui.platform == "darwin": os.system( '''/usr/bin/osascript -e 'tell app "System Events" to activate process "Blender"' ''' ) except: if root: root.grab_release() root.quit() root.destroy() raise if call_baker: app = BakeApp() app.bake() gui.debug(1, "ended in %.4f sec." % \ (Blender.sys.time() - start_time), SCRIPT)
def bake(): app = BakeApp() app.bake()
def main(): app = BakeApp() app.bake()