
    ^j                       d dl mZ d dlmZ d dlmZmZmZmZm	Z	 erd dlm
Z
 d dlmZmZ  e            Zej        Zej        Zej        Zej        Z G d de          Z G d d	e	          Z G d
 de          Z G d de          ZddZdS )    )annotations)TYPE_CHECKING)CodecRegistryDecoderEncoderDecodeExceptionEncodeException)BinaryIO)ModelScenec                      e Zd ZdS )ModelDecodeExceptionN__name__
__module____qualname__     W/home/agentuser/manim-venv/lib/python3.11/site-packages/pyglet/model/codecs/__init__.pyr   r              Dr   r   c                      e Zd ZdS )ModelEncodeExceptionNr   r   r   r   r   r      r   r   r   c                      e Zd Zd	dZdS )
ModelDecoderfilenamestrfileBinaryIO | Nonereturnr   c                    t                      )zDecode the given file object and return a Scene instance.

        Throws ModelDecodeException if there is an error. If passing
        a ``file`` object, ``filename`` should be provided as a hint
        to the file type.
        NotImplementedError)selfr   r   s      r   decodezModelDecoder.decode   s     "###r   N)r   r   r   r   r   r   )r   r   r   r$   r   r   r   r   r      s(        $ $ $ $ $ $r   r   c                      e Zd Zdd	Zd
S )ModelEncodermodelr   r   r   r   r   r   Nonec                    t                      )z)Encode the given model to the given file.r!   )r#   r'   r   r   s       r   encodezModelEncoder.encode(   s    !###r   N)r'   r   r   r   r   r   r   r(   )r   r   r   r*   r   r   r   r&   r&   &   s(        $ $ $ $ $ $r   r&   r   r(   c                     	 ddl m}  t                              |            n# t          $ r Y nw xY w	 ddl m} t                              |           d S # t          $ r Y d S w xY w)Nr   )obj)gltf)pyglet.model.codecsr,   registryadd_decodersImportErrorr-   )r,   r-   s     r   add_default_codecsr2   -   s    ++++++c""""   ,,,,,,d#####   s    # 
00 A 
A$#A$N)r   r(   )
__future__r   typingr   pyglet.utilr   r   r   r   r	   r
   pyglet.modelr   r   r/   r0   add_encodersget_decodersget_encodersr   r   r   r&   r2   r   r   r   <module>r:      sx   " " " " " "             Y Y Y Y Y Y Y Y Y Y Y Y Y Y *)))))))) =??$$$$	 	 	 	 	? 	 	 		 	 	 	 	? 	 	 	$ $ $ $ $7 $ $ $$ $ $ $ $7 $ $ $     r   