Mercurial > MadButterfly
comparison pyink/MBScene.py @ 1265:ca301f6abef7
Support undo for insert key frame/rm keyframe. We will refresh all layers and scenes since it is not feasible to collect these changes and update the layers and scenes. We may scan two level only in the future to improve the performance.
author | wycc |
---|---|
date | Wed, 12 Jan 2011 15:01:14 +0800 |
parents | ff410dcdea02 |
children | d4559e7f82cd |
comparison
equal
deleted
inserted
replaced
1264:ff410dcdea02 | 1265:ca301f6abef7 |
---|---|
68 self.framerate = 12 | 68 self.framerate = 12 |
69 self._disable_tween_type_selector = False | 69 self._disable_tween_type_selector = False |
70 self.current = 0 | 70 self.current = 0 |
71 | 71 |
72 self._domviewui = create_domview_ui() | 72 self._domviewui = create_domview_ui() |
73 self._locker = self._domviewui | |
73 pass | 74 pass |
74 | 75 |
75 def change_active_frame(self, node): | 76 def change_active_frame(self, node): |
76 """ | 77 """ |
77 Change the active frame to the current selected node. This will | 78 Change the active frame to the current selected node. This will |
253 self.removeKeyScene(layer_idx, frame_idx) | 254 self.removeKeyScene(layer_idx, frame_idx) |
254 self.markUndo("remove key") | 255 self.markUndo("remove key") |
255 self._lockui = False | 256 self._lockui = False |
256 return | 257 return |
257 | 258 |
259 def lock(self): | |
260 self._domviewui.lock() | |
261 pass | |
262 | |
263 def unlock(self): | |
264 self._domviewui.unlock() | |
265 pass | |
266 | |
258 | 267 |
259 def doExtendScene(self,w): | 268 def doExtendScene(self,w): |
260 self._lockui = True | 269 self._lockui = True |
261 self.extendScene() | 270 self.extendScene() |
262 self.markUndo("extend key") | 271 self.markUndo("extend key") |