add bump floatautos, add time_references for align timecodes, add menuitem create_key...
authorGood Guy <[email protected]>
Sun, 23 Aug 2020 23:56:31 +0000 (17:56 -0600)
committerGood Guy <[email protected]>
Sun, 23 Aug 2020 23:56:31 +0000 (17:56 -0600)
132 files changed:
cinelerra-5.1/cinelerra/apatchgui.C
cinelerra-5.1/cinelerra/apatchgui.h
cinelerra-5.1/cinelerra/apatchgui.inc
cinelerra-5.1/cinelerra/autos.C
cinelerra-5.1/cinelerra/cwindow.C
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/cwindowtool.h
cinelerra-5.1/cinelerra/cwindowtool.inc
cinelerra-5.1/cinelerra/ffmpeg.C
cinelerra-5.1/cinelerra/floatauto.C
cinelerra-5.1/cinelerra/floatauto.h
cinelerra-5.1/cinelerra/floatautos.C
cinelerra-5.1/cinelerra/floatautos.h
cinelerra-5.1/cinelerra/gwindowgui.C
cinelerra-5.1/cinelerra/keyframepopup.C
cinelerra-5.1/cinelerra/keyframepopup.h
cinelerra-5.1/cinelerra/keyframepopup.inc
cinelerra-5.1/cinelerra/mainmenu.C
cinelerra-5.1/cinelerra/mainmenu.h
cinelerra-5.1/cinelerra/mainmenu.inc
cinelerra-5.1/cinelerra/mainundo.C
cinelerra-5.1/cinelerra/mwindow.C
cinelerra-5.1/cinelerra/mwindow.h
cinelerra-5.1/cinelerra/mwindowedit.C
cinelerra-5.1/cinelerra/mwindowgui.C
cinelerra-5.1/cinelerra/mwindowgui.h
cinelerra-5.1/cinelerra/patchbay.C
cinelerra-5.1/cinelerra/patchbay.h
cinelerra-5.1/cinelerra/patchgui.C
cinelerra-5.1/cinelerra/patchgui.h
cinelerra-5.1/cinelerra/patchgui.inc
cinelerra-5.1/cinelerra/track.C
cinelerra-5.1/cinelerra/track.h
cinelerra-5.1/cinelerra/trackcanvas.C
cinelerra-5.1/cinelerra/trackcanvas.h
cinelerra-5.1/cinelerra/tracks.C
cinelerra-5.1/cinelerra/tracks.h
cinelerra-5.1/cinelerra/tracksedit.C
cinelerra-5.1/cinelerra/vmodule.C
cinelerra-5.1/cinelerra/vpatchgui.C
cinelerra-5.1/cinelerra/vpatchgui.h
cinelerra-5.1/cinelerra/vpatchgui.inc
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blond_cv/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_blue/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C
cinelerra-5.1/plugins/theme_blue_dot/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_bright/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/cakewalk.C
cinelerra-5.1/plugins/theme_cakewalk/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_cakewalk/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_neophyte/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/neophyte.C
cinelerra-5.1/plugins/theme_pinklady/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/data/edge_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/edge_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/span_off.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/span_on.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/tan_bump.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/tan_free.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/tan_tangent.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/unflattheme.C
cinelerra-5.1/plugins/titler/titler.C

index 59d18244c34260c9f4d26a1874f86bc22234d112..3960dda8c67b9c01841d19bf6d38c3698e9dbd37 100644 (file)
@@ -182,14 +182,12 @@ void APatchGUI::update_faders(float v)
        double position = mwindow->edl->local_session->get_selectionstart(1);
        Autos *fade_autos = atrack->automation->autos[AUTOMATION_FADE];
        int need_undo = !fade_autos->auto_exists_for_editing(position);
-
        mwindow->undo->update_undo_before(_("fade"), need_undo ? 0 : this);
        FloatAuto *current = (FloatAuto*)fade_autos->get_auto_for_editing(position);
-       float change = v - current->get_value();
-       current->set_value(v);
-
+       float change = v - current->get_value(edge);
+       current->bump_value(v, edge, span);
        if( track->is_ganged() && track->is_armed() )
-               patchbay->synchronize_faders(change, TRACK_AUDIO, track);
+               patchbay->synchronize_faders(change, TRACK_AUDIO, track, edge, span);
        mwindow->undo->update_undo_after(_("fade"), LOAD_AUTOMATION);
        change_source = 0;
 
@@ -220,33 +218,64 @@ int AFadePatch::handle_event()
        return 1;
 }
 
-AKeyFadePatch::AKeyFadePatch(MWindow *mwindow, APatchGUI *patch, int x, int y)
- : BC_SubWindow(x,y, xS(200),yS(20), GWindowGUI::auto_colors[AUTOMATION_FADE])
+AKeyFadePatch::AKeyFadePatch(MWindow *mwindow, APatchGUI *gui,
+                       int bump, int x, int y)
+ : BC_SubWindow(x,y, xS(200)+4,yS(bump ? 50 : 24)+4,
+               GWindowGUI::auto_colors[AUTOMATION_FADE])
 {
        this->mwindow = mwindow;
-       this->patch = patch;
+       this->gui = gui;
+}
+AKeyFadePatch::~AKeyFadePatch()
+{
 }
 
 void AKeyFadePatch::create_objects()
 {
-       int x = 0, y = 0;
-       float v = mwindow->get_float_auto(patch, AUTOMATION_FADE)->get_value();
+       int x = 2, x1 = x, y = 0, dy = 0;
+       FloatAuto *fade_auto = mwindow->get_float_auto(gui, AUTOMATION_FADE);
+       float v = fade_auto->get_value(gui->edge);
        add_subwindow(akey_fade_text = new AKeyFadeText(this, x, y, xS(64), v));
        x += akey_fade_text->get_w();
+       dy = bmax(dy, akey_fade_text->get_h());
        VFrame **lok_images = mwindow->theme->get_image_set("lok");
-       int w1 = get_w() - x - lok_images[0]->get_w();
+       int w1 = get_w()-2 - x - lok_images[0]->get_w();
        add_subwindow(akey_fade_slider = new AKeyFadeSlider(this, x, y, w1, v));
        x += akey_fade_slider->get_w();
+       dy = bmax(dy, akey_fade_slider->get_h());
        add_subwindow(akey_fade_ok = new AKeyFadeOK(this, x, y, lok_images));
+       dy = bmax(dy, akey_fade_ok->get_h());
+       if( fade_auto->is_bump() ) {
+               y += dy;
+               set_color(get_resources()->get_bg_color());
+               draw_box(0,y, get_w(),get_h());
+               add_subwindow(auto_edge = new AKeyPatchAutoEdge(mwindow, this, x1, y));
+               x1 += auto_edge->get_w() + xS(15);
+               add_subwindow(auto_span = new AKeyPatchAutoSpan(mwindow, this, x1, y));
+       }
+       draw_3d_border(0,0, get_w(), get_h(), 0);
        activate();
        show_window();
 }
 
+void AKeyFadePatch::set_edge(int edge)
+{
+       gui->edge = edge;
+       FloatAuto *fade_auto = mwindow->get_float_auto(gui, AUTOMATION_FADE);
+       float v = fade_auto->get_value(edge);
+       update(v);
+}
+
+void AKeyFadePatch::set_span(int span)
+{
+       gui->span = span;
+}
+
 void AKeyFadePatch::update(float v)
 {
        akey_fade_text->update(v);
        akey_fade_slider->update(v);
-       patch->update_faders(v);
+       gui->update_faders(v);
 }
 
 AKeyFadeOK::AKeyFadeOK(AKeyFadePatch *akey_fade_patch, int x, int y, VFrame **images)
@@ -257,9 +286,8 @@ AKeyFadeOK::AKeyFadeOK(AKeyFadePatch *akey_fade_patch, int x, int y, VFrame **im
 
 int AKeyFadeOK::handle_event()
 {
-       MWindowGUI *mgui = akey_fade_patch->mwindow->gui;
-       delete mgui->keyvalue_popup;
-       mgui->keyvalue_popup = 0;
+       MWindow *mwindow = akey_fade_patch->mwindow;
+       mwindow->gui->close_keyvalue_popup();
        return 1;
 }
 
@@ -278,7 +306,7 @@ int AKeyFadeText::handle_event()
 }
 
 AKeyFadeSlider::AKeyFadeSlider(AKeyFadePatch *akey_fade_patch, int x, int y, int w, float v)
- : AFadePatch(akey_fade_patch->patch, x, y, w, v)
+ : AFadePatch(akey_fade_patch->gui, x, y, w, v)
 {
        this->akey_fade_patch = akey_fade_patch;
 }
@@ -310,19 +338,13 @@ int APanPatch::handle_event()
        double position = mwindow->edl->local_session->get_selectionstart(1);
        Autos *pan_autos = patch->atrack->automation->autos[AUTOMATION_PAN];
        int need_undo = !pan_autos->auto_exists_for_editing(position);
-
        mwindow->undo->update_undo_before(_("pan"), need_undo ? 0 : this);
-
        current = (PanAuto*)pan_autos->get_auto_for_editing(position);
-
        current->handle_x = get_stick_x();
        current->handle_y = get_stick_y();
        memcpy(current->values, get_values(), sizeof(float) * mwindow->edl->session->audio_channels);
-
        mwindow->undo->update_undo_after(_("pan"), LOAD_AUTOMATION);
-
        mwindow->sync_parameters(CHANGE_PARAMS);
-
        if( need_undo && mwindow->edl->session->auto_conf->autos[AUTOMATION_PAN] ) {
                mwindow->gui->draw_overlays(1);
        }
@@ -374,3 +396,35 @@ AMixPatch::~AMixPatch()
 {
 }
 
+AKeyPatchAutoEdge::AKeyPatchAutoEdge(MWindow *mwindow,
+               AKeyFadePatch *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_edge"),
+                patch->gui->span,_("Edge"))
+{
+       this->mwindow = mwindow;
+       this->patch = patch;
+       set_tooltip(_("Bump uses left edge"));
+}
+
+int AKeyPatchAutoEdge::handle_event()
+{
+       patch->set_edge(get_value());
+       return 1;
+}
+
+AKeyPatchAutoSpan::AKeyPatchAutoSpan(MWindow *mwindow,
+               AKeyFadePatch *patch, int x, int y)
+ :  BC_Toggle(x, y, mwindow->theme->get_image_set("bump_span"),
+               patch->gui->span,_("Span"))
+{
+       this->mwindow = mwindow;
+       this->patch = patch;
+       set_tooltip(_("Bump spans to next"));
+}
+
+int AKeyPatchAutoSpan::handle_event()
+{
+       patch->set_span(get_value());
+       return 1;
+}
+
index 5b8411a43762677fc4da49c2f5ec1120a31ba552..a9bee09529dda94267225531f257ee51746f7423 100644 (file)
@@ -59,15 +59,21 @@ public:
 class AKeyFadePatch : public BC_SubWindow
 {
 public:
-       AKeyFadePatch(MWindow *mwindow, APatchGUI *patch, int x, int y);
+       AKeyFadePatch(MWindow *mwindow, APatchGUI *patch,
+                       int bump, int x, int y);
+       ~AKeyFadePatch();
        void create_objects();
+       void set_edge(int edge);
+       void set_span(int span);
        void update(float v);
 
        MWindow *mwindow;
-       APatchGUI *patch;
+       APatchGUI *gui;
        AKeyFadeOK *akey_fade_ok;
        AKeyFadeText *akey_fade_text;
        AKeyFadeSlider *akey_fade_slider;
+       AKeyPatchAutoEdge *auto_edge;
+       AKeyPatchAutoSpan *auto_span;
 };
 
 class AKeyFadeOK : public BC_Button
@@ -131,4 +137,22 @@ public:
        ~AMixPatch();
 };
 
