FadeIn

Hi, I’m adding fades to my application, but I can’t get them working. Please consider this example:

import direct.directbase.DirectStart
from direct.showbase.Transitions import Transitions
Transitions( loader ).fadeIn()
run()

This does nothing (seemingly). I would like to obtain a “fade in” effect. What am I missing?
Instead the fade out works correctly:

import direct.directbase.DirectStart
from direct.showbase.Transitions import Transitions
Transitions( loader ).fadeOut()
run()

How can I get the fade in working? Very thanks!

You cannot fade in without fading out before.
Consider this example:

import direct.directbase.DirectStart
from direct.showbase.Transitions import Transitions
t = Transitions(loader)
base.accept("a", t.fadeOut)
base.accept("s", t.fadeIn)
run()

Thank you! :slight_smile: