UI: add 3D view check for grease pencil tool
authorCampbell Barton <ideasman42@gmail.com>
Wed, 1 Aug 2018 06:04:21 +0000 (16:04 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 1 Aug 2018 06:04:21 +0000 (16:04 +1000)
release/scripts/startup/bl_ui/space_toolsystem_toolbar.py

index 98530aea2d28e39cdf0664bbd38e61b531c07234..8ce4a52fbbcc9c426c8a164f0e654ed59a16d40a 100644 (file)
@@ -188,10 +188,8 @@ class _defs_annotate:
     def draw_settings_common(cls, context, layout, tool):
         ts = context.tool_settings
 
-        # For 3D view, show the stroke placement settings
-        # XXX: How to tell what editor the active tool comes from?
-        is_3d_view = True
-        if is_3d_view:
+        space_type = tool.space_type
+        if space_type == 'VIEW_3D':
             layout.separator()
 
             row = layout.row(align=True)