[Bf-blender-cvs] [56d703dc08b] greasepencil-object: GPencil: Fix Use cursor Popover

Antonio Vazquez noreply at git.blender.org
Mon Mar 2 16:20:26 CET 2020


Commit: 56d703dc08b555820121908cc24cf77633132500
Author: Antonio Vazquez
Date:   Mon Mar 2 16:13:12 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB56d703dc08b555820121908cc24cf77633132500

GPencil: Fix Use cursor Popover

- Fix color in modes not used.
- Enable cursor by default.

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	source/blender/blenloader/intern/versioning_defaults.c

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

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 e22c32319b4..fced848641e 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -222,9 +222,6 @@ class GreasePencilDisplayPanel:
             if brush.gpencil_tool == 'DRAW':
                 col.prop(gp_settings, "show_lasso", text="Show Fill Color While Drawing")
 
-            if brush.gpencil_tool in {'FILL', 'TINT'}:
-                col.prop(brush, "cursor_color_add", text="Cursor Color")
-
         elif ob.mode == 'SCULPT_GPENCIL':
             col = layout.column(align=True)
             col.active = settings.show_brush
@@ -240,10 +237,9 @@ class GreasePencilDisplayPanel:
             col.prop(brush, "cursor_color_add", text="Cursor Color")
 
         elif ob.mode == 'VERTEX_GPENCIL':
-            col = layout.column(align=True)
-            col.active = settings.show_brush
-
-            col.prop(brush, "cursor_color_add", text="Cursor Color")
+            row = layout.row(align=True)
+            row.prop(settings, "show_brush", text="")
+            row.label(text="Display Cursor")
 
 
 class GreasePencilBrushFalloff:
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 92e1dee96e7..62b53a1c491 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -657,6 +657,10 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
     BKE_paint_ensure_from_paintmode(scene, PAINT_MODE_SCULPT_GPENCIL);
     BKE_paint_ensure_from_paintmode(scene, PAINT_MODE_WEIGHT_GPENCIL);
 
+    /* Enable cursor. */
+    GpPaint *gp_paint = scene->toolsettings->gp_paint;
+    gp_paint->paint.flags |= PAINT_SHOW_BRUSH;
+
     /* Ensure Palette by default. */
     BKE_gpencil_palette_ensure(bmain, scene);
   }



More information about the Bf-blender-cvs mailing list