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 | |
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')
-rw-r--r-- | release/scripts/presets/framerate/23.98.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/24.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/25.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/29.97.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/30.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/50.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/59.94.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/60.py | 3 | ||||
-rw-r--r-- | release/scripts/presets/framerate/Custom.py | 1 | ||||
-rw-r--r-- | release/scripts/ui/properties_render.py | 30 |
10 files changed, 53 insertions, 2 deletions
diff --git a/release/scripts/presets/framerate/23.98.py b/release/scripts/presets/framerate/23.98.py new file mode 100644 index 00000000000..498a5180d73 --- /dev/null +++ b/release/scripts/presets/framerate/23.98.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 24 +bpy.context.scene.render.fps_base = 1.001 diff --git a/release/scripts/presets/framerate/24.py b/release/scripts/presets/framerate/24.py new file mode 100644 index 00000000000..6fcdcb1284a --- /dev/null +++ b/release/scripts/presets/framerate/24.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 24 +bpy.context.scene.render.fps_base = 1 diff --git a/release/scripts/presets/framerate/25.py b/release/scripts/presets/framerate/25.py new file mode 100644 index 00000000000..20973919720 --- /dev/null +++ b/release/scripts/presets/framerate/25.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 25 +bpy.context.scene.render.fps_base = 1 diff --git a/release/scripts/presets/framerate/29.97.py b/release/scripts/presets/framerate/29.97.py new file mode 100644 index 00000000000..8f7ad67a7ee --- /dev/null +++ b/release/scripts/presets/framerate/29.97.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 30 +bpy.context.scene.render.fps_base = 1.001 diff --git a/release/scripts/presets/framerate/30.py b/release/scripts/presets/framerate/30.py new file mode 100644 index 00000000000..bc83df19ac8 --- /dev/null +++ b/release/scripts/presets/framerate/30.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 30 +bpy.context.scene.render.fps_base = 1 diff --git a/release/scripts/presets/framerate/50.py b/release/scripts/presets/framerate/50.py new file mode 100644 index 00000000000..08dfaa89c6e --- /dev/null +++ b/release/scripts/presets/framerate/50.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 50 +bpy.context.scene.render.fps_base = 1 diff --git a/release/scripts/presets/framerate/59.94.py b/release/scripts/presets/framerate/59.94.py new file mode 100644 index 00000000000..5c44841a9ef --- /dev/null +++ b/release/scripts/presets/framerate/59.94.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 60 +bpy.context.scene.render.fps_base = 1.001 diff --git a/release/scripts/presets/framerate/60.py b/release/scripts/presets/framerate/60.py new file mode 100644 index 00000000000..30f2db7cdad --- /dev/null +++ b/release/scripts/presets/framerate/60.py @@ -0,0 +1,3 @@ +import bpy +bpy.context.scene.render.fps = 60 +bpy.context.scene.render.fps_base = 1 diff --git a/release/scripts/presets/framerate/Custom.py b/release/scripts/presets/framerate/Custom.py new file mode 100644 index 00000000000..001d19a2280 --- /dev/null +++ b/release/scripts/presets/framerate/Custom.py @@ -0,0 +1 @@ +import bpy 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") |