
    љi                         S SK r S SKJr  S SKJr  SSKJr   " S S\5      r\S:X  a(  \" 5       r\ R                  " \R                  5       5        gg)	    N)time)
udp_client   )AnimationControllerBasec                   f   ^  \ rS rSrSS\S\S\S\S\S\4U 4S jjjrS	\S
\	4S jr
S rS rSrU =r$ )VRChatAnimationController   osc_address
animations
idling_keyhostportdebugc                    > [         TU ]  X#US9  Xl        X@l        XPl        [
        R                  " U R                  U R                  5      U l        g )N)r   r   r   )super__init__r
   r   r   r   SimpleUDPClientclient)selfr
   r   r   r   r   r   	__class__s          S/home/james-whalen/.local/lib/python3.13/site-packages/aiavatar/animation/vrchat.pyr   "VRChatAnimationController.__init__   sA    JUS&		 00DIIF    namedurationc                 \  #    U R                  [        5       U-   5        U R                  R                  U5      nUc   U R                  R                  SU S35        g U R                  R                  SU SU S35        U R                  R                  U R                  U5        Xl
        g 7f)NzAnimation 'z' is not registeredzanimation:  ())subscribe_resetr   r   getloggerwarninginfor   send_messager
   current_animation)r   r   r   	osc_values       r   animate!VRChatAnimationController.animate   s     TVh./OO''-	KK+dV3F GH;tfByk;<  !1!19=!%s   B*B,c                 &   U R                   R                  SU R                  U R                      SU R                   S35        U R                  R                  U R                  U R                  U R                     5        U R                  U l        g )NzReset animation: r   r   )r!   r#   r   r   r   r$   r
   r%   r   s    r   resetVRChatAnimationController.reset   sn    ,T__T__-M,NbQUQ`Q`Paabcd  !1!14??4??3ST!%r   c                 >     U R                  [        S5      S5        M  )NzAnimation name: g      @)r'   inputr*   s    r   test_osc"VRChatAnimationController.test_osc!   s    LL12C8 r   )r   r%   r   r
   r   )z/avatar/parameters/VRCEmoteNidlingz	127.0.0.1i(#  F)__name__
__module____qualname____firstlineno__strdictintboolr   floatr'   r+   r/   __static_attributes____classcell__)r   s   @r   r   r      sr    GC GSW Gjm G  B G  VY G  gk G G
&# 
& 
&1
9 9r   r   __main__)asyncior   	pythonoscr    r   r   r2   vrc_animation_controllerrunr/    r   r   <module>rD      sL        %9 7 9> z8:KK(1134 r   