diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-06-16 13:44:08 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-06-16 13:48:24 +0400 |
commit | a19c1be1578f25033cbe2fb5ba7ecb0f2d46dc8e (patch) | |
tree | 5eb6e4257ba81b42647dd48793a8c774860094ac | |
parent | 6d118968415866922d696bf8804659bbdad755dd (diff) |
Bugfix: Units for time translate transforms (action/nla editors) was messed upv2.71-rc2
When autosnap mode was nearest frame or nearest marker, this was incorrectly
converting the units to seconds, making this display unusable for anything.
-rw-r--r-- | source/blender/editors/transform/transform.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 899f1191e33..48497eab40f 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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); } |