def _updateAnimations(self, activeIndices, mapNamesDict=None): if self.temporalMode == TemporalMode.NONTEMPORAL: for i in range(len(self.animations)): if i not in activeIndices: self.animations[i].SetActive(False) continue anim = [anim for anim in self.animationData if anim.windowIndex == i][0] w, h = self.mapwindows[i].GetClientSize() regions = anim.GetRegions(w, h) self.animations[i].SetFrames( [HashCmds(cmdList, region) for cmdList, region in zip(anim.cmdMatrix, regions)]) self.animations[i].SetActive(True) else: for i in range(len(self.animations)): if i not in activeIndices: self.animations[i].SetActive(False) continue anim = [anim for anim in self.animationData if anim.windowIndex == i][0] w, h = self.mapwindows[i].GetClientSize() regions = anim.GetRegions(w, h) identifiers = sampleCmdMatrixAndCreateNames( anim.cmdMatrix, mapNamesDict[ anim.firstStdsNameType[0]], regions) self.animations[i].SetFrames(identifiers) self.animations[i].SetActive(True)
def _updateAnimations(self, activeIndices, mapNamesDict=None): if self.temporalMode == TemporalMode.NONTEMPORAL: for i in range(len(self.animations)): if i not in activeIndices: self.animations[i].SetActive(False) continue anim = [anim for anim in self.animationData if anim.windowIndex == i][0] w, h = self.mapwindows[i].GetClientSize() regions = anim.GetRegions(w, h) self.animations[i].SetFrames([HashCmds(cmdList, region) for cmdList, region in zip(anim.cmdMatrix, regions)]) self.animations[i].SetActive(True) else: for i in range(len(self.animations)): if i not in activeIndices: self.animations[i].SetActive(False) continue anim = [anim for anim in self.animationData if anim.windowIndex == i][0] w, h = self.mapwindows[i].GetClientSize() regions = anim.GetRegions(w, h) identifiers = sampleCmdMatrixAndCreateNames(anim.cmdMatrix, mapNamesDict[anim.firstStdsNameType[0]], regions) self.animations[i].SetFrames(identifiers) self.animations[i].SetActive(True)