diff pyink/MBScene.py @ 1160:1a699dc00fa3

Fix the issue of not removing node in old scene when switching scenes. - When a timeline is playing and crossing two scenes (tween block), nodes, for the old scene, in duplicate group must be removed. But, it is not. - It is fixed by checking if nodes, in the duplicate group, are also in the key frame next to the new scene. All nodes that is not in next key frame are remove.
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 28 Dec 2010 13:35:34 +0800
parents e731a0eaa35f
children a7faab54e8f8
line wrap: on
line diff
--- a/pyink/MBScene.py	Tue Dec 28 13:35:34 2010 +0800
+++ b/pyink/MBScene.py	Tue Dec 28 13:35:34 2010 +0800
@@ -605,7 +605,7 @@
 			layer.get_frame_block(stop_idx + 1)
 		    next_scene_group = layer.get_frame_data(next_idx)
 		    
-		    nframes = next_idx - start_idx + 1
+		    nframes = stop_idx - start_idx + 1
 		    percent = float(idx - start_idx) / nframes
 		    self.tween.updateTweenContent(layer.duplicateGroup,
 						  tween_obj_tween_type,