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>2006-11-08 13:51:27 +0300
committerTon Roosendaal <ton@blender.org>2006-11-08 13:51:27 +0300
commit376851268a1db138321f2d1228fa15ac06550a25 (patch)
treef645256c9dd7562b2686c8d4619ae569a08f27d2 /source/blender/blenkernel
parentc6976219fbb73043ced761e211d87084e65985b2 (diff)
- Action Modifier; paths now support Speed curve.
http://download.blender.org/demo/test/2.43/0001_0150_speed.avi By default the Speed maps in the range 0-100 frames, since there's not an actual time relationship here. IMPORTANT: this didn't work before, and default Curve Paths have a speed Ipo, so past saved scenes will work different now! - Speed curve points are now drawn on the 3D path as well. With select info for selected points, if Curve Object is active. - Duplicating Objects with NLA ActionModifiers now also correctly copies object pointers, so a duplicate works as expected.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/lattice.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index d751169d115..813cd428ab5 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -44,6 +44,7 @@
#include "BLI_arithb.h"
#include "DNA_armature_types.h"
+#include "DNA_ipo_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
@@ -61,6 +62,7 @@
#include "BKE_deform.h"
#include "BKE_displist.h"
#include "BKE_global.h"
+#include "BKE_ipo.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
@@ -563,6 +565,13 @@ static float *calc_curve_deform(Object *par, float *co, short axis, CurveDeform
fac= (cd->dloc[index])/(cu->path->totdist) + (co[index]-cd->dmin[index])/(cu->path->totdist);
}
+ /* we want the ipo to work on the default 100 frame range, because there's no
+ actual time involved in path position */
+ if(cu->ipo) {
+ fac*= 100.0f;
+ if(calc_ipo_spec(cu->ipo, CU_SPEED, &fac)==0)
+ fac/= 100.0;
+ }
if( where_on_path_deform(par, fac, loc, dir)) { /* returns OK */
float q[4], mat[3][3];