diff options
author | YimingWu <xp8110@outlook.com> | 2019-05-06 05:09:12 +0300 |
---|---|---|
committer | YimingWu <xp8110@outlook.com> | 2019-05-06 05:09:12 +0300 |
commit | 2753611c4e2482885021416f1b2af46250fd09dd (patch) | |
tree | 47df66cf547affa1d388c3b154d5f5817af59819 /source/blender/editors/mesh | |
parent | fbb5edf974f87894baa2cfd1a36878d5dce5be01 (diff) | |
parent | 90f8f5cb06efc3255257b1fcb0811dfab76cc146 (diff) |
Merge branch 'master' into soc-2018-npr
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editface.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_extrude.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_path.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 26 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 28 |
12 files changed, 45 insertions, 39 deletions
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index e67d63b01a5..57bf67e825e 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -21,8 +21,8 @@ set(INC ../../blenkernel ../../blenlib ../../blentranslation - ../../depsgraph ../../bmesh + ../../depsgraph ../../gpu ../../imbuf ../../makesdna @@ -30,8 +30,8 @@ set(INC ../../render/extern/include ../../windowmanager ../../../../intern/clog - ../../../../intern/guardedalloc ../../../../intern/glew-mx + ../../../../intern/guardedalloc ) set(INC_SYS diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 28b697531ab..990250792a1 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -121,7 +121,7 @@ void paintface_flush_flags(struct bContext *C, Object *ob, short flag) BKE_mesh_batch_cache_dirty_tag(me_eval, BKE_MESH_BATCH_DIRTY_ALL); } else { - BKE_mesh_batch_cache_dirty_tag(me_eval, BKE_MESH_BATCH_DIRTY_SELECT); + BKE_mesh_batch_cache_dirty_tag(me_eval, BKE_MESH_BATCH_DIRTY_SELECT_PAINT); } DEG_id_tag_update(ob->data, ID_RECALC_SELECT); diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 815f51a4772..a7d1e54ad59 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -490,8 +490,8 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - /* Note that if you use MESH_ADD_VERTS_MAXI for both x and y at the same time you will still reach - * impossible values (10^12 vertices or so...). */ + /* Note that if you use MESH_ADD_VERTS_MAXI for both x and y at the same time + * you will still reach impossible values (10^12 vertices or so...). */ RNA_def_int( ot->srna, "x_subdivisions", 10, 2, MESH_ADD_VERTS_MAXI, "X Subdivisions", "", 2, 1000); RNA_def_int( diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index f6940cae953..f5810d9ff61 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -907,7 +907,7 @@ void MESH_OT_bevel(wmOperatorType *ot) /* identifiers */ ot->name = "Bevel"; - ot->description = "Edge Bevel"; + ot->description = "Cut into selected items at an angle to create flat or rounded bevel or chamfer"; ot->idname = "MESH_OT_bevel"; /* api callbacks */ diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index 9314b96afee..82cff8363f8 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -440,7 +440,7 @@ void MESH_OT_extrude_region(wmOperatorType *ot) ot->description = "Extrude region of faces"; /* api callbacks */ - //ot->invoke = mesh_extrude_region_invoke; + // ot->invoke = mesh_extrude_region_invoke; ot->exec = edbm_extrude_region_exec; ot->poll = ED_operator_editmesh; diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c index 85be7d902ad..269ead7b23f 100644 --- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c +++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c @@ -1018,7 +1018,8 @@ static void gizmo_mesh_spin_redo_draw_prepare(const bContext *UNUSED(C), wmGizmo ggd->data.op = WM_operator_last_redo((bContext *)ggd->data.context); } - /* Not essential, just avoids feedback loop where matrices could shift because of float precision. + /* Not essential, just avoids feedback loop where matrices + * could shift because of float precision. * Updates in this case are also redundant. */ bool is_modal = false; for (wmGizmo *gz = gzgroup->gizmos.first; gz; gz = gz->next) { diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index cd5281e1273..cc0c2f5bbe4 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -157,7 +157,7 @@ typedef struct KnifeTool_OpData { void *draw_handle; /* for drawing preview loop */ ViewContext vc; /* note: _don't_ use 'mval', instead use the one we define below */ float mval[2]; /* mouse value with snapping applied */ - //bContext *C; + // bContext *C; Scene *scene; Object *ob; diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c index 062008cd656..f8ec4334427 100644 --- a/source/blender/editors/mesh/editmesh_path.c +++ b/source/blender/editors/mesh/editmesh_path.c @@ -434,12 +434,12 @@ static bool facetag_filter_cb(BMFace *f, void *UNUSED(user_data_v)) { return !BM_elem_flag_test(f, BM_ELEM_HIDDEN); } -//static bool facetag_test_cb(Scene *UNUSED(scene), BMesh *UNUSED(bm), BMFace *f) +// static bool facetag_test_cb(Scene *UNUSED(scene), BMesh *UNUSED(bm), BMFace *f) static bool facetag_test_cb(BMFace *f, void *UNUSED(user_data_v)) { return BM_elem_flag_test_bool(f, BM_ELEM_SELECT); } -//static void facetag_set_cb(BMesh *bm, Scene *UNUSED(scene), BMFace *f, const bool val) +// static void facetag_set_cb(BMesh *bm, Scene *UNUSED(scene), BMFace *f, const bool val) static void facetag_set_cb(BMFace *f, bool val, void *user_data_v) { struct UserData *user_data = user_data_v; diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index a39944fc145..ffdb434405e 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -939,8 +939,8 @@ static int edbm_rip_invoke__edge(bContext *C, const wmEvent *event, Object *obed l_b; l = BM_loop_other_edge_loop(l, v); - /* important edge is manifold else we can be attempting to split off a fan that don't budge, - * not crashing but adds duplicate edge. */ + /* Important edge is manifold else we can be attempting to split off + * a fan that don't budge, not crashing but adds duplicate edge. */ if (BM_edge_is_manifold(l->e)) { l = l->radial_next; diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index d81de37add3..9df03a81762 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -462,7 +462,8 @@ static void findnearestvert__doClosest(void *userData, * * \param r_dist: (in/out), minimal distance to the nearest and at the end, actual distance * \param use_select_bias: - * - When true, selected vertices are given a 5 pixel bias to make them further than unselect verts. + * - When true, selected vertices are given a 5 pixel bias + * to make them further than unselect verts. * - When false, unselected vertices are given the bias. * \param use_cycle: Cycle over elements within #FIND_NEAR_CYCLE_THRESHOLD_MIN in order of index. */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 701d7f15abc..2181bf01583 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -336,6 +336,7 @@ void MESH_OT_subdivide_edgering(wmOperatorType *ot) { /* identifiers */ ot->name = "Subdivide Edge-Ring"; + ot->description = "Subdivide perpendicular edges to the selected edge ring"; ot->idname = "MESH_OT_subdivide_edgering"; /* api callbacks */ @@ -2209,7 +2210,7 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) void MESH_OT_normals_make_consistent(wmOperatorType *ot) { /* identifiers */ - ot->name = "Make Normals Consistent"; + ot->name = "Recalculate Normals"; ot->description = "Make face and vertex normals point either outside or inside the mesh"; ot->idname = "MESH_OT_normals_make_consistent"; @@ -2774,7 +2775,7 @@ void MESH_OT_uvs_reverse(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around"); + // RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around"); } void MESH_OT_colors_rotate(wmOperatorType *ot) @@ -2810,7 +2811,9 @@ void MESH_OT_colors_reverse(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around"); +#if 0 + RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around"); +#endif } /** \} */ @@ -3167,8 +3170,8 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) void MESH_OT_remove_doubles(wmOperatorType *ot) { /* identifiers */ - ot->name = "Remove Doubles"; - ot->description = "Remove duplicate vertices"; + ot->name = "Merge by Distance"; + ot->description = "Merge vertices based on their proximity"; ot->idname = "MESH_OT_remove_doubles"; /* api callbacks */ @@ -3571,7 +3574,7 @@ static float bm_edge_seg_isect(const float sco_a[2], float threshold = 0.0; int i; - //threshold = 0.000001; /* tolerance for vertex intersection */ + // threshold = 0.000001; /* tolerance for vertex intersection */ // XXX threshold = scene->toolsettings->select_thresh / 100; /* Get screen coords of verts */ @@ -3713,7 +3716,7 @@ static float bm_edge_seg_isect(const float sco_a[2], else { perc = (yi - y21) / (y22 - y21); /* lower slope more accurate */ } - //isect = 32768.0 * (perc + 0.0000153); /* Percentage in 1 / 32768ths */ + // isect = 32768.0 * (perc + 0.0000153); /* Percentage in 1 / 32768ths */ break; } @@ -6791,7 +6794,7 @@ void MESH_OT_bridge_edge_loops(wmOperatorType *ot) /* identifiers */ ot->name = "Bridge Edge Loops"; - ot->description = "Make faces between two or more edge loops"; + ot->description = "Create a bridge of faces between two or more selected edge loops"; ot->idname = "MESH_OT_bridge_edge_loops"; /* api callbacks */ @@ -7010,7 +7013,8 @@ void MESH_OT_offset_edge_loops(wmOperatorType *ot) ot->exec = edbm_offset_edgeloop_exec; ot->poll = ED_operator_editmesh; - /* Keep internal, since this is only meant to be accessed via 'MESH_OT_offset_edge_loops_slide' */ + /* Keep internal, since this is only meant to be accessed via + * 'MESH_OT_offset_edge_loops_slide'. */ /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; @@ -8925,7 +8929,7 @@ static int edbm_smoothen_normals_exec(bContext *C, wmOperator *op) void MESH_OT_smoothen_normals(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Smoothen Normals"; + ot->name = "Smooth Normals Vectors"; ot->description = "Smoothen custom normals based on adjacent vertex normals"; ot->idname = "MESH_OT_smoothen_normals"; @@ -9002,7 +9006,7 @@ static int edbm_mod_weighted_strength_exec(bContext *C, wmOperator *op) void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Face Strength"; + ot->name = "Face Normals Strength"; ot->description = "Set/Get strength of face (used in Weighted Normal modifier)"; ot->idname = "MESH_OT_mod_weighted_strength"; diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 275bbf36198..2a950677f13 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -242,7 +242,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_duplicate"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_rip_move", @@ -251,7 +251,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_rip"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_rip_edge_move", @@ -260,7 +260,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_rip_edge"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", @@ -269,34 +269,34 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_extrude_context_move", "Extrude Region and Move", - "Extrude context and move result", + "Extrude region together along the average normal", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_context"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_extrude_region_shrink_fatten", "Extrude Region and Shrink/Fatten", - "Extrude along normals and move result", + "Extrude region together along local normals", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", - "Extrude faces and move result", + "Extrude each individual face separately along local normals", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", @@ -305,7 +305,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", @@ -314,7 +314,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_polybuild_face_at_cursor_move", @@ -323,7 +323,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_polybuild_face_at_cursor"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("MESH_OT_polybuild_split_at_cursor_move", @@ -332,7 +332,7 @@ void ED_operatormacros_mesh(void) OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MESH_OT_polybuild_split_at_cursor"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_enum_set(otmacro->ptr, "proportional", 0); + RNA_boolean_set(otmacro->ptr, "use_proportional_edit", false); RNA_boolean_set(otmacro->ptr, "mirror", false); } |