From 92ae3ff84ca90973efcb3372b1102ee2aaf7c14f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 9 Jun 2021 16:01:14 +0200 Subject: [PATCH] Fix assigning material to linked object being forbidden in BKE. While this should not be allowed in general, there are some cases (library overrides at least) where supporting this is mandatory. Further more, comment stating that this could crash is from 2011, could not reproduce any issue with current code. Commit comment was referring to undo/redo, but in use cases here those should not affect things. Note that in general, such relatively high-level checks should be handled by high-level, close to user code (like in ED area e.g.), not in low-level BKE code anyway. --- source/blender/blenkernel/intern/material.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 468f735257a..c5060e16e4d 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -969,12 +969,6 @@ void BKE_object_material_assign(Main *bmain, Object *ob, Material *ma, short act act = 1; } - /* prevent crashing when using accidentally */ - BLI_assert(!ID_IS_LINKED(ob)); - if (ID_IS_LINKED(ob)) { - return; - } - /* test arraylens */ totcolp = BKE_object_material_len_p(ob);