Пример #1
0
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()
Пример #2
0
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
Пример #3
0
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
Пример #4
0
def resize_any(self):
    svlgui.MODE = "s"
    svlgui.set_cursor("arrow", stage)
    update_tooloptions()
Пример #5
0
def select_any(self):
    svlgui.MODE = " "
    svlgui.set_cursor("arrow", stage)
    update_tooloptions()
Пример #6
0
def paint_bucket(self):
    svlgui.MODE = "b"
    svlgui.set_cursor("bucket", stage)
    update_tooloptions()
Пример #7
0
def pen(self):
    svlgui.MODE = "n"
    svlgui.set_cursor("pen", stage)
    update_tooloptions()
Пример #8
0
def curve(self):
    svlgui.MODE = "c"
    svlgui.set_cursor("curve", stage)
    update_tooloptions()
Пример #9
0
def rectangle(self):
    svlgui.MODE = "r"
    svlgui.set_cursor("crosshair", stage)
    update_tooloptions()
Пример #10
0
def rectangle(self):
    svlgui.MODE = "r"
    svlgui.set_cursor("crosshair", stage)
    update_tooloptions()
Пример #11
0
def text(self):
    svlgui.MODE = "t"
    svlgui.set_cursor("text", stage)
    update_tooloptions()
Пример #12
0
def lasso(self):
    svlgui.MODE = "l"
    svlgui.set_cursor("lasso", stage)
    update_tooloptions()
Пример #13
0
def resize_any(self):
    svlgui.MODE = "s"
    svlgui.set_cursor("arrow", stage)
    update_tooloptions()
Пример #14
0
def select_any(self):
    svlgui.MODE = " "
    svlgui.set_cursor("arrow", stage)
    update_tooloptions()
Пример #15
0
def lasso(self):
    svlgui.MODE = "l"
    svlgui.set_cursor("lasso", stage)
    update_tooloptions()
Пример #16
0
def text(self):
    svlgui.MODE = "t"
    svlgui.set_cursor("text", stage)
    update_tooloptions()
Пример #17
0
def ellipse(self):
    svlgui.MODE = "e"
    svlgui.set_cursor("crosshair", stage)
    update_tooloptions()
Пример #18
0
def ellipse(self):
    svlgui.MODE = "e"
    svlgui.set_cursor("crosshair", stage)
    update_tooloptions()
Пример #19
0
def curve(self):
    svlgui.MODE = "c"
    svlgui.set_cursor("curve", stage)
    update_tooloptions()
Пример #20
0
def paintbrush(self):
    svlgui.MODE = "p"
    svlgui.set_cursor("paintbrush", stage)
    update_tooloptions()
Пример #21
0
def paintbrush(self):
    svlgui.MODE = "p"
    svlgui.set_cursor("paintbrush", stage)
    update_tooloptions()
Пример #22
0
def paint_bucket(self):
    svlgui.MODE = "b"
    svlgui.set_cursor("bucket", stage)
    update_tooloptions()
Пример #23
0
def pen(self):
    svlgui.MODE = "n"
    svlgui.set_cursor("pen", stage)
    update_tooloptions()