
    ai8                     h   S SK r S SKJrJrJr  S SKJr  S SKJr  S SK	J
r
Jr   " S S5      r " S S	\\5      r " S
 S\\5      r " S S\\5      r " S S\5      r " S S\\5      r " S S\5      r " S S\5      r " S S\\5      r " S S\
\5      r " S S\\5      r " S S\\\\5      r " S S\\\5      r " S  S!\\\5      r " S" S#\5      r " S$ S%\5      r " S& S'\5      r " S( S)\5      r " S* S+\5      r\\\\\\\\\\\\\\\\\\4r\ S,:X  a  S S-K!J"r"  \ H  r#\"" \#5        M     gg).    N)PanelMenuUIList)PropertyPanel)PropertiesAnimationMixin)MotionPathButtonsPanelMotionPathButtonsPanel_displayc                   0    \ rS rSrSrSrSr\S 5       rSr	g)ArmatureButtonsPanel   
PROPERTIESWINDOWdatac                     UR                   $ N)armatureclscontexts     f/home/wildlama/Downloads/blender-5.1.2-linux-x64/5.1/scripts/startup/bl_ui/properties_data_armature.pypollArmatureButtonsPanel.poll   s         N)
__name__
__module____qualname____firstlineno__bl_space_typebl_region_type
bl_contextclassmethodr   __static_attributes__r   r   r   r   r      s#     MNJ   r   r   c                   $    \ rS rSrSrS1rS rSrg)DATA_PT_context_arm    HIDE_HEADERc                     U R                   nUR                  nUR                  nUR                  nU(       a  UR	                  US5        g U(       a  UR	                  US5        g g )Nr   pin_id)layoutobjectr   
space_datatemplate_ID)selfr   r+   obarmspaces         r   drawDATA_PT_context_arm.draw   sU    ^^""r6*uh/ r   r   Nr   r   r   r   bl_label
bl_optionsr3   r#   r   r   r   r%   r%      s    HJ
0r   r%   c                       \ rS rSrSrS rSrg)DATA_PT_pose+   Posec                 r    U R                   nUR                  nUR                  5       R                  USSS9  g )Npose_positionTexpand)r+   r   rowprop)r/   r   r+   r1   s       r   r3   DATA_PT_pose.draw.   s1    

