
    kj-                     J    d dl mZmZ d dlmZ d dlmZ  G d de          ZdS )    )AnyOptional)AttributeNames)ResourceDescriptionc                        e Zd ZdZdZdZdddefdee         dee         de	d	e
e         d
ef
 fdZede	fd            Zedefd            Z xZS )SceneDescriptiona  Describes a scene to load.

    The correct loader is resolved by looking at the file extension.
    This can be overridden by specifying a ``kind`` that maps directly
    to a specific loader class.

    .. code:: python

        # Wavefront/obj file
        SceneDescription(path='scenes/cube.obj')

        # stl file
        SceneDescription(path='scenes/crater.stl')

        # GLTF 2 file
        SceneDescription(path='scenes/sponza.gltf')

    The user can also override what buffer/attribute names
    should be used by specifying ``attr_names``.

    A ``cache`` option is also available as some scene loaders
    supports converting the file into a different format
    on the fly to speed up loading.
     scenesNFpathkindcache
attr_nameskwargsc                     |t           }|                    ||||d            t                      j        di | dS )a7  Create a scene description.

        Keyword Args:
            path (str): Path to resource
            kind (str): Loader kind
            cache (str): Use the loader caching system if present
            attr_names (AttributeNames): Attrib name config
            **kwargs: Optional custom attributes
        N)r   r   r   r    )r   updatesuper__init__)selfr   r   r   r   r   	__class__s         U/home/agentuser/manim-venv/lib/python3.11/site-packages/moderngl_window/meta/scene.pyr   zSceneDescription.__init__$   sR    " 'JtTEQ[\\]]]""6"""""    returnc                 6    t          | j        d                   S )z'bool: Use cache feature in scene loaderr   )bool_kwargsr   s    r   r   zSceneDescription.cache;   s     DL)***r   c                     | j         d         S )z%AttributeNames: Attribute name configr   )r   r   s    r   r   zSceneDescription.attr_names@   s     |L))r   )__name__
__module____qualname____doc__default_kindresource_typer   r   strr   typer   r   propertyr   r   __classcell__)r   s   @r   r   r      s         2 LM #"+9# #sm# sm# 	#
 (# # # # # # #. +t + + + X+ *N * * * X* * * * *r   r   N)typingr   r   #moderngl_window.geometry.attributesr   moderngl_window.meta.baser   r   r   r   r   <module>r,      sv                    > > > > > > 9 9 9 9 9 9<* <* <* <* <** <* <* <* <* <*r   