def resetStates(self): self.man = ClipManager(utils.getChildWithAttribute(self.exml,"stage","name","brandon"),self) self.eyes = ClipManager(utils.getChildWithAttribute(self.exml,"stage","name","eyes"),self) self.player = ClipManager(utils.getChildWithAttribute(self.exml,"stage","name","player"),self) self.fade = ClipManager(utils.getChildWithAttribute(self.exml,"stage","name","fade"),self) self.state = dict() for e in [f for f in utils.getChild(self.exml,"vars").childNodes if f.nodeType == xml.dom.Node.TEXT_NODE]: for g in e.data.split(): self.state[g] = 0 graph.init_graph(self.state)
def grabFrameOLD(self): """ this version of grabframe assumes that the clip xml node has all its images listed with their respective times. Use this version if you want to have a non constant speed animation. """ #TODO you should really make at least a local dict of image names to map becaus ethis loads the same image multiple times... #print self.xml,"frame","number",self.grabFrameNumber() framexml = utils.getChildWithAttribute(self.xml,"frame","number",self.grabFrameNumber()) if framexml: return resource.image(stupid.splitjoin(framexml.getAttribute("folder")+framexml.getAttribute("filename"))) else: return None