
    i,                     2   S SK JrJrJrJr  S SKJr  S SK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\\\\\\\\\\\\\\
4r\S(:X  a  S S)KJr  \ H  r \" \ 5        M     g*g*)+    )MenuPanelUIList	ViewLayer)contexts)PropertyPanelc                   *    \ rS rSr\S 5       rS rSrg)VIEWLAYER_UL_aov   c                 v    U R                   (       d  gU R                  nUS:X  a  gUS:X  a  g[        SU-   5      e)NERRORVALUENODE_SOCKET_FLOATCOLORNODE_SOCKET_RGBAzUnrecognized AOV type: )is_validtype
ValueError)itemaov_types     c/home/wildlama/Downloads/blender-5.1.2-linux-x64/5.1/scripts/startup/bl_ui/properties_view_layer.pyaov_iconVIEWLAYER_UL_aov.aov_icon   s<    }}99w& %6ABB    c                     AUR                  5       nUR                  SS9n	U	R                  5       R                  USSU R                  U5      SS9  U	R                  5       R                  USSSS9  g )	Ng?)factorname F)texticonembossr   )r   r!   )rowsplitpropr   )
self_contextlayout_datar   r    _active_data_active_propnamer"   r#   s
             r   	draw_itemVIEWLAYER_UL_aov.draw_item   sf    jjl			&		vBT]]45HQVW		vBu=r    N)__name__
__module____qualname____firstlineno__staticmethodr   r+   __static_attributes__r-   r   r   r
   r
      s    C C>r   r
   c                   0    \ rS rSrSrSrSr\S 5       rSr	g)ViewLayerButtonsPanel"   
