Package horizons :: Package util :: Package loaders :: Module actionsetloader :: Class ActionSetLoader
[hide private]
[frames] | no frames]

Class ActionSetLoader

source code

The ActionSetLoader loads action sets from a directory tree. The directories loaded begin with 'as_' to tell tell the loader that they are an action set. directory structure is as follows: <action_set>/<action>/<rotation>/<framenumber>.png for example that would be: fisher1/work/90/0.png Note that all directories except for the rotation dir, all dirs have to be empty and must not include additional action sets.

Class Methods [hide private]
_find_action_sets(cls, Dir)
Traverses recursively starting from dir to find action sets.
source code
load(cls) source code
get_sets(cls) source code
get_set(cls, action_set_name) source code
Class Variables [hide private]
  log = logging.getLogger("util.loaders.actionsetloader")
  action_sets = {}
  _loaded = False
Method Details [hide private]

_find_action_sets(cls, Dir)
Class Method

source code 

Traverses recursively starting from dir to find action sets. It is similar to os.walk, but more optimized for this use case.

get_set(cls, action_set_name)
Class Method

source code 
  • action_set_name - The name of the action_set. @return None if action_set is not found.