- recently restored sequencer change data operator didnt reset the offsets after a hard cut, causing the new data to be trimmed.
- add change data operator to strip panel next to image file properties since editing every image manually isnt really usable. - added new sequencer operator "Clear Offsets" (Alt+O), useful to reset the start/end frames around the strip data.
This commit is contained in:
@@ -239,6 +239,7 @@ class SEQUENCER_MT_strip(Menu):
|
||||
layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD'
|
||||
layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT'
|
||||
layout.operator("sequencer.images_separate")
|
||||
layout.operator("sequencer.offset_clear")
|
||||
layout.operator("sequencer.deinterlace_selected_movies")
|
||||
layout.separator()
|
||||
|
||||
@@ -381,6 +382,8 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
|
||||
|
||||
if elem and elem.orig_width > 0 and elem.orig_height > 0:
|
||||
col.label(text="Orig Dim: %dx%d" % (elem.orig_width, elem.orig_height))
|
||||
else:
|
||||
col.label(text="Orig Dim: None")
|
||||
|
||||
|
||||
class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
|
||||
@@ -565,6 +568,9 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
|
||||
col = split.column()
|
||||
col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
|
||||
|
||||
# also accessible from the menu
|
||||
layout.operator("sequencer.change_path")
|
||||
|
||||
elif seq_type == 'MOVIE':
|
||||
split = layout.split(percentage=0.2)
|
||||
col = split.column()
|
||||
|
||||
@@ -1569,6 +1569,58 @@ void SEQUENCER_OT_delete(wmOperatorType *ot)
|
||||
}
|
||||
|
||||
|
||||
/* offset clear operator */
|
||||
static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
Sequence *seq;
|
||||
|
||||
/* for effects, try to find a replacement input */
|
||||
for(seq=ed->seqbasep->first; seq; seq=seq->next) {
|
||||
if((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) {
|
||||
seq->startofs= seq->endofs= seq->startstill= seq->endstill= 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* updates lengths etc */
|
||||
seq= ed->seqbasep->first;
|
||||
while(seq) {
|
||||
calc_sequence(scene, seq);
|
||||
seq= seq->next;
|
||||
}
|
||||
|
||||
for(seq=ed->seqbasep->first; seq; seq=seq->next) {
|
||||
if((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) {
|
||||
if(seq_test_overlap(ed->seqbasep, seq)) {
|
||||
shuffle_seq(ed->seqbasep, seq, scene);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
|
||||
void SEQUENCER_OT_offset_clear(wmOperatorType *ot)
|
||||
{
|
||||
|
||||
/* identifiers */
|
||||
ot->name= "Clear Strip Offset";
|
||||
ot->idname= "SEQUENCER_OT_offset_clear";
|
||||
ot->description="Clear strip offsets from the start and end frames";
|
||||
|
||||
/* api callbacks */
|
||||
ot->exec= sequencer_offset_clear_exec;
|
||||
ot->poll= sequencer_edit_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
|
||||
/* separate_images operator */
|
||||
static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
@@ -2803,6 +2855,9 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
RNA_END;
|
||||
|
||||
/* reset these else we wont see all the images */
|
||||
seq->anim_startofs= seq->anim_endofs= 0;
|
||||
|
||||
/* correct start/end frames so we dont move
|
||||
* important not to set seq->len= len; allow the function to handle it */
|
||||
reload_sequence_new_file(scene, seq, TRUE);
|
||||
|
||||
@@ -93,6 +93,7 @@ void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_duplicate(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_delete(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_offset_clear(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_images_separate(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_meta_toggle(struct wmOperatorType *ot);
|
||||
void SEQUENCER_OT_meta_make(struct wmOperatorType *ot);
|
||||
|
||||
@@ -68,6 +68,7 @@ void sequencer_operatortypes(void)
|
||||
WM_operatortype_append(SEQUENCER_OT_swap_inputs);
|
||||
WM_operatortype_append(SEQUENCER_OT_duplicate);
|
||||
WM_operatortype_append(SEQUENCER_OT_delete);
|
||||
WM_operatortype_append(SEQUENCER_OT_offset_clear);
|
||||
WM_operatortype_append(SEQUENCER_OT_images_separate);
|
||||
WM_operatortype_append(SEQUENCER_OT_meta_toggle);
|
||||
WM_operatortype_append(SEQUENCER_OT_meta_make);
|
||||
@@ -149,6 +150,8 @@ void sequencer_keymap(wmKeyConfig *keyconf)
|
||||
WM_keymap_add_item(keymap, "SEQUENCER_OT_reassign_inputs", RKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0);
|
||||
|
||||
WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0);
|
||||
|
||||
WM_keymap_add_item(keymap, "SEQUENCER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0);
|
||||
|
||||
WM_keymap_add_item(keymap, "SEQUENCER_OT_delete", XKEY, KM_PRESS, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user