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:
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py17
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py1
-rw-r--r--release/scripts/startup/bl_ui/space_image.py3
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py76
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py145
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py10
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py102
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py23
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py4
14 files changed, 249 insertions, 148 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index aca358870c8..ff4425fbb73 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -267,7 +267,7 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
if bone:
col = layout.column()
- col.prop(bone, "hide", text="Hide")
+ col.prop(bone, "hide", text="Hide", toggle=0)
class BONE_PT_display_custom_shape(BoneButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 75e9a320130..d58dec211be 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1437,6 +1437,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
if md.falloff_type == 'CURVE':
layout.template_curve_mapping(md, "map_curve")
+ row = layout.row(align=True)
+ row.prop(md, "normalize")
+
# Common mask options
layout.separator()
self.vertex_weight_mask(layout, ob, md)
@@ -1446,7 +1449,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Vertex Group A:")
- col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="")
+ row = col.row(align=True)
+ row.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="")
+ row.prop(md, "invert_vertex_group_a", text="", icon='ARROW_LEFTRIGHT')
col.label(text="Default Weight A:")
col.prop(md, "default_weight_a", text="")
@@ -1455,13 +1460,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Vertex Group B:")
- col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="")
+ row = col.row(align=True)
+ row.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="")
+ row.prop(md, "invert_vertex_group_b", text="", icon='ARROW_LEFTRIGHT')
col.label(text="Default Weight B:")
col.prop(md, "default_weight_b", text="")
col.label(text="Mix Set:")
col.prop(md, "mix_set", text="")
+ row = layout.row(align=True)
+ row.prop(md, "normalize")
+
# Common mask options
layout.separator()
self.vertex_weight_mask(layout, ob, md)
@@ -1495,6 +1505,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "falloff_type")
row.prop(md, "invert_falloff", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "normalize")
+
# Common mask options
layout.separator()
self.vertex_weight_mask(layout, ob, md)
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 64eda42c87a..07c9fc363b5 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -612,7 +612,7 @@ class GreasePencilMaterialsPanel:
if is_view3d and brush is not None:
gp_settings = brush.gpencil_settings
if gp_settings.use_material_pin is False:
- if ob.active_material_index >= 0:
+ if len(ob.material_slots) > 0 and ob.active_material_index >= 0:
ma = ob.material_slots[ob.active_material_index].material
else:
ma = gp_settings.material
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 92d421f63a8..5fadb31c83f 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -125,7 +125,7 @@ class UnifiedPaintPanel:
if unified_name and not header:
# NOTE: We don't draw UnifiedPaintSettings in the header to reduce clutter. D5928#136281
- row.prop(ups, unified_name, text="", icon="BRUSHES_ALL")
+ row.prop(ups, unified_name, text="", icon='BRUSHES_ALL')
return row
@@ -619,10 +619,12 @@ def brush_settings(layout, context, brush, popover=False):
if brush.sculpt_tool == 'POSE':
layout.separator()
+ layout.prop(brush, "pose_deform_type")
layout.prop(brush, "pose_origin_type")
layout.prop(brush, "pose_offset")
layout.prop(brush, "pose_smooth_iterations")
- layout.prop(brush, "pose_ik_segments")
+ if brush.pose_deform_type == 'ROTATE_TWIST':
+ layout.prop(brush, "pose_ik_segments")
layout.prop(brush, "use_pose_ik_anchored")
layout.separator()
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 4b0791a63e6..2c8ed363738 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -237,7 +237,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel):
col = grid.column()
col.prop(flow, "flow_behavior", expand=False)
if flow.flow_behavior in {'INFLOW', 'OUTFLOW'}:
- col.prop(flow, "use_inflow", text="Use Flow")
+ col.prop(flow, "use_inflow")
col.prop(flow, "subframes", text="Sampling Substeps")
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index dd7bf54dc68..b03f80bd600 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -79,14 +79,12 @@ class PHYSICS_PT_rigid_body_settings(PHYSICS_PT_rigidbody_panel, Panel):
rigid_body_warning(layout)
return
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
- col = flow.column()
+ col = layout.column()
if rbo.type == 'ACTIVE':
col.prop(rbo, "mass")
col.prop(rbo, "enabled", text="Dynamic")
- col = flow.column()
col.prop(rbo, "kinematic", text="Animated")
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index c5c75f95937..ad7dc2a586c 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -554,7 +554,6 @@ class RENDER_PT_gpencil(RenderButtonsPanel, Panel):
col.prop(props, "antialias_threshold")
-
class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel):
bl_label = "Sampling"
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index bc4665209aa..76b7fc7f156 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -93,9 +93,6 @@ class IMAGE_MT_view(Menu):
layout.separator()
layout.prop(sima, "use_realtime_update")
- if show_uvedit:
- layout.prop(tool_settings, "show_uv_local_view")
-
layout.prop(uv, "show_metadata")
if paint.brush and (context.image_paint_object or sima.mode == 'PAINT'):
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index ca25c29960c..41c220f7ee4 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -307,12 +307,15 @@ class SEQUENCER_MT_view(Menu):
layout.separator()
layout.operator_context = 'INVOKE_DEFAULT'
- layout.prop(st, "show_seconds")
layout.prop(st, "show_locked_time")
+
+ layout.separator()
+ layout.prop(st, "show_seconds")
layout.prop(st, "show_strip_offset")
layout.prop(st, "show_fcurves")
- layout.separator()
layout.prop(st, "show_markers")
+ layout.menu("SEQUENCER_MT_view_cache", text="Show Cache")
+ layout.prop_menu_enum(st, "waveform_display_type", text="Show Waveforms")
if is_preview:
layout.separator()
@@ -324,12 +327,6 @@ class SEQUENCER_MT_view(Menu):
elif st.display_mode == 'WAVEFORM':
layout.prop(st, "show_separate_color", text="Show Separate Color Channels")
- if is_sequencer_view:
- layout.separator()
-
- layout.menu("SEQUENCER_MT_view_cache")
- layout.prop_menu_enum(st, "waveform_display_type")
-
layout.separator()
layout.operator("render.opengl", text="Sequence Render Image", icon='RENDER_STILL').sequencer = True
@@ -338,7 +335,7 @@ class SEQUENCER_MT_view(Menu):
props.sequencer = True
layout.separator()
- layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon="EXPORT")
+ layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon='EXPORT')
layout.separator()
@@ -1033,10 +1030,14 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
if strip.input_count > 0:
col = layout.column()
- col.enabled = False
- col.prop(strip, "input_1")
+ row = col.row()
+ row.prop(strip, "input_1")
+
if strip.input_count > 1:
- col.prop(strip, "input_2")
+ row.operator("sequencer.swap_inputs", text="", icon='SORT_ASC')
+ row = col.row()
+ row.prop(strip, "input_2")
+ row.operator("sequencer.swap_inputs", text="", icon='SORT_DESC')
strip_type = strip.type
@@ -1195,31 +1196,14 @@ class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel):
col.prop(strip, "font_size")
col.prop(strip, "color")
-
-class SEQUENCER_PT_effect_text_style_shadow(SequencerButtonsPanel, Panel):
- bl_label = "Shadow"
- bl_parent_id = "SEQUENCER_PT_effect_text_style"
- bl_options = {'DEFAULT_CLOSED'}
- bl_category = "Strip"
-
- @classmethod
- def poll(cls, context):
- strip = act_strip(context)
- return strip.type != 'SOUND'
-
- def draw_header(self, context):
- strip = act_strip(context)
- self.layout.prop(strip, "use_shadow", text="")
-
- def draw(self, context):
- strip = act_strip(context)
- layout = self.layout
- layout.use_property_split = True
-
- layout.active = strip.use_shadow and (not strip.mute)
-
- col = layout.column(align=True)
- col.prop(strip, "shadow_color", text="Color")
+ row = layout.row(align=True, heading="Shadow")
+ row.use_property_decorate = False
+ sub = row.row(align=True)
+ sub.prop(strip, "use_shadow", text="")
+ subsub = sub.row(align=True)
+ subsub.active = strip.use_shadow and (not strip.mute)
+ subsub.prop(strip, "shadow_color", text="")
+ row.prop_decorator(strip, "shadow_color")
class SEQUENCER_PT_source(SequencerButtonsPanel, Panel):
@@ -1931,7 +1915,7 @@ class SEQUENCER_PT_strip_cache(SequencerButtonsPanel, Panel):
class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
- bl_label = "Scene Preview/Render"
+ bl_label = "Scene Strip Display"
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
bl_options = {'DEFAULT_CLOSED'}
@@ -1945,7 +1929,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
render = context.scene.render
col = layout.column()
- col.prop(render, "sequencer_gl_preview", text="Preview Shading")
+ col.prop(render, "sequencer_gl_preview", text="Shading")
if render.sequencer_gl_preview in {'SOLID', 'WIREFRAME'}:
col.prop(render, "use_sequencer_override_scene_strip")
@@ -2232,10 +2216,16 @@ classes = (
SEQUENCER_MT_strip_input,
SEQUENCER_MT_strip_lock_mute,
SEQUENCER_MT_context_menu,
+
SEQUENCER_PT_active_tool,
SEQUENCER_PT_strip,
SEQUENCER_PT_effect,
+ SEQUENCER_PT_scene,
+ SEQUENCER_PT_mask,
+ SEQUENCER_PT_effect_text_style,
+ SEQUENCER_PT_effect_text_layout,
+
SEQUENCER_PT_adjust,
SEQUENCER_PT_adjust_comp,
SEQUENCER_PT_adjust_transform,
@@ -2245,12 +2235,6 @@ classes = (
SEQUENCER_PT_adjust_color,
SEQUENCER_PT_adjust_sound,
- SEQUENCER_PT_scene,
- SEQUENCER_PT_mask,
- SEQUENCER_PT_effect_text_style,
- SEQUENCER_PT_effect_text_layout,
- SEQUENCER_PT_effect_text_style_shadow,
-
SEQUENCER_PT_time,
SEQUENCER_PT_source,
@@ -2263,11 +2247,11 @@ classes = (
SEQUENCER_PT_custom_props,
- SEQUENCER_PT_preview,
SEQUENCER_PT_view,
SEQUENCER_PT_frame_overlay,
SEQUENCER_PT_view_safe_areas,
SEQUENCER_PT_view_safe_areas_center_cut,
+ SEQUENCER_PT_preview,
SEQUENCER_PT_annotation,
SEQUENCER_PT_annotation_onion,
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index e64a7c9731b..1aa5dde168b 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -137,7 +137,6 @@ class _defs_view3d_generic:
idname="builtin.measure",
label="Measure",
description=description,
- cursor='CROSSHAIR',
icon="ops.view3d.ruler",
widget="VIEW3D_GGT_ruler",
keymap="3D View Tool: Measure",
@@ -407,7 +406,6 @@ class _defs_view3d_select:
label="Select Lasso",
icon="ops.generic.select_lasso",
widget=None,
- cursor='DEFAULT',
keymap="3D View Tool: Select Lasso",
draw_settings=draw_settings,
)
@@ -432,17 +430,130 @@ class _defs_view3d_select:
label="Select Circle",
icon="ops.generic.select_circle",
widget=None,
- cursor='DEFAULT',
keymap="3D View Tool: Select Circle",
draw_settings=draw_settings,
draw_cursor=draw_cursor,
)
+class _defs_view3d_add:
+
+ # Layout tweaks here would be good to avoid,
+ # this shows limits in layout engine, as buttons are using a lot of space.
+ @staticmethod
+ def draw_settings_interactive_add(layout, tool):
+ props = tool.operator_properties("view3d.interactive_add")
+ row = layout.row()
+ row.scale_x = 0.8
+ row.label(text="Depth:")
+ row = layout.row()
+ row.scale_x = 0.9
+ row.prop(props, "plane_depth", text="")
+ row = layout.row()
+ row.prop(props, "plane_axis", text="")
+ row = layout.row()
+ row.scale_x = 0.7
+ row.prop(props, "plane_origin")
+
+ @ToolDef.from_fn
+ def cube_add():
+ def draw_settings(_context, layout, tool):
+ _defs_view3d_add.draw_settings_interactive_add(layout, tool)
+ return dict(
+ idname="builtin.primitive_cube_add",
+ label="Add Cube",
+ icon="ops.mesh.primitive_cube_add_gizmo",
+ description=(
+ "Add cube to mesh interactively"
+ ),
+ widget="VIEW3D_GGT_placement",
+ keymap="3D View Tool: Object, Add Primitive",
+ draw_settings=draw_settings,
+ )
+
+ @ToolDef.from_fn
+ def cone_add():
+ def draw_settings(_context, layout, tool):
+ _defs_view3d_add.draw_settings_interactive_add(layout, tool)
+
+ props = tool.operator_properties("mesh.primitive_cone_add")
+ layout.prop(props, "vertices")
+ layout.prop(props, "end_fill_type")
+ return dict(
+ idname="builtin.primitive_cone_add",
+ label="Add Cone",
+ icon="ops.mesh.primitive_cube_add_gizmo",
+ description=(
+ "Add cone to mesh interactively"
+ ),
+ widget="VIEW3D_GGT_placement",
+ keymap="3D View Tool: Object, Add Primitive",
+ draw_settings=draw_settings,
+ )
+
+ @ToolDef.from_fn
+ def cylinder_add():
+ def draw_settings(_context, layout, tool):
+ _defs_view3d_add.draw_settings_interactive_add(layout, tool)
+
+ props = tool.operator_properties("mesh.primitive_cylinder_add")
+ layout.prop(props, "vertices")
+ layout.prop(props, "end_fill_type")
+ return dict(
+ idname="builtin.primitive_cylinder_add",
+ label="Add Cylinder",
+ icon="ops.mesh.primitive_cylinder_add_gizmo",
+ description=(
+ "Add cylinder to mesh interactively"
+ ),
+ widget="VIEW3D_GGT_placement",
+ keymap="3D View Tool: Object, Add Primitive",
+ draw_settings=draw_settings,
+ )
+
+ @ToolDef.from_fn
+ def uv_sphere_add():
+ def draw_settings(_context, layout, tool):
+ _defs_view3d_add.draw_settings_interactive_add(layout, tool)
+
+ props = tool.operator_properties("mesh.primitive_uv_sphere_add")
+ layout.prop(props, "segments")
+ layout.prop(props, "ring_count")
+ return dict(
+ idname="builtin.primitive_uv_sphere_add",
+ label="Add UV Sphere",
+ icon="ops.mesh.primitive_sphere_add_gizmo",
+ description=(
+ "Add cylinder to mesh interactively"
+ ),
+ widget="VIEW3D_GGT_placement",
+ keymap="3D View Tool: Object, Add Primitive",
+ draw_settings=draw_settings,
+ )
+
+ @ToolDef.from_fn
+ def ico_sphere_add():
+ def draw_settings(_context, layout, tool):
+ _defs_view3d_add.draw_settings_interactive_add(layout, tool)
+
+ props = tool.operator_properties("mesh.primitive_ico_sphere_add")
+ layout.prop(props, "subdivisions")
+ return dict(
+ idname="builtin.primitive_ico_sphere_add",
+ label="Add Ico Sphere",
+ icon="ops.mesh.primitive_sphere_add_gizmo",
+ description=(
+ "Add cylinder to mesh interactively"
+ ),
+ widget="VIEW3D_GGT_placement",
+ keymap="3D View Tool: Object, Add Primitive",
+ draw_settings=draw_settings,
+ )
+
+
# -----------------------------------------------------------------------------
# Object Modes (named based on context.mode)
-
class _defs_edit_armature:
@ToolDef.from_fn
@@ -501,19 +612,6 @@ class _defs_edit_armature:
class _defs_edit_mesh:
@ToolDef.from_fn
- def cube_add():
- return dict(
- idname="builtin.add_cube",
- label="Add Cube",
- icon="ops.mesh.primitive_cube_add_gizmo",
- description=(
- "Add cube to mesh interactively"
- ),
- widget=None,
- keymap=(),
- )
-
- @ToolDef.from_fn
def rip_region():
def draw_settings(_context, layout, tool):
props = tool.operator_properties("mesh.rip_move")
@@ -2150,6 +2248,14 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
),
)
+ _tools_view3d_add = (
+ _defs_view3d_add.cube_add,
+ _defs_view3d_add.cone_add,
+ _defs_view3d_add.cylinder_add,
+ _defs_view3d_add.uv_sphere_add,
+ _defs_view3d_add.ico_sphere_add,
+ )
+
_tools_default = (
*_tools_select,
_defs_view3d_generic.cursor,
@@ -2168,6 +2274,9 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
],
'OBJECT': [
*_tools_default,
+
+ None,
+ _tools_view3d_add,
],
'POSE': [
*_tools_default,
@@ -2196,6 +2305,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
'EDIT_MESH': [
*_tools_default,
None,
+ _tools_view3d_add,
+ None,
(
_defs_edit_mesh.extrude,
_defs_edit_mesh.extrude_dissolve_and_intersect,
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 9aedd7ef0b3..6fc29119cdc 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -309,16 +309,18 @@ class TOPBAR_MT_file_new(Menu):
template_paths = bpy.utils.app_template_paths()
- # expand template paths
- app_templates = []
+ # Expand template paths.
+
+ # Use a set to avoid duplicate user/system templates.
+ # This is a corner case, but users managed to do it! T76849.
+ app_templates = set()
for path in template_paths:
for d in os.listdir(path):
if d.startswith(("__", ".")):
continue
template = os.path.join(path, d)
if os.path.isdir(template):
- # template_paths_expand.append(template)
- app_templates.append(d)
+ app_templates.add(d)
return sorted(app_templates)
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 153533dbde6..63fc44aed38 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -222,7 +222,7 @@ class USERPREF_PT_interface_text(InterfacePanel, CenterAlignMixIn, Panel):
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- flow.prop(view, "use_text_antialiasing", text="Anti-aliasing")
+ flow.prop(view, "use_text_antialiasing", text="Anti-Aliasing")
sub = flow.column()
sub.active = view.use_text_antialiasing
sub.prop(view, "text_hinting", text="Hinting")
@@ -1080,7 +1080,7 @@ class PreferenceThemeSpacePanel:
PreferenceThemeSpacePanel._theme_generic(layout, data, self.theme_area)
-class ThemeGenericClassGenerator():
+class ThemeGenericClassGenerator:
@staticmethod
def generate_panel_classes_for_wcols():
@@ -1436,16 +1436,7 @@ class USERPREF_PT_input_ndof(InputPanel, CenterAlignMixIn, Panel):
prefs = context.preferences
inputs = prefs.inputs
- flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
-
- flow.prop(inputs, "ndof_sensitivity", text="Pan Sensitivity")
- flow.prop(inputs, "ndof_orbit_sensitivity", text="Orbit Sensitivity")
- flow.prop(inputs, "ndof_deadzone", text="Deadzone")
-
- layout.separator()
-
- flow.row().prop(inputs, "ndof_view_navigate_method", expand=True)
- flow.row().prop(inputs, "ndof_view_rotate_method", expand=True)
+ USERPREF_PT_ndof_settings.draw_settings(layout, inputs)
# -----------------------------------------------------------------------------
@@ -1584,71 +1575,64 @@ class USERPREF_PT_ndof_settings(Panel):
bl_label = "3D Mouse Settings"
bl_space_type = 'TOPBAR' # dummy.
bl_region_type = 'HEADER'
+ bl_ui_units_x = 12
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False # No animation.
-
- input_prefs = context.preferences.inputs
-
- is_view3d = context.space_data.type == 'VIEW_3D'
+ @staticmethod
+ def draw_settings(layout, props, show_3dview_settings=True):
+ col = layout.column()
+ col.prop(props, "ndof_sensitivity", text="Pan Sensitivity")
+ col.prop(props, "ndof_orbit_sensitivity")
+ col.prop(props, "ndof_deadzone")
- col = layout.column(align=True)
- col.prop(input_prefs, "ndof_sensitivity")
- col.prop(input_prefs, "ndof_orbit_sensitivity")
- col.prop(input_prefs, "ndof_deadzone")
+ layout.separator()
- if is_view3d:
- layout.separator()
- layout.prop(input_prefs, "ndof_show_guide")
+ if show_3dview_settings:
+ col = layout.column()
+ col.row().prop(props, "ndof_view_navigate_method", expand=True, text="Navigation")
+ col.row().prop(props, "ndof_view_rotate_method", expand=True, text="Rotation")
layout.separator()
- layout.label(text="Orbit Style")
- layout.row().prop(input_prefs, "ndof_view_navigate_method", text="Navigate")
- layout.row().prop(input_prefs, "ndof_view_rotate_method", text="Orbit")
- layout.separator()
- layout.label(text="Orbit Options")
- split = layout.split(factor=0.6)
- row = split.row()
- row.alignment = 'RIGHT'
- row.label(text="Invert Axis")
- row = split.row(align=True)
- for text, attr in (
- ("X", "ndof_rotx_invert_axis"),
- ("Y", "ndof_roty_invert_axis"),
- ("Z", "ndof_rotz_invert_axis"),
- ):
- row.prop(input_prefs, attr, text=text, toggle=True)
+ col = layout.column()
+ if show_3dview_settings:
+ col.prop(props, "ndof_show_guide")
+ col.prop(props, "ndof_zoom_invert")
+ row = col.row(heading="Pan")
+ row.prop(props, "ndof_pan_yz_swap_axis", text="Swap Y and Z Axes")
- # view2d use pan/zoom
layout.separator()
- layout.label(text="Pan Options")
- split = layout.split(factor=0.6)
- row = split.row()
- row.alignment = 'RIGHT'
- row.label(text="Invert Axis")
- row = split.row(align=True)
+ row = layout.row(heading=("Invert Axis Pan" if show_3dview_settings else "Invert Pan Axis"))
for text, attr in (
("X", "ndof_panx_invert_axis"),
("Y", "ndof_pany_invert_axis"),
("Z", "ndof_panz_invert_axis"),
):
- row.prop(input_prefs, attr, text=text, toggle=True)
-
- layout.prop(input_prefs, "ndof_pan_yz_swap_axis")
+ row.prop(props, attr, text=text, toggle=True)
- layout.label(text="Zoom Options")
- layout.prop(input_prefs, "ndof_zoom_invert")
+ if show_3dview_settings:
+ row = layout.row(heading="Orbit")
+ for text, attr in (
+ ("X", "ndof_rotx_invert_axis"),
+ ("Y", "ndof_roty_invert_axis"),
+ ("Z", "ndof_rotz_invert_axis"),
+ ):
+ row.prop(props, attr, text=text, toggle=True)
- if is_view3d:
layout.separator()
- layout.label(text="Fly/Walk Options")
- layout.prop(input_prefs, "ndof_fly_helicopter")
- layout.prop(input_prefs, "ndof_lock_horizon")
+ col = layout.column(heading="Fly/Walk")
+ col.prop(props, "ndof_lock_horizon")
+ col.prop(props, "ndof_fly_helicopter")
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ input_prefs = context.preferences.inputs
+ is_view3d = context.space_data.type == 'VIEW_3D'
+ self.draw_settings(layout, input_prefs, is_view3d)
# -----------------------------------------------------------------------------
# Key-Map Editor Panels
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 61d5d79473f..6dc21669f32 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -431,7 +431,7 @@ class _draw_tool_settings_context_mode:
row.prop(gp_settings, "use_material_pin", text="")
- if brush.gpencil_tool in {'DRAW', 'FILL'} and ma:
+ if brush.gpencil_tool in {'DRAW', 'FILL'}:
row.separator(factor=1.0)
subrow = row.row(align=True)
row.prop_enum(settings, "color_mode", 'MATERIAL', text="", icon='MATERIAL')
@@ -736,7 +736,12 @@ class VIEW3D_HT_header(Header):
row.prop(tool_settings, "use_gpencil_vertex_select_mask_stroke", text="")
row.prop(tool_settings, "use_gpencil_vertex_select_mask_segment", text="")
- if gpd.use_stroke_edit_mode or gpd.is_stroke_sculpt_mode or gpd.is_stroke_weight_mode or gpd.is_stroke_vertex_mode:
+ if (
+ gpd.use_stroke_edit_mode or
+ gpd.is_stroke_sculpt_mode or
+ gpd.is_stroke_weight_mode or
+ gpd.is_stroke_vertex_mode
+ ):
row = layout.row(align=True)
row.prop(gpd, "use_multiedit", text="", icon='GP_MULTIFRAME_EDITING')
@@ -3183,7 +3188,6 @@ class VIEW3D_MT_face_sets_init(Menu):
op.mode = 'FACE_MAPS'
-
class VIEW3D_MT_particle(Menu):
bl_label = "Particle"
@@ -3762,6 +3766,11 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
col.separator()
+ col.operator("mesh.mark_seam").clear = False
+ col.operator("mesh.mark_seam", text="Clear Seam").clear = True
+
+ col.separator()
+
col.operator("mesh.mark_sharp")
col.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
@@ -4006,6 +4015,11 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
layout.separator()
+ layout.operator("mesh.mark_seam").clear = False
+ layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
+
+ layout.separator()
+
layout.operator("mesh.mark_sharp")
layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
@@ -5269,6 +5283,7 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
op.mode = 'INVERT'
op = pie.operator("paint.mask_flood_fill", text='Clear Mask')
op.mode = 'VALUE'
+ op.value = 0.0
op = pie.operator("sculpt.mask_filter", text='Smooth Mask')
op.filter_type = 'SMOOTH'
op.auto_iteration_count = True
@@ -6368,7 +6383,7 @@ class VIEW3D_PT_overlay_edit_curve(Panel):
col.active = display_all
row = col.row()
- row.prop(overlay, "show_curve_handles", text="Handles")
+ row.prop(overlay, "display_handle", text="Handles")
row = col.row()
row.prop(overlay, "show_curve_normals", text="")
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 83144b33c67..3d72a2a588c 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -777,10 +777,6 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
col.prop(sculpt, "use_smooth_shading")
-
-
-
-
class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Remesh"