Package motherhamster :: Module cheekpouches :: Class GenericAssetPouch

Class GenericAssetPouch



object --+
         |
        GenericAssetPouch
Known Subclasses:
SimpleAssetPouch, imageassets._ImagePouch, prettytext._FontPouch, soundassets._SoundPouch

the base class for asset pouches

Instance Methods
 
__init__(self, classtype, broken_reference=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
AvailableAssetIDs(self)
returns a list of strings for valid asset names
 
RefreshAssetPaths(self)
 
AssetExtensions(self)
returns a list of supported extensions, lowercase with dot prefix
 
NewAssetExtension(self)
gets the extension for new assets (should be lowercase and start with .) return None if this pouch does not support new assets
 
GetAssetPathForID(self, assetid)
find the best matching asset path for a given id
 
DisgorgeAsset(self, assetid)
either retrieves the loaded asset or loads it
 
AddAssetWithPath(self, asset, asset_path)
 
UpdateAsset(self, assetid)
saves the in-memory copy of an asset to persistent storage
 
RevertAsset(self, assetid)
sets the in-memory copy of an asset to it's persistent storage copy if loaded note that this updates the in-memory copy, as opposed to making a new copy
 
ClassType(self)
gets the type which defines the interface of loaded assets from this pouch loaded objects may not be of this type, in a pythonic fashion
 
CreateNewAsset(self, asset_path)
creates a newasset

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, classtype, broken_reference=None)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)