Commit: c305759762aa39c4f234871fca793c7bd9944fa6
Author: Campbell Barton
Date:   Tue Jan 29 16:19:28 2019 +1100
Branches: master
https://developer.blender.org/rBc305759762aa39c4f234871fca793c7bd9944fa6

Fix duplicate brushes being added to startup

All builtin templates have this brush.

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

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

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

diff --git a/source/blender/blenloader/intern/versioning_defaults.c 
b/source/blender/blenloader/intern/versioning_defaults.c
index bc1ff353665..c5df6a6fb83 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -315,36 +315,6 @@ void BLO_update_defaults_startup_blend(Main *bmain, const 
char *app_template)
                        /* Match default for new meshes. */
                        mesh->smoothresh = DEG2RADF(30);
                }
-
-               /* Grease Pencil New Eraser Brush */
-               Brush *br;
-               /* Rename old Hard Eraser */
-               br = (Brush *)BKE_libblock_find_name(bmain, ID_BR, "Eraser 
Hard");
-               if (br) {
-                       strcpy(br->id.name, "BREraser Point");
-               }
-               for (Scene *scene = bmain->scene.first; scene; scene = 
scene->id.next) {
-                       ToolSettings *ts = scene->toolsettings;
-                       /* create new hard brush (only create one, but need 
ToolSettings) */
-                       br = (Brush *)BKE_libblock_find_name(bmain, ID_BR, 
"Eraser Hard");
-                       if (!br) {
-                               Paint *paint = &ts->gp_paint->paint;
-                               Brush *old_brush = paint->brush;
-
-                               br = BKE_brush_add_gpencil(bmain, ts, "Eraser 
Hard");
-                               br->size = 30.0f;
-                               br->gpencil_settings->draw_strength = 1.0f;
-                               br->gpencil_settings->flag = 
(GP_BRUSH_ENABLE_CURSOR | GP_BRUSH_DEFAULT_ERASER);
-                               br->gpencil_settings->icon_id = 
GP_BRUSH_ICON_ERASE_HARD;
-                               br->gpencil_tool = GPAINT_TOOL_ERASE;
-                               br->gpencil_settings->eraser_mode = 
GP_BRUSH_ERASER_SOFT;
-                               br->gpencil_settings->era_strength_f = 100.0f;
-                               br->gpencil_settings->era_thickness_f = 50.0f;
-
-                               /* back to default brush */
-                               BKE_paint_brush_set(paint, old_brush);
-                       }
-               }
        }
 
        for (bScreen *sc = bmain->screen.first; sc; sc = sc->id.next) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to