[Bf-blender-cvs] [89c1f9d] master: Grease Pencil: Fix python errors opening N panel -> GP with empty VSE

Sergey Sharybin noreply at git.blender.org
Fri Nov 11 14:04:56 CET 2016


Commit: 89c1f9db37cc1becdd437fcfdb1877306cc2b329
Author: Sergey Sharybin
Date:   Fri Nov 11 14:04:04 2016 +0100
Branches: master
https://developer.blender.org/rB89c1f9db37cc1becdd437fcfdb1877306cc2b329

Grease Pencil: Fix python errors opening N panel -> GP with empty VSE

Solves errors, but not sure interface is indeed what users will expect.

Will ask GP team to check on this.

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

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 bc40932..08e07b8 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -61,6 +61,9 @@ def gpencil_stroke_placement_settings(context, layout):
 
 def gpencil_active_brush_settings_simple(context, layout):
     brush = context.active_gpencil_brush
+    if brush is None:
+        layout.label("No Active Brush")
+        return
 
     col = layout.column()
     col.label("Active Brush:      ")




More information about the Bf-blender-cvs mailing list