diff options
author | Antonioya <blendergit@gmail.com> | 2019-03-25 19:02:42 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-03-25 19:06:07 +0300 |
commit | 7021bd527380b4d87cf48057f0039509326b03dd (patch) | |
tree | 55126437da17d736a789d236c8a98d199a1e6260 /release/scripts/startup/bl_ui/space_topbar.py | |
parent | 84240ebb3ebde58f6bfba256e49d37697fb6bc9f (diff) |
GPencil: Only brushes with pinned materials have materials
Using GP_BRUSH_MATERIAL_PINNED to switch between active material and brush material, instead of updating all brushes on active material changes. This will allow brushes to have no material and therefore to not inflate the user count.
This fix T62465.
Patch contributed by @matc
Reviewers: @brecht @antoniov @billreynish @mendio
Diffstat (limited to 'release/scripts/startup/bl_ui/space_topbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 0e687452e5c..7b9b324066a 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -316,7 +316,8 @@ class _draw_left_context_mode: def draw_color_selector(): ma = gp_settings.material row = layout.row(align=True) - + if not gp_settings.use_material_pin: + ma = context.object.active_material icon_id = 0 if ma: icon_id = ma.id_data.preview.icon_id |