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:
authorSybren A. Stüvel <sybren@blender.org>2020-01-20 18:11:00 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-01-20 18:11:00 +0300
commitdae033801b8c98bcac5a09ba3bf77868b7204540 (patch)
tree76b808741ecdc214bfbfb7b9b5b38f8912fd7565 /source/blender/editors/mesh
parent133f6a9812609feda64418ee0c8f318f28e8d8db (diff)
Fix T72050 Subdivide method "Straight Cut" not working with N-Gons enabled
'Straight Cut' is actually documented as creating N-Gons. However, the code was disallowing this. This is probably a mix-up as the "allow N-Gons" option is documented as a "force quad/tri" option.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index b6b28624c27..0fea21710e9 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -96,13 +96,12 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op)
const float smooth = RNA_float_get(op->ptr, "smoothness");
const float fractal = RNA_float_get(op->ptr, "fractal") / 2.5f;
const float along_normal = RNA_float_get(op->ptr, "fractal_along_normal");
+ const bool use_quad_tri = !RNA_boolean_get(op->ptr, "ngon");
- if (RNA_boolean_get(op->ptr, "ngon") &&
- RNA_enum_get(op->ptr, "quadcorner") == SUBD_CORNER_STRAIGHT_CUT) {
+ if (use_quad_tri && RNA_enum_get(op->ptr, "quadcorner") == SUBD_CORNER_STRAIGHT_CUT) {
RNA_enum_set(op->ptr, "quadcorner", SUBD_CORNER_INNERVERT);
}
const int quad_corner_type = RNA_enum_get(op->ptr, "quadcorner");
- const bool use_quad_tri = !RNA_boolean_get(op->ptr, "ngon");
const int seed = RNA_int_get(op->ptr, "seed");
ViewLayer *view_layer = CTX_data_view_layer(C);