[Bf-blender-cvs] [82ab5668d06] greasepencil-object: Fix bug: Appended brush comes with empty palette

Dalai Felinto noreply at git.blender.org
Fri Mar 16 14:10:48 CET 2018


Commit: 82ab5668d06640afd45260f93b8138c7c1d7af88
Author: Dalai Felinto
Date:   Fri Mar 16 10:10:39 2018 -0300
Branches: greasepencil-object
https://developer.blender.org/rB82ab5668d06640afd45260f93b8138c7c1d7af88

Fix bug: Appended brush comes with empty palette

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4a5d1674800..8861722612c 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2332,7 +2332,7 @@ static void lib_link_brush(FileData *fd, Main *main)
 			brush->paint_curve = newlibadr_us(fd, brush->id.lib, brush->paint_curve);
 
 			/* link default grease pencil palette */
-			brush->palette = newlibadr(fd, brush->id.lib, brush->palette);
+			brush->palette = newlibadr_us(fd, brush->id.lib, brush->palette);
 
 			brush->id.tag &= ~LIB_TAG_NEED_LINK;
 		}
@@ -9686,6 +9686,7 @@ static void expand_brush(FileData *fd, Main *mainvar, Brush *brush)
 	expand_doit(fd, mainvar, brush->mask_mtex.tex);
 	expand_doit(fd, mainvar, brush->clone.image);
 	expand_doit(fd, mainvar, brush->paint_curve);
+	expand_doit(fd, mainvar, brush->palette);
 }
 
 static void expand_material(FileData *fd, Main *mainvar, Material *ma)



More information about the Bf-blender-cvs mailing list