UI: show frame rate in movie clip editor
Feature Request from Hjialti.
This commit is contained in:
parent
e67f7e922c
commit
233b780635
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue