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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-21 19:56:05 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-21 19:58:05 +0400
commitea753710bf81560ebf0d7c7639e69758246a5076 (patch)
tree08d0fbdb20b529fb70e27a794a22f63e85b4eee5 /source/blender/blenkernel/intern/DerivedMesh.c
parent5ce2edfc6f731be548bb0c4cc04481761f7ece3d (diff)
Fix another shading issue with new split normals (deform modifier after a subsurf one).
Just always tag tessellated CDlayers as dirty when we recompute split normals! Also simplified a bit end of mesh_calc_modifiers.
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index c35efc85a91..10d6ec8b5af 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -402,6 +402,7 @@ void DM_ensure_normals(DerivedMesh *dm)
static void DM_calc_loop_normals(DerivedMesh *dm, float split_angle)
{
dm->calcLoopNormals(dm, split_angle);
+ dm->dirty |= DM_DIRTY_TESS_CDLAYERS;
}
/* note: until all modifiers can take MPoly's as input,
@@ -1877,18 +1878,9 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
if (do_loop_normals) {
/* Compute loop normals (note: will compute poly and vert normals as well, if needed!) */
DM_calc_loop_normals(finaldm, loop_normals_split_angle);
-
- if (finaldm->getNumTessFaces(finaldm) == 0) {
- finaldm->recalcTessellation(finaldm);
- }
- /* Even if tessellation is not needed, we have for sure modified loop normals layer! */
- else {
- /* A tessellation already exists, it should always have a CD_ORIGINDEX. */
- BLI_assert(CustomData_has_layer(&finaldm->faceData, CD_ORIGINDEX));
- DM_update_tessface_data(finaldm);
- }
}
- else {
+
+ {
/* calculating normals can re-calculate tessfaces in some cases */
#if 0
int num_tessface = finaldm->getNumTessFaces(finaldm);