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:
authorAlexander Gavrilov <angavrilov@gmail.com>2016-04-18 18:48:22 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2016-05-06 11:40:19 +0300
commit2a9ddc808de117786c354a2a6b72c68437d18808 (patch)
treeae12548cd93d8dc6657dbb631c101971034ff1ac /source/blender/blenkernel/intern/cloth.c
parentfcfbe27826bf900e8ecc10927b6415edfc316e78 (diff)
Cloth: Change ClothVertex::xrest to actually store the rest position.
Originally the value was only needed when building the springs, so a pointer to the input data was somewhat ok. However, recalculating spring length dynamically requires keeping the actual value around.
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index a133f379c7f..0954ac945b8 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -819,11 +819,11 @@ static int cloth_from_object(Object *ob, ClothModifierData *clmd, DerivedMesh *d
mul_m4_v3(ob->obmat, verts->x);
if ( shapekey_rest ) {
- verts->xrest= shapekey_rest[i];
+ copy_v3_v3(verts->xrest, shapekey_rest[i]);
mul_m4_v3(ob->obmat, verts->xrest);
}
else
- verts->xrest = verts->x;
+ copy_v3_v3(verts->xrest, verts->x);
}
/* no GUI interface yet */