#t<r   r   Nr   r   r   r   r6   r3   r#   r   r   r   r9   r9   +   s    H=r   r9   c                   $    \ rS rSrSrS1rS rSrg)DATA_PT_display6   zViewport DisplayDEFAULT_CLOSEDc                 4   U R                   nSUl        UR                  nUR                  nUR	                  USSS9  UR                  SS9nUR	                  USSS9  UR	                  US	S
S9  UR	                  USSS9  U(       a  UR	                  USSS9  UR                  SSS9nUR                  SS9nUR	                  USSS9  UR                  SS9nUR                  Ul        UR	                  USSS9  UR                  SS9nUR	                  USSSS9  g )NTdisplay_typez
Display AstextShow)heading
show_namesNamesshow_bone_custom_shapesShapesshow_bone_colorszBone Colorsshow_in_frontzIn FrontFAxes)alignrM   rU   	show_axesr'   axes_positionPositionrelation_line_position	Relations)rK   r?   )	r+   use_property_splitr,   r   rA   columnr@   rW   active)r/   r   r+   r0   r1   colr@   subs           r   r3   DATA_PT_display.draw:   s   $(!^^Cl;mmFm+l1/h?(}=HHRzH:mm%m8ggDg!k+ggDg!]]
oJ7ggDg!.[Nr   r   Nr5   r   r   r   rE   rE   6   s    !H"#JOr   rE   c                       \ rS rSrS rSrg)DATA_UL_bone_collectionsV   c	                    UR                   R                  =(       d    UR                  R                  n	U	=(       a    UR                  U	R                  ;   n
UR                  USSSU
(       a  SOSS9  UR                  (       a(  UR                  (       a  SOSnUR                  USSSUS9  UR                  US	SSUR                  (       a  S
OSS9  g )Nnamer'   FDOTBLANK1)rK   embossiconLIBRARY_DATA_OVERRIDEis_local_override
is_visibleHIDE_OFFHIDE_ON)	
edit_bonesr^   bonesrf   collectionsrA   override_libraryrl   rm   )r/   _contextr+   r   bcoll_icon_active_data_active_propname_indexactive_bonehas_active_bonerj   s               r   	draw_item"DATA_UL_bone_collections.draw_itemW   s    ))00IHNN4I4I%O%**8O8O*OE65u]ef$$.3.E.E*8DKK2EPTKUE<bSXScScZirsr   r   Nr   r   r   r   r|   r#   r   r   r   rc   rc   V   s    
tr   rc   c                       \ rS rSrSrS rSrg)DATA_PT_bone_collectionsd   Bone Collectionsc                    U R                   nUR                  nUR                  R                  nUR	                  5       nUR                  5         UR                  SS9nUR                  SSSS9  UR                  SSSS9  UR                  5         UR                  S	S
SS9  U(       a<  UR                  5         SUR                  SSSS9l
        SUR                  SSSS9l
        UR                  S;   ao  UR	                  5       nUR	                  SS9nUR                  SSS9  UR                  SSS9  UR	                  SS9nUR                  SSS9  UR                  SSS9  g g )NTrV   armature.collection_addADDr'   rj   rK   armature.collection_removeREMOVE#ARMATURE_MT_collection_context_menuDOWNARROW_HLTUPzarmature.collection_moveTRIA_UPDOWN	TRIA_DOWN>   POSEPAINT_WEIGHTEDIT_ARMATUREarmature.collection_assignAssignrJ   armature.collection_unassignRemovearmature.collection_selectSelectarmature.collection_deselectDeselect)r+   r   rr   r^   r@   template_bone_collection_treer]   operator	separatormenu	directionmode)r/   r   r+   r1   active_bcollr@   r_   r`   s           r   r3   DATA_PT_bone_collections.drawg   sM   --jjl))+jjtj$.UD1rJ6_SUVMMOZ^CLL3)"LMW\bCLL3+BLOY<<DD**,C'''%CLL5HLELL7hLG'''%CLL5HLELL7jLI Er   r   NrC   r   r   r   r   r   d   s    !HJr   r   c                       \ rS rSrSrS rSrg)r      zBone Collection Specialsc                     U R                   nUR                  S5        UR                  S5        UR                  5         UR                  SSS9  g )Narmature.collection_show_allarmature.collection_unsolo_all!armature.collection_remove_unusedzRemove UnusedrJ   )r+   r   r   r/   r   r+   s      r   r3   (ARMATURE_MT_collection_context_menu.draw   sB    6789;/Rr   r   NrC   r   r   r   r   r      s    )HSr   r   c                       \ rS rSrSrS rSrg)(ARMATURE_MT_collection_tree_context_menu   r   c                    U R                   nUR                  nUR                  R                  =(       a%    UR                  R                  R                  (       + nUR                  5       nU(       + Ul        UR                  SSS9  UR                  S5        UR                  SSS9  UR                  5         UR                  S5        UR                  S5        UR                  5         UR                  5       nU(       + Ul        UR                  S	S
S9  UR                  SSS9  UR                  5         UR                  SSS9  UR                  SSS9  UR                  5         UR                  SSS9  g )Nr   zAdd Bone CollectionrJ   r   r   zRemove Unused Collectionsr   r   r   zAssign Selected Bonesr   zRemove Selected Bonesr   zSelect Bonesr   zDeselect BonesUI_OT_view_item_renameRename)	r+   r   rr   r^   is_editabler]   enabledr   r   )r/   r   r+   r1   active_bcoll_is_lockedr`   s         r   r3   -ARMATURE_MT_collection_tree_context_menu.draw   s?   !$!7!7!b@V@V@b@b<b
 mmo00.5JK128?Z[6789
 mmo0018OP3:QR4>J6=MN0x@r   r   NrC   r   r   r   r   r      s    !H$Ar   r   c                   4    \ rS rSrSrS1r\S 5       rS rSr	g)DATA_PT_iksolver_itasc   zInverse KinematicsrG   c                 D    UR                   nU=(       a    UR                  $ r   )r,   poser   r   r0   s      r   r   DATA_PT_iksolver_itasc.poll   s    ^^~bggr   c                    U R                   nSUl        UR                  nUR                  R                  nUR                  UR                  S5        U(       Ga  UR                  US5        UR                  US5        UR                  S:H  nU(       a  UR                  USSS9  UR                  5       nU(       + =(       d    UR                  S	:g  Ul	        UR                  US
5        UR                  US5        U(       af  UR                  US5        UR                  SS9nUR                  (       a#  UR                  USSS9  UR                  USSS9  OUR                  USSS9  UR                  US5        U(       a$  UR                  US5        UR                  US5        UR                  S:X  a5  UR                  5         UR                  USSSS9  UR                  USSSS9  g g g )NT	ik_solverr   translate_root_bones
SIMULATIONreiteration_methodFr>   NEVER	precision
iterationsuse_auto_steprV   step_minz	Steps MinrJ   step_maxMax
step_countStepssolverfeedbackvelocity_maxDLSdamping_maxzDamping Max)rK   sliderdamping_epsilonzDamping Epsilon)r+   r\   r,   r   ik_paramrA   r   r]   r   r^   r   r   r   )r/   r   r+   r0   itasc
simulationr_   r`   s           r   r3   DATA_PT_iksolver_itasc.draw   s   $(!^^  BGG[)KKv&KK56**4JE#7F--/C'N5+C+Cw+NCJHHUK(HHUL)0mm$m/&&HHUJ[HAHHUJUH;HHULwH?HHUH%
+/||u$M$O 18IRVW %3 r   r   N)
r   r   r   r   r6   r7   r"   r   r3   r#   r   r   r   r   r      s'    #H"#J %Xr   r   c                   4    \ rS rSrS1rSr\S 5       rS rSr	g)DATA_PT_motion_paths   rG   r   c                 @    UR                   =(       a    UR                  $ r   r,   r   r   s     r   r   DATA_PT_motion_paths.poll        6W%5%56r   c                     UR                   nUR                  R                  nUR                  nU(       a  UR                  OS nU R                  XUSS9  g NT)rq   r,   r   animation_visualizationactive_pose_bonemotion_pathdraw_settingsr/   r   r0   avspchanmpaths         r   r3   DATA_PT_motion_paths.draw   K     ^^gg--((%*!!7d;r   r   N)
r   r   r   r   r7   r!   r"   r   r3   r#   r   r   r   r   r      s&    "#JJ7 7	<r   r   c                   8    \ rS rSrSrSrS1r\S 5       rS r	Sr
g)	DATA_PT_motion_paths_displayi  r   r   rG   c                 @    UR                   =(       a    UR                  $ r   r   r   s     r   r   !DATA_PT_motion_paths_display.poll  r   r   c                     UR                   nUR                  R                  nUR                  nU(       a  UR                  OS nU R                  XUSS9  g r   r   r   s         r   r3   !DATA_PT_motion_paths_display.draw  r   r   r   N)r   r   r   r   r!   bl_parent_idr7   r"   r   r3   r#   r   r   r   r   r     s+    J)L"#J7 7	<r   r   c                       \ rS rSrSrSrg)DATA_PT_armature_animationi  r   r   N)r   r   r   r   _animated_id_context_propertyr#   r   r   r   r   r     s    $.!r   r   c                   D    \ rS rSrSr\R                  R                  rSr	g)DATA_PT_custom_props_armi!  zobject.datar   N)
r   r   r   r   _context_pathbpytypesArmature_property_typer#   r   r   r   r   r   !  s    !MYY''Nr   r   c                   X    \ rS rSrSr\R                  R                  rSr	\
S 5       rSrg)DATA_PT_custom_props_bcolli&  zarmature.collections.activer   c                     UR                   nU(       d  gUR                  R                  =(       a     UR                  R                  R                  nU(       a  gUR                  R
                  $ )NF)r   id_datars   	referencerr   r^   )r   r   r1   is_lib_overrides       r   r   DATA_PT_custom_props_bcoll.poll+  sO    ++66a3;;;W;W;a;a %%%r   r   N)r   r   r   r   r   r   r   BoneCollectionr   r   r"   r   r#   r   r   r   r   r   &  s-    1MYY--N-L& &r   r   c                       \ rS rSrSrS rSrg)#POSE_MT_selection_sets_context_menui<  zSelection Sets Specialsc                     U R                   nUR                  SSS9  UR                  SSS9  UR                  SSS9  UR                  SSS9  g )	Nzpose.selection_set_delete_allX)rj   zpose.selection_set_remove_boneszpose.selection_set_copyCOPYDOWNzpose.selection_set_paste	PASTEDOWNr+   r   r   s      r   r3   (POSE_MT_selection_sets_context_menu.draw?  sO    7cB9D1
C2Er   r   NrC   r   r   r   r  r  <  s    (HFr   r  c                   @    \ rS rSrSrSrSrSrS1r\	S 5       r
S rS	rg
)POSE_PT_selection_setsiH  zSelection Setsr   r   r   rG   c                 x    UR                   nUS L=(       a$    UR                  S:H  =(       a    UR                  S L$ )NARMATURE)r,   typer   r   s      r   r   POSE_PT_selection_sets.pollO  s9    ^^t^ "WW
""WWD 	
r   c           
         U R                   nUR                  nUR                  5       nUR                  S:H  Ul        [        UR                  5      S:  a  SOSnUR                  SSUSUSUS	9  UR                  S
S9nUR                  SSSS9  UR                  SSSS9  UR                  SSSS9  [        UR                  5      S:  a<  UR                  5         SUR                  SSSS9l        SUR                  SSSS9l        UR                  5       nUR                  S
S9nUR                  SSS9  UR                  SSS9  UR                  S
S9nSUR                  SSS9l        UR                  S S!S9  g )"Nr   r         POSE_UL_selection_setr'   selection_setsactive_selection_set)rowsTrV   zpose.selection_set_addr   r   zpose.selection_set_remover   r  r   r   zpose.selection_set_mover   r   r   zpose.selection_set_assignr   rJ   zpose.selection_set_unassignr   pose.selection_set_selectr   zpose.selection_set_deselectr   )r+   r,   r@   r   r   lenr  template_listr]   r   r   r   r   selection_set_index)r/   r   r+   r1   r@   r  r_   r`   s           r   r3   POSE_PT_selection_sets.drawX  s   nnjjl||v- **+a/qQ#R!'	 	 	
 jjtj$-EC0xbI6_SUV s!!"Q&MMOY]CLL2LLV[aCLL22LNX jjlggDg!0x@2BggDg!WY0x@T2Dr   r   N)r   r   r   r   r6   r   r    r!   r7   r"   r   r3   r#   r   r   r   r
  r
  H  s6    H MNJ"#J
 
&Er   r
  c                       \ rS rSrS rSrg)r  i  c	                 j    UR                  5       n	U	R                  USSSS9  U	R                  USSS9  g )Nrf   r'   F)rK   ri   is_selectedrJ   )r@   rA   )
r/   rt   r+   _dataitemrj   rw   rx   ry   r@   s
             r   r|   POSE_UL_selection_set.draw_item  s3    jjlvBu5}2.r   r   Nr~   r   r   r   r  r    s    /r   r  c                       \ rS rSrSrS rSrg)POSE_MT_selection_set_createi  zChoose Selection Setc                 <    U R                   nUR                  SSS9  g )Nz!pose.selection_set_add_and_assignzNew Selection SetrJ   r  )r/   rt   r+   s      r   r3   !POSE_MT_selection_set_create.draw  s    ;BUVr   r   NrC   r   r   r   r#  r#    s    %HWr   r#  c                   .    \ rS rSrSr\S 5       rS rSrg)POSE_MT_selection_sets_selecti  zSelect Selection Setc                 T    [         R                  R                  R                  U5      $ r   )r   r   POSE_OT_selection_set_selectr   r   s     r   r   "POSE_MT_selection_sets_select.poll  s    yy55::7CCr   c                     U R                   nSUl        [        UR                  R                  5       H%  u  p4UR                  SUR                  S9nX5l        M'     g )NEXEC_DEFAULTr  rJ   )r+   operator_context	enumerater,   r  r   rf   r  )r/   r   r+   idxsel_setpropss         r   r3   "POSE_MT_selection_sets_select.draw  sL    "0%gnn&C&CDLCOO$?gllOSE(+% Er   r   N)	r   r   r   r   r6   r"   r   r3   r#   r   r   r   r'  r'    s     %HD D,r   r'  __main__)register_class)$r   	bpy.typesr   r   r   rna_prop_uir   bl_ui.space_propertiesr   bl_ui.properties_animvizr   r	   r   r%   r9   rE   rc   r   r   r   r   r   r   r   r   r   r  r
  r  r#  r'  classesr   	bpy.utilsr4  r   r   r   r   <module>r;     s  
  ) ) % ;   0. 0"=' =O*E O@tv t"J3U "JJ	S$ 	S'At 'AT.X15 .Xb<15 <,<#A5 <./!57OQ^`e /(3]E (
&!5}e &,	F$ 	F6EU 6Er/F /W4 W,D ,  ',  '!%* z(s  r   