Commit: 5d4b981bc28278d254f247b511bed041d4daf599
Author: Antonioya
Date:   Fri Aug 3 13:41:40 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB5d4b981bc28278d254f247b511bed041d4daf599

Add missing single user management for grease pencil materials

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

M       source/blender/editors/object/object_relations.c

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

diff --git a/source/blender/editors/object/object_relations.c 
b/source/blender/editors/object/object_relations.c
index 874b36ef42e..78e44e52299 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1875,6 +1875,7 @@ static void single_mat_users_expand(Main *bmain)
        Mesh *me;
        Curve *cu;
        MetaBall *mb;
+       bGPdata *gpd;
 
        for (ob = bmain->object.first; ob; ob = ob->id.next)
                if (ob->id.tag & LIB_TAG_NEW)
@@ -1891,6 +1892,10 @@ static void single_mat_users_expand(Main *bmain)
        for (mb = bmain->mball.first; mb; mb = mb->id.next)
                if (mb->id.tag & LIB_TAG_NEW)
                        new_id_matar(bmain, mb->mat, mb->totcol);
+
+       for (gpd = bmain->gpencil.first; gpd; gpd = gpd->id.next)
+               if (gpd->id.tag & LIB_TAG_NEW)
+                       new_id_matar(bmain, gpd->mat, gpd->totcol);
 }
 
 /* used for copying scenes */

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

Reply via email to