[Bf-blender-cvs] [7e61d1f] GPencil_EditStrokes: GPencil Toolshelf Panel: Add "drawing settings" to toolshelf

Joshua Leung noreply at git.blender.org
Sun Oct 12 06:37:56 CEST 2014


Commit: 7e61d1fc4fe8fac74f241a3994c7d3bc6a26b5a2
Author: Joshua Leung
Date:   Sun Oct 12 17:17:10 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rB7e61d1fc4fe8fac74f241a3994c7d3bc6a26b5a2

GPencil Toolshelf Panel: Add "drawing settings" to toolshelf

The "Drawing Settings" displayed at the bottom of the Grease Pencil data panel
(Properties Region) is now included in the toolshelf too. These really make more
sense here, as they affect how the tool will behave (while the Properties Region
is more how it gets displayed).

However, we can't fully move over to the toolbar yet, since the VSE still lacks
a toolbar for this. Every other place (View3D, MovieClip, Image) all have their
own toolbars now.

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

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 196beb2..2b94147 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -47,7 +47,30 @@ class GreasePencilPanel():
         row = col.row(align=True)
         row.prop(context.tool_settings, "use_grease_pencil_sessions", text="Continuous Drawing")
 
-        col.separator()
+        gpd = context.gpencil_data
+        if gpd:
+            col.separator()
+
+            col.label(text="Stroke Placement:")
+
+            row = col.row(align=True)
+            row.prop_enum(gpd, "draw_mode", 'VIEW')
+            row.prop_enum(gpd, "draw_mode", 'CURSOR')
+
+            if context.space_data.type == 'VIEW_3D':
+                row = col.row(align=True)
+                row.prop_enum(gpd, "draw_mode", 'SURFACE')
+                row.prop_enum(gpd, "draw_mode", 'STROKE')
+
+                row = col.row(align=False)
+                row.active = gpd.draw_mode in ('SURFACE', 'STROKE')
+                row.prop(gpd, "use_stroke_endpoints")
+
+
+        # TODO: use a separate panel for these?
+        layout.separator()
+
+        col = layout.column(align=True)
 
         col.label(text="Select Strokes:")
         subcol = col.column(align=True)




More information about the Bf-blender-cvs mailing list