Commit: 9c1a5b06410dcb0cadce5fae3a642475aac5f177
Author: Antonio Vazquez
Date:   Tue Apr 24 15:46:44 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB9c1a5b06410dcb0cadce5fae3a642475aac5f177

Fix error reading materials

The link materials section was missing.

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

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

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

diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index d9736015f07..7688e2450cd 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6371,6 +6371,11 @@ static void lib_link_gpencil(FileData *fd, Main *main)
                        IDP_LibLinkProperty(gpd->id.properties, fd);
                        lib_link_animdata(fd, &gpd->id, gpd->adt);
 
+                       /* materials */
+                       for (int a = 0; a < gpd->totcol; a++) {
+                               gpd->mat[a] = newlibadr_us(fd, gpd->id.lib, 
gpd->mat[a]);
+                       }
+
                        gpd->id.tag &= ~LIB_TAG_NEED_LINK;
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to