From 94d2736dfb33c20a49781eec00168f174ff8b767 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Fri, 8 Oct 2021 16:49:28 +0200 Subject: [PATCH] Fix T92046: Mesh to GPencil fails because materials are not created This bug was introduced in D12190 because the list of types that support materials did not include GPencil and this caused all materials to be removed after they were created during conversion. --- source/blender/blenkernel/intern/object.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 274f0394618..e3bb384ffcc 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -5772,6 +5772,14 @@ void BKE_object_replace_data_on_shallow_copy(Object *ob, ID *new_data) bool BKE_object_supports_material_slots(struct Object *ob) { - return ELEM( - ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_HAIR, OB_POINTCLOUD, OB_VOLUME); + return ELEM(ob->type, + OB_MESH, + OB_CURVE, + OB_SURF, + OB_FONT, + OB_MBALL, + OB_HAIR, + OB_POINTCLOUD, + OB_VOLUME, + OB_GPENCIL); }