diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-03 14:41:40 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-03 14:41:56 +0300 |
commit | 5d4b981bc28278d254f247b511bed041d4daf599 (patch) | |
tree | e3b0a606630cb79a67b0d0f49c0ceaa6df4215ef /source/blender/editors/object | |
parent | e1a68619874bbef7b5ac0593d586d17ce129637f (diff) |
Add missing single user management for grease pencil materials
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 */ |