diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-14 11:31:47 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-14 11:31:47 +0300 |
commit | 1d76fbf3df69db6939145b5a1cac7a5d6a482375 (patch) | |
tree | e4831100bd100556205c81b78984dba5cd8fa4ed /source/blender/blenloader | |
parent | 18141863b2123fec3aab411755db3ed2be4ce04d (diff) |
GP: Add thickness and stregth factor to UI
Now it's possible change the factors for soft eraser.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index a35c0531059..3cf65330b3e 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -1944,5 +1944,17 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + if (!DNA_struct_elem_find(fd->filesdna, "BrushGpencilSettings", "float", "era_strength_f")) { + for (Brush *brush = bmain->brush.first; brush; brush = brush->id.next) { + if (brush->gpencil_settings != NULL) { + BrushGpencilSettings *gp = brush->gpencil_settings; + if (gp->brush_type == GP_BRUSH_TYPE_ERASE) { + gp->era_strength_f = 1.0f; + gp->era_thickness_f = 0.1f; + } + } + } + } } } |