diff options
author | Jacques Lucke <mail@jlucke.com> | 2018-12-14 17:34:44 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2018-12-14 17:34:48 +0300 |
commit | 233b7806354f27a52fb1aee672c7c58149d0b4a4 (patch) | |
tree | 9dbd34d9a85f60716d59e9ebe548ad71986f514a | |
parent | e67f7e922cfe6742753944fa1bf4ace358b382a7 (diff) |
UI: show frame rate in movie clip editor
Feature Request from Hjialti.
-rw-r--r-- | source/blender/editors/space_clip/clip_buttons.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index a106ab5c465..79e632ce1c1 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -534,6 +534,12 @@ void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const cha else ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", RGB byte"), sizeof(str) - ofs); } + + short frs_sec; + float frs_sec_base; + if (IMB_anim_get_fps(clip->anim, &frs_sec, &frs_sec_base, true)) { + ofs += BLI_snprintf(str + ofs, sizeof(str) - ofs, IFACE_(", %.2f fps"), (float)frs_sec / frs_sec_base); + } } else { ofs += BLI_strncpy_rlen(str + ofs, IFACE_(", failed to load"), sizeof(str) - ofs); |