diff options
author | Daniel Salazar <zanqdo@gmail.com> | 2011-01-25 21:30:31 +0300 |
---|---|---|
committer | Daniel Salazar <zanqdo@gmail.com> | 2011-01-25 21:30:31 +0300 |
commit | 58352e12f520910a431d9944af541d76e1bd0737 (patch) | |
tree | 4b35fdefaa0697699d09d1f741b3beaf64d3a0c6 /release/scripts/ui | |
parent | 0f375d8980f1c6b8bb71ab902c228a07a31a5da3 (diff) |
Adding Framerate preset patch by Troy Sobotka (sobotka). Small change to
make Frame Old / Frame New remapping settings always visible as they
aren't really a part of framerate settings
Diffstat (limited to 'release/scripts/ui')
-rw-r--r-- | release/scripts/ui/properties_render.py | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index ed25fc1b0e7..4851034e875 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -34,6 +34,13 @@ class RENDER_MT_ffmpeg_presets(bpy.types.Menu): draw = bpy.types.Menu.draw_preset +class RENDER_MT_framerate_presets(bpy.types.Menu): + bl_label = "Frame Rate Presets" + preset_subdir = "framerate" + preset_operator = "script.execute_preset" + draw = bpy.types.Menu.draw_preset + + class RenderButtonsPanel(): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -555,8 +562,27 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel): sub.prop(scene, "frame_step", text="Step") sub.label(text="Frame Rate:") - sub.prop(rd, "fps") - sub.prop(rd, "fps_base", text="/") + if rd.fps_base == 1: + fps_rate = round(rd.fps / rd.fps_base) + else: + fps_rate = round(rd.fps / rd.fps_base, 2) + + # TODO: Change the following to iterate over existing presets + if (fps_rate in (23.98, 24, 25, 29.97, 30, 50, 59.94, 60)): + custom_framerate = False + else: + custom_framerate = True + + if custom_framerate == True: + fps_label_text = "Custom (" + str(fps_rate) + " fps)" + else: + fps_label_text = str(fps_rate) + " fps" + + sub.menu("RENDER_MT_framerate_presets", text=fps_label_text) + + if (bpy.types.RENDER_MT_framerate_presets.bl_label == "Custom") or (custom_framerate == True): + sub.prop(rd, "fps") + sub.prop(rd, "fps_base", text="/") subrow = sub.row(align=True) subrow.prop(rd, "frame_map_old", text="Old") subrow.prop(rd, "frame_map_new", text="New") |