Package motherhamster :: Module cheekpouches :: Class AssetRef

Class AssetRef



   object --+    
            |    
AssetProperty --+
                |
               AssetRef

the only valid way to reference an asset - put one of these as a descriptor on your class for a reference to an asset, switch assets by assigning this to the assetid, access the asset through this descriptor exclusively - if you don't, your object will serialize incorrectly The descriptor will store the assetid in an attribute on the instance, using the key you assign the AssetRef descriptor to on the class

Instance Methods
 
__init__(self, asset_type, default_assetid='!', description=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__get__(self, obj, objtype=None)
 
__set__(self, obj, value)
 
__delete__(self, obj)
 
get_assetid(self, obj)

Inherited from AssetProperty: asset_has_default

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

Properties

Inherited from object: __class__

Method Details

__init__(self, asset_type, default_assetid='!', description=None)
(Constructor)

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