[Bf-blender-cvs] [e75169974c5] blender2.8: Fix UI error in annotation tool
Campbell Barton
noreply at git.blender.org
Tue Oct 16 00:15:54 CEST 2018
Commit: e75169974c58846312942509871c25bee17a5956
Author: Campbell Barton
Date: Tue Oct 16 09:13:26 2018 +1100
Branches: blender2.8
https://developer.blender.org/rBe75169974c58846312942509871c25bee17a5956
Fix UI error in annotation tool
===================================================================
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 2e58e3e0bb4..a62c010e115 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -221,14 +221,15 @@ def _defs_annotate_factory():
layout.label(text="Annotation:")
gpl = context.active_gpencil_layer
- sub = layout.row(align=True)
- sub.ui_units_x = 8
-
- sub.prop(gpl, "color", text="")
- sub.popover(
- panel="TOPBAR_PT_annotation_layers",
- text=text,
- )
+ if gpl is not None:
+ sub = layout.row(align=True)
+ sub.ui_units_x = 8
+
+ sub.prop(gpl, "color", text="")
+ sub.popover(
+ panel="TOPBAR_PT_annotation_layers",
+ text=text,
+ )
tool_settings = context.tool_settings
space_type = tool.space_type
More information about the Bf-blender-cvs
mailing list