PROPERTIESWINDOW
view_layerc                 4    UR                   U R                  ;   $ NengineCOMPAT_ENGINESclscontexts     r   pollViewLayerButtonsPanel.poll(       #"4"445r   r-   N)
r.   r/   r0   r1   bl_space_typebl_region_type
bl_contextclassmethodrB   r3   r-   r   r   r5   r5   "   s%     MNJ 6 6r   r5   c                   <    \ rS rSrSrS1r1 Skr\S 5       rS r	Sr
g)	VIEWLAYER_PT_context_layer-   r   HIDE_HEADER>   BLENDER_EEVEEBLENDER_RENDERBLENDER_WORKBENCHc                 4    UR                   U R                  ;   $ r;   r<   r?   s     r   rB   VIEWLAYER_PT_context_layer.poll6   rD   r   c           	      t    U R                   nUR                  nUR                  nUR                  USUSSSS9  g )Nr9   view_layerszscene.view_layer_addzscene.view_layer_remove)newunlink)r'   windowscenetemplate_search)r%   rA   r'   rV   rW   s        r   drawVIEWLAYER_PT_context_layer.draw:   s@    L=&,	 	 	
r   r-   N)r.   r/   r0   r1   bl_label
bl_optionsr>   rH   rB   rY   r3   r-   r   r   rJ   rJ   -   s.    HJN 6 6
r   rJ   c                   &    \ rS rSrSr1 SkrS rSrg)VIEWLAYER_PT_layerH   z
View Layer>   rM   rN   rO   c                     U R                   nSUl        UR                  nUR                  nUR                  nUR                  5       nUR                  USSS9  UR                  USSS9  g )NTusezUse for Renderingr   use_single_layerzRender Single Layer)r'   use_property_splitrW   renderr9   columnr$   )r%   rA   r'   rW   rdlayercols          r   rY   VIEWLAYER_PT_layer.drawP   sb    $(!\\""mmo$78'.CDr   r-   Nr.   r/   r0   r1   r[   r>   rY   r3   r-   r   r   r^   r^   H   s    HNEr   r^   c                   &    \ rS rSrSrSS1rS rSrg)VIEWLAYER_PT_layer_passes^   PassesrM   rO   c                     g r;   r-   )r%   rA   s     r   rY   VIEWLAYER_PT_layer_passes.drawe   s    r   r-   Nrk   r-   r   r   rm   rm   ^   s    HN
r   rm   c                   (    \ rS rSrSrSrS1rS rSrg)$VIEWLAYER_PT_eevee_layer_passes_datai   Datarm   rM   c                    U R                   nSUl        SUl        UR                  nUR                  nUR                  5       nUR                  US5        UR                  US5        UR                  US5        UR                  US5        UR                  US5        UR                  5       nUR                  R                  (       + Ul	        UR                  US5        UR                  US	S
S9  g )NTFuse_pass_combined
use_pass_zuse_pass_mistuse_pass_normaluse_pass_positionuse_pass_vectoruse_pass_grease_pencilGrease Pencilrb   )
r'   rd   use_property_decoraterW   r9   rf   r$   re   use_motion_bluractiver%   rA   r'   rW   r9   ri   subs          r   rY   )VIEWLAYER_PT_eevee_layer_passes_data.drawo   s    $(!',$''
mmo01\*_-./01jjl555
./5OLr   r-   N	r.   r/   r0   r1   r[   bl_parent_idr>   rY   r3   r-   r   r   rs   rs   i   s    H.L%&NMr   rs   c                   (    \ rS rSrSrSrS1rS rSrg)(VIEWLAYER_PT_workbench_layer_passes_data   ru   rm   rO   c                     U R                   nSUl        SUl        UR                  nUR	                  5       nUR                  US5        UR                  US5        UR                  USSS9  g )NTFrw   rx   r}   r~   rb   )r'   rd   r   r9   rf   r$   r%   rA   r'   r9   ri   s        r   rY   -VIEWLAYER_PT_workbench_layer_passes_data.draw   sa    $(!',$''
mmo01\*5OLr   r-   Nr   r-   r   r   r   r      s    H.L)*N
Mr   r   c                   @    \ rS rSrSr\R                  rSrS1r	S r
Srg)%VIEWLAYER_PT_eevee_layer_passes_light   Lightrm   rM   c                    U R                   nSUl        SUl        UR                  nUR                  nUR                  SSS9nUR                  USS[        R                  S9  UR                  USS	S
9  UR                  SSS9nUR                  USS[        R                  S9  UR                  USS	S
9  UR                  S[        R                  SS9nUR                  USS[        R                  S9  UR                  SSS9nUR                  USSS
9  UR                  US5        UR                  US5        UR                  USSS
9  UR                  USSS
9  UR                  5       nUR                  Ul        UR                  USSS
9  g )NTFDiffuse)headingalignuse_pass_diffuse_directr   )r   	text_ctxtuse_pass_diffuse_colorColorrb   Specularuse_pass_glossy_directuse_pass_glossy_colorVolume)r   heading_ctxtr   use_pass_volume_directOtheruse_pass_emitEmissionuse_pass_environmentuse_pass_shadowuse_pass_ambient_occlusionzAmbient Occlusionuse_pass_transparentTransparentambient_occlusion_distancezOcclusion Distance)r'   rd   r   r9   eeveerf   r$   i18n_contextsrender_layerid_idr   r   )r%   rA   r'   r9   view_layer_eeveeri   s         r   rY   *VIEWLAYER_PT_eevee_layer_passes_light.draw   s   $(!',$''
%++mmITm:6WP]PjPjk5GDmmJdm;5G}OiOij47CmmH=;N;NVZm[!#;'UbUoUopmmG4m8_:>34./9@ST!#9Nmmo::
!#?FZ[r   r-   N)r.   r/   r0   r1   r[   r   r   bl_translation_contextr   r>   rY   r3   r-   r   r   r   r      s&    H*77.L%&N\r   r   c                       \ rS rSrSrS rSrg)ViewLayerAOVPanelHelper   z
Shader AOVc           
         U R                   nSUl        SUl        UR                  nUR	                  5       nUR                  5       nUR                  SSUSUSSS9  UR                  5       nUR                  SS9nUR                  S	S
SS9  UR                  SSSS9  UR                  nU(       a#  UR                  (       d  UR                  SSS9  g g g )NTFr
   aovsactive_aov_index   rowsr   zscene.view_layer_add_aovADDr   r    r   zscene.view_layer_remove_aovREMOVEz5Conflicts with another render pass with the same namer   )r   r    )r'   rd   r   r9   r"   rf   template_listoperator
active_aovr   label)r%   rA   r'   r9   r"   ri   r   aovs           r   rY   ViewLayerAOVPanelHelper.draw   s    $(!',$''
jjljjl,fj&*Vhopqjjljjtj$/e"E2K##s||LLU\cLd $3r   r-   Nr.   r/   r0   r1   r[   rY   r3   r-   r   r   r   r      s    Her   r   c                       \ rS rSrSrS1rSrg)VIEWLAYER_PT_layer_passes_aov   rm   rM   r-   Nr.   r/   r0   r1   r   r>   r3   r-   r   r   r   r          .L%&Nr   r   c                       \ rS rSrSrS rSrg)ViewLayerCryptomattePanelHelper   Cryptomattec                 z   U R                   nSUl        SUl        UR                  nUR	                  5       nUR                  USSS9  UR                  USSS9  UR                  USS	S9  UR	                  5       n[        UR                  UR                  UR                  45      Ul
        UR                  US
