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:
authorDalai Felinto <dfelinto@gmail.com>2018-09-21 15:35:36 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-09-21 20:46:50 +0300
commit850fda23587d91330889ccef7327f2b50402bdb5 (patch)
tree4eba7316974745fcbf2d8eb338b1cfe140e288d3 /source/blender/editors/mesh/editmesh_select_similar.c
parent0edb2b8de91647b8cca25ccdb0cba7816f5376d4 (diff)
Select similar edge: Granular error message
This way we can implement them onw by one
Diffstat (limited to 'source/blender/editors/mesh/editmesh_select_similar.c')
-rw-r--r--source/blender/editors/mesh/editmesh_select_similar.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c
index 33b704fce73..d0e21b6f3df 100644
--- a/source/blender/editors/mesh/editmesh_select_similar.c
+++ b/source/blender/editors/mesh/editmesh_select_similar.c
@@ -181,16 +181,31 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
/* wrap the above function but do selection flushing edge to face */
static int similar_edge_select_exec(bContext *C, wmOperator *op)
{
- /* TODO (dfelinto) port the edge modes to multi-object. */
- BKE_report(op->reports, RPT_ERROR, "Select similar not supported for edges at the moment");
- return OPERATOR_CANCELLED;
+ const int type = RNA_enum_get(op->ptr, "type");
+
+ if (ELEM(type,
+ SIMEDGE_LENGTH,
+ SIMEDGE_DIR,
+ SIMEDGE_FACE,
+ SIMEDGE_FACE_ANGLE,
+ SIMEDGE_CREASE,
+ SIMEDGE_BEVEL,
+ SIMEDGE_SEAM,
+#ifdef WITH_FREESTYLE
+ SIMEDGE_FREESTYLE,
+#endif
+ SIMEDGE_SHARP))
+ {
+ /* TODO (dfelinto) port the edge modes to multi-object. */
+ BKE_report(op->reports, RPT_ERROR, "Select similar edge mode not supported at the moment");
+ return OPERATOR_CANCELLED;
+ }
Object *ob = CTX_data_edit_object(C);
BMEditMesh *em = BKE_editmesh_from_object(ob);
BMOperator bmop;
/* get the type from RNA */
- const int type = RNA_enum_get(op->ptr, "type");
const float thresh = RNA_float_get(op->ptr, "threshold");
const int compare = RNA_enum_get(op->ptr, "compare");