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:
authorWilliam Reynish <billreynish>2018-10-31 19:23:43 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-10-31 19:58:57 +0300
commit4b7b1ba114812caaa096ac2994051f8148bea9a5 (patch)
treec15beb2b5b7890b57bd6e104611d4907c501241f /release
parenta2a8e7121081404e35d9aa4769b17ebf23f83f11 (diff)
UI: more single column layout for brush and render properties.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_freestyle.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py66
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py147
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py355
4 files changed, 380 insertions, 194 deletions
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
- layout.row().prop(mask_tex_slot, "mask_map_mode", text="")
- layout.separator()
+ layout.row().prop(mask_tex_slot, "mask_map_mode", text="Mask Mapping")
if mask_tex_slot.map_mode == 'STENCIL':
if brush.mask_texture and brush.mask_texture.type == 'IMAGE':
@@ -291,25 +294,22 @@ def brush_mask_texture_settings(layout, brush):
layout.operator("brush.stencil_reset_transform").mask = True
col = layout.column()
- col.prop(brush, "use_pressure_masking", text="")
+ col.prop(brush, "use_pressure_masking", text="Pressure Masking")
# angle and texture_angle_source
if mask_tex_slot.has_texture_angle:
col = layout.column()
- col.label(text="Angle:")
- col.prop(mask_tex_slot, "angle", text="")
+ col.prop(mask_tex_slot, "angle", text="Angle")
if mask_tex_slot.has_texture_angle_source:
col.prop(mask_tex_slot, "use_rake", text="Rake")
if brush.brush_capabilities.has_random_texture_angle and mask_tex_slot.has_random_texture_angle:
col.prop(mask_tex_slot, "use_random", text="Random")
if mask_tex_slot.use_random:
- col.prop(mask_tex_slot, "random_angle", text="")
+ col.prop(mask_tex_slot, "random_angle", text="Random Angle")
# scale and offset
- split = layout.split()
- split.prop(mask_tex_slot, "offset")
- split.prop(mask_tex_slot, "scale")
-
+ col.prop(mask_tex_slot, "offset")
+ col.prop(mask_tex_slot, "scale")
classes = (
VIEW3D_MT_tools_projectpaint_clone,
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 951324cfbfd..25e22be5377 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -197,11 +197,13 @@ class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
rd = context.scene.render
- col = layout.column(align=True)
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+ col = flow.column()
col.prop(rd, "use_compositing")
+ col = flow.column()
col.prop(rd, "use_sequencer")
- col.prop(rd, "dither_intensity", text="Dither", slider=True)
+ layout.prop(rd, "dither_intensity", text="Dither", slider=True)
class RENDER_PT_stamp(RenderButtonsPanel, Panel):
@@ -252,11 +254,26 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
col = flow.column()
col.prop(rd, "use_stamp_strip_meta", text="Use Strip Metadata")
- row = layout.split(factor=0.3)
- row.prop(rd, "use_stamp_note", text="Note")
- sub = row.row()
- sub.active = rd.use_stamp_note
- sub.prop(rd, "stamp_note_text", text="")
+
+class RENDER_PT_stamp_note(RenderButtonsPanel, Panel):
+ bl_label = "Note"
+ bl_parent_id = "RENDER_PT_stamp"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_OPENGL'}
+
+ def draw_header(self, context):
+ rd = context.scene.render
+
+ self.layout.prop(rd, "use_stamp_note", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.render
+
+ layout.active = rd.use_stamp_note
+ layout.prop(rd, "stamp_note_text", text="")
+
class RENDER_PT_stamp_burn(RenderButtonsPanel, Panel):
@@ -589,12 +606,11 @@ class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
layout.active = props.use_gtao
col = layout.column()
- col.prop(props, "use_gtao_bent_normals")
- col.prop(props, "use_gtao_bounce")
col.prop(props, "gtao_distance")
col.prop(props, "gtao_factor")
col.prop(props, "gtao_quality")
-
+ col.prop(props, "use_gtao_bent_normals")
+ col.prop(props, "use_gtao_bounce")
class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel):
bl_label = "Motion Blur"
@@ -701,25 +717,57 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
props = scene.eevee
layout.active = props.use_volumetric
+
+ col = layout.column(align=True)
+ col.prop(props, "volumetric_start")
+ col.prop(props, "volumetric_end")
+
col = layout.column()
- sub = col.column(align=True)
- sub.prop(props, "volumetric_start")
- sub.prop(props, "volumetric_end")
col.prop(props, "volumetric_tile_size")
- col.separator()
col.prop(props, "volumetric_samples")
- sub.prop(props, "volumetric_sample_distribution")
- col.separator()
- col.prop(props, "use_volumetric_lights")
+ col.prop(props, "volumetric_sample_distribution")
- sub = col.column()
- sub.active = props.use_volumetric_lights
- sub.prop(props, "volumetric_light_clamp", text="Light Clamping")
- col.separator()
- col.prop(props, "use_volumetric_shadows")
- sub = col.column()
- sub.active = props.use_volumetric_shadows
- sub.prop(props, "volumetric_shadow_samples", text="Shadow Samples")
+
+class RENDER_PT_eevee_volumetric_lighting(RenderButtonsPanel, Panel):
+ bl_label = "Volumetric Lighting"
+ bl_parent_id = "RENDER_PT_eevee_volumetric"
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ def draw_header(self, context):
+ scene = context.scene
+ props = scene.eevee
+ self.layout.prop(props, "use_volumetric_lights", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ props = scene.eevee
+
+ layout.active = props.use_volumetric_lights
+ layout.prop(props, "volumetric_light_clamp", text="Light Clamping")
+
+
+class RENDER_PT_eevee_volumetric_shadows(RenderButtonsPanel, Panel):
+ bl_label = "Volumetric Shadows"
+ bl_parent_id = "RENDER_PT_eevee_volumetric"
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ def draw_header(self, context):
+ scene = context.scene
+ props = scene.eevee
+ self.layout.prop(props, "use_volumetric_shadows", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+
+ scene = context.scene
+ props = scene.eevee
+
+ layout.active = props.use_volumetric_shadows
+ layout.prop(props, "volumetric_shadow_samples", text="Shadow Samples")
class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
@@ -862,28 +910,36 @@ class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
col.prop(props, "gi_cubemap_resolution")
col.prop(props, "gi_visibility_resolution", text="Diffuse Occlusion")
- layout.use_property_split = False
- row = layout.split(factor=0.5)
- row.alignment = 'RIGHT'
- row.label(text="Cubemap Display")
+class RENDER_PT_eevee_indirect_lighting_display(RenderButtonsPanel, Panel):
+ bl_label = "Display"
+ bl_parent_id = "RENDER_PT_eevee_indirect_lighting"
+ COMPAT_ENGINES = {'BLENDER_EEVEE'}
+
+ @classmethod
+ def poll(cls, context):
+ return (context.engine in cls.COMPAT_ENGINES)
- sub = row.row(align=True)
- sub.prop(props, "gi_cubemap_display_size", text="Size")
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ scene = context.scene
+ props = scene.eevee
+
+ row = layout.row(align=True)
+ row.prop(props, "gi_cubemap_display_size", text="Cubemap Size")
if props.gi_show_cubemaps:
- sub.prop(props, "gi_show_cubemaps", text="", toggle=True, icon='HIDE_OFF')
+ row.prop(props, "gi_show_cubemaps", text="", toggle=True, icon='HIDE_OFF')
else:
- sub.prop(props, "gi_show_cubemaps", text="", toggle=True, icon='HIDE_ON')
+ row.prop(props, "gi_show_cubemaps", text="", toggle=True, icon='HIDE_ON')
- row = layout.split(factor=0.5)
- row.alignment = 'RIGHT'
- row.label(text="Irradiance Display")
-
- sub = row.row(align=True)
- sub.prop(props, "gi_irradiance_display_size", text="Size")
+ row = layout.row(align=True)
+ row.prop(props, "gi_irradiance_display_size", text="Irradiance Size")
if props.gi_show_irradiance:
- sub.prop(props, "gi_show_irradiance", text="", toggle=True, icon='HIDE_OFF')
+ row.prop(props, "gi_show_irradiance", text="", toggle=True, icon='HIDE_OFF')
else:
- sub.prop(props, "gi_show_irradiance", text="", toggle=True, icon='HIDE_ON')
+ row.prop(props, "gi_show_irradiance", text="", toggle=True, icon='HIDE_ON')
class RENDER_PT_eevee_film(RenderButtonsPanel, Panel):
@@ -921,10 +977,9 @@ class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel):
scene = context.scene
rd = scene.render
- row = layout.row()
- row.prop(rd, "hair_type", expand=True)
-
layout.use_property_split = True
+
+ layout.prop(rd, "hair_type", expand=True)
layout.prop(rd, "hair_subdiv")
@@ -996,6 +1051,7 @@ classes = (
RENDER_PT_encoding_video,
RENDER_PT_encoding_audio,
RENDER_PT_stamp,
+ RENDER_PT_stamp_note,
RENDER_PT_stamp_burn,
RENDER_UL_renderviews,
RENDER_PT_stereoscopy,
@@ -1006,10 +1062,13 @@ classes = (
RENDER_PT_eevee_film,
RENDER_PT_eevee_shadows,
RENDER_PT_eevee_indirect_lighting,
+ RENDER_PT_eevee_indirect_lighting_display,
RENDER_PT_eevee_subsurface_scattering,
RENDER_PT_eevee_screen_space_reflections,
RENDER_PT_eevee_ambient_occlusion,
RENDER_PT_eevee_volumetric,
+ RENDER_PT_eevee_volumetric_lighting,
+ RENDER_PT_eevee_volumetric_shadows,
RENDER_PT_eevee_motion_blur,
RENDER_PT_eevee_depth_of_field,
RENDER_PT_eevee_bloom,
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index e8fffe0c309..9ab2465d7e2 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -88,6 +88,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
bl_category = "Options"
bl_context = ".mesh_edit" # dot on purpose (access from topbar)
bl_label = "Mesh Options"
+ bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
@@ -111,11 +112,11 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
row.active = ob.data.use_mirror_x
row.prop(mesh, "use_mirror_topology")
- layout.prop(tool_settings, "edge_path_mode")
layout.prop(tool_settings, "edge_path_live_unwrap")
- layout.prop(tool_settings, "double_threshold")
- layout.prop(tool_settings, "use_mesh_automerge") # , icon='AUTOMERGE_ON'
+ layout.prop(tool_settings, "use_mesh_automerge")
+ layout.prop(tool_settings, "double_threshold")
+ layout.prop(tool_settings, "edge_path_mode")
# ********** default tools for editmode_curve ****************
@@ -620,6 +621,8 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
settings = self.paint_settings(context)
brush = settings.brush
@@ -628,54 +631,33 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
col = layout.column()
- col.label(text="Curve:")
row = col.row(align=True)
- row.prop(
- brush,
- "use_cursor_overlay",
- text="",
- toggle=True,
- icon='RESTRICT_VIEW_OFF' if brush.use_cursor_overlay else 'RESTRICT_VIEW_ON',
- )
+
sub = row.row(align=True)
- sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
+ sub.prop(brush, "cursor_overlay_alpha", text="Curve Alpha")
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ row.prop(brush,"use_cursor_overlay", text="", toggle=True, icon='HIDE_ON' if brush.use_cursor_overlay else 'HIDE_OFF')
col.active = brush.brush_capabilities.has_overlay
if context.image_paint_object or context.sculpt_object or context.vertex_paint_object:
- col.label(text="Texture:")
row = col.row(align=True)
- if tex_slot.map_mode != 'STENCIL':
- row.prop(
- brush,
- "use_primary_overlay",
- text="",
- toggle=True,
- icon='RESTRICT_VIEW_OFF' if brush.use_primary_overlay else 'RESTRICT_VIEW_ON',
- )
sub = row.row(align=True)
- sub.prop(brush, "texture_overlay_alpha", text="Alpha")
+ sub.prop(brush, "texture_overlay_alpha", text="Texture Alpha")
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ if tex_slot.map_mode != 'STENCIL':
+ row.prop(brush, "use_primary_overlay", text="", toggle=True, icon='HIDE_ON' if brush.use_primary_overlay else 'HIDE_OFF')
if context.image_paint_object:
- col.label(text="Mask Texture:")
-
row = col.row(align=True)
- if tex_slot_mask.map_mode != 'STENCIL':
- row.prop(
- brush,
- "use_secondary_overlay",
- text="",
- toggle=True,
- icon='RESTRICT_VIEW_OFF' if brush.use_secondary_overlay else 'RESTRICT_VIEW_ON',
- )
sub = row.row(align=True)
- sub.prop(brush, "mask_overlay_alpha", text="Alpha")
+ sub.prop(brush, "mask_overlay_alpha", text="Mask Texture Alpha")
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
+ if tex_slot_mask.map_mode != 'STENCIL':
+ row.prop(brush, "use_secondary_overlay", text="", toggle=True, icon='HIDE_ON' if brush.use_secondary_overlay else 'HIDE_OFF')
# TODO, move to space_view3d.py
@@ -755,32 +737,26 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
col.prop(brush, "stroke_method")
if brush.use_anchor:
- col.separator()
col.prop(brush, "use_edge_to_edge", text="Edge To Edge")
if brush.use_airbrush:
- col.separator()
col.prop(brush, "rate", text="Rate", slider=True)
if brush.use_space:
- col.separator()
row = col.row(align=True)
row.prop(brush, "spacing", text="Spacing")
row.prop(brush, "use_pressure_spacing", toggle=True, text="")
if brush.use_line or brush.use_curve:
- col.separator()
row = col.row(align=True)
row.prop(brush, "spacing", text="Spacing")
if brush.use_curve:
- col.separator()
col.template_ID(brush, "paint_curve", new="paintcurve.new")
col.operator("paintcurve.draw")
if context.sculpt_object:
if brush.sculpt_capabilities.has_jitter:
- col.separator()
row = col.row(align=True)
if brush.use_relative_jitter:
@@ -790,39 +766,52 @@ class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
row.prop(brush, "use_relative_jitter", icon_only=True)
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
- if brush.sculpt_capabilities.has_smooth_stroke:
- col = layout.column()
- col.separator()
-
- col.prop(brush, "use_smooth_stroke")
-
- sub = col.column()
- sub.active = brush.use_smooth_stroke
- sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
- sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
else:
- col.separator()
row = col.row(align=True)
- row.prop(brush, "use_relative_jitter", icon_only=True)
if brush.use_relative_jitter:
row.prop(brush, "jitter", slider=True)
else:
row.prop(brush, "jitter_absolute")
+ row.prop(brush, "use_relative_jitter", icon_only=True)
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col = layout.column()
- col.separator()
- if brush.brush_capabilities.has_smooth_stroke:
- col.prop(brush, "use_smooth_stroke")
+ layout.prop(settings, "input_samples")
- sub = col.column()
- sub.active = brush.use_smooth_stroke
- sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
- sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
- layout.prop(settings, "input_samples")
+class VIEW3D_PT_tools_brush_stroke_smooth_stroke(Panel, View3DPaintPanel):
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
+ bl_label = "Smooth Stroke"
+ bl_parent_id = "VIEW3D_PT_tools_brush_stroke"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ settings = cls.paint_settings(context)
+ brush = settings.brush
+ if brush.brush_capabilities.has_smooth_stroke:
+ return True
+
+ def draw_header(self, context):
+ settings = self.paint_settings(context)
+ brush = settings.brush
+
+ self.layout.prop(brush, "use_smooth_stroke", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ settings = self.paint_settings(context)
+ brush = settings.brush
+
+ col = layout.column()
+ col.active = brush.use_smooth_stroke
+ col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
+ col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
# TODO, move to space_view3d.py
@@ -904,15 +893,37 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
col.prop(sculpt, "use_smooth_shading")
- col.separator()
+
+class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel):
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
+ bl_label = "Remesh"
+ bl_parent_id = "VIEW3D_PT_sculpt_dyntopo"
+ bl_options = {'DEFAULT_CLOSED'}
+ bl_ui_units_x = 12
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ toolsettings = context.tool_settings
+ sculpt = toolsettings.sculpt
+
+ col = layout.column()
+ col.active = context.sculpt_object.use_dynamic_topology_sculpting
col.prop(sculpt, "symmetrize_direction")
+
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+
+ col = flow.column()
col.operator("sculpt.symmetrize")
+ col = flow.column()
col.operator("sculpt.optimize")
if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}:
+ col = flow.column()
col.operator("sculpt.detail_flood_fill")
-
# TODO, move to space_view3d.py
class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
@@ -925,25 +936,64 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ toolsettings = context.tool_settings
+ sculpt = toolsettings.sculpt
+
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+
+ col = flow.column()
+ col.prop(sculpt, "use_threaded", text="Threaded Sculpt")
+ col = flow.column()
+ col.prop(sculpt, "show_low_resolution")
+ col = flow.column()
+ col.prop(sculpt, "use_deform_only")
+ col = flow.column()
+ col.prop(sculpt, "show_diffuse_color")
+ col = flow.column()
+ col.prop(sculpt, "show_mask")
+
+
+class VIEW3D_PT_sculpt_options_unified(Panel, View3DPaintPanel):
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
+ bl_parent_id = "VIEW3D_PT_sculpt_options"
+ bl_label = "Unified Brush"
+
+ @classmethod
+ def poll(cls, context):
+ return (context.sculpt_object and context.tool_settings.sculpt)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ self.unified_paint_settings(layout, context)
+
+class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel):
+ bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
+ bl_parent_id = "VIEW3D_PT_sculpt_options"
+ bl_label = "Gravity"
+
+ @classmethod
+ def poll(cls, context):
+ return (context.sculpt_object and context.tool_settings.sculpt)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
toolsettings = context.tool_settings
sculpt = toolsettings.sculpt
capabilities = sculpt.brush.sculpt_capabilities
- col = layout.column(align=True)
+ col = layout.column()
col.active = capabilities.has_gravity
- col.label(text="Gravity:")
col.prop(sculpt, "gravity", slider=True, text="Factor")
col.prop(sculpt, "gravity_object")
- col.separator()
-
- layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
- layout.prop(sculpt, "show_low_resolution")
- layout.prop(sculpt, "use_deform_only")
- layout.prop(sculpt, "show_diffuse_color")
- layout.prop(sculpt, "show_mask")
-
- self.unified_paint_settings(layout, context)
# TODO, move to space_view3d.py
@@ -1023,35 +1073,68 @@ class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
def draw(self, context):
layout = self.layout
- settings = self.paint_settings(context)
- brush = settings.brush
-
if brush is None: # unlikely but can happen
layout.label(text="Brush Unset")
return
- col = layout.column()
- col.prop(settings, "show_brush")
- sub = col.column()
- sub.active = settings.show_brush
+class VIEW3D_PT_tools_brush_appearance_show_brush(Panel, View3DPaintPanel):
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
+ bl_label = "Show Brush"
+ bl_parent_id = "VIEW3D_PT_tools_brush_appearance"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_header(self, context):
+ settings = self.paint_settings(context)
+
+ self.layout.prop(settings, "show_brush", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ settings = self.paint_settings(context)
+ brush = settings.brush
+
+ col = layout.column()
+ col.active = settings.show_brush
if context.sculpt_object and context.tool_settings.sculpt:
if brush.sculpt_capabilities.has_secondary_color:
- sub.row().prop(brush, "cursor_color_add", text="Add")
- sub.row().prop(brush, "cursor_color_subtract", text="Subtract")
+ col.prop(brush, "cursor_color_add", text="Add")
+ col.prop(brush, "cursor_color_subtract", text="Subtract")
else:
- sub.prop(brush, "cursor_color_add", text="")
+ col.prop(brush, "cursor_color_add", text="Color")
else:
- sub.prop(brush, "cursor_color_add", text="")
+ col.prop(brush, "cursor_color_add", text="Color")
- col.separator()
- col = col.column(align=True)
- col.prop(brush, "use_custom_icon")
- sub = col.column()
- sub.active = brush.use_custom_icon
- sub.prop(brush, "icon_filepath", text="")
+class VIEW3D_PT_tools_brush_appearance_custom_icon(Panel, View3DPaintPanel):
+ bl_context = ".paint_common" # dot on purpose (access from topbar)
+ bl_label = "Custom Icon"
+ bl_parent_id = "VIEW3D_PT_tools_brush_appearance"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_header(self, context):
+ settings = self.paint_settings(context)
+ brush = settings.brush
+
+ self.layout.prop(brush, "use_custom_icon", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ settings = self.paint_settings(context)
+ brush = settings.brush
+
+ col = layout.column()
+ col.active = brush.use_custom_icon
+ col.prop(brush, "icon_filepath", text="")
# ********** default tools for weight-paint ****************
@@ -1133,17 +1216,22 @@ class VIEW3D_PT_tools_imagepaint_external(Panel, View3DPaintPanel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
toolsettings = context.tool_settings
ipaint = toolsettings.image_paint
- col = layout.column()
- row = col.split(factor=0.55, align=True)
- row.operator("image.project_edit", text="Quick Edit")
- row.operator("image.project_apply", text="Apply")
+ layout.prop(ipaint, "screen_grab_size", text="Screen Grab Size")
- col.row().prop(ipaint, "screen_grab_size", text="")
+ layout.separator()
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+ col = flow.column()
+ col.operator("image.project_edit", text="Quick Edit")
+ col = flow.column()
+ col.operator("image.project_apply", text="Apply")
+ col = flow.column()
col.operator("paint.project_image", text="Apply Camera Image")
@@ -1187,14 +1275,12 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
toolsettings = context.tool_settings
ipaint = toolsettings.image_paint
- col = layout.column()
-
- col.prop(ipaint, "use_occlude")
- col.prop(ipaint, "use_backface_culling")
-
row = layout.row()
row.prop(ipaint, "use_normal_falloff")
@@ -1202,14 +1288,51 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
sub.active = (ipaint.use_normal_falloff)
sub.prop(ipaint, "normal_angle", text="")
- layout.prop(ipaint, "use_cavity")
- if ipaint.use_cavity:
- layout.template_curve_mapping(ipaint, "cavity_curve", brush=True)
-
layout.prop(ipaint, "seam_bleed")
layout.prop(ipaint, "dither")
+
+ flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
+
+ col = flow.column()
+ col.prop(ipaint, "use_occlude")
+
+ col = flow.column()
+ col.prop(ipaint, "use_backface_culling")
+
+class VIEW3D_PT_tools_projectpaint_unified(Panel, View3DPaintPanel):
+ bl_context = ".imagepaint" # dot on purpose (access from topbar)
+ bl_parent_id = "VIEW3D_PT_tools_projectpaint"
+ bl_label = "Unified Brush"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
self.unified_paint_settings(layout, context)
+class VIEW3D_PT_tools_projectpaint_cavity(View3DPaintPanel, Panel):
+ bl_context = ".imagepaint" # dot on purpose (access from topbar)
+ bl_label = "Cavity Mask"
+ bl_parent_id = "VIEW3D_PT_tools_projectpaint"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_header(self, context):
+ toolsettings = context.tool_settings
+ ipaint = toolsettings.image_paint
+
+ self.layout.prop(ipaint, "use_cavity", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ toolsettings = context.tool_settings
+ ipaint = toolsettings.image_paint
+
+ layout.active = ipaint.use_cavity
+
+ layout.template_curve_mapping(ipaint, "cavity_curve", brush=True)
+
# TODO, move to space_view3d.py
class VIEW3D_PT_imagepaint_options(View3DPaintPanel):
@@ -1312,22 +1435,18 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
class VIEW3D_PT_tools_normal(View3DPanel, Panel):
bl_category = ""
bl_context = ".mesh_edit"
- bl_label = "Normal Tools"
+ bl_label = "Normals"
+ bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
- toolsettings = context.tool_settings
-
- col = layout.column(align=True)
- col.label(text="Normal Vector")
- col.prop(toolsettings, "normal_vector", text="")
-
- layout.separator()
- layout.label(text="Face Strength")
- layout.prop(toolsettings, "face_strength", text="")
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
- col = layout.column(align=True)
+ toolsettings = context.tool_settings
+ layout.prop(toolsettings, "normal_vector", text="Normal Vector")
+ layout.prop(toolsettings, "face_strength", text="Face Strength")
# ********** grease pencil object tool panels ****************
@@ -1752,11 +1871,17 @@ classes = (
VIEW3D_PT_tools_brush_texture,
VIEW3D_PT_tools_mask_texture,
VIEW3D_PT_tools_brush_stroke,
+ VIEW3D_PT_tools_brush_stroke_smooth_stroke,
VIEW3D_PT_tools_brush_curve,
VIEW3D_PT_sculpt_dyntopo,
+ VIEW3D_PT_sculpt_dyntopo_remesh,
VIEW3D_PT_sculpt_options,
+ VIEW3D_PT_sculpt_options_unified,
+ VIEW3D_PT_sculpt_options_gravity,
VIEW3D_PT_sculpt_symmetry,
VIEW3D_PT_tools_brush_appearance,
+ VIEW3D_PT_tools_brush_appearance_show_brush,
+ VIEW3D_PT_tools_brush_appearance_custom_icon,
VIEW3D_PT_tools_weightpaint_symmetry,
VIEW3D_PT_tools_weightpaint_options,
VIEW3D_PT_tools_vertexpaint,
@@ -1764,6 +1889,8 @@ classes = (
VIEW3D_PT_tools_imagepaint_external,
VIEW3D_PT_tools_imagepaint_symmetry,
VIEW3D_PT_tools_projectpaint,
+ VIEW3D_PT_tools_projectpaint_unified,
+ VIEW3D_PT_tools_projectpaint_cavity,
VIEW3D_MT_tools_projectpaint_stencil,
VIEW3D_PT_tools_particlemode,