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
def resize_any(self): svlgui.MODE = "s" svlgui.set_cursor("arrow", stage) update_tooloptions()
def select_any(self): svlgui.MODE = " " svlgui.set_cursor("arrow", stage) update_tooloptions()
def paint_bucket(self): svlgui.MODE = "b" svlgui.set_cursor("bucket", stage) update_tooloptions()
def pen(self): svlgui.MODE = "n" svlgui.set_cursor("pen", stage) update_tooloptions()
def curve(self): svlgui.MODE = "c" svlgui.set_cursor("curve", stage) update_tooloptions()
def rectangle(self): svlgui.MODE = "r" svlgui.set_cursor("crosshair", stage) update_tooloptions()
def text(self): svlgui.MODE = "t" svlgui.set_cursor("text", stage) update_tooloptions()
def lasso(self): svlgui.MODE = "l" svlgui.set_cursor("lasso", stage) update_tooloptions()
def ellipse(self): svlgui.MODE = "e" svlgui.set_cursor("crosshair", stage) update_tooloptions()
def paintbrush(self): svlgui.MODE = "p" svlgui.set_cursor("paintbrush", stage) update_tooloptions()