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:
authorTon Roosendaal <ton@blender.org>2004-11-21 13:42:42 +0300
committerTon Roosendaal <ton@blender.org>2004-11-21 13:42:42 +0300
commit0069a4889774d6e6783fb95e0436ee966a3cbf6a (patch)
tree1af3a16d702099c26ff8255cdd00f5ae78ec4269 /source/blender/blenkernel/intern/lattice.c
parentcbb66c68f02ff801ba48b14f485287ca9ff615ae (diff)
Fix for strange (showed in windows only) error that delivered flat curve
deforms by default. Proved to be a [3] array passed on to function needing [4] array. Bad bad... Thanks Ole for finding it! :)
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r--source/blender/blenkernel/intern/lattice.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index b5710565e61..5efbcd832b0 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -411,7 +411,7 @@ static void init_curve_deform(Object *par, Object *ob, CurveDeform *cd)
}
-/* this makes sure we can extend for non-cyclic */
+/* this makes sure we can extend for non-cyclic. *vec needs 4 items! */
static int where_on_path_deform(Object *ob, float ctime, float *vec, float *dir) /* returns OK */
{
Curve *cu= ob->data;
@@ -427,7 +427,8 @@ static int where_on_path_deform(Object *ob, float ctime, float *vec, float *dir)
ctime1= CLAMPIS(ctime, 0.0, 1.0);
}
else ctime1= ctime;
-
+
+ /* vec needs 4 items */
if(where_on_path(ob, ctime1, vec, dir)) {
if(cycl==0) {
@@ -456,7 +457,7 @@ static int where_on_path_deform(Object *ob, float ctime, float *vec, float *dir)
static void calc_curve_deform(Object *par, float *co, short axis, CurveDeform *cd)
{
Curve *cu= par->data;
- float fac, loc[3], dir[3], *quat, mat[3][3], cent[3];
+ float fac, loc[4], dir[3], *quat, mat[3][3], cent[3];
short upflag, index;
if(axis==OB_POSX || axis==OB_NEGX) {