SS9  g )NTFuse_pass_cryptomatte_objectObjectrb   use_pass_cryptomatte_materialMaterialuse_pass_cryptomatte_assetAssetpass_cryptomatte_depthLevels)r'   rd   r   r9   rf   r$   anyr   r   r   r   r   s        r   rY   $ViewLayerCryptomattePanelHelper.draw   s    $(!',$''
mmo:J<:N9Hmmo224411
 

 	5HEr   r-   Nr   r-   r   r   r   r      s    HFr   r   c                       \ rS rSrSrS1rSrg)%VIEWLAYER_PT_layer_passes_cryptomatte   rm   rM   r-   Nr   r-   r   r   r   r      r   r   r   c                       \ rS rSrSrS rSrg)VIEWLAYER_MT_lightgroup_sync   zLightgroup Syncc                 \    U R                   nUR                  SSS9  UR                  SSS9  g )Nz%scene.view_layer_add_used_lightgroupsr   )r    z*scene.view_layer_remove_unused_lightgroupsr   )r'   r   )r%   r&   r'   s      r   rY   !VIEWLAYER_MT_lightgroup_sync.draw   s-    ?eLD8Tr   r-   Nr   r-   r   r   r   r      s     HUr   r   c                       \ rS rSrSrS rSrg)ViewLayerLightgroupsPanelHelperi  zLight Groupsc           
      ~   U R                   nSUl        SUl        UR                  nUR	                  5       nUR                  5       nUR                  SSUSUSSS9  UR                  5       n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  g )NTF
UI_UL_listlightgroupsactive_lightgroup_indexr   r   r   zscene.view_layer_add_lightgroupr   r   r   z"scene.view_layer_remove_lightgroupr   r   DOWNARROW_HLT)
r'   rd   r   r9   r"   rf   r   r   	separatormenu)r%   rA   r'   r9   r"   ri   r   s          r   rY   $ViewLayerLightgroupsPanelHelper.draw  s    $(!',$''
jjljjl-:'@q 	 	

 jjljjtj$6UL9rR/oBOr   r-   Nr   r-   r   r   r   r     s    HPr   r   c                       \ rS rSrSrS1rSrg)%VIEWLAYER_PT_layer_passes_lightgroupsi  rm   CYCLESr-   Nr   r-   r   r   r   r     s    .LZNr   r   c                   *    \ rS rSrSrS1rS1rS rSrg)VIEWLAYER_PT_filteri   FilterDEFAULT_CLOSEDrM   c                    U R                   nSUl        SUl        UR                  nUR                  n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R                  USSS9  UR                  USSS9  UR                  SS9nUR                  5       nUR                  USSS9  UR                  R                  Ul
        g )NTFInclude)r   use_skyEnvironmentrb   	use_solidSurfaces
use_strandCurvesuse_volumesVolumesuse_grease_pencilr~   User   zMotion Blur)r'   rd   r   rW   r9   rf   r$   r"   re   r   r   r   s          r   rY   VIEWLAYER_PT_filter.draw%  s    $(!',$''
mmIm.Y];[z:\9];0GmmEm*ggi.]C\\11
r   r-   N	r.   r/   r0   r1   r[   r\   r>   rY   r3   r-   r   r   r   r      s    H"#J%&N2r   r   c                   ,    \ rS rSrSrS1rSS1rS rSrg)	VIEWLAYER_PT_overridei:  Overrider   rM   r   c                     U R                   nSUl        SUl        UR                  nUR	                  US5        UR	                  US5        UR	                  US5        g )NTFmaterial_overrideworld_overridesamples)r'   rd   r   r9   r$   )r%   rA   r'   r9   s       r   rY   VIEWLAYER_PT_override.drawB  sR    $(!',$''
J 34J 01J	*r   r-   Nr   r-   r   r   r   r   :  s!    H"#JN
	+r   r   c                   (    \ rS rSrSrSrSrSr\r	Sr
g)VIEWLAYER_PT_layer_custom_propsiN  r7   r8   r9   r-   N)r.   r/   r0   r1   rE   rF   rG   _context_pathr   _property_typer3   r-   r   r   r  r  N  s     MNJ MNr   r  __main__)register_classN)!	bpy.typesr   r   r   r   bpy.app.translationsr   r   rna_prop_uir   r
   r5   rJ   r^   rm   rs   r   r   r   r   r   r   r   r   r   r   r   r  classesr.   	bpy.utilsr  r@   r-   r   r   <module>r     sw  
 5 4 : %>v >.6 6
!6 
6E. E, 5u M+@% M4M/De M&#\,A5 #\Le3 e2'$;U '
F&; F0',KU '
U4 UP&; P4 ,KU  
2/ 24+15 +(mU  !,())!)#" z(s  r   