diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-29 08:19:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-29 08:27:00 +0300 |
commit | c305759762aa39c4f234871fca793c7bd9944fa6 (patch) | |
tree | aaeea54772e872613a3655bb52f95b4c1129d4ce /source/blender/blenloader/intern | |
parent | 78719abc01f11fee9652711ca64f83d0c777bb4f (diff) |
Fix duplicate brushes being added to startup
All builtin templates have this brush.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 30 |
1 files changed, 0 insertions, 30 deletions
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) { |