+class AKeyPatchAutoEdge : public BC_Toggle
+{
+public:
+       AKeyPatchAutoEdge(MWindow *mwindow, AKeyFadePatch *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       AKeyFadePatch *patch;
+};
+
+class AKeyPatchAutoSpan : public BC_Toggle
+{
+public:
+       AKeyPatchAutoSpan(MWindow *mwindow, AKeyFadePatch *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       AKeyFadePatch *patch;
+};
+
 #endif
index 866a167df4f21183228a0b7dccdbb466489d180b..6a62b83efeeb48ed5b63546f12848f3579c5f0c3 100644 (file)
@@ -36,5 +36,7 @@ class APanPatch;
 class AKeyPanPatch;
 class AMeterPatch;
 class AMixPatch;
+class AKeyPatchAutoEdge;
+class AKeyPatchAutoSpan;
 
 #endif
index 73e89a917ceb448f5510379ecea05f6a63e74987..d08aae57aef58e609e4962bea2ac48ebc76c69f9 100644 (file)
@@ -265,7 +265,7 @@ int Autos::auto_exists_for_editing(double position)
 
 Auto* Autos::get_auto_at_position(double position)
 {
-       int64_t unit_position = track->to_units(position, 0);
+       int64_t unit_position = track->to_units(position, 1);
 
        for(Auto *current = first;
                current;
@@ -290,7 +290,7 @@ Auto* Autos::get_auto_for_editing(double position, int create)
        get_prev_auto(track->to_units(position, 0), PLAY_FORWARD, result);
        if( create > 0 ) create = edl->session->auto_keyframes;
        if( create && (!result || result->is_default ||
-              !EQUIV(track->from_units(result->position), position)) ) {
+           !EQUIV(track->from_units(result->position), position)) ) {
 //printf("Autos::get_auto_for_editing %p %p %p\n", default_auto, first, result);
                position = edl->align_to_frame(position, 0);
                result = insert_auto(track->to_units(position, 0));
@@ -383,10 +383,11 @@ Auto* Autos::insert_auto(int64_t position, Auto *templ)
 // Set curve mode
                if( !templ && result->is_floatauto() ) {
                        FloatAuto *floatauto = (FloatAuto *)result;
-                       floatauto->curve_mode =
+                       FloatAuto::t_mode new_mode =
                                edl->local_session->playback_start >= 0 &&
                                edl->local_session->playback_end < 0 ? FloatAuto::SMOOTH :
                                        (FloatAuto::t_mode) edl->local_session->floatauto_type;
+                       floatauto->change_curve_mode(new_mode, 0);
                }
        }
        else
index 5c2ed20785be62ff25f1efbef060320dfdb89f67..9416cee9ba6b3b4735814495e427b5ed6cc6dc63 100644 (file)
@@ -190,7 +190,8 @@ void CWindow::calculate_affected_autos(Track *track,
        if( y_auto )
                *y_auto = (FloatAuto*) calculate_affected_auto(track->automation->autos[iy],
                                create_y, &y_created, redraw);
-       if( z_auto ) *z_auto = (FloatAuto*) calculate_affected_auto(track->automation->autos[iz],
+       if( z_auto )
+               *z_auto = (FloatAuto*) calculate_affected_auto(track->automation->autos[iz],
                                create_z, &z_created, redraw);
 }
 
index 6ac2035c0bb9956f86b2cd741cda4d476cbf0580..560b079e448b4eb7e0cffbd7fee30532e9fc2bdb 100644 (file)
@@ -3054,9 +3054,13 @@ int CWindowCanvas::test_bezier(int button_press,
                                redraw = 1;
                        }
 
-                       float x_val = gui->affected_x->get_value();
-                       float y_val = gui->affected_y->get_value();
-                       float z_val = gui->affected_z->get_value();
+                       CWindowToolGUI *tool_gui = !gui->tool_panel ? 0 : gui->tool_panel->tool_gui;
+                       int edge = tool_gui ? tool_gui->edge : 0;
+                       int span = tool_gui ? tool_gui->span : 0;
+
+                       float x_val = gui->affected_x->get_value(edge);
+                       float y_val = gui->affected_y->get_value(edge);
+                       float z_val = gui->affected_z->get_value(edge);
 
                        if( gui->translating_zoom ) {
                                float z = gui->center_z + (cursor_y - gui->y_origin) / yS(128);
@@ -3066,7 +3070,7 @@ int CWindowCanvas::test_bezier(int button_press,
                                        redraw = 1;
                                        redraw_canvas = 1;
                                }
-                               gui->affected_z->set_value(z);
+                               gui->affected_z->bump_value(z, edge, span);
                        }
                        else {
                                float dx = cursor_x - gui->x_origin;
@@ -3077,8 +3081,8 @@ int CWindowCanvas::test_bezier(int button_press,
                                }
                                float x = gui->center_x + dx;
                                float y = gui->center_y + dy;
-                               gui->affected_x->set_value(x);
-                               gui->affected_y->set_value(y);
+                               gui->affected_x->bump_value(x, edge, span);
+                               gui->affected_y->bump_value(y, edge, span);
                                if( !EQUIV(x_val, x) || !EQUIV(y_val, y) ) {
                                        rerender = 1;
                                        redraw = 1;
index 55d64b4504a871d9588508618ed8fd17618f640b..c0fc37cc3cf0272f6c64f1b4ac0f892cd8a8a6c4 100644 (file)
@@ -273,6 +273,7 @@ CWindowToolGUI::CWindowToolGUI(MWindow *mwindow,
        this->mwindow = mwindow;
        this->thread = thread;
        current_operation = 0;
+       span = 1;  edge = 0;
 }
 
 CWindowToolGUI::~CWindowToolGUI()
@@ -327,6 +328,23 @@ int CWindowToolGUI::translation_event()
        return 0;
 }
 
+void CWindowToolGUI::update_auto(Track *track, int idx, CWindowCoord *vp)
+{
+       FloatAuto *float_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
+                       track->automation->autos[idx], 1);
+       if( !float_auto ) return;
+       float v = float_auto->get_value(edge);
+       float t = atof(vp->get_text());
+       if( v == t ) return;
+       float_auto->bump_value(t, edge, span);
+       if( idx == AUTOMATION_PROJECTOR_Z || idx == AUTOMATION_CAMERA_Z ) {
+               mwindow->gui->lock_window("CWindowToolGUI::update_auto");
+               mwindow->gui->draw_overlays(1);
+               mwindow->gui->unlock_window();
+       }
+       update();
+       update_preview();
+}
 
 void CWindowToolGUI::update_preview(int changed_edl)
 {
@@ -821,30 +839,27 @@ struct _CVD {
        const char* tooltip;
 };
 
-const _CVD Camera_Crv_Smooth =
-       {       FloatAuto::SMOOTH,
-               true,
-               "tan_smooth",
-               N_("\"smooth\" Curve on current Camera Keyframes")
-       };
-const _CVD Camera_Crv_Linear =
-       {       FloatAuto::LINEAR,
-               true,
-               "tan_linear",
-               N_("\"linear\" Curve on current Camera Keyframes")
-       };
-const _CVD Projector_Crv_Smooth =
-       {       FloatAuto::SMOOTH,
-               false,
-               "tan_smooth",
-               N_("\"smooth\" Curve on current Projector Keyframes")
-       };
-const _CVD Projector_Crv_Linear =
-       {       FloatAuto::LINEAR,
-               false,
-               "tan_linear",
-               N_("\"linear\" Curve on current Projector Keyframes")
-       };
+const _CVD Camera_Crv_Smooth = { FloatAuto::SMOOTH, true, "tan_smooth",
+               N_("\"smooth\" Curve on current Camera Keyframes") };
+const _CVD Camera_Crv_Linear = { FloatAuto::LINEAR, true, "tan_linear",
+               N_("\"linear\" Curve on current Camera Keyframes") };
+const _CVD Camera_Crv_Tangent = { FloatAuto::TFREE, true, "tan_tangent",
+               N_("\"tangent\" Curve on current Camera Keyframes") };
+const _CVD Camera_Crv_Free  = { FloatAuto::FREE, true, "tan_free",
+               N_("\"free\" Curve on current Camera Keyframes") };
+const _CVD Camera_Crv_Bump = { FloatAuto::BUMP, true, "tan_bump",
+               N_("\"bump\" Curve on current Camera Keyframes") };
+
+const _CVD Projector_Crv_Smooth = { FloatAuto::SMOOTH, false, "tan_smooth",
+               N_("\"smooth\" Curve on current Projector Keyframes") };
+const _CVD Projector_Crv_Linear = { FloatAuto::LINEAR, false, "tan_linear",
+               N_("\"linear\" Curve on current Projector Keyframes") };
+const _CVD Projector_Crv_Tangent = { FloatAuto::TFREE, false, "tan_tangent",
+               N_("\"tangent\" Curve on current Projector Keyframes") };
+const _CVD Projector_Crv_Free  = { FloatAuto::FREE, false, "tan_free",
+               N_("\"free\" Curve on current Projector Keyframes") };
+const _CVD Projector_Crv_Bump = { FloatAuto::BUMP, false, "tan_bump",
+               N_("\"bump\" Curve on current Projector Keyframes") };
 
 // Implementation Class für Keyframe Curve Mode buttons
 //
@@ -857,17 +872,19 @@ const _CVD Projector_Crv_Linear =
 class CWindowCurveToggle : public BC_Toggle
 {
 public:
-       CWindowCurveToggle(_CVD mode, MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       CWindowCurveToggle(const _CVD &mode,
+                       MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
        void check_toggle_state(FloatAuto *x, FloatAuto *y, FloatAuto *z);
        int handle_event();
 private:
-       _CVD cfg;
+       const _CVD &cfg;
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
 
-CWindowCurveToggle::CWindowCurveToggle(_CVD mode, MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
+CWindowCurveToggle::CWindowCurveToggle(const _CVD &mode,
+                       MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
  : BC_Toggle(x, y, mwindow->theme->get_image_set(mode.icon_id), false),
    cfg(mode)
 {
@@ -941,6 +958,7 @@ void CWindowCameraGUI::create_objects()
        FloatAuto *x_auto = 0, *y_auto = 0, *z_auto = 0;
        BC_Title *title;
        BC_Button *button;
+       span = 1;  edge = 0;
 
        lock_window("CWindowCameraGUI::create_objects");
        if( track ) {
@@ -978,9 +996,15 @@ void CWindowCameraGUI::create_objects()
        add_subwindow(button = new CWindowCameraRight(mwindow, this, x1, y));
 // additional Buttons to control the curve mode of the "current" keyframe
        x1 += button->get_w() + xs15;
-       add_subwindow(this->t_smooth = new CWindowCurveToggle(Camera_Crv_Smooth, mwindow, this, x1, y));
-       x1 += button->get_w() + xs10;
-       add_subwindow(this->t_linear = new CWindowCurveToggle(Camera_Crv_Linear, mwindow, this, x1, y));
+       add_subwindow(t_smooth = new CWindowCurveToggle(Camera_Crv_Smooth, mwindow, this, x1, y));
+       x1 += t_smooth->get_w() + xs10;
+       add_subwindow(t_linear = new CWindowCurveToggle(Camera_Crv_Linear, mwindow, this, x1, y));
+       x1 += t_linear->get_w() + xs10;
+       add_subwindow(t_tangent = new CWindowCurveToggle(Camera_Crv_Tangent, mwindow, this, x1, y));
+       x1 += t_tangent->get_w() + xs10;
+       add_subwindow(t_free = new CWindowCurveToggle(Camera_Crv_Free, mwindow, this, x1, y));
+       x1 += t_free->get_w() + xs10;
+       add_subwindow(t_bump = new CWindowCurveToggle(Camera_Crv_Bump, mwindow, this, x1, y));
 
        y += button->get_h();
        x1 = xs10;
@@ -990,9 +1014,13 @@ void CWindowCameraGUI::create_objects()
        x1 += button->get_w();
        add_subwindow(button = new CWindowCameraBottom(mwindow, this, x1, y));
        x1 += button->get_w() + xs15;
-       add_subwindow(this->add_keyframe = new CWindowCameraAddKeyframe(mwindow, this, x1, y));
-       x1 += button->get_w() + xs10;
-       add_subwindow(this->reset = new CWindowCameraReset(mwindow, this, x1, y));
+       add_subwindow(add_keyframe = new CWindowCameraAddKeyframe(mwindow, this, x1, y));
+       x1 += add_keyframe->get_w() + xs15;
+       add_subwindow(auto_edge = new CWindowCurveAutoEdge(mwindow, this, x1, y));
+       x1 += auto_edge->get_w() + xs10;
+       add_subwindow(auto_span = new CWindowCurveAutoSpan(mwindow, this, x1, y));
+       x1 += auto_span->get_w() + xs15;
+       add_subwindow(reset = new CWindowCameraReset(mwindow, this, x1, y));
 
 // fill in current auto keyframe values, set toggle states.
        this->update();
@@ -1001,62 +1029,16 @@ void CWindowCameraGUI::create_objects()
 
 void CWindowCameraGUI::handle_event()
 {
-       FloatAuto *x_auto = 0;
-       FloatAuto *y_auto = 0;
-       FloatAuto *z_auto = 0;
        Track *track = mwindow->cwindow->calculate_affected_track();
-       if(track)
-       {
-               mwindow->undo->update_undo_before(_("camera"), this);
-               if(event_caller == x)
-               {
-                       x_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
-                               track->automation->autos[AUTOMATION_CAMERA_X], 1);
-                       if(x_auto)
-                       {
-                               x_auto->set_value(atof(x->get_text()));
-                               update();
-                               update_preview();
-                       }
-               }
-               else
-               if(event_caller == y)
-               {
-                       y_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
-                               track->automation->autos[AUTOMATION_CAMERA_Y], 1);
-                       if(y_auto)
-                       {
-                               y_auto->set_value(atof(y->get_text()));
-                               update();
-                               update_preview();
-                       }
-               }
-               else
-               if(event_caller == z)
-               {
-                       z_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
-                               track->automation->autos[AUTOMATION_CAMERA_Z], 1);
-                       if(z_auto)
-                       {
-                               float zoom = atof(z->get_text());
-                               if(zoom > 100.) zoom = 100.;
-                               else
-                               if(zoom < 0.01) zoom = 0.01;
-       // Doesn't allow user to enter from scratch
-       //              if(zoom != atof(z->get_text()))
-       //                      z->update(zoom);
-
-                               z_auto->set_value(zoom);
-                               mwindow->gui->lock_window("CWindowCameraGUI::handle_event");
-                               mwindow->gui->draw_overlays(1);
-                               mwindow->gui->unlock_window();
-                               update();
-                               update_preview();
-                       }
-               }
-
-               mwindow->undo->update_undo_after(_("camera"), LOAD_ALL);
-       }
+       if( !track ) return;
+       mwindow->undo->update_undo_before(_("camera"), this);
+       if( event_caller == x )
+               update_auto(track, AUTOMATION_CAMERA_X, x);
+       else if( event_caller == y )
+               update_auto(track, AUTOMATION_CAMERA_Y, y);
+       else if( event_caller == z )
+               update_auto(track, AUTOMATION_CAMERA_Z, z);
+       mwindow->undo->update_undo_after(_("camera"), LOAD_ALL);
 }
 
 void CWindowCameraGUI::update()
@@ -1065,21 +1047,32 @@ void CWindowCameraGUI::update()
        FloatAuto *y_auto = 0;
        FloatAuto *z_auto = 0;
        Track *track = mwindow->cwindow->calculate_affected_track();
+       int bg_color = get_resources()->text_background;
+       int hi_color = bg_color ^ 0x444444;
        if( track ) {
                mwindow->cwindow->calculate_affected_autos(track,
                        &x_auto, &y_auto, &z_auto, 1, 0, 0, 0);
        }
 
        if( x_auto ) {
-               float xvalue = x_auto->get_value();
+               int color = (edge || span) && x_auto->curve_mode == FloatAuto::BUMP ?
+                       hi_color : bg_color;
+               x->get_textbox()->set_back_color(color);
+               float xvalue = x_auto->get_value(edge);
                x->update_gui(xvalue);
        }
        if( y_auto ) {
-               float yvalue = y_auto->get_value();
+               int color = (edge || span) && y_auto->curve_mode == FloatAuto::BUMP ?
+                       hi_color : bg_color;
+               y->get_textbox()->set_back_color(color);
+               float yvalue = y_auto->get_value(edge);
                y->update_gui(yvalue);
        }
        if( z_auto ) {
-               float zvalue = z_auto->get_value();
+               int color = (edge || span) && z_auto->curve_mode == FloatAuto::BUMP ?
+                       hi_color : bg_color;
+               z->get_textbox()->set_back_color(color);
+               float zvalue = z_auto->get_value(edge);
                z->update_gui(zvalue);
                thread->gui->lock_window("CWindowCameraGUI::update");
                thread->gui->composite_panel->cpanel_zoom->update(zvalue);
@@ -1089,6 +1082,9 @@ void CWindowCameraGUI::update()
        if( x_auto && y_auto && z_auto ) {
                t_smooth->check_toggle_state(x_auto, y_auto, z_auto);
                t_linear->check_toggle_state(x_auto, y_auto, z_auto);
+               t_tangent->check_toggle_state(x_auto, y_auto, z_auto);
+               t_free->check_toggle_state(x_auto, y_auto, z_auto);
+               t_bump->check_toggle_state(x_auto, y_auto, z_auto);
        }
 }
 
@@ -1335,6 +1331,38 @@ int CWindowCameraReset::handle_event()
        return gui->press(&CWindowCanvas::reset_camera);
 }
 
+CWindowCurveAutoEdge::CWindowCurveAutoEdge(MWindow *mwindow,
+               CWindowToolGUI *gui, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_edge"), gui->edge)
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_tooltip(_("Bump edit edge left/right"));
+}
+
+int CWindowCurveAutoEdge::handle_event()
+{
+       gui->edge = get_value();
+       gui->update();
+       return 1;
+}
+
+CWindowCurveAutoSpan::CWindowCurveAutoSpan(MWindow *mwindow,
+               CWindowToolGUI *gui, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_span"), gui->span)
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_tooltip(_("Bump spans to next/prev"));
+}
+
+int CWindowCurveAutoSpan::handle_event()
+{
+       gui->span = get_value();
+       gui->update();
+       return 1;
+}
+
 
 CWindowProjectorGUI::CWindowProjectorGUI(MWindow *mwindow, CWindowTool *thread)
  : CWindowToolGUI(mwindow, thread, _(PROGRAM_NAME ": Projector"), xS(340), yS(170))
@@ -1354,6 +1382,7 @@ void CWindowProjectorGUI::create_objects()
        FloatAuto *z_auto = 0;
        BC_Title *title;
        BC_Button *button;
+       span = 1;  edge = 0;
 
        lock_window("CWindowProjectorGUI::create_objects");
        if( track ) {
@@ -1390,9 +1419,15 @@ void CWindowProjectorGUI::create_objects()
        add_subwindow(button = new CWindowProjectorRight(mwindow, this, x1, y));
 // additional Buttons to control the curve mode of the "current" keyframe
        x1 += button->get_w() + xs15;
-       add_subwindow(this->t_smooth = new CWindowCurveToggle(Projector_Crv_Smooth, mwindow, this, x1, y));
-       x1 += button->get_w() + xs10;
-       add_subwindow(this->t_linear = new CWindowCurveToggle(Projector_Crv_Linear, mwindow, this, x1, y));
+       add_subwindow(t_smooth = new CWindowCurveToggle(Projector_Crv_Smooth, mwindow, this, x1, y));
+       x1 += t_smooth->get_w() + xs10;
+       add_subwindow(t_linear = new CWindowCurveToggle(Projector_Crv_Linear, mwindow, this, x1, y));
+       x1 += t_linear->get_w() + xs15;
+       add_subwindow(t_tangent = new CWindowCurveToggle(Projector_Crv_Tangent, mwindow, this, x1, y));
+       x1 += t_tangent->get_w() + xs10;
+       add_subwindow(t_free = new CWindowCurveToggle(Projector_Crv_Free, mwindow, this, x1, y));
+       x1 += t_free->get_w() + xs10;
+       add_subwindow(t_bump = new CWindowCurveToggle(Projector_Crv_Bump, mwindow, this, x1, y));
 
        y += button->get_h();
        x1 = xs10;
@@ -1402,9 +1437,13 @@ void CWindowProjectorGUI::create_objects()
        x1 += button->get_w();
        add_subwindow(button = new CWindowProjectorBottom(mwindow, this, x1, y));
        x1 += button->get_w() + xs15;
-       add_subwindow(this->add_keyframe = new CWindowProjectorAddKeyframe(mwindow, this, x1, y));
-       x1 += button->get_w() + xs10;
-       add_subwindow(this->reset = new CWindowProjectorReset(mwindow, this, x1, y));
+       add_subwindow(add_keyframe = new CWindowProjectorAddKeyframe(mwindow, this, x1, y));
+       x1 += add_keyframe->get_w() + xs15;
+       add_subwindow(auto_span = new CWindowCurveAutoSpan(mwindow, this, x1, y));
+       x1 += auto_span->get_w() + xs10;
+       add_subwindow(auto_edge = new CWindowCurveAutoEdge(mwindow, this, x1, y));
+       x1 += auto_edge->get_w() + xs15;
+       add_subwindow(reset = new CWindowProjectorReset(mwindow, this, x1, y));
 
 // fill in current auto keyframe values, set toggle states.
        this->update();
@@ -1413,61 +1452,16 @@ void CWindowProjectorGUI::create_objects()
 
 void CWindowProjectorGUI::handle_event()
 {
-       FloatAuto *x_auto = 0;
-       FloatAuto *y_auto = 0;
-       FloatAuto *z_auto = 0;
        Track *track = mwindow->cwindow->calculate_affected_track();
-
-       if(track)
-       {
-               mwindow->undo->update_undo_before(_("projector"), this);
-               if(event_caller == x)
-               {
-                       x_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
-                               track->automation->autos[AUTOMATION_PROJECTOR_X], 1);
-                       if(x_auto)
-                       {
-                               x_auto->set_value(atof(x->get_text()));
-                               update();
-                               update_preview();
-                       }
-               }
-               else
-               if(event_caller == y)
-               {
-                       y_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
-                               track->automation->autos[AUTOMATION_PROJECTOR_Y], 1);
-                       if(y_auto)
-                       {
-                               y_auto->set_value(atof(y->get_text()));
-                               update();
-                               update_preview();
-                       }
-               }
-               else
-               if(event_caller == z)
-               {
-                       z_auto = (FloatAuto*)mwindow->cwindow->calculate_affected_auto(
-                               track->automation->autos[AUTOMATION_PROJECTOR_Z], 1);
-                       if(z_auto)
-                       {
-                               float zoom = atof(z->get_text());
-                               if(zoom > 100.) zoom = 100.;
-                               else if(zoom < 0.01) zoom = 0.01;
-//                     if (zoom != atof(z->get_text()))
-//                             z->update(zoom);
-                               z_auto->set_value(zoom);
-
-                               mwindow->gui->lock_window("CWindowProjectorGUI::handle_event");
-                               mwindow->gui->draw_overlays(1);
-                               mwindow->gui->unlock_window();
-
-                               update();
-                               update_preview();
-                       }
-               }
-               mwindow->undo->update_undo_after(_("projector"), LOAD_ALL);
-       }
+       if( !track ) return;
+       mwindow->undo->update_undo_before(_("projector"), this);
+       if( event_caller == x )
+               update_auto(track, AUTOMATION_PROJECTOR_X, x);
+       else if( event_caller == y )
+               update_auto(track, AUTOMATION_PROJECTOR_Y, y);
+       else if( event_caller == z )
+               update_auto(track, AUTOMATION_PROJECTOR_Z, z);
+       mwindow->undo->update_undo_after(_("projector"), LOAD_ALL);
 }
 
 void CWindowProjectorGUI::update()
@@ -1476,21 +1470,32 @@ void CWindowProjectorGUI::update()
        FloatAuto *y_auto = 0;
        FloatAuto *z_auto = 0;
        Track *track = mwindow->cwindow->calculate_affected_track();
+       int bg_color = get_resources()->text_background;
+       int hi_color = bg_color ^ 0x444444;
        if( track ) {
                mwindow->cwindow->calculate_affected_autos(track,
                        &x_auto, &y_auto, &z_auto, 0, 0, 0, 0);
        }
 
        if( x_auto ) {
-               float xvalue = x_auto->get_value();
+               int color = (edge || span) && x_auto->curve_mode == FloatAuto::BUMP ?
+                       hi_color : bg_color;
+               x->get_textbox()->set_back_color(color);
+               float xvalue = x_auto->get_value(edge);
                x->update_gui(xvalue);
        }
        if( y_auto ) {
-               float yvalue = y_auto->get_value();
+               int color = (edge || span) && y_auto->curve_mode == FloatAuto::BUMP ?
+                       hi_color : bg_color;
+               y->get_textbox()->set_back_color(color);
+               float yvalue = y_auto->get_value(edge);
                y->update_gui(yvalue);
        }
        if( z_auto ) {
-               float zvalue = z_auto->get_value();
+               int color = (edge || span) && z_auto->curve_mode == FloatAuto::BUMP ?
+                       hi_color : bg_color;
+               z->get_textbox()->set_back_color(color);
+               float zvalue = z_auto->get_value(edge);
                z->update_gui(zvalue);
                thread->gui->lock_window("CWindowProjectorGUI::update");
                thread->gui->composite_panel->cpanel_zoom->update(zvalue);
@@ -1500,6 +1505,9 @@ void CWindowProjectorGUI::update()
        if( x_auto && y_auto && z_auto ) {
                t_smooth->check_toggle_state(x_auto, y_auto, z_auto);
                t_linear->check_toggle_state(x_auto, y_auto, z_auto);
+               t_tangent->check_toggle_state(x_auto, y_auto, z_auto);
+               t_free->check_toggle_state(x_auto, y_auto, z_auto);
+               t_bump->check_toggle_state(x_auto, y_auto, z_auto);
        }
 }
 
index 00e485e3c4cde4b90bda439e79d3a10539d0323f..942651f2fbeab4d9ba230638523b0137c680b4c4 100644 (file)
@@ -93,6 +93,7 @@ public:
 
 // Update EDL and preview only
        void update_preview(int changed_edl=0);
+       void update_auto(Track *track, int idx, CWindowCoord *vp);
        void draw_preview(int changed_edl);
        int current_operation;
        virtual int close_event();
@@ -103,6 +104,7 @@ public:
        MWindow *mwindow;
        CWindowTool *thread;
        CWindowCoord *event_caller;
+       int edge, span;
 };
 
 class CWindowCoord : public BC_TumbleTextBox
@@ -144,6 +146,26 @@ public:
        CWindowCoord *coord;
 };
 
+class CWindowCurveAutoEdge : public BC_Toggle
+{
+public:
+       CWindowCurveAutoEdge(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       int handle_event();
+
+       MWindow *mwindow;
+       CWindowToolGUI *gui;
+};
+
+class CWindowCurveAutoSpan : public BC_Toggle
+{
+public:
+       CWindowCurveAutoSpan(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+
+       int handle_event();
+       MWindow *mwindow;
+       CWindowToolGUI *gui;
+};
+
 
 class CWindowCropApply : public BC_GenericButton
 {
@@ -795,7 +817,9 @@ public:
        CWindowCoord *x, *y, *z;
        CWindowCameraAddKeyframe *add_keyframe;
        CWindowCameraReset *reset;
-       CWindowCurveToggle *t_smooth, *t_linear;
+       CWindowCurveToggle *t_smooth, *t_linear, *t_tangent, *t_free, *t_bump;
+       CWindowCurveAutoSpan *auto_span;
+       CWindowCurveAutoEdge *auto_edge;
 };
 
 class CWindowCameraLeft : public BC_Button
@@ -891,7 +915,9 @@ public:
        CWindowCoord *x, *y, *z;
        CWindowProjectorAddKeyframe *add_keyframe;
        CWindowProjectorReset *reset;
-       CWindowCurveToggle *t_smooth, *t_linear;
+       CWindowCurveToggle *t_smooth, *t_linear, *t_tangent, *t_free, *t_bump;
+       CWindowCurveAutoSpan *auto_span;
+       CWindowCurveAutoEdge *auto_edge;
 };
 
 class CWindowProjectorLeft : public BC_Button
index af53c37882f5b8e67334ee1e5b0c05c140e57caa..4124fc03c2efb9479e8399bd85d47b47b33eaf3e 100644 (file)
@@ -27,6 +27,8 @@ class CWindowToolGUI;
 class CWindowCoord;
 class CWindowCoordSlider;
 class CWindowCoordRange;
+class CWindowCurveAutoEdge;
+class CWindowCurveAutoSpan;
 class CWindowCropApply;
 class CWindowCropOpMode;
 class CWindowCropOpItem;
index b3915cfc44de133644e71180239b519170199d2d..c08a01db57d0431977e98c4ddd35913e413be33d 100644 (file)
@@ -3961,6 +3961,9 @@ double FFMPEG::get_initial_timecode(int data_type, int channel, double frame_rat
                fidx = aud->fidx;
                nudge = aud->nudge;
                st = aud->st;
+               AVDictionaryEntry *tref = av_dict_get(fmt_ctx->metadata, "time_reference", 0, 0);
+               if( tref && aud && aud->sample_rate )
+                       return strtod(tref->value, 0) / aud->sample_rate;
                break; }
        case TRACK_VIDEO: {
                codec_type = AVMEDIA_TYPE_VIDEO;
index d575c38e9d846aa2c507145582600c0da821a556..a72d525292122f10b9eccc8b45f7f47928e1bf61 100644 (file)
@@ -34,6 +34,7 @@ FloatAuto::FloatAuto(EDL *edl, FloatAutos *autos)
  : Auto(edl, (Autos*)autos)
 {
        value = 0;
+       value1 = 0;
        control_in_value = 0;
        control_out_value = 0;
        control_in_position = 0;
@@ -68,6 +69,7 @@ int FloatAuto::operator==(FloatAuto &that)
 int FloatAuto::identical(FloatAuto *src)
 {
        return EQUIV(value, src->value) &&
+               (curve_mode != BUMP || EQUIV(value1, src->value1)) &&
                EQUIV(control_in_value, src->control_in_value) &&
                EQUIV(control_out_value, src->control_out_value);
                // ctrl positions ignored, as they may depend on neighbours
@@ -78,6 +80,7 @@ int FloatAuto::identical(FloatAuto *src)
 int FloatAuto::equals(FloatAuto *that)
 {
        return this->value == that->value &&
+               (this->curve_mode != BUMP || this->value1 == that->value1) &&
                this->control_in_value == that->control_in_value &&
                this->control_out_value == that->control_out_value &&
                this->control_in_position == that->control_in_position &&
@@ -86,21 +89,6 @@ int FloatAuto::equals(FloatAuto *that)
 }
 
 
-/* Note: the following is essentially display-code and has been moved to:
- *  TrackCanvas::value_to_percentage(float auto_value, int autogrouptype)
- *
-float FloatAuto::value_to_percentage()
-{
-}
-float FloatAuto::value_to_percentage()
-{
-}
-float FloatAuto::value_to_percentage()
-{
-}
-*/
-
-
 void FloatAuto::copy_from(Auto *that)
 {
        copy_from((FloatAuto*)that);
@@ -110,6 +98,7 @@ void FloatAuto::copy_from(FloatAuto *that)
 {
        Auto::copy_from(that);
        this->value = that->value;
+       this->value1 = that->value1;
        this->control_in_value = that->control_in_value;
        this->control_out_value = that->control_out_value;
        this->control_in_position = that->control_in_position;
@@ -169,33 +158,37 @@ int FloatAuto::interpolate_from(Auto *a1, Auto *a2, int64_t pos, Auto *templ)
 }
 
 
-void FloatAuto::change_curve_mode(t_mode new_mode)
+void FloatAuto::change_curve_mode(t_mode new_mode, int adjust)
 {
        if(new_mode == TFREE && !(control_in_position && control_out_position))
                new_mode = FREE; // only if curves on both sides...
+       else if(new_mode == BUMP )
+               value1 = value;  // continuous
 
        curve_mode = new_mode;
-       adjust_curves();
+       if( adjust )
+               adjust_curves();
 }
 
 void FloatAuto::toggle_curve_mode()
 {
        switch (curve_mode) {
-       case SMOOTH:    change_curve_mode(TFREE);  break;
-       case LINEAR:    change_curve_mode(FREE);   break;
-       case TFREE :    change_curve_mode(LINEAR); break;
-       case FREE  :    change_curve_mode(SMOOTH); break;
+       case SMOOTH:    change_curve_mode(LINEAR);  break;
+       case LINEAR:    change_curve_mode(TFREE);   break;
+       case TFREE :    change_curve_mode(FREE);    break;
+       case FREE  :    change_curve_mode(BUMP);    break;
+       case BUMP  :    change_curve_mode(SMOOTH);  break;
        }
 }
 
-
-void FloatAuto::set_value(float value)
+// edge=0:left edge, 1:right edge, -1:both edges
+void FloatAuto::set_value(float value, int edge)
 {
        float float_min = ((FloatAutos*)autos)->float_min;
-       if( value < float_min ) value = float_min;
        float float_max = ((FloatAutos*)autos)->float_max;
-       if( value > float_max ) value = float_max;
-       this->value = value;
+       bclamp(value, float_min, float_max);
+       if( curve_mode != BUMP || edge <= 0 ) this->value = value;
+       if( curve_mode == BUMP && edge != 0 ) this->value1 = value;
        this->adjust_curves();
        if(previous) ((FloatAuto*)previous)->adjust_curves();
        if(next)     ((FloatAuto*)next)->adjust_curves();
@@ -205,7 +198,8 @@ void FloatAuto::set_control_in_value(float newvalue)
 {
        switch(curve_mode) {
        case TFREE:     control_out_value = control_out_position*newvalue / control_in_position;
-       case FREE:      control_in_value = newvalue;
+       case FREE:
+       case BUMP:      control_in_value = newvalue;
        default:        return; // otherwise calculated automatically...
        }
 }
@@ -214,7 +208,8 @@ void FloatAuto::set_control_out_value(float newvalue)
 {
        switch(curve_mode) {
        case TFREE:     control_in_value = control_in_position*newvalue / control_out_position;
-       case FREE:      control_out_value=newvalue;
+       case FREE:
+       case BUMP:      control_out_value = newvalue;
        default:        return;
        }
 }
@@ -298,7 +293,9 @@ inline void FloatAuto::calculate_slope(FloatAuto *left, FloatAuto *right, float
        if(!left || !right) return;
 
        dx = right->position - left->position;
-       float dv = right->value - left->value;
+       float lval = left->get_value(0);
+       float rval = right->get_value(1);
+       float dv = rval - lval;
        dvdx = (dx == 0) ? 0 : dv/dx;
 }
 
@@ -361,9 +358,8 @@ void FloatAuto::adjust_to_new_coordinates(int64_t position, float value)
 // define new position and value in one step, do necessary re-adjustments
 {
        float float_min = ((FloatAutos*)autos)->float_min;
-       if( value < float_min ) value = float_min;
        float float_max = ((FloatAutos*)autos)->float_max;
-       if( value > float_max ) value = float_max;
+       bclamp(value, float_min, float_max);
        this->value = value;
        this->position = position;
        adjust_ctrl_positions();
@@ -411,6 +407,7 @@ void FloatAuto::copy(int64_t start, int64_t end, FileXML *file, int default_auto
        else
                file->tag.set_property("POSITION", position - start);
        file->tag.set_property("VALUE", value);
+       file->tag.set_property("VALUE1", value1);
        file->tag.set_property("CONTROL_IN_VALUE", control_in_value / 2.0); // compatibility, see below
        file->tag.set_property("CONTROL_OUT_VALUE", control_out_value / 2.0);
        file->tag.set_property("TANGENT_MODE", (int)curve_mode);
@@ -422,11 +419,12 @@ void FloatAuto::copy(int64_t start, int64_t end, FileXML *file, int default_auto
 
 void FloatAuto::load(FileXML *file)
 {
-       value = file->tag.get_property("VALUE", value);
        float float_min = ((FloatAutos*)autos)->float_min;
-       if( value < float_min ) value = float_min;
        float float_max = ((FloatAutos*)autos)->float_max;
-       if( value > float_max ) value = float_max;
+       value = file->tag.get_property("VALUE", value);
+       bclamp(value, float_min, float_max);
+       value1 = file->tag.get_property("VALUE1", value1);
+       bclamp(value, float_min, float_max);
        control_in_value = file->tag.get_property("CONTROL_IN_VALUE", control_in_value);
        control_out_value = file->tag.get_property("CONTROL_OUT_VALUE", control_out_value);
        curve_mode = (t_mode)file->tag.get_property("TANGENT_MODE", (int)FREE);
@@ -448,8 +446,40 @@ const char *FloatAuto::curve_name(int curve_mode)
        case FloatAuto::SMOOTH: return _("Smooth");
        case FloatAuto::LINEAR: return _("Linear");
        case FloatAuto::TFREE:  return _("Tangent");
-               case FloatAuto::FREE:   return _("Disjoint");
-        }
-        return _("Error");
+       case FloatAuto::FREE:   return _("Disjoint");
+       case FloatAuto::BUMP:   return _("Bump");
+       }
+       return _("Error");
+}
+
+void FloatAuto::bump_update(int64_t pos, float dv, int edge, int span)
+{
+       float *mins = autos->edl->local_session->automation_mins;
+       float *maxs = autos->edl->local_session->automation_maxs;
+       int group = autos->autogrouptype;
+       float min = mins[group], max = maxs[group];
+       int last_edge = edge;
+       FloatAuto *fauto = this;
+       fauto->position = pos;
+       if( fauto->is_bump() && span ) {
+               do {
+                       float v = fauto->get_value(edge) + dv;
+                       bclamp(v, min, max);
+                       fauto->set_value(v, edge);
+                       fauto = (FloatAuto*)(!edge ? fauto->next : fauto->previous);
+               } while( fauto && !fauto->is_bump() );
+               last_edge = !edge ? 1 : 0;
+       }
+       if( fauto ) {
+               float v = fauto->get_value(last_edge) + dv;
+               bclamp(v, min, max);
+               fauto->set_value(v, last_edge);
+       }
+}
+
+void FloatAuto::bump_value(float v, int edge, int span)
+{
+       float dv = v - get_value(edge);
+       bump_update(position, dv, edge, span);
 }
 
index cc4168c46c824b60f526a136459d1742f155b1bc..a6b9c192403fea436f79a7609e09c65554bc4e31 100644 (file)
@@ -49,9 +49,14 @@ public:
        void copy(int64_t start, int64_t end, FileXML *file, int default_only);
        void load(FileXML *xml);
 
-// "the value" (=payload of this keyframe)
-       float get_value() {return this->value;}
-       void  set_value(float newval);
+// for curves, edge==0: the right value, for bumps, edge!=0: the left value1
+       float get_value(int edge=0) {
+               return curve_mode==BUMP && edge ? this->value1 : this->value;
+       }
+// edge==0: set value, for bumps: edge>0, set value1, edge<0: set both
+       void set_value(float value, int edge=-1);
+       void bump_update(int64_t pos, float dv, int edge, int span);
+       void bump_value(float v, int edge, int span);
 
 // Possible policies to handle the tagents for the
 // bézier curves connecting adjacent automation points
@@ -60,12 +65,14 @@ public:
                SMOOTH,     // curves are coupled in order to yield a smooth curve
                LINEAR,     // curves always pointing directly to neighbouring automation points
                TFREE,      // curves on both sides coupled but editable by dragging the handles
-               FREE        // curves on both sides are independent and editable via GUI
+               FREE,       // curves on both sides are independent and editable via GUI
+               BUMP,       // curves and values both sides are independent and editable via GUI
        };
 
        t_mode curve_mode;
-       void change_curve_mode(t_mode); // recalculates curves as well
+       void change_curve_mode(t_mode, int adjust=1); // recalculates curves as well
        void toggle_curve_mode();       // cycles through all modes (e.g. by ctrl-click)
+       int is_bump() { return curve_mode == BUMP ? 1 : 0; }
 
 // Control values (y coords of bézier control point), relative to value
        float get_control_in_value()            {check_pos(); return this->control_in_value;}
@@ -82,7 +89,6 @@ public:
        void adjust_to_new_coordinates(int64_t position, float value);
 // text name for curve mode
        static const char *curve_name(int curve_mode);
-
 private:
        void adjust_curves();             // recalc. ctrk in and out points, if automatic curve mode (SMOOTH or LINEAR)
        void adjust_ctrl_positions(FloatAuto *p=0, FloatAuto *n=0); // recalc. x location of ctrl points, notify neighbours
@@ -93,7 +99,7 @@ private:
        void handle_automatic_curve_after_copy();
 
 // Control values are relative to value
-       float value, control_in_value, control_out_value;
+       float value, control_in_value, control_out_value, value1;
 // X control positions relative to value position for drawing.
 // In native units of the track.
        int64_t control_in_position, control_out_position;
index ca8dc6bf2f95e42f31d101ffb85b7b654daa1cd4..bebbbcc1559e27c4d59d7fed5fd376355f909aa2 100644 (file)
@@ -235,48 +235,58 @@ float FloatAutos::get_value(int64_t position,
        next = (FloatAuto*)get_next_auto(position, direction, (Auto* &)next, 0);
 
 // Constant
-       if(!next && !previous) return ((FloatAuto*)default_auto)->get_value();
-       if(!previous) return next->get_value();
-       if(!next) return previous->get_value();
-       if(next == previous) return previous->get_value();
-
-       if(direction == PLAY_FORWARD)
-       {
-               if(EQUIV(previous->get_value(), next->get_value())) {
+       if( !next && !previous )
+               return ((FloatAuto*)default_auto)->get_value();
+       if( next == previous )
+               return previous->get_value();
+
+       if( direction == PLAY_FORWARD) {
+               if( !previous ) return next->get_value(1);
+               if( !next ) return previous->get_value(0);
+               if( EQUIV(previous->get_value(0), next->get_value(1)) ) {
                        if( (previous->curve_mode == FloatAuto::LINEAR &&
                             next->curve_mode == FloatAuto::LINEAR) ||
                            (EQUIV(previous->get_control_out_value(), 0) &&
-                            EQUIV(next->get_control_in_value(), 0))) {
-                               return previous->get_value();
+                            EQUIV(next->get_control_in_value(), 0)) ) {
+                               return previous->get_value(0);
                        }
                }
        }
        else if(direction == PLAY_REVERSE) {
-               if(EQUIV(previous->get_value(), next->get_value())) {
+               if( !previous ) return next->get_value(0);
+               if( !next ) return previous->get_value(1);
+               if( EQUIV(previous->get_value(0), next->get_value(1)) ) {
                        if( (previous->curve_mode == FloatAuto::LINEAR &&
                             next->curve_mode == FloatAuto::LINEAR) ||
                            (EQUIV(previous->get_control_in_value(), 0) &&
-                            EQUIV(next->get_control_out_value(), 0))) {
-                               return previous->get_value();
+                            EQUIV(next->get_control_out_value(), 0)) ) {
+                               return previous->get_value(1);
                        }
                }
        }
 // at this point: previous and next not NULL, positions differ, value not constant.
 
-       return calculate_bezier(previous, next, position);
+       return calculate_bezier(previous, next, position, direction);
 }
 
 
-float FloatAutos::calculate_bezier(FloatAuto *previous, FloatAuto *next, int64_t position)
+float FloatAutos::calculate_bezier(FloatAuto *previous, FloatAuto *next,
+               int64_t position, int direction)
 {
-       if(next->position - previous->position == 0) return previous->get_value();
+       int edge = direction == PLAY_FORWARD ? 0 : 1;
+       if( next->position == previous->position )
+               return previous->get_value(edge);
 
-       float y0 = previous->get_value();
-       float y3 = next->get_value();
+       float y0 = previous->get_value(edge);
+       float y3 = next->get_value(1-edge);
 
 // control points
-       float y1 = previous->get_value() + previous->get_control_out_value();
-       float y2 = next->get_value() + next->get_control_in_value();
+       float y1 = y0 + (direction == PLAY_FORWARD ?
+               previous->get_control_out_value() :
+               previous->get_control_in_value());
+       float y2 = y3 + (direction == PLAY_FORWARD ?
+               next->get_control_in_value() :
+               next->get_control_out_value());
        float t = (float)(position - previous->position) /
                        (next->position - previous->position);
 
@@ -306,12 +316,12 @@ float FloatAutos::calculate_bezier_derivation(FloatAuto *previous, FloatAuto *ne
                        return 0;
                return previous->get_control_out_value() / previous->get_control_out_position();
        }
-       float y0 = previous->get_value();
-       float y3 = next->get_value();
+       float y0 = previous->get_value(0);
+       float y3 = next->get_value(1);
 
 // control points
-       float y1 = previous->get_value() + previous->get_control_out_value();
-       float y2 = next->get_value() + next->get_control_in_value();
+       float y1 = y0 + previous->get_control_out_value();
+       float y2 = y3 + next->get_control_in_value();
 // normalized scale
        float t = (float)(position - previous->position) / scale;
 
@@ -416,10 +426,14 @@ void FloatAutos::set_proxy(int orig_scale, int new_scale)
        float orig_value;
        orig_value = ((FloatAuto*)default_auto)->value * orig_scale;
        ((FloatAuto*)default_auto)->value = orig_value / new_scale;
+       orig_value = ((FloatAuto*)default_auto)->value1 * orig_scale;
+       ((FloatAuto*)default_auto)->value1 = orig_value / new_scale;
 
        for( FloatAuto *current= (FloatAuto*)first; current; current=(FloatAuto*)NEXT ) {
                orig_value = current->value * orig_scale;
                current->value = orig_value / new_scale;
+               orig_value = current->value1 * orig_scale;
+               current->value1 = orig_value / new_scale;
                orig_value = current->control_in_value * orig_scale;
                current->control_in_value = orig_value / new_scale;
                orig_value = current->control_out_value * orig_scale;
@@ -460,17 +474,16 @@ double FloatAutos::automation_integral(int64_t start, int64_t length, int direct
                if( prev ) prev_pos = prev->position;
                FloatAuto *next = (FloatAuto*)get_next_auto(pos, direction, znext, 0);
                if( next ) next_pos = next->position;
-               if( !prev && !next ) prev = next = (FloatAuto*)default_auto;
-               else if( !prev ) prev = next;
-               else if( !next ) next = prev;
-
+               if( !prev && !next ) prev = (FloatAuto*)default_auto;
                double dt = next_pos - prev_pos;
                double t0 = (pos - prev_pos) / dt;
                if( (pos = next_pos) > end ) pos = end;
                double t1 = (pos - prev_pos) / dt;
 
-               double y0 = prev->get_value(), y1 = y0 + prev->get_control_out_value();
-               double y3 = next->get_value(), y2 = y3 + next->get_control_in_value();
+               double y0 = !prev ? next->get_value(1) : prev->get_value(0);
+               double y1 = y0 + (!prev ? 0 : prev->get_control_out_value());
+               double y3 = !next ? prev->get_value(0) : next->get_value(1);
+               double y2 = y3 + (!next ? 0 : next->get_control_in_value());
                if( y0 != y1 || y1 != y2 || y2 != y3 ) {
 // bezier definite integral t0..t1
                        double f4 = -y0/4 + 3*y1/4 - 3*y2/4 + y3/4;
index f53564d4052d0b0c9d3c4944bc98e48b3919341c..6842d54e71d026986125aff392c78dbe268e99ea 100644 (file)
@@ -27,6 +27,7 @@
 #include "guicast.h"
 #include "filexml.inc"
 #include "floatauto.inc"
+#include "transportque.inc"
 
 class FloatAutos : public Autos
 {
@@ -38,29 +39,25 @@ public:
        ~FloatAutos();
 
 
-       void draw_joining_line(BC_SubWindow *canvas, int vertical, int center_pixel, int x1, int y1, int x2, int y2);
+       void draw_joining_line(BC_SubWindow *canvas, int vertical, int center_pixel,
+                       int x1, int y1, int x2, int y2);
        int get_testy(float slope, int cursor_x, int ax, int ay);
 // Return 1 if the automation is constant.
 // constant - set to the value if it is constant
-       int automation_is_constant(int64_t start,
-               int64_t length,
-               int direction,
-               double &constant);
+       int automation_is_constant(int64_t start, int64_t length, int direction,
+                       double &constant);
        double get_automation_constant(int64_t start, int64_t end);
 // Get value at a specific point.  This needs previous and next stores
 // because it is used for every pixel in the timeline drawing function.
-       float get_value(int64_t position,
-               int direction,
-               FloatAuto* &previous,
-               FloatAuto* &next);
+       float get_value(int64_t position, int direction,
+                       FloatAuto* &previous, FloatAuto* &next);
 // Helper: just calc the bezier function without doing any lookup of nodes
-       static float calculate_bezier(FloatAuto *previous, FloatAuto *next, int64_t position);
-       static float calculate_bezier_derivation(FloatAuto *previous, FloatAuto *next, int64_t position);
-       void get_extents(float *min,
-               float *max,
-               int *coords_undefined,
-               int64_t unit_start,
-               int64_t unit_end);
+       static float calculate_bezier(FloatAuto *previous, FloatAuto *next,
+                       int64_t position, int direction=PLAY_FORWARD);
+       static float calculate_bezier_derivation(FloatAuto *previous, FloatAuto *next,
+                       int64_t position);
+       void get_extents(float *min, float *max, int *coords_undefined,
+                       int64_t unit_start, int64_t unit_end);
 
        void set_automation_mode(int64_t start, int64_t end, int mode);
        void set_proxy(int orig_scale, int new_scale);
index bc250716b68b3937500159f6c779b21a0499d037..1fac6105e59ed24c8038f1b258fe872b28880104 100644 (file)
@@ -294,7 +294,7 @@ void GWindowGUI::create_objects()
                                hard_edges = toggle;
                                break;
                        }
-                        if( accel ) {
+                       if( accel ) {
                                int x1 = get_w() - BC_Title::calculate_w(this, accel) - xs10;
                                add_subwindow(new BC_Title(x1, y, accel));
                        }
index 7457773a08f51a7c4c38ba79ced81bf969a532bf..b94ae1521bc94d7094715c80b7f09e6d43cf29ed 100644 (file)
@@ -67,6 +67,7 @@ KeyframePopup::KeyframePopup(MWindow *mwindow, MWindowGUI *gui)
        key_mbar = 0;
        key_mode_displayed = false;
        key_edit_displayed = false;
+       popx = popy = 0;
 }
 
 KeyframePopup::~KeyframePopup()
@@ -77,6 +78,7 @@ KeyframePopup::~KeyframePopup()
                delete key_linear;
                delete key_free_t;
                delete key_free;
+               delete key_bump;
        }
        if( !key_edit_displayed ) {
                delete key_edit;
@@ -96,10 +98,12 @@ void KeyframePopup::create_objects()
        key_linear = new KeyframePopupCurveMode(mwindow, this, FloatAuto::LINEAR);
        key_free_t = new KeyframePopupCurveMode(mwindow, this, FloatAuto::TFREE );
        key_free   = new KeyframePopupCurveMode(mwindow, this, FloatAuto::FREE  );
+       key_bump   = new KeyframePopupCurveMode(mwindow, this, FloatAuto::BUMP  );
 }
 
 int KeyframePopup::update(Plugin *plugin, KeyFrame *keyframe)
 {
+       gui->get_relative_cursor(popx, popy);
        key_show->set_text(_("Show Plugin Settings"));
        this->keyframe_plugin = plugin;
        this->keyframe_auto = keyframe;
@@ -111,6 +115,7 @@ int KeyframePopup::update(Plugin *plugin, KeyFrame *keyframe)
 
 int KeyframePopup::update(Automation *automation, Autos *autos, Auto *auto_keyframe)
 {
+       gui->get_relative_cursor(popx, popy);
        key_show->set_text(_(GWindowGUI::auto_text[autos->autoidx]));
        this->keyframe_plugin = 0;
        this->keyframe_automation = automation;
@@ -155,10 +160,12 @@ void KeyframePopup::handle_curve_mode(Autos *autos, Auto *auto_keyframe)
                add_item(key_linear);
                add_item(key_free_t);
                add_item(key_free);
+               add_item(key_bump);
                key_mode_displayed = true;
        }
        else if(key_mode_displayed && (!autos || autos->get_type() != AUTOMATION_TYPE_FLOAT))
        { // remove additional menu entries
+               remove_item(key_bump);
                remove_item(key_free);
                remove_item(key_free_t);
                remove_item(key_linear);
@@ -172,6 +179,7 @@ void KeyframePopup::handle_curve_mode(Autos *autos, Auto *auto_keyframe)
                key_linear->toggle_mode((FloatAuto*)auto_keyframe);
                key_free_t->toggle_mode((FloatAuto*)auto_keyframe);
                key_free  ->toggle_mode((FloatAuto*)auto_keyframe);
+               key_bump  ->toggle_mode((FloatAuto*)auto_keyframe);
        }
        activate();
 }
@@ -238,9 +246,15 @@ int KeyframePopupShow::handle_event()
 {
        MWindowGUI *mgui = mwindow->gui;
        CWindowGUI *cgui = mwindow->cwindow->gui;
-       int cx = mgui->get_relative_cursor_x()+15, cy = mgui->get_relative_cursor_y()-15;
-       delete mgui->keyvalue_popup;
-       mgui->keyvalue_popup = 0;
+       int cx = popup->popx, cy = popup->popy;
+       int xmargin = mgui->get_w() - xS(200);
+       int ymargin = mgui->get_h() - yS(50);
+       if( cx > xmargin ) cx = xmargin;
+       if( cy > ymargin ) cy = ymargin;
+       xmargin = xS(15);  ymargin = yS(15);
+       if( cx < xmargin ) cx = xmargin;
+       if( cy < ymargin ) cy = ymargin;
+       mgui->close_keyvalue_popup();
 
        if( popup->keyframe_plugin ) {
                mwindow->update_plugin_guis();
@@ -278,7 +292,7 @@ int KeyframePopupShow::handle_event()
                                mgui->add_subwindow(mode);
                                mode->create_objects();
                                mode->activate_menu();
-                               mgui->keyvalue_popup = mode;
+                               mgui->open_keyvalue_popup(mode);
                        break; }
 
                        case AUTOMATION_PAN: {
@@ -286,38 +300,44 @@ int KeyframePopupShow::handle_event()
                                mgui->add_subwindow(pan);
                                pan->create_objects();
                                pan->activate(cx, cy);
-                               mgui->keyvalue_popup = pan;
+                               mgui->open_keyvalue_popup(pan);
                        break; }
 
                        case AUTOMATION_FADE: {
+                               FloatAuto *fade_auto = mwindow->get_float_auto(patchgui, AUTOMATION_FADE);
+                               int bump = fade_auto->is_bump();
                                switch( patchgui->data_type ) {
                                case TRACK_AUDIO: {
-                                       AKeyFadePatch *fade = new AKeyFadePatch(mwindow, (APatchGUI *)patchgui, cx, cy);
+                                       AKeyFadePatch *fade = new AKeyFadePatch(mwindow,
+                                                       (APatchGUI *)patchgui, bump, cx, cy);
                                        mgui->add_subwindow(fade);
                                        fade->create_objects();
-                                       mgui->keyvalue_popup = fade;
+                                       mgui->open_keyvalue_popup(fade);
                                        break; }
                                case TRACK_VIDEO: {
-                                       VKeyFadePatch *fade = new VKeyFadePatch(mwindow, (VPatchGUI *)patchgui, cx, cy);
+                                       VKeyFadePatch *fade = new VKeyFadePatch(mwindow,
+                                                       (VPatchGUI *)patchgui, bump, cx, cy);
                                        mgui->add_subwindow(fade);
                                        fade->create_objects();
-                                       mgui->keyvalue_popup = fade;
+                                       mgui->open_keyvalue_popup(fade);
                                        break; }
                                }
                                break; }
 
                        case AUTOMATION_SPEED: {
-                               KeySpeedPatch *speed = new KeySpeedPatch(mwindow, patchgui, cx, cy);
+                               FloatAuto *speed_auto = mwindow->get_float_auto(patchgui, AUTOMATION_SPEED);
+                               int bump = speed_auto->is_bump();
+                               KeySpeedPatch *speed = new KeySpeedPatch(mwindow, patchgui, bump, cx, cy);
                                mgui->add_subwindow(speed);
                                speed->create_objects();
-                               mgui->keyvalue_popup = speed;
+                               mgui->open_keyvalue_popup(speed);
                                break; }
 
                        case AUTOMATION_MUTE: {
                                KeyMutePatch *mute = new KeyMutePatch(mwindow, (APatchGUI *)patchgui, cx, cy);
                                mgui->add_subwindow(mute);
                                mute->create_objects();
-                               mgui->keyvalue_popup = mute;
+                               mgui->open_keyvalue_popup(mute);
                                break; }
                        }
                        break; }
@@ -452,13 +472,14 @@ KeyframePopupCurveMode::KeyframePopupCurveMode(
 KeyframePopupCurveMode::~KeyframePopupCurveMode() { }
 
 
-const charKeyframePopupCurveMode::get_labeltext(int mode)
+const char *KeyframePopupCurveMode::get_labeltext(int mode)
 {
        switch(mode) {
        case FloatAuto::SMOOTH: return _("smooth curve");
        case FloatAuto::LINEAR: return _("linear segments");
        case FloatAuto::TFREE:  return _("tangent edit");
        case FloatAuto::FREE:   return _("disjoint edit");
+       case FloatAuto::BUMP:   return _("bump edit");
        }
        return _("misconfigured");
 }
@@ -574,9 +595,7 @@ KeyMuteValue::KeyMuteValue(KeyMutePatch *key_mute_patch)
 int KeyMuteValue::button_release_event()
 {
        BC_CheckBox::button_release_event();
-       MWindowGUI *mgui = key_mute_patch->mwindow->gui;
-       delete mgui->keyvalue_popup;
-       mgui->keyvalue_popup = 0;
+       key_mute_patch->mwindow->gui->close_keyvalue_popup();
        return 1;
 }
 
@@ -603,29 +622,60 @@ int KeyMuteValue::handle_event()
        return 1;
 }
 
-KeySpeedPatch::KeySpeedPatch(MWindow *mwindow, PatchGUI *patch, int x, int y)
- : BC_SubWindow(x,y, 200,20, GWindowGUI::auto_colors[AUTOMATION_SPEED])
+KeySpeedPatch::KeySpeedPatch(MWindow *mwindow, PatchGUI *gui,
+               int bump, int x, int y)
+ : BC_SubWindow(x,y, xS(200)+4, yS(bump ? 50 : 24)+4,
+               GWindowGUI::auto_colors[AUTOMATION_SPEED])
 {
        this->mwindow = mwindow;
-       this->patch = patch;
+       this->gui = gui;
+}
+KeySpeedPatch::~KeySpeedPatch()
+{
 }
 
 void KeySpeedPatch::create_objects()
 {
-       int x = 0, y = 0;
-       float v = mwindow->get_float_auto(patch, AUTOMATION_SPEED)->get_value();
-       add_subwindow(key_speed_text = new KeySpeedText(this, x, y, 64, v));
+       int x = 2, x1 = x, y = 2, dy = 0;
+       FloatAuto *speed_auto = mwindow->get_float_auto(gui, AUTOMATION_SPEED);
+       float v = speed_auto->get_value(gui->edge);
+       add_subwindow(key_speed_text = new KeySpeedText(this, x, y, xS(64), v));
        x += key_speed_text->get_w();
+       dy = bmax(dy, key_speed_text->get_h());
        VFrame **lok_images = mwindow->theme->get_image_set("lok");
-       int w1 = get_w() - x - lok_images[0]->get_w();
+       int w1 = get_w()-2 - x - lok_images[0]->get_w();
        add_subwindow(key_speed_slider = new KeySpeedSlider(this, x, y, w1, v));
        x += key_speed_slider->get_w();
+       dy = bmax(dy, key_speed_slider->get_h());
        add_subwindow(key_speed_ok = new KeySpeedOK(this, x, y, lok_images));
+       dy = bmax(dy, key_speed_ok->get_h());
+       if( speed_auto->is_bump() ) {
+               y += dy;
+               set_color(get_resources()->get_bg_color());
+               draw_box(0,y, get_w(),get_h());
+               add_subwindow(auto_edge = new KeySpeedAutoEdge(mwindow, this, x1, y));
+               x1 += auto_edge->get_w() + xS(15);
+               add_subwindow(auto_span = new KeySpeedAutoSpan(mwindow, this, x1, y));
+       }
+       draw_3d_border(0,0, get_w(), get_h(), 0);
        activate();
        show_window();
        mwindow->speed_before();
 }
 
+void KeySpeedPatch::set_edge(int edge)
+{
+       gui->edge = edge;
+       FloatAuto *speed_auto = mwindow->get_float_auto(gui, AUTOMATION_SPEED);
+       float v = speed_auto->get_value(edge);
+       update(v);
+}
+
+void KeySpeedPatch::set_span(int span)
+{
+       gui->span = span;
+}
+
 void KeySpeedPatch::update(float v)
 {
        key_speed_text->update(v);
@@ -635,24 +685,26 @@ void KeySpeedPatch::update(float v)
 
 void KeySpeedPatch::update_speed(float v)
 {
-       patch->change_source = 1;
-       double position = mwindow->edl->local_session->get_selectionstart(1);
-       Track *track = patch->track;
+       Track *track = gui->track;
+       if( !track->is_armed() ) return;
        Autos *speed_autos = track->automation->autos[AUTOMATION_SPEED];
+       double position = mwindow->edl->local_session->get_selectionstart(1);
+       FloatAuto *current = (FloatAuto*)speed_autos->get_auto_for_editing(position);
+       float change = v - current->get_value(gui->edge);
+       if( !change ) return;
+       gui->change_source = 1;
        int need_undo = !speed_autos->auto_exists_for_editing(position);
-
        mwindow->undo->update_undo_before(_("speed"), need_undo ? 0 : this);
-       FloatAuto *current = (FloatAuto*)speed_autos->get_auto_for_editing(position);
-       float change = v - current->get_value();
-       current->set_value(v);
-       if( track->is_ganged() && track->is_armed() ) {
-               TrackCanvas *track_canvas = patch->patchbay->pane->canvas;
+       current->bump_value(v, gui->edge, gui->span);
+       if( track->is_ganged() ) {
+               TrackCanvas *track_canvas = gui->patchbay->pane->canvas;
                track_canvas->fill_ganged_autos(-1, change, track, current);
                track_canvas->update_ganged_autos(0, track, current);
                track_canvas->clear_ganged_autos();
        }
-       mwindow->undo->update_undo_after(_("speed"), LOAD_AUTOMATION+LOAD_EDITS);
-       patch->change_source = 0;
+       mwindow->undo->update_undo_after(_("speed"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
+       gui->change_source = 0;
 
        mwindow->sync_parameters(CHANGE_PARAMS);
        if(mwindow->edl->session->auto_conf->autos[AUTOMATION_SPEED]) {
@@ -671,9 +723,7 @@ int KeySpeedOK::handle_event()
        MWindow *mwindow = key_speed_patch->mwindow;
        mwindow->speed_after(1);
        mwindow->resync_guis();
-       MWindowGUI *mgui = mwindow->gui;
-       delete mgui->keyvalue_popup;
-       mgui->keyvalue_popup = 0;
+       mwindow->gui->close_keyvalue_popup();
        return 1;
 }
 
@@ -717,3 +767,36 @@ int KeySpeedSlider::handle_event()
        return 1;
 }
 
+KeySpeedAutoEdge::KeySpeedAutoEdge(MWindow *mwindow,
+               KeySpeedPatch *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_edge"),
+                patch->gui->span,_("Edge"))
+{
+       this->mwindow = mwindow;
+       this->patch = patch;
+       set_tooltip(_("Bump uses left edge"));
+}
+
+int KeySpeedAutoEdge::handle_event()
+{
+       patch->set_edge(get_value());
+       return 1;
+}
+
+KeySpeedAutoSpan::KeySpeedAutoSpan(MWindow *mwindow,
+               KeySpeedPatch *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_span"),
+                patch->gui->span,_("Span"))
+{
+       this->mwindow = mwindow;
+       this->patch = patch;
+       set_tooltip(_("Bump spans to next"));
+}
+
+int KeySpeedAutoSpan::handle_event()
+
+{
+       patch->set_span(get_value());
+       return 1;
+}
+
index 171c4cfc4ef2f3ab655e99493cf93f5657587c0e..c2b1631120cf146c518e94ad1afc280bc76e586f 100644 (file)
@@ -55,6 +55,7 @@ public:
        Automation *keyframe_automation;
        Auto *keyframe_auto;
        BC_MenuItem *key_mbar;
+       int popx, popy;
 
 private:
        KeyframePopupDelete *key_delete;
@@ -66,6 +67,7 @@ private:
        KeyframePopupCurveMode *key_linear;
        KeyframePopupCurveMode *key_free_t;
        KeyframePopupCurveMode *key_free;
+       KeyframePopupCurveMode *key_bump;
        bool key_edit_displayed;
        bool key_mode_displayed;
 
@@ -192,16 +194,22 @@ public:
 class KeySpeedPatch : public BC_SubWindow
 {
 public:
-       KeySpeedPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
+       KeySpeedPatch(MWindow *mwindow, PatchGUI *gui,
+                       int bump, int x, int y);
+       ~KeySpeedPatch();
        void create_objects();
        void update(float v);
+       void set_edge(int edge);
+       void set_span(int span);
        void update_speed(float v);
 
        MWindow *mwindow;
-       PatchGUI *patch;
+       PatchGUI *gui;
        KeySpeedSlider *key_speed_slider;
        KeySpeedText *key_speed_text;
        KeySpeedOK *key_speed_ok;
+       KeySpeedAutoEdge *auto_edge;
+       KeySpeedAutoSpan *auto_span;
 };
 
 class KeySpeedOK : public BC_Button
@@ -234,4 +242,22 @@ public:
        KeySpeedPatch *key_speed_patch;
 };
 
+class KeySpeedAutoEdge : public BC_Toggle
+{
+public:
+       KeySpeedAutoEdge(MWindow *mwindow, KeySpeedPatch *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       KeySpeedPatch *patch;
+};
+
+class KeySpeedAutoSpan : public BC_Toggle
+{
+public:
+       KeySpeedAutoSpan(MWindow *mwindow, KeySpeedPatch *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       KeySpeedPatch *patch;
+};
+
 #endif
index 55856e01a492bafa4d2fd1ce441b9e4ec36396c7..7764c18dc1d9efb6d63ce1dd4322437159dfe029 100644 (file)
@@ -37,5 +37,7 @@ class KeySpeedPatch;
 class KeySpeedOK;
 class KeySpeedText;
 class KeySpeedSlider;
+class KeySpeedAutoEdge;
+class KeySpeedAutoSpan;
 
 #endif
index 72b9b68bc9535d20c4d2fcbc81266db10912a27a..9c5c81851084f20da98696684ea089874be9704f 100644 (file)
@@ -174,11 +174,13 @@ void MainMenu::create_objects()
        keyframemenu->add_item(new CopyKeyframes(mwindow));
        keyframemenu->add_item(new PasteKeyframes(mwindow));
        keyframemenu->add_item(new ClearKeyframes(mwindow));
-       keyframemenu->add_item(new StraightenKeyframes(mwindow));
-       keyframemenu->add_item(new BendKeyframes(mwindow));
+       keyframemenu->add_item(set_auto_curves = new SetAutomationCurveMode(mwindow));
+       set_auto_curves->create_objects();
        keyframemenu->add_item(keyframe_curve_type = new KeyframeCurveType(mwindow));
        keyframe_curve_type->create_objects();
        keyframe_curve_type->update(mwindow->edl->local_session->floatauto_type);
+       keyframemenu->add_item(keyframe_create = new KeyframeCreate(mwindow));
+       keyframe_create->create_objects();
        keyframemenu->add_item(new BC_MenuItem("-"));
        keyframemenu->add_item(new CopyDefaultKeyframe(mwindow));
        keyframemenu->add_item(new PasteDefaultKeyframe(mwindow));
@@ -732,36 +734,40 @@ int ClearKeyframes::handle_event()
 }
 
 
-
-StraightenKeyframes::StraightenKeyframes(MWindow *mwindow)
- : BC_MenuItem(_("Change to linear"))
+SetAutomationCurveItem::SetAutomationCurveItem(SetAutomationCurveMode *set_curve_mode, int id)
+ : BC_MenuItem(FloatAuto::curve_name(id))
 {
-       this->mwindow = mwindow;
+       this->set_curve_mode = set_curve_mode;
+       this->id = id;
 }
 
-int StraightenKeyframes::handle_event()
+int SetAutomationCurveItem::handle_event()
 {
-       mwindow->set_automation_mode(FloatAuto::LINEAR);
+       set_curve_mode->mwindow->set_automation_mode((FloatAuto::t_mode)id);
        return 1;
 }
 
+SetAutoCurveModeMenu::SetAutoCurveModeMenu(SetAutomationCurveMode *curve_mode)
+: BC_SubMenu()
+{
+       this->curve_mode = curve_mode;
+}
 
-
-
-BendKeyframes::BendKeyframes(MWindow *mwindow)
- : BC_MenuItem(_("Change to smooth"))
+SetAutomationCurveMode::SetAutomationCurveMode(MWindow *mwindow)
+ : BC_MenuItem(_("Set curve modes..."))
 {
        this->mwindow = mwindow;
+       curve_mode_menu = 0;
 }
 
-int BendKeyframes::handle_event()
+void SetAutomationCurveMode::create_objects()
 {
-       mwindow->set_automation_mode(FloatAuto::SMOOTH);
-       return 1;
+       add_submenu(curve_mode_menu = new SetAutoCurveModeMenu(this));
+       for( int id=FloatAuto::SMOOTH; id<=FloatAuto::BUMP; ++id )
+               curve_mode_menu->add_item(new SetAutomationCurveItem(this, id));
 }
 
 
-
 KeyframeCurveType::KeyframeCurveType(MWindow *mwindow)
  : BC_MenuItem(_("Create curve type..."))
 {
@@ -775,7 +781,7 @@ KeyframeCurveType::~KeyframeCurveType()
 void KeyframeCurveType::create_objects()
 {
        add_submenu(curve_menu = new KeyframeCurveTypeMenu(this));
-       for( int i=FloatAuto::SMOOTH; i<=FloatAuto::FREE; ++i ) {
+       for( int i=FloatAuto::SMOOTH; i<=FloatAuto::BUMP; ++i ) {
                KeyframeCurveTypeItem *curve_type_item = new KeyframeCurveTypeItem(i, this);
                curve_menu->add_submenuitem(curve_type_item);
        }
@@ -821,6 +827,63 @@ int KeyframeCurveTypeItem::handle_event()
 }
 
 
+KeyframeCreateItem::KeyframeCreateItem(KeyframeCreate *keyframe_create,
+                       const char *text, int mask)
+ : BC_MenuItem(text)
+{
+       this->keyframe_create = keyframe_create;
+       this->mask = mask;
+}
+
+int KeyframeCreateItem::handle_event()
+{
+       MWindow *mwindow = keyframe_create->mwindow;
+       int mode = mwindow->edl->local_session->floatauto_type;
+       int mask = this->mask;
+       if( !mask ) { // visible
+               int *autos = mwindow->edl->session->auto_conf->autos;
+               int modes = (1<<AUTOMATION_FADE) + (1<<AUTOMATION_SPEED) + 
+                       (7<<AUTOMATION_CAMERA_X) + (7<<AUTOMATION_PROJECTOR_X);
+               for( int i=0; i<AUTOMATION_TOTAL; modes>>=1, ++i ) {
+                       if( !(modes & 1) ) continue;
+                       if( autos[i] ) mask |= (1<<i);
+               }
+       }
+       mwindow->create_keyframes(mask, mode);
+       return 1;
+}
+
+KeyframeCreateMenu::KeyframeCreateMenu(KeyframeCreate *keyframe_create)
+: BC_SubMenu()
+{
+       this->keyframe_create = keyframe_create;
+}
+
+KeyframeCreate::KeyframeCreate(MWindow *mwindow)
+ : BC_MenuItem(_("Create keyframes..."))
+{
+       this->mwindow = mwindow;
+       keyframe_create_menu = 0;
+}
+
+void KeyframeCreate::create_objects()
+{
+       add_submenu(keyframe_create_menu = new KeyframeCreateMenu(this));
+       keyframe_create_menu->add_item(new KeyframeCreateItem(this, _("Visible"), 0));
+       keyframe_create_menu->add_item(new KeyframeCreateItem(this, _("Fade"),
+                               (1<<AUTOMATION_FADE)));
+       keyframe_create_menu->add_item(new KeyframeCreateItem(this, _("Speed"),
+                               (1<<AUTOMATION_SPEED)));
+       keyframe_create_menu->add_item(new KeyframeCreateItem(this, _("Camera XYZ"),
+                               (7<<AUTOMATION_CAMERA_X)));
+       keyframe_create_menu->add_item(new KeyframeCreateItem(this, _("Projector XYZ"),
+                               (7<<AUTOMATION_PROJECTOR_X)));
+       keyframe_create_menu->add_item(new KeyframeCreateItem(this, _("Fade+Speed+XYZ"),
+                               (1<<AUTOMATION_FADE) + (1<<AUTOMATION_SPEED) + 
+                               (7<<AUTOMATION_CAMERA_X) + (7<<AUTOMATION_PROJECTOR_X)));
+}
+
+
 CutDefaultKeyframe::CutDefaultKeyframe(MWindow *mwindow)
  : BC_MenuItem(_("Cut default keyframe"), _("Alt-x"), 'x')
 {
index 3498c2adcdcab785f9537e07c2d440e38d31725a..97f9dd1c2391e666aa7ec99362343b5647394f27 100644 (file)
@@ -141,6 +141,8 @@ public:
        int total_aeffects, total_veffects;
 
        KeyframeCurveType *keyframe_curve_type;
+       KeyframeCreate *keyframe_create;
+       SetAutomationCurveMode *set_auto_curves;
        LabelsFollowEdits *labels_follow_edits;
        PluginsFollowEdits *plugins_follow_edits;
        KeyframesFollowEdits *keyframes_follow_edits;
@@ -341,22 +343,34 @@ public:
        MWindow *mwindow;
 };
 
-class StraightenKeyframes : public BC_MenuItem
+
+class SetAutomationCurveItem : public BC_MenuItem
 {
 public:
-       StraightenKeyframes(MWindow *mwindow);
+       SetAutomationCurveItem(SetAutomationCurveMode *set_curve_mode, int id);
        int handle_event();
-       MWindow *mwindow;
+       SetAutomationCurveMode *set_curve_mode;
+       int id;
 };
 
-class BendKeyframes : public BC_MenuItem
+class SetAutoCurveModeMenu : public BC_SubMenu
 {
 public:
-       BendKeyframes(MWindow *mwindow);
-       int handle_event();
+       SetAutoCurveModeMenu(SetAutomationCurveMode *curve_mode);
+       SetAutomationCurveMode *curve_mode;
+};
+
+class SetAutomationCurveMode : public BC_MenuItem
+{
+public:
+       SetAutomationCurveMode(MWindow *mwindow);
+       void create_objects();
+
        MWindow *mwindow;
+       SetAutoCurveModeMenu *curve_mode_menu;
 };
 
+
 class KeyframeCurveType : public BC_MenuItem
 {
 public:
@@ -392,6 +406,34 @@ public:
        int handle_event();
 };
 
+class KeyframeCreateItem : public BC_MenuItem
+{
+public:
+       KeyframeCreateItem(KeyframeCreate *keyframe_create, const char *text, int mask);
+       int handle_event();
+
+       KeyframeCreate *keyframe_create;
+       int mask;
+};
+
+class KeyframeCreateMenu : public BC_SubMenu
+{
+public:
+       KeyframeCreateMenu(KeyframeCreate *keyframe_create);
+       KeyframeCreate *keyframe_create;
+};
+
+class KeyframeCreate : public BC_MenuItem
+{
+public:
+       KeyframeCreate(MWindow *mwindow);
+       void create_objects();
+
+       MWindow *mwindow;
+       KeyframeCreateMenu *keyframe_create_menu;
+};
+
+
 class CutDefaultKeyframe : public BC_MenuItem
 {
 public:
index 426ab487e1f2e21629a1af45e508dd880a424dfb..e9c3ffe02c23a453c8638e60f8ebefaf520b4c61 100644 (file)
@@ -48,11 +48,15 @@ class CutKeyframes;
 class CopyKeyframes;
 class PasteKeyframes;
 class ClearKeyframes;
-class StraightenKeyframes;
-class BendKeyframes;
+class SetAutomationCurveItem;
+class SetAutoCurveModeMenu;
+class SetAutomationCurveMode;
 class KeyframeCurveType;
 class KeyframeCurveTypeMenu;
 class KeyframeCurveTypeItem;
+class KeyframeCreateItem;
+class KeyframeCreateMenu;
+class KeyframeCreate;
 class CutDefaultKeyframe;
 class CopyDefaultKeyframe;
 class PasteDefaultKeyframe;
index dd06f3cd7352227394ce0f7f3a3ea99422e2633d..9f69f8eb4754b8064dfc28590a202e24e4b70e62 100644 (file)
@@ -187,7 +187,9 @@ int MainUndo::redo_load_flags()
 
 int MainUndo::undo()
 {
+       mwindow->gui->close_keyvalue_popup();
        mwindow->undo_commercial();
+
        UndoStackItem *current = undo_stack->current;
        if( current ) {
                undo_stack->current = next_undo();
@@ -225,6 +227,7 @@ int MainUndo::undo()
 
 int MainUndo::redo()
 {
+       mwindow->gui->close_keyvalue_popup();
        UndoStackItem *current = next_redo();
        if( current ) {
                undo_stack->current = current;
@@ -254,9 +257,6 @@ int MainUndo::redo()
 // Here the master EDL loads
 int MainUndo::load_from_undo(FileXML *file, uint32_t load_flags)
 {
-       delete mwindow->gui->keyvalue_popup;
-       mwindow->gui->keyvalue_popup = 0;
-
        if( load_flags & LOAD_SESSION ) {
                mwindow->gui->unlock_window();
                mwindow->close_mixers();
index a8851d54484201d969ff15f72d49a11b402753a5..4afbd81888f3f67b020d023f8c61dd7d3db5f81e 100644 (file)
@@ -2968,6 +2968,7 @@ void MWindow::show_cwindow()
 {
        session->show_cwindow = 1;
        cwindow->show_window();
+       cwindow->gui->tool_panel->raise_tool();
        gui->mainmenu->show_cwindow->set_checked(1);
 }
 
@@ -3741,8 +3742,7 @@ void MWindow::update_project(int load_mode)
        if( load_mode == LOADMODE_REPLACE ||
            load_mode == LOADMODE_REPLACE_CONCATENATE ) {
                edl->session->timecode_offset = 0;
-               delete gui->keyvalue_popup;
-               gui->keyvalue_popup = 0;
+               gui->close_keyvalue_popup();
                gui->load_panes();
        }
 
index da5b8f4c1615ef2eeaa5a75e63a5c34b9329213a..6a3dcbf17a7061a6d862012b4ecd12f9ab23be9d 100644 (file)
@@ -613,6 +613,7 @@ public:
 // in the clipboard.
        int paste_default_keyframe();
        int clear_default_keyframe();
+       void create_keyframes(int mask, int mode);
 
        FloatAuto* get_float_auto(PatchGUI *patch,int idx);
        IntAuto* get_int_auto(PatchGUI *patch,int idx);
index d424d60879335f2f4dc267f2b57dedb9f88f47dc..47b29ee891e06898cc2ce14dbad0e2a5a36d1117 100644 (file)
@@ -289,7 +289,8 @@ void MWindow::clear_entry()
 
        edl->optimize();
        save_backup();
-       undo_after(_("clear"), LOAD_EDITS | LOAD_TIMEBAR);
+       undo_after(_("clear"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
 
        restart_brender();
        update_plugin_guis();
@@ -1326,7 +1327,8 @@ void MWindow::overwrite(EDL *source, int all)
        edl->local_session->set_selectionend(dst_start + overwrite_len);
 
        save_backup();
-       undo_after(_("overwrite"), LOAD_EDITS);
+       undo_after(_("overwrite"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
 
        restart_brender();
        update_plugin_guis();
@@ -1379,7 +1381,8 @@ void MWindow::paste(double start, Track *first_track, int clear_selection, int o
 
                save_backup();
 
-               undo_after(_("paste"), LOAD_EDITS | LOAD_TIMEBAR);
+               undo_after(_("paste"),
+                               LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
                restart_brender();
                update_plugin_guis();
                gui->update(1, FORCE_REDRAW, 1, 1, 0, 1, 0);
@@ -1416,7 +1419,8 @@ int MWindow::paste_assets(double position, Track *dest_track, int overwrite)
 
        save_backup();
 
-       undo_after(_("paste assets"), LOAD_EDITS);
+       undo_after(_("paste assets"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
        restart_brender();
        gui->update(1, FORCE_REDRAW, 1, 0, 0, 1, 0);
        sync_parameters(CHANGE_EDL);
@@ -1837,7 +1841,8 @@ void MWindow::paste_silence()
                edl->session->autos_follow_edits);
        edl->optimize();
        save_backup();
-       undo_after(_("silence"), LOAD_EDITS | LOAD_TIMEBAR);
+       undo_after(_("silence"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
 
        update_plugin_guis();
        restart_brender();
@@ -2208,7 +2213,8 @@ void MWindow::splice(EDL *source, int all)
        edl->local_session->set_selectionend(start + source_end - source_start);
 
        save_backup();
-       undo_after(_("splice"), LOAD_EDITS | LOAD_TIMEBAR);
+       undo_after(_("splice"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
        update_plugin_guis();
        restart_brender();
        gui->update(1, NORMAL_DRAW, 1, 1, 0, 1, 0);
@@ -2339,7 +2345,8 @@ void MWindow::trim_selection()
                edl->session->autos_follow_edits);
 
        save_backup();
-       undo_after(_("trim selection"), LOAD_EDITS | LOAD_TIMEBAR);
+       undo_after(_("trim selection"),
+                       LOAD_AUTOMATION + LOAD_EDITS + LOAD_TIMEBAR);
        update_plugin_guis();
        gui->update(1, FORCE_REDRAW, 1, 1, 1, 1, 0);
        cwindow->update(1, 0, 0, 0, 1);
@@ -2569,7 +2576,10 @@ void MWindow::cut_commercials()
 
 int MWindow::normalize_speed(EDL *old_edl, EDL *new_edl)
 {
-       int result = 0;
+       int result = 0, first_track = 1;
+       int plugins_follow_edits = edl->session->plugins_follow_edits;
+       int autos_follow_edits = edl->session->autos_follow_edits;
+       int labels_follow_edits = edl->session->labels_follow_edits;
        Track *old_track = old_edl->tracks->first;
        Track *new_track = new_edl->tracks->first;
        for( ; old_track && new_track; old_track=old_track->next, new_track=new_track->next ) {
@@ -2585,17 +2595,101 @@ int MWindow::normalize_speed(EDL *old_edl, EDL *new_edl)
                }
                Edit *old_edit = old_track->edits->first;
                Edit *new_edit = new_track->edits->first;
-               for( ; old_edit && new_edit; old_edit=old_edit->next, new_edit=new_edit->next ) {
-                       int64_t edit_start = old_edit->startproject, edit_end = edit_start + old_edit->length;
+               while( old_edit && new_edit ) {
+                       int64_t edit_start = old_edit->startproject;
+                       int64_t edit_end = edit_start + old_edit->length;
                        if( old_speed || new_speed ) {
                                double orig_start = old_speeds->automation_integral(0, edit_start, PLAY_FORWARD);
                                double orig_end   = old_speeds->automation_integral(0, edit_end, PLAY_FORWARD);
-                               edit_start = new_speeds->speed_position(orig_start);
-                               edit_end = new_speeds->speed_position(orig_end);
+                               edit_start = new_track->frame_align(new_speeds->speed_position(orig_start), 1);
+                               edit_end = new_track->frame_align(new_speeds->speed_position(orig_end), 1);
                                result = 1;
                        }
                        new_edit->startproject = edit_start;
                        new_edit->length = edit_end - edit_start;
+                       old_edit = old_edit->next;
+                       new_edit = new_edit->next;
+               }
+               if( first_track && old_track->is_armed() ) {
+                       if( labels_follow_edits ) {
+                               Labels *old_labels = old_edl->labels;
+                               Labels *new_labels = new_edl->labels;
+                               Label *old_label = old_labels ? old_labels->first : 0;
+                               Label *new_label = new_labels ? new_labels->first : 0;
+                               while( old_label && new_label ) {
+                                       int64_t label_pos = old_track->to_units(old_label->position, 1);
+                                       if( old_speed || new_speed ) {
+                                               double orig_pos = old_speeds->automation_integral(0, label_pos, PLAY_FORWARD);
+                                               label_pos = new_track->frame_align(new_speeds->speed_position(orig_pos), 1);
+                                               result = 1;
+                                       }
+                                       new_label->position = new_track->from_units(label_pos);
+                                       old_label = old_label->next;
+                                       new_label = new_label->next;
+                               }
+                       }
+                       first_track = 0;
+               }
+               if( autos_follow_edits ) {
+                       for( int i=0; i<AUTOMATION_TOTAL; ++i ) {
+                               Autos *old_autos = old_track->automation->autos[i];
+                               Autos *new_autos = new_track->automation->autos[i];
+                               Auto *old_auto = old_autos ? old_autos->first : 0;
+                               Auto *new_auto = new_autos ? new_autos->first : 0;
+                               while( old_auto && new_auto ) {
+                                       int64_t auto_pos = old_auto->position;
+                                       if( old_speed || new_speed ) {
+                                               double orig_pos = old_speeds->automation_integral(0, auto_pos, PLAY_FORWARD);
+                                               auto_pos = new_track->frame_align(new_speeds->speed_position(orig_pos), 1);
+                                               result = 1;
+                                       }
+                                       new_auto->position = auto_pos;
+                                       old_auto = old_auto->next;
+                                       new_auto = new_auto->next;
+                               }
+                       }
+               }
+               if( !plugins_follow_edits ) continue;
+               int old_size = old_track->plugin_set.size();
+               int new_size = new_track->plugin_set.size();
+               int n = bmin(old_size, new_size);
+               for( int i=0; i<n; ++i ) {
+                       PluginSet *old_plugin_set = old_track->plugin_set[i];
+                       Plugin *old_plugin = (Plugin *)(old_plugin_set ? old_plugin_set->first : 0);
+                       PluginSet *new_plugin_set = new_track->plugin_set[i];
+                       Plugin *new_plugin = (Plugin *)(new_plugin_set ? new_plugin_set->first : 0);
+                       while( old_plugin && new_plugin ) {
+                               int64_t plugin_start = old_plugin->startproject;
+                               int64_t plugin_end = plugin_start + old_plugin->length;
+                               if( old_speed || new_speed ) {
+                                       double orig_start = old_speeds->automation_integral(0, plugin_start, PLAY_FORWARD);
+                                       double orig_end   = old_speeds->automation_integral(0, plugin_end, PLAY_FORWARD);
+                                       plugin_start = new_track->frame_align(new_speeds->speed_position(orig_start), 1);
+                                       plugin_end = new_track->frame_align(new_speeds->speed_position(orig_end), 1);
+                                       result = 1;
+                               }
+                               new_plugin->startproject = plugin_start;
+                               new_plugin->length = plugin_end - plugin_start;
+                               if( autos_follow_edits ) {
+                                       KeyFrames *old_keyframes = old_plugin->keyframes;
+                                       Auto *old_auto = old_keyframes ? old_keyframes->first : 0;
+                                       KeyFrames *new_keyframes = new_plugin->keyframes;
+                                       Auto *new_auto = new_keyframes ? new_keyframes->first : 0;
+                                       while( old_auto && new_auto ) {
+                                               int64_t auto_pos = old_auto->position;
+                                               if( old_speed || new_speed ) {
+                                                       double orig_pos = old_speeds->automation_integral(0, auto_pos, PLAY_FORWARD);
+                                                       auto_pos = new_track->frame_align(new_speeds->speed_position(orig_pos), 1);
+                                                       result = 1;
+                                               }
+                                               new_auto->position = auto_pos;
+                                               old_auto = old_auto->next;
+                                               new_auto = new_auto->next;
+                                       }
+                               }
+                               old_plugin = (Plugin *)old_plugin->next;
+                               new_plugin = (Plugin *)new_plugin->next;
+                       }
                }
        }
        return result;
@@ -2810,3 +2904,20 @@ void MWindow::mix_masters()
        save_backup();
 }
 
+void MWindow::create_keyframes(int mask, int mode)
+{
+       undo_before();
+       double start = edl->local_session->get_selectionstart();
+       edl->tracks->create_keyframes(start, mask, mode);
+       double end = edl->local_session->get_selectionend();
+       if( end != start )
+               edl->tracks->create_keyframes(end, mask, mode);
+       undo_after(_("create kyfrms"), LOAD_AUTOMATION);
+
+       restart_brender();
+       gui->update(1, NORMAL_DRAW, 0, 0, 1, 0, 0);
+       gui->activate_timeline();
+       cwindow->refresh_frame(CHANGE_EDL);
+       save_backup();
+}
+
index 9c3dc9d8fa0b5df2798f9bcbbe648ad7d0cbc1cb..34638e18480bafa4ff6d49ed50b77ded71301e16 100644 (file)
@@ -2284,6 +2284,19 @@ void MWindowGUI::stop_transport(const char *lock_msg)
        }
 }
 
+void MWindowGUI::close_keyvalue_popup()
+{
+       if( !keyvalue_popup ) return;
+       delete keyvalue_popup;
+       keyvalue_popup = 0;
+}
+
+void MWindowGUI::open_keyvalue_popup(BC_SubWindow *popup)
+{
+       close_keyvalue_popup();
+       keyvalue_popup = popup;
+}
+
 PaneButton::PaneButton(MWindow *mwindow, int x, int y)
  : BC_Button(x, y, mwindow->theme->get_image_set("pane"))
 {
index bc3aa3a65ff2d64bb5e13fd3a7ebd5a7c87b5500..74f353eaab785f131d75d6370196e5783cf002bf 100644 (file)
@@ -161,6 +161,8 @@ public:
        void set_meter_format(int mode, int min, int max);
        void update_mixers(Track *track, int v);
        void stop_transport(const char *lock_msg);
+       void close_keyvalue_popup();
+       void open_keyvalue_popup(BC_SubWindow *popup);
 
        int translation_event();
        int resize_event(int w, int h);          // handle a resize event
index 381e1c0f4d925ce329b171c6c2d23ada7bd9c494..fb0339a95be3c9be82aaed956df8bbb1fc3fabce 100644 (file)
@@ -515,38 +515,20 @@ int PatchBay::update()
        return 0;
 }
 
-void PatchBay::synchronize_faders(float change, int data_type, Track *skip)
+void PatchBay::synchronize_faders(float dv, int data_type, Track *skip, int edge, int span)
 {
-       for(Track *current = mwindow->edl->tracks->first;
-               current;
-               current = NEXT)
-       {
-               if(current->data_type == data_type &&
-                       current->armed_gang(skip) &&
-                       current->is_armed() &&
-                       current != skip)
-               {
-                       FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[AUTOMATION_FADE];
-                       double position = mwindow->edl->local_session->get_selectionstart(1);
-
-
-                       FloatAuto *keyframe = (FloatAuto*)fade_autos->get_auto_for_editing(position);
-
-                       float new_value = keyframe->get_value() + change;
-                       if(data_type == TRACK_AUDIO)
-                               CLAMP(new_value,
-                                     mwindow->edl->local_session->automation_mins[AUTOGROUPTYPE_AUDIO_FADE],
-                                     mwindow->edl->local_session->automation_maxs[AUTOGROUPTYPE_AUDIO_FADE]);
-                       else
-                               CLAMP(new_value,
-                                     mwindow->edl->local_session->automation_mins[AUTOGROUPTYPE_VIDEO_FADE],
-                                     mwindow->edl->local_session->automation_maxs[AUTOGROUPTYPE_VIDEO_FADE]);
-
-                       keyframe->set_value(new_value);
-
-                       PatchGUI *patch = get_patch_of(current);
-                       if(patch) patch->update(patch->x, patch->y);
-               }
+       for( Track *current=mwindow->edl->tracks->first; current; current=NEXT ) {
+               if( current == skip ) continue;
+               if( skip && !current->armed_gang(skip) ) continue;
+               if( current->data_type != data_type ) continue;
+               if( !current->is_armed() ) continue;
+               FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[AUTOMATION_FADE];
+               double position = mwindow->edl->local_session->get_selectionstart(1);
+               FloatAuto *float_auto = (FloatAuto*)fade_autos->get_auto_for_editing(position);
+               int64_t pos = float_auto->position;
+               float_auto->bump_update(pos, dv, edge, span);
+               PatchGUI *patch = get_patch_of(current);
+               if( patch ) patch->update(patch->x, patch->y);
        }
 }
 
index 5d84e364781671e53e8a8e20e990c33fb50dcb1d..29096a7412283867e5abfc1ba63aba22c2b462da 100644 (file)
@@ -59,7 +59,7 @@ public:
        void update_meters(ArrayList<double> *module_levels);
        void stop_meters();
        void synchronize_nudge(int64_t value, Track *skip);
-       void synchronize_faders(float value, int data_type, Track *skip);
+       void synchronize_faders(float value, int data_type, Track *skip, int edge, int span);
        void set_meter_format(int mode, int min, int max);
        void reset_meters();
 
index f99601c1178f91db5306f1d3680d95efd986bf39..fa471477af7e1eb25338f6311be9e2374a252483 100644 (file)
@@ -71,6 +71,8 @@ PatchGUI::PatchGUI(MWindow *mwindow,
        change_source = 0;
        track_id = track ? track->get_id() : -1;
        mixer = 0;
+       edge = 0;
+       span = 1;
 }
 
 PatchGUI::~PatchGUI()
index edbfddedfb7d588d43f4547e314d971f8749bc14..980296a9d790ec222e12121a03c5602306915b7a 100644 (file)
 #include "guicast.h"
 #include "mwindow.inc"
 #include "patchbay.inc"
+#include "patchgui.inc"
 #include "intauto.inc"
 #include "track.inc"
 
 
-
-
-class TitlePatch;
-class PlayPatch;
-class RecordPatch;
-class AutoPatch;
-class GangPatch;
-class DrawPatch;
-class MutePatch;
-class ZoomPatch;
-class MasterPatch;
-class ExpandPatch;
-class NudgePatch;
-class MixPatch;
-
 class PatchGUI
 {
 public:
@@ -61,8 +47,7 @@ public:
                BC_Toggle *toggle,
                int *output);
        virtual int update(int x, int y);
-       virtual void synchronize_fade(float change) {};
-       void synchronize_faders(float change, int audio, int video);
+       void synchronize_faders(float change, int audio, int video, int edge, int span);
        char* calculate_nudge_text(int *changed);
        int64_t calculate_nudge(const char *string);
 
@@ -90,6 +75,7 @@ public:
        NudgePatch *nudge;
        MixPatch *mix;
        char string_return[BCTEXTLEN];
+       int edge, span;
 };
 
 
@@ -219,5 +205,4 @@ public:
        PatchGUI *patch;
 };
 
-
 #endif
index 26231a067dc584c13bec983c3f356db005488378..68eea315fa2772e2b539b8974a62ec0fab118921 100644 (file)
 #define PATCHGUI_INC
 
 class PatchGUI;
+class PlayPatch;
+class RecordPatch;
+class TitlePatch;
+class AutoPatch;
+class GangPatch;
+class DrawPatch;
+class MutePatch;
+class ZoomPatch;
+class MasterPatch;
+class ExpandPatch;
+class NudgePatch;
+class MixPatch;
 
 #endif
index 1cf0f69dbcd6a51c14251977759d64ca3445a189..c641778d89a30fe7be3b49bfb72b28fcdd4ec3e9 100644 (file)
@@ -250,24 +250,18 @@ double Track::get_length()
 int Track::has_speed()
 {
        FloatAutos *autos = (FloatAutos*)automation->autos[AUTOMATION_SPEED];
-       if(autos)
-       {
-               if(autos->first)
-               {
-                       for(FloatAuto *current = (FloatAuto*)autos->first;
-                               current;
-                               current = (FloatAuto*)current->next)
-                       {
-                               if(!EQUIV(current->get_value(), 1.0) ||
-                                       !EQUIV(current->get_control_in_value(), 0.0) ||
-                                       !EQUIV(current->get_control_out_value(), 0.0))
-                               {
-                                       return 1;
-                               }
-                       }
+       if( autos ) {
+               FloatAuto *current = (FloatAuto*)autos->first;
+               for( ; current; current=(FloatAuto*)current->next ) {
+                       if( !EQUIV(current->get_value(0), 1.0) ||
+                           !EQUIV(current->get_control_in_value(), 0.0) ||
+                           !EQUIV(current->get_control_out_value(), 0.0))
+                               return 1;
+                       if( current->curve_mode == FloatAuto::BUMP &&
+                           !EQUIV(current->get_value(1), 1.0) )
+                               return 1;
                }
        }
-
        return 0;
 }
 
@@ -872,18 +866,16 @@ int Track::copy_automation(double selectionstart,
        return 0;
 }
 
-int Track::paste_automation(double selectionstart, double total_length,
-       double frame_rate, int64_t sample_rate,
-       FileXML *file, int default_only, int active_only)
+int Track::paste_automation(FileXML *file,
+       double selectionstart, double src_length, double src_rate,
+       int default_only, int active_only)
 {
 // Only used for pasting automation alone.
-       double scale = data_type == TRACK_AUDIO ?
-               edl->session->sample_rate / sample_rate :
-               edl->session->frame_rate / frame_rate ;
-
-       total_length *= scale;
-       int64_t start = to_units(selectionstart, 0);
-       int64_t length = to_units(total_length, 1);
+       double dst_rate = data_type == TRACK_AUDIO ?
+               edl->session->sample_rate : edl->session->frame_rate;
+       double scale = dst_rate / src_rate;
+       int64_t start = to_units(selectionstart, 1);
+       int64_t length = to_units(selectionstart + src_length, 1) - start;
        int result = 0;
        int current_pluginset = 0;
 //printf("Track::paste_automation 1\n");
@@ -1864,3 +1856,15 @@ int Track::index_in(Mixer *mixer)
        return k;
 }
 
+void Track::create_keyframes(double position, int mask, int mode)
+{
+       for( int idx=0; idx<AUTOMATION_TOTAL; mask>>=1,++idx ) {
+               if( !(mask & 1) ) continue;
+               Autos *autos = automation->autos[idx];
+               if( !autos ) continue;
+               FloatAuto *float_auto = (FloatAuto *)
+                       autos->get_auto_for_editing(position, -1);
+               float_auto->change_curve_mode((FloatAuto::t_mode)mode, 0);
+       }
+}
+
index 32c6a8ec689e41a2bd25a8c6e129d129eeffcf69..35eb41e371fc773e33dbd942c5912ac1e2e84aae 100644 (file)
@@ -244,8 +244,8 @@ public:
        virtual int copy_automation_derived(AutoConf *auto_conf,
                double selectionstart, double selectionend,
                FileXML *file) { return 0; };
-       int paste_automation(double selectionstart, double total_length,
-               double frame_rate, int64_t sample_rate, FileXML *file,
+       int paste_automation(FileXML *file,
+               double selectionstart, double src_length, double src_rate,
                int default_only, int active_only);
        virtual int paste_automation_derived(double selectionstart, double selectionend,
                double total_length, FileXML *file, int shift_autos, int &current_pan) { return 0; };
@@ -321,6 +321,7 @@ public:
 // If the edit under position is playable.
 // Used by PlayableTracks::is_playable.
        int playable_edit(int64_t position, int direction);
+       void create_keyframes(double position, int mask, int mode);
 
 // ===================================== for handles, titles, etc
 
index 40d87c9cba68013db58a48cef0ea2f2b8b15c4f0..a2b758886826b3ce50be6e04293e8373e1f8be54 100644 (file)
@@ -2460,14 +2460,20 @@ void TrackCanvas::draw_cropped_line(int x1,
 }
 
 
-void TrackCanvas::draw_floatauto(FloatAuto *current, int x, int y,
-               int in_x, int in_y, int out_x, int out_y,
-               int center_pixel, int data_h, int color)
+void TrackCanvas::draw_floatauto(FloatAuto *current,
+               int x_offset, int center_pixel, int data_h, int color,
+               double unit_start, double zoom_units, double yscale,
+               int autogrouptype)
 {
+       double xx, yy;
+       calculate_auto_position(1, &xx, &yy, 0, 0, 0, 0,
+               current, unit_start, zoom_units, yscale, autogrouptype);
+       int x = (int)xx + x_offset;
        int x1 = x - HANDLE_W / 2; // Center
        int x2 = x + HANDLE_W / 2;
-       int y1 = center_pixel + y - HANDLE_H / 2;
-       int y2 = center_pixel + y + HANDLE_H / 2;
+       int y = (int)yy + center_pixel;
+       int y1 = y - HANDLE_H / 2;
+       int y2 = y + HANDLE_H / 2;
        int ymin = center_pixel - data_h / 2;
        int ymax = center_pixel + data_h / 2;
        CLAMP(y1, ymin, ymax);
@@ -2495,13 +2501,22 @@ void TrackCanvas::draw_floatauto(FloatAuto *current, int x, int y,
 // show bezier control points (only) if this
 // floatauto doesn't adjust it's tangents automatically
        if(current->curve_mode != FloatAuto::FREE &&
-          current->curve_mode != FloatAuto::TFREE)
+          current->curve_mode != FloatAuto::TFREE &&
+          current->curve_mode != FloatAuto::BUMP)
                return;
-
-       if(in_x != x)
-               draw_floatauto_ctrlpoint(x, y, in_x, in_y, center_pixel, data_h, color);
-       if(out_x != x)
-               draw_floatauto_ctrlpoint(x, y, out_x, out_y, center_pixel, data_h, color);
+       double in_xx, in_yy, out_xx, out_yy;
+       calculate_auto_position(1, &xx, &yy, &in_xx, &in_yy, 0, 0,
+               current, unit_start, zoom_units, yscale, autogrouptype);
+       int ix = xx, iy = yy, in_x = in_xx, in_y = in_yy;
+       if( in_x != ix )
+               draw_floatauto_ctrlpoint(ix, iy, in_x, in_y, center_pixel, data_h, color);
+       calculate_auto_position(0, &xx, &yy, 0, 0, &out_xx, &out_yy,
+               current, unit_start, zoom_units, yscale, autogrouptype);
+       int ox = xx, oy = yy, out_x = out_xx, out_y = out_yy;
+       if( out_x != ox )
+               draw_floatauto_ctrlpoint(ox, oy, out_x, out_y, center_pixel, data_h, color);
+       if( current->curve_mode == FloatAuto::BUMP && iy != oy )
+               draw_bline(ix, iy+center_pixel, ox, oy+center_pixel);
 }
 
 inline int quantize(float f) { return (int)floor(f + 0.5); }
@@ -2642,16 +2657,21 @@ float TrackCanvas::value_to_percentage(float auto_value, int autogrouptype)
 
 
 
-int TrackCanvas::test_floatauto(FloatAuto *current, int x, int y, int in_x,
-       int in_y, int out_x, int out_y, int center_pixel, int data_h,
-       int cursor_x, int cursor_y, int buttonpress, int autogrouptype)
+int TrackCanvas::test_floatauto(FloatAuto *current, int buttonpress,
+               int center_pixel, int data_h, int cursor_x, int cursor_y,
+               double unit_start, double zoom_units, double yscale,
+               int autogrouptype)
 {
        int result = 0;
-
-       int x1 = x - HANDLE_W / 2;
-       int x2 = x + HANDLE_W / 2;
-       int y1 = center_pixel + y - HANDLE_W / 2;
-       int y2 = center_pixel + y + HANDLE_W / 2;
+       double xx, yy, in_xx, in_yy, out_xx, out_yy;
+       calculate_auto_position(1, &xx, &yy, &in_xx, &in_yy, 0, 0,
+               current, unit_start, zoom_units, yscale, autogrouptype);
+       int ix = xx, iy = yy, in_x = in_xx, in_y = in_yy;
+
+       int x1 = ix - HANDLE_W / 2;
+       int x2 = ix + HANDLE_W / 2;
+       int y1 = center_pixel + iy - HANDLE_W / 2;
+       int y2 = center_pixel + iy + HANDLE_W / 2;
        int ymin = center_pixel - data_h/2;
        int ymax = center_pixel + data_h/2;
        CLAMP(y1, ymin, ymax);
@@ -2664,6 +2684,9 @@ int TrackCanvas::test_floatauto(FloatAuto *current, int x, int y, int in_x,
        CLAMP(in_y1, ymin, ymax);
        CLAMP(in_y2, ymin, ymax);
 
+       calculate_auto_position(0, &xx, &yy, 0, 0, &out_xx, &out_yy,
+               current, unit_start, zoom_units, yscale, autogrouptype);
+       int ox = xx, oy = yy, out_x = out_xx, out_y = out_yy;
        int out_x1 = out_x - HANDLE_W / 2;
        int out_x2 = out_x + HANDLE_W / 2;
        int out_y1 = center_pixel + out_y - HANDLE_W / 2;
@@ -2721,13 +2744,14 @@ int TrackCanvas::test_floatauto(FloatAuto *current, int x, int y, int in_x,
                float lever = 0.0; // we use the tangent as a draggable lever. 1.0 is at the ctrl point
 
 // Test in control
-               if( in_x != x && current->position > 0 &&
+               if( in_x != ix && current->position > 0 &&
                        (FloatAuto::FREE == current->curve_mode ||
-                        FloatAuto::TFREE == current->curve_mode))
+                        FloatAuto::TFREE == current->curve_mode ||
+                        FloatAuto::BUMP == current->curve_mode))
 // act on in control handle only if
 // tangent is significant and is editable (not automatically choosen)
                {
-                       lever = test_curve_line(x, y, in_x, in_y, cursor_x, cursor_y-center_pixel);
+                       lever = test_curve_line(ix, iy, in_x, in_y, cursor_x, cursor_y-center_pixel);
  // either cursor in ctrl-point handle or cursor on tangent line
                        if( WITHIN(in_x1,in_x2,in_y1,in_y2) || lever > 0.0 ) {
                                result = 1;
@@ -2743,12 +2767,13 @@ int TrackCanvas::test_floatauto(FloatAuto *current, int x, int y, int in_x,
                }
 
 // Test out control
-               if(out_x != x &&
+               if(out_x != ox &&
                        (FloatAuto::FREE == current->curve_mode ||
-                        FloatAuto::TFREE == current->curve_mode))
+                        FloatAuto::TFREE == current->curve_mode ||
+                        FloatAuto::BUMP == current->curve_mode))
 // act on out control only if tangent is significant and is editable
                {
-                       lever = test_curve_line(x, y, out_x, out_y, cursor_x, cursor_y-center_pixel);
+                       lever = test_curve_line(ox, oy, out_x, out_y, cursor_x, cursor_y-center_pixel);
                        if(WITHIN(out_x1,out_x2,out_y1,out_y2) || lever > 0.0 ) {
                                result = 1;
                                if(buttonpress && (buttonpress != 3)) {
@@ -2776,6 +2801,9 @@ int TrackCanvas::test_floatauto(FloatAuto *current, int x, int y, int in_x,
        if(buttonpress && (buttonpress != 3) && result)
        {
                mwindow->undo->update_undo_before();
+               double position = current->autos->track->from_units(current->position);
+               mwindow->edl->local_session->set_selectionstart(position);
+               mwindow->edl->local_session->set_selectionend(position);
        }
 
        return result;
@@ -2783,43 +2811,31 @@ int TrackCanvas::test_floatauto(FloatAuto *current, int x, int y, int in_x,
 
 static int is_linear(FloatAuto *prev, FloatAuto *next)
 {
-       if( !prev || !next ) return 1;
+       if( !prev || !next ) return 0;
        if( prev->curve_mode == FloatAuto::LINEAR ) return 1;
        int64_t ipos = prev->get_control_in_position();
        int64_t opos = prev->get_control_out_position();
        if( !ipos && !opos ) return 1;
        if( !ipos || !opos ) return 0;
-       float ival = prev->get_control_in_value();
+       float ival = next->get_control_in_value();
        float oval = prev->get_control_out_value();
-       float cval = prev->get_value(), nval = next->get_value();
+       float cval = prev->get_value(0), nval = next->get_value(1);
        if( !ival && !oval && EQUIV(cval, nval) ) return 1;
        float ig = ival / ipos, og = oval / opos;
        int64_t cpos = prev->position, npos = next->position;
        float g = (nval - cval) / (npos - cpos);
-       if( EQUIV(ig, g) && EQUIV(og, g) ) return 1;
+       if( !EQUIV(g, 0) && EQUIV(ig, g) && EQUIV(og, g) ) return 1;
        return 0;
 }
 
 // Get the float value & y for position x on the canvas
 #define X_TO_FLOATLINE(x) \
-       int64_t position1 = (int64_t)(unit_start + x * zoom_units); \
-       int64_t position2 = (int64_t)(unit_start + x * zoom_units) + 1; \
+       double position = unit_start + x * zoom_units; \
+       int64_t position1 = (int64_t)position, position2 = position1 + 1; \
 /* Call by reference fails for some reason here */ \
        float value1 = autos->get_value(position1, PLAY_FORWARD, previous1, next1); \
        float value2 = autos->get_value(position2, PLAY_FORWARD, previous1, next1); \
-       double position = unit_start + x * zoom_units; \
-       double value = 0; \
-       if(position2 > position1) \
-       { \
-               value = value1 + \
-                       (value2 - value1) * \
-                       (position - position1) / \
-                       (position2 - position1); \
-       } \
-       else \
-       { \
-               value = value1; \
-       } \
+       double value = value1 + (value2 - value1) * (position - position1); \
        AUTOMATIONCLAMPS(value, autogrouptype); \
        int y = center_pixel + \
                (int)(((value - automation_min) / automation_range - 0.5) * -yscale);
@@ -2837,6 +2853,12 @@ void TrackCanvas::draw_floatline(int center_pixel,
        if( (y1 < ytop && y1 >= ybot) && (y2 < ytop || y2 >= ybot) ) return;
 // check for line draw
        if( is_linear(previous, next) ) {
+               if( previous && previous->curve_mode == FloatAuto::BUMP ) {
+                       double ax, ay;
+                       calculate_auto_position(0, &ax, &ay, 0, 0, 0, 0, previous,
+                               unit_start, zoom_units, yscale, autogrouptype);
+                       x1 = ax;  y1 = ay;  y1 += center_pixel;
+               }
                draw_line(x1, y1, x2, y2);
                return;
        }
@@ -2930,41 +2952,44 @@ int TrackCanvas::test_floatline(int center_pixel,
        return result;
 }
 
-
-void TrackCanvas::fill_ganged_autos(int all, float change, Track *skip, FloatAuto *fauto)
+// gang=-1 for keyframepopup update, all tracks where fautos exist
+// gang=0 for trackcanvas drag update, all gang matching tracks, create new fautos if needed
+// gang=1 for trackcanvas drag update, all gang tracks, create new fautos if needed
+void TrackCanvas::fill_ganged_autos(int gang, float change, Track *skip, FloatAuto *fauto)
 {
        if( !skip->is_ganged() ) return;
 // Handles the special case of modifying a fadeauto
 // when there are ganged faders on several tracks
        double position = skip->from_units(fauto->position);
        int autoidx = fauto->autos->autoidx;
-
+       PatchGUI *patch = gang < 0 ? pane->patchbay->get_patch_of(skip) : 0;
+       int edge = patch ? patch->edge : 0;
+       int span = patch ? patch->span : 0;
        for(Track *current = mwindow->edl->tracks->first; current; current = NEXT) {
-               if( (all || current->data_type == skip->data_type) &&
+               if( (gang || current->data_type == skip->data_type) &&
                    current->armed_gang(skip) && current->is_armed() &&
                    current != skip ) {
                        FloatAutos *fade_autos = (FloatAutos*)current->automation->autos[autoidx];
-                       float auto_min = mwindow->edl->local_session->automation_mins[fade_autos->autogrouptype];
-                       float auto_max = mwindow->edl->local_session->automation_maxs[fade_autos->autogrouptype];
-                       int64_t current_position = current->to_units(position, 1);
                        FloatAuto *keyframe = (FloatAuto*)fade_autos->get_auto_at_position(position);
+                       int64_t current_position = current->to_units(position, 1);
                        if( keyframe ) {
 // keyframe exists, just change it
-                               float value = keyframe->get_value();
-                               float new_value = value + change;
-                               CLAMP(new_value, auto_min, auto_max);
-                               keyframe->adjust_to_new_coordinates(current_position, new_value);
+                               keyframe->bump_update(current_position, change, edge, span);
                        }
-                       else if( all >= 0 ) {
+                       else if( gang >= 0 && ( get_double_click() ||
+                                  mwindow->edl->session->auto_keyframes ) ) {
 // create keyframe on neighbouring track at the point in time given by fauto
                                FloatAuto *previous = 0, *next = 0;
                                float value = fade_autos->get_value(current_position, PLAY_FORWARD, previous, next);
                                float new_value = value + change;
-                               CLAMP(new_value, auto_min, auto_max);
+                               float auto_min = mwindow->edl->local_session->automation_mins[fade_autos->autogrouptype];
+                               float auto_max = mwindow->edl->local_session->automation_maxs[fade_autos->autogrouptype];
+                               bclamp(new_value, auto_min, auto_max);
                                keyframe = (FloatAuto*)fade_autos->insert_auto(current_position);
-                               keyframe->set_value(new_value);
+                               keyframe->set_value(new_value, edge);
                        }
-                       if( !keyframe ) continue;
+                       else
+                               continue;
                        mwindow->session->drag_auto_gang->append((Auto *)keyframe);
                }
        }
@@ -2977,11 +3002,9 @@ void TrackCanvas::update_ganged_autos(float change, Track *skip, FloatAuto *faut
        for (int i = 0; i < mwindow->session->drag_auto_gang->total; i++) {
                FloatAuto *keyframe = (FloatAuto *)mwindow->session->drag_auto_gang->values[i];
                int64_t keyframe_position = keyframe->autos->track->to_units(position, 1);
-               float new_value = keyframe->get_value() + change;
-               CLAMP(new_value,
-                     mwindow->edl->local_session->automation_mins[keyframe->autos->autogrouptype],
-                     mwindow->edl->local_session->automation_maxs[keyframe->autos->autogrouptype]);
-               keyframe->adjust_to_new_coordinates(keyframe_position, new_value);
+               keyframe->bump_update(keyframe_position, change, 0, 0);
+               keyframe->set_control_in_value(fauto->get_control_in_value());
+               keyframe->set_control_out_value(fauto->get_control_out_value());
        }
 }
 
@@ -3133,7 +3156,7 @@ float TrackCanvas::percentage_to_value(float percentage,
 }
 
 
-void TrackCanvas::calculate_auto_position(double *x, double *y,
+void TrackCanvas::calculate_auto_position(int edge, double *x, double *y,
        double *in_x, double *in_y, double *out_x, double *out_y,
        Auto *current, double unit_start, double zoom_units, double yscale,
        int autogrouptype)
@@ -3145,7 +3168,7 @@ void TrackCanvas::calculate_auto_position(double *x, double *y,
                automation_range = SPEED_MIN;
        FloatAuto *ptr = (FloatAuto*)current;
        *x = (double)(ptr->position - unit_start) / zoom_units;
-       *y = ((ptr->get_value() - automation_min) / automation_range - 0.5) * -yscale;
+       *y = ((ptr->get_value(edge) - automation_min) / automation_range - 0.5) * -yscale;
 
        if(in_x) {
 //             *in_x = EQUIV(ptr->control_in_value, 0.0) ? *x : *x - mwindow->theme->control_pixels;
@@ -3153,7 +3176,7 @@ void TrackCanvas::calculate_auto_position(double *x, double *y,
        }
 
        if(in_y) {
-               *in_y = (((ptr->get_value() + ptr->get_control_in_value()) -
+               *in_y = (((ptr->get_value(edge) + ptr->get_control_in_value()) -
                                automation_min) / automation_range - 0.5) * -yscale;
        }
 
@@ -3163,7 +3186,7 @@ void TrackCanvas::calculate_auto_position(double *x, double *y,
        }
 
        if(out_y) {
-               *out_y = (((ptr->get_value() + ptr->get_control_out_value()) -
+               *out_y = (((ptr->get_value(edge) + ptr->get_control_out_value()) -
                                 automation_min) / automation_range - 0.5) * -yscale;
        }
 }
@@ -3178,7 +3201,6 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
        double view_start, unit_start;
        double view_end, unit_end, yscale;
        double zoom_sample, zoom_units;
-       double in_x2, in_y2, out_x2, out_y2;
        double slope;
        //int skip = 0;
 
@@ -3201,7 +3223,7 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
 
        double ax = 0, ay = 0, ax2 = 0, ay2 = 0;
        if( first_auto ) {
-               calculate_auto_position(&ax, &ay, 0, 0, 0, 0,
+               calculate_auto_position(0, &ax, &ay, 0, 0, 0, 0,
                        first_auto, unit_start, zoom_units, yscale, autogrouptype);
        }
        if( current )
@@ -3216,7 +3238,7 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
                draw_auto = 1;
 
                if(current) {
-                       calculate_auto_position(&ax2, &ay2, &in_x2, &in_y2, &out_x2, &out_y2,
+                       calculate_auto_position(1, &ax2, &ay2, 0, 0, 0, 0,
                                current, unit_start, zoom_units, yscale, autogrouptype);
                }
                else {
@@ -3241,18 +3263,16 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
 // Draw or test handle
                if( current && !result && current != autos->default_auto ) {
                        if( !draw && track->is_armed() ) {
-                               result = test_floatauto((FloatAuto*)current, (int)ax2, (int)ay2,
-                                       (int)in_x2, (int)in_y2, (int)out_x2, (int)out_y2,
+                               result = test_floatauto((FloatAuto*)current, buttonpress,
                                        (int)center_pixel, (int)yscale, cursor_x, cursor_y,
-                                       buttonpress, autogrouptype);
+                                       unit_start, zoom_units, yscale, autogrouptype);
                                if( result )
                                        auto_instance = current;
                        }
                        if( draw && draw_auto ) {
-                               draw_floatauto((FloatAuto*)current, (int)ax2 + x_offset, (int)ay2,
-                                       (int)in_x2 + x_offset, (int)in_y2,
-                                       (int)out_x2 + x_offset, (int)out_y2,
-                                       (int)center_pixel + y_offset, (int)yscale, color);
+                               draw_floatauto((FloatAuto*)current, x_offset,
+                                       (int)center_pixel + y_offset, (int)yscale, color,
+                                       unit_start, zoom_units, yscale, autogrouptype);
                        }
                }
 
@@ -3272,9 +3292,10 @@ int TrackCanvas::do_float_autos(Track *track, Autos *autos, int cursor_x, int cu
 
                if( current ) {
                        previous = current;
+                       calculate_auto_position(0, &ax2, &ay2, 0, 0, 0, 0, previous,
+                               unit_start, zoom_units, yscale, autogrouptype);
                        current = NEXT;
                }
-
                ax = ax2;  ay = ay2;
        } while( current && current->position <= unit_end && !result );
 
@@ -3687,7 +3708,7 @@ int TrackCanvas::draw_hairline(Auto *auto_keyframe, int color, int show)
                return 0;
 
        double ax = 0, ay = 0;
-       calculate_auto_position(&ax, &ay, 0, 0, 0, 0,
+       calculate_auto_position(0, &ax, &ay, 0, 0, 0, 0,
                auto_keyframe, unit_start, zoom_units, yscale, autogrouptype);
 
        set_color(color);
@@ -4026,7 +4047,8 @@ int TrackCanvas::update_drag_floatauto(int cursor_x, int cursor_y)
 // not really editing the node, rather start editing the curve
 // tangent is editable and drag movement is significant
                if( (FloatAuto::FREE == current->curve_mode ||
-                    FloatAuto::TFREE==current->curve_mode) &&
+                    FloatAuto::TFREE==current->curve_mode ||
+                    FloatAuto::BUMP==current->curve_mode) &&
                    (fabs(x) > HANDLE_W / 2 || fabs(y) > HANDLE_W / 2))
                        mwindow->session->drag_handle = x < 0 ? 1 : 2;
        }
@@ -4036,28 +4058,27 @@ int TrackCanvas::update_drag_floatauto(int cursor_x, int cursor_y)
 // Snap to nearby values
                old_value = current->get_value();
                if(shift_down()) {
-                       double value1, value2, distance1=-1, distance2=-1;
-
+                       double distance1=-1, distance2=-1;
                        if(current->previous) {
                                int autogrouptype = current->previous->autos->autogrouptype;
                                value = percentage_to_value(percentage, 0, 0, autogrouptype);
-                               value1 = ((FloatAuto*)current->previous)->get_value();
+                               double value1 = ((FloatAuto*)current->previous)->get_value(0);
                                distance1 = fabs(value - value1);
-                               current->set_value(value1);
+                               current->set_value(value1, 1);
                        }
 
                        if(current->next) {
                                int autogrouptype = current->next->autos->autogrouptype;
                                value = percentage_to_value(percentage, 0, 0, autogrouptype);
-                               value2 = ((FloatAuto*)current->next)->get_value();
+                               double value2 = ((FloatAuto*)current->next)->get_value(1);
                                distance2 = fabs(value - value2);
                                if(!current->previous || distance2 < distance1) {
-                                       current->set_value(value2);
+                                       current->set_value(value2, 0);
                                }
                        }
 
                        if(!current->previous && !current->next) {
-                               current->set_value( ((FloatAutos*)current->autos)->default_);
+                               current->set_value(((FloatAutos*)current->autos)->default_, 0);
                        }
                        value = current->get_value();
                }
index 006b7805eb3201bcbb5455742d43da8081513d99..8a3d2b6e864e0ba59cc062d980074fc105a4f26b 100644 (file)
@@ -101,16 +101,16 @@ public:
        void draw_inout_points();
        void draw_auto(Auto *current, int x, int y,
                int center_pixel, int data_h);
-       void draw_floatauto(FloatAuto *current, int x, int y,
-               int in_x, int in_y, int out_x, int out_y,
-               int center_pixel, int data_h, int color);
+       void draw_floatauto(FloatAuto *current,
+               int x_offset, int center_pixel, int data_h, int color,
+               double unit_start, double zoom_units, double yscale,
+               int autogrouptype);
        int test_auto(Auto *current, int x, int y,
                int center_pixel, int data_h,
                int cursor_x, int cursor_y, int buttonpress);
-       int test_floatauto(FloatAuto *current, int x, int y,
-               int in_x, int in_y, int out_x, int out_y,
-               int center_pixel, int data_h,
-               int cursor_x, int cursor_y, int buttonpress,
+       int test_floatauto(FloatAuto *current, int buttonpress,
+               int center_pixel, int data_h, int cursor_x, int cursor_y,
+               double unit_start, double zoom_units, double yscale,
                int autogrouptype);
        void draw_floatline(int center_pixel,
                FloatAuto *previous,
@@ -212,24 +212,13 @@ public:
 // if reference is nonzero and a FloatAuto,
 //     the result is made relative to the value in reference.
        float percentage_to_value(float percentage,
-               int is_toggle,
-               Auto *reference,
-               int autogrouptype);
-
+               int is_toggle, Auto *reference, int autogrouptype);
 // Get x and y of a FloatAuto relative to center_pixel
-       void calculate_auto_position(double *x,
-               double *y,
-               double *in_x,
-               double *in_y,
-               double *out_x,
-               double *out_y,
-               Auto *current,
-               double unit_start,
-               double zoom_units,
-               double yscale,
-               int autogrouptype);
-
-       void fill_ganged_autos(int all, float change, Track *skip, FloatAuto *fauto);
+       void calculate_auto_position(int edge, double *x, double *y,
+               double *in_x, double *in_y, double *out_x, double *out_y,
+               Auto *current, double unit_start, double zoom_units,
+               double yscale, int autogrouptype);
+       void fill_ganged_autos(int gang, float change, Track *skip, FloatAuto *fauto);
        void update_ganged_autos(float change, Track *skip, FloatAuto *fauto);
        void clear_ganged_autos();
 
index 36dc79cc5d4c1ab9ccd5628337c66237ae5dc565..101e7cdb8dbd9e274df7336381164901d9b8795b 100644 (file)
@@ -815,3 +815,11 @@ void Tracks::update_idxbl_length(int id, double dt)
        }
 }
 
+void Tracks::create_keyframes(double position, int mask, int mode)
+{
+       for( Track *track=first; track; track=track->next ) {
+               if( !track->is_armed() ) continue;
+               track->create_keyframes(position, mask, mode);
+       }
+}
+
index c44cbfef0835ed180f17f73c9c29299fb193d981..e839b772828c422daa9b5a95b2160c047c84a764 100644 (file)
@@ -250,6 +250,7 @@ public:
        void set_transition_length(Transition *transition, double length);
        void paste_transitions(double start, double end, int track_type, char* title);
        void update_idxbl_length(int id, double dt);
+       void create_keyframes(double position, int mask, int mode);
 
 // ================================== accounting
 
@@ -266,7 +267,6 @@ public:
        Track* number(int number);      // pointer to track number
        Track *get(int idx, int data_type);
 
-
 private:
 };
 
index bf250b36623cd26379552478abfc719c22d1e01c..a3dfca741e4a69f784285087a934e65b2ead7e98 100644 (file)
@@ -1013,7 +1013,6 @@ void Tracks::paste_automation(double selectionstart,
        Track* current_atrack = 0;
        Track* current_vtrack = 0;
        Track* dst_track = 0;
-       int src_type;
        int result = 0;
        double length;
        double frame_rate = edl->session->frame_rate;
@@ -1022,10 +1021,9 @@ void Tracks::paste_automation(double selectionstart,
        string[0] = 0;
 
 // Search for start
-       do{
-         result = file->read_tag();
-       }while(!result &&
-               !file->tag.title_is("AUTO_CLIPBOARD"));
+       do {
+               result = file->read_tag();
+       } while(!result && !file->tag.title_is("AUTO_CLIPBOARD"));
 
        if(!result)
        {
@@ -1033,7 +1031,6 @@ void Tracks::paste_automation(double selectionstart,
                frame_rate = file->tag.get_property("FRAMERATE", frame_rate);
                sample_rate = file->tag.get_property("SAMPLERATE", sample_rate);
 
-
                do
                {
                        result = file->read_tag();
@@ -1048,15 +1045,9 @@ void Tracks::paste_automation(double selectionstart,
                                if(file->tag.title_is("TRACK"))
                                {
                                        file->tag.get_property("TYPE", string);
-                                       if(!strcmp(string, "AUDIO"))
-                                       {
-                                               src_type = TRACK_AUDIO;
-                                       }
-                                       else
-                                       {
-                                               src_type = TRACK_VIDEO;
-                                       }
-
+                                       double src_rate = !strcmp(string, "AUDIO") ?
+                                               sample_rate : frame_rate;
+                                       double src_length = length / src_rate;
 // paste to any media type
                                        if(typeless)
                                        {
@@ -1098,22 +1089,9 @@ void Tracks::paste_automation(double selectionstart,
 
                                        if(dst_track)
                                        {
-                                               double frame_rate2 = frame_rate;
-                                               double sample_rate2 = sample_rate;
-
-                                               if(src_type != dst_track->data_type)
-                                               {
-                                                       frame_rate2 = sample_rate;
-                                                       sample_rate2 = frame_rate;
-                                               }
-
-                                               dst_track->paste_automation(selectionstart,
-                                                       length,
-                                                       frame_rate2,
-                                                       sample_rate2,
-                                                       file,
-                                                       default_only,
-                                                       active_only);
+                                               dst_track->paste_automation(file,
+                                                       selectionstart, src_length, src_rate,
+                                                       default_only, active_only);
                                        }
                                }
                        }
index 2239ec20e99a1b9f4c402c45e3b89db5d2a7f141..89d00f59427d9ba70a59702a9559017b2286ca9d 100644 (file)
@@ -249,7 +249,7 @@ int VModule::import_frame(VFrame *output, VEdit *current_edit,
                                FloatAutos *speed_autos = (FloatAutos*)track->automation->autos[AUTOMATION_SPEED];
                                speed_position += speed_autos->automation_integral(edit_startproject,
                                                direction_position-edit_startproject, PLAY_FORWARD);
-//printf("VModule::import_frame %d %lld %lld\n", __LINE__, position, (int64_t)speed_position);
+//printf("VModule::import_frame %d %jd %jd\n", __LINE__, position, (int64_t)speed_position);
                                position = (int64_t)speed_position;
                        }
 
index 73a4653aec4b3c0f94fc6ed7899d2c34a599dbd9..d643181607136013d663630edee0d0a21e79bc4a 100644 (file)
@@ -161,14 +161,12 @@ void VPatchGUI::update_faders(float v)
        double position = mwindow->edl->local_session->get_selectionstart(1);
        Autos *fade_autos = vtrack->automation->autos[AUTOMATION_FADE];
        int need_undo = !fade_autos->auto_exists_for_editing(position);
-
        mwindow->undo->update_undo_before(_("fade"), need_undo ? 0 : this);
        FloatAuto *current = (FloatAuto*)fade_autos->get_auto_for_editing(position);
-       float change = v - current->get_value();
-       current->set_value(v);
-
+       float change = v - current->get_value(edge);
+       current->bump_value(v, edge, span);
        if( track->is_ganged() && track->is_armed() )
-               patchbay->synchronize_faders(change, TRACK_AUDIO, track);
+               patchbay->synchronize_faders(change, TRACK_VIDEO, track, edge, span);
        mwindow->undo->update_undo_after(_("fade"), LOAD_AUTOMATION);
        change_source = 0;
 
@@ -189,33 +187,64 @@ int VFadePatch::handle_event()
        return 1;
 }
 
-VKeyFadePatch::VKeyFadePatch(MWindow *mwindow, VPatchGUI *patch, int x, int y)
- : BC_SubWindow(x,y, xS(200),yS(20), GWindowGUI::auto_colors[AUTOMATION_FADE])
+VKeyFadePatch::VKeyFadePatch(MWindow *mwindow, VPatchGUI *gui,
+                       int bump, int x, int y)
+ : BC_SubWindow(x,y, xS(200),yS(bump ? 50 : 24),
+               GWindowGUI::auto_colors[AUTOMATION_FADE])
 {
        this->mwindow = mwindow;
-       this->patch = patch;
+       this->gui = gui;
+}
+VKeyFadePatch::~VKeyFadePatch()
+{
 }
 
 void VKeyFadePatch::create_objects()
 {
-       int x = 0, y = 0;
-       int64_t v = mwindow->get_float_auto(patch, AUTOMATION_FADE)->get_value();
+       int x = 0, x1 = x, y = 0, dy = 0;
+       FloatAuto *fade_auto = mwindow->get_float_auto(gui, AUTOMATION_FADE);
+       int64_t v = fade_auto->get_value(gui->edge);
        add_subwindow(vkey_fade_text = new VKeyFadeText(this, x, y, xS(64), v));
        x += vkey_fade_text->get_w();
+       dy = bmax(dy, vkey_fade_text->get_h());
        VFrame **lok_images = mwindow->theme->get_image_set("lok");
        int w1 = get_w() - x - lok_images[0]->get_w();
        add_subwindow(vkey_fade_slider = new VKeyFadeSlider(this, x, y, w1, v));
        x += vkey_fade_slider->get_w();
+       dy = bmax(dy, vkey_fade_slider->get_h());
        add_subwindow(vkey_fade_ok = new VKeyFadeOK(this, x, y, lok_images));
+       dy = bmax(dy, vkey_fade_ok->get_h());
+       if( fade_auto->is_bump() ) {
+               y += dy;
+               set_color(get_resources()->get_bg_color());
+               draw_box(0,y, get_w(),get_h());
+               add_subwindow(auto_edge = new VKeyPatchAutoEdge(mwindow, this, x1, y));
+               x1 += auto_edge->get_w() + xS(15);
+               add_subwindow(auto_span = new VKeyPatchAutoSpan(mwindow, this, x1, y));
+       }
+       draw_3d_border(0,0, get_w(), get_h(), 0);
        activate();
        show_window();
 }
 
+void VKeyFadePatch::set_edge(int edge)
+{
+       gui->edge = edge;
+       FloatAuto *fade_auto = mwindow->get_float_auto(gui, AUTOMATION_FADE);
+       int64_t v = fade_auto->get_value(edge);
+       update(v);
+}
+
+void VKeyFadePatch::set_span(int span)
+{
+       gui->span = span;
+}
+
 void VKeyFadePatch::update(int64_t v)
 {
        vkey_fade_text->update(v);
        vkey_fade_slider->update(v);
-       patch->update_faders(v);
+       gui->update_faders(v);
 }
 
 VKeyFadeOK::VKeyFadeOK(VKeyFadePatch *vkey_fade_patch, int x, int y, VFrame **images)
@@ -226,9 +255,8 @@ VKeyFadeOK::VKeyFadeOK(VKeyFadePatch *vkey_fade_patch, int x, int y, VFrame **im
 
 int VKeyFadeOK::handle_event()
 {
-       MWindowGUI *mgui = vkey_fade_patch->mwindow->gui;
-       delete mgui->keyvalue_popup;
-       mgui->keyvalue_popup = 0;
+       MWindow *mwindow = vkey_fade_patch->mwindow;
+       mwindow->gui->close_keyvalue_popup();
        return 1;
 }
 
@@ -248,7 +276,7 @@ int VKeyFadeText::handle_event()
 
 VKeyFadeSlider::VKeyFadeSlider(VKeyFadePatch *vkey_fade_patch,
        int x, int y, int w, int64_t v)
- : VFadePatch(vkey_fade_patch->patch, x,y, w, v)
+ : VFadePatch(vkey_fade_patch->gui, x,y, w, v)
 {
        this->vkey_fade_patch = vkey_fade_patch;
 }
@@ -299,14 +327,10 @@ int VModePatch::handle_event()
        double position = mwindow->edl->local_session->get_selectionstart(1);
        Autos *mode_autos = patch->vtrack->automation->autos[AUTOMATION_MODE];
        int need_undo = !mode_autos->auto_exists_for_editing(position);
-
        mwindow->undo->update_undo_before(_("mode"), need_undo ? 0 : this);
-
        current = (IntAuto*)mode_autos->get_auto_for_editing(position);
        current->value = mode;
-
        mwindow->undo->update_undo_after(_("mode"), LOAD_AUTOMATION);
-
        mwindow->sync_parameters(CHANGE_PARAMS);
 
        if( mwindow->edl->session->auto_conf->autos[AUTOMATION_MODE] ) {
@@ -489,3 +513,35 @@ VMixPatch::~VMixPatch()
 {
 }
 
+VKeyPatchAutoEdge::VKeyPatchAutoEdge(MWindow *mwindow,
+               VKeyFadePatch *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_edge"),
+                patch->gui->span,_("Edge"))
+{
+        this->mwindow = mwindow;
+        this->patch = patch;
+        set_tooltip(_("Bump uses left edge"));
+}
+
+int VKeyPatchAutoEdge::handle_event()
+{
+        patch->set_edge(get_value());
+        return 1;
+}
+
+VKeyPatchAutoSpan::VKeyPatchAutoSpan(MWindow *mwindow,
+                VKeyFadePatch *patch, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->get_image_set("bump_span"),
+                patch->gui->span,_("Span"))
+{
+        this->mwindow = mwindow;
+        this->patch = patch;
+        set_tooltip(_("Bump spans to next"));
+}
+
+int VKeyPatchAutoSpan::handle_event()
+{
+        patch->set_span(get_value());
+        return 1;
+}
+
index 76140a41d9b124fca90044a219107c87b5ba8f59..dad69e8326db62d60890d1f57482e1fc7054db74 100644 (file)
@@ -61,15 +61,21 @@ public:
 class VKeyFadePatch : public BC_SubWindow
 {
 public:
-       VKeyFadePatch(MWindow *mwindow, VPatchGUI *patch, int x, int y);
+       VKeyFadePatch(MWindow *mwindow, VPatchGUI *gui,
+                       int bump, int x, int y);
+       ~VKeyFadePatch();
        void create_objects();
+       void set_edge(int edge);
+       void set_span(int span);
        void update(int64_t v);
 
        MWindow *mwindow;
-       VPatchGUI *patch;
+       VPatchGUI *gui;
        VKeyFadeOK *vkey_fade_ok;
        VKeyFadeText *vkey_fade_text;
        VKeyFadeSlider *vkey_fade_slider;
+       VKeyPatchAutoEdge *auto_edge;
+       VKeyPatchAutoSpan *auto_span;
 };
 
 class VKeyFadeOK : public BC_Button
@@ -159,4 +165,22 @@ public:
        ~VMixPatch();
 };
 
+class VKeyPatchAutoEdge : public BC_Toggle
+{
+public:
+       VKeyPatchAutoEdge(MWindow *mwindow, VKeyFadePatch *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       VKeyFadePatch *patch;
+};
+
+class VKeyPatchAutoSpan : public BC_Toggle
+{
+public:
+       VKeyPatchAutoSpan(MWindow *mwindow, VKeyFadePatch *patch, int x, int y);
+       int handle_event();
+       MWindow *mwindow;
+       VKeyFadePatch *patch;
+};
+
 #endif
index 94b9a3e0ee79adb618cb7475ef90253438f28af4..e805854e784506670e8d142aeefed303fecaf7c4 100644 (file)
@@ -34,6 +34,8 @@ class VModePatchSubMenu;
 class VModeSubMenuItem;
 class VKeyModePatch;
 class VMixPatch;
+class VKeyPatchAutoEdge;
+class VKeyPatchAutoSpan;
 
 #define MAX_VIDEO_FADE 100
 
index 3619d43953f75a1c8245c47604aae43c26bd3492..a6a9bc32f306e89eaf0ddfb690c90d750b724751 100644 (file)
@@ -846,6 +846,22 @@ void BlondTheme::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -932,6 +948,9 @@ void BlondTheme::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_blond/data/edge_off.png b/cinelerra-5.1/plugins/theme_blond/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/edge_on.png b/cinelerra-5.1/plugins/theme_blond/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/span_off.png b/cinelerra-5.1/plugins/theme_blond/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/span_on.png b/cinelerra-5.1/plugins/theme_blond/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/tan_bump.png b/cinelerra-5.1/plugins/theme_blond/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/tan_free.png b/cinelerra-5.1/plugins/theme_blond/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_blond/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/tan_tangent.png differ
index 993f75ad3436e962b94467d8a2097c7bb986bf32..347110ca942ef31e0a0731867035d01d2157f7fc 100644 (file)
@@ -860,6 +860,23 @@ void BlondCVTheme::initialize()
        //new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
        //wrench_data = new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn);
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
+
 // CWindow icons
        new_image("cwindow_inactive", "cwindow_inactive.png");
        new_image("cwindow_active", "cwindow_active.png");
@@ -975,6 +992,9 @@ void BlondCVTheme::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/edge_off.png b/cinelerra-5.1/plugins/theme_blond_cv/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/edge_on.png b/cinelerra-5.1/plugins/theme_blond_cv/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/span_off.png b/cinelerra-5.1/plugins/theme_blond_cv/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/span_on.png b/cinelerra-5.1/plugins/theme_blond_cv/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/tan_bump.png b/cinelerra-5.1/plugins/theme_blond_cv/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/tan_free.png b/cinelerra-5.1/plugins/theme_blond_cv/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_blond_cv/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/tan_tangent.png differ
index f83fc3a8722c32da3ceb7c14493a499f73482cc5..9f64aa7cb8627eabb995b169c642dba93e9d0c74 100644 (file)
@@ -844,6 +844,22 @@ void BlueDotTheme::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -930,6 +946,9 @@ void BlueDotTheme::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_blue/data/edge_off.png b/cinelerra-5.1/plugins/theme_blue/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/edge_on.png b/cinelerra-5.1/plugins/theme_blue/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/span_off.png b/cinelerra-5.1/plugins/theme_blue/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/span_on.png b/cinelerra-5.1/plugins/theme_blue/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/tan_bump.png b/cinelerra-5.1/plugins/theme_blue/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/tan_free.png b/cinelerra-5.1/plugins/theme_blue/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_blue/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/tan_tangent.png differ
index dd42972e44c194f74d3a53b0d8bb969b4fa9deea..8fb86f34e08efa122c435ba4a6883678605da6eb 100644 (file)
@@ -877,6 +877,23 @@ void BlueDotTheme::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", "editpanelW_up.png", "editpanelW_hi.png", "editpanelW_dn.png", "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
+
 //Make transparent borders
 #define TRANSPORT_LEFT_IMAGES  "transport_left_up.png", "transport_left_hi.png", "transport_left_dn.png"
 #define TRANSPORT_CENTER_IMAGES  "transport_center_up.png", "transport_center_hi.png", "transport_center_dn.png"
@@ -970,23 +987,12 @@ void BlueDotTheme::initialize()
        new_toggle("titlesafe.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "titlesafe");
        new_toggle("toolwindow.png", cpanel_up, cpanel_hi, cpanel_checked, cpanel_dn, cpanel_checkedhi, "tool");
 
-
-// Maybe we can live without the commented part
-// MIHA: Commented out in favor of default version M4>>
-//     new_toggle("camera.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"camera");
-//     new_toggle("crop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"crop");
-//     new_toggle("eyedrop.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"eyedrop");
-//     new_toggle("magnify.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"magnify");
-//     new_toggle("mask.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"mask");
-//     new_toggle("projector.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"projector");
-//     new_toggle("protect.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"protect");
-//     new_toggle("titlesafe.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"titlesafe");
-//     new_toggle("toolwindow.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi,"tool");
-// MIHA: Commented out in favor of default version M4<<
-
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/edge_off.png b/cinelerra-5.1/plugins/theme_blue_dot/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/edge_on.png b/cinelerra-5.1/plugins/theme_blue_dot/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/span_off.png b/cinelerra-5.1/plugins/theme_blue_dot/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/span_on.png b/cinelerra-5.1/plugins/theme_blue_dot/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/tan_bump.png b/cinelerra-5.1/plugins/theme_blue_dot/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/tan_free.png b/cinelerra-5.1/plugins/theme_blue_dot/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_blue_dot/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/tan_tangent.png differ
index 2ca4541de55d3b0dc627d72872a74413efff9e47..32740bba0c8355fbbdfe9a2deafe42b7145ad300 100644 (file)
@@ -848,6 +848,22 @@ void BrightTheme::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -928,6 +944,9 @@ void BrightTheme::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_bright/data/edge_off.png b/cinelerra-5.1/plugins/theme_bright/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/edge_on.png b/cinelerra-5.1/plugins/theme_bright/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/span_off.png b/cinelerra-5.1/plugins/theme_bright/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/span_on.png b/cinelerra-5.1/plugins/theme_bright/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/tan_bump.png b/cinelerra-5.1/plugins/theme_bright/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/tan_free.png b/cinelerra-5.1/plugins/theme_bright/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_bright/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/tan_tangent.png differ
index 9c0cdd975c0b0c46c94949ba1e17d21822afa493..b6194ec22f24c6264f6e5d46c3ce36257f7221e5 100644 (file)
@@ -910,6 +910,28 @@ void CAKEWALKTHEME::initialize()
  new_button("wrench.png",
       editpanel_up, editpanel_hi, editpanel_dn,
       "wrench");
+
+ VFrame **edge_on = new_toggle("edge_on.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi, "edge_on");
+ VFrame **edge_off = new_toggle("edge_off.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi, "edge_off");
+ new_image_set_images("bump_edge", 5,
+      new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+      new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+      new VFrame(*edge_on[4]));
+ VFrame **span_on = new_toggle("span_on.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi, "span_on");
+ VFrame **span_off = new_toggle("span_off.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi, "span_off");
+ new_image_set_images("bump_span", 5,
+      new VFrame(*span_off[0]), new VFrame(*span_off[1]),
+      new VFrame(*span_on[0]),  new VFrame(*span_off[3]),
+      new VFrame(*span_on[4]));
+
  VFrame *transport_up = new_image("transportup.png");
  VFrame *transport_hi = new_image("transporthi.png");
  VFrame *transport_dn = new_image("transportdn.png");
@@ -1051,6 +1073,18 @@ void CAKEWALKTHEME::initialize()
       editpanel_up, editpanel_hi, editpanel_checked,
       editpanel_dn, editpanel_checkedhi,
       "tan_linear");
+ new_toggle("tan_tangent.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi,
+      "tan_tangent");
+ new_toggle("tan_free.png",
+       editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi,
+      "tan_free");
+ new_toggle("tan_bump.png",
+      editpanel_up, editpanel_hi, editpanel_checked,
+      editpanel_dn, editpanel_checkedhi,
+      "tan_bump");
  new_toggle("mask_scale_x.png", "mask_scale_up.png", "mask_scale_uphi.png",
       "mask_scale_chkd.png", "mask_scale_xdown.png", "mask_scale_chkdhi.png",
       "mask_scale_x");
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/edge_off.png b/cinelerra-5.1/plugins/theme_cakewalk/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/edge_on.png b/cinelerra-5.1/plugins/theme_cakewalk/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/span_off.png b/cinelerra-5.1/plugins/theme_cakewalk/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/span_on.png b/cinelerra-5.1/plugins/theme_cakewalk/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/tan_bump.png b/cinelerra-5.1/plugins/theme_cakewalk/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/tan_free.png b/cinelerra-5.1/plugins/theme_cakewalk/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_cakewalk/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_cakewalk/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_cakewalk/data/tan_tangent.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/edge_off.png b/cinelerra-5.1/plugins/theme_hulk/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/edge_on.png b/cinelerra-5.1/plugins/theme_hulk/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/span_off.png b/cinelerra-5.1/plugins/theme_hulk/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/span_on.png b/cinelerra-5.1/plugins/theme_hulk/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/tan_bump.png b/cinelerra-5.1/plugins/theme_hulk/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/tan_free.png b/cinelerra-5.1/plugins/theme_hulk/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_hulk/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/tan_tangent.png differ
index 2a93f8abcc973b02d278474aad2ca825979fd6f4..218164722ff8665bd6aab8f4ced384f848c704bb 100644 (file)
@@ -843,6 +843,22 @@ void HULKTHEME::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -929,6 +945,9 @@ void HULKTHEME::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/edge_off.png b/cinelerra-5.1/plugins/theme_neophyte/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/edge_on.png b/cinelerra-5.1/plugins/theme_neophyte/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/span_off.png b/cinelerra-5.1/plugins/theme_neophyte/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/span_on.png b/cinelerra-5.1/plugins/theme_neophyte/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/tan_bump.png b/cinelerra-5.1/plugins/theme_neophyte/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/tan_free.png b/cinelerra-5.1/plugins/theme_neophyte/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_neophyte/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/tan_tangent.png differ
index 744f5dcfaed4fccff08d5f7c3c940d94ef7308d3..827ef45f004a56aed567749da5340d64cf4159ab 100644 (file)
@@ -1055,6 +1055,23 @@ void NEOPHYTETHEME::initialize()
                           editpanel_up, editpanel_hi, editpanel_dn,
                           "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
+
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
        VFrame *transport_dn = new_image("transportdn.png");
@@ -1204,6 +1221,18 @@ void NEOPHYTETHEME::initialize()
                           editpanel_up, editpanel_hi, editpanel_checked,
                           editpanel_dn, editpanel_checkedhi,
                           "tan_linear");
+       new_toggle("tan_tangent.png",
+                          editpanel_up, editpanel_hi, editpanel_checked,
+                          editpanel_dn, editpanel_checkedhi,
+                          "tan_tangent");
+       new_toggle("tan_free.png",
+                          editpanel_up, editpanel_hi, editpanel_checked,
+                          editpanel_dn, editpanel_checkedhi,
+                          "tan_free");
+       new_toggle("tan_bump.png",
+                          editpanel_up, editpanel_hi, editpanel_checked,
+                          editpanel_dn, editpanel_checkedhi,
+                          "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/edge_off.png b/cinelerra-5.1/plugins/theme_pinklady/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/edge_on.png b/cinelerra-5.1/plugins/theme_pinklady/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/span_off.png b/cinelerra-5.1/plugins/theme_pinklady/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/span_on.png b/cinelerra-5.1/plugins/theme_pinklady/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/tan_bump.png b/cinelerra-5.1/plugins/theme_pinklady/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/tan_free.png b/cinelerra-5.1/plugins/theme_pinklady/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_pinklady/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/tan_tangent.png differ
index 7de528a7ea6faf6aedaa07bd7ce33f5d1c017f1b..a2e6b319dbeaf265e59a2ef190f3cd7d00e3a73c 100644 (file)
@@ -843,6 +843,22 @@ void PINKLADY::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -929,6 +945,9 @@ void PINKLADY::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_suv/data/edge_off.png b/cinelerra-5.1/plugins/theme_suv/data/edge_off.png
new file mode 100644 (file)
index 0000000..496196f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/edge_on.png b/cinelerra-5.1/plugins/theme_suv/data/edge_on.png
new file mode 100644 (file)
index 0000000..8781d70
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/span_off.png b/cinelerra-5.1/plugins/theme_suv/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/span_on.png b/cinelerra-5.1/plugins/theme_suv/data/span_on.png
new file mode 100644 (file)
index 0000000..5c81473
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/tan_bump.png b/cinelerra-5.1/plugins/theme_suv/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/tan_free.png b/cinelerra-5.1/plugins/theme_suv/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_suv/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/tan_tangent.png differ
index 8f0ed26a67dd8430627bd9413f59611abff79c1d..8b0e702c01eef55da97945450d944520aeb8138a 100644 (file)
@@ -830,6 +830,22 @@ void SUV::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -916,6 +932,9 @@ void SUV::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/edge_off.png b/cinelerra-5.1/plugins/theme_unflat/data/edge_off.png
new file mode 100644 (file)
index 0000000..4201862
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/edge_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/edge_on.png b/cinelerra-5.1/plugins/theme_unflat/data/edge_on.png
new file mode 100644 (file)
index 0000000..bfc7ac9
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/edge_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/span_off.png b/cinelerra-5.1/plugins/theme_unflat/data/span_off.png
new file mode 100644 (file)
index 0000000..7bcbb2c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/span_off.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/span_on.png b/cinelerra-5.1/plugins/theme_unflat/data/span_on.png
new file mode 100644 (file)
index 0000000..f5ff227
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/span_on.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/tan_bump.png b/cinelerra-5.1/plugins/theme_unflat/data/tan_bump.png
new file mode 100644 (file)
index 0000000..8ac6f00
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/tan_bump.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/tan_free.png b/cinelerra-5.1/plugins/theme_unflat/data/tan_free.png
new file mode 100644 (file)
index 0000000..658f831
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/tan_free.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/tan_tangent.png b/cinelerra-5.1/plugins/theme_unflat/data/tan_tangent.png
new file mode 100644 (file)
index 0000000..042ce1b
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/tan_tangent.png differ
index 7529c0de7196ec0af8ff744f945abbaf00a5f645..ac19da3713b0fea84b41a285e18eb626830948c7 100644 (file)
@@ -844,6 +844,22 @@ void UNFLATTHEME::initialize()
        new_button("undo.png", editpanel_up, editpanel_hi, editpanel_dn, "undo");
        new_button("wrench.png", editpanel_up, editpanel_hi, editpanel_dn, "wrench");
 
+       VFrame **edge_on  = new_toggle("edge_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_on");
+       VFrame **edge_off = new_toggle("edge_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "edge_off");
+       new_image_set_images("bump_edge", 5,
+               new VFrame(*edge_off[0]), new VFrame(*edge_off[1]),
+               new VFrame(*edge_on[0]),  new VFrame(*edge_off[3]),
+               new VFrame(*edge_on[4]));
+       VFrame **span_on  = new_toggle("span_on.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_on");
+       VFrame **span_off = new_toggle("span_off.png",
+               editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "span_off");
+       new_image_set_images("bump_span", 5,
+                new VFrame(*span_off[0]),  new VFrame(*span_off[1]),
+                new VFrame(*span_on[0]), new VFrame(*span_off[3]),
+                new VFrame(*span_on[4]));
 
        VFrame *transport_up = new_image("transportup.png");
        VFrame *transport_hi = new_image("transporthi.png");
@@ -924,6 +940,9 @@ void UNFLATTHEME::initialize()
        // toggle for tangent mode (compositor/tool window)
        new_toggle("tan_smooth.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_smooth");
        new_toggle("tan_linear.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_linear");
+       new_toggle("tan_tangent.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_tangent");
+       new_toggle("tan_free.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_free");
+       new_toggle("tan_bump.png", editpanel_up, editpanel_hi, editpanel_checked, editpanel_dn, editpanel_checkedhi, "tan_bump");
 
        new_toggle("mask_scale_x.png",   "mask_scale_up.png",    "mask_scale_uphi.png",
                "mask_scale_chkd.png",  "mask_scale_xdown.png",  "mask_scale_chkdhi.png",
index 28333d4ee70544ed96511e7698d4dfe454e4b295..fcab44010e74a05c69aca8a16735e441a726c5ad 100644 (file)
@@ -87,7 +87,7 @@ TitleConfig::TitleConfig()
        strcpy(font, "fixed");
        strcpy(encoding, DEFAULT_ENCODING);
        style = FONT_ALIAS;
-       size = 24;
+       size = 48;
        color = BLACK;
        alpha = 0xff;
        outline_size = 0.;
@@ -110,7 +110,7 @@ TitleConfig::TitleConfig()
        next_keyframe_position = 0;
        prev_keyframe_position = 0;
        timecode = 0;
-       dropshadow = 2;
+       dropshadow = 0;
        background = 0;
        strcpy(background_path, "");
        timecode_format = DEFAULT_TIMECODEFORMAT;