Merge branch 'blender-v4.5-release'

This commit is contained in:
Clément Foucault 2025-06-12 16:44:29 +02:00
commit ceef9e0f01
3 changed files with 17 additions and 35 deletions

View File

@ -4320,7 +4320,7 @@ def km_grease_pencil_fill_tool(_params):
return keymap
def km_grease_pencil_fill_tool_modal_map(params):
def km_grease_pencil_fill_tool_modal_map(_params):
items = []
keymap = (
"Fill Tool Modal Map",
@ -7989,7 +7989,7 @@ def km_3d_view_tool_paint_grease_pencil_trim(params):
# ------------------------------------------------------------------------------
# Tool System (3D View, Grease Pencil, Paint)
def km_grease_pencil_primitive_tool_modal_map(params):
def km_grease_pencil_primitive_tool_modal_map(_params):
items = []
keymap = (
"Primitive Tool Modal Map",
@ -8017,7 +8017,7 @@ def km_grease_pencil_primitive_tool_modal_map(params):
return keymap
def km_3d_view_tool_paint_grease_pencil_primitive_line(params):
def km_3d_view_tool_paint_grease_pencil_primitive_line(_params):
return (
"3D View Tool: Paint Grease Pencil, Line",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
@ -8028,14 +8028,11 @@ def km_3d_view_tool_paint_grease_pencil_primitive_line(params):
{"properties": []}),
("grease_pencil.primitive_line", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": []}),
# Lasso select
("grease_pencil.select_lasso",
{"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
def km_3d_view_tool_paint_grease_pencil_primitive_polyline(params):
def km_3d_view_tool_paint_grease_pencil_primitive_polyline(_params):
return (
"3D View Tool: Paint Grease Pencil, Polyline",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
@ -8044,14 +8041,11 @@ def km_3d_view_tool_paint_grease_pencil_primitive_polyline(params):
{"properties": []}),
("grease_pencil.primitive_polyline", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True},
{"properties": []}),
# Lasso select
("grease_pencil.select_lasso",
{"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
def km_3d_view_tool_paint_grease_pencil_primitive_box(params):
def km_3d_view_tool_paint_grease_pencil_primitive_box(_params):
return (
"3D View Tool: Paint Grease Pencil, Box",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
@ -8062,14 +8056,11 @@ def km_3d_view_tool_paint_grease_pencil_primitive_box(params):
{"properties": []}),
("grease_pencil.primitive_box", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": []}),
# Lasso select
("grease_pencil.select_lasso",
{"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
def km_3d_view_tool_paint_grease_pencil_primitive_circle(params):
def km_3d_view_tool_paint_grease_pencil_primitive_circle(_params):
return (
"3D View Tool: Paint Grease Pencil, Circle",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
@ -8080,14 +8071,11 @@ def km_3d_view_tool_paint_grease_pencil_primitive_circle(params):
{"properties": []}),
("grease_pencil.primitive_circle", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": []}),
# Lasso select
("grease_pencil.select_lasso",
{"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
def km_3d_view_tool_paint_grease_pencil_primitive_arc(params):
def km_3d_view_tool_paint_grease_pencil_primitive_arc(_params):
return (
"3D View Tool: Paint Grease Pencil, Arc",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
@ -8098,23 +8086,17 @@ def km_3d_view_tool_paint_grease_pencil_primitive_arc(params):
{"properties": []}),
("grease_pencil.primitive_arc", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True},
{"properties": []}),
# Lasso select
("grease_pencil.select_lasso",
{"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
def km_3d_view_tool_paint_grease_pencil_primitive_curve(params):
def km_3d_view_tool_paint_grease_pencil_primitive_curve(_params):
return (
"3D View Tool: Paint Grease Pencil, Curve",
{"space_type": 'VIEW_3D', "region_type": 'WINDOW'},
{"items": [
("grease_pencil.primitive_curve", {"type": 'LEFTMOUSE', "value": 'PRESS'},
{"properties": []}),
# Lasso select
("grease_pencil.select_lasso",
{"type": params.action_mouse, "value": 'CLICK_DRAG', "ctrl": True, "alt": True}, None),
]},
)
@ -8136,7 +8118,7 @@ def km_3d_view_tool_paint_grease_pencil_eyedropper(params):
)
def km_grease_pencil_interpolate_tool_modal_map(params):
def km_grease_pencil_interpolate_tool_modal_map(_params):
items = []
keymap = (
"Interpolate Tool Modal Map",
@ -8188,7 +8170,7 @@ def km_sequencer_tool_generic_select_rcs(params):
]
def km_sequencer_tool_generic_select_lcs(params):
def km_sequencer_tool_generic_select_lcs(_params):
return [
("sequencer.select", {"type": 'LEFTMOUSE', "value": 'PRESS'},
{"properties": [("deselect_all", True)]}),

View File

@ -7040,8 +7040,6 @@ class VIEW3D_PT_overlay_object(Panel):
bl_label = "Objects"
def draw(self, context):
shading = VIEW3D_PT_shading.get_shading(context)
layout = self.layout
view = context.space_data
overlay = view.overlay
@ -7068,10 +7066,6 @@ class VIEW3D_PT_overlay_object(Panel):
subsub.active = overlay.show_object_origins
subsub.prop(overlay, "show_object_origins_all", text="Origins (All)")
if shading.type == 'WIREFRAME' or shading.show_xray:
layout.separator()
layout.prop(overlay, "bone_wire_alpha")
class VIEW3D_PT_overlay_geometry(Panel):
bl_space_type = 'VIEW_3D'
@ -7541,6 +7535,7 @@ class VIEW3D_PT_overlay_bones(Panel):
def draw(self, context):
layout = self.layout
shading = VIEW3D_PT_shading.get_shading(context)
view = context.space_data
mode = context.mode
overlay = view.overlay
@ -7560,6 +7555,9 @@ class VIEW3D_PT_overlay_bones(Panel):
elif mode == 'PAINT_WEIGHT':
row = col.row()
row.prop(overlay, "show_xray_bone")
row = col.row()
row.active = shading.type == 'WIREFRAME'
row.prop(overlay, "bone_wire_alpha")
class VIEW3D_PT_overlay_texture_paint(Panel):

View File

@ -157,7 +157,9 @@ class Armatures : Overlay {
show_outline = (state.v3d->flag & V3D_SELECT_OUTLINE);
const bool do_smooth_wire = U.gpu_flag & USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE;
const float wire_alpha = state.overlay.bone_wire_alpha;
const float wire_alpha = state.ctx_mode == CTX_MODE_PAINT_WEIGHT ?
state.overlay.bone_wire_alpha :
1.0f;
/* Draw bone outlines and custom shape wire with a specific alpha. */
const bool use_wire_alpha = (wire_alpha < 1.0f);