Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/properties.py
| Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | |||||
| enum_denoising_input_passes = ( | enum_denoising_input_passes = ( | ||||
| ('RGB', "Color", "Use only color as input", 1), | ('RGB', "Color", "Use only color as input", 1), | ||||
| ('RGB_ALBEDO', "Color + Albedo", "Use color and albedo data as input", 2), | ('RGB_ALBEDO', "Color + Albedo", "Use color and albedo data as input", 2), | ||||
| ('RGB_ALBEDO_NORMAL', "Color + Albedo + Normal", "Use color, albedo and normal data as input", 3), | ('RGB_ALBEDO_NORMAL', "Color + Albedo + Normal", "Use color, albedo and normal data as input", 3), | ||||
| ) | ) | ||||
| enum_denoising_prefilter = ( | |||||
| ('NONE', "None", "No prefiltering, use when guiding passes are noise-free", 1), | |||||
| ('FAST', "Fast", "Denoise color and guiding passes together. Improves quality when guiding passes are noisy using least amount of extra processing time", 2), | |||||
| ('ACCURATE', "Accurate", "Prefilter noisy guiding passes before denoising color. Improves quality when guiding passes are noisy using extra processing time", 3), | |||||
| ) | |||||
| def update_render_passes(self, context): | def update_render_passes(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| view_layer = context.view_layer | view_layer = context.view_layer | ||||
| view_layer.update_render_passes() | view_layer.update_render_passes() | ||||
| class CyclesRenderSettings(bpy.types.PropertyGroup): | class CyclesRenderSettings(bpy.types.PropertyGroup): | ||||
| Show All 27 Lines | use_denoising: BoolProperty( | ||||
| default=False, | default=False, | ||||
| update=update_render_passes, | update=update_render_passes, | ||||
| ) | ) | ||||
| use_preview_denoising: BoolProperty( | use_preview_denoising: BoolProperty( | ||||
| name="Use Viewport Denoising", | name="Use Viewport Denoising", | ||||
| description="Denoise the image in the 3D viewport", | description="Denoise the image in the 3D viewport", | ||||
| default=False, | default=False, | ||||
| ) | ) | ||||
| use_preview_denoising_prefilter: BoolProperty( | preview_denoising_prefilter: EnumProperty( | ||||
| name="Use Denoising Prefilter", | name="Denoising Prefilter", | ||||
| description="Prefilter noisy guiding (albedo and normal) passes to improve denoising quality when using OpenImageDenoiser", | description="Prefilter noisy guiding (albedo and normal) passes to improve denoising quality when using OpenImageDenoiser", | ||||
| default=False, | items=enum_denoising_prefilter, | ||||
| default=2, | |||||
| ) | ) | ||||
| denoiser: EnumProperty( | denoiser: EnumProperty( | ||||
| name="Denoiser", | name="Denoiser", | ||||
| description="Denoise the image with the selected denoiser. " | description="Denoise the image with the selected denoiser. " | ||||
| "For denoising the image after rendering", | "For denoising the image after rendering", | ||||
| items=enum_denoiser, | items=enum_denoiser, | ||||
| default=1, | default=1, | ||||
| ▲ Show 20 Lines • Show All 954 Lines • ▼ Show 20 Lines | denoising_optix_input_passes: EnumProperty( | ||||
| default='RGB_ALBEDO', | default='RGB_ALBEDO', | ||||
| ) | ) | ||||
| denoising_openimagedenoise_input_passes: EnumProperty( | denoising_openimagedenoise_input_passes: EnumProperty( | ||||
| name="Input Passes", | name="Input Passes", | ||||
| description="Passes used by the denoiser to distinguish noise from shader and geometry detail", | description="Passes used by the denoiser to distinguish noise from shader and geometry detail", | ||||
| items=enum_denoising_input_passes, | items=enum_denoising_input_passes, | ||||
| default='RGB_ALBEDO_NORMAL', | default='RGB_ALBEDO_NORMAL', | ||||
| ) | ) | ||||
| use_denoising_prefilter: BoolProperty( | denoising_prefilter: EnumProperty( | ||||
| name="Use Denoising Prefilter", | name="Denoising Prefilter", | ||||
| description="Prefilter noisy guiding (albedo and normal) passes to improve denoising quality when using OpenImageDenoiser", | description="Prefilter noisy guiding (albedo and normal) passes to improve denoising quality when using OpenImageDenoiser", | ||||
| default=True, | items=enum_denoising_prefilter, | ||||
| default=1, | |||||
| ) | ) | ||||
| @classmethod | @classmethod | ||||
| def register(cls): | def register(cls): | ||||
| bpy.types.ViewLayer.cycles = PointerProperty( | bpy.types.ViewLayer.cycles = PointerProperty( | ||||
| name="Cycles ViewLayer Settings", | name="Cycles ViewLayer Settings", | ||||
| description="Cycles ViewLayer Settings", | description="Cycles ViewLayer Settings", | ||||
| type=cls, | type=cls, | ||||
| ▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines | |||||