def _set_workflow_FILM_STYLE(): editorpersistance.prefs.active_tools = [1, 2, 3, 4, 5, 6, 7] editorpersistance.save() editevent.set_default_edit_mode()
def key_down(widget, event): """ Global key press listener. """ # Handle ESCAPE if event.keyval == Gdk.KEY_Escape: if audiowaveform.waveform_thread != None: audiowaveform.waveform_thread.abort_rendering() return True else: if editorstate.current_is_move_mode() == False: editevent.set_default_edit_mode() return True # Compositor editors keyevents was_handled = _handle_geometry_editor_keys(event) if was_handled: # Stop widget focus from travelling if arrow key pressed gui.editor_window.window.emit_stop_by_name("key_press_event") return True was_handled = _handle_effects_editor_keys(event) if was_handled: # Stop widget focus from travelling if arrow key pressed gui.editor_window.window.emit_stop_by_name("key_press_event") return True # If timeline widgets are in focus timeline keyevents are available if _timeline_has_focus(): was_handled = _handle_tline_key_event(event) if was_handled: # Stop widget focus from travelling if arrow key pressed for next frame # by stopping signal gui.editor_window.window.emit_stop_by_name("key_press_event") return was_handled # Insert shortcut keys need more focus then timeline shortcuts. # these may already have been handled in timeline focus events was_handled = _handle_extended_tline_focus_events(event) if was_handled: # Stop event handling here return True # Pressing timeline button obivously leaves user expecting # to have focus in timeline if gui.sequence_editor_b.has_focus(): _handle_tline_key_event(event) # Stop event handling here return True # Clip button or posbar focus with clip displayed leaves playback keyshortcuts available if (gui.clip_editor_b.has_focus() or (gui.pos_bar.widget.is_focus() and (not timeline_visible()))): _handle_clip_key_event(event) # Stop event handling here return True # Handle non-timeline delete if event.keyval == Gdk.KEY_Delete: return _handle_delete() # Home if event.keyval == Gdk.KEY_Home: if PLAYER().is_playing(): monitorevent.stop_pressed() PLAYER().seek_frame(0) _move_to_beginning() return True # End if event.keyval == Gdk.KEY_End: if PLAYER().is_playing(): monitorevent.stop_pressed() PLAYER().seek_end() _move_to_end() return True # Select all with CTRL + A in media panel if event.keyval == Gdk.KEY_a: if (event.get_state() & Gdk.ModifierType.CONTROL_MASK): if gui.media_list_view.widget.has_focus( ) or gui.media_list_view.widget.get_focus_child() != None: gui.media_list_view.select_all() return True if event.keyval == Gdk.KEY_F11: menuactions.toggle_fullscreen() return True #debug if event.keyval == Gdk.KEY_F12: if (event.get_state() & Gdk.ModifierType.CONTROL_MASK): pass return True # Key event was not handled here. return False
def key_down(widget, event): """ Global key press listener. """ # Handle ESCAPE if event.keyval == Gdk.KEY_Escape: if audiowaveform.waveform_thread != None: audiowaveform.waveform_thread.abort_rendering() return True else: if editorstate.current_is_move_mode() == False: editevent.set_default_edit_mode() return True # Compositor editors keyevents was_handled = _handle_geometry_editor_keys(event) if was_handled: # Stop widget focus from travelling if arrow key pressed gui.editor_window.window.emit_stop_by_name("key_press_event") return True was_handled = _handle_effects_editor_keys(event) if was_handled: # Stop widget focus from travelling if arrow key pressed gui.editor_window.window.emit_stop_by_name("key_press_event") return True # If timeline widgets are in focus timeline keyevents are available if _timeline_has_focus(): was_handled = _handle_tline_key_event(event) if was_handled: # Stop widget focus from travelling if arrow key pressed for next frame # by stopping signal gui.editor_window.window.emit_stop_by_name("key_press_event") return was_handled # Insert shortcut keys need more focus then timeline shortcuts. # these may already have been handled in timeline focus events was_handled = _handle_extended_tline_focus_events(event) if was_handled: # Stop event handling here return True # Pressing timeline button obivously leaves user expecting # to have focus in timeline if gui.sequence_editor_b.has_focus(): _handle_tline_key_event(event) # Stop event handling here return True # Clip button or posbar focus with clip displayed leaves playback keyshortcuts available if (gui.clip_editor_b.has_focus() or (gui.pos_bar.widget.is_focus() and (not timeline_visible()))): _handle_clip_key_event(event) # Stop event handling here return True # Handle non-timeline delete if event.keyval == Gdk.KEY_Delete: return _handle_delete() # Home if event.keyval == Gdk.KEY_Home: if PLAYER().is_playing(): monitorevent.stop_pressed() PLAYER().seek_frame(0) return True # Select all with CTRL + A in media panel if event.keyval == Gdk.KEY_a: if (event.get_state() & Gdk.ModifierType.CONTROL_MASK): if gui.media_list_view.widget.has_focus() or gui.media_list_view.widget.get_focus_child() != None: gui.media_list_view.select_all() return True #debug if event.keyval == Gdk.KEY_F11: if (event.get_state() & Gdk.ModifierType.CONTROL_MASK): pass return True #debug if event.keyval == Gdk.KEY_F12: if (event.get_state() & Gdk.ModifierType.CONTROL_MASK): pass return True # Key event was not handled here. return False