本文整理汇总了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([])
示例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
示例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)
示例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()
示例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()
示例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)
示例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
示例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
示例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
示例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
示例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
示例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
示例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)