From e33cac03fe59a11d7578cd15c1a3599f4003db0f Mon Sep 17 00:00:00 2001 From: alan eborn Date: Wed, 15 Oct 2014 15:07:29 +0000 Subject: [PATCH] Transitions--changes to fade screen Signed-off-by: rdb --- direct/src/showbase/Transitions.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/direct/src/showbase/Transitions.py b/direct/src/showbase/Transitions.py index 7e3103a0d0..ca4919a48f 100644 --- a/direct/src/showbase/Transitions.py +++ b/direct/src/showbase/Transitions.py @@ -59,15 +59,12 @@ class Transitions: # Reload fade if its already been created if self.fade: - del self.fade + self.fade.destroy() self.fade = None self.loadFade() def loadFade(self): - if not self.fadeModel: - self.fadeModel = loader.loadModel(self.FadeModelName) - - if self.fade == None: + if self.fade is None: # We create a DirectFrame for the fade polygon, instead of # simply loading the polygon model and using it directly, # so that it will also obscure mouse events for objects @@ -80,10 +77,15 @@ class Transitions: image_scale = (4, 2, 2), state = DGG.NORMAL, ) + if not self.fadeModel: + # No fade model was given, so we make this the fade model. + self.fade["relief"] = DGG.FLAT + self.fade["frameSize"] = (-2, 2, -1, 1) + self.fade["frameColor"] = (0, 0, 0, 1) + self.fade.setTransparency(TransparencyAttrib.MAlpha) self.fade.setBin('unsorted', 0) self.fade.setColor(0,0,0,0) - def getFadeInIval(self, t=0.5, finishIval=None): """ Returns an interval without starting it. This is particularly useful in