[Bf-blender-cvs] [101f00e696a] blender-v2.83-release: GPencil: Fix missing patch of default Material names

Antonio Vazquez noreply at git.blender.org
Sat Apr 18 16:09:29 CEST 2020


Commit: 101f00e696af012b980f39f592dd3a5ff98fb677
Author: Antonio Vazquez
Date:   Sat Apr 18 16:09:22 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB101f00e696af012b980f39f592dd3a5ff98fb677

GPencil: Fix missing patch of default Material names

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

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

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

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) {



More information about the Bf-blender-cvs mailing list