Ejemplo n.º 1
0
Archivo: engine.py Proyecto: JuhaW/vb30
    def view_update(self, context):
        global zmq_backend

        self.debug("VRayRendererRT::view_update()")

        exporter = context.scene.vray.Exporter
        self.zmq_should_start = exporter.backend == 'ZMQ' and exporter.backend_worker == 'LOCAL'

        if self.zmq_should_start and not zmq_backend or zmq_backend and zmq_backend.poll() is not None:
            executable_path = SysUtils.GetZmqPath()
            if not executable_path or not os.path.exists(executable_path):
                self.debug("Can't find V-Ray ZMQ Server!")
            else:
                port = str(context.scene.vray.Exporter.zmq_port)
                zmq_backend = subprocess.Popen([executable_path, "-p", port])

        if not self.exporter:
            self.exporter = _vray_for_blender_rt.init(context.as_pointer(),
                self.as_pointer(),
                context.blend_data.as_pointer(),
                context.scene.as_pointer(),
                context.region.as_pointer(),
                context.space_data.as_pointer(),
                context.region_data.as_pointer()
            )
            _vray_for_blender_rt.export(self.exporter)

        if self.exporter:
            _vray_for_blender_rt.update(self.exporter)
Ejemplo n.º 2
0
    def view_update(self, context):
        self.debug("VRayRendererRT::view_update()")
        if not self.exporter:
            self.exporter = _vray_for_blender_rt.init(context.as_pointer(),
                self.as_pointer(),
                context.blend_data.as_pointer(),
                context.scene.as_pointer(),
                context.region.as_pointer(),
                context.space_data.as_pointer(),
                context.region_data.as_pointer()
            )
            _vray_for_blender_rt.export(self.exporter)

        if self.exporter:
            _vray_for_blender_rt.update(self.exporter)