diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-14 16:02:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-14 16:02:01 +0400 |
commit | 181104261d8b1d95744ebdf731a93646b6326aed (patch) | |
tree | 06856aeb8de87e249469719989802c7b68805d30 /source/blender/editors | |
parent | cad6ed9bc600e9162cdad2410e405fc7ad716e2e (diff) |
patch [#28247] Fix for: [#28236] Separate By Materials fails when some materials "available" to the mesh are unassigned
from Alex Fraser (z0r)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index ec08bfccda3..4377fb03632 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -1449,9 +1449,8 @@ static int mesh_separate_material(wmOperator *op, Main *bmain, Scene *scene, Bas /* select the material */ EM_select_by_material(em, curr_mat); /* and now separate */ - if(0==mesh_separate_selected(op, bmain, scene, editbase)) { - BKE_mesh_end_editmesh(me, em); - return 0; + if(em->totfacesel > 0) { + mesh_separate_selected(op, bmain, scene, editbase); } } |