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_curve.py16
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_paint_common.py38
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py11
-rw-r--r--release/scripts/startup/bl_ui/space_node.py9
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py3
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py15
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py6
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py67
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py3
11 files changed, 122 insertions, 49 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index b589f780c24..d1975919d7e 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -332,7 +332,8 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
layout = self.layout
text = context.curve
- char = context.curve.edit_format
+ char = text.edit_format
+ mode = context.mode
row = layout.split(factor=0.25)
row.label(text="Regular")
@@ -347,13 +348,14 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
row.label(text="Bold & Italic")
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
- layout.separator()
+ if mode == 'EDIT_TEXT':
+ layout.separator()
- row = layout.row(align=True)
- row.prop(char, "use_bold", toggle=True)
- row.prop(char, "use_italic", toggle=True)
- row.prop(char, "use_underline", toggle=True)
- row.prop(char, "use_small_caps", toggle=True)
+ row = layout.row(align=True)
+ row.prop(char, "use_bold", toggle=True)
+ row.prop(char, "use_italic", toggle=True)
+ row.prop(char, "use_underline", toggle=True)
+ row.prop(char, "use_small_caps", toggle=True)
class DATA_PT_font_transform(CurveButtonsPanelText, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 51f24007271..72e9f710e9d 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -485,6 +485,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
else:
col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh")
+
class DATA_PT_customdata(MeshButtonsPanel, Panel):
bl_label = "Geometry Data"
bl_options = {'DEFAULT_CLOSED'}
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 ca9c518f443..e545ee971d8 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -950,6 +950,7 @@ class GPENCIL_UL_layer(UIList):
icon_value=icon,
)
+
class GreasePencilSimplifyPanel:
def draw_header(self, context):
@@ -977,6 +978,7 @@ class GreasePencilSimplifyPanel:
sub.active = rd.simplify_gpencil_view_fill
sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines")
+
classes = (
GPENCIL_MT_pie_tool_palette,
GPENCIL_MT_pie_settings_palette,
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 23b2556eddb..83f7cb710ff 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -367,7 +367,7 @@ def brush_basic_sculpt_settings(layout, context, brush, *, compact=False):
layout.row().prop(brush, "direction", expand=True, **({"text": ""} if compact else {}))
-def brush_basic_gpencil_paint_settings(layout, _context, brush, *, compact=True):
+def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact=True, is_toolbar=False):
gp_settings = brush.gpencil_settings
# Brush details
@@ -395,6 +395,23 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, *, compact=True)
row = layout.row(align=True)
row.prop(gp_settings, "fill_draw_mode", text="Boundary")
row.prop(gp_settings, "show_fill_boundary", text="", icon='GRID')
+ # Fill options
+ if is_toolbar:
+ settings = _context.tool_settings.gpencil_sculpt
+ row = layout.row(align=True)
+ sub = row.row(align=True)
+ sub.popover(
+ panel="TOPBAR_PT_gpencil_fill",
+ text="Fill Options",
+ )
+ else:
+ row = layout.row(align=True)
+ row.prop(gp_settings, "fill_factor", text="Resolution")
+ if gp_settings.fill_draw_mode != 'STROKE':
+ row = layout.row(align=True)
+ row.prop(gp_settings, "show_fill", text="Ignore Transparent Strokes")
+ row = layout.row(align=True)
+ row.prop(gp_settings, "fill_threshold", text="Threshold")
else: # brush.gpencil_tool == 'DRAW':
row = layout.row(align=True)
row.prop(brush, "size", text="Radius")
@@ -403,6 +420,25 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, *, compact=True)
row.prop(gp_settings, "pen_strength", slider=True)
row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
+ if tool.idname in {"builtin.arc", "builtin.curve", "builtin.line", "builtin.box", "builtin.circle"}:
+ settings = _context.tool_settings.gpencil_sculpt
+ if is_toolbar:
+ row = layout.row(align=True)
+ row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA')
+ sub = row.row(align=True)
+ sub.active = settings.use_thickness_curve
+ sub.popover(
+ panel="TOPBAR_PT_gpencil_primitive",
+ text="Thickness Profile",
+ )
+ else:
+ row = layout.row(align=True)
+ row.prop(settings, "use_thickness_curve", text="Use Thickness Profile")
+ sub = row.row(align=True)
+ if settings.use_thickness_curve:
+ # Curve
+ layout.template_curve_mapping(settings, "thickness_primitive_curve", brush=True)
+
def brush_basic_gpencil_sculpt_settings(layout, context, brush, *, compact=False):
tool_settings = context.tool_settings
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index a322b96f9dd..181032e4d96 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -158,7 +158,8 @@ class FILEBROWSER_PT_filter(Panel):
def panel_poll_is_upper_region(region):
- # The upper region is left-aligned, the lower is split into it then. Note that after "Flip Regions" it's right-aligned.
+ # The upper region is left-aligned, the lower is split into it then.
+ # Note that after "Flip Regions" it's right-aligned.
return region.alignment in {'LEFT', 'RIGHT'}
@@ -469,7 +470,12 @@ class FILEBROWSER_MT_context_menu(Menu):
layout.separator()
layout.operator("file.rename", text="Rename")
- # layout.operator("file.delete")
+ sub = layout.row()
+ sub.operator_context = 'EXEC_DEFAULT'
+ sub.operator("file.delete", text="Delete")
+
+ layout.separator()
+
sub = layout.row()
sub.operator_context = 'EXEC_DEFAULT'
sub.operator("file.directory_new", text="New Folder")
@@ -503,5 +509,6 @@ classes = (
if __name__ == "__main__": # only for live edit.
from bpy.utils import register_class
+
for cls in classes:
register_class(cls)
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 0f926e596de..2ce81ba8359 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -373,6 +373,12 @@ class NODE_PT_material_slots(Panel):
col.operator("object.material_slot_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("object.material_slot_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+ if ob.mode == 'EDIT':
+ row = layout.row(align=True)
+ row.operator("object.material_slot_assign", text="Assign")
+ row.operator("object.material_slot_select", text="Select")
+ row.operator("object.material_slot_deselect", text="Deselect")
+
class NODE_PT_node_color_presets(PresetPanel, Panel):
"""Predefined node color"""
@@ -412,6 +418,9 @@ class NODE_MT_context_menu(Menu):
# If something is selected
layout.operator_context = 'INVOKE_DEFAULT'
layout.operator("node.duplicate_move")
+ props = layout.operator("wm.call_panel", text="Rename...")
+ props.name = "TOPBAR_PT_name"
+ props.keep_open = False
layout.operator("node.delete")
layout.operator("node.clipboard_copy", text="Copy")
layout.operator("node.clipboard_paste", text="Paste")
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index a942b8769cf..cdac91b8014 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -741,6 +741,9 @@ class SEQUENCER_MT_context_menu(Menu):
layout.operator("sequencer.copy", text="Copy", icon='COPYDOWN')
layout.operator("sequencer.paste", text="Paste", icon='PASTEDOWN')
layout.operator("sequencer.duplicate_move")
+ props = layout.operator("wm.call_panel", text="Rename...")
+ props.name = "TOPBAR_PT_name"
+ props.keep_open = False
layout.operator("sequencer.delete", text="Delete...")
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index aa5be13c01b..890250d3daf 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1320,7 +1320,7 @@ class _defs_gpencil_paint:
icon_prefix="brush.gpencil_draw.",
type=bpy.types.Brush,
attr="gpencil_tool",
- cursor='PAINT_CROSS',
+ cursor='DOT',
tooldef_keywords=dict(
operator="gpencil.draw",
),
@@ -1392,6 +1392,17 @@ class _defs_gpencil_paint:
keymap=(),
)
+ @ToolDef.from_fn
+ def eyedropper():
+ return dict(
+ idname="builtin.eyedropper",
+ label="Eyedropper",
+ icon="ops.paint.weight_sample",
+ cursor='EYEDROPPER',
+ widget=None,
+ keymap=(),
+ )
+
class _defs_gpencil_edit:
@ToolDef.from_fn
@@ -2044,6 +2055,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_gpencil_paint.generate_from_brushes,
_defs_gpencil_paint.cutter,
None,
+ _defs_gpencil_paint.eyedropper,
+ None,
_defs_gpencil_paint.line,
_defs_gpencil_paint.arc,
_defs_gpencil_paint.curve,
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index be41fb52118..4c90f987c50 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -569,6 +569,7 @@ class USERPREF_PT_animation_fcurves(PreferencePanel, Panel):
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
flow.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility")
+ flow.prop(edit, "fcurve_new_auto_smoothing", text="Default Smoothing Mode")
flow.prop(edit, "keyframe_new_interpolation_type", text="Default Interpolation")
flow.prop(edit, "keyframe_new_handle_type", text="Default Handles")
flow.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
@@ -1479,12 +1480,17 @@ class USERPREF_PT_input_mouse(PreferencePanel, Panel):
return (prefs.active_section == 'INPUT')
def draw_props(self, context, layout):
+ import sys
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, "use_mouse_emulate_3_button")
+ if sys.platform[:3] != "win":
+ rowsub = flow.row()
+ rowsub.active = inputs.use_mouse_emulate_3_button
+ rowsub.prop(inputs, "mouse_emulate_3_button_modifier")
flow.prop(inputs, "use_mouse_continuous")
flow.prop(inputs, "use_drag_immediately")
flow.prop(inputs, "mouse_double_click_time", text="Double Click Speed")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index aca8ea701ce..93d480ba306 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -351,28 +351,7 @@ class _draw_tool_settings_context_mode:
from bl_ui.properties_paint_common import (
brush_basic_gpencil_paint_settings,
)
- brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
-
- # FIXME: tools must use their own UI drawing!
- if tool.idname in {"builtin.arc", "builtin.curve", "builtin.line", "builtin.box", "builtin.circle"}:
- settings = context.tool_settings.gpencil_sculpt
- row = layout.row(align=True)
- row.prop(settings, "use_thickness_curve", text="", icon='CURVE_DATA')
- sub = row.row(align=True)
- sub.active = settings.use_thickness_curve
- sub.popover(
- panel="TOPBAR_PT_gpencil_primitive",
- text="Thickness Profile",
- )
-
- if brush.gpencil_tool == 'FILL':
- settings = context.tool_settings.gpencil_sculpt
- row = layout.row(align=True)
- sub = row.row(align=True)
- sub.popover(
- panel="TOPBAR_PT_gpencil_fill",
- text="Fill Options",
- )
+ brush_basic_gpencil_paint_settings(layout, context, brush, tool, compact=True, is_toolbar=True)
@staticmethod
def SCULPT_GPENCIL(context, layout, tool):
@@ -707,10 +686,18 @@ class VIEW3D_HT_header(Header):
row = layout.row()
row.active = (object_mode == 'EDIT') or (shading.type in {'WIREFRAME', 'SOLID'})
- if shading.type == 'WIREFRAME':
- row.prop(shading, "show_xray_wireframe", text="", icon='XRAY')
- else:
- row.prop(shading, "show_xray", text="", icon='XRAY')
+ # While exposing 'shading.show_xray(_wireframe)' is correct.
+ # this hides the key shortcut from users: T70433.
+ row.operator(
+ "view3d.toggle_xray",
+ text="",
+ icon='XRAY',
+ depress=getattr(
+ shading,
+ "show_xray_wireframe" if shading.type == 'WIREFRAME' else
+ "show_xray"
+ ),
+ )
row = layout.row(align=True)
row.prop(shading, "type", text="", expand=True)
@@ -794,6 +781,8 @@ class VIEW3D_MT_editor_menus(Menu):
elif obj:
if mode_string != 'PAINT_TEXTURE':
layout.menu("VIEW3D_MT_%s" % mode_string.lower())
+ if mode_string == 'SCULPT':
+ layout.menu("VIEW3D_MT_mask")
else:
layout.menu("VIEW3D_MT_object")
@@ -2822,20 +2811,29 @@ class VIEW3D_MT_sculpt(Menu):
props.action = 'SHOW'
props.area = 'ALL'
- props = layout.operator("paint.hide_show", text="Hide Bounding Box")
- props.action = 'HIDE'
- props.area = 'INSIDE'
-
props = layout.operator("paint.hide_show", text="Show Bounding Box")
props.action = 'SHOW'
props.area = 'INSIDE'
+ props = layout.operator("paint.hide_show", text="Hide Bounding Box")
+ props.action = 'HIDE'
+ props.area = 'INSIDE'
+
props = layout.operator("paint.hide_show", text="Hide Masked")
props.action = 'HIDE'
props.area = 'MASKED'
layout.separator()
+ layout.menu("VIEW3D_MT_sculpt_set_pivot", text="Set Pivot")
+
+
+class VIEW3D_MT_mask(Menu):
+ bl_label = "Mask"
+
+ def draw(self, _context):
+ layout = self.layout
+
props = layout.operator("paint.mask_flood_fill", text="Invert Mask")
props.mode = 'INVERT'
@@ -2898,9 +2896,6 @@ class VIEW3D_MT_sculpt(Menu):
props = layout.operator("sculpt.dirty_mask", text='Dirty Mask')
- layout.separator()
- layout.menu("VIEW3D_MT_sculpt_set_pivot", text="Set Pivot")
-
class VIEW3D_MT_sculpt_set_pivot(Menu):
bl_label = "Sculpt Set Pivot"
@@ -5070,11 +5065,8 @@ class VIEW3D_PT_collections(Panel):
if not use_local_collections:
subrow.active = collection.is_visible # Parent collection runtime visibility
subrow.prop(child, "hide_viewport", text="", emboss=False)
- elif not child.is_visible:
- subrow.active = False
- subrow.label(text="", icon='REMOVE')
else:
- subrow.active = collection.visible_get() # Parent collection runtime visibility
+ subrow.active = collection.visible_get() # Parent collection runtime visibility
icon = 'HIDE_OFF' if child.visible_get() else 'HIDE_ON'
props = subrow.operator("object.hide_collection", text="", icon=icon, emboss=False)
props.collection_index = index
@@ -6808,6 +6800,7 @@ classes = (
VIEW3D_MT_paint_weight,
VIEW3D_MT_sculpt,
VIEW3D_MT_sculpt_set_pivot,
+ VIEW3D_MT_mask,
VIEW3D_MT_particle,
VIEW3D_MT_particle_context_menu,
VIEW3D_MT_particle_showhide,
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3aee14e0239..8da5ba67187 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1873,7 +1873,8 @@ class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
from bl_ui.properties_paint_common import (
brush_basic_gpencil_paint_settings,
)
- brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
+ tool = context.workspace.tools.from_space_view3d_mode(context.mode, create=False)
+ brush_basic_gpencil_paint_settings(layout, context, brush, tool, compact=True, is_toolbar=False)
# Grease Pencil drawing brushes options