[Bf-blender-cvs] [7dfb221aca1] soc-2019-npr: LANPR: Remove freestyle #ifdef's.
YimingWu
noreply at git.blender.org
Fri Jul 19 10:26:37 CEST 2019
Commit: 7dfb221aca1c4ca5ab983c786a5febe7a4ce1f3f
Author: YimingWu
Date: Fri Jul 19 10:17:26 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rB7dfb221aca1c4ca5ab983c786a5febe7a4ce1f3f
LANPR: Remove freestyle #ifdef's.
===================================================================
M source/blender/draw/intern/draw_cache_impl_mesh.c
M source/blender/editors/mesh/editmesh_path.c
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 306031809d1..d677e6ac80d 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -271,10 +271,8 @@ typedef struct MeshRenderData {
int bweight;
int *uv;
int *vcol;
-#ifdef WITH_FREESTYLE
int freestyle_edge;
int freestyle_face;
-#endif
} offset;
struct {
@@ -721,10 +719,9 @@ static MeshRenderData *mesh_render_data_create_ex(Mesh *me,
rdata->cd.offset.crease = CustomData_get_offset(&bm->edata, CD_CREASE);
rdata->cd.offset.bweight = CustomData_get_offset(&bm->edata, CD_BWEIGHT);
-#ifdef WITH_FREESTYLE
rdata->cd.offset.freestyle_edge = CustomData_get_offset(&bm->edata, CD_FREESTYLE_EDGE);
rdata->cd.offset.freestyle_face = CustomData_get_offset(&bm->pdata, CD_FREESTYLE_FACE);
-#endif
+
}
if (types & (MR_DATATYPE_DVERT)) {
bm_ensure_types |= BM_VERT;
diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c
index 6fd0ee83b6c..e1a20e03660 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -28,9 +28,9 @@
#include "DNA_mesh_types.h"
#include "DNA_windowmanager_types.h"
-#ifdef WITH_FREESTYLE
-# include "DNA_meshdata_types.h"
-#endif
+// for freestyle edge mark.
+#include "DNA_meshdata_types.h"
+
#include "BLI_math.h"
#include "BLI_linklist.h"
@@ -302,12 +302,10 @@ static bool edgetag_test_cb(BMEdge *e, void *user_data_v)
return BM_elem_float_data_get(&bm->edata, e, CD_CREASE) ? true : false;
case EDGE_MODE_TAG_BEVEL:
return BM_elem_float_data_get(&bm->edata, e, CD_BWEIGHT) ? true : false;
-#ifdef WITH_FREESTYLE
case EDGE_MODE_TAG_FREESTYLE: {
FreestyleEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE);
return (!fed) ? false : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false;
}
-#endif
}
return 0;
}
@@ -333,7 +331,6 @@ static void edgetag_set_cb(BMEdge *e, bool val, void *user_data_v)
case EDGE_MODE_TAG_BEVEL:
BM_elem_float_data_set(&bm->edata, e, CD_BWEIGHT, (val) ? 1.0f : 0.0f);
break;
-#ifdef WITH_FREESTYLE
case EDGE_MODE_TAG_FREESTYLE: {
FreestyleEdge *fed;
fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE);
@@ -345,7 +342,6 @@ static void edgetag_set_cb(BMEdge *e, bool val, void *user_data_v)
}
break;
}
-#endif
}
}
@@ -360,13 +356,11 @@ static void edgetag_ensure_cd_flag(Mesh *me, const char edge_mode)
case EDGE_MODE_TAG_BEVEL:
BM_mesh_cd_flag_ensure(bm, me, ME_CDFLAG_EDGE_BWEIGHT);
break;
-#ifdef WITH_FREESTYLE
case EDGE_MODE_TAG_FREESTYLE:
if (!CustomData_has_layer(&bm->edata, CD_FREESTYLE_EDGE)) {
BM_data_layer_add(bm, &bm->edata, CD_FREESTYLE_EDGE);
}
break;
-#endif
default:
break;
}
More information about the Bf-blender-cvs
mailing list