[Bf-blender-cvs] [233b7806354] blender2.8: UI: show frame rate in movie clip editor
Jacques Lucke
noreply at git.blender.org
Fri Dec 14 15:35:14 CET 2018
Commit: 233b7806354f27a52fb1aee672c7c58149d0b4a4
Author: Jacques Lucke
Date: Fri Dec 14 15:34:44 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB233b7806354f27a52fb1aee672c7c58149d0b4a4
UI: show frame rate in movie clip editor
Feature Request from Hjialti.
===================================================================
M source/blender/editors/space_clip/clip_buttons.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list