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>2010-02-14 02:18:28 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-14 02:18:28 +0300
commitd0d47c70a924554667b35ceaea9e009f19980c69 (patch)
treef0151d14f4a54d955bccab9bbd149178a9af5d73 /source/blender/makesdna/DNA_cloth_types.h
parentce26d457baa36f34d84ccd64470d927f303286ff (diff)
Avoid a DNA parsing bug that would parse "float gravity [3];" as two
struct members "gravity" and "[3]". Now it throws an error in this case, safer than trying to fix the parsing code. Also patches the old DNA of ClothSimSettings which had this problem .. very ugly code. Fixes #20330: cloth sim settings getting corrupted when read from 2.49.
Diffstat (limited to 'source/blender/makesdna/DNA_cloth_types.h')
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index 777c2ec8747..06ace29dbfe 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -47,10 +47,7 @@ typedef struct ClothSimSettings
float mingoal; /* see SB */
float Cdis; /* Mechanical damping of springs. */
float Cvi; /* Viscous/fluid damping. */
- /* XXX the extra space here results in wrong DNA parsing,
- * and reconstruct fails and gives corrupt settings when
- * removing it because the old dna is wrong ... */
- float gravity [3]; /* Gravity/external force vector. */
+ float gravity[3]; /* Gravity/external force vector. */
float dt; /* This is the duration of our time step, computed. */
float mass; /* The mass of the entire cloth. */
float structural; /* Structural spring stiffness. */
@@ -79,6 +76,7 @@ typedef struct ClothSimSettings
short vgroup_struct; /* vertex group for scaling structural stiffness */
short presets; /* used for presets on GUI */
short reset;
+ int pad;
struct EffectorWeights *effector_weights;
} ClothSimSettings;