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:
authorMartin Poirier <theeth@yahoo.com>2003-11-14 02:04:46 +0300
committerMartin Poirier <theeth@yahoo.com>2003-11-14 02:04:46 +0300
commitbaf23c76486e136c0ae533c741e7e9ee45e64d81 (patch)
treeadd8eb4da14588528b1c394a3d3a6c7c489f5bd8 /source/blender/blenkernel
parent163292f34f0875c467ba72947a0f65585dec4f96 (diff)
Fixed the lag with Follow Path and optimized constraint loops with Track To and Lock Track. I was plainly disabling the refresh of the target, but that caused a lag (3D window, not Render). Now, it raises a flag when it find a loop, so it only disables the refreshing when it needs to.
This is a temporary fix, but a complete fix will require a rewrite of of some part of the where_is_object function, and that would take too much time before 2.31.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/constraint.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 6dbbf0d1697..10e29759347 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -483,6 +483,9 @@ short get_constraint_target (bConstraint *con, short ownertype, void* ownerdata,
data = (bTrackToConstraint*)con->data;
if (data->tar){
+ // Refresh the object if it isn't a constraint loop
+ if (!(con->flag & CONSTRAINT_NOREFRESH))
+ where_is_object_time (data->tar, ctime);
constraint_target_to_mat4(data->tar, data->subtarget, mat, size, ctime);
valid=1;
}
@@ -511,6 +514,10 @@ short get_constraint_target (bConstraint *con, short ownertype, void* ownerdata,
data = (bLockTrackConstraint*)con->data;
if (data->tar){
+ // Refresh the object if it isn't a constraint loop
+ if (!(con->flag & CONSTRAINT_NOREFRESH))
+ where_is_object_time (data->tar, ctime);
+
constraint_target_to_mat4(data->tar, data->subtarget, mat, size, ctime);
valid=1;
}
@@ -528,6 +535,8 @@ short get_constraint_target (bConstraint *con, short ownertype, void* ownerdata,
float q[4], vec[4], dir[3], *quat, x1, totmat[4][4];
float curvetime;
+ where_is_object_time (data->tar, ctime);
+
Mat4One (totmat);
cu= data->tar->data;