Timeline Drawing Tweaks:

* Made the TimeLine current frame indicator get drawn using the standard frame-indicator code. Also, it is now possible to show the frame indicator box beside the line as in the other animation editors, although this is disabled in the timeline due to the closeness of the frame number field.

* Removed some old (unnecessary) code
-> "Continue Physics" option in TimeLine, which is now obsolete with the current physics options. Feel free to restore if this is not the case.
-> Already commented out hacks to create "speed ipo" for curves. There are easy alternatives that are better integrated.
-> Unused init/exit callbacks for scrubbing time, since those were only used to set an obsolete flag for timeline drawing that is now used for the indicator.

* Switched long-keyframe optimisation code to use constants instead of some magic numbers + fancy trickery...
This commit is contained in:
2009-12-11 11:18:55 +00:00
parent 7e7e1018ac
commit fba99b627b
7 changed files with 19 additions and 131 deletions

View File

@@ -170,6 +170,9 @@ static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt)
/* ActBeztColumns (Helpers for Long Keyframes) ------------------------------ */
/* maximum size of default buffer for BezTriple columns */
#define MAX_ABK_BUFSIZE 4
/* BezTriple Container Node */
// NOTE: only used internally while building Long Keyframes for now, but may be useful externally?
typedef struct ActBeztColumn {
@@ -187,7 +190,7 @@ typedef struct ActBeztColumn {
short numBezts; /* number of BezTriples on this frame */
float cfra; /* frame that the BezTriples occur on */
BezTriple *bezts[4]; /* buffer of pointers to BezTriples on the same frame */
BezTriple *bezts[MAX_ABK_BUFSIZE]; /* buffer of pointers to BezTriples on the same frame */
//BezTriple **bezts_extra; /* secondary buffer of pointers if need be */
} ActBeztColumn;
@@ -227,9 +230,8 @@ static void nupdate_abk_bezt (void *node, void *data)
BezTriple *bezt= (BezTriple *)data;
/* just add the BezTriple to the buffer if there's space, or allocate a new one */
if (abk->numBezts >= sizeof(abk->bezts)/sizeof(BezTriple)) {
if (abk->numBezts >= MAX_ABK_BUFSIZE) {
// TODO: need to allocate new array to cater...
// FIXME: urgent... is a problem when working with duplicate keyframes
//bezts_extra= MEM_callocN(...);
if(G.f & G_DEBUG)
printf("FIXME: nupdate_abk_bezt() missing case for too many overlapping BezTriples \n");