MESH_OT_symmetrize: Cleanup, get op->ptr props outside objects loop
authorDalai Felinto <dfelinto@gmail.com>
Fri, 31 Aug 2018 18:53:07 +0000 (15:53 -0300)
committerDalai Felinto <dfelinto@gmail.com>
Fri, 31 Aug 2018 18:53:07 +0000 (15:53 -0300)
source/blender/editors/mesh/editmesh_tools.c

index 2d21ec8620562fce31b358c3473abe266544d825..cc17a6c86dff2bfe5662e967b0f3d0bdf0dccf3f 100644 (file)
@@ -6650,6 +6650,7 @@ void MESH_OT_convex_hull(wmOperatorType *ot)
 
 static int mesh_symmetrize_exec(bContext *C, wmOperator *op)
 {
+       const float thresh = RNA_float_get(op->ptr, "threshold");
        ViewLayer *view_layer = CTX_data_view_layer(C);
        uint objects_len = 0;
        Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len);
@@ -6661,10 +6662,8 @@ static int mesh_symmetrize_exec(bContext *C, wmOperator *op)
                if (em->bm->totvertsel == 0 ) {
                        continue;
                }
-               BMOperator bmop;
-
-               const float thresh = RNA_float_get(op->ptr, "threshold");
 
+               BMOperator bmop;
                EDBM_op_init(
                        em, &bmop, op,
                        "symmetrize input=%hvef direction=%i dist=%f",