Hide tools with missing icons under experimental
This removes from the UI all tools with missing icons and hides them under a "Tools with missing icons" experimental option. We agree on not making available by default tools in master without icons. Having this experimental flag will allow to commit new tools as soon as the technical design and implementation is finished so development can continue, without adding broken icons to the UI. Reviewed By: Severin Differential Revision: https://developer.blender.org/D8831
This commit is contained in:
parent
4e104ce5b0
commit
7ca42545d1
|
@ -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,
|
||||
|
|
|
@ -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"),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue