Fix T79075: Tool popup fails with experimental vertex colors enabled

Register key-maps from tools in functions.
This commit is contained in:
Campbell Barton
2020-07-20 21:54:49 +10:00
parent ac5f011e9c
commit cbf2278266
2 changed files with 30 additions and 14 deletions

View File

@@ -2496,15 +2496,17 @@ class VIEW3D_PT_tools_active(ToolSelectPanelHelper, Panel):
_defs_sculpt.cloth_filter,
lambda context: (
(_defs_sculpt.color_filter,)
if bpy.context.preferences.view.show_developer_ui and \
bpy.context.preferences.experimental.use_sculpt_vertex_colors
if context is None or (
context.preferences.view.show_developer_ui and
context.preferences.experimental.use_sculpt_vertex_colors)
else ()
),
None,
lambda context: (
(_defs_sculpt.mask_by_color,)
if bpy.context.preferences.view.show_developer_ui and \
bpy.context.preferences.experimental.use_sculpt_vertex_colors
if context is None or (
context.preferences.view.show_developer_ui and
context.preferences.experimental.use_sculpt_vertex_colors)
else ()
),
None,