当前位置: 首页>>代码示例>>Python>>正文


Python PostProcessing.chain方法代码示例

本文整理汇总了Python中PostProcessing.chain方法的典型用法代码示例。如果您正苦于以下问题:Python PostProcessing.chain方法的具体用法?Python PostProcessing.chain怎么用?Python PostProcessing.chain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PostProcessing的用法示例。


在下文中一共展示了PostProcessing.chain方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: disable

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
    def disable(self):
        self.__curMode = None
        for effect in self.__curEffects:
            effect.disable()

        self.__curEffects = []
        PostProcessing.chain([])
开发者ID:wotmods,项目名称:WOTDecompiled,代码行数:9,代码来源:__init__.py

示例2: removeEffect

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
def removeEffect(effect):
    ch = list(PostProcessing.chain())
    try:
        ch.remove(effect)
        PostProcessing.chain(ch)
    except ValueError:
        pass
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:9,代码来源:bloom.py

示例3: detach

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
    def detach(self, actor, source, target = None):
        ch = PostProcessing.chain()
        for effect in actor:
            try:
                ch.remove(effect)
            except ValueError:
                pass

        PostProcessing.chain(ch)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:11,代码来源:ppscreen.py

示例4: init

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
 def init(self):
     self.__loadSettings()
     PostProcessing.g_graphicsSettingListeners.append(_FuncObj(self, 'onSelectQualityOption'))
     PostProcessing.init()
     PostProcessing.chain(None)
     section = ResMgr.openSection(WGPostProcessing.__CONFIG_FILE_NAME)
     self.__load(section)
     for mode in self.__modes.itervalues():
         for effect in mode:
             effect.create()
开发者ID:wotmods,项目名称:WOTDecompiled,代码行数:12,代码来源:__init__.py

示例5: onBlurred

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
    def onBlurred(self, callbackFn):
        import PostProcessing
        c = list(PostProcessing.chain())
        ch = []
        for e in c:
            if e.name != 'Teleport Progress Bar':
                ch.append(e)

        PostProcessing.chain(ch)
        if callbackFn:
            callbackFn()
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:13,代码来源:progressbar.py

示例6: enable

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
    def enable(self, mode):
        if self.__modes.get(mode, None) is None:
            LOG_WARNING('Effect mode with name %s was not found.' % mode)
            return
        self.__curMode = mode
        self.__gatherEffects('common')
        self.__gatherEffects(mode)
        chain = []
        for effect in self.__curEffects:
            chain += effect.enable(self.__settings)

        PostProcessing.chain(chain)
开发者ID:wotmods,项目名称:WOTDecompiled,代码行数:14,代码来源:__init__.py

示例7: preTeleport

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
 def preTeleport(self, callbackFn):
     import PostProcessing
     effect = PostProcessing.blur()
     effect.name = 'Teleport Progress Bar'
     effect.phases[-1].renderTarget = BigWorld.RenderTarget('teleportGobo', -3, -3)
     effect.phases[-1].material.additionalAlpha = 1.0
     c = list(PostProcessing.chain())
     c.append(effect)
     PostProcessing.chain(c)
     self.component.secondaryTexture = effect.phases[-1].renderTarget.texture
     self.component.freeze = None
     self.component.fader.value = 1.0
     BigWorld.callback(self.component.fader.speed, lambda : self.onBlurred(callbackFn))
     return
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:16,代码来源:progressbar.py

示例8: init

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
    def init(self):
        self.__loadSettings()
        PostProcessing.g_graphicsSettingListeners.append(_FuncObj(self, 'onSelectQualityOption'))
        PostProcessing.init()
        PostProcessing.chain(None)
        section = ResMgr.openSection(WGPostProcessing.__CONFIG_FILE_NAME)
        self.__load(section)
        for mode in self.__modes.itervalues():
            for effect in mode:
                effect.create()

        from account_helpers.SettingsCore import g_settingsCore
        g_settingsCore.onSettingsChanged += self.__onSettingsChanging
        return
开发者ID:19colt87,项目名称:WOTDecompiled,代码行数:16,代码来源:__init__.py

示例9: getShimmerEffect

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
def getShimmerEffect():
    import PostProcessing
    c = PostProcessing.chain()
    for e in c:
        if e.name == 'heatShimmer':
            return e

    return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:10,代码来源:shimmer.py

示例10: _getBloomEffect

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
def _getBloomEffect():
    """
    This function finds the bloom effect in the post-processing chain
    """
    chain = PostProcessing.chain()
    for e in chain:
        if e.name in ('Bloom', 'bloom'):
            return e

    return None
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:12,代码来源:bloom.py

示例11: loadStyle

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
def loadStyle(ds, fadeSpeed = 1.0):
    """
    This function loads a bloom style from the given data section.  It smoothly
    changes from the current bloom settings to the new settings over
    "fadeSpeed" seconds.
    """
    newBloom = None
    if ds != None:
        enable = ds.readBool('enable', True)
        filterMode = ds.readInt('filterMode', 1)
        bloomBlur = ds.readBool('bloomAndBlur', True)
        attenuation = ds.readVector4('attenuation', (1, 1, 1, 1))
        attenuation *= attenuation.w
        attenuation.w = 1.0
        numPasses = ds.readInt('numPasses', 2)
        power = ds.readFloat('power', 8)
        width = ds.readFloat('width', 1.0)
        if bloomBlur:
            newBloom = PostProcessing.Effects.Bloom.bloom(filterMode, attenuation, numPasses, width, power)
        else:
            newBloom = PostProcessing.Effects.Bloom.blur(filterMode, attenuation, numPasses, width)
    else:
        print 'Bloom.loadStyle : No DataSection was provided'
        return
    ch = list(PostProcessing.chain())
    oldBloomList = _getBloomEffects()
    for oldBloom in oldBloomList:
        v4mDn = Math.Vector4Morph((1, 1, 1, 1))
        v4mDn.duration = fadeSpeed
        v4mDn.target = (0, 0, 0, 0)
        oldBloom.phases[-1].material.alpha = v4mDn
        oldBloom.bypass = v4mDn
        BigWorld.callback(fadeSpeed, partial(removeEffect, oldBloom))

    ch.append(newBloom)
    v4mUp = Math.Vector4Morph((0, 0, 0, 0))
    v4mUp.duration = fadeSpeed
    v4mUp.target = (1, 1, 1, 1)
    newBloom.phases[-1].material.alpha = v4mUp
    newBloom.bypass = v4mUp
    PostProcessing.chain(ch)
    return
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:44,代码来源:bloom.py

示例12: _getBloomEffects

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
def _getBloomEffects():
    """
    This function finds all bloom effects in the post-processing chain
    """
    blooms = []
    chain = PostProcessing.chain()
    for e in chain:
        if e.name in ('Bloom', 'bloom'):
            blooms.append(e)

    return blooms
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:13,代码来源:bloom.py

示例13: attach

# 需要导入模块: import PostProcessing [as 别名]
# 或者: from PostProcessing import chain [as 别名]
 def attach(self, actor, source, target = None):
     ch = PostProcessing.chain()
     ch += actor
     PostProcessing.chain(ch)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:6,代码来源:ppscreen.py


注:本文中的PostProcessing.chain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。