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.
This commit is contained in:
2003-11-13 23:04:46 +00:00
parent 163292f34f
commit baf23c7648
3 changed files with 16 additions and 0 deletions

View File

@@ -501,6 +501,9 @@ static short detect_constraint_loop (Object *owner, const char* substring, int d
// return 1;
}
}
if (typefrom == CONSTRAINT_TYPE_TRACKTO && typefrom == CONSTRAINT_TYPE_LOCKTRACK){
curcon->flag |= CONSTRAINT_NOREFRESH;
}
if (detect_constraint_loop (data->tar, data->subtarget, disable, CONSTRAINT_TYPE_TRACKTO)){
curcon->flag |= CONSTRAINT_DISABLE;
result = 1;
@@ -538,6 +541,9 @@ static short detect_constraint_loop (Object *owner, const char* substring, int d
// return 1;
}
}
if (typefrom == CONSTRAINT_TYPE_TRACKTO && typefrom == CONSTRAINT_TYPE_LOCKTRACK){
curcon->flag |= CONSTRAINT_NOREFRESH;
}
if (detect_constraint_loop (data->tar, data->subtarget, disable, CONSTRAINT_TYPE_LOCKTRACK)){
curcon->flag |= CONSTRAINT_DISABLE;
result = 1;