Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_render_layer.py
| Show All 24 Lines | class RenderLayerButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "render_layer" | bl_context = "render_layer" | ||||
| # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here | # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| class RENDERLAYER_UL_renderlayers(UIList): | class RENDERLAYER_UL_renderlayers(UIList): | ||||
| def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): | def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): | ||||
| # assert(isinstance(item, bpy.types.SceneLayer) | # assert(isinstance(item, bpy.types.SceneLayer) | ||||
| layer = item | layer = item | ||||
| if self.layout_type in {'DEFAULT', 'COMPACT'}: | if self.layout_type in {'DEFAULT', 'COMPACT'}: | ||||
| layout.prop(layer, "name", text="", icon_value=icon, emboss=False) | layout.prop(layer, "name", text="", icon_value=icon, emboss=False) | ||||
| layout.prop(layer, "use", text="", index=index) | layout.prop(layer, "use", text="", index=index) | ||||
| elif self.layout_type == 'GRID': | elif self.layout_type == 'GRID': | ||||
| layout.alignment = 'CENTER' | layout.alignment = 'CENTER' | ||||
| layout.label("", icon_value=icon) | layout.label("", icon_value=icon) | ||||
| class RENDERLAYER_PT_layers(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_layers(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Layer List" | bl_label = "Layer List" | ||||
| bl_options = {'HIDE_HEADER'} | bl_options = {'HIDE_HEADER'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| rd = scene.render | view_render = scene.view_render | ||||
| if rd.engine == 'BLENDER_GAME': | if view_render.engine == 'BLENDER_GAME': | ||||
| layout.label("Not available in the Game Engine") | layout.label("Not available in the Game Engine") | ||||
| return | return | ||||
| row = layout.row() | row = layout.row() | ||||
| col = row.column() | col = row.column() | ||||
| col.template_list("RENDERLAYER_UL_renderlayers", "", scene, "render_layers", scene.render_layers, "active_index", rows=2) | col.template_list("RENDERLAYER_UL_renderlayers", "", scene, "render_layers", scene.render_layers, "active_index", rows=2) | ||||
| col = row.column() | col = row.column() | ||||
| ▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
| class RENDERLAYER_PT_clay_settings(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_clay_settings(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Render Settings" | bl_label = "Render Settings" | ||||
| COMPAT_ENGINES = {'BLENDER_CLAY'} | COMPAT_ENGINES = {'BLENDER_CLAY'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_CLAY'] | scene_props = scene.layer_properties['BLENDER_CLAY'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_CLAY'] | layer_props = layer.engine_overrides['BLENDER_CLAY'] | ||||
| col = layout.column() | col = layout.column() | ||||
| col.template_override_property(layer_props, scene_props, "ssao_samples") | col.template_override_property(layer_props, scene_props, "ssao_samples") | ||||
| class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Ambient Occlusion" | bl_label = "Ambient Occlusion" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| self.layout.template_override_property(layer_props, scene_props, "gtao_enable", text="") | self.layout.template_override_property(layer_props, scene_props, "gtao_enable", text="") | ||||
| Show All 18 Lines | |||||
| class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Motion Blur" | bl_label = "Motion Blur" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| self.layout.template_override_property(layer_props, scene_props, "motion_blur_enable", text="") | self.layout.template_override_property(layer_props, scene_props, "motion_blur_enable", text="") | ||||
| Show All 13 Lines | |||||
| class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Depth Of Field" | bl_label = "Depth Of Field" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| self.layout.template_override_property(layer_props, scene_props, "dof_enable", text="") | self.layout.template_override_property(layer_props, scene_props, "dof_enable", text="") | ||||
| Show All 13 Lines | |||||
| class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Bloom" | bl_label = "Bloom" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| self.layout.template_override_property(layer_props, scene_props, "bloom_enable", text="") | self.layout.template_override_property(layer_props, scene_props, "bloom_enable", text="") | ||||
| Show All 17 Lines | |||||
| class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Volumetric" | bl_label = "Volumetric" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| self.layout.template_override_property(layer_props, scene_props, "volumetric_enable", text="") | self.layout.template_override_property(layer_props, scene_props, "volumetric_enable", text="") | ||||
| Show All 20 Lines | |||||
| class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Screen Space Reflections" | bl_label = "Screen Space Reflections" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| self.layout.template_override_property(layer_props, scene_props, "ssr_enable", text="") | self.layout.template_override_property(layer_props, scene_props, "ssr_enable", text="") | ||||
| Show All 19 Lines | |||||
| class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Shadows" | bl_label = "Shadows" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| col = layout.column() | col = layout.column() | ||||
| col.template_override_property(layer_props, scene_props, "shadow_method") | col.template_override_property(layer_props, scene_props, "shadow_method") | ||||
| col.template_override_property(layer_props, scene_props, "shadow_size") | col.template_override_property(layer_props, scene_props, "shadow_size") | ||||
| col.template_override_property(layer_props, scene_props, "shadow_high_bitdepth") | col.template_override_property(layer_props, scene_props, "shadow_high_bitdepth") | ||||
| class RENDERLAYER_PT_eevee_sampling(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_sampling(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Sampling" | bl_label = "Sampling" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| col = layout.column() | col = layout.column() | ||||
| col.template_override_property(layer_props, scene_props, "taa_samples") | col.template_override_property(layer_props, scene_props, "taa_samples") | ||||
| class RENDERLAYER_PT_eevee_indirect_lighting(RenderLayerButtonsPanel, Panel): | class RENDERLAYER_PT_eevee_indirect_lighting(RenderLayerButtonsPanel, Panel): | ||||
| bl_label = "Indirect Lighting" | bl_label = "Indirect Lighting" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_EEVEE'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and (scene.render.engine in cls.COMPAT_ENGINES) | return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| scene_props = scene.layer_properties['BLENDER_EEVEE'] | scene_props = scene.layer_properties['BLENDER_EEVEE'] | ||||
| layer = bpy.context.render_layer | layer = bpy.context.render_layer | ||||
| layer_props = layer.engine_overrides['BLENDER_EEVEE'] | layer_props = layer.engine_overrides['BLENDER_EEVEE'] | ||||
| Show All 25 Lines | |||||