Sequencer: frame offset feature usability
- Expose the operator in the panel, (wasn't available in the UI at all). - Offset frame was hard coded to a color matching the background. Use the current frame color with dashes instead. - Overlay toggle had wrong name.
This commit is contained in:
@@ -243,13 +243,6 @@ class SEQUENCER_MT_view(Menu):
|
||||
translate=False,
|
||||
).ratio = a / b
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
|
||||
# # XXX, invokes in the header view
|
||||
# layout.operator("sequencer.view_ghost_border", text="Overlay Border")
|
||||
|
||||
if is_sequencer_view:
|
||||
layout.prop(st, "show_seconds")
|
||||
layout.prop(st, "show_frame_indicator")
|
||||
@@ -1843,6 +1836,11 @@ class SEQUENCER_PT_frame_overlay(SequencerButtonsPanel_Output, Panel):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator_context = 'INVOKE_REGION_PREVIEW'
|
||||
layout.operator("sequencer.view_ghost_border", text="Set Overlay Region")
|
||||
layout.operator_context = 'INVOKE_DEFAULT'
|
||||
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
|
||||
@@ -2076,9 +2076,11 @@ void draw_timeline_seq(const bContext *C, ARegion *ar)
|
||||
scene->r.cfra + scene->ed->over_ofs;
|
||||
|
||||
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
|
||||
immBindBuiltinProgram(GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR);
|
||||
|
||||
immUniformColor3f(0.2f, 0.2f, 0.2f);
|
||||
immUniform1f("dash_width", 20.0f * U.pixelsize);
|
||||
immUniform1f("dash_factor", 0.5f);
|
||||
immUniformThemeColor(TH_CFRAME);
|
||||
|
||||
immBegin(GPU_PRIM_LINES, 2);
|
||||
immVertex2f(pos, cfra_over, v2d->cur.ymin);
|
||||
|
||||
@@ -1853,7 +1853,8 @@ static void rna_def_editor(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
|
||||
RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer");
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset");
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_overlay_lock", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -1864,7 +1865,7 @@ static void rna_def_editor(BlenderRNA *brna)
|
||||
|
||||
/* access to fixed and relative frame */
|
||||
prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_ui_text(prop, "Overlay Offset", "");
|
||||
RNA_def_property_ui_text(prop, "Overlay Offset", "Number of frames to offset");
|
||||
RNA_def_property_int_funcs(
|
||||
prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
||||
|
||||
Reference in New Issue
Block a user