diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-19 19:41:56 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-19 19:41:56 +0400 |
commit | 995a19a983b2c44ec9afec049395d7c1b4320137 (patch) | |
tree | 8333563ae983641434179839755aab67ecdc2aad /release | |
parent | 994d75b6ae78fee99afd949292e48c4f32292995 (diff) |
Sequencer: per-sequence modifier stack for color grading
This implements basic color grading modifiers in sequencer, supporting
color balance, RGB curves and HUE corrections.
Implementation is close to object modifiers, some details are there:
http://wiki.blender.org/index.php/User:Nazg-gul/SequencerModifiers
Modifiers supports multi-threaded calculation, masks and instant
parameter changes.
Also added cache for pre-processed image buffers for current frame,
so changing sequence properties does not require rendering of original
sequence (like rendering scene, loading file from disk and so)
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 87 |
2 files changed, 67 insertions, 22 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 5302ad9b471..0b4d4cd19e4 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -774,7 +774,7 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel): toolsettings = context.tool_settings.image_paint brush = toolsettings.brush - layout.template_curve_mapping(brush, "curve") + layout.template_curve_mapping(brush, "curve", type='COLOR') row = layout.row(align=True) row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH' diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 50c8603a7c2..cd10bce8ef6 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -28,6 +28,29 @@ def act_strip(context): return None +def draw_color_balance(layout, color_balance): + col = layout.column() + col.label(text="Lift:") + col.template_color_wheel(color_balance, "lift", value_slider=True, cubic=True) + row = col.row() + row.prop(color_balance, "lift", text="") + row.prop(color_balance, "invert_lift", text="Inverse") + + col = layout.column() + col.label(text="Gamma:") + col.template_color_wheel(color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True) + row = col.row() + row.prop(color_balance, "gamma", text="") + row.prop(color_balance, "invert_gamma", text="Inverse") + + col = layout.column() + col.label(text="Gain:") + col.template_color_wheel(color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True) + row = col.row() + row.prop(color_balance, "gain", text="") + row.prop(color_balance, "invert_gain", text="Inverse") + + class SEQUENCER_HT_header(Header): bl_space_type = 'SEQUENCE_EDITOR' @@ -442,7 +465,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): if strip.is_supports_mask: col = layout.column() - col.prop_search(strip, "input_mask", sequencer, "sequences") + col.prop_search(strip, "input_mask_strip", sequencer, "sequences", text="Mask") if strip.type == 'COLOR': layout.prop(strip, "color") @@ -772,26 +795,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel): layout.prop(strip, "use_color_balance") if strip.use_color_balance and strip.color_balance: # TODO - need to add this somehow - col = layout.column() - col.label(text="Lift:") - col.template_color_wheel(strip.color_balance, "lift", value_slider=True, cubic=True) - row = col.row() - row.prop(strip.color_balance, "lift", text="") - row.prop(strip.color_balance, "invert_lift", text="Inverse") - - col = layout.column() - col.label(text="Gamma:") - col.template_color_wheel(strip.color_balance, "gamma", value_slider=True, lock_luminosity=True, cubic=True) - row = col.row() - row.prop(strip.color_balance, "gamma", text="") - row.prop(strip.color_balance, "invert_gamma", text="Inverse") - - col = layout.column() - col.label(text="Gain:") - col.template_color_wheel(strip.color_balance, "gain", value_slider=True, lock_luminosity=True, cubic=True) - row = col.row() - row.prop(strip.color_balance, "gain", text="") - row.prop(strip.color_balance, "invert_gain", text="Inverse") + draw_color_balance(layout, strip.color_balance) class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): @@ -878,5 +882,46 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, Panel): col.prop(st, "show_separate_color") col.prop(st, "proxy_render_size") + +class SEQUENCER_PT_modifiers(SequencerButtonsPanel, Panel): + bl_label = "Modifiers" + + def draw(self, context): + layout = self.layout + + strip = act_strip(context) + sequencer = context.scene.sequence_editor + + layout.operator_menu_enum("sequencer.strip_modifier_add", "type") + + for mod in strip.modifiers: + box = layout.box() + + row = box.row() + row.prop(mod, "show_expanded", text="", emboss=False) + row.prop(mod, "name") + + row.prop(mod, "mute", text="") + props = row.operator("sequencer.strip_modifier_remove", text="", icon='X') + props.name = mod.name + + if mod.show_expanded: + row = box.row() + row.prop(mod, "input_mask_type", expand=True) + + if mod.input_mask_type == 'STRIP': + box.prop_search(mod, "input_mask_strip", sequencer, "sequences", text="Mask") + else: + box.prop(mod, "input_mask_id") + + if mod.type == 'COLOR_BALANCE': + box.prop(mod, "color_multiply") + draw_color_balance(box, mod.color_balance) + elif mod.type == 'CURVES': + box.template_curve_mapping(mod, "curve_mapping", type='COLOR') + elif mod.type == 'HUE_CORRECT': + box.template_curve_mapping(mod, "curve_mapping", type='HUE') + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) |