def _export_screenshot_dialog_callback(dialog, response_id, data): file_name, out_folder, file_type_combo, frame = data if response_id == Gtk.ResponseType.YES: vcodec = _img_types[file_type_combo.get_active()] ext = _img_extensions[file_type_combo.get_active()] render_path = userfolders.get_hidden_screenshot_dir_path() + "screenshot_%01d." + ext rendered_file_path = userfolders.get_hidden_screenshot_dir_path() + "screenshot_1." + ext out_file_path = out_folder.get_filename()+ "/" + file_name.get_text() + "." + ext dialog.destroy() render_screen_shot(frame, render_path, vcodec) shutil.copyfile(rendered_file_path, out_file_path) else: dialog.destroy() purge_screenshots() PLAYER().seek_frame(frame)
def _export_screenshot_dialog_callback(dialog, response_id, data): file_name, out_folder, file_type_combo, frame = data if response_id == Gtk.ResponseType.YES: vcodec = _img_types[file_type_combo.get_active()] ext = _img_extensions[file_type_combo.get_active()] render_path = userfolders.get_hidden_screenshot_dir_path() + "screenshot_%01d." + ext rendered_file_path = userfolders.get_hidden_screenshot_dir_path() + "screenshot_1." + ext out_file_path = out_folder.get_filename()+ "/" + file_name.get_text() + "." + ext dialog.destroy() render_screen_shot(frame, render_path, vcodec) shutil.copyfile(rendered_file_path, out_file_path) else: dialog.destroy() purge_screenshots() PLAYER().seek_frame(frame)
def purge_screenshots(): d = userfolders.get_hidden_screenshot_dir_path() for f in os.listdir(d): os.remove(os.path.join(d, f))
def get_displayed_image_path(): return userfolders.get_hidden_screenshot_dir_path() + "screenshot_1.png"
def purge_screenshots(): d = userfolders.get_hidden_screenshot_dir_path() for f in os.listdir(d): os.remove(os.path.join(d, f))
def get_displayed_image_path(): return userfolders.get_hidden_screenshot_dir_path() + "screenshot_1.png"