[Bf-blender-cvs] [850fda23587] blender2.8: Select similar edge: Granular error message
Dalai Felinto
noreply at git.blender.org
Fri Sep 21 19:47:18 CEST 2018
Commit: 850fda23587d91330889ccef7327f2b50402bdb5
Author: Dalai Felinto
Date: Fri Sep 21 09:35:36 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB850fda23587d91330889ccef7327f2b50402bdb5
Select similar edge: Granular error message
This way we can implement them onw by one
===================================================================
M source/blender/editors/mesh/editmesh_select_similar.c
===================================================================
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");
More information about the Bf-blender-cvs
mailing list