def onKeyDownObj(self, key): if key in ("delete", "backspace"): del self.parent[self.parent.index(self)] # Need to clean up deletion elif key in [" ", "s", "r", "e", "b", "p"]: svlgui.MODE=key svlgui.set_cursor({" ":"arrow","s":"arrow","r":"crosshair","e":"crosshair", "b":"arrow","p":"arrow"}[key], MainWindow.stage) misc_funcs.update_tooloptions() elif key=="F6": add_keyframe() elif key=="F8": convert_to_symbol()
def onKeyDownFrame(self, key): root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions = MainWindow.scriptwindow.text if key in [" ", "s", "r", "e", "b"]: svlgui.MODE=key svlgui.set_cursor({" ":"arrow","s":"arrow","r":"crosshair","e":"crosshair", "b":"arrow"}[key], MainWindow.stage) misc_funcs.update_tooloptions() elif key=="F6": add_keyframe() elif key=="F8": convert_to_symbol() MainWindow.scriptwindow.text = root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions
def onKeyDownGroup(self, key): if not svlgui.EDITING: if key in [" ", "s", "r", "e", "b", "p"]: svlgui.MODE=key svlgui.set_cursor({" ":"arrow","s":"arrow","r":"crosshair","e":"crosshair", "b":"arrow","p":"arrow"}[key], MainWindow.stage) misc_funcs.update_tooloptions() elif key=="F6": add_keyframe() elif key=="F8": convert_to_symbol() else: if not key=="escape": pass else: svlgui.EDITING=False