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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-02 18:42:05 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-02 18:42:05 +0400
commit4a4f091155e7fb1c7eba0988c815b41665e045b6 (patch)
tree3e3f3ffb6b4935a13efd763f3d6de2e387c725f2 /source/blender/blenkernel/intern/DerivedMesh.c
parent4a8663d66e4d82b7a8b9a3f6155c6367b694e08c (diff)
Fix #35174: dynamic paint displacement missing in render.
A previous bugfix disabled the dynamic paint modifier for orco texture coordinate evaluation of the modifier stack. However the MOD_APPLY_USECACHE flag is not a good way to check if the modifier is evaluated for orcos. Instead I've added a MOD_APPLY_ORCO flag. Also removed a bunch of applyModifierEM callbacks, none of them served a purpose except for the subsurf modifier.
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index e188a7b403b..ebe032ad827 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1692,7 +1692,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
DM_set_only_copy(orcodm, nextmask | CD_MASK_ORIGINDEX |
(mti->requiredDataMask ?
mti->requiredDataMask(ob, md) : 0));
- ndm = mti->applyModifier(md, ob, orcodm, app_flags & ~MOD_APPLY_USECACHE);
+ ndm = mti->applyModifier(md, ob, orcodm, (app_flags & ~MOD_APPLY_USECACHE) | MOD_APPLY_ORCO);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -1708,7 +1708,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
nextmask &= ~CD_MASK_CLOTH_ORCO;
DM_set_only_copy(clothorcodm, nextmask | CD_MASK_ORIGINDEX);
- ndm = mti->applyModifier(md, ob, clothorcodm, app_flags & ~MOD_APPLY_USECACHE);
+ ndm = mti->applyModifier(md, ob, clothorcodm, (app_flags & ~MOD_APPLY_USECACHE) | MOD_APPLY_ORCO);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -2031,9 +2031,9 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
DM_set_only_copy(orcodm, mask | CD_MASK_ORIGINDEX);
if (mti->applyModifierEM)
- ndm = mti->applyModifierEM(md, ob, em, orcodm);
+ ndm = mti->applyModifierEM(md, ob, em, orcodm, MOD_APPLY_ORCO);
else
- ndm = mti->applyModifier(md, ob, orcodm, 0);
+ ndm = mti->applyModifier(md, ob, orcodm, MOD_APPLY_ORCO);
if (ndm) {
/* if the modifier returned a new dm, release the old one */
@@ -2055,9 +2055,9 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
}
if (mti->applyModifierEM)
- ndm = mti->applyModifierEM(md, ob, em, dm);
+ ndm = mti->applyModifierEM(md, ob, em, dm, MOD_APPLY_USECACHE);
else
- ndm = mti->applyModifier(md, ob, dm, 0);
+ ndm = mti->applyModifier(md, ob, dm, MOD_APPLY_USECACHE);
if (ndm) {
if (dm && dm != ndm)