diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-09 08:34:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-09 08:37:36 +0300 |
commit | 0b311eeca5486b763d43f0d9dadc5553a693e3e8 (patch) | |
tree | 1a9def04f75637c9c18d6e8e2c3f33abf09efbf4 /release/scripts/startup/bl_ui | |
parent | 092bea06da38fb292540f75de12cb28780b5d919 (diff) |
Correct error in last commit
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 4f4bb3cf2cd..75dfd60b1d4 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1201,10 +1201,12 @@ class _defs_sculpt: @staticmethod def generate_from_brushes(context): exclude_filter = {} - if not context.preferences.experimental.use_sculpt_vertex_colors: + # Use 'bpy.context' instead of 'context' since it can be None. + prefs = bpy.context.preferences + if not prefs.experimental.use_sculpt_vertex_colors: exclude_filter = {'PAINT', 'SMEAR'} - if not context.preferences.experimental.use_tools_missing_icons: + if not prefs.experimental.use_tools_missing_icons: exclude_filter = {'PAINT', 'SMEAR', 'BOUNDARY', 'DISPLACEMENT_ERASER'} return generate_from_enum_ex( |