Mercurial > MadButterfly
changeset 1070:afa42d5836cc
Call setCurrentLayer to enter the current scene group.
author | wycc |
---|---|
date | Thu, 02 Dec 2010 08:23:08 +0800 |
parents | 292fbb86d8f3 |
children | 71354f3e2a30 e9f617b21db1 52d8bf5d12b4 |
files | pyink/MBScene.py |
diffstat | 1 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pyink/MBScene.py Tue Nov 30 03:57:36 2010 +0800 +++ b/pyink/MBScene.py Thu Dec 02 08:23:08 2010 +0800 @@ -421,6 +421,34 @@ pass pass pass + def enterGroup(self,obj): + for l in self.layers: + for s in l.node.childList(): + if s.getId() == obj.attribute("id"): + self.desktop.setCurrentLayer(s) + + def selectSceneObject(self,frameline, nth): + i = 0 + while i < len(frameline._keys): + s = frameline._keys[i] + if s.right_tween is False: + if nth == s.idx+1: + self.enterGroup(s.ref) + return + else: + pass + i = i + 1 + continue + + if nth >= (s.idx+1) and nth <= (frameline._keys[i+1].idx+1): + self.enterGroup(s.ref) + return + else: + pass + i = i + 2 + pass + pass + def newCell(self,file): @@ -521,9 +549,11 @@ color = cell.get_colormap().alloc_color("green") cell.modify_bg(gtk.STATE_NORMAL, color) pass + def doEditScene(self,w): self.setCurrentScene(self.last_frame+1) + self.selectSceneObject(self.last_line,self.last_frame+1) pass def doInsertKeyScene(self,w):