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:
authorCampbell Barton <ideasman42@gmail.com>2013-07-06 05:42:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-06 05:42:45 +0400
commite43f25757b22be602f55559c1e62786e2cf647e9 (patch)
treeb37b0faa4eeaccc05b519faf33524fa0f20f259e /source/blender/blenkernel
parentfe865b84292fb4aaa2a5ce8566b17a14ffa606f9 (diff)
only make dynamic paint tag normals as dirty if it moves vertices.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 9d1c0e40d54..a668c6a6d7b 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1698,7 +1698,7 @@ static DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
if (pmd->canvas && !(pmd->canvas->flags & MOD_DPAINT_BAKING)) {
DynamicPaintSurface *surface;
- int update_normals = 0;
+ bool update_normals = false;
/* loop through surfaces */
for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) {
@@ -1881,19 +1881,21 @@ static DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
normal_short_to_float_v3(normal, mvert[i].no);
madd_v3_v3fl(mvert[i].co, normal, wPoint[i].height);
}
- update_normals = 1;
+ update_normals = true;
}
/* displace */
if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) {
dynamicPaint_applySurfaceDisplace(surface, result);
- update_normals = 1;
+ update_normals = true;
}
}
}
}
- result->dirty |= DM_DIRTY_NORMALS;
+ if (update_normals) {
+ result->dirty |= DM_DIRTY_NORMALS;
+ }
}
/* make a copy of dm to use as brush data */
if (pmd->brush) {