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-11 18:31:44 +0300
committerTon Roosendaal <ton@blender.org>2004-11-11 18:31:44 +0300
commitd673c4a862ae8c8eaf26b3a939e0da7f335ffbf4 (patch)
treeebb10e9de1bd590d0354d69e8ae5baafc967ec9b
parentc8c149281cb595d435fb81a040a94c68a10fe377 (diff)
1) Bug fix 1776
Lattices seem to have deform lag, when they're animated with Ipos. Found out this behaviour is already from before 2.25... solved with removing a where_is_object() from deform code, but dont fully grasp why. Tested with good demo file, with motion blur too. 2) No functional changes, just made 2 files compile without warnings; - added extra ifdefs __NLA_BLENDCON for unused calls - removed zealot 'const' from function protos and variables, these cannot work there, and hence gave warnings - added void pointer casts for array conversions in matrix code
-rw-r--r--source/blender/blenkernel/BKE_action.h4
-rw-r--r--source/blender/blenkernel/intern/action.c21
-rw-r--r--source/blender/blenkernel/intern/armature.c6
-rw-r--r--source/blender/blenkernel/intern/lattice.c2
4 files changed, 18 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 7407da43543..5b4a0fa6c8e 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -75,7 +75,7 @@ struct bPoseChannel *set_pose_channel(struct bPose *pose,
* Allocate a new pose on the heap, and copy the src pose and it's channels
* into the new pose. *dst is set to the newly allocated structure.
*/
-void copy_pose(struct bPose **dst, const struct bPose *src,
+void copy_pose(struct bPose **dst, struct bPose *src,
int copyconstraints);
/**
@@ -108,7 +108,7 @@ struct bPoseChannel *verify_pose_channel(struct bPose* pose,
* the contents of src into it. If src is NULL NULL is returned.
*/
-struct bAction *copy_action(const struct bAction *src);
+struct bAction *copy_action(struct bAction *src);
/**
* Some kind of bounding box operation on the action.
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 1740fe70247..27611203471 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -71,11 +71,10 @@
#endif
/* Local function prototypes */
+
static void do_pose_constraint_channels(bPose *pose, bAction *act,
float ctime);
-static void get_constraint_influence_from_pose(bPose *dst, bPose *src);
-static void blend_constraints(ListBase *dst, const ListBase *src,
- float srcweight, short mode);
+
static void rest_pose(bPose *pose, int clearflag);
/* Implementation */
@@ -112,6 +111,7 @@ static void rest_pose(bPose *pose, int clearflag)
}
}
+#ifdef __NLA_BLENDCON
static void blend_constraints(ListBase *dst, const ListBase *src,
float srcweight, short mode)
{
@@ -148,12 +148,13 @@ static void blend_constraints(ListBase *dst, const ListBase *src,
}
}
}
+#endif
void blend_poses(bPose *dst, const bPose *src, float srcweight, short mode)
{
bPoseChannel *dchan;
const bPoseChannel *schan;
- float dquat[4], squat[4], mat[3][3];
+ float dquat[4], squat[4]; //, mat[3][3];
float dstweight;
int i;
@@ -343,6 +344,7 @@ void get_pose_from_pose(bPose **pose, const bPose *src)
}
}
+#ifdef __NLA_BLENDCON
static void get_constraint_influence_from_pose(bPose *dst, bPose *src)
{
bConstraint *dcon, *scon;
@@ -360,6 +362,7 @@ static void get_constraint_influence_from_pose(bPose *dst, bPose *src)
}
}
}
+#endif
/* If the pose does not exist, a new one is created */
@@ -719,7 +722,7 @@ void free_action(bAction *act)
BLI_freelistN (&act->chanbase);
}
-bAction* copy_action(const bAction *src)
+bAction* copy_action(bAction *src)
{
bAction *dst = NULL;
bActionChannel *dchan, *schan;
@@ -752,12 +755,12 @@ bPoseChannel *copy_pose_channel(const bPoseChannel* src)
return dst;
}
-void copy_pose(bPose **dst, const bPose *src, int copycon)
+void copy_pose(bPose **dst, bPose *src, int copycon)
{
bPose *outPose;
- const bPose * inPose;
+ bPose * inPose;
bPoseChannel *newChan;
- const bPoseChannel *curChan;
+ bPoseChannel *curChan;
inPose = src;
@@ -777,7 +780,7 @@ void copy_pose(bPose **dst, const bPose *src, int copycon)
memcpy (newChan->loc, curChan->loc, sizeof (curChan->loc));
memcpy (newChan->size, curChan->size, sizeof (curChan->size));
memcpy (newChan->quat, curChan->quat, sizeof (curChan->quat));
- Mat4CpyMat4 (newChan->obmat, curChan->obmat);
+ Mat4CpyMat4 (newChan->obmat, (void *)curChan->obmat);
BLI_addtail (&outPose->chanbase, newChan);
if (copycon){
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index d0ee75df1a3..1f96b48df9b 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1305,7 +1305,7 @@ void solve_posechain (PoseChain *chain)
/* Retrieve the delta rotation from the solver */
Mat4One(M_basischange);
- Mat4CpyMat3(M_basischange, chain->solver->segments[i].basis_change);
+ Mat4CpyMat3(M_basischange, (void *)chain->solver->segments[i].basis_change); //basis_change = array[9]
/**
@@ -1440,8 +1440,8 @@ PoseChain *ik_chain_to_posechain (Object *ob, Bone *bone)
Mat4MulMat4(M_basismat, R_bonemat, iR_parmat);
/* Copy the matrix into the basis and transpose */
- Mat3CpyMat4(segs[icurseg].basis, M_basismat);
- Mat3Transp(segs[icurseg].basis);
+ Mat3CpyMat4((void *)segs[icurseg].basis, M_basismat); // basis = array[9]
+ Mat3Transp((void *)segs[icurseg].basis);
/* Fill out the IK segment */
segs[icurseg].length = get_bone_length(curBone);
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 074bd8f561b..b5710565e61 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -243,7 +243,7 @@ void init_latt_deform(Object *oblatt, Object *ob)
lattice_modifier(oblatt, 's');
bp= deformLatt->def;
- if(ob) where_is_object(ob);
+ //if(ob) where_is_object(ob); causes lag here, but why! (ton)
/* for example with a particle system: ob==0 */
if(ob==0) {