diff options
author | Bastien Montagne <bastien@blender.org> | 2021-06-09 17:01:14 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-06-09 17:33:34 +0300 |
commit | 92ae3ff84ca90973efcb3372b1102ee2aaf7c14f (patch) | |
tree | f4b17b418658f41fb53815279fe8b76633d3192d /source/blender/blenkernel/intern/material.c | |
parent | 5954b351f009a24ff560bd7acb1c5b4d39fcd25c (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 6 |
1 files changed, 0 insertions, 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); |