def _print_cursor_position(self): @asyncio.coroutine def determine_and_print(): xyz = yield from self._determine_cursor_position() if xyz is not None: x, y, z = xyz logger.debug('Position under cursor: x={}\ty={}\tz={}'.format(x, y, z)) support.wrap_exc(determine_and_print())
def _print_cursor_position(self): @asyncio.coroutine def determine_and_print(): xyz = yield from self._determine_cursor_position() if xyz is not None: x, y, z = xyz logger.debug('Position under cursor: x={}\ty={}\tz={}'.format( x, y, z)) support.wrap_exc(determine_and_print())
def _on_drop(self, window, paths): @asyncio.coroutine def read_and_register(path): logger.debug('Reading data... {}'.format(path)) points = yield from self._io_async_executor.map(points_cloud.load_ply, path) self.add_points_cloud(points) logger.debug('Data loaded! ({} points) {}'.format(len(points.verts), path)) for path in paths: path = path.decode('utf-8') if not path.endswith('.ply'): logger.warn('Drag & drop for unsupported extension! {}'.format(path)) continue support.wrap_exc(asyncio.async(read_and_register(path)), logger)