diff pyink/MBScene.py @ 1294:082fff7e9604

merge
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 15 Jan 2011 23:07:29 +0800
parents e816b0c2deec
children 71118bff7d61
line wrap: on
line diff
--- a/pyink/MBScene.py	Sat Jan 15 22:41:58 2011 +0800
+++ b/pyink/MBScene.py	Sat Jan 15 23:07:29 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.clone_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):
@@ -153,6 +158,7 @@
     def duplicateKeyScene(self):
         # Search for the current scene
 	layer_idx, frame_idx = self._domviewui.get_active_layer_frame()
+	self.removeKeyScene(layer_idx, frame_idx)
 
 	try:
 	    left_start, left_end, left_tween_type = \