diff options
Diffstat (limited to 'release')
6 files changed, 85 insertions, 1 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 33c16b99348..dbfc9daca84 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -4343,6 +4343,8 @@ def km_sculpt(params): ("object.voxel_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True}, None), ("object.voxel_size_edit", {"type": 'R', "value": 'PRESS', "shift": True}, None), ("object.quadriflow_remesh", {"type": 'R', "value": 'PRESS', "ctrl": True, "alt": True}, None), + # Color + ("sculpt.sample_color", {"type": 'S', "value": 'PRESS'}, None), # Brush properties ("brush.scale_size", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("scalar", 0.9)]}), @@ -4365,7 +4367,7 @@ def km_sculpt(params): # Tools ("paint.brush_select", {"type": 'X', "value": 'PRESS'}, {"properties": [("sculpt_tool", 'DRAW')]}), - ("paint.brush_select", {"type": 'S', "value": 'PRESS'}, + ("paint.brush_select", {"type": 'S', "value": 'PRESS', "shift": True}, {"properties": [("sculpt_tool", 'SMOOTH')]}), ("paint.brush_select", {"type": 'P', "value": 'PRESS'}, {"properties": [("sculpt_tool", 'PINCH')]}), @@ -6280,6 +6282,16 @@ def km_3d_view_tool_sculpt_cloth_filter(params): ]}, ) +def km_3d_view_tool_sculpt_color_filter(params): + return ( + "3D View Tool: Sculpt, Color Filter", + {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, + {"items": [ + ("sculpt.color_filter", {"type": params.tool_tweak, "value": 'ANY'}, + None) + ]}, + ) + def km_3d_view_tool_paint_weight_sample_weight(params): return ( "3D View Tool: Paint Weight, Sample Weight", @@ -6820,6 +6832,7 @@ def generate_keymaps(params=None): km_3d_view_tool_sculpt_lasso_mask(params), km_3d_view_tool_sculpt_mesh_filter(params), km_3d_view_tool_sculpt_cloth_filter(params), + km_3d_view_tool_sculpt_color_filter(params), km_3d_view_tool_paint_weight_sample_weight(params), km_3d_view_tool_paint_weight_sample_vertex_group(params), km_3d_view_tool_paint_weight_gradient(params), diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index 425c94dfdcd..fbd8e2d7cff 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -459,6 +459,31 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel): col.operator("mesh.vertex_color_remove", icon='REMOVE', text="") +class DATA_PT_sculpt_vertex_colors(MeshButtonsPanel, Panel): + bl_label = "Sculpt Vertex Colors" + bl_options = {'DEFAULT_CLOSED'} + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + + def draw(self, context): + layout = self.layout + + me = context.mesh + + row = layout.row() + col = row.column() + + col.template_list("MESH_UL_vcols", "svcols", me, "sculpt_vertex_colors", me.sculpt_vertex_colors, "active_index", rows=2) + + col = row.column(align=True) + col.operator("mesh.sculpt_vertex_color_add", icon='ADD', text="") + col.operator("mesh.sculpt_vertex_color_remove", icon='REMOVE', text="") + + row = layout.row() + col = row.column() + col.operator("sculpt.vertex_to_loop_colors", text="Store Sculpt Vertex Color") + col.operator("sculpt.loop_to_vertex_colors", text="Load Sculpt Vertex Color") + + class DATA_PT_remesh(MeshButtonsPanel, Panel): bl_label = "Remesh" bl_options = {'DEFAULT_CLOSED'} @@ -483,6 +508,8 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel): col.prop(mesh, "use_remesh_preserve_volume", text="Volume") col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask") col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets") + col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors") + col.operator("object.voxel_remesh", text="Voxel Remesh") else: col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh") @@ -537,6 +564,7 @@ classes = ( DATA_PT_shape_keys, DATA_PT_uv_texture, DATA_PT_vertex_colors, + DATA_PT_sculpt_vertex_colors, DATA_PT_face_maps, DATA_PT_normals, DATA_PT_texture_space, diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index c82f891ecb0..ba0d904a323 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -607,6 +607,10 @@ def brush_settings(layout, context, brush, popover=False): layout.operator("sculpt.set_persistent_base") layout.separator() + if capabilities.has_color: + UnifiedPaintPanel.prop_unified_color(layout, context, brush, "color", text="Paint Color") + layout.prop(brush, "blend", text="Blend Mode") + if brush.sculpt_tool == 'CLAY_STRIPS': row = layout.row() row.prop(brush, "tip_roundness") @@ -655,6 +659,15 @@ def brush_settings(layout, context, brush, popover=False): if brush.sculpt_tool == 'GRAB': layout.prop(brush, "use_grab_active_vertex") + if brush.sculpt_tool == 'PAINT': + col = layout.column() + col.prop(brush, "flow") + col.prop(brush, "wet_mix") + col.prop(brush, "wet_persistence") + col.prop(brush, "density") + col.prop(brush, "tip_roundness") + col.prop(brush, "tip_scale_x") + if brush.sculpt_tool == 'MULTIPLANE_SCRAPE': col = layout.column() col.prop(brush, "multiplane_scrape_angle") diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 52c59431316..65f399118e6 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1258,6 +1258,22 @@ class _defs_sculpt: draw_settings=draw_settings, ) + @ToolDef.from_fn + def color_filter(): + def draw_settings(_context, layout, tool): + props = tool.operator_properties("sculpt.color_filter") + layout.prop(props, "type", expand=False) + layout.prop(props, "strength") + + return dict( + idname="builtin.color_filter", + label="Color Filter", + icon="ops.sculpt.color_filter", + widget=None, + keymap=(), + draw_settings=draw_settings, + ) + class _defs_vertex_paint: @@ -2433,6 +2449,7 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel): None, _defs_sculpt.mesh_filter, _defs_sculpt.cloth_filter, + _defs_sculpt.color_filter, None, _defs_transform.translate, _defs_transform.rotate, diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 0daf9761246..d1fe3f649c8 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -295,6 +295,11 @@ class _draw_tool_settings_context_mode: if not capabilities.has_direction: layout.row().prop(brush, "direction", expand=True, text="") + if capabilities.has_color: + UnifiedPaintPanel.prop_unified_color(layout, context, brush, "color", text = "") + layout.prop(brush, "blend", text="", expand = False) + + return True @staticmethod @@ -7333,6 +7338,12 @@ class VIEW3D_PT_sculpt_context_menu(Panel): brush = context.tool_settings.sculpt.brush capabilities = brush.sculpt_capabilities + if capabilities.has_color: + split = layout.split(factor=0.1) + UnifiedPaintPanel.prop_unified_color(split, context, brush, "color", text="") + UnifiedPaintPanel.prop_unified_color_picker(split, context, brush, "color", value_slider=True) + layout.prop(brush, "blend", text="") + UnifiedPaintPanel.prop_unified( layout, context, diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 76bac375d5b..a951025166e 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -806,6 +806,8 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel): col.prop(mesh, "use_remesh_preserve_volume", text="Volume") col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask") col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets") + col.prop(mesh, "use_remesh_preserve_vertex_colors", text="Vertex Colors") + layout.operator("object.voxel_remesh", text="Remesh") |