diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-21 20:24:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-21 21:21:40 +0300 |
commit | 890b617919670ea43ae11730a3cb621c85682840 (patch) | |
tree | 5a5e1c56daa1cb6a5290697c60e78875537814cf /release | |
parent | 529e22d6e20d0991401301f7b581ac821bf07f1d (diff) |
Fix Python errors in weight paint mode.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_toolsystem_toolbar.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 72886880cf3..d249a9aa966 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1052,8 +1052,8 @@ class _defs_vertex_paint: @staticmethod def poll_select_mask(context): - mesh = context.object.data - return mesh.use_paint_mask + ob = context.active_object + return ob.type == 'MESH' and ob.data.use_paint_mask @staticmethod def generate_from_brushes(context): @@ -1100,8 +1100,10 @@ class _defs_weight_paint: @staticmethod def poll_select_mask(context): - mesh = context.object.data - return (mesh.use_paint_mask or mesh.use_paint_mask_vertex) + ob = context.active_object + return (ob.type == 'MESH' and + (ob.data.use_paint_mask or + ob.data.use_paint_mask_vertex)) @staticmethod def generate_from_brushes(context): |