I have a common filter. The filter has a variable. The variable has to grow up or down depending on how big it is.
Here is the code:
### Effects
fltr = CommonFilters(base.win, base.cam)
fltr.setBloom(blend=(0.3, 0.4, 0.3, 0.0), mintrigger=0.6, maxtrigger=7.0, desat=5.6, intensity=10.0, size="big")
def vlght_upd(task):
up=True
if up==True:
dc = +0.01
else:
dc = -0.01
if dc==1.000 and up==True:
up==False
if dc==0.900 and up==False:
up==True
dc==0.90
fltr.setVolumetricLighting(sphere, 32, 0.5, dc, 0.05)
return task.again
upd_vlght = taskMgr.doMethodLater(0.09, vlght_upd, 'woo!')
And nothing… I did this million times before, but in panda it did not work!
EDIT:
OK, it seems that I’ve written it bad, in python it does not work:
up=True
while 1==1:
dc=0.90
if up==True:
dc += 0.01
else:
dc -= 0.01
if dc>=1.000 and up==True:
up=False
if dc<=0.900 and up==False:
up=True
print dc, up
-Cheers.
–Mešča