[Bf-blender-cvs] [78b555b940f] soc-2017-normal-tools: Resolved issues with copy
Rohan Rathi
noreply at git.blender.org
Fri Dec 29 18:45:50 CET 2017
Commit: 78b555b940f96411ac5eec3c04a61626e44c5e89
Author: Rohan Rathi
Date: Fri Dec 29 23:15:22 2017 +0530
Branches: soc-2017-normal-tools
https://developer.blender.org/rB78b555b940f96411ac5eec3c04a61626e44c5e89
Resolved issues with copy
===================================================================
M source/blender/editors/mesh/editmesh_tools.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 62fc959e695..9d5751f4782 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -6826,13 +6826,16 @@ static int edbm_custom_normal_tools_exec(bContext *C, wmOperator *op)
BM_loop_normal_free(ld);
return OPERATOR_CANCELLED;
}
- bool join = ld->totloop > 0 ? true : false;
+ bool join = true;
for (int i = 0; i < ld->totloop; i++, tld++) {
if (!compare_v3v3(ld->normal->nloc, tld->nloc, 1e-4f)) {
join = false;
}
}
- if (bm->totfacesel == 1) {
+ if (ld->totloop == 1) {
+ copy_v3_v3(scene->toolsettings->normal_vector, ld->normal->nloc);
+ }
+ else if (bm->totfacesel == 1) {
BMFace *f;
BMIter fiter;
BM_ITER_MESH(f, &fiter, bm, BM_FACES_OF_MESH) {
@@ -6841,14 +6844,9 @@ static int edbm_custom_normal_tools_exec(bContext *C, wmOperator *op)
}
}
}
- else if (ld->totloop == 1 || join) {
+ else if (join) {
copy_v3_v3(scene->toolsettings->normal_vector, ld->normal->nloc);
}
- else if (!join) {
- BKE_report(op->reports, RPT_ERROR, "Can only copy Split normal, Averaged vertex normal or Face normal");
- BM_loop_normal_free(ld);
- return OPERATOR_CANCELLED;
- }
break;
case EDBM_CLNOR_TOOLS_PASTE:
More information about the Bf-blender-cvs
mailing list