void panel_btn(fit_autos,(int all), fit_autos(all))
void panel_btn(set_editing_mode,(int mode), set_editing_mode(mode))
void panel_btn(set_auto_keyframes,(int v), set_auto_keyframes(v))
+void panel_btn(set_span_keyframes,(int v), set_span_keyframes(v))
void panel_btn(set_labels_follow_edits,(int v), set_labels_follow_edits(v))
void panel_fit_autos(int all);
void panel_set_editing_mode(int mode);
void panel_set_auto_keyframes(int v);
+ void panel_set_span_keyframes(int v);
void panel_set_labels_follow_edits(int v);
MWindow *mwindow;
this->arrow = 0;
this->ibeam = 0;
this->keyframe = 0;
+ this->span_keyframe = 0;
this->mangoto = 0;
this->click2play = 0;
locklabels = 0;
if( arrow ) arrow->update(new_editing_mode == EDITING_ARROW);
if( ibeam ) ibeam->update(new_editing_mode == EDITING_IBEAM);
if( keyframe ) keyframe->update(mwindow->edl->session->auto_keyframes);
+ if( span_keyframe ) span_keyframe->update(mwindow->edl->session->span_keyframes);
if( locklabels ) locklabels->set_value(mwindow->edl->session->labels_follow_edits);
if( click2play ) {
int value = !is_vwindow() ?
keyframe = new KeyFrameButton(mwindow, this, x1, y1);
subwindow->add_subwindow(keyframe);
x1 += keyframe->get_w();
+ span_keyframe = new SpanKeyFrameButton(mwindow, this, x1, y1);
+ subwindow->add_subwindow(span_keyframe);
+ x1 += span_keyframe->get_w();
}
if( use_locklabels ) {
if( use_keyframe ) {
keyframe->reposition_window(x1, y1);
x1 += keyframe->get_w();
+ span_keyframe->reposition_window(x1, y1);
+ x1 += span_keyframe->get_w();
}
if( use_locklabels ) {
return 0;
}
+//set_span_keyframes
+SpanKeyFrameButton::SpanKeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y)
+ : BC_Toggle(x, y,
+ mwindow->theme->get_image_set("spankeyframe"),
+ mwindow->edl->session->span_keyframes,
+ "", 0, 0, 0)
+{
+ this->mwindow = mwindow;
+ this->panel = panel;
+ set_tooltip(_("Allow keyframe spanning"));
+}
+
+int SpanKeyFrameButton::handle_event()
+{
+ panel->panel_set_span_keyframes(get_value());
+ return 1;
+}
+
//set_labels_follow_edits
LockLabelsButton::LockLabelsButton(MWindow *mwindow, EditPanel *panel, int x, int y)
: BC_Toggle(x, y,
EditPanel *panel;
};
+class SpanKeyFrameButton : public BC_Toggle
+{
+public:
+ SpanKeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
+ int handle_event();
+ MWindow *mwindow;
+ EditPanel *panel;
+};
+
class LockLabelsButton : public BC_Toggle
{
public:
virtual void panel_fit_autos(int all) = 0;
virtual void panel_set_editing_mode(int mode) = 0;
virtual void panel_set_auto_keyframes(int v) = 0;
+ virtual void panel_set_span_keyframes(int v) = 0;
virtual void panel_set_labels_follow_edits(int v) = 0;
MWindow *mwindow;
ArrowButton *arrow;
IBeamButton *ibeam;
KeyFrameButton *keyframe;
+ SpanKeyFrameButton *span_keyframe;
LockLabelsButton *locklabels;
int is_mwindow() { return window_id == MWINDOW_ID; }
audio_tracks = 2;
autos_follow_edits = 1; // this is needed for predictability
auto_keyframes = 0;
+ span_keyframes = 0;
brender_start = brender_end = 0.0;
clipboard_length = 0; // unused
color_model = BC_RGBA8888;
single_standalone = defaults->get("SINGLE_STANDALONE", 1);
playback_preload = defaults->get("PLAYBACK_PRELOAD", 0);
auto_keyframes = defaults->get("AUTO_KEYFRAMES", 0);
+ span_keyframes = defaults->get("SPAN_KEYFRAMES", 0);
meter_format = defaults->get("METER_FORMAT", METER_DB);
min_meter_db = defaults->get("MIN_METER_DB", -85);
max_meter_db = defaults->get("MAX_METER_DB", 6);
defaults->update("SINGLE_STANDALONE", single_standalone);
defaults->update("PLAYBACK_PRELOAD", playback_preload);
defaults->update("AUTO_KEYFRAMES", auto_keyframes);
+ defaults->update("SPAN_KEYFRAMES", span_keyframes);
defaults->update("METER_FORMAT", meter_format);
defaults->update("MIN_METER_DB", min_meter_db);
defaults->update("MAX_METER_DB", max_meter_db);
}
auto_conf->load_xml(file);
auto_keyframes = file->tag.get_property("AUTO_KEYFRAMES", auto_keyframes);
+ span_keyframes = file->tag.get_property("SPAN_KEYFRAMES", span_keyframes);
autos_follow_edits = file->tag.get_property("AUTOS_FOLLOW_EDITS", autos_follow_edits);
brender_start = file->tag.get_property("BRENDER_START", brender_start);
brender_end = file->tag.get_property("BRENDER_END", brender_end);
}
auto_conf->save_xml(file);
file->tag.set_property("AUTO_KEYFRAMES", auto_keyframes);
+ file->tag.set_property("SPAN_KEYFRAMES", span_keyframes);
file->tag.set_property("AUTOS_FOLLOW_EDITS", autos_follow_edits);
file->tag.set_property("BRENDER_START", brender_start);
file->tag.set_property("BRENDER_END", brender_end);
plugins_follow_edits = session->plugins_follow_edits;
single_standalone = session->single_standalone;
auto_keyframes = session->auto_keyframes;
+ span_keyframes = session->span_keyframes;
// last_playback_position = session->last_playback_position;
meter_format = session->meter_format;
min_meter_db = session->min_meter_db;
int autos_follow_edits;
// Generate keyframes for every tweek
int auto_keyframes;
+// use spanning parameter update
+ int span_keyframes;
// Where to do background rendering
double brender_start;
double brender_end;
continue;
}
const char *label = toggle_text(tp);
- int color = tp->isauto > 0 ? auto_colors[tp->ref] : WHITE;
+ int color = tp->isauto > 0 ?
+ auto_colors[tp->ref] :
+ get_resources()->text_default ;
GWindowToggle *toggle = new GWindowToggle(this, x, y, label, color, tp);
add_tool(toggles[i] = toggle);
if( tp->isauto > 0 ) {
// A different algorithm has to be used if it's 1 sample per pixel and the
// index is used. Now the min and max values are equal so we join the max samples.
if(mwindow->edl->local_session->zoom_sample == 1) {
- canvas->draw_line(x2 - 1, prev_y1, x2, y1, pixmap);
+ canvas->draw_line(x2 - 1, !rect_audio ? prev_y1 : center_pixel, x2, y1, pixmap);
}
else {
// Extend line height if it doesn't connect to previous line
else {
first_frame = 0;
}
- canvas->draw_line(x2, y1, x2, y2, pixmap);
+ canvas->draw_line(x2, y1, x2, !rect_audio ? y2 : center_pixel, pixmap);
}
prev_y1 = next_y1;
prev_y2 = next_y2;
selection_start = edl->align_to_frame(selection_start, 0);
selection_end = edl->align_to_frame(selection_end, 0);
- if( EQUIV(selection_start, selection_end) ) {
+ if( !edl->session->span_keyframes ||
+ EQUIV(selection_start, selection_end) ) {
// Search for keyframe to write
KeyFrame *dst = get_keyframe();
dst->copy_data(src);
#include "automation.inc"
#include "clip.h"
#include "edl.h"
+#include "edlsession.h"
#include "localsession.h"
#include "maskauto.h"
#include "maskautos.h"
// Selection is always aligned to frame for masks
// Create new keyframe if auto keyframes or replace entire keyframe.
- if(selection_start == selection_end)
+ if( !edl->session->span_keyframes ||
+ EQUIV(selection_start, selection_end) )
{
// Search for keyframe to write to
MaskAuto *dst = (MaskAuto*)get_auto_for_editing();
mwindow->set_auto_keyframes(v);
}
+void MainEditing::panel_set_span_keyframes(int v)
+{
+ mwindow->set_span_keyframes(v);
+}
+
void MainEditing::panel_set_labels_follow_edits(int v)
{
mwindow->set_labels_follow_edits(v);
void panel_fit_autos(int all);
void panel_set_editing_mode(int mode);
void panel_set_auto_keyframes(int v);
+ void panel_set_span_keyframes(int v);
void panel_set_labels_follow_edits(int v);
MWindow *mwindow;
cwindow->gui->unlock_window();
}
+void MWindow::set_span_keyframes(int value)
+{
+ edl->session->span_keyframes = value;
+ gui->mbuttons->edit_panel->span_keyframe->update(value);
+ gui->flush();
+ cwindow->gui->lock_window("MWindow::set_span_keyframes");
+ cwindow->gui->edit_panel->span_keyframe->update(value);
+ cwindow->gui->flush();
+ cwindow->gui->unlock_window();
+}
+
void MWindow::set_auto_visibility(Autos *autos, int value)
{
if( autos->type == Autos::AUTOMATION_TYPE_PLUGIN )
void set_automation_mode(int mode);
void set_keyframe_type(int mode);
void set_auto_keyframes(int value);
+ void set_span_keyframes(int value);
void set_auto_visibility(Autos *autos, int value);
void set_labels_follow_edits(int value);
#include "mwindowgui.h"
#include "patchbay.h"
#include "tracking.h"
+#include "tracks.h"
#include "playbackengine.h"
#include "playtransport.h"
#include "preferences.h"
// Start tracking after arming so the tracking position doesn't change.
// The tracking for a single frame command occurs during PAUSE
init_tracking();
- if( !command->single_frame() )
- clear_output();
+ if( !command->single_frame() ) {
+ EDL *edl = command->get_edl();
+ if( edl && edl->tracks->playable_video_tracks() )
+ clear_output();
+ }
// Dispatch the command
start_render_engine();
break;
int y1 = center_pixel - sample * scale_y / 2;
int y2 = CLIP(y1, 0, y_max);
- for( int x0=0; x0<w; ++x0 ) {
- int x1 = x0 + x, x2 = x1 + 1;
+ for( int x1=x; x1<w; ++x1 ) {
+ int x2 = x1 + 1;
edit_position = (x1 + pixmap_x - edit_x) * project_zoom;
int64_t speed_position = edit->startsource;
speed_position += !speed_autos ? edit_position :
y1 = center_pixel - sample * scale_y / 2;
y2 = CLIP(y1, 0, y_max);
//printf("ResourcePixmap::draw_audio_source %d %d %d\n", __LINE__, y1, y2);
- canvas->draw_line(x0, y0, x2, y2, this);
+ if( !rect_audio )
+ canvas->draw_line(x1, y0, x2, y2, this);
+ else
+ canvas->draw_line(x2, center_pixel, x2, y2, this);
}
}
y_lo = y1; y_hi = y2;
}
prev_y1 = y1; prev_y2 = y2;
- canvas->draw_line(x, y_lo, x, y_hi, this);
+ canvas->draw_line(x, !rect_audio ? y_lo : center_pixel, x, y_hi, this);
//printf("ResourcePixmap::draw_audio_source %d %d %d %d\n", __LINE__, x, y1, y2);
mwindow->wave_cache->unlock();
}
CLAMP(y1, top_pixel, bottom_pixel);
CLAMP(y2, top_pixel, bottom_pixel);
canvas->set_color(mwindow->theme->audio_color);
- canvas->draw_line(x, y1, x, y2, this);
+ canvas->draw_line(x, !rect_audio ? y1 : bottom_pixel, x, y2, this);
}
void VWindowEditing::panel_fit_autos(int all) {}
void VWindowEditing::panel_set_editing_mode(int mode) {}
void VWindowEditing::panel_set_auto_keyframes(int v) {}
+void VWindowEditing::panel_set_span_keyframes(int v) {}
void VWindowEditing::panel_set_labels_follow_edits(int v) {}
void panel_fit_autos(int all);
void panel_set_editing_mode(int mode);
void panel_set_auto_keyframes(int v);
+ void panel_set_span_keyframes(int v);
void panel_set_labels_follow_edits(int v);
MWindow *mwindow;
drawbox
drawgraph
drawgrid
-dynaudnorm
+#dynaudnorm ###Invalid argument
earwax
#ebur128 ###Operation not permitted
edgedetect
kerndeint
lenscorrection
life ratio=2/3:s=200x200
-loudnorm
+#loudnorm ###Invalid argument
lowpass
lut
#lut2 ###Input/output error
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_image_set("category_button",
3,
"preferencesbutton_dn.png",
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
mbuttons_y - 1);
gui->draw_vframe(get_image("panel_divider"),
- mbuttons_x + 290 + 11 + 30 * 2 + 11 + 30 * 2 + 5,
+ mbuttons_x + 290 + 11 + 30 * 2 + 11 + 30 * 3 + 5,
mbuttons_y - 1);
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
mbuttons_y - 1);
gui->draw_vframe(get_image("panel_divider"),
- mbuttons_x + 320,
+ mbuttons_x + 294,
+ mbuttons_y - 1);
+ gui->draw_vframe(get_image("panel_divider"),
+ mbuttons_x + 396,
mbuttons_y - 1);
// Clock
transport_up, editpanel_hi, editpanel_checked,
editpanel_dn, editpanel_checkedhi,
"autokeyframe");
+new_toggle("spankeyframe.png",
+ transport_up, editpanel_hi, editpanel_checked,
+ editpanel_dn, editpanel_checkedhi,
+ "spankeyframe");
new_toggle("ibeam.png",
editpanel_up, editpanel_hi, editpanel_checked,
editpanel_dn, editpanel_checkedhi,
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin;
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin;
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
transport_up, editpanel_hi, editpanel_checked,
editpanel_dn, editpanel_checkedhi,
"autokeyframe");
+ new_toggle("spankeyframe.png",
+ transport_up, editpanel_hi, editpanel_checked,
+ editpanel_dn, editpanel_checkedhi,
+ "spankeyframe");
new_toggle("ibeam.png",
editpanel_up, editpanel_hi, editpanel_checked,
editpanel_dn, editpanel_checkedhi,
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
new_toggle("arrow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "arrow");
new_toggle("autokeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "autokeyframe");
+ new_toggle("spankeyframe.png", transport_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "spankeyframe");
new_toggle("ibeam.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "ibeam");
new_toggle("show_meters.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "meters");
new_toggle("blank30x30.png",
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);
- x += 2 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
+ x += 3 * get_image("autokeyframe")->get_w() + toggle_margin; // the state toggle buttons
gui->draw_vframe(get_image("panel_divider"),
x - toggle_margin / 2 - pdw / 2 + 2,
mbuttons_y - 1);