
    
Wi                   0   S SK Jr  S SKrS SKJrJrJrJrJrJ	r	J
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  S	rS
rSrSrSrSrS rSrSrSr Sr!Sr"Sr#Sr$Sr%Sr&Sr'Sr(S r)S r*S r+S r,Sr-S r.S!r/S"r0S# r1S$ r2S% r3S& r4 " S' S(\Rj                  Rl                  5      r7 " S) S*\Rj                  Rl                  5      r8 " S+ S,\Rj                  Rl                  5      r9 " S- S.\Rj                  Rl                  5      r: " S/ S0\Rj                  Rl                  5      r; " S1 S2\Rj                  Rl                  5      r< " S3 S4\Rj                  Rl                  5      r= " S5 S6\Rj                  Rl                  5      r> " S7 S8\Rj                  Rl                  5      r? " S9 S:\Rj                  Rl                  5      r@ " S; S<\Rj                  Rl                  5      rA " S= S>\Rj                  R                  5      rC " S? S@\Rj                  Rl                  5      rDSA rESB rFg)C    )annotationsN)BoolPropertyCollectionPropertyEnumPropertyFloatPropertyIntPropertyPointerPropertyStringProperty)contexts
pgettext_npgettext_rpt)pi   )engine)camera))CPUr   zUse CPU for rendering)GPUzGPU ComputezZUse GPU compute device for rendering, configured in the system tab in the user preferences))BVH2r    r   )EMBREEEmbreer      ))DYNAMIC_BVHzDynamic BVHzFObjects can be individually updated, at the cost of slower render time)
STATIC_BVHz
Static BVHzKAny object modification requires a complete BVH rebuild, but renders faster))BOXBoxz
Box filter)GAUSSIANGaussianzGaussian filter)BLACKMAN_HARRISzBlackman-HarriszBlackman-Harris filter))RIBBONSzRounded RibbonszFRender curves as flat ribbons with rounded normals, for fast rendering)THICKz	3D CurveszPRender curves as circular 3D geometry, for accurate results when viewing closely)THICK_LINEARzLinear 3D CurveszkRender curves as circular 3D geometry, with linear interpolation between control points, for fast rendering))USEUsez9Per render layer number of samples override scene samples)BOUNDEDBoundedz:Bound per render layer number of samples by global samples)IGNOREIgnorez)Ignore per render layer number of samplesc           	        UR                   nUR                  R                  =(       a    UR                  R                  nS[        S5      [        S5      S4/nS[        S5      [        S5      S4S	[        S
5      [        S5      S4S[        S5      [        S5      S4S[        S5      [        S5      S4S[        S5      [        S5      S4/nS	[        S5      [        S5      S4S[        S5      [        S5      S4/nU(       a  XE-   $ XF-   $ )N	AUTOMATIC	AutomaticzUse a blue-noise sampling pattern, which optimizes the frequency distribution of noise, for random sampling. For viewport rendering, optimize first sample quality for interactive preview   SOBOL_BURLEYzSobol-Burleyz@Use on-the-fly computed Owen-scrambled Sobol for random samplingr   TABULATED_SOBOLzTabulated SobolzCUse pre-computed tables of Owen-scrambled Sobol for random samplingr   
BLUE_NOISEzBlue-Noise (pure)zbUse a blue-noise pattern, which optimizes the frequency distribution of noise, for random sampling   BLUE_NOISE_FIRSTzBlue-Noise (first)zvUse a blue-noise pattern for the first sample, then use Tabulated Sobol for the remaining samples, for random sampling   BLUE_NOISE_ROUNDzBlue-Noise (round)z^Use a blue-noise sequence with a length rounded up to the next power of 2, for random samplingr   Classicz
Blue-Noise)preferencesexperimentaluse_cycles_debugviewshow_developer_uin_)selfcontextprefs	use_debugitemsdebug_itemsnon_debug_itemss          ]/home/wildlama/Downloads/blender-5.1.2-linux-x64/5.1/scripts/addons_core/cycles/properties.pyenum_sampling_patternrC   G   sW   E""33T

8T8TI 
	K	  I  
J	
	E 
	N		N	O	
	 
			Q	R	
	 
		 	p	q	
	 
	 	!	  E  
F	
	 
	 	!	l	m	
	#K0 
	I	Q	R	
	 
	L		p	q	
		O ""&&    ))NONENonez/Do not use this surface as a light for samplingr   )AUTOAutozwAutomatically determine if the surface should be treated as a light for sampling, based on estimated emission intensityr   )FRONTFrontzhTreat only front side of the surface as a light, usually for closed meshes whose interior is not visibler0   )BACKBackz;Treat only back side of the surface as a light for samplingr2   )
FRONT_BACKzFront and BackzQTreat surface as a light for sampling, emitting from both the front and back sider   ))DISTANCEDistancezBUse distance sampling, best for dense volumes with lights far away)EQUIANGULAREquiangularz`Use equiangular sampling, best for volumes with low density with light inside or near the volume)MULTIPLE_IMPORTANCEzMultiple ImportancezTCombine distance and equi-angular sampling for volumes where neither method is ideal))LINEARLinearzGood smoothness and speed)CUBICCubicz/Smoothed high quality interpolation, but slower))rE   rF   zSDon't sample the background, faster but might cause noise for non-solid backgrounds)r*   rH   z/Automatically try to determine the best setting)MANUALManualzrManually set the resolution of the sampling map, higher values are slower and require more memory but reduce noise))r   r   r   r   )CUDArY   rY   r   )OPTIXOptiXr[   r2   )HIPr\   r\   r   )METALMetalr^   r,   )ONEAPIoneAPIr`      ))OFFzNo LimitzNo texture size limitr   )128rc   z Limit texture size to 128 pixelsr   )256rd   z Limit texture size to 256 pixelsr0   )512re   z Limit texture size to 512 pixelsr2   )1024rf   z!Limit texture size to 1024 pixelsr   )2048rg   z!Limit texture size to 2048 pixelsr,   )4096rh   z!Limit texture size to 4096 pixelsra   )8192ri   z!Limit texture size to 8192 pixels   ))REPLACEReplacezVReplace global illumination with ambient occlusion after a specified number of bounces)ADDAddz)Add ambient occlusion to diffuse surfaces))r   Generalr   )COMBINEDCombinedzShow the Combined Render pass)EMISSIONEmissionzShow the Emission render pass)
BACKGROUND
BackgroundzShow the Background render pass)AOzAmbient Occlusionz&Show the Ambient Occlusion render pass)SHADOW_CATCHERzShadow Catcherz#Show the Shadow Catcher render pass)r   Lightr   )DIFFUSE_DIRECTzDiffuse Directz#Show the Diffuse Direct render pass)DIFFUSE_INDIRECTzDiffuse Indirectz%Show the Diffuse Indirect render pass)DIFFUSE_COLORzDiffuse Colorz"Show the Diffuse Color render pass)GLOSSY_DIRECTzGlossy Directz"Show the Glossy Direct render pass)GLOSSY_INDIRECTzGlossy Indirectz$Show the Glossy Indirect render pass)GLOSSY_COLORzGlossy Colorz!Show the Glossy Color render pass)r   r   r   )TRANSMISSION_DIRECTzTransmission Directz(Show the Transmission Direct render pass)TRANSMISSION_INDIRECTzTransmission Indirectz*Show the Transmission Indirect render pass)TRANSMISSION_COLORzTransmission Colorz'Show the Transmission Color render pass)VOLUME_DIRECTzVolume Directz"Show the Volume Direct render pass)VOLUME_INDIRECTzVolume Indirectz$Show the Volume Indirect render pass)r   Datar   )POSITIONPositionzShow the Position render pass)NORMALNormalzShow the Normal render pass)UVr   zShow the UV render pass)MISTMistzShow the Mist render pass)DENOISING_ALBEDOzDenoising AlbedozAlbedo pass used by denoiser)DENOISING_NORMALzDenoising NormalzNormal pass used by denoiser)SAMPLE_COUNTzSample CountzPer-pixel number of samples))VOLUME_SCATTERzVolume Scatterz0Show the contribution of scattered ray in volume)VOLUME_TRANSMITzVolume Transmitz2Show the contribution of transmitted ray in volume)VOLUME_MAJORANTzVolume Majorantz-Show the majorant transmittance of the volume))PARALLAX_AWARE_VMMzParallax-Aware VMMzFUse Parallax-aware von Mises-Fisher models as directional distributionr   )DIRECTIONAL_QUAD_TREEzDirectional Quad Treez6Use Directional Quad Trees as directional distributionr   )VMMr   z7Use von Mises-Fisher models as directional distributionr0   ))MISzDiffuse Product MISzsGuided diffuse BSDF component based on the incoming light distribution and the cosine product (closed form product)r   )RISzRe-sampled Importance SamplingzcPerform RIS sampling to guided based on the product of the incoming light distribution and the BSDFr   )	ROUGHNESSzRoughness-basedzPAdjust the guiding probability based on the roughness of the material componentsr0   c                P    SS K nUR                  (       a  SS[        S5      S4/$ / $ )Nr   OPENIMAGEDENOISEOpenImageDenoisez&Use Intel OpenImageDenoise AI denoiserr   )_cycleswith_openimagedenoiser:   )r;   r<   r   s      rB   enum_openimagedenoise_denoiserr   	  s6    $$#%7<=qB C 	CIrD   c                    U(       aD  [        UR                  R                  [           R                  R	                  S5      5      (       a  SS[        S5      S4/$ / $ )NrZ   r[   zUse the OptiX AI denoiser with GPU acceleration, only available on NVIDIA GPUs when configured in the system tab in the user preferencesr0   )boolr5   addons__package__get_devices_for_typer:   r;   r<   s     rB   enum_optix_denoiserr     sc    d7..55kBNNccdklmm'2 W$X Z[\ ] 	]IrD   c                    [        X5      n[        X5      n[        U5      (       d  [        U5      (       a  SS[        S5      S4/nOSS[        S5      S4/nXB-  nXC-  nU$ )NrG   r+   zhUse GPU accelerated denoising if supported, for the best performance. Prefer OpenImageDenoise over OptiXr   rF   z0Blender was compiled without a viewport denoiser)r   r   lenr:   )r;   r<   optix_items
oidn_itemsr?   s        rB   enum_preview_denoiserr     sz    %d4K/>J
;3z?? 5 6	 &"%W"XZ[\]	E	ELrD   c                B    / nU[        X5      -  nU[        X5      -  nU$ N)r   r   )r;   r<   r?   s      rB   enum_denoiserr   +  s,    E	 //E	+D::ELrD   ))RGBrF   z&Don't use utility passes for denoisingr   )
RGB_ALBEDOAlbedozUse albedo pass for denoisingr0   )RGB_ALBEDO_NORMALzAlbedo and Normalz*Use albedo and normal passes for denoisingr2   ))rE   rF   z7No prefiltering, use when guiding passes are noise-freer   )FASTFastzDenoise color and guiding passes together. Improves quality when guiding passes are noisy using least amount of extra processing timer0   )ACCURATEAccuratezPrefilter noisy guiding passes before denoising color. Improves quality when guiding passes are noisy using extra processing timer2   ))HIGHHighzHigh qualityr   )BALANCEDBalancedz(Balanced between performance and qualityr0   )r   r   zHigh performancer2   ))MULTIPLE_IMPORTANCE_SAMPLINGzMultiple Importance Samplingz~Multiple importance sampling is used to combine direct light contributions from next-event estimation and forward path tracingr   )FORWARD_PATH_TRACINGzForward Path TracingzFDirect light contributions are only sampled using forward path tracingr   )NEXT_EVENT_ESTIMATIONzNext-Event EstimationzGDirect light contributions are only sampled using next-event estimationr0   c                <    UR                   nUR                  5         g r   )
view_layerupdate_render_passes)r;   r<   r   s      rB   r   r   f  s    ##J##%rD   c                <    UR                   nUR                  5         g r   )sceneupdate_render_engine)r;   r<   r   s      rB   r   r   k  s    MME	 rD   c                L    UR                   R                  R                  5         g r   )r   world
update_tagr   s     rB   update_worldr   p  s     MM""$rD   c                8    UR                   R                  5         g r   )area
tag_redrawr   s     rB   update_pauser   v  s    LLrD   c                  T   \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S '   S!\S"'   S#\S$'   S%\S&'   S'\S('   S)\S*'   S+\S,'   S-\S.'   S/\S0'   S1\S2'   S3\S4'   S5\S6'   S7\S8'   S9\S:'   S;\S<'   S=\S>'   S?\S@'   SA\SB'   SC\SD'   SE\SF'   SG\SH'   SI\SJ'   SK\SL'   SM\SN'   SO\SP'   SQ\SR'   SS\ST'   SU\SV'   SW\SX'   SY\SZ'   S[\S\'   S]\S^'   S_\S`'   Sa\Sb'   Sc\Sd'   Se\Sf'   Sg\Sh'   Si\Sj'   Sk\Sl'   Sm\Sn'   So\Sp'   Sq\Sr'   Ss\St'   Su\Sv'   Sw\Sx'   Sy\Sz'   Sy\S{'   S|\S}'   S~\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   S rS\S'   S\S'   S\S'   SrS\S'   S\S'   S\S'   S\S'   \S 5       r	\S 5       r
Srg)CyclesRenderSettingsiz   zEnumProperty(name='Device', description='Device to use for rendering', items=enum_devices, default='CPU', update=update_render_passes)devicezSBoolProperty(name='Open Shading Language', description='Use Open Shading Language')shading_systemzxBoolProperty(name='Pause Preview', description='Pause all viewport preview renders', default=False, update=update_pause)preview_pausewBoolProperty(name='Use Denoising', description='Denoise the rendered image', default=True, update=update_render_passes)use_denoisingzEnumProperty(name='Denoiser', description='Denoise the image with the selected denoiser. For denoising the image after rendering', items=enum_denoiser, default=4, update=update_render_passes)denoiserzEnumProperty(name='Denoising Prefilter', description='Prefilter noisy guiding (albedo and normal) passes to improve denoising quality when using OpenImageDenoise', items=enum_denoising_prefilter, default='ACCURATE')denoising_prefilterzEnumProperty(name='Denoising Quality', description='Overall denoising quality when using OpenImageDenoise', items=enum_denoising_quality, default='HIGH')denoising_qualityzEnumProperty(name='Denoising Input Passes', description='Passes used by the denoiser to distinguish noise from shader and geometry detail', items=enum_denoising_input_passes, default='RGB_ALBEDO_NORMAL')denoising_input_passesa*  BoolProperty(name='Denoise on GPU', description='Perform denoising on GPU devices configured in the system tab in the user preferences. This is significantly faster than on CPU, but requires additional GPU memory. When large scenes need more GPU memory, this option can be disabled', default=False)denoising_use_gpuznBoolProperty(name='Use Viewport Denoising', description='Denoise the image in the 3D viewport', default=False)use_preview_denoisingzEnumProperty(name='Viewport Denoiser', description='Denoise the image after each preview update with the selected denoiser', items=enum_preview_denoiser, default=0)preview_denoiserzEnumProperty(name='Viewport Denoising Prefilter', description='Prefilter noisy guiding (albedo and normal) passes to improve denoising quality when using OpenImageDenoise', items=enum_denoising_prefilter, default='FAST')preview_denoising_prefilterzEnumProperty(name='Viewport Denoising Quality', description='Overall denoising quality when using OpenImageDenoise', items=enum_denoising_quality, default='BALANCED')preview_denoising_qualityzEnumProperty(name='Viewport Denoising Input Passes', description='Passes used by the denoiser to distinguish noise from shader and geometry detail', items=enum_denoising_input_passes, default='RGB_ALBEDO')preview_denoising_input_passeszzIntProperty(name='Start Denoising', description='Sample to start denoising the preview at', min=0, max=1 << 24, default=1)preview_denoising_start_samplea1  BoolProperty(name='Denoise Preview on GPU', description='Perform denoising on GPU devices configured in the system tab in the user preferences. This is significantly faster than on CPU, but requires additional GPU memory. When large scenes need more GPU memory, this option can be disabled', default=True)preview_denoising_use_gpuzwIntProperty(name='Samples', description='Number of samples to render for each pixel', min=1, max=1 << 24, default=4096)sampleszIntProperty(name='Viewport Samples', description='Number of samples to render in the viewport, unlimited if 0', min=0, soft_min=1, max=1 << 24, default=1024)preview_sampleszBoolProperty(name='Use Sample Subset', description='Render a subset of the specified max samples. Typically used for distributed rendering across multiple devices', default=False)use_sample_subsetzIntProperty(name='Sample Subset Offset', description='0-based index of sample to start rendering from', min=0, max=1 << 24, default=0)sample_offsetzIntProperty(name='Sample Subset Length', description='The number of samples to render in this subset', min=1, max=1 << 24, default=2048)sample_subset_lengthzFloatProperty(name='Time Limit', description='Limit the render time (excluding synchronization time). Zero disables the limit', min=0.0, default=0.0, step=100.0, unit='TIME_ABSOLUTE')
time_limitzEnumProperty(name='Sampling Pattern', description='Random sampling pattern used by the integrator', items=enum_sampling_pattern, default=5)sampling_patternzFloatProperty(name='Scrambling Distance', default=1.0, min=0.0, soft_max=1.0, description='Reduce randomization between pixels to improve GPU rendering performance, at the cost of possible rendering artifacts if set too low')scrambling_distancezBoolProperty(name='Scrambling Distance viewport', default=False, description='Uses the Scrambling Distance value for the viewport. Faster but may flicker')preview_scrambling_distancezBoolProperty(name='Automatic Scrambling Distance', default=False, description='Automatically reduce the randomization between pixels to improve GPU rendering performance, at the cost of possible rendering artifacts')auto_scrambling_distancezEnumProperty(name='Layer Samples', description='How to use per view layer sample settings', items=enum_use_layer_samples, default='USE')use_layer_samplesa  FloatProperty(name='Light Sampling Threshold', description='Probabilistically terminate light samples when the light contribution is below this threshold (more noise but faster rendering). Zero disables the test and never ignores lights', min=0.0, max=1.0, default=0.01)light_sampling_thresholdzBoolProperty(name='Use Adaptive Sampling', description='Automatically reduce the number of samples per pixel based on estimated noise level', default=True)use_adaptive_samplinga  FloatProperty(name='Adaptive Sampling Threshold', description='Noise level step to stop sampling at, lower values reduce noise at the cost of render time. Zero for automatic setting based on number of AA samples', min=0.0, max=1.0, soft_min=0.001, default=0.01, precision=4)adaptive_thresholdzIntProperty(name='Adaptive Min Samples', description='Minimum AA samples for adaptive sampling, to discover noisy features before stopping sampling. Zero for automatic setting based on noise threshold', min=0, max=4096, default=0)adaptive_min_sampleszBoolProperty(name='Use Adaptive Sampling', description='Automatically reduce the number of samples per pixel based on estimated noise level, for viewport renders', default=True)use_preview_adaptive_samplinga'  FloatProperty(name='Adaptive Sampling Threshold', description='Noise level step to stop sampling at, lower values reduce noise at the cost of render time. Zero for automatic setting based on number of AA samples, for viewport renders', min=0.0, max=1.0, soft_min=0.001, default=0.1, precision=4)preview_adaptive_thresholdzIntProperty(name='Adaptive Min Samples', description='Minimum AA samples for adaptive sampling, to discover noisy features before stopping sampling. Zero for automatic setting based on noise threshold, for viewport renders', min=0, max=4096, default=0)preview_adaptive_min_sampleszEnumProperty(name='Direct Light Sampling', description='The type of strategy used for sampling direct light contributions', items=enum_direct_light_sampling_type, default='MULTIPLE_IMPORTANCE_SAMPLING')direct_light_sampling_typezBoolProperty(name='Light Tree', description='Sample multiple lights more efficiently based on estimated contribution at every shading point', default=True)use_light_treezIntProperty(name='Min Light Bounces', description='Minimum number of light bounces. Setting this higher reduces noise in the first bounces, but can also be less efficient for more complex geometry like curves and volumes', min=0, max=1024, default=0)min_light_bouncesa  IntProperty(name='Min Transparent Bounces', description='Minimum number of transparent bounces. Setting this higher reduces noise in the first bounces, but can also be less efficient for more complex geometry like curves and volumes', min=0, max=1024, default=0)min_transparent_bounceszBoolProperty(name='Reflective Caustics', description='Use reflective caustics, resulting in a brighter image (more noise but added realism)', default=True)caustics_reflectivezBoolProperty(name='Refractive Caustics', description='Use refractive caustics, resulting in a brighter image (more noise but added realism)', default=True)caustics_refractivezFloatProperty(name='Filter Glossy', description='Adaptively blur glossy shaders after blurry bounces, to reduce noise at the cost of accuracy', min=0.0, max=10.0, default=1.0)blur_glossyzBoolProperty(name='Guiding', description='Use path guiding for sampling paths. Path guiding incrementally learns the light distribution of the scene and guides path into directions with high direct and indirect light contributions', default=False)use_guidingzBoolProperty(name='Deterministic', description='Makes path guiding deterministic which means renderings will be reproducible with the same pixel values every time. This feature slows down training', default=True)use_deterministic_guidingzEnumProperty(name='Guiding Distribution Type', description='Type of representation for the guiding distribution', items=enum_guiding_distribution, default='PARALLAX_AWARE_VMM')guiding_distribution_typezEnumProperty(name='Directional Sampling Type', description='Type of the directional sampling used for guiding', items=enum_guiding_directional_sampling_types, default='RIS')!guiding_directional_sampling_typezsBoolProperty(name='Surface Guiding', description='Use guiding when sampling directions on a surface', default=True)use_surface_guidingzFloatProperty(name='Surface Guiding Probability', description='The probability of guiding a direction on a surface', min=0.0, max=1.0, default=0.5)surface_guiding_probabilityzuBoolProperty(name='Volume Guiding', description='Use guiding when sampling directions inside a volume', default=True)use_volume_guidingaM  IntProperty(name='Training Samples', description='The maximum number of samples used for training path guiding. Higher samples lead to more accurate guiding, however may also unnecessarily slow down rendering once guiding is accurate enough. A value of 0 will continue training until the last sample', min=0, soft_min=1, default=128)guiding_training_sampleszFloatProperty(name='Volume Guiding Probability', description='The probability of guiding a direction inside a volume', min=0.0, max=1.0, default=0.5)volume_guiding_probabilityzBoolProperty(name='Guide Direct Light', description='Consider the contribution of directly visible light sources during guiding', default=True)use_guiding_direct_lightzBoolProperty(name='Use MIS Weights', description='Use the MIS weight to weight the contribution of directly visible light sources during guiding', default=True)use_guiding_mis_weightszFloatProperty(name='Guiding Roughness Threshold', description='The minimal roughness value of a material to apply guiding', min=0.0, max=1.0, default=0.05)guiding_roughness_thresholdzkIntProperty(name='Max Bounces', description='Total maximum number of bounces', min=0, max=1024, default=12)max_bounceszIntProperty(name='Diffuse Bounces', description='Maximum number of diffuse reflection bounces, bounded by total maximum', min=0, max=1024, default=4)diffuse_bounceszIntProperty(name='Glossy Bounces', description='Maximum number of glossy reflection bounces, bounded by total maximum', min=0, max=1024, default=4)glossy_bounceszIntProperty(name='Transmission Bounces', description='Maximum number of transmission bounces, bounded by total maximum', min=0, max=1024, default=12)transmission_bouncesz|IntProperty(name='Volume Bounces', description='Maximum number of volumetric scattering events', min=0, max=1024, default=0)volume_bounceszIntProperty(name='Transparent Max Bounces', description='Maximum number of transparent bounces. This is independent of maximum number of other bounces', min=0, max=1024, default=8)transparent_max_bouncesa  FloatProperty(name='Step Rate', description='Globally adjust detail for volume rendering, on top of automatically estimated step size. Higher values reduce render time, lower values render with more detail', default=1.0, min=0.01, max=100.0, soft_min=0.1, soft_max=10.0, precision=2)volume_step_ratevolume_preview_step_ratezIntProperty(name='Max Steps', description='Maximum number of steps through the volume before giving up, to avoid extremely long render times with big objects or small step sizes', default=1024, min=2, max=65536)volume_max_stepszBoolProperty(name='Biased', description='Default volume rendering uses null scattering, which is unbiased and has less artifacts, but could be noisier. Biased option uses ray marching, with controls for steps size and max steps', default=False)volume_biasedzFloatProperty(name='Dicing Rate', description='Multiplier for per object adaptive subdivision size', min=0.1, max=1000.0, soft_min=0.5, default=1.0)dicing_ratezFloatProperty(name='Viewport Dicing Rate', description='Multiplier for per object adaptive subdivision size in the viewport', min=0.1, max=1000.0, soft_min=0.5, default=8.0)preview_dicing_ratezIntProperty(name='Max Subdivisions', description='Stop subdividing when this level is reached even if the dicing rate would produce finer tessellation', min=0, max=16, default=12)max_subdivisionsa  PointerProperty(name='Dicing Camera', description='Camera to use as reference point when subdividing geometry, useful to avoid crawling artifacts in animations when the scene camera is moving', type=bpy.types.Object, poll=lambda self, obj: obj.type == 'CAMERA')dicing_cameraa{  FloatProperty(name='Offscreen Dicing Scale', description='Multiplier for dicing rate of geometry outside of the camera view. The dicing rate of objects is gradually increased the further they are outside the camera view. Lower values provide higher quality reflections and shadows for off screen objects, while higher values use less memory', min=1.0, soft_max=25.0, default=4.0)offscreen_dicing_scalezyFloatProperty(name='Exposure', description='Image brightness scale', min=0.0, soft_max=2 ** 10, max=2 ** 32, default=1.0)film_exposurezBoolProperty(name='Transparent Glass', description='Render transmissive surfaces as transparent, for compositing glass over another background', default=False)film_transparent_glasszFloatProperty(name='Transparent Roughness Threshold', description='For transparent transmission, keep surfaces with roughness above the threshold opaque', min=0.0, max=1.0, default=0.1)film_transparent_roughnesszuEnumProperty(name='Filter Type', description='Pixel filter type', items=enum_filter_types, default='BLACKMAN_HARRIS')pixel_filter_typezvFloatProperty(name='Filter Width', description='Pixel filter width', min=0.01, max=10.0, default=1.5, subtype='PIXEL')filter_widthzIntProperty(name='Seed', description='Seed value for integrator to get different noise patterns', min=0, max=2147483647, default=0)seedzBoolProperty(name='Use Animated Seed', description='Use different seed values (and hence noise patterns) at different frames', default=False)use_animated_seedzFloatProperty(name='Clamp Direct', description='If non-zero, the maximum value for a direct sample, higher values will be scaled down to avoid too much noise and slow convergence at the cost of accuracy', min=0.0, max=100000000.0, default=0.0)sample_clamp_directzFloatProperty(name='Clamp Indirect', description='If non-zero, the maximum value for an indirect sample, higher values will be scaled down to avoid too much noise and slow convergence at the cost of accuracy', min=0.0, max=100000000.0, default=10.0)sample_clamp_indirectzEnumProperty(name='Viewport BVH Type', description='Choose between faster updates, or faster render', items=enum_bvh_types, default='DYNAMIC_BVH')debug_bvh_typezBoolProperty(name='Use Spatial Splits', description='Use BVH spatial splits: longer builder time, faster render', default=False)debug_use_spatial_splitszBoolProperty(name='Use Curves BVH', description='Use special type BVH optimized for curves (uses more ram but renders faster)', default=True)debug_use_hair_bvhzBoolProperty(name='Use Compact BVH', description='Use compact BVH structure (uses less ram but renders slower)', default=False)debug_use_compact_bvhzIntProperty(name='BVH Time Steps', description='Split BVH primitives by this number of time steps to speed up render time in cost of memory', default=0, min=0, max=16)debug_bvh_time_stepsa  EnumProperty(name='Bake Type', default='COMBINED', description='Type of pass to bake', items=(('COMBINED', 'Combined', '', 0), ('AO', 'Ambient Occlusion', '', 1), ('SHADOW', 'Shadow', '', 2), ('POSITION', 'Position', '', 11), ('NORMAL', 'Normal', '', 3), ('UV', 'UV', '', 4), ('ROUGHNESS', 'Roughness', '', 5), ('EMIT', 'Emission', '', 6), ('ENVIRONMENT', 'Environment', '', 7), ('DIFFUSE', 'Diffuse', '', 8), ('GLOSSY', 'Glossy', '', 9), ('TRANSMISSION', 'Transmission', '', 10)))	bake_typezyBoolProperty(name='Use Camera Cull', description='Allow objects to be culled based on the camera frustum', default=False)use_camera_cullzFloatProperty(name='Camera Cull Margin', description='Margin for the camera space culling', default=0.1, min=0.0, max=5.0, subtype='FACTOR')camera_cull_marginzBoolProperty(name='Use Distance Cull', description='Allow objects to be culled based on the distance from camera', default=False)use_distance_cullzFloatProperty(name='Cull Distance', description='Cull objects which are further away from camera than this distance', default=50, min=0.0, unit='LENGTH')distance_cull_marginzEnumProperty(name='Shutter Type', default='NONE', description='Type of rolling shutter effect matching CMOS-based cameras', items=(('NONE', 'None', 'No rolling shutter effect used'), ('TOP', 'Top-Bottom', 'Sensor is being scanned from top to bottom')))rolling_shutter_typezFloatProperty(name='Rolling Shutter Duration', description='Scanline "exposure" time for the rolling shutter effect', default=0.1, min=0.0, max=1.0, subtype='FACTOR')rolling_shutter_durationzEnumProperty(name='Viewport Texture Limit', default='OFF', description='Limit texture size used by viewport rendering', items=enum_texture_limit)texture_limitzEnumProperty(name='Render Texture Limit', default='OFF', description='Limit texture size used by final rendering', items=enum_texture_limit)texture_limit_rendera  BoolProperty(name='Fast GI Approximation', description='Approximate diffuse indirect light with background tinted ambient occlusion. This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality', default=False)use_fast_giz}EnumProperty(name='Fast GI Method', default='REPLACE', description='Fast GI approximation method', items=enum_fast_gi_method)fast_gi_methodzIntProperty(name='AO Bounces', default=1, description='After this number of light bounces, use approximate global illumination. 0 disables this feature', min=0, max=1024)
ao_bounceszIntProperty(name='AO Bounces Render', default=1, description='After this number of light bounces, use approximate global illumination. 0 disables this feature', min=0, max=1024)ao_bounces_renderz`BoolProperty(name='Auto Tile', description='Deprecated, tiling is always enabled', default=True)use_auto_tilezIntProperty(name='Tile Size', default=2048, description='Render high resolution images in tiles of this size, to reduce memory usage. Tiles are cached to disk while rendering to save memory', min=8, max=8192)	tile_sizec                `    SS K nUR                  R                  5       nUR                  U5      $ Nr   )r   r   
as_pointerdebug_flags_update)r;   r<   r   r   s       rB   _devices_update_callback-CyclesRenderSettings._devices_update_callback*  s(    ((*))%00rD   z'BoolProperty(name='AVX2', default=True)debug_use_cpu_avx2z(BoolProperty(name='SSE42', default=True)debug_use_cpu_sse42zIEnumProperty(name='BVH Layout', items=enum_bvh_layouts, default='EMBREE')debug_bvh_layoutzVCompile the Cycles GPU kernel with only the feature set required for the current scenez^BoolProperty(name='Adaptive Compile', description=adaptive_compile_description, default=False)debug_use_cuda_adaptive_compilezBoolProperty(name='OptiX Module Debug', description='Load OptiX module in debug mode: lower logging verbosity level, enable validations, and lower optimization level', default=False)debug_use_optix_debugdebug_use_hip_adaptive_compile debug_use_metal_adaptive_compilec                T    [        SSU S9[        R                  R                  l        g )NzCycles Render SettingszCycles render settingsnamedescriptiontype)r	   bpytypesScenecyclesclss    rB   registerCyclesRenderSettings.registerM  s     !0)0"
		rD   c                8    [         R                  R                  ?g r   )rA  rB  rC  rD  rE  s    rB   
unregisterCyclesRenderSettings.unregisterU      IIOO"rD   N)__name__
__module____qualname____firstlineno__	__slots____annotations__r3  adaptive_compile_descriptionclassmethodrG  rJ  __static_attributes__r   rD   rB   r   r   z  sH   I  
        
 "   % %           "     
  $ 
! # !            (  "  	 	!   "                  
!         
 
 
  (    	 	        
 1
 @?AA  $| & 
 
% 
' 
 
 
 # #rD   r   c                  8    \ rS rSrSr\S 5       r\S 5       rSrg)CyclesCustomCameraSettingsiZ  r   c                T    [        SSU S9[        R                  R                  l        g )NzCycles Custom Camera Settingsz)Parameters for custom (OSL-based) camerasr=  )r	   rA  rB  Cameracycles_customrE  s    rB   rG  #CyclesCustomCameraSettings.register]  s"    )80C*
		&rD   c                8    [         R                  R                  ?g r   )rA  rB  rY  rZ  rE  s    rB   rJ  %CyclesCustomCameraSettings.unregistere  s    II*rD   N	rM  rN  rO  rP  rQ  rT  rG  rJ  rU  r   rD   rB   rW  rW  Z  s-    I
 
 + +rD   rW  c                  l    \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   \S 5       r\S 5       rSr	g)CyclesMaterialSettingsij  r   zEnumProperty(name='Emission Sampling', description='Sampling strategy for emissive surfaces', translation_context=i18n_contexts.id_light, items=enum_emission_sampling, default='AUTO')emission_samplingzBoolProperty(name='Bump Map Correction', description='Apply corrections to solve shadow terminator artifacts caused by bump mapping', default=True)use_bump_map_correctionzEnumProperty(name='Volume Sampling', description='Sampling method to use for volumes', items=enum_volume_sampling, default='MULTIPLE_IMPORTANCE')volume_samplingzEnumProperty(name='Volume Interpolation', description='Interpolation method to use for smoke/fire volumes', items=enum_volume_interpolation, default='LINEAR')volume_interpolationa  FloatProperty(name='Step Rate', description='Scale the distance between volume shader samples when rendering the volume (lower values give more accurate and detailed results, but also increased render time)', default=1.0, min=0.001, max=1000.0, soft_min=0.1, soft_max=10.0, precision=4)r	  c                T    [        SSU S9[        R                  R                  l        g )NzCycles Material SettingszCycles material settingsr=  )r	   rA  rB  MaterialrD  rE  s    rB   rG  CyclesMaterialSettings.register  s"    $3+2%
		!rD   c                8    [         R                  R                  ?g r   )rA  rB  rf  rD  rE  s    rB   rJ  !CyclesMaterialSettings.unregister  s    II%rD   N
rM  rN  rO  rP  rQ  rR  rT  rG  rJ  rU  r   rD   rB   r`  r`  j  sa    I  
    
 
 & &rD   r`  c                  b    \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   \S 5       r\S 5       rSr	g)CyclesLightSettingsi  r   zIntProperty(name='Max Bounces', description='Maximum number of bounces the light will contribute to the render', min=0, max=1024, default=1024)r  zBoolProperty(name='Multiple Importance Sample', description='Use multiple importance sampling for the light, reduces noise for area lights and sharp glossy materials', default=True) use_multiple_importance_samplingzBoolProperty(name='Is Portal', description='Use this area light to guide sampling of the background, note that this will make the light invisible', default=False)	is_portalBoolProperty(name='Shadow Caustics', description='Generate approximate caustics in shadows of refractive surfaces. Lights, caster and receiver objects must have shadow caustics options set to enable this', default=False)is_caustics_lightc                T    [        SSU S9[        R                  R                  l        g )NzCycles Light SettingszCycles light settingsr=  )r	   rA  rB  rx   rD  rE  s    rB   rG  CyclesLightSettings.register       !0(/"
		rD   c                8    [         R                  R                  ?g r   )rA  rB  rx   rD  rE  s    rB   rJ  CyclesLightSettings.unregister  rL  rD   Nrj  r   rD   rB   rl  rl    sW    I '    
 
 # #rD   rl  c                      \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   S\S'   \S 5       r\S 5       rSr	g)CyclesWorldSettingsi  r   ro  rp  zEnumProperty(name='Sampling Method', description='How to sample the background light', items=enum_world_mis, default='AUTOMATIC')sampling_methodzIntProperty(name='Map Resolution', description='Importance map size is resolution x resolution/2; higher values potentially produce less noise, at the cost of memory and speed', min=4, max=8192, default=1024)sample_map_resolutionzIntProperty(name='Max Bounces', description='Maximum number of bounces the background light will contribute to the render', min=0, max=1024, default=1024)r  zEnumProperty(name='Volume Sampling', description='Sampling method to use for volumes', items=enum_volume_sampling, default='EQUIANGULAR')rc  zEnumProperty(name='Volume Interpolation', description='Interpolation method to use for volumes', items=enum_volume_interpolation, default='LINEAR')rd  a  FloatProperty(name='Step Size', description='Distance between volume shader samples when rendering the volume (lower values give more accurate and detailed results, but also increased render time)', default=1.0, min=1e-07, max=100000.0, soft_min=0.1, soft_max=100.0, precision=4)volume_step_sizec                T    [        SSU S9[        R                  R                  l        g )NzCycles World SettingszCycles world settingsr=  )r	   rA  rB  WorldrD  rE  s    rB   rG  CyclesWorldSettings.register  rs  rD   c                8    [         R                  R                  ?g r   )rA  rB  r|  rD  rE  s    rB   rJ  CyclesWorldSettings.unregister  rL  rD   Nrj  r   rD   rB   rw  rw    su    I        
 
 # #rD   rw  c                  v    \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   \S 5       r\S 5       rSr	g)CyclesVisibilitySettingsi  r   znBoolProperty(name='Camera', description='World visibility for camera rays', default=True, update=update_world)r   z{BoolProperty(name='Diffuse', description='World visibility for diffuse reflection rays', default=True, update=update_world)diffusezyBoolProperty(name='Glossy', description='World visibility for glossy reflection rays', default=True, update=update_world)glossyzzBoolProperty(name='Transmission', description='World visibility for transmission rays', default=True, update=update_world)transmissionznBoolProperty(name='Shadow', description='World visibility for shadow rays', default=True, update=update_world)shadowz~BoolProperty(name='Volume Scatter', description='World visibility for volume scatter rays', default=True, update=update_world)scatterc                T    [        SSU S9[        R                  R                  l        g )NzCycles Visibility SettingszCycles visibility settingsr=  )r	   rA  rB  r|  cycles_visibilityrE  s    rB   rG  !CyclesVisibilitySettings.register+  s     ,;-4-
		)rD   c                8    [         R                  R                  ?g r   )rA  rB  r|  r  rE  s    rB   rJ  #CyclesVisibilitySettings.unregister3  s    IIOO-rD   Nrj  r   rD   rB   r  r    sk    I       
 
 . .rD   r  c                  8    \ rS rSrSr\S 5       r\S 5       rSrg)CyclesMeshSettingsi8  r   c                    [        SSU S9[        R                  R                  l        [        SSU S9[        R                  R
                  l        [        SSU S9[        R                  R                  l        g )NzCycles Mesh SettingszCycles mesh settingsr=  )r	   rA  rB  MeshrD  CurveMetaBallrE  s    rB   rG  CyclesMeshSettings.register;  sb     /'.!
		
 "1'."
		
 %4'.%
		!rD   c                    [         R                  R                  ?[         R                  R                  ?[         R                  R
                  ?g r   )rA  rB  r  rD  r  r  rE  s    rB   rJ  CyclesMeshSettings.unregisterM  s.    IINN!IIOO"II%rD   Nr^  r   rD   rB   r  r  8  s-    I
 
" & &rD   r  c                      \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   \S 5       r\S 5       rSr	g)CyclesObjectSettingsiT  r   zaBoolProperty(name='Use Motion Blur', description='Use motion blur for this object', default=True)use_motion_blurztBoolProperty(name='Use Deformation Motion', description='Use deformation motion blur for this object', default=True)use_deform_motionzIntProperty(name='Motion Steps', description='Control accuracy of motion blur, more steps gives more memory usage (actual number of steps is 2^(steps - 1))', min=1, max=7, default=1)motion_stepszBoolProperty(name='Use Camera Cull', description='Allow this object and its duplicators to be culled by camera space culling', default=False)r!  zBoolProperty(name='Use Distance Cull', description='Allow this object and its duplicators to be culled by distance from camera', default=False)r#  zFloatProperty(name='Shadow Terminator Shading Offset', description='Push the shadow terminator towards the light to hide artifacts on low poly geometry', min=0.0, max=1.0, default=0.0)shadow_terminator_offsetzFloatProperty(name='Shadow Terminator Geometry Offset', description='Offset rays from the surface to reduce shadow terminator artifact on low poly geometry. Only affects triangles at grazing angles to light', min=0.0, max=1.0, default=0.1)!shadow_terminator_geometry_offsetzFloatProperty(name='AO Distance', description='AO distance used for approximate global illumination (0 means use world setting)', min=0.0, default=0.0, subtype='DISTANCE')ao_distancea0  BoolProperty(name='Cast Shadow Caustics', description='With refractive materials, generate approximate caustics in shadows of this object. Up to 10 bounces inside this object are taken into account. Lights, caster and receiver objects must have shadow caustics options set to enable this', default=False)is_caustics_casterzBoolProperty(name='Receive Shadow Caustics', description='Receive approximate caustics from refractive materials in shadows on this object. Lights, caster and receiver objects must have shadow caustics options set to enable this', default=False)is_caustics_receiverc                T    [        SSU S9[        R                  R                  l        g )NzCycles Object SettingszCycles object settingsr=  )r	   rA  rB  ObjectrD  rE  s    rB   rG  CyclesObjectSettings.register  s"    "1)0#
		rD   c                8    [         R                  R                  ?g r   )rA  rB  r  rD  rE  s    rB   rJ  CyclesObjectSettings.unregister  s    II#rD   Nrj  r   rD   rB   r  r  T  s    I      (     
 
 $ $rD   r  c                  N    \ rS rSr% SrS\S'   S\S'   \S 5       r\S 5       rSr	g	)
CyclesCurveRenderSettingsi  r   zcEnumProperty(name='Shape', description='Form of curves', items=enum_curve_shape, default='RIBBONS')shapezIntProperty(name='Subdivisions', description='Number of subdivisions used in Cardinal curve intersection (power of 2)', min=0, max=24, default=2)subdivisionsc                T    [        SSU S9[        R                  R                  l        g )Nz Cycles Curves Rendering Settingsz Cycles curves rendering settingsr=  )r	   rA  rB  rC  cycles_curvesrE  s    rB   rG  "CyclesCurveRenderSettings.register  s     (73:)
		%rD   c                8    [         R                  R                  ?g r   )rA  rB  rC  r  rE  s    rB   rJ  $CyclesCurveRenderSettings.unregister  s    IIOO)rD   Nrj  r   rD   rB   r  r    sC    I   
 
 * *rD   r  c                      \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   S\S'   S\S'   S\S'   S\S'   S\S'   \S 5       r\S 5       rSr	g)CyclesRenderLayerSettingsi  r   zBoolProperty(name='Debug Sample Count', description='Number of samples per pixel taken, divided by the maximum number of samples. To analyze adaptive sampling', default=False, update=update_render_passes)pass_debug_sample_countzBoolProperty(name='Render Time', description='Reports time per pixel in milliseconds. Supported only on CPU render devices', default=False, update=update_render_passes)pass_render_timezBoolProperty(name='Volume Direct', description='Deliver direct volumetric scattering pass', default=False, update=update_render_passes)use_pass_volume_directzBoolProperty(name='Volume Indirect', description='Deliver indirect volumetric scattering pass', default=False, update=update_render_passes)use_pass_volume_indirectzBoolProperty(name='Volume Scatter', description='Contribution of paths that scattered in the volume at the primary ray', default=False, update=update_render_passes)use_pass_volume_scatterzBoolProperty(name='Volume Transmit', description='Contribution of paths that transmitted through the volume at the primary ray', default=False, update=update_render_passes)use_pass_volume_transmitzBoolProperty(name='Volume Majorant', description='Majorant transmittance of the volume', default=False, update=update_render_passes)use_pass_volume_majorantzBoolProperty(name='Shadow Catcher', description='Pass containing shadows and light which is to be multiplied into backdrop', default=False, update=update_render_passes)use_pass_shadow_catcherr   r   zBoolProperty(name='Store Denoising Passes', description='Store the denoising feature passes and the noisy image. The passes adapt to the denoiser selected for rendering', default=False, update=update_render_passes)denoising_store_passesc                T    [        SSU S9[        R                  R                  l        g )NzCycles ViewLayer Settingsr=  )r	   rA  rB  	ViewLayerrD  rE  s    rB   rG  "CyclesRenderLayerSettings.register	  s"    %4,3&
		"rD   c                8    [         R                  R                  ?g r   )rA  rB  r  rD  rE  s    rB   rJ  $CyclesRenderLayerSettings.unregister  s    II&rD   Nrj  r   rD   rB   r  r    s    I           
 
 ' 'rD   r  c                  B    \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   Srg)CyclesDeviceSettingsi  is_optimizedzHStringProperty(name='ID', description='Unique identifier of the device')idz=StringProperty(name='Name', description='Name of the device')r>  zNBoolProperty(name='Use', description='Use device for rendering', default=True)usezAEnumProperty(name='Type', items=enum_device_type, default='CUDA')r@  r   N)rM  rN  rO  rP  rQ  rR  rU  r   rD   rB   r  r    s"    I 	QP
GG	WW
KKrD   r  c                      \ rS rSr% \r\S 5       rS rS\	S'   S\	S'   S\	S	'   S
\	S'   S\	S'   S\	S'   S\	S'   S r
S rS rS$S jrS rS%S jrS rS rS rS rS rS r\S 5       rS  rS! rS" rS#rg)&CyclesPreferencesi!  c                 ^    SS K n U R                  5       S:X  a  U R                  5       S:X  a  gg)Nr   Darwinarm64r,   )platformsystemmachine)r  s    rB   default_device CyclesPreferences.default_device$  s,     OO)0@0@0Bg0MrD   c                   SS K nUR                  5       u  p4pVpxSS[        S5      S4/n	U(       a  U	R                  SS[        S5      S45        U(       a  U	R                  SS	[        S
5      S45        U(       a  U	R                  SS[        S5      S45        U(       a  U	R                  SS[        S5      S45        U(       a  U	R                  SS[        S5      S45        U	$ )Nr   rE   rF   zDo not use compute devicerY   zUse CUDA for GPU accelerationr   rZ   r[   zUse OptiX for GPU accelerationr2   r\   zUse HIP for GPU accelerationr   r]   r^   zUse Metal for GPU accelerationr,   r_   r`   zUse oneAPI for GPU accelerationra   )r   get_device_typesr:   append)
r;   r<   r   has_cuda	has_optixhas_hip	has_metal
has_oneapi	has_hiprtlists
             rB   r  "CyclesPreferences.get_device_types-  s    IPIaIaIcFW$?!@!DEKK,K)LaPQKK'2.N+OQRSTKKr*H'I1MNKK'2.N+OQRSTKK8R0Q-RTUVWrD   zEnumProperty(name='Compute Device Type', description='Device to use for computation (rendering with Cycles)', default=CyclesPreferences.default_device(), items=CyclesPreferences.get_device_types)compute_device_typez-CollectionProperty(type=CyclesDeviceSettings)deviceszBoolProperty(name='Distribute memory across devices', description='Make more room for large scenes to fit by distributing memory across interconnected devices (e.g. via NVLink) rather than duplicating it', default=False)peer_memorya  EnumProperty(name='MetalRT', description='MetalRT for ray tracing uses less memory for scenes which use curves extensively, and can give better performance in specific cases', default='AUTO', items=(('OFF', 'Off', 'Disable MetalRT (uses BVH2 layout for intersection queries)'), ('ON', 'On', 'Enable MetalRT for intersection queries'), ('AUTO', 'Auto', 'Automatically pick the fastest intersection method')))metalrtzsBoolProperty(name='HIP RT', description='HIP RT enables AMD hardware ray tracing on RDNA2 and above', default=True)	use_hiprtzBoolProperty(name='Embree on GPU', description='Embree on GPU enables the use of hardware ray tracing on Intel GPUs, providing better overall performance', default=True)use_oneapirta  EnumProperty(name='Kernel Optimization', description='Kernels can be optimized based on scene content. Optimized kernels are requested at the start of a render. If optimized kernels are not available, rendering will proceed using generic kernels until the optimized set is available in the cache. This can result in additional CPU usage for a brief time (tens of seconds)', default='FULL', items=(('OFF', 'Off', 'Disable kernel optimization. Slowest rendering, no extra background CPU usage'), ('INTERSECT', 'Intersection only', 'Optimize only intersection kernels. Faster rendering, negligible extra background CPU usage'), ('FULL', 'Full', 'Optimize all kernels. Fastest rendering, may result in extra background CPU usage')))kernel_optimization_levelc                R    SS K nUR                  U5      nU R                  U5        U$ r0  )r   available_devicesupdate_device_entries)r;   r  r   device_lists       rB   get_device_list!CyclesPreferences.get_device_listu  s,    //0CD 	"";/rD   c                    U R                    H/  nUR                  US   :X  d  M  UR                  US   :X  d  M-  Us  $    g )Nr0   r   )r  r  r@  )r;   r   device_entrys      rB   find_existing_device_entry,CyclesPreferences.find_existing_device_entry~  s<     LLL&)+0A0AVAY0N## ) rD   c                6   U H  nUS   S;  a  M  U R                  U5      nU(       dN  U R                  R                  5       nUS   Ul        US   Ul        US   Ul        UR
                  S:g  Ul        Mt  UR                  US   :w  d  M  US   Ul        M     g )Nr   >   r   r\   rY   r]   rZ   r_   r0   r   r   )r  r  addr  r>  r@  r  )r;   r  r   entrys       rB   r  'CyclesPreferences.update_device_entries  s    !F!9 RR33F;E((*!!9#AY
