comparison pyink/domview.py @ 1432:8e8c9ab3818f

Add documentation
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 11 Apr 2011 00:28:45 +0800
parents 60f2c9a24cdb
children 8eecaca2a125
comparison
equal deleted inserted replaced
1431:60f2c9a24cdb 1432:8e8c9ab3818f
663 663
664 parent_group.appendChild(use_node) 664 parent_group.appendChild(use_node)
665 665
666 return use_node 666 return use_node
667 667
668 ## \brief Remember current frame and layer on the scenes node.
669 #
668 def remember_current_frame(self, layer_idx, frame_idx): 670 def remember_current_frame(self, layer_idx, frame_idx):
669 if not isinstance(layer_idx, int): 671 if not isinstance(layer_idx, int):
670 raise TypeError, 'layer index should be a integer' 672 raise TypeError, 'layer index should be a integer'
671 if not isinstance(frame_idx, int): 673 if not isinstance(frame_idx, int):
672 raise TypeError, 'frame index should be a integer' 674 raise TypeError, 'frame index should be a integer'
676 timeline_scenes = timeline.scenes_node 678 timeline_scenes = timeline.scenes_node
677 timeline_scenes.setAttribute('cur_layer', str(layer_idx)) 679 timeline_scenes.setAttribute('cur_layer', str(layer_idx))
678 timeline_scenes.setAttribute('cur_frame', str(frame_idx)) 680 timeline_scenes.setAttribute('cur_frame', str(frame_idx))
679 pass 681 pass
680 682
683 ## \brief Get current frame and layer from the scenes node.
684 #
681 def get_current_frame(self): 685 def get_current_frame(self):
682 timeline_name = self.get_current_timeline() 686 timeline_name = self.get_current_timeline()
683 timeline = self._cur_comp.get_timeline(timeline_name) 687 timeline = self._cur_comp.get_timeline(timeline_name)
684 timeline_scenes = timeline.scenes_node 688 timeline_scenes = timeline.scenes_node
685 try: 689 try: