def launch_phantom(): respaths.PHANTOM_JAR if _phantom_found == False: info_row = guiutils.get_centered_box([Gtk.Label(_("Phantom2D tool has not been installed on your system."))]) link_info_row = guiutils.get_centered_box([Gtk.Label(_("Install instructions:"))]) link = Gtk.LinkButton.new("https://github.com/jliljebl/phantom2D") link_row = guiutils.get_centered_box([link]) dir_info_row = guiutils.get_centered_box([Gtk.Label(_("Install directory for Phantom2D tool:"))]) dir_label = Gtk.Label(respaths.PHANTOM_JAR.rstrip("/Phantom2D.jar")) dir_label.set_selectable(True) dir_row = guiutils.get_centered_box([Gtk.Label(respaths.PHANTOM_JAR.rstrip("/Phantom2D.jar"))]) dir_row.set_margin_top(8) panel = Gtk.VBox() panel.pack_start(info_row, False, False, 0) panel.pack_start(guiutils.pad_label(12, 24), False, False, 0) panel.pack_start(link_info_row, False, False, 0) panel.pack_start(link_row, False, False, 0) panel.pack_start(guiutils.pad_label(12, 24), False, False, 0) panel.pack_start(dir_info_row, False, False, 0) panel.pack_start(dir_row, False, False, 0) dialogutils.panel_ok_dialog(_("Phantom2D not found"), panel) return FLOG = open(userfolders.get_cache_dir() + "log_phantom", 'w') subprocess.Popen([str(respaths.LAUNCH_DIR + "flowbladephantom") + " " + str(respaths.PHANTOM_JAR) \ + " profile" + " " + _get_underscored_profile() \ + " cachefolder " + userfolders.get_cache_dir() + appconsts.PHANTOM_DIR + "/" + appconsts.PHANTOM_DISK_CACHE_DIR], shell=True, stdin=FLOG, stdout=FLOG, stderr=FLOG) print "Phantom2D launched"
def _show_paths(media_asset): orig_path_label = Gtk.Label(label=_("<b>Original path:</b> ")) orig_path_label.set_use_markup(True) orig_path = guiutils.get_left_justified_box([orig_path_label, Gtk.Label(label=media_asset.orig_path)]) relink_path_label = Gtk.Label(label=_("<b>Relink path:</b> ")) relink_path_label.set_use_markup(True) relink_path = guiutils.get_left_justified_box([relink_path_label, Gtk.Label(label=media_asset.relink_path)]) panel = Gtk.VBox() panel.pack_start(orig_path, False, False, 0) panel.pack_start(guiutils.pad_label(12, 12), False, False, 0) panel.pack_start(relink_path, False, False, 0) dialogutils.panel_ok_dialog("Media Asset Paths", panel)
def _show_paths(media_asset): orig_path_label = gtk.Label(_("<b>Original path:</b> ")) orig_path_label.set_use_markup(True) orig_path = guiutils.get_left_justified_box([orig_path_label, gtk.Label(media_asset.orig_path)]) relink_path_label = gtk.Label(_("<b>Relink path:</b> ")) relink_path_label.set_use_markup(True) relink_path = guiutils.get_left_justified_box([relink_path_label, gtk.Label(media_asset.relink_path)]) panel = gtk.VBox() panel.pack_start(orig_path, False, False, 0) panel.pack_start(guiutils.pad_label(12, 12), False, False, 0) panel.pack_start(relink_path, False, False, 0) dialogutils.panel_ok_dialog("Media Asset Paths", panel)
def show_render_properties_panel(render_item): if render_item.render_data.user_args == False: enc_opt = renderconsumer.encoding_options[render_item.render_data.enc_index] enc_desc = enc_opt.name audio_desc = enc_opt.audio_desc quality_opt = enc_opt.quality_options[render_item.render_data.quality_index] quality_desc = quality_opt.name else: enc_desc = " -" quality_desc = " -" audio_desc = " -" user_args = str(render_item.render_data.user_args) start_frame, end_frame, wait_for_stop_render = get_render_range(render_item) start_str = utils.get_tc_string_with_fps(start_frame, render_item.render_data.fps) end_str = utils.get_tc_string_with_fps(end_frame, render_item.render_data.fps) LEFT_WIDTH = 200 render_item.get_display_name() row0 = guiutils.get_two_column_box(guiutils.bold_label(_("Encoding:")), Gtk.Label(label=enc_desc), LEFT_WIDTH) row1 = guiutils.get_two_column_box(guiutils.bold_label(_("Quality:")), Gtk.Label(label=quality_desc), LEFT_WIDTH) row2 = guiutils.get_two_column_box(guiutils.bold_label(_("Audio Encoding:")), Gtk.Label(label=audio_desc), LEFT_WIDTH) row3 = guiutils.get_two_column_box(guiutils.bold_label(_("Use User Args:")), Gtk.Label(label=user_args), LEFT_WIDTH) row4 = guiutils.get_two_column_box(guiutils.bold_label(_("Start:")), Gtk.Label(label=start_str), LEFT_WIDTH) row5 = guiutils.get_two_column_box(guiutils.bold_label(_("End:")), Gtk.Label(label=end_str), LEFT_WIDTH) row6 = guiutils.get_two_column_box(guiutils.bold_label(_("Frames Per Second:")), Gtk.Label(label=str(render_item.render_data.fps)), LEFT_WIDTH) row7 = guiutils.get_two_column_box(guiutils.bold_label(_("Render Profile Name:")), Gtk.Label(label=str(render_item.render_data.profile_name)), LEFT_WIDTH) row8 = guiutils.get_two_column_box(guiutils.bold_label(_("Render Profile:")), Gtk.Label(label=render_item.render_data.profile_desc), LEFT_WIDTH) vbox = Gtk.VBox(False, 2) vbox.pack_start(Gtk.Label(label=render_item.get_display_name()), False, False, 0) vbox.pack_start(guiutils.get_pad_label(12, 16), False, False, 0) vbox.pack_start(row0, False, False, 0) vbox.pack_start(row1, False, False, 0) vbox.pack_start(row2, False, False, 0) vbox.pack_start(row3, False, False, 0) vbox.pack_start(row4, False, False, 0) vbox.pack_start(row5, False, False, 0) vbox.pack_start(row6, False, False, 0) vbox.pack_start(row7, False, False, 0) vbox.pack_start(row8, False, False, 0) vbox.pack_start(Gtk.Label(), True, True, 0) title = _("Render Properties") dialogutils.panel_ok_dialog(title, vbox)
def show_render_properties_panel(render_item): if render_item.render_data.user_args == False: enc_opt = renderconsumer.encoding_options[ render_item.render_data.enc_index] enc_desc = enc_opt.name audio_desc = enc_opt.audio_desc quality_opt = enc_opt.quality_options[ render_item.render_data.quality_index] quality_desc = quality_opt.name else: enc_desc = " -" quality_desc = " -" audio_desc = " -" user_args = str(render_item.render_data.user_args) start_frame, end_frame, wait_for_stop_render = get_render_range( render_item) start_str = utils.get_tc_string_with_fps(start_frame, render_item.render_data.fps) end_str = utils.get_tc_string_with_fps(end_frame, render_item.render_data.fps) LEFT_WIDTH = 200 render_item.get_display_name() row0 = guiutils.get_two_column_box(guiutils.bold_label(_("Encoding:")), gtk.Label(enc_desc), LEFT_WIDTH) row1 = guiutils.get_two_column_box(guiutils.bold_label(_("Quality:")), gtk.Label(quality_desc), LEFT_WIDTH) row2 = guiutils.get_two_column_box( guiutils.bold_label(_("Audio Encoding:")), gtk.Label(audio_desc), LEFT_WIDTH) row3 = guiutils.get_two_column_box( guiutils.bold_label(_("Use User Args:")), gtk.Label(user_args), LEFT_WIDTH) row4 = guiutils.get_two_column_box(guiutils.bold_label(_("Start:")), gtk.Label(start_str), LEFT_WIDTH) row5 = guiutils.get_two_column_box(guiutils.bold_label(_("End:")), gtk.Label(end_str), LEFT_WIDTH) row6 = guiutils.get_two_column_box( guiutils.bold_label(_("Frames Per Second:")), gtk.Label(str(render_item.render_data.fps)), LEFT_WIDTH) row7 = guiutils.get_two_column_box( guiutils.bold_label(_("Render Profile Name:")), gtk.Label(str(render_item.render_data.profile_name)), LEFT_WIDTH) row8 = guiutils.get_two_column_box( guiutils.bold_label(_("Render Profile:")), gtk.Label(render_item.render_data.profile_desc), LEFT_WIDTH) vbox = gtk.VBox(False, 2) vbox.pack_start(gtk.Label(render_item.get_display_name()), False, False, 0) vbox.pack_start(guiutils.get_pad_label(12, 16), False, False, 0) vbox.pack_start(row0, False, False, 0) vbox.pack_start(row1, False, False, 0) vbox.pack_start(row2, False, False, 0) vbox.pack_start(row3, False, False, 0) vbox.pack_start(row4, False, False, 0) vbox.pack_start(row5, False, False, 0) vbox.pack_start(row6, False, False, 0) vbox.pack_start(row7, False, False, 0) vbox.pack_start(row8, False, False, 0) vbox.pack_start(gtk.Label(), True, True, 0) title = _("Render Properties") dialogutils.panel_ok_dialog(title, vbox)