[Bf-blender-cvs] [f45b91a1c57] master: Fix tool system Python errors if there is no active object.
Brecht Van Lommel
noreply at git.blender.org
Tue Apr 16 15:42:26 CEST 2019
Commit: f45b91a1c5791c6f80f4790896e70b0fa9804da1
Author: Brecht Van Lommel
Date: Tue Apr 16 12:18:28 2019 +0200
Branches: master
https://developer.blender.org/rBf45b91a1c5791c6f80f4790896e70b0fa9804da1
Fix tool system Python errors if there is no active object.
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
index ed31a847933..71d6771c487 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -957,7 +957,7 @@ class _defs_vertex_paint:
if context is None:
return True
ob = context.active_object
- return (ob.type == 'MESH' and
+ return (ob and ob.type == 'MESH' and
(ob.data.use_paint_mask or
ob.data.use_paint_mask_vertex))
@@ -979,7 +979,7 @@ class _defs_texture_paint:
if context is None:
return True
ob = context.active_object
- return (ob.type == 'MESH' and
+ return (ob and ob.type == 'MESH' and
(ob.data.use_paint_mask))
@staticmethod
@@ -1000,7 +1000,7 @@ class _defs_weight_paint:
if context is None:
return True
ob = context.active_object
- return (ob.type == 'MESH' and
+ return (ob and ob.type == 'MESH' and
(ob.data.use_paint_mask or
ob.data.use_paint_mask_vertex))
More information about the Bf-blender-cvs
mailing list