[Bf-blender-cvs] [502dbcf4041] blender2.8: Select Similar: Cleanup - WITH_FREESYTLE

Dalai Felinto noreply at git.blender.org
Fri Sep 21 21:32:47 CEST 2018


Commit: 502dbcf4041843ac06f4ce689b5a061753a25566
Author: Dalai Felinto
Date:   Fri Sep 21 16:32:24 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB502dbcf4041843ac06f4ce689b5a061753a25566

Select Similar: Cleanup - WITH_FREESYTLE

===================================================================

M	source/blender/bmesh/intern/bmesh_operators.h
M	source/blender/editors/mesh/editmesh_select_similar.c

===================================================================

diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index 6d518545967..d8f995b9d3e 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -84,9 +84,7 @@ enum {
 	SIMFACE_COPLANAR,
 	SIMFACE_SMOOTH,
 	SIMFACE_FACEMAP,
-#ifdef WITH_FREESTYLE
 	SIMFACE_FREESTYLE
-#endif
 };
 
 /* similar edge selection slot values */
@@ -99,9 +97,7 @@ enum {
 	SIMEDGE_BEVEL,
 	SIMEDGE_SEAM,
 	SIMEDGE_SHARP,
-#ifdef WITH_FREESTYLE
 	SIMEDGE_FREESTYLE
-#endif
 };
 
 /* similar vertex selection slot values */
diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c
index ee21262fb01..b36d9a07fb4 100644
--- a/source/blender/editors/mesh/editmesh_select_similar.c
+++ b/source/blender/editors/mesh/editmesh_select_similar.c
@@ -346,14 +346,12 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 			continue;
 		}
 
-#ifdef WITH_FREESTYLE
 		if (type == SIMEDGE_FREESTYLE) {
 			if (!CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) {
 				edge_data_value |= SIMEDGE_DATA_FALSE;
 				continue;
 			}
 		}
-#endif
 
 		BMEdge *edge; /* Mesh edge. */
 		BMIter iter; /* Selected edges iterator. */
@@ -397,7 +395,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 							goto selectall;
 						}
 						break;
-#ifdef WITH_FREESTYLE
 					case SIMEDGE_FREESTYLE:
 					{
 						FreestyleEdge *fedge;
@@ -413,15 +410,12 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 						}
 						break;
 					}
-#endif
 				}
 			}
 		}
 	}
 
-#ifdef WITH_FREESTYLE
 	BLI_assert((type != SIMEDGE_FREESTYLE) || (edge_data_value != SIMEDGE_DATA_NONE));
-#endif
 
 	if (tree != NULL) {
 		BLI_kdtree_balance(tree);
@@ -433,7 +427,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 		BMesh *bm = em->bm;
 		bool changed = false;
 
-#ifdef WITH_FREESTYLE
 		bool has_freestyle_layer;
 		if (type == SIMEDGE_FREESTYLE) {
 			has_freestyle_layer = CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE);
@@ -441,7 +434,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 				continue;
 			}
 		}
-#endif
 
 		BMEdge *edge; /* Mesh edge. */
 		BMIter iter; /* Selected edges iterator. */
@@ -513,7 +505,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 							select = true;
 						}
 						break;
-#ifdef WITH_FREESTYLE
 					case SIMEDGE_FREESTYLE:
 					{
 						FreestyleEdge *fedge;
@@ -532,7 +523,6 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 						}
 						break;
 					}
-#endif
 				}
 
 				if (select) {
@@ -552,10 +542,9 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
 selectall:
 		BLI_assert(ELEM(type,
 		                SIMEDGE_SEAM,
-#ifdef WITH_FREESTYLE
-		                SIMEDGE_FREESTYLE,
-#endif
-		                SIMEDGE_SHARP));
+		                SIMEDGE_SHARP,
+		                SIMEDGE_FREESTYLE
+		                ));
 
 		for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
 			Object *ob = objects[ob_index];



More information about the Bf-blender-cvs mailing list