diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-10-08 17:49:28 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-10-08 17:49:45 +0300 |
commit | 94d2736dfb33c20a49781eec00168f174ff8b767 (patch) | |
tree | 44126af22b85401052eb13d4f815701e88c50c3d /source/blender/blenkernel/intern/object.c | |
parent | ff57ce86170d2e440d2e0566bf3c4a74bb745b32 (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 12 |
1 files 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); } |