[Bf-blender-cvs] [4050acf8303] sculpt-dev: Sculpt: add buttons in sculpt header to toggle vertex color drawing.
Joseph Eagar
noreply at git.blender.org
Wed Oct 13 11:50:51 CEST 2021
Commit: 4050acf83037bb1b7f4678b8a58cb7b5ee2f8c63
Author: Joseph Eagar
Date: Wed Oct 13 02:45:33 2021 -0700
Branches: sculpt-dev
https://developer.blender.org/rB4050acf83037bb1b7f4678b8a58cb7b5ee2f8c63
Sculpt: add buttons in sculpt header to toggle
vertex color drawing.
* Added two buttons to toggle between vertex
and material color modes in workbench drawing
mode.
* They are labeled "Colors" and "Normal" to
avoid confusion; "Vertex" is ambiguous, while
"Material" might be taken to impley "EEVEE."
* For now they only show up if a sculpt paint
brush is active.
* Updated startup.blend so the sculpt layout
has vertex drawing mode on by default.
===================================================================
M release/datafiles/startup.blend
M release/scripts/startup/bl_ui/properties_paint_common.py
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/datafiles/startup.blend b/release/datafiles/startup.blend
index e6000b345d2..c9419dabf03 100644
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py
index 05007c668e5..f853780f687 100644
--- a/release/scripts/startup/bl_ui/properties_paint_common.py
+++ b/release/scripts/startup/bl_ui/properties_paint_common.py
@@ -409,13 +409,6 @@ class UnifiedPaintPanel:
if text is None:
text = ch.name
- if len(text) == 0: # auto-generate from idname
- s = prop_name.lower().replace("_", " ").split(" ")
- text = ''
- for k in s:
- text += k[0].upper() + k[1:] + " "
- text = text.strip()
-
path = ""
is_toolset = False
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 66958e3fc95..4497d51154e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -291,8 +291,16 @@ class _draw_tool_settings_context_mode:
)
if capabilities.has_color:
+ #note we swap the labels here so users don't get confused.
+ row = layout.row(align=True)
+ row.ui_units_x = 4.5
+ row.prop_enum(context.space_data.shading, "color_type", "VERTEX", text="Colors")
+ row.prop_enum(context.space_data.shading, "color_type", "MATERIAL", text="Normal")
+
UnifiedPaintPanel.prop_unified_color(layout, context, brush, "color", text="")
- layout.prop(brush, "blend", text="", expand=False)
+ row = layout.row()
+ row.ui_units_x = 3
+ row.prop(brush, "blend", text="", expand=False)
return True
More information about the Bf-blender-cvs
mailing list