All pastes #419450 Raw Edit

Cody Brocious

public python v1 · immutable
·published 2007-04-01 10:36 UTC
rendered paste body
from Modules.BaseModule import BaseModulefrom Intermediaries import ShaderAATfrom NGCCBase import NGCCExceptionclass NGCCSplitShadersException(NGCCException):    passclass SplitShaders(BaseModule):    __expects__ = ShaderAAT.ShaderAAT    __returns__ = list        def process(self, input):        out = []                data = []                for elem in input:            if elem.__class__ not in (ShaderAAT.Function, ShaderAAT.Technique):                data.append(elem)                for elem in input:            if elem.__class__ in (ShaderAAT.Function, ShaderAAT.Technique):                func = ShaderAAT.ShaderAAT()                for other in data:                    func.append(other)                func.append(elem)                                out.append((elem.__class__, func))                return out