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>2015-05-22 11:12:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-22 11:14:03 +0300
commited2cb8de2fa9bff1cfab737ca8e9e92de2320cca (patch)
treea4064ea8f1d1d8f530076bf0c89402e990b7ff0a /source/blender/editors/mesh/editmesh_tools.c
parent476feb622cd440e378533eddb063e00dc4e2a906 (diff)
Fix for join faces ignoring angle limit
Angle limit for join-faces was more advice then actual limit. Now joining entire selection, gives assurance that no faces above the limit will be merged. The purpose of this was to allow users to isolate 2 faces and always join them. Instead, support this by bypassing limit only when its not set and 2 faces are selected.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 7f595a833f4..fd7497542be 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3760,7 +3760,20 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op)
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(obedit);
int dosharp, douvs, dovcols, domaterials;
- const float limit = RNA_float_get(op->ptr, "limit");
+ float limit;
+ PropertyRNA *prop;
+
+ /* When joining exactly 2 faces, no limit.
+ * this is useful for one off joins while editing. */
+ prop = RNA_struct_find_property(op->ptr, "limit");
+ if ((em->bm->totfacesel == 2) &&
+ (RNA_property_is_set(op->ptr, prop) == false))
+ {
+ limit = DEG2RADF(180.0f);
+ }
+ else {
+ limit = RNA_property_float_get(op->ptr, prop);
+ }
dosharp = RNA_boolean_get(op->ptr, "sharp");
douvs = RNA_boolean_get(op->ptr, "uvs");