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:
authorSebastian Parborg <darkdefende@gmail.com>2019-09-25 17:45:05 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-09-25 17:47:51 +0300
commit9e62cca29d1858b56329a07993b6ecf4c6be5d4d (patch)
tree272af1e357850d2254cd5dd85ddaf1a8fd46dae9 /source/blender/makesdna
parentb393b135245eada5a508828073d68e442cd631fd (diff)
Fix T69542: Corrective Smooth modifier breaks when drivers are involved
Previously the cache for the modifier would not be invalidated if modifier settings were changed with drivers or keyframes. Now we compare the current setting with the ones used to generate the cache and invalidate the cache if they differ. Reviewed By: Sybren Differential Revision: http://developer.blender.org/D5694
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 5243dc1aecd..cceeb9c71d5 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -1594,6 +1594,19 @@ enum {
MOD_LAPLACIANSMOOTH_NORMALIZED = (1 << 5),
};
+typedef struct CorrectiveSmoothDeltaCache {
+ /* delta's between the original positions and the smoothed positions */
+ float (*deltas)[3];
+ unsigned int totverts;
+
+ /* Value of settings when creating the cache.
+ * These are used to check if the cache should be recomputed. */
+ float lambda;
+ short repeat, flag;
+ char smooth_type, rest_source;
+ char _pad[2];
+} CorrectiveSmoothDeltaCache;
+
typedef struct CorrectiveSmoothModifierData {
ModifierData modifier;
@@ -1612,11 +1625,8 @@ typedef struct CorrectiveSmoothModifierData {
/** MAX_VGROUP_NAME. */
char defgrp_name[64];
- /* runtime-only cache (delta's between),
- * delta's between the original positions and the smoothed positions */
- float (*delta_cache)[3];
- unsigned int delta_cache_num;
- char _pad2[4];
+ /* runtime-only cache */
+ CorrectiveSmoothDeltaCache delta_cache;
} CorrectiveSmoothModifierData;
enum {