[Bf-blender-cvs] [a9dd6d004b4] blender-v2.83-release: Fix T75780: Gpencil Sculpt brushes not working with old files

Antonio Vazquez noreply at git.blender.org
Thu Apr 16 15:57:17 CEST 2020


Commit: a9dd6d004b4f6798e62618dd6cf87369509b33a6
Author: Antonio Vazquez
Date:   Thu Apr 16 15:53:03 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBa9dd6d004b4f6798e62618dd6cf87369509b33a6

Fix T75780: Gpencil Sculpt brushes not working with old files

The patching of brushes was not done.

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

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 7904e51a516..087fef9ee09 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1666,6 +1666,19 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
     LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
       BKE_fcurves_id_cb(&ob->id, do_version_fcurve_hide_viewport_fix, NULL);
     }
+
+    /* Reset all grease pencil brushes. */
+    LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+      BKE_brush_gpencil_paint_presets(bmain, scene->toolsettings);
+      BKE_brush_gpencil_sculpt_presets(bmain, scene->toolsettings);
+      BKE_brush_gpencil_weight_presets(bmain, scene->toolsettings);
+      BKE_brush_gpencil_vertex_presets(bmain, scene->toolsettings);
+
+      /* Ensure new Paint modes. */
+      BKE_paint_ensure_from_paintmode(scene, PAINT_MODE_VERTEX_GPENCIL);
+      BKE_paint_ensure_from_paintmode(scene, PAINT_MODE_SCULPT_GPENCIL);
+      BKE_paint_ensure_from_paintmode(scene, PAINT_MODE_WEIGHT_GPENCIL);
+    }
   }
 
   /**



More information about the Bf-blender-cvs mailing list