comparison pyink/MBScene.py @ 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 cd848c2ec29f
children fb44830c8a81
comparison
equal deleted inserted replaced
1284:cbcb91b196fa 1287:f6a28f473494
116 self._domviewui.unmark_key(layer_idx, frame_idx) 116 self._domviewui.unmark_key(layer_idx, frame_idx)
117 self._director.show_scene(frame_idx) 117 self._director.show_scene(frame_idx)
118 pass 118 pass
119 119
120 def extendScene(self): 120 def extendScene(self):
121 # Create a tween
121 layer_idx, frame_idx = self._domviewui.get_active_layer_frame() 122 layer_idx, frame_idx = self._domviewui.get_active_layer_frame()
122 start, end, tween_type = \ 123 start, end, tween_type = \
123 self._domviewui.get_left_key(layer_idx, frame_idx) 124 self._domviewui.get_left_key(layer_idx, frame_idx)
124 tween_len = frame_idx - start + 1 125 tween_len = frame_idx - start
125 self._domviewui.tween(layer_idx, start, tween_len, tween_type) 126 self._domviewui.tween(layer_idx, start, tween_len, tween_type)
126 127
128 # Create a key frame which link to the previous key frame
127 scene_group = self._domviewui.get_key_group(layer_idx, start) 129 scene_group = self._domviewui.get_key_group(layer_idx, start)
128 self._enterGroup(scene_group) 130 self._domviewui.mark_key(layer_idx, frame_idx)
131 self._domviewui.copy_key_group(layer_idx, start, frame_idx)
132 self._director.show_scene(frame_idx)
133 self.selectSceneObject(layer_idx, frame_idx)
129 pass 134 pass
130 135
131 def _enterGroup(self, scene_group): 136 def _enterGroup(self, scene_group):
132 self.desktop.setCurrentLayer(scene_group.spitem) 137 self.desktop.setCurrentLayer(scene_group.spitem)
133 pass 138 pass