[Bf-blender-cvs] [4b7b1ba1148] blender2.8: UI: more single column layout for brush and render properties.

William Reynish noreply at git.blender.org
Wed Oct 31 18:00:53 CET 2018


Commit: 4b7b1ba114812caaa096ac2994051f8148bea9a5
Author: William Reynish
Date:   Wed Oct 31 17:23:43 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB4b7b1ba114812caaa096ac2994051f8148bea9a5

UI: more single column layout for brush and render properties.

===================================================================

M	intern/cycles/blender/addon/ui.py
M	release/scripts/startup/bl_ui/properties_freestyle.py
M	release/scripts/startup/bl_ui/properties_paint_common.py
M	release/scripts/startup/bl_ui/properties_render.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

===================================================================

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index cdc999f9b5a..d1778c7ecd3 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -763,27 +763,36 @@ class CYCLES_RENDER_PT_passes_data(CyclesButtonsPanel, Panel):
         view_layer = context.view_layer
         cycles_view_layer = view_layer.cycles
 
-        col = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+        col = flow.column()
         col.prop(view_layer, "use_pass_combined")
+        col = flow.column()
         col.prop(view_layer, "use_pass_z")
+        col = flow.column()
         col.prop(view_layer, "use_pass_mist")
+        col = flow.column()
         col.prop(view_layer, "use_pass_normal")
-        row = col.row()
-        row.prop(view_layer, "use_pass_vector")
-        row.active = not rd.use_motion_blur
+        col = flow.column()
+        col.prop(view_layer, "use_pass_vector")
+        col.active = not rd.use_motion_blur
+        col = flow.column()
         col.prop(view_layer, "use_pass_uv")
+        col = flow.column()
         col.prop(view_layer, "use_pass_object_index")
+        col = flow.column()
         col.prop(view_layer, "use_pass_material_index")
 
-        col.separator()
+        layout.separator()
 
-        col = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+        flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+        col = flow.column()
         col.prop(cycles_view_layer, "denoising_store_passes", text="Denoising Data")
+        col = flow.column()
         col.prop(cycles_view_layer, "pass_debug_render_time", text="Render Time")
 
-        col.separator()
+        layout.separator()
 
-        col.prop(view_layer, "pass_alpha_threshold")
+        layout.prop(view_layer, "pass_alpha_threshold")
 
 
 class CYCLES_RENDER_PT_passes_light(CyclesButtonsPanel, Panel):
@@ -929,30 +938,50 @@ class CYCLES_RENDER_PT_denoising(CyclesButtonsPanel, Panel):
 
         layout.separator()
 
-        row = layout.row(align=True)
-        row.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
-        row.label(text="Diffuse")
+        split = layout.split(factor=0.5)
+        split.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
+
+        col = split.column()
+        col.alignment = 'RIGHT'
+        col.label(text="Diffuse")
+
+        row = split.row(align=True)
         row.use_property_split = False
         row.prop(cycles_view_layer, "denoising_diffuse_direct", text="Direct", toggle=True)
         row.prop(cycles_view_layer, "denoising_diffuse_indirect", text="Indirect", toggle=True)
 
-        row = layout.row(align=True)
-        row.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
-        row.label(text="Glossy")
+        split = layout.split(factor=0.5)
+        split.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
+
+        col = split.column()
+        col.alignment = 'RIGHT'
+        col.label(text="Glossy")
+
+        row = split.row(align=True)
         row.use_property_split = False
         row.prop(cycles_view_layer, "denoising_glossy_direct", text="Direct", toggle=True)
         row.prop(cycles_view_layer, "denoising_glossy_indirect", text="Indirect", toggle=True)
 
-        row = layout.row(align=True)
-        row.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
-        row.label(text="Transmission")
+        split = layout.split(factor=0.5)
+        split.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
+
+        col = split.column()
+        col.alignment = 'RIGHT'
+        col.label(text="Transmission")
+
+        row = split.row(align=True)
         row.use_property_split = False
         row.prop(cycles_view_layer, "denoising_transmission_direct", text="Direct", toggle=True)
         row.prop(cycles_view_layer, "denoising_transmission_indirect", text="Indirect", toggle=True)
 
-        row = layout.row(align=True)
-        row.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
-        row.label(text="Subsurface")
+        split = layout.split(factor=0.5)
+        split.active = cycles_view_layer.use_denoising or cycles_view_layer.denoising_store_passes
+
+        col = split.column()
+        col.alignment = 'RIGHT'
+        col.label(text="Subsurface")
+
+        row = split.row(align=True)
         row.use_property_split = False
         row.prop(cycles_view_layer, "denoising_subsurface_direct", text="Direct", toggle=True)
         row.prop(cycles_view_layer, "denoising_subsurface_indirect", text="Indirect", toggle=True)
diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index 96c78f6a7d8..f5f15c7ca58 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -47,14 +47,14 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
 
     def draw(self, context):
         layout = self.layout
+        layout.use_property_split = True
+        layout.use_property_decorate = False  # No animation.
 
         rd = context.scene.render
 
         layout.active = rd.use_freestyle
 
-        row = layout.row()
-        row.label(text="Line Thickness:")
-        row.prop(rd, "line_thickness_mode", expand=True)
+        layout.prop(rd, "line_thickness_mode", expand=True)
 
         if (rd.line_thickness_mode == 'ABSOLUTE'):
             layout.prop(rd, "line_thickness")
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index aa53bc44750..1bd95019a45 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -48,16 +48,22 @@ class UnifiedPaintPanel:
     @staticmethod
     def unified_paint_settings(parent, context):
         ups = context.tool_settings.unified_paint_settings
-        parent.label(text="Unified Settings:")
-        row = parent.row()
-        row.prop(ups, "use_unified_size", text="Size")
-        row.prop(ups, "use_unified_strength", text="Strength")
+
+        flow = parent.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+
+        col = flow.column()
+        col.prop(ups, "use_unified_size", text="Size")
+        col = flow.column()
+        col.prop(ups, "use_unified_strength", text="Strength")
         if context.weight_paint_object:
-            parent.prop(ups, "use_unified_weight", text="Weight")
+            col = flow.column()
+            col.prop(ups, "use_unified_weight", text="Weight")
         elif context.vertex_paint_object or context.image_paint_object:
-            parent.prop(ups, "use_unified_color", text="Color")
+            col = flow.column()
+            col.prop(ups, "use_unified_color", text="Color")
         else:
-            parent.prop(ups, "use_unified_color", text="Color")
+            col = flow.column()
+            col.prop(ups, "use_unified_color", text="Color")
 
     @staticmethod
     def prop_unified_size(parent, context, brush, prop_name, icon='NONE', text="", slider=False):
@@ -230,15 +236,16 @@ def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=Fal
 def brush_texture_settings(layout, brush, sculpt):
     tex_slot = brush.texture_slot
 
-    layout.label(text="Brush Mapping:")
+    layout.use_property_split = True
+    layout.use_property_decorate = False
 
     # map_mode
     if sculpt:
-        layout.row().prop(tex_slot, "map_mode", text="")
-        layout.separator()
+        layout.prop(tex_slot, "map_mode", text="Mapping")
     else:
-        layout.row().prop(tex_slot, "tex_paint_map_mode", text="")
-        layout.separator()
+        layout.prop(tex_slot, "tex_paint_map_mode", text="Mapping")
+
+    layout.separator()
 
     if tex_slot.map_mode == 'STENCIL':
         if brush.texture and brush.texture.type == 'IMAGE':
@@ -248,8 +255,7 @@ def brush_texture_settings(layout, brush, sculpt):
     # angle and texture_angle_source
     if tex_slot.has_texture_angle:
         col = layout.column()
-        col.label(text="Angle:")
-        col.prop(tex_slot, "angle", text="")
+        col.prop(tex_slot, "angle", text="Angle")
         if tex_slot.has_texture_angle_source:
             col.prop(tex_slot, "use_rake", text="Rake")
 
@@ -258,32 +264,29 @@ def brush_texture_settings(layout, brush, sculpt):
                     if brush.sculpt_capabilities.has_random_texture_angle:
                         col.prop(tex_slot, "use_random", text="Random")
                         if tex_slot.use_random:
-                            col.prop(tex_slot, "random_angle", text="")
+                            col.prop(tex_slot, "random_angle", text="Raandom Angle")
                 else:
                     col.prop(tex_slot, "use_random", text="Random")
                     if tex_slot.use_random:
-                        col.prop(tex_slot, "random_angle", text="")
+                        col.prop(tex_slot, "random_angle", text="Random Angle")
 
     # scale and offset
-    split = layout.split()
-    split.prop(tex_slot, "offset")
-    split.prop(tex_slot, "scale")
+    layout.prop(tex_slot, "offset")
+    layout.prop(tex_slot, "scale")
 
     if sculpt:
         # texture_sample_bias
-        col = layout.column(align=True)
-        col.label(text="Sample Bias:")
-        col.prop(brush, "texture_sample_bias", slider=True, text="")
+        layout.prop(brush, "texture_sample_bias", slider=True, text="Sample Bias")
 
 
 def brush_mask_texture_settings(layout, brush):
     mask_tex_slot = brush.mask_texture_slot
 
-    layout.label(text="Mask Mapping:")
+    layout.use_property_split = True
+    layout.use_property_decorate = False
 
     # map_mode


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list