def createPhase(self, eIdx, pIdx, e, p, maxPhases): d = _debug() effects = chain() s = GUI.Window('') s.texture = d.renderTarget.texture uvs = d.phaseUV(eIdx, pIdx, len(effects), len(e.phases)) bl = (uvs[0], 1.0 - uvs[1]) tl = (uvs[0], 1.0 - uvs[3]) tr = (uvs[2], 1.0 - uvs[3]) br = (uvs[2], 1.0 - uvs[1]) s.mapping = (tl, bl, br, tr) s.horizontalAnchor = 'CENTER' s.verticalAnchor = 'TOP' s.materialFX = 'SOLID' self.setToClipMode(s) s.filterType = 'LINEAR' try: label = '%s (%d x %d)' % (p.name, p.renderTarget.width, p.renderTarget.height) except: label = '%s' % (p.name,) l = self.addLabel(s, label) return s
def createChildren(self): d = _debug() if d is None or d.renderTarget is None: return else: effects = chain() if len(effects) == 0: return width = 2.0 / len(effects) maxPhases = 0 for e in effects: maxPhases = max(maxPhases, len(e.phases)) height = 2.0 / maxPhases x = -1.0 eIdx = 0 for e in effects: effectScript = EffectView(e, eIdx, maxPhases) s = effectScript.window s.height = 2.0 s.width = width s.horizontalAnchor = 'LEFT' s.verticalAnchor = 'CENTER' s.position = (x, 0.0, 1.0) self.component.addChild(s) x += width eIdx += 1 return
def createPhase(self, eIdx, pIdx, e, p, maxPhases): d = _debug() effects = chain() s = GUI.Window('') s.texture = d.renderTarget.texture uvs = d.phaseUV(eIdx, pIdx, len(effects), len(e.phases)) bl = (uvs[0], 1.0 - uvs[1]) tl = (uvs[0], 1.0 - uvs[3]) tr = (uvs[2], 1.0 - uvs[3]) br = (uvs[2], 1.0 - uvs[1]) s.mapping = (tl, bl, br, tr) s.horizontalAnchor = 'CENTER' s.verticalAnchor = 'TOP' s.materialFX = 'SOLID' self.setToClipMode(s) s.filterType = 'LINEAR' try: label = '%s (%d x %d)' % (p.name, p.renderTarget.width, p.renderTarget.height) except: label = '%s' % (p.name, ) l = self.addLabel(s, label) return s