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
path: root/source
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-27 06:06:36 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-27 06:06:36 +0400
commit765a10a8cdaa09ba7ffb06139c05255948d41518 (patch)
tree31d648a4bbe346cc8ce0a740f8948cfa155c26a4 /source
parent4a0351cba2cdc69222a0a2c4bd5905f448abee2b (diff)
Fix for Freestyle edge/face marks not working with most modifiers (except for Subdivision Surface).
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/customdata.c3
-rw-r--r--source/blender/blenkernel/intern/mesh.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 2118bbcd42b..9fb700183d9 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -1168,7 +1168,8 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
const CustomDataMask CD_MASK_BAREMESH =
- CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE | CD_MASK_MLOOP | CD_MASK_MPOLY | CD_MASK_BWEIGHT;
+ CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE | CD_MASK_MLOOP | CD_MASK_MPOLY | CD_MASK_BWEIGHT |
+ CD_MASK_FREESTYLE_EDGE | CD_MASK_FREESTYLE_FACE;
const CustomDataMask CD_MASK_MESH =
CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE |
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL |
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 408fadde564..4c963969797 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -2636,6 +2636,16 @@ int BKE_mesh_recalc_tessellation(CustomData *fdata,
}
}
+#ifdef WITH_FREESTYLE
+ if (CustomData_has_layer(pdata, CD_FREESTYLE_FACE)) {
+ FreestyleEdge *poly_ffa = CustomData_get_layer(pdata, CD_FREESTYLE_FACE);
+ FreestyleEdge *face_ffa = CustomData_add_layer(fdata, CD_FREESTYLE_FACE, CD_CALLOC, NULL, totface);
+ for (mface_index = 0; mface_index < totface; mface_index++) {
+ face_ffa[mface_index] = poly_ffa[mface_to_poly_map[mface_index]];
+ }
+ }
+#endif
+
mf = mface;
for (mface_index = 0; mface_index < totface; mface_index++, mf++) {