diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-10-15 12:11:26 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-10-15 12:11:26 +0400 |
commit | 4cfecdd06ab3f45c944b42c003e8dbd9179e911f (patch) | |
tree | 519babcee48bfacd25a29b4d9a9350b3aa4ab3ea | |
parent | bb11d6337e334b9ceb6fc9b27c8f0aba13897d9a (diff) |
Fix for [#21822] Unusual material slot behaviour, edit v object mode, cascade, SVN 27833
* Disabled removing material slots in edit mode and added back error message from 2.49.
-rw-r--r-- | source/blender/editors/render/render_shading.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index a989171d617..a058f5155de 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -289,6 +289,12 @@ static int material_slot_remove_exec(bContext *C, wmOperator *UNUSED(op)) if(!ob) return OPERATOR_CANCELLED; + /* Removing material slots in edit mode screws things up, see bug #21822.*/ + if(ob == CTX_data_edit_object(C)) { + BKE_report(op->reports, RPT_ERROR, "Unable to remove material slot in edit mode."); + return OPERATOR_CANCELLED; + } + object_remove_material_slot(ob); WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, ob); |