[Bf-blender-cvs] [398ce6d987c] greasepencil-object: Cleanup: Change "Drawing Tools" panel to use the annotation tools, not old GP drawing operator

Joshua Leung noreply at git.blender.org
Thu Jun 28 09:14:11 CEST 2018


Commit: 398ce6d987ca466a4abc049fd8261470c3a56a6a
Author: Joshua Leung
Date:   Thu Jun 28 17:02:58 2018 +1200
Branches: greasepencil-object
https://developer.blender.org/rB398ce6d987ca466a4abc049fd8261470c3a56a6a

Cleanup: Change "Drawing Tools" panel to use the annotation tools, not old GP drawing operator

This panel is going away soon, to be replaced by the active tools system.
But in the meantime, we need to stop using this old panel as it will
cause crashes when used.

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

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 ccc450acaa2..7eef8b76734 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -98,12 +98,12 @@ class GreasePencilDrawingToolsPanel:
 
         col.label(text="Draw:")
         row = col.row(align=True)
-        row.operator("gpencil.draw", icon='GREASEPENCIL', text="Draw").mode = 'DRAW'
-        row.operator("gpencil.draw", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'  # XXX: Needs a dedicated icon
+        row.operator("gpencil.annotate", icon='GREASEPENCIL', text="Draw").mode = 'DRAW'
+        row.operator("gpencil.annotate", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'  # XXX: Needs a dedicated icon
 
         row = col.row(align=True)
-        row.operator("gpencil.draw", icon='LINE_DATA', text="Line").mode = 'DRAW_STRAIGHT'
-        row.operator("gpencil.draw", icon='MESH_DATA', text="Poly").mode = 'DRAW_POLY'
+        row.operator("gpencil.annotate", icon='LINE_DATA', text="Line").mode = 'DRAW_STRAIGHT'
+        row.operator("gpencil.annotate", icon='MESH_DATA', text="Poly").mode = 'DRAW_POLY'
 
         col.separator()
 
@@ -111,10 +111,10 @@ class GreasePencilDrawingToolsPanel:
         sub.operator("gpencil.blank_frame_add", icon='NEW')
         sub.operator("gpencil.active_frames_delete_all", icon='X', text="Delete Frame(s)")
 
-        sub = col.column(align=True)
-        sub.prop(context.tool_settings, "use_gpencil_additive_drawing", text="Additive Drawing")
-        sub.prop(context.tool_settings, "use_gpencil_continuous_drawing", text="Continuous Drawing")
-        sub.prop(context.tool_settings, "use_gpencil_draw_onback", text="Draw on Back")
+        #sub = col.column(align=True)
+        #sub.prop(context.tool_settings, "use_gpencil_additive_drawing", text="Additive Drawing")
+        #sub.prop(context.tool_settings, "use_gpencil_continuous_drawing", text="Continuous Drawing")
+        #sub.prop(context.tool_settings, "use_gpencil_draw_onback", text="Draw on Back")
 
         col.separator()
         col.separator()
@@ -128,10 +128,10 @@ class GreasePencilDrawingToolsPanel:
             elif is_clip_editor:
                 row.prop(context.space_data, "grease_pencil_source", expand=True)
 
-        col.separator()
-        col.separator()
+        #col.separator()
+        #col.separator()
 
-        gpencil_stroke_placement_settings(context, col)
+        #gpencil_stroke_placement_settings(context, col)
 
         gpd = context.gpencil_data



More information about the Bf-blender-cvs mailing list