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:
authorAntonio Vazquez <blendergit@gmail.com>2020-04-18 17:09:22 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-04-18 17:09:22 +0300
commit101f00e696af012b980f39f592dd3a5ff98fb677 (patch)
tree12d9a8e97fa25142ea81c05b2b8b463e89373f21 /source/blender/blenloader/intern/versioning_280.c
parentd809a0260ea7fe7a0fd7a9a5f235d817b6e3d9a4 (diff)
GPencil: Fix missing patch of default Material names
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r--source/blender/blenloader/intern/versioning_280.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index e5c066a0ffc..b90413aa5ca 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1663,6 +1663,7 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
if (!MAIN_VERSION_ATLEAST(bmain, 282, 2)) {
/* Init all Vertex/Sculpt and Weight Paint brushes. */
Brush *brush;
+ Material *ma;
/* Pen Soft brush. */
brush = (Brush *)rename_id_for_versioning(bmain, ID_BR, "Draw Soft", "Pencil Soft");
if (brush) {
@@ -1675,6 +1676,23 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
rename_id_for_versioning(bmain, ID_BR, "Draw Marker", "Marker Bold");
rename_id_for_versioning(bmain, ID_BR, "Draw Block", "Marker Chisel");
+ ma = BLI_findstring(&bmain->materials, "Black", offsetof(ID, name) + 2);
+ if (ma && ma->gp_style) {
+ rename_id_for_versioning(bmain, ID_MA, "Black", "Solid Stroke");
+ }
+ ma = BLI_findstring(&bmain->materials, "Red", offsetof(ID, name) + 2);
+ if (ma && ma->gp_style) {
+ rename_id_for_versioning(bmain, ID_MA, "Red", "Squares Stroke");
+ }
+ ma = BLI_findstring(&bmain->materials, "Grey", offsetof(ID, name) + 2);
+ if (ma && ma->gp_style) {
+ rename_id_for_versioning(bmain, ID_MA, "Grey", "Solid Fill");
+ }
+ ma = BLI_findstring(&bmain->materials, "Black Dots", offsetof(ID, name) + 2);
+ if (ma && ma->gp_style) {
+ rename_id_for_versioning(bmain, ID_MA, "Black Dots", "Dots Stroke");
+ }
+
/* Remove useless Fill Area.001 brush. */
brush = BLI_findstring(&bmain->brushes, "Fill Area.001", offsetof(ID, name) + 2);
if (brush) {