Mercurial > MadButterfly
comparison pyink/MBScene.py @ 1528:b7d70341ee57
Insert layer with unique name
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 31 Aug 2011 22:23:04 +0800 |
parents | 31a21656c0a8 |
children | af8dd27bf450 |
comparison
equal
deleted
inserted
replaced
1527:d42951ebfc6f | 1528:b7d70341ee57 |
---|---|
258 def do_CellClick(self, layer_idx, frame_idx): | 258 def do_CellClick(self, layer_idx, frame_idx): |
259 self._director.show_scene(frame_idx) | 259 self._director.show_scene(frame_idx) |
260 self.selectSceneObject(layer_idx, frame_idx) | 260 self.selectSceneObject(layer_idx, frame_idx) |
261 self._domviewui.remember_current_frame(layer_idx, frame_idx) | 261 self._domviewui.remember_current_frame(layer_idx, frame_idx) |
262 pass | 262 pass |
263 | |
264 def doAddLayer(self, w): | |
265 domview = self._domviewui | |
266 layer_num = domview.get_layer_num() | |
267 domview.insert_layer(layer_num) | |
268 pass | |
269 | |
270 def doRemoveLayer(self, w): | |
271 pass | |
263 | 272 |
264 def doInsertKeyScene(self,w): | 273 def doInsertKeyScene(self,w): |
265 layer_idx, frame_idx = self._domviewui.get_active_layer_frame() | 274 layer_idx, frame_idx = self._domviewui.get_active_layer_frame() |
266 self.insertKeyScene(layer_idx, frame_idx) | 275 self.insertKeyScene(layer_idx, frame_idx) |
267 self.selectSceneObject(layer_idx, frame_idx) | 276 self.selectSceneObject(layer_idx, frame_idx) |
359 self.OK = True | 368 self.OK = True |
360 gtk.main_quit() | 369 gtk.main_quit() |
361 pass | 370 pass |
362 | 371 |
363 def _add_buttons(self, hbox): | 372 def _add_buttons(self, hbox): |
373 btn = gtk.Button('Add a Layer') | |
374 btn.connect('clicked', self.doAddLayer) | |
375 hbox.pack_start(btn, expand=False, fill=False) | |
376 | |
377 btn = gtk.Button('Remove the Layer') | |
378 btn.connect('clicked', self.doRemoveLayer) | |
379 hbox.pack_start(btn, expand=False, fill=False) | |
380 | |
364 btn = gtk.Button('Insert Key') | 381 btn = gtk.Button('Insert Key') |
365 btn.connect('clicked', self.doInsertKeyScene) | 382 btn.connect('clicked', self.doInsertKeyScene) |
366 hbox.pack_start(btn, expand=False, fill=False) | 383 hbox.pack_start(btn, expand=False, fill=False) |
367 | 384 |
368 btn=gtk.Button('Remove Key') | 385 btn=gtk.Button('Remove Key') |