diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-08 17:30:01 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-09-08 18:43:56 +0300 |
commit | 7ca42545d166b3d966c2a67fd94b5291903f10a2 (patch) | |
tree | a801d8359fcd756e6d43ca3f6dc6b5e9239a4e5e /release/scripts/startup/bl_ui | |
parent | 4e104ce5b00bddea324029664a6e689182b35f12 (diff) |
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
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 56 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 1 |
2 files changed, 44 insertions, 13 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"), ), ) |