[Bf-blender-cvs] [8959703679a] greasepencil-object: GPencil: Small cleanup in previous commit

Antonio Vazquez noreply at git.blender.org
Fri Nov 15 10:55:53 CET 2019


Commit: 8959703679a3fd2590c73889f43dbee1d76f712f
Author: Antonio Vazquez
Date:   Fri Nov 15 10:55:45 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB8959703679a3fd2590c73889f43dbee1d76f712f

GPencil: Small cleanup in previous commit

Look for brush only once.

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

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 fa42997792d..b56c3054d53 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1293,6 +1293,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
 
   if (!MAIN_VERSION_ATLEAST(bmain, 282, 2)) {
     /* Init all Vertex Paint brushes. */
+    Brush *brush = BLI_findstring(&bmain->brushes, "Pencil", offsetof(ID, name) + 2);
     for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
       ToolSettings *ts = scene->toolsettings;
 
@@ -1302,7 +1303,6 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
       BKE_paint_ensure_from_paintmode(scene, PAINT_MODE_GPENCIL_VERTEX);
 
       /* Set default Draw brush. */
-      Brush *brush = BLI_findstring(&bmain->brushes, "Pencil", offsetof(ID, name) + 2);
       Paint *paint = &ts->gp_paint->paint;
       BKE_paint_brush_set(paint, brush);



More information about the Bf-blender-cvs mailing list