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:
-rw-r--r--release/scripts/startup/bl_ui/space_toolsystem_toolbar.py56
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c4
4 files changed, 50 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index ab7ac007257..d729180843e 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -1200,11 +1200,13 @@ class _defs_sculpt:
@staticmethod
def generate_from_brushes(context):
- if bpy.context.preferences.experimental.use_sculpt_vertex_colors:
- exclude_filter = {}
- else:
+ exclude_filter = {}
+ if not bpy.context.preferences.experimental.use_sculpt_vertex_colors:
exclude_filter = {'PAINT', 'SMEAR'}
+ if not bpy.context.preferences.experimental.use_tools_missing_icons:
+ exclude_filter = {'PAINT', 'SMEAR', 'BOUNDARY', 'DISPLACEMENT_ERASER'}
+
return generate_from_enum_ex(
context,
idname_prefix="builtin_brush.",
@@ -2647,14 +2649,34 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_sculpt.mask_border,
_defs_sculpt.mask_lasso,
),
- (
- _defs_sculpt.face_set_box,
- _defs_sculpt.face_set_lasso,
- ),
_defs_sculpt.hide_border,
- (
- _defs_sculpt.trim_box,
- _defs_sculpt.trim_lasso,
+ lambda context: (
+ (_defs_sculpt.face_set_box,)
+ if context is None or (
+ context.preferences.view.show_developer_ui and
+ context.preferences.experimental.use_tools_missing_icons)
+ else ()
+ ),
+ lambda context: (
+ (_defs_sculpt.face_set_lasso,)
+ if context is None or (
+ context.preferences.view.show_developer_ui and
+ context.preferences.experimental.use_tools_missing_icons)
+ else ()
+ ),
+ lambda context: (
+ (_defs_sculpt.trim_box,)
+ if context is None or (
+ context.preferences.view.show_developer_ui and
+ context.preferences.experimental.use_tools_missing_icons)
+ else ()
+ ),
+ lambda context: (
+ (_defs_sculpt.trim_lasso,)
+ if context is None or (
+ context.preferences.view.show_developer_ui and
+ context.preferences.experimental.use_tools_missing_icons)
+ else ()
),
None,
_defs_sculpt.mesh_filter,
@@ -2663,7 +2685,8 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
(_defs_sculpt.color_filter,)
if context is None or (
context.preferences.view.show_developer_ui and
- context.preferences.experimental.use_sculpt_vertex_colors)
+ context.preferences.experimental.use_sculpt_vertex_colors and
+ context.preferences.experimental.use_tools_missing_icons)
else ()
),
None,
@@ -2671,11 +2694,18 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
(_defs_sculpt.mask_by_color,)
if context is None or (
context.preferences.view.show_developer_ui and
- context.preferences.experimental.use_sculpt_vertex_colors)
+ context.preferences.experimental.use_sculpt_vertex_colors and
+ context.preferences.experimental.use_tools_missing_icons)
else ()
),
None,
- _defs_sculpt.face_set_edit,
+ lambda context: (
+ (_defs_sculpt.face_set_edit,)
+ if context is None or (
+ context.preferences.view.show_developer_ui and
+ context.preferences.experimental.use_tools_missing_icons)
+ else ()
+ ),
None,
_defs_transform.translate,
_defs_transform.rotate,
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 9548de20752..506849fbee5 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2164,6 +2164,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
context, (
({"property": "use_new_particle_system"}, "T73324"),
({"property": "use_sculpt_vertex_colors"}, "T71947"),
+ ({"property": "use_tools_missing_icons"}, "T80331"),
),
)
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index ec46d2680ca..589077ea67b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -620,8 +620,9 @@ typedef struct UserDef_Experimental {
char use_new_hair_type;
char use_cycles_debug;
char use_sculpt_vertex_colors;
+ char use_tools_missing_icons;
/** `makesdna` does not allow empty structs. */
- char _pad[3];
+ char _pad[2];
} UserDef_Experimental;
#define USER_EXPERIMENTAL_TEST(userdef, member) \
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 7b777aa642a..10e3f9c86ee 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -6117,6 +6117,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_sculpt_vertex_colors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_vertex_colors", 1);
RNA_def_property_ui_text(prop, "Sculpt Vertex Colors", "Use the new Vertex Painting system");
+
+ prop = RNA_def_property(srna, "use_tools_missing_icons", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_tools_missing_icons", 1);
+ RNA_def_property_ui_text(prop, "Tools with Missing Icons", "Show tools with missing icons");
}
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)