def _audio_levels_item_activated(widget, msg): if msg == "all": editorstate.display_all_audio_levels = True updater.repaint_tline() elif msg == "on request": editorstate.display_all_audio_levels = False current_sequence().drop_audio_levels() updater.repaint_tline() elif msg == "snapping": snapping.snapping_on = widget.get_active() elif msg == "magnet": snapping.show_magnet_icon = widget.get_active() elif msg == "autofollow": active = widget.get_active() editorstate.auto_follow = active PROJECT().set_project_property(appconsts.P_PROP_AUTO_FOLLOW, active) if active == True: # Do autofollow update if auto follow activated compositor_autofollow_data = edit.get_full_compositor_sync_data() edit.do_autofollow_redo(compositor_autofollow_data) updater.repaint_tline() elif msg == "pointer_sensitive_item": editorstate.cursor_is_tline_sensitive = widget.get_active() else: # media thumbnails editorstate.display_clip_media_thumbnails = widget.get_active() updater.repaint_tline()
def _workflow_menu_callback(widget, data): tool_id, msg = data if msg == "activity": if widget.get_active() == False: editorpersistance.prefs.active_tools.remove(tool_id) else: editorpersistance.prefs.active_tools.append(tool_id) elif msg == "preset standard": _set_workflow_STANDARD() elif msg == "preset filmstyle": _set_workflow_FILM_STYLE() elif msg == "autofollow": active = widget.get_active() editorstate.auto_follow = active PROJECT().set_project_property(appconsts.P_PROP_AUTO_FOLLOW, active) if active == True: # Do autofollow update if auto follow activated compositor_autofollow_data = edit.get_full_compositor_sync_data() edit.do_autofollow_redo(compositor_autofollow_data) updater.repaint_tline() elif msg == "always overwrite": editorpersistance.prefs.dnd_action = appconsts.DND_ALWAYS_OVERWRITE elif msg == "overwrite nonV1": editorpersistance.prefs.dnd_action = appconsts.DND_OVERWRITE_NON_V1 elif msg == "always insert": editorpersistance.prefs.dnd_action = appconsts.DND_ALWAYS_INSERT elif msg == "tooltips": editorpersistance.prefs.show_tool_tooltips = widget.get_active() elif msg == "delete lift" and widget.get_active() == True: print "lift" elif msg == "delete splice" and widget.get_active() == True: print "splice" else: try: pos = int(msg) current_index = editorpersistance.prefs.active_tools.index(tool_id) editorpersistance.prefs.active_tools.remove(tool_id) editorpersistance.prefs.active_tools.insert(pos - 1, tool_id) except: pass editorpersistance.save()