Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-14 16:02:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-14 16:02:01 +0400
commit181104261d8b1d95744ebdf731a93646b6326aed (patch)
tree06856aeb8de87e249469719989802c7b68805d30 /source/blender/editors
parentcad6ed9bc600e9162cdad2410e405fc7ad716e2e (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.c5
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);
}
}