[Bf-blender-cvs] [95e30ca2df7] greasepencil-object: GPencil: Fix Tint tool in default template

Antonio Vazquez noreply at git.blender.org
Tue Mar 31 12:40:08 CEST 2020


Commit: 95e30ca2df737e81fc3b085b122a836c7c9282f6
Author: Antonio Vazquez
Date:   Tue Mar 31 12:39:47 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB95e30ca2df737e81fc3b085b122a836c7c9282f6

GPencil: Fix Tint tool in default template

The brush was not set and the Tint tool did not work.

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

M	source/blender/blenloader/intern/versioning_280.c

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

diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 50b1e385dd4..d8c2e5c3630 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -4541,6 +4541,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
             brush->gpencil_weight_tool = brush->gpencil_settings->brush_type;
           }
         }
+        /* Tint brush. */
+        Brush *brush = BLI_findstring(&bmain->brushes, "Tint", offsetof(ID, name) + 2);
+        if (brush == NULL) {
+          brush = BKE_brush_add(bmain, "Tint", OB_MODE_PAINT_GPENCIL);
+          BKE_brush_init_gpencil_settings(brush);
+        }
+        BKE_gpencil_brush_preset_set(bmain, brush, GP_BRUSH_PRESET_TINT);
 
         BKE_paint_toolslots_init_from_main(bmain);
       }



More information about the Bf-blender-cvs mailing list