# HG changeset patch # User Thinker K.F. Li # Date 1296472786 -28800 # Node ID 38403fdb0c6c5bc410c364360a4225adddb93ca5 # Parent 3cbc1ab15541f033d14aba54d250e23f06017e18 Fix bug of duplicateKeyScene() diff -r 3cbc1ab15541 -r 38403fdb0c6c pyink/MBScene.py --- 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 = \