comparison pyink/MBScene.py @ 1180:bfd7d466a022

Fix yeiling error message when select a scene. - It is caused by the buggy fixing of changeset #7d700e5f82ba for an eariler error of frameline.get_frame_block() - Fix frameline.get_frame_block() with correct logic and fix early code relied on the buggy fix.
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 31 Dec 2010 11:31:18 +0800
parents b65df4f0d30a
children f14dbcf19e2b
comparison
equal deleted inserted replaced
1179:b65df4f0d30a 1180:bfd7d466a022
624 tween_type_idx = \ 624 tween_type_idx = \
625 self._frameline_tween_types.index(tween_type) 625 self._frameline_tween_types.index(tween_type)
626 tween_obj_tween_type = \ 626 tween_obj_tween_type = \
627 self._tween_obj_tween_types[tween_type_idx] 627 self._tween_obj_tween_types[tween_type_idx]
628 628
629 next_idx, next_stop_idx, next_tween_type = \ 629 try:
630 layer.get_frame_block(stop_idx + 1) 630 next_idx, next_stop_idx, next_tween_type = \
631 if next_idx == -1: 631 layer.get_frame_block(stop_idx + 1)
632 except:
632 next_scene_group = scene_group 633 next_scene_group = scene_group
633 else: 634 else:
634 next_scene_group = layer.get_frame_data(next_idx) 635 next_scene_group = layer.get_frame_data(next_idx)
636 pass
635 637
636 nframes = stop_idx - start_idx + 1 638 nframes = stop_idx - start_idx + 1
637 percent = float(idx - start_idx) / nframes 639 percent = float(idx - start_idx) / nframes
638 self.tween.updateTweenContent(layer.duplicateGroup, 640 self.tween.updateTweenContent(layer.duplicateGroup,
639 tween_obj_tween_type, 641 tween_obj_tween_type,