Changeset View
Standalone View
release/scripts/startup/bl_ui/space_sequencer.py
| Show First 20 Lines • Show All 1,138 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.prop(strip, "use_flip_x", text="X Flip") | col.prop(strip, "use_flip_x", text="X Flip") | ||||
| col.prop(strip, "use_flip_y", text="Y Flip") | col.prop(strip, "use_flip_y", text="Y Flip") | ||||
| layout.label(text="Color:") | layout.label(text="Color:") | ||||
| col = layout.column(align=True) | col = layout.column(align=True) | ||||
| col.prop(strip, "color_saturation", text="Saturation") | col.prop(strip, "color_saturation", text="Saturation") | ||||
| col.prop(strip, "color_multiply", text="Multiply") | col.prop(strip, "color_multiply", text="Multiply") | ||||
| layout.prop(strip, "use_float", text="Convert to Float") | layout.prop(strip, "use_float", text="Convert to Float") | ||||
ISS: These are details, but keep class names and displayed text consistent - not necessarily… | |||||
| class SEQUENCER_PT_proxy_settings(SequencerButtonsPanel, Panel): | |||||
Done Inline ActionsPanel with this label already exists. Specify, that this is panel for "global" settings. I would rather use "Proxy settings" or "Sequencer proxy settings". ISS: Panel with this label already exists. Specify, that this is panel for "global" settings. I… | |||||
| bl_label = "Proxy settings" | |||||
Done Inline ActionsI would create a new category for both proxy panels. "Proxy" would be good name.
ISS: I would create a new category for both proxy panels. "Proxy" would be good name.
- It makes… | |||||
| bl_category = "Proxy" | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return cls.has_sequencer(context) | |||||
| def draw(self, context): | |||||
Done Inline ActionsYou can do return cls.has_sequencer(context) ISS: You can do `return cls.has_sequencer(context)`
Haven't seen explicit `return True` in this file. | |||||
| layout = self.layout | |||||
Done Inline ActionsThis method placeholder should be removed, if not used ISS: This method placeholder should be removed, if not used | |||||
| ed = context.scene.sequence_editor | |||||
| flow = layout.column_flow() | |||||
| flow.prop(ed, "proxy_storage", text="Storage") | |||||
| if ed.proxy_storage == 'PROJECT': | |||||
| flow.prop(ed, "proxy_dir", text="Directory") | |||||
| col = layout.column() | |||||
| col.operator("sequencer.enable_proxies") | |||||
| col.operator("sequencer.rebuild_proxy") | |||||
| class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel): | |||||
Done Inline ActionsThese are details, but keep class names and displayed text consistent - not necessarily verbatim, but at least word order ISS: These are details, but keep class names and displayed text consistent - not necessarily… | |||||
| bl_label = "Proxy/Timecode" | class SEQUENCER_PT_strip_proxy(SequencerButtonsPanel, Panel): | ||||
| bl_category = "Strip" | bl_label = "Strip Proxy/Timecode" | ||||
| bl_category = "Proxy" | |||||
Done Inline ActionsIssue here is, that these operators do work on selection. Even worse is, that they don't have poll function defined, so user can click it and it makes a visible action, that has no effect. There are few ways to solve this:
Any of first two options will do for me. ISS: Issue here is, that these operators do work on selection. Even worse is, that they don't have… | |||||
| @classmethod | @classmethod | ||||
Done Inline ActionsI would also change class name SEQUENCER_PT_strip_proxy ISS: I would also change class name `SEQUENCER_PT_strip_proxy` | |||||
| def poll(cls, context): | def poll(cls, context): | ||||
| if not cls.has_sequencer(context): | if not cls.has_sequencer(context): | ||||
Done Inline ActionsI would create a new category for both proxy panels. "Proxy" would be good name. ISS: I would create a new category for both proxy panels. "Proxy" would be good name. | |||||
| return False | return False | ||||
| strip = act_strip(context) | strip = act_strip(context) | ||||
| if not strip: | if not strip: | ||||
| return False | return False | ||||
| return strip.type in {'MOVIE', 'IMAGE', 'SCENE', 'META', 'MULTICAM'} | return strip.type in {'MOVIE', 'IMAGE', 'META'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| strip = act_strip(context) | strip = act_strip(context) | ||||
Done Inline ActionsInclude also image and meta type. Images:
Meta will build proxies for included movies. ISS: Include also image and meta type.
Images:
- it has to be supported somehow
- it works and… | |||||
| self.layout.prop(strip, "use_proxy", text="") | self.layout.prop(strip, "use_proxy", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ed = context.scene.sequence_editor | ed = context.scene.sequence_editor | ||||
| strip = act_strip(context) | strip = act_strip(context) | ||||
| if strip.proxy: | if strip.proxy: | ||||
| proxy = strip.proxy | proxy = strip.proxy | ||||
| flow = layout.column_flow() | flow = layout.column_flow() | ||||
| flow.prop(ed, "proxy_storage", text="Storage") | if ed.proxy_storage == 'PER_STRIP': | ||||
| if ed.proxy_storage == 'PROJECT': | |||||
| flow.prop(ed, "proxy_dir", text="Directory") | |||||
| else: | |||||
| flow.prop(proxy, "use_proxy_custom_directory") | flow.prop(proxy, "use_proxy_custom_directory") | ||||
| flow.prop(proxy, "use_proxy_custom_file") | flow.prop(proxy, "use_proxy_custom_file") | ||||
| if proxy.use_proxy_custom_directory and not proxy.use_proxy_custom_file: | if proxy.use_proxy_custom_directory and not proxy.use_proxy_custom_file: | ||||
| flow.prop(proxy, "directory") | flow.prop(proxy, "directory") | ||||
| if proxy.use_proxy_custom_file: | if proxy.use_proxy_custom_file: | ||||
| flow.prop(proxy, "filepath") | flow.prop(proxy, "filepath") | ||||
| Show All 9 Lines | def draw(self, context): | ||||
| col.prop(proxy, "quality", text="Build JPEG Quality") | col.prop(proxy, "quality", text="Build JPEG Quality") | ||||
| if strip.type == 'MOVIE': | if strip.type == 'MOVIE': | ||||
| col = layout.column() | col = layout.column() | ||||
| col.label(text="Use timecode index:") | col.label(text="Use timecode index:") | ||||
| col.prop(proxy, "timecode") | col.prop(proxy, "timecode") | ||||
| col = layout.column() | |||||
| col.operator("sequencer.enable_proxies") | |||||
| col.operator("sequencer.rebuild_proxy") | |||||
| class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): | class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel): | ||||
| bl_label = "Scene Preview/Render" | bl_label = "Scene Preview/Render" | ||||
| bl_space_type = 'SEQUENCE_EDITOR' | bl_space_type = 'SEQUENCE_EDITOR' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_category = "Strip" | bl_category = "Strip" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ▲ Show 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | classes = ( | ||||
| SEQUENCER_MT_strip_lock_mute, | SEQUENCER_MT_strip_lock_mute, | ||||
| SEQUENCER_PT_edit, | SEQUENCER_PT_edit, | ||||
| SEQUENCER_PT_effect, | SEQUENCER_PT_effect, | ||||
| SEQUENCER_PT_input, | SEQUENCER_PT_input, | ||||
| SEQUENCER_PT_sound, | SEQUENCER_PT_sound, | ||||
| SEQUENCER_PT_scene, | SEQUENCER_PT_scene, | ||||
| SEQUENCER_PT_mask, | SEQUENCER_PT_mask, | ||||
| SEQUENCER_PT_filter, | SEQUENCER_PT_filter, | ||||
| SEQUENCER_PT_proxy, | SEQUENCER_PT_proxy_settings, | ||||
| SEQUENCER_PT_strip_proxy, | |||||
| SEQUENCER_PT_preview, | SEQUENCER_PT_preview, | ||||
| SEQUENCER_PT_view, | SEQUENCER_PT_view, | ||||
| SEQUENCER_PT_view_safe_areas, | SEQUENCER_PT_view_safe_areas, | ||||
| SEQUENCER_PT_modifiers, | SEQUENCER_PT_modifiers, | ||||
| SEQUENCER_PT_grease_pencil, | SEQUENCER_PT_grease_pencil, | ||||
| SEQUENCER_PT_annotation_onion, | SEQUENCER_PT_annotation_onion, | ||||
| SEQUENCER_PT_grease_pencil_tools, | SEQUENCER_PT_grease_pencil_tools, | ||||
| SEQUENCER_PT_custom_props, | SEQUENCER_PT_custom_props, | ||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||
These are details, but keep class names and displayed text consistent - not necessarily verbatim, but at least word order