From 312f7352af6f49b8b598ec8b6bbe0823af4dc640 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 15 Feb 2001 17:38:17 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/ffi/FFIExternalObject.py | 12 +++++++++--- direct/src/showbase/Loader.py | 11 ++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/direct/src/ffi/FFIExternalObject.py b/direct/src/ffi/FFIExternalObject.py index 7377ad2186..d4fe62f501 100644 --- a/direct/src/ffi/FFIExternalObject.py +++ b/direct/src/ffi/FFIExternalObject.py @@ -201,12 +201,18 @@ class FFIExternalObject: baseRepr = baseRepr + '\n' + lineStream.getLine() except: try: - # Ok, no write function, lets try output then - self.output(lineStream) + # Sometimes write insists on a seconds parameter. + self.write(lineStream, 0) while lineStream.isTextAvailable(): baseRepr = baseRepr + '\n' + lineStream.getLine() except: - pass + try: + # Ok, no write function, lets try output then + self.output(lineStream) + while lineStream.isTextAvailable(): + baseRepr = baseRepr + '\n' + lineStream.getLine() + except: + pass # In any case, return the baseRepr return baseRepr diff --git a/direct/src/showbase/Loader.py b/direct/src/showbase/Loader.py index 533e142d54..13d1772529 100644 --- a/direct/src/showbase/Loader.py +++ b/direct/src/showbase/Loader.py @@ -75,12 +75,17 @@ class Loader: ModelPool.releaseModel(modelPath) # texture loading funcs - def loadTexture(self, texturePath): + def loadTexture(self, texturePath, alphaPath = None): """loadTexture(self, string) Attempt to load a texture from the given file path using TexturePool class. Returns None if not found""" - Loader.notify.info("Loading texture: %s" % (texturePath) ) - texture = TexturePool.loadTexture(texturePath) + + if alphaPath == None: + Loader.notify.info("Loading texture: %s" % (texturePath) ) + texture = TexturePool.loadTexture(texturePath) + else: + Loader.notify.info("Loading texture: %s %s" % (texturePath, alphaPath) ) + texture = TexturePool.loadTexture(texturePath, alphaPath) return texture def unloadTexture(self, texture):