changeset 441:ed01a5c9c7e0

- added support to set instance ids of animated objects to ObjectEdit plugin
author chewie@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 13 Mar 2010 12:05:17 +0000
parents 3a6441d9e01c
children 631a793fa978
files tools/editor/plugins/ObjectEdit.py
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/tools/editor/plugins/ObjectEdit.py	Tue Mar 02 15:05:30 2010 +0000
+++ b/tools/editor/plugins/ObjectEdit.py	Sat Mar 13 12:05:17 2010 +0000
@@ -380,14 +380,8 @@
 			FIXME:
 			- parse user data in case user think strings are considered to be integer offset values...
 		"""
-		if self._animation:
-			self._editor.getStatusBar().setText(u"Editing animated instances is not supported yet")
-			return		
-		
-		xoffset = self._gui_xoffset_textfield._getText()
-		yoffset = self._gui_yoffset_textfield._getText()
-		
 		instance_id = str(self._gui_instance_id_textfield._getText())
+		msg = ''
 		
 		if instance_id == "":
 			instance_id = "None"
@@ -400,7 +394,15 @@
 				self._editor.getStatusBar().setText(msg)
 			else:
 				self._editor.getStatusBar().setText(u"Instance ID is already in use.")
-		
+
+		if self._animation:
+			msg = msg + "\n" + u"Editing offset and rotation of animated instances is not supported yet"
+			self._editor.getStatusBar().setText(msg)
+			return
+
+		xoffset = self._gui_xoffset_textfield._getText()
+		yoffset = self._gui_yoffset_textfield._getText()
+
 		# update rotation
 		angle = self.eval_gui_rotation()
 		self.set_rotation(angle)