comparison pyink/domview_ui.py @ 1274:a4d3838264dd

Make public APIs being public for domview
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 12 Jan 2011 21:20:06 +0800
parents 1d0474f2f6fa
children 776b024ae8f9
comparison
equal deleted inserted replaced
1273:1d0474f2f6fa 1274:a4d3838264dd
384 # 384 #
385 def _update_frameline_content(self, layer_idx): 385 def _update_frameline_content(self, layer_idx):
386 fl_stack = self._fl_stack 386 fl_stack = self._fl_stack
387 scene_nodes = self._dom.get_all_scene_node_of_layer(layer_idx) 387 scene_nodes = self._dom.get_all_scene_node_of_layer(layer_idx)
388 for scene_node in scene_nodes: 388 for scene_node in scene_nodes:
389 start, end, tween_name = self._dom._parse_one_scene(scene_node) 389 start, end, tween_name = self._dom.parse_one_scene(scene_node)
390 390
391 fl_stack.mark_keyframe(layer_idx, start) 391 fl_stack.mark_keyframe(layer_idx, start)
392 fl_stack.set_keyframe_data(layer_idx, start, scene_node) 392 fl_stack.set_keyframe_data(layer_idx, start, scene_node)
393 if start != end: 393 if start != end:
394 tween_type = self._tween_type_names.index(tween_name) 394 tween_type = self._tween_type_names.index(tween_name)
566 layer_idx, scene_node = \ 566 layer_idx, scene_node = \
567 self._dom.find_layer_n_scene_of_node(scene_group_id) 567 self._dom.find_layer_n_scene_of_node(scene_group_id)
568 if layer_idx == -1: 568 if layer_idx == -1:
569 raise ValueError, \ 569 raise ValueError, \
570 'can not find the key for group %s' % (scene_group_id) 570 'can not find the key for group %s' % (scene_group_id)
571 start, end, tween_name = self._dom._parse_one_scene(scene_node) 571 start, end, tween_name = self._dom.parse_one_scene(scene_node)
572 tween_type = self._tween_type_names.index(tween_name) 572 tween_type = self._tween_type_names.index(tween_name)
573 return layer_idx, (start, end, tween_type) 573 return layer_idx, (start, end, tween_type)
574 574
575 ## \brief Return key and tween info for given frame index. 575 ## \brief Return key and tween info for given frame index.
576 # 576 #
720 layer_group_id = layer_group.getAttribute('id') 720 layer_group_id = layer_group.getAttribute('id')
721 layer_idx = self.find_layer_from_group(layer_group_id) 721 layer_idx = self.find_layer_from_group(layer_group_id)
722 self._dom.manage_scene_node(layer_idx, scene_node) 722 self._dom.manage_scene_node(layer_idx, scene_node)
723 723
724 start, end, tween_name = \ 724 start, end, tween_name = \
725 self._dom._parse_one_scene(scene_node) 725 self._dom.parse_one_scene(scene_node)
726 tween_type = self._tween_type_names.index(tween_name) 726 tween_type = self._tween_type_names.index(tween_name)
727 727
728 tween_len = end - start + 1 728 tween_len = end - start + 1
729 self._fl_stack.mark_keyframe(layer_idx, start) 729 self._fl_stack.mark_keyframe(layer_idx, start)
730 self._fl_stack.set_keyframe_data(layer_idx, start, scene_node) 730 self._fl_stack.set_keyframe_data(layer_idx, start, scene_node)