diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-17 13:57:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-17 13:57:49 +0300 |
commit | 7f8a24b614450a05a4b1df80080a19001a851873 (patch) | |
tree | 74396cf4c036a3b404423bf753881073b461c830 /source | |
parent | cf26cdd508c41442b43b95e39c21871e27183c0f (diff) |
select linked enables seam limit when in face mode and the "limit" property is not set (like in 2.4x)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_mods.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c index 93bfdb37581..a0df4cb1211 100644 --- a/source/blender/editors/mesh/editmesh_mods.c +++ b/source/blender/editors/mesh/editmesh_mods.c @@ -2400,6 +2400,15 @@ static int select_linked_limited_invoke(ViewContext *vc, short all, short sel) #undef is_face_tag #undef face_tag +static void linked_limit_default(bContext *C, wmOperator *op) { + if(!RNA_property_is_set(op->ptr, "limit")) { + Object *obedit= CTX_data_edit_object(C); + EditMesh *em= BKE_mesh_get_editmesh(obedit->data); + if(em->selectmode == SCE_SELECT_FACE) + RNA_boolean_set(op->ptr, "limit", TRUE); + } +} + static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) { Object *obedit= CTX_data_edit_object(C); @@ -2409,8 +2418,12 @@ static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event EditFace *efa; short done=1, toggle=0; int sel= !RNA_boolean_get(op->ptr, "deselect"); - int limit= RNA_boolean_get(op->ptr, "limit"); + int limit; + linked_limit_default(C, op); + + limit = RNA_boolean_get(op->ptr, "limit"); + /* unified_finednearest needs ogl */ view3d_operator_needs_opengl(C); @@ -2571,6 +2584,12 @@ static int select_linked_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } +static int select_linked_invoke(bContext *C, wmOperator *op, wmEvent *event) +{ + linked_limit_default(C, op); + return select_linked_exec(C, op); +} + void MESH_OT_select_linked(wmOperatorType *ot) { /* identifiers */ @@ -2580,6 +2599,7 @@ void MESH_OT_select_linked(wmOperatorType *ot) /* api callbacks */ ot->exec= select_linked_exec; + ot->invoke= select_linked_invoke; ot->poll= ED_operator_editmesh; /* flags */ |