# HG changeset patch # User wycc # Date 1291249388 -28800 # Node ID afa42d5836ccb6499e2c92735261d0282d2310f9 # Parent 292fbb86d8f36ff073a13bb77fb3b6f5ee1f9b1e Call setCurrentLayer to enter the current scene group. diff -r 292fbb86d8f3 -r afa42d5836cc pyink/MBScene.py --- 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):