changeset 1287:f6a28f473494

Change the exten dScene to create an key frame which link back to the previous key frame.
author wycc
date Sat, 15 Jan 2011 20:52:24 +0800
parents cbcb91b196fa
children fb44830c8a81
files pyink/MBScene.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pyink/MBScene.py	Sat Jan 15 02:43:20 2011 +0800
+++ b/pyink/MBScene.py	Sat Jan 15 20:52:24 2011 +0800
@@ -118,14 +118,19 @@
 	pass
     
     def extendScene(self):
+        # Create a tween
 	layer_idx, frame_idx = self._domviewui.get_active_layer_frame()
 	start, end, tween_type = \
 	    self._domviewui.get_left_key(layer_idx, frame_idx)
-	tween_len = frame_idx - start + 1
+	tween_len = frame_idx - start 
 	self._domviewui.tween(layer_idx, start, tween_len, tween_type)
-	
+
+	# Create a key frame which link to the previous key frame
 	scene_group = self._domviewui.get_key_group(layer_idx, start)
-	self._enterGroup(scene_group)
+	self._domviewui.mark_key(layer_idx, frame_idx)
+	self._domviewui.copy_key_group(layer_idx, start, frame_idx)
+	self._director.show_scene(frame_idx)
+	self.selectSceneObject(layer_idx, frame_idx)
 	pass
     
     def _enterGroup(self, scene_group):