Mercurial > MadButterfly
changeset 1334:38403fdb0c6c
Fix bug of duplicateKeyScene()
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 31 Jan 2011 19:19:46 +0800 |
parents | 3cbc1ab15541 |
children | 194c7a831083 |
files | pyink/MBScene.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/MBScene.py Mon Jan 31 18:19:23 2011 +0800 +++ b/pyink/MBScene.py Mon Jan 31 19:19:46 2011 +0800 @@ -118,11 +118,11 @@ pass def extendScene(self): - # Create a tween + # Create a tween layer_idx, frame_idx = self._domviewui.get_active_layer_frame() start, end, tween_type = \ self._domviewui.get_left_key(layer_idx, frame_idx) - tween_len = frame_idx - start + tween_len = frame_idx - start self._domviewui.tween(layer_idx, start, tween_len, tween_type) # Create a key frame which link to the previous key frame @@ -157,7 +157,10 @@ def duplicateKeyScene(self): # Search for the current scene layer_idx, frame_idx = self._domviewui.get_active_layer_frame() - self.removeKeyScene(layer_idx, frame_idx) + try: + self.removeKeyScene(layer_idx, frame_idx) + except: # no key and tween + pass try: left_start, left_end, left_tween_type = \