From 902ba7b25c9532ae4497ce65ae1a5f4b3268a5e9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 16 Nov 2014 15:46:30 +0100 Subject: [PATCH] Cleanup: use SUBD_CORNER_* prefix for Subdiv flags --- source/blender/bmesh/intern/bmesh_operators.h | 8 ++++---- source/blender/bmesh/operators/bmo_subdivide.c | 6 +++--- source/blender/editors/mesh/editmesh_loopcut.c | 2 +- source/blender/editors/mesh/editmesh_tools.c | 16 ++++++++-------- source/blender/modifiers/intern/MOD_skin.c | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h index b3d97947cab..8557bcd91b7 100644 --- a/source/blender/bmesh/intern/bmesh_operators.h +++ b/source/blender/bmesh/intern/bmesh_operators.h @@ -33,10 +33,10 @@ /*quad innervert values*/ enum { - SUBD_INNERVERT, - SUBD_PATH, - SUBD_FAN, - SUBD_STRAIGHT_CUT + SUBD_CORNER_INNERVERT, + SUBD_CORNER_PATH, + SUBD_CORNER_FAN, + SUBD_CORNER_STRAIGHT_CUT }; /* aligned with PROP_SMOOTH and friends */ diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index 0d9ce4b2731..7b125186110 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -802,13 +802,13 @@ void bmo_subdivide_edges_exec(BMesh *bm, BMOperator *op) patterns[1] = NULL; /* straight cut is patterns[1] == NULL */ switch (cornertype) { - case SUBD_PATH: + case SUBD_CORNER_PATH: patterns[1] = &quad_2edge_path; break; - case SUBD_INNERVERT: + case SUBD_CORNER_INNERVERT: patterns[1] = &quad_2edge_innervert; break; - case SUBD_FAN: + case SUBD_CORNER_FAN: patterns[1] = &quad_2edge_fan; break; } diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index b5508ef8b82..3d93210382c 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -412,7 +412,7 @@ static void ringsel_finish(bContext *C, wmOperator *op) BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT, smoothness, smooth_falloff, true, 0.0f, 0.0f, - cuts, seltype, SUBD_PATH, 0, true, + cuts, seltype, SUBD_CORNER_PATH, 0, true, use_only_quads, 0); /* when used in a macro tessface is already re-recalculated */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 15b782fb08b..a136bc5e0c5 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -90,9 +90,9 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) const float along_normal = RNA_float_get(op->ptr, "fractal_along_normal"); if (RNA_boolean_get(op->ptr, "quadtri") && - RNA_enum_get(op->ptr, "quadcorner") == SUBD_STRAIGHT_CUT) + RNA_enum_get(op->ptr, "quadcorner") == SUBD_CORNER_STRAIGHT_CUT) { - RNA_enum_set(op->ptr, "quadcorner", SUBD_INNERVERT); + RNA_enum_set(op->ptr, "quadcorner", SUBD_CORNER_INNERVERT); } BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT, @@ -110,10 +110,10 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) /* Note, these values must match delete_mesh() event values */ static EnumPropertyItem prop_mesh_cornervert_types[] = { - {SUBD_INNERVERT, "INNERVERT", 0, "Inner Vert", ""}, - {SUBD_PATH, "PATH", 0, "Path", ""}, - {SUBD_STRAIGHT_CUT, "STRAIGHT_CUT", 0, "Straight Cut", ""}, - {SUBD_FAN, "FAN", 0, "Fan", ""}, + {SUBD_CORNER_INNERVERT, "INNERVERT", 0, "Inner Vert", ""}, + {SUBD_CORNER_PATH, "PATH", 0, "Path", ""}, + {SUBD_CORNER_STRAIGHT_CUT, "STRAIGHT_CUT", 0, "Straight Cut", ""}, + {SUBD_CORNER_FAN, "FAN", 0, "Fan", ""}, {0, NULL, 0, NULL, NULL} }; @@ -141,7 +141,7 @@ void MESH_OT_subdivide(wmOperatorType *ot) RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor", 0.0f, 1.0f); RNA_def_boolean(ot->srna, "quadtri", 0, "Quad/Tri Mode", "Tries to prevent ngons"); - RNA_def_enum(ot->srna, "quadcorner", prop_mesh_cornervert_types, SUBD_STRAIGHT_CUT, + RNA_def_enum(ot->srna, "quadcorner", prop_mesh_cornervert_types, SUBD_CORNER_STRAIGHT_CUT, "Quad Corner Type", "How to subdivide quad corners (anything other than Straight Cut will prevent ngons)"); RNA_def_float(ot->srna, "fractal", 0.0f, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor", 0.0f, 1000.0f); @@ -2539,7 +2539,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) if (mode == KNIFE_MIDPOINT) numcuts = 1; BMO_slot_int_set(bmop.slots_in, "cuts", numcuts); - BMO_slot_int_set(bmop.slots_in, "quad_corner_type", SUBD_STRAIGHT_CUT); + BMO_slot_int_set(bmop.slots_in, "quad_corner_type", SUBD_CORNER_STRAIGHT_CUT); BMO_slot_bool_set(bmop.slots_in, "use_single_edge", false); BMO_slot_bool_set(bmop.slots_in, "use_grid_fill", false); diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 1e422806d80..d43fa11cfb9 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -1263,7 +1263,7 @@ static void skin_fix_hole_no_good_verts(BMesh *bm, Frame *frame, BMFace *split_f BMO_op_callf(bm, BMO_FLAG_DEFAULTS, "subdivide_edges edges=%he cuts=%i quad_corner_type=%i", - BM_ELEM_TAG, 1, SUBD_STRAIGHT_CUT); + BM_ELEM_TAG, 1, SUBD_CORNER_STRAIGHT_CUT); } else if (split_face->len > 4) { /* Maintain a dynamic vert array containing the split_face's