Mercurial > MadButterfly
diff pyink/tween.py @ 1163:c23593881507
Merge.
Fix a bug to select the tween without key frame after it.
author | wycc |
---|---|
date | Tue, 28 Dec 2010 22:26:11 +0800 |
parents | 1a699dc00fa3 |
children | 6160e6282252 |
line wrap: on
line diff
--- a/pyink/tween.py Mon Dec 27 23:20:13 2010 +0800 +++ b/pyink/tween.py Tue Dec 28 22:26:11 2010 +0800 @@ -62,6 +62,14 @@ node = node.next() pass + # Remove duplicate nodes that is not in the set of stop nodes + for node_ref in dup_nodes: + if node_ref not in stop_nodes: + node = dup_nodes[node_ref] + duplicate_group.removeChild(node) + pass + pass + # # Node ID of a node of start scene must be mapped to # 'ns0:duplicate-src' attribute of a node of stop scene. The @@ -75,6 +83,7 @@ start_node = start_scene_group.firstChild() while start_node: start_node_id = start_node.getAttribute('id') + dup_node = dup_nodes.setdefault(start_node_id, None) try: stop_node = stop_nodes[start_node_id] except KeyError: @@ -84,7 +93,6 @@ start_node = start_node.next() continue - dup_node = dup_nodes.setdefault(start_node_id, None) self.updateTweenObject(duplicate_group, tween_type, start_node, stop_node,