Mercurial > MadButterfly
diff 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 |
line wrap: on
line diff
--- a/pyink/MBScene.py Wed Aug 31 17:16:44 2011 +0800 +++ b/pyink/MBScene.py Wed Aug 31 22:23:04 2011 +0800 @@ -261,6 +261,15 @@ self._domviewui.remember_current_frame(layer_idx, frame_idx) pass + def doAddLayer(self, w): + domview = self._domviewui + layer_num = domview.get_layer_num() + domview.insert_layer(layer_num) + pass + + def doRemoveLayer(self, w): + pass + def doInsertKeyScene(self,w): layer_idx, frame_idx = self._domviewui.get_active_layer_frame() self.insertKeyScene(layer_idx, frame_idx) @@ -361,6 +370,14 @@ pass def _add_buttons(self, hbox): + btn = gtk.Button('Add a Layer') + btn.connect('clicked', self.doAddLayer) + hbox.pack_start(btn, expand=False, fill=False) + + btn = gtk.Button('Remove the Layer') + btn.connect('clicked', self.doRemoveLayer) + hbox.pack_start(btn, expand=False, fill=False) + btn = gtk.Button('Insert Key') btn.connect('clicked', self.doInsertKeyScene) hbox.pack_start(btn, expand=False, fill=False)