Exemple #1
0
def loadImportFile(path, engine):
	object_loader = XMLObjectLoader(engine.getImagePool(), engine.getAnimationPool(), engine.getModel(), engine.getVFS())
	res = None
	try:
		res = object_loader.loadResource(fife.ResourceLocation(path))
		logger.log(fife.LogManager.LEVEL_LOG, 'imported object file ' + path)
	except WrongFileType:
		logger.log(fife.LogManager.LEVEL_LOG, 'ignored non-object file ' + path)
	except NameClash:
		logger.log(fife.LogManager.LEVEL_LOG, 'ignored already loaded file ' + path)
	
	return res
def loadImportFile(path, engine):
    object_loader = XMLObjectLoader(engine.getImagePool(), engine.getAnimationPool(), engine.getModel(), engine.getVFS())
    res = None
    try:
        res = object_loader.loadResource(fife.ResourceLocation(path))
        print 'imported object file ' + path
    except WrongFileType:
        pass
#        print 'ignored non-object file ' + path
    except NameClash:
        pass
#        print 'ignored already loaded file ' + path
    return res