Bugfix: Units for time translate transforms (action/nla editors) was messed up

When autosnap mode was nearest frame or nearest marker, this was incorrectly
converting the units to seconds, making this display unusable for anything.
This commit is contained in:
Joshua Leung 2014-06-16 21:44:08 +12:00 committed by Sergey Sharybin
parent 6d11896841
commit a19c1be157
Notes: blender-bot 2023-02-14 13:47:32 +01:00
Referenced by issue #41964, 2.72 Freestyle renders two times longer on Linux
Referenced by issue #40806, Link material to object without any does not work
Referenced by issue #40807, Cycles volume preview (or render) crashes Blender
Referenced by issue #40784, Rigging with ALT B Doesnt let you select
Referenced by issue #40758, Sculpting : Front faces only option doesnt seem to work.
Referenced by issue #40746, limit rotation constraint resets after 180ø
Referenced by issue #40747, Driver evaluates to wrong value.
Referenced by issue #40749, Crashes on Toggle Fullscreen
Referenced by issue #40751, Bake preview missing (UV/Image Editor)
Referenced by issue #40723, undo broken in node editor
Referenced by issue #40700, Tab to change edit-mode not working after switching to different screen-layout.
Referenced by issue #40709, Cycles Baking result does not show up
Referenced by issue #40682, BGE local space character movement is funky when add is checked
Referenced by issue #40683, noncube meshes bounces when rotated
Referenced by issue #40684, Triangle mesh BGE character mode crash
Referenced by issue #30976, Thumbnail previews not showing in OS or Blender File Browser
1 changed files with 6 additions and 2 deletions

View File

@ -7342,13 +7342,17 @@ static void headerTimeTranslate(TransInfo *t, char str[MAX_INFO_LEN])
/* second step */
val = floorf((double)val / secf + 0.5);
}
else {
/* nearest frame/second/marker */
else if (autosnap == SACTSNAP_SECOND) {
/* nearest second */
val = (float)((double)val / secf);
}
if (autosnap == SACTSNAP_FRAME)
BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%d.00 (%.4f)", (int)val, val);
else if (autosnap == SACTSNAP_SECOND)
BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%d.00 sec (%.4f)", (int)val, val);
else if (autosnap == SACTSNAP_TSTEP)
BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%.4f sec", val);
else
BLI_snprintf(&tvec[0], NUM_STR_REP_LEN, "%.4f", val);
}