#AY
!JJ%/	vay(#AY
 "rD   Nc                X   Uc  U R                  U5      n/ n/ nU Hd  nU R                  U5      nUS   Ul        UR                  U:X  a  UR	                  U5        MA  UR                  S:X  d  MS  UR	                  U5        Mf     [        U5      (       a  US:w  a  UR                  U5        U$ )Nrj   r   )r  r  r  r@  r  r   extend)r;   r  r  r  cpu_devicesr   r  s          rB   r   &CyclesPreferences.get_devices_for_type  s    ../BCK !F33F;E!'Ezz00u%u$""5) " w<</58NN;'rD   c                8    S H  nU R                  U5      nM     g )N)rY   rZ   r\   r]   r_   )r  )r;   device_type_device_lists      rB   refresh_devices!CyclesPreferences.refresh_devices  s"     GK  //<L	 GrD   c                $    U R                  5         g r   )r  )r;   r  s     rB   get_devicesCyclesPreferences.get_devices  s    rD   c                <    U R                   S:X  a  gU R                   $ )Nr   rE   )r  r;   s    rB   get_compute_device_type)CyclesPreferences.get_compute_device_type  s    ##r)'''rD   c                    U R                  5       nSnUS:w  ac  U R                  U5       HN  nUS   U:w  a  M  U R                   H0  nUR                  (       d  M  UR                  US   :X  d  M+  US-  nM2     MP     U$ )Nr   rE   r   r0   r  r  r  r  r  )r;   r  numr   devs        rB   get_num_gpu_devices%CyclesPreferences.get_num_gpu_devices  s{    "::<&(../BC!9 33<<Cwww366VAY#6q ( D 
rD   c                    U R                  5       nUS:w  a_  U R                  U5       HJ  nUS   U:X  a  M  U R                   H,  nUR                  (       d  M  UR                  US   :X  d  M+      g   ML     g)NrE   r   r0   TFr  )r;   r  r   r  s       rB   has_multi_device"CyclesPreferences.has_multi_device  sn    "::<&(../BC!9 33<<Cwww366VAY#6# ( D rD   c                (    U R                  5       S:  $ r0  )r   r  s    rB   has_active_device#CyclesPreferences.has_active_device  s    '')A--rD   c                    U R                  5       nUS:w  aU  U R                  U5       H@  nUS   nUS:X  a  M  US   nU(       d  M  U R                  U5      R                  (       d  M@    g   g)NrE   r   r   r,   TFr  r  r  r  )r;   r  r   r  has_device_oidn_supports        rB   has_oidn_gpu_devices&CyclesPreferences.has_oidn_gpu_devices  st    "::< &(../BC$Qi%'*0)'**t/N/Nv/V/Z/Z/Z D rD   c                    U R                  5       nUS:X  aU  U R                  U5       H@  nUS   nUS:X  a  M  US   nU(       d  M  U R                  U5      R                  (       d  M@    g   g)NrZ   r   r   ra   TFr	  )r;   r  r   r   has_device_optixdenoiser_supports        rB   has_optixdenoiser_gpu_devices/CyclesPreferences.has_optixdenoiser_gpu_devices  ss    "::<')../BC$Qi%'39!90338W8WX^8_8c8c8c D rD   c                   SS K nU R                  SUR                  S5      5      R                  SUR                  S5      5      R                  SUR                  S5      5      R                  SUR                  S5      5      $ )	Nr   z(TM)zTRADE MARK SIGNz(tm)z(R)zREGISTERED SIGNz(C)zCOPYRIGHT SIGN)unicodedatareplacelookup)r>  r  s     rB   _format_device_name%CyclesPreferences._format_device_name  sm    ||FK$6$67H$IJGFK$6$67H$IJGE;#5#56G#HIGE;#5#56F#GH	IrD   c                t   UR                  5       nU R                  X#5      nSnU H  nUR                  U:X  d  M  Sn  O   U(       Gd  UR                  SS9nUR	                  [        S5      SSS9  US:X  a   Sn	UR	                  [        S	5      U	-  S
SS9  g US:X  a?  Sn	Sn
UR	                  [        S	5      U	-  S
SS9  UR	                  [        S5      U
-  S
SS9  g US:X  a  SS KnUR                  S S S:X  aY  SnSnUR	                  [        S5      S
SS9  UR	                  [        S5      U-  S
SS9  UR	                  [        S5      U-  S
SS9  g UR                  R                  S5      (       aX  SnSn
UR	                  [        S5      S
SS9  UR	                  [        S5      U-  S
SS9  UR	                  [        S5      U
-  S
SS9  g US:X  a  SS KnUR                  R                  S5      (       a:  Sn
UR	                  [        S5      S
SS9  UR	                  [        S5      U
-  S
SS9  g UR                  R                  S5      (       am  S n
UR	                  [        S!5      S
SS9  UR	                  [        S"5      S
SS9  UR	                  [        S#5      U
-  S
SS9  UR	                  [        S$5      S
SS9  g US%:X  a  S&nUR	                  [        S'5      U-  S
SS9  g U HO  nU R                  UR                  5      nUR                  (       d  U[        S(5      -  nUR                  US)USS*9  MQ     g )+NFT)alignz#No compatible GPUs found for CyclesINFO)texticon	translaterY   z5.0z.Requires NVIDIA GPU with compute capability %sBLANK1rZ   535z%and NVIDIA driver version %s or newerr\   r   r2   winz24.9.1z24.Q4z'Requires AMD GPU with RDNA architecturez$and AMD Adrenalin driver %s or newerz$or AMD Radeon Pro %s driver or newerlinuxz6.0z23.40z and ROCm HIP Runtime %s or newerz!or AMD driver version %s or newerr_   zXX.X.101.8306z+Requires Intel GPU with Xe-HPG architecturez&and Windows driver version %s or newerzXX.XX.34666.3z/Requires Intel GPU with Xe-HPG architecture andz9  - intel-level-zero-gpu or intel-compute-runtime versionz    %s or newerz  - oneAPI Level-Zero Loaderr]   z12.2z-Requires Apple Silicon with macOS %s or newerz (Unoptimized Performance)r  )r  r  )boxr   r@  columnlabelrpt_sysr  
startswithr  r>  r  prop)r;   layoutr  r  r!  r  found_devicer   colcompute_capabilitydriver_versionr%  adrenalin_driver_versionpro_driver_versionrocm_versionmac_versionr>  s                    rB   _draw_devicesCyclesPreferences._draw_devices  s   jjl ++KEF{{k)# 
 **4*(CII4 EFV_dIef$%*"		t$TUXjj'5  :r o '%*"!&		t$TUXjj'5  :		t$KL~]'5  :d a %<<#u,/7,)0&II!"KL%"'  ) II4(N#O6$7=EQV  XII4(N#O0$17?5  RJ G \\,,W55#(L%,NII!"KL%"'  ) II!"DE$%+3u  F II4(K#L,$-3;u  N2 / (<<**511%4NII4(U#V]eqvIwII4(P#QTb#b#+u  >$ ! \\,,W55%4NII!"ST%"'  ) II!"]^%"'  ) II4(9#:^#KRZfkIlII4(F#GhbgIh
 	 '$		t$STWbb'5  :F++FKK8D&&9::HHVUH?	 rD   c                   UR                  5       nUR                  U SSS9  U R                  5       nUS:X  a  g UR                  5       nU R                  U5      nU R	                  X4U5        SS KnSnSnSn	U HL  n
U R                  U
5      R                  (       d  M%  U
S   U:w  a  M0  U
S   (       a  SnU
S	   (       a  SnMJ  Sn	MN     U=(       a    U	(       + nU(       a)  UR                  5       nSUl        UR                  U S
5        US:X  ai  SS K	nUR                  5       S:X  aQ  UR                  5       nSUl        UR                  U S5        UR                  5       nXl        UR                  U S5        US:X  a)  UR                  5       nXl        UR                  U S5        g US:X  a;  UR                  (       a)  UR                  5       nXl        UR                  U S5        g g g )Nr  T)expandrE   r   Fr   r2   r   r  r]   r  r  r  r\   r  r_   r  )rowr'  r  r  r1  r   r  r  use_property_splitr  r  r"  activewith_embree_gpu)r;   r(  r<   r5  r  r  r   has_peer_memoryhas_enabled_hardware_rthas_disabled_hardware_rtr   has_hardware_rtr  r*  s                 rB   	draw_implCyclesPreferences.draw_implW  s   jjl,T:"::<&(jjl&&':;3W="'#( F226:>>ay//ay"&ay*.'+/(  2R:R6R**,C%)C"HHT=)')   "g-mmo)-&:;ggi,
y)%'**,C(JHHT;' H,1H1H**,C(JHHT>* 2I,rD   c                <    U R                  U R                  U5        g r   )r=  r(  r   s     rB   drawCyclesPreferences.draw  s    t{{G,rD   r   r   )r   )rM  rN  rO  rP  r   	bl_idnamestaticmethodr  r  rR  r  r  r  r   r  r  r  r   r  r  r  r  r  r1  r=  r@  rU  r   rD   rB   r  r  !  s    I $  ;: 
 
    '&,=(

.   I IQ@f8+t-rD   r  c                      \ rS rSr% Sr\R                  R                  r\R                  R                  =(       a    \R                  R                  rS\S'   S\S'   Srg)CyclesView3DShadingSettingsi  r   zEnumProperty(name='Render Pass', description='Render pass to show in the 3D Viewport', items=enum_view3d_shading_render_pass + enum_view3d_debug_render_pass if use_debug else enum_view3d_shading_render_pass, default='COMBINED')render_passz|BoolProperty(name='Show Active Pixels', description='When using adaptive sampling highlight pixels which are being sampled')show_active_pixelsN)rM  rN  rO  rP  rQ  rA  r<   r5   r=   r6   r7   r8   r9   r>   rR  rU  r   rD   rB   rE  rE    sJ    IKK##E""33T

8T8TI  rD   rE  c                    [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [
        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                   R#                  S[        S9[         R$                  R&                  l        g )NzCycles Settings)r>  r@  )rA  utilsregister_classr   rW  r`  rl  rw  r  r  r  r  r  r  r  rE  propsr	   rB  View3DShadingrD  r   rD   rB   rG  rG    s%   II12II78II34II01II01II56II/0II12II67II12II./II67II89%(YY%>%>( &? &CII"rD   c                    [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [
        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        [         R                  R                  [        5        g r   )rA  rI  unregister_classr   rW  r`  rl  rw  r  r  r  r  r  r  r  rE  r   rD   rB   rJ  rJ    s    II34II9:II56II23II23II12II34II78II89II34II01II89II:;rD   )G
__future__r   rA  	bpy.propsr   r   r   r   r   r	   r
   bpy.app.translationsr   i18n_contextsr   r:   r   r$  mathr   r   r   r   enum_devicesenum_bvh_layoutsenum_bvh_typesenum_filter_typesenum_curve_shapeenum_use_layer_samplesrC   enum_emission_samplingenum_volume_samplingenum_volume_interpolationenum_world_misenum_device_typeenum_texture_limitenum_fast_gi_methodenum_view3d_shading_render_passenum_view3d_debug_render_passenum_guiding_distribution'enum_guiding_directional_sampling_typesr   r   r   r   enum_denoising_input_passesenum_denoising_prefilterenum_denoising_qualityenum_direct_light_sampling_typer   r   r   r   rB  PropertyGroupr   rW  r`  rl  rw  r  r  r  r  r  r  AddonPreferencesr  rE  rG  rJ  r   rD   rB   <module>rk     sB  
 # 
       

 
  /'d .
  
	| 	  %# N!  + ' &   #  &
!
%]#39922 ]#@+!8!8 + 0&SYY44 0&f&##))11 &#R:##))11 :#z2.syy66 2.j&00 &8S$39922 S$l*		 7 7 *:L'		 7 7 L'^L39922 Lq-		22 q-h#))"9"9 &*<rD   