scenes.Scenes

moderngl_window.resources.scenes.Scenes[source]

Handles scene loading

Methods

Scenes.__init__()

Initialize internal attributes

Scenes.load(meta: moderngl_window.meta.scene.SceneDescription) → moderngl_window.scene.scene.Scene[source]

Load a scene with the configured loaders.

Parameters:meta (SceneDescription) – The resource description
Returns:The loaded scene
Return type:Scene
Scenes.add(meta: moderngl_window.meta.base.ResourceDescription) → None

Adds a resource description without loading it. The resource is loaded and returned when load_pool() is called.

Parameters:meta (ResourceDescription) – The resource description
Scenes.load_pool() → Generator[Tuple[moderngl_window.meta.base.ResourceDescription, Any], None, None]

Loads all the data files using the configured finders.

This is only relevant when resource have been added to this pool using add().

Returns:Generator of (meta, resoure) tuples
Scenes.resolve_loader(meta: moderngl_window.meta.base.ResourceDescription) → None

Attempts to assign a loader class to a ResourceDecription.

Parameters:meta (ResourceDescription) – The resource description instance

Attributes

Scenes.settings_attr = 'SCENE_LOADERS'
Scenes.count

The number of resource descriptions added. This is only relevant when using add and load_pool.

Type:int
Scenes.loaders

Loader classes for this resource type

Type:Generator