from bug report [#34984] bmesh.ops.recalc_face_normals() ignores use_flip=True

the name `use_flip` is misleading, option in fact tags faces that have been flipped, rename to `use_face_tag`
This commit is contained in:
Campbell Barton 2013-04-22 20:15:42 +00:00
parent 36e7a98459
commit 3c67cf9594
3 changed files with 3 additions and 3 deletions

@ -150,7 +150,7 @@ static BMOpDefine bmo_recalc_face_normals_def = {
"recalc_face_normals",
/* slots_in */
{{"faces", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}},
{"use_flip", BMO_OP_SLOT_BOOL}, /* Reverse the result */
{"use_face_tag", BMO_OP_SLOT_BOOL}, /* Tag faces that have been flipped */
{{'\0'}},
},
{{{'\0'}}}, /* no output */

@ -315,7 +315,7 @@ void bmo_recalc_face_normals_exec(BMesh *bm, BMOperator *op)
BMLoop *l, *l2;
float maxx, maxx_test, cent[3];
int i, i_max;
const bool use_flip = BMO_slot_bool_get(op->slots_in, "use_flip");
const bool use_flip = BMO_slot_bool_get(op->slots_in, "use_face_tag");
startf = NULL;
maxx = -1.0e10;

@ -976,7 +976,7 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op)
/* doflip has to do with bmesh_rationalize_normals, it's an internal
* thing */
if (!EDBM_op_callf(em, op, "recalc_face_normals faces=%hf use_flip=%b", BM_ELEM_SELECT, true))
if (!EDBM_op_callf(em, op, "recalc_face_normals faces=%hf use_face_tag=%b", BM_ELEM_SELECT, true))
return OPERATOR_CANCELLED;
if (RNA_boolean_get(op->ptr, "inside"))