|
@@ -32,7 +32,7 @@ class Loader:
|
|
|
Attempt to load a model from given file path, return
|
|
Attempt to load a model from given file path, return
|
|
|
a nodepath to the model if successful or None otherwise.
|
|
a nodepath to the model if successful or None otherwise.
|
|
|
"""
|
|
"""
|
|
|
- assert(Loader.notify.debug("Loading model: %s" % (modelPath) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading model: %s" % (modelPath)))
|
|
|
if phaseChecker:
|
|
if phaseChecker:
|
|
|
phaseChecker(modelPath)
|
|
phaseChecker(modelPath)
|
|
|
node = self.loader.loadSync(Filename(modelPath))
|
|
node = self.loader.loadSync(Filename(modelPath))
|
|
@@ -196,12 +196,12 @@ class Loader:
|
|
|
TexturePool class. Returns None if not found
|
|
TexturePool class. Returns None if not found
|
|
|
"""
|
|
"""
|
|
|
if alphaPath is None:
|
|
if alphaPath is None:
|
|
|
- assert(Loader.notify.debug("Loading texture: %s" % (texturePath) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading texture: %s" % (texturePath)))
|
|
|
if phaseChecker:
|
|
if phaseChecker:
|
|
|
phaseChecker(texturePath)
|
|
phaseChecker(texturePath)
|
|
|
texture = TexturePool.loadTexture(texturePath)
|
|
texture = TexturePool.loadTexture(texturePath)
|
|
|
else:
|
|
else:
|
|
|
- assert(Loader.notify.debug("Loading texture: %s %s" % (texturePath, alphaPath) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading texture: %s %s" % (texturePath, alphaPath)))
|
|
|
if phaseChecker:
|
|
if phaseChecker:
|
|
|
phaseChecker(texturePath)
|
|
phaseChecker(texturePath)
|
|
|
texture = TexturePool.loadTexture(texturePath, alphaPath)
|
|
texture = TexturePool.loadTexture(texturePath, alphaPath)
|
|
@@ -216,7 +216,7 @@ class Loader:
|
|
|
Returns a 3-D Texture object, suitable for rendering
|
|
Returns a 3-D Texture object, suitable for rendering
|
|
|
volumetric textures, if successful, or None if not.
|
|
volumetric textures, if successful, or None if not.
|
|
|
"""
|
|
"""
|
|
|
- assert(Loader.notify.debug("Loading 3-D texture: %s" % (texturePattern) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading 3-D texture: %s" % (texturePattern)))
|
|
|
if phaseChecker:
|
|
if phaseChecker:
|
|
|
phaseChecker(texturePattern)
|
|
phaseChecker(texturePattern)
|
|
|
texture = TexturePool.load3dTexture(texturePattern)
|
|
texture = TexturePool.load3dTexture(texturePattern)
|
|
@@ -232,7 +232,7 @@ class Loader:
|
|
|
None if not.
|
|
None if not.
|
|
|
|
|
|
|
|
"""
|
|
"""
|
|
|
- assert(Loader.notify.debug("Loading cube map: %s" % (texturePattern) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading cube map: %s" % (texturePattern)))
|
|
|
if phaseChecker:
|
|
if phaseChecker:
|
|
|
phaseChecker(texturePattern)
|
|
phaseChecker(texturePattern)
|
|
|
texture = TexturePool.loadCubeMap(texturePattern)
|
|
texture = TexturePool.loadCubeMap(texturePattern)
|
|
@@ -251,12 +251,12 @@ class Loader:
|
|
|
The texture parameter may be the return value of any previous
|
|
The texture parameter may be the return value of any previous
|
|
|
call to loadTexture(), load3DTexture(), or loadCubeMap().
|
|
call to loadTexture(), load3DTexture(), or loadCubeMap().
|
|
|
"""
|
|
"""
|
|
|
- assert(Loader.notify.debug("Unloading texture: %s" % (texture) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Unloading texture: %s" % (texture)))
|
|
|
TexturePool.releaseTexture(texture)
|
|
TexturePool.releaseTexture(texture)
|
|
|
|
|
|
|
|
# sound loading funcs
|
|
# sound loading funcs
|
|
|
def loadSfx(self, name):
|
|
def loadSfx(self, name):
|
|
|
- assert(Loader.notify.debug("Loading sound: %s" % (name) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading sound: %s" % (name)))
|
|
|
if phaseChecker:
|
|
if phaseChecker:
|
|
|
phaseChecker(name)
|
|
phaseChecker(name)
|
|
|
# should return a valid sound obj even if soundMgr is invalid
|
|
# should return a valid sound obj even if soundMgr is invalid
|
|
@@ -269,7 +269,7 @@ class Loader:
|
|
|
return sound
|
|
return sound
|
|
|
|
|
|
|
|
def loadMusic(self, name):
|
|
def loadMusic(self, name):
|
|
|
- assert(Loader.notify.debug("Loading sound: %s" % (name) ))
|
|
|
|
|
|
|
+ assert(Loader.notify.debug("Loading sound: %s" % (name)))
|
|
|
# should return a valid sound obj even if musicMgr is invalid
|
|
# should return a valid sound obj even if musicMgr is invalid
|
|
|
sound = None
|
|
sound = None
|
|
|
if (name):
|
|
if (name):
|