simfile.assets

Module Contents

Classes

Assets

Asset loader for a simfile directory.

class simfile.assets.Assets(simfile_dir: str, *, simfile: Optional[simfile.types.Simfile] = None, filesystem: fs.base.FS = NativeOSFS(), **kwargs)

Asset loader for a simfile directory.

This loader uses the same heuristics as StepMania to determine a default path for assets not specified in the simfile. For example, if the BACKGROUND property is missing or blank, StepMania will look for an image whose filename contains “background” or ends with “bg”.

The simfile will be loaded from the simfile_dir unless an explicit simfile argument is supplied. This is intended mostly as an optimization for when the simfile has already been loaded from disk.

All asset paths are absolute and normalized. Keyword arguments are passed down to simfile.open() (and are only valid if simfile is not provided).

property music(self)
property banner(self)
property background(self)
property cdtitle(self)
property jacket(self)
property cdimage(self)
property disc(self)