Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-03-30 18:01:23 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-03-30 18:01:23 +0300
commitce3c7e8ff515e5bfbf70d0f4f60557e26c9d98a1 (patch)
tree1062bd45d22a2a0aff4e4a227079154b78c42263 /release/scripts/startup/bl_ui/properties_render.py
parent98e69631b0cf31b5b73c1d9afb9bd9fc81fc42be (diff)
Layers: use IDProperty and override collection properties system
First this replace a custom data struct with IDProperty, and use IDProperty group merge and copying functions. Which means that a collection property setting is only created if necessary. This implements the "Layer Collection settings" override system, as suggested in the "Override Manifesto" document. The core is working, with Scene, LayerCollection and Object using a single IDProperty to store all the render settings data. Next step is to migrate this to depsgraph. Note: Clay engine "ssao_samples" was hardcoded to 32 for now. It will come back as part of "Workspace Settings" later. Many thanks for Bastien Montagne for the help with the UI template nightmare ;) Differential Revision: https://developer.blender.org/D2563
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_render.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 43c89a32a52..be7104163fd 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -584,23 +584,24 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
sub.prop(rd, "bake_user_scale", text="User Scale")
-class RENDER_PT_clay(RenderButtonsPanel, Panel):
- bl_label = "Default Clay"
+class RENDER_PT_clay_collection_settings(RenderButtonsPanel, Panel):
+ bl_label = "Clay Collection Settings"
COMPAT_ENGINES = {'BLENDER_CLAY'}
def draw(self, context):
- layout = self.layout;
- settings = context.scene.active_engine_settings
- layout.template_icon_view(settings, "matcap_icon")
- layout.prop(settings, "matcap_rotation")
- layout.prop(settings, "matcap_hue")
- layout.prop(settings, "matcap_saturation")
- layout.prop(settings, "matcap_value")
- layout.prop(settings, "ssao_factor_cavity")
- layout.prop(settings, "ssao_factor_edge")
- layout.prop(settings, "ssao_distance")
- layout.prop(settings, "ssao_attenuation")
- layout.prop(settings, "ssao_samples")
+ layout = self.layout
+ props = context.scene.collection_properties['BLENDER_CLAY']
+
+ col = layout.column()
+ col.template_icon_view(props, "matcap_icon")
+ col.prop(props, "matcap_rotation")
+ col.prop(props, "matcap_hue")
+ col.prop(props, "matcap_saturation")
+ col.prop(props, "matcap_value")
+ col.prop(props, "ssao_factor_cavity")
+ col.prop(props, "ssao_factor_edge")
+ col.prop(props, "ssao_distance")
+ col.prop(props, "ssao_attenuation")
classes = (
@@ -618,7 +619,7 @@ classes = (
RENDER_PT_output,
RENDER_PT_encoding,
RENDER_PT_bake,
- RENDER_PT_clay,
+ RENDER_PT_clay_collection_settings,
)
if __name__ == "__main__": # only for live edit.