[Bf-blender-cvs] [43f46bb6649] blender2.8: Tool System: add back layer selector

Campbell Barton noreply at git.blender.org
Wed Oct 10 02:13:14 CEST 2018


Commit: 43f46bb6649b4a8a77a494ba75f5d13d5ecdd877
Author: Campbell Barton
Date:   Wed Oct 10 11:10:13 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB43f46bb6649b4a8a77a494ba75f5d13d5ecdd877

Tool System: add back layer selector

This was removed in 1b0c1c551a6f since most settings changes the
current stroke, however the layer selector is used for the next stroke.

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

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 601224af84b..14d4490fd4f 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py
@@ -203,8 +203,14 @@ def _defs_annotate_factory():
     class _defs_annotate:
         @staticmethod
         def draw_settings_common(context, layout, tool):
-            ts = context.tool_settings
+            if type(context.gpencil_data_owner) is bpy.types.Object:
+                gpd = context.scene.grease_pencil
+            else:
+                gpd = context.gpencil_data
+            if gpd is not None:
+                layout.prop(gpd.layers, "active_note", text="")
 
+            ts = context.tool_settings
             space_type = tool.space_type
             if space_type == 'VIEW_3D':
                 layout.separator()



More information about the Bf-blender-cvs mailing list