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>2010-09-30 14:51:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-30 14:51:36 +0400
commit81b6d308a771405ef326b1e4cebbc3359e830a6c (patch)
tree8485b8abff48cd9d8b84d5e796cb1e17e540c8c6 /source/blender/blenkernel/BKE_modifier.h
parentcca8fce807424b0601064387659c3818de1ae049 (diff)
[#23673] Modifier construction gives correct result in viewport but incorrect in render.
When there are 2+ consecutive deform modifiers, the second modifier was getting incorrect normals, this only showed up for the displace modifier since its the only deform modifier that uses vertex normals. It would have been easy to fix this by always calculating normals on deform modifiers, but slow. To fix this I added a function to check if a deform modifier needs normals, so the normal calculation function only runs if there are 2 modifiers in a row and the second uses normals.
Diffstat (limited to 'source/blender/blenkernel/BKE_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 95a9394427f..51120a61e69 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -245,6 +245,17 @@ typedef struct ModifierTypeInfo {
*/
int (*dependsOnTime)(struct ModifierData *md);
+
+ /* True when a deform modifier uses normals, the requiredDataMask
+ * cant be used here because that refers to a normal layer where as
+ * in this case we need to know if the deform modifier uses normals.
+ *
+ * this is needed because applying 2 deform modifiers will give the
+ * second modifier bogus normals.
+ * */
+ int (*dependsOnNormals)(struct ModifierData *md);
+
+
/* Should call the given walk function on with a pointer to each Object
* pointer that the modifier data stores. This is used for linking on file
* load and for unlinking objects or forwarding object references.