Time-Slide Fix:

Second attempt at fix for only having a single-key selected. In this
case, it just uses the start/end frame as it's min/max
This commit is contained in:
2011-06-02 11:58:13 +00:00
parent b41427c66b
commit 072d350aab

View File

@@ -3129,18 +3129,15 @@ static void createTransActionData(bContext *C, TransInfo *t)
/* check if we're supposed to be setting minx/maxx for TimeSlide */ /* check if we're supposed to be setting minx/maxx for TimeSlide */
if (t->mode == TFM_TIME_SLIDE) { if (t->mode == TFM_TIME_SLIDE) {
float min=999999999.0f, max=-999999999.0f; float min=999999999.0f, max=-999999999.0f;
int i;
if (count > 1) { td= t->data;
/* search for min/max selected values to transform */ for (i=0; i < count; i++, td++) {
int i; if (min > *(td->val)) min= *(td->val);
if (max < *(td->val)) max= *(td->val);
td= t->data;
for (i=0; i < count; i++, td++) {
if (min > *(td->val)) min= *(td->val);
if (max < *(td->val)) max= *(td->val);
}
} }
else {
if (min == max) {
/* just use the current frame ranges */ /* just use the current frame ranges */
min = (float)PSFRA; min = (float)PSFRA;
max = (float)PEFRA; max = (float)PEFRA;