[Bf-blender-cvs] [37c08c1] GPencil_FillStrokes: Fix: Poll for toolshelf UI buttons was spitting out warnings

Joshua Leung noreply at git.blender.org
Wed Oct 29 13:45:01 CET 2014


Commit: 37c08c1e9fbbfa11820b074dbf78fab22e746fee
Author: Joshua Leung
Date:   Tue Oct 28 15:39:30 2014 +1300
Branches: GPencil_FillStrokes
https://developer.blender.org/rB37c08c1e9fbbfa11820b074dbf78fab22e746fee

Fix: Poll for toolshelf UI buttons was spitting out warnings

Casting to bool is safer there

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 3720495..3575331 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -99,7 +99,7 @@ class GreasePencilStrokeEditPanel():
         layout = self.layout
 
         gpd = context.gpencil_data
-        edit_ok = context.editable_gpencil_strokes and gpd.use_stroke_edit_mode
+        edit_ok = bool(context.editable_gpencil_strokes) and bool(gpd.use_stroke_edit_mode)
 
         col = layout.column(align=True)
         col.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True)




More information about the Bf-blender-cvs mailing list