Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-07-20 06:54:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-07-20 06:54:55 +0300
commit690063edb928b2755462863d971600deb608f848 (patch)
tree78de5c36fef4a6d6ed1866ee4c4a06f28a28ef94
parentf2fa73786b8f30689c5810224204868775d9c4ec (diff)
Fix T48897: Flatten brush fails on first stroke
The flatten brush depended on accumulate being disabled, Adding dynotopo support for accumulate caused problems for this tool (see T44390). Enable for existing files.
-rw-r--r--source/blender/blenloader/intern/versioning_270.c6
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index ac2811aeb06..8d96d7c3807 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1225,5 +1225,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
+
+ for (Brush *br = main->brush.first; br; br = br->id.next) {
+ if (br->sculpt_tool == SCULPT_TOOL_FLATTEN) {
+ br->flag |= BRUSH_ACCUMULATE;
+ }
+ }
}
}
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index ad7a3c5b9c4..0ed7a397e0b 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -256,6 +256,11 @@ void BLO_update_defaults_startup_blend(Main *bmain)
if (br) {
br->alpha = 1.0f;
}
+
+ br = (Brush *)BKE_libblock_find_name_ex(bmain, ID_BR, "Flatten/Contrast");
+ if (br) {
+ br->flag |= BRUSH_ACCUMULATE;
+ }
}
}