2012-10-28 16:09:51 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
|
|
|
|
|
|
|
# <pep8 compliant>
|
|
|
|
import bpy
|
2014-04-25 05:31:20 +10:00
|
|
|
from bpy.types import Panel, UIList
|
2012-10-28 16:09:51 +00:00
|
|
|
|
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class RenderLayerButtonsPanel:
|
2012-10-28 16:09:51 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "render_layer"
|
|
|
|
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
|
2013-01-05 22:24:05 +00:00
|
|
|
class RENDERLAYER_UL_renderlayers(UIList):
|
|
|
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
Render Layers and Collections (merge from render-layers)
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
2017-02-07 10:18:38 +01:00
|
|
|
# assert(isinstance(item, bpy.types.SceneLayer)
|
2013-01-05 22:24:05 +00:00
|
|
|
layer = item
|
|
|
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
2013-11-23 20:37:23 +01:00
|
|
|
layout.prop(layer, "name", text="", icon_value=icon, emboss=False)
|
2013-01-05 22:24:05 +00:00
|
|
|
layout.prop(layer, "use", text="", index=index)
|
2015-04-14 10:29:11 +10:00
|
|
|
elif self.layout_type == 'GRID':
|
2013-01-05 22:24:05 +00:00
|
|
|
layout.alignment = 'CENTER'
|
|
|
|
layout.label("", icon_value=icon)
|
|
|
|
|
|
|
|
|
2012-10-28 16:09:51 +00:00
|
|
|
class RENDERLAYER_PT_layers(RenderLayerButtonsPanel, Panel):
|
2013-04-06 23:05:32 +00:00
|
|
|
bl_label = "Layer List"
|
2012-10-29 23:11:55 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2017-05-10 15:58:18 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
|
2012-10-28 16:09:51 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
rd = scene.render
|
|
|
|
|
2015-01-15 10:47:02 +01:00
|
|
|
if rd.engine == 'BLENDER_GAME':
|
|
|
|
layout.label("Not available in the Game Engine")
|
|
|
|
return
|
|
|
|
|
2012-10-28 16:09:51 +00:00
|
|
|
row = layout.row()
|
2013-10-13 23:04:39 +00:00
|
|
|
col = row.column()
|
Render Layers and Collections (merge from render-layers)
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
2017-02-07 10:18:38 +01:00
|
|
|
col.template_list("RENDERLAYER_UL_renderlayers", "", scene, "render_layers", scene.render_layers, "active_index", rows=2)
|
2012-10-28 16:09:51 +00:00
|
|
|
|
2013-11-24 14:25:38 +01:00
|
|
|
col = row.column()
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.operator("scene.render_layer_add", icon='ZOOMIN', text="")
|
|
|
|
sub.operator("scene.render_layer_remove", icon='ZOOMOUT', text="")
|
2014-01-30 16:31:57 +11:00
|
|
|
col.prop(rd, "use_single_layer", icon_only=True)
|
2012-10-28 16:09:51 +00:00
|
|
|
|
2012-10-29 23:11:55 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
class RENDERLAYER_UL_renderviews(UIList):
|
|
|
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
|
|
|
|
# assert(isinstance(item, bpy.types.SceneRenderView)
|
|
|
|
view = item
|
|
|
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
|
|
|
if view.name in {'left', 'right'}:
|
|
|
|
layout.label(view.name, icon_value=icon + (not view.use))
|
|
|
|
else:
|
|
|
|
layout.prop(view, "name", text="", index=index, icon_value=icon, emboss=False)
|
|
|
|
layout.prop(view, "use", text="", index=index)
|
|
|
|
|
|
|
|
elif self.layout_type == 'GRID':
|
|
|
|
layout.alignment = 'CENTER'
|
|
|
|
layout.label("", icon_value=icon + (not view.use))
|
|
|
|
|
|
|
|
|
|
|
|
class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Views"
|
2017-05-16 12:58:02 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'}
|
2015-08-08 20:52:47 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2015-04-06 10:40:12 -03:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
rd = context.scene.render
|
|
|
|
self.layout.prop(rd, "use_multiview", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
scene = context.scene
|
|
|
|
rd = scene.render
|
|
|
|
rv = rd.views.active
|
|
|
|
|
|
|
|
layout.active = rd.use_multiview
|
|
|
|
basic_stereo = rd.views_format == 'STEREO_3D'
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(rd, "views_format", expand=True)
|
|
|
|
|
|
|
|
if basic_stereo:
|
|
|
|
row = layout.row()
|
|
|
|
row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "stereo_views", rd.views, "active_index", rows=2)
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.label(text="File Suffix:")
|
|
|
|
row.prop(rv, "file_suffix", text="")
|
|
|
|
|
|
|
|
else:
|
|
|
|
row = layout.row()
|
|
|
|
row.template_list("RENDERLAYER_UL_renderviews", "name", rd, "views", rd.views, "active_index", rows=2)
|
|
|
|
|
|
|
|
col = row.column(align=True)
|
|
|
|
col.operator("scene.render_view_add", icon='ZOOMIN', text="")
|
|
|
|
col.operator("scene.render_view_remove", icon='ZOOMOUT', text="")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.label(text="Camera Suffix:")
|
|
|
|
row.prop(rv, "camera_suffix", text="")
|
|
|
|
|
|
|
|
|
2017-05-05 16:27:31 +02:00
|
|
|
class RENDERLAYER_PT_clay_settings(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Render Settings"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_CLAY'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_CLAY']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_CLAY']
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.template_override_property(layer_props, scene_props, "ssao_samples")
|
|
|
|
|
|
|
|
|
2017-05-10 15:58:18 +02:00
|
|
|
class RENDERLAYER_PT_eevee_poststack_settings(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Post Process Stack"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-06-22 02:30:20 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_enable")
|
2017-05-10 15:58:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "motion_blur_enable")
|
|
|
|
col.template_override_property(layer_props, scene_props, "dof_enable")
|
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_enable")
|
|
|
|
|
2017-05-11 14:30:33 +02:00
|
|
|
|
2017-05-10 15:58:18 +02:00
|
|
|
class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Post Process Settings"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-06-22 02:30:20 +02:00
|
|
|
col.label("Ambient Occlusion:")
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_use_bent_normals")
|
2017-08-18 15:06:51 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_denoise")
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_bounce")
|
2017-06-22 02:30:20 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_samples")
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_distance")
|
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_factor")
|
2017-08-18 15:06:51 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "gtao_quality")
|
2017-06-22 02:30:20 +02:00
|
|
|
col.separator()
|
|
|
|
|
2017-05-10 15:58:18 +02:00
|
|
|
col.label("Motion Blur:")
|
|
|
|
col.template_override_property(layer_props, scene_props, "motion_blur_samples")
|
|
|
|
col.template_override_property(layer_props, scene_props, "motion_blur_shutter")
|
2017-05-11 14:30:33 +02:00
|
|
|
col.separator()
|
2017-05-10 15:58:18 +02:00
|
|
|
|
|
|
|
col.label("Depth of Field:")
|
|
|
|
col.template_override_property(layer_props, scene_props, "bokeh_max_size")
|
|
|
|
col.template_override_property(layer_props, scene_props, "bokeh_threshold")
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.label("Bloom:")
|
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_threshold")
|
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_knee")
|
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_radius")
|
2017-08-19 02:40:02 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_color")
|
2017-05-10 15:58:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_intensity")
|
2017-08-19 02:39:16 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "bloom_clamp")
|
2017-05-10 15:58:18 +02:00
|
|
|
|
|
|
|
|
2017-07-05 14:44:43 +02:00
|
|
|
class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Volumetric"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "volumetric_enable", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-07-05 19:23:57 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_start")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_end")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_samples")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_sample_distribution")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_lights")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_light_clamp")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_shadows")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_shadow_samples")
|
|
|
|
col.template_override_property(layer_props, scene_props, "volumetric_colored_transmittance")
|
2017-07-05 14:44:43 +02:00
|
|
|
|
|
|
|
|
2017-07-24 11:18:11 +02:00
|
|
|
class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Screen Space Reflections"
|
2017-07-16 23:49:25 +02:00
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
2017-07-24 11:18:11 +02:00
|
|
|
def draw_header(self, context):
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
self.layout.template_override_property(layer_props, scene_props, "ssr_enable", text="")
|
|
|
|
|
2017-07-16 23:49:25 +02:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
col = layout.column()
|
2017-07-22 01:13:33 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_halfres")
|
2017-08-09 16:54:18 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_refraction")
|
2017-07-24 11:18:11 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_ray_count")
|
2017-07-30 17:11:05 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_quality")
|
2017-07-31 15:18:22 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_max_roughness")
|
2017-07-21 23:48:48 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_thickness")
|
2017-07-22 14:41:34 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_border_fade")
|
2017-07-24 11:18:11 +02:00
|
|
|
col.template_override_property(layer_props, scene_props, "ssr_firefly_fac")
|
2017-07-16 23:49:25 +02:00
|
|
|
|
|
|
|
|
2017-09-01 15:59:58 +02:00
|
|
|
class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel):
|
|
|
|
bl_label = "Shadows"
|
|
|
|
COMPAT_ENGINES = {'BLENDER_EEVEE'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
scene = context.scene
|
|
|
|
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
scene = context.scene
|
|
|
|
scene_props = scene.layer_properties['BLENDER_EEVEE']
|
|
|
|
layer = bpy.context.render_layer
|
|
|
|
layer_props = layer.engine_overrides['BLENDER_EEVEE']
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.template_override_property(layer_props, scene_props, "shadow_method")
|
|
|
|
col.template_override_property(layer_props, scene_props, "shadow_size")
|
|
|
|
|
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
classes = (
|
2017-03-20 02:34:32 +11:00
|
|
|
RENDERLAYER_UL_renderlayers,
|
|
|
|
RENDERLAYER_PT_layers,
|
2017-03-18 20:03:24 +11:00
|
|
|
RENDERLAYER_UL_renderviews,
|
2017-03-20 02:34:32 +11:00
|
|
|
RENDERLAYER_PT_views,
|
2017-05-05 16:27:31 +02:00
|
|
|
RENDERLAYER_PT_clay_settings,
|
2017-05-10 15:58:18 +02:00
|
|
|
RENDERLAYER_PT_eevee_poststack_settings,
|
|
|
|
RENDERLAYER_PT_eevee_postprocess_settings,
|
2017-07-24 11:18:11 +02:00
|
|
|
RENDERLAYER_PT_eevee_screen_space_reflections,
|
2017-07-05 14:44:43 +02:00
|
|
|
RENDERLAYER_PT_eevee_volumetric,
|
2017-09-01 18:39:39 +02:00
|
|
|
RENDERLAYER_PT_eevee_shadows,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
2012-10-28 16:09:51 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|