def __init__(self):
        load_prc_file_data("", "win-size 512 512")
        load_prc_file_data("", "window-type offscreen")
        load_prc_file_data("", "model-cache-dir")
        load_prc_file_data("", "model-cache-textures #f")
        load_prc_file_data("", "textures-power-2 none")
        load_prc_file_data("", "alpha-bits 0")
        load_prc_file_data("", "print-pipe-types #f")

        # Construct render pipeline
        self.render_pipeline = RenderPipeline()
        self.render_pipeline.mount_mgr.config_dir = "config/"
        self.render_pipeline.set_empty_loading_screen()
        self.render_pipeline.create(self)

        self.setup_scene()

        # Disable model caching
        BamCache.get_global_ptr().cache_models = False

        self.update_queue = []
        self.start_listen()

        # Render initial frames
        for i in range(10):
            self.taskMgr.step()

        last_update = 0.0
        self.scene_node = None

        # Wait for updates
        while True:

            # Update once in a while
            curr_time = time.time()
            if last_update + 1.0 > curr_time:
                last_update = curr_time
                self.taskMgr.step()

            if self.update_queue:
                if self.scene_node:
                    self.scene_node.remove_node()

                # Only take the latest packet
                payload = self.update_queue.pop(0)
                print("RENDERING:", payload)

                scene = self.loader.loadModel(Filename.from_os_specific(payload["scene"]))

                for light in scene.find_all_matches("**/+PointLight"):
                    light.remove_node()
                for light in scene.find_all_matches("**/+Spotlight"):
                    light.remove_node()

                # Find camera
                main_cam = scene.find("**/Camera")
                if main_cam:
                    transform_mat = main_cam.get_transform(self.render).get_mat()
                    transform_mat = Mat4.convert_mat(CS_zup_right, CS_yup_right) * transform_mat
                    self.camera.set_mat(transform_mat)
                else:
                    print("WARNING: No camera found")
                    self.camera.set_pos(0, -3.5, 0)
                    self.camera.look_at(0, -2.5, 0)

                self.camLens.set_fov(64.0)

                self.scene_node = scene
                scene.reparent_to(self.render)

                # Render scene
                for i in range(8):
                    self.taskMgr.step()

                dest_path = Filename.from_os_specific(payload["dest"])
                print("Saving screenshot to", dest_path)
                self.win.save_screenshot(dest_path)
                self.notify_about_finish(int(payload["pingback_port"]))
dataset/ETHPy150Open tobspr/RenderPipeline/toolkit/render_service/service.py/Application.__init__/swapped operands of `>`