mirror of
https://github.com/brunoherbelin/vimix.git
synced 2026-06-16 04:27:23 +02:00
New Transition view improved actions
Add play icon on target to indicate action to do, replace 'open' button by fast forward icon. + Bugfix crash on exit in Transition view.
This commit is contained in:
+1
-1
@@ -594,7 +594,7 @@ set(VMIX_RSC_FILES
|
||||
./rsc/mesh/icon_sequence.ply
|
||||
./rsc/mesh/icon_receive.ply
|
||||
./rsc/mesh/icon_text.ply
|
||||
./rsc/mesh/icon_magnet.ply
|
||||
./rsc/mesh/icon_play.ply
|
||||
./rsc/mesh/h_line.ply
|
||||
./rsc/mesh/h_mark.ply
|
||||
./rsc/shaders/filters/default.glsl
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
ply
|
||||
format ascii 1.0
|
||||
comment Created by Blender 3.6.2 - www.blender.org
|
||||
element vertex 61
|
||||
property float x
|
||||
property float y
|
||||
property float z
|
||||
property float nx
|
||||
property float ny
|
||||
property float nz
|
||||
element face 59
|
||||
property list uchar uint vertex_indices
|
||||
end_header
|
||||
-0.070374 0.120216 0.000000 0.000000 0.000000 1.000000
|
||||
-0.062764 0.120037 0.000000 0.000000 0.000000 1.000000
|
||||
-0.066565 0.120433 0.000000 0.000000 0.000000 1.000000
|
||||
-0.074096 0.119398 0.000000 0.000000 0.000000 1.000000
|
||||
-0.059069 0.119014 0.000000 0.000000 0.000000 1.000000
|
||||
-0.077634 0.117992 0.000000 0.000000 0.000000 1.000000
|
||||
-0.055574 0.117352 0.000000 0.000000 0.000000 1.000000
|
||||
-0.080892 0.116012 0.000000 0.000000 0.000000 1.000000
|
||||
0.109905 0.019542 0.000000 0.000000 0.000000 1.000000
|
||||
-0.083774 0.113470 0.000000 0.000000 0.000000 1.000000
|
||||
-0.086183 0.110379 0.000000 0.000000 0.000000 1.000000
|
||||
-0.088023 0.106752 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089198 0.102601 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.097941 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.094092 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.083454 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.067382 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.047237 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.024375 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 0.000154 0.000000 0.000000 0.000000 1.000000
|
||||
0.113298 0.017118 0.000000 0.000000 0.000000 1.000000
|
||||
0.116072 0.014251 0.000000 0.000000 0.000000 1.000000
|
||||
0.118228 0.011031 0.000000 0.000000 0.000000 1.000000
|
||||
0.119767 0.007545 0.000000 0.000000 0.000000 1.000000
|
||||
0.120689 0.003882 0.000000 0.000000 0.000000 1.000000
|
||||
0.120994 0.000131 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 -0.024066 0.000000 0.000000 0.000000 1.000000
|
||||
0.120683 -0.003620 0.000000 0.000000 0.000000 1.000000
|
||||
0.119756 -0.007283 0.000000 0.000000 0.000000 1.000000
|
||||
0.118215 -0.010769 0.000000 0.000000 0.000000 1.000000
|
||||
0.116059 -0.013989 0.000000 0.000000 0.000000 1.000000
|
||||
0.113289 -0.016856 0.000000 0.000000 0.000000 1.000000
|
||||
0.109905 -0.019281 0.000000 0.000000 0.000000 1.000000
|
||||
0.106649 -0.021204 0.000000 0.000000 0.000000 1.000000
|
||||
0.097647 -0.026522 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 -0.046928 0.000000 0.000000 0.000000 1.000000
|
||||
0.084049 -0.034556 0.000000 0.000000 0.000000 1.000000
|
||||
0.067003 -0.044626 0.000000 0.000000 0.000000 1.000000
|
||||
0.047659 -0.056055 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 -0.067074 0.000000 0.000000 0.000000 1.000000
|
||||
0.027165 -0.068162 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 -0.083145 0.000000 0.000000 0.000000 1.000000
|
||||
0.006672 -0.080269 0.000000 0.000000 0.000000 1.000000
|
||||
-0.012672 -0.091697 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 -0.093784 0.000000 0.000000 0.000000 1.000000
|
||||
-0.029718 -0.101768 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089610 -0.097632 0.000000 0.000000 0.000000 1.000000
|
||||
-0.089225 -0.101885 0.000000 0.000000 0.000000 1.000000
|
||||
-0.043317 -0.109802 0.000000 0.000000 0.000000 1.000000
|
||||
-0.088124 -0.105803 0.000000 0.000000 0.000000 1.000000
|
||||
-0.086388 -0.109343 0.000000 0.000000 0.000000 1.000000
|
||||
-0.084098 -0.112461 0.000000 0.000000 0.000000 1.000000
|
||||
-0.052318 -0.115120 0.000000 0.000000 0.000000 1.000000
|
||||
-0.081335 -0.115115 0.000000 0.000000 0.000000 1.000000
|
||||
-0.078181 -0.117261 0.000000 0.000000 0.000000 1.000000
|
||||
-0.055574 -0.117043 0.000000 0.000000 0.000000 1.000000
|
||||
-0.059375 -0.118854 0.000000 0.000000 0.000000 1.000000
|
||||
-0.074716 -0.118855 0.000000 0.000000 0.000000 1.000000
|
||||
-0.063270 -0.119897 0.000000 0.000000 0.000000 1.000000
|
||||
-0.071022 -0.119855 0.000000 0.000000 0.000000 1.000000
|
||||
-0.067180 -0.120217 0.000000 0.000000 0.000000 1.000000
|
||||
3 0 1 2
|
||||
3 3 1 0
|
||||
3 3 4 1
|
||||
3 5 4 3
|
||||
3 5 6 4
|
||||
3 7 6 5
|
||||
3 7 8 6
|
||||
3 9 8 7
|
||||
3 10 8 9
|
||||
3 11 8 10
|
||||
3 12 8 11
|
||||
3 13 8 12
|
||||
3 14 8 13
|
||||
3 15 8 14
|
||||
3 16 8 15
|
||||
3 17 8 16
|
||||
3 18 8 17
|
||||
3 19 8 18
|
||||
3 19 20 8
|
||||
3 19 21 20
|
||||
3 19 22 21
|
||||
3 19 23 22
|
||||
3 19 24 23
|
||||
3 19 25 24
|
||||
3 26 25 19
|
||||
3 26 27 25
|
||||
3 26 28 27
|
||||
3 26 29 28
|
||||
3 26 30 29
|
||||
3 26 31 30
|
||||
3 26 32 31
|
||||
3 26 33 32
|
||||
3 26 34 33
|
||||
3 35 34 26
|
||||
3 35 36 34
|
||||
3 35 37 36
|
||||
3 35 38 37
|
||||
3 39 38 35
|
||||
3 39 40 38
|
||||
3 41 40 39
|
||||
3 41 42 40
|
||||
3 41 43 42
|
||||
3 44 43 41
|
||||
3 44 45 43
|
||||
3 46 45 44
|
||||
3 47 45 46
|
||||
3 47 48 45
|
||||
3 49 48 47
|
||||
3 50 48 49
|
||||
3 51 48 50
|
||||
3 51 52 48
|
||||
3 53 52 51
|
||||
3 54 52 53
|
||||
3 54 55 52
|
||||
3 54 56 55
|
||||
3 57 56 54
|
||||
3 57 58 56
|
||||
3 59 58 57
|
||||
3 60 58 59
|
||||
+2
-2
@@ -572,8 +572,8 @@ Symbol::Symbol(Type t, glm::vec3 pos) : Node(), type_(t)
|
||||
shadows[GRID] = nullptr;
|
||||
icons[CROSS] = new Mesh("mesh/icon_cross.ply");
|
||||
shadows[CROSS] = nullptr;
|
||||
icons[MAGNET] = new Mesh("mesh/icon_magnet.ply");
|
||||
shadows[MAGNET] = nullptr;
|
||||
icons[PLAY] = new Mesh("mesh/icon_play.ply");
|
||||
shadows[PLAY] = shadow;
|
||||
icons[EMPTY] = new Mesh("mesh/icon_empty.ply");
|
||||
shadows[EMPTY] = shadow;
|
||||
}
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ public:
|
||||
CLOCK_H,
|
||||
GRID,
|
||||
CROSS,
|
||||
MAGNET,
|
||||
PLAY,
|
||||
EMPTY
|
||||
} Type;
|
||||
Symbol(Type t, glm::vec3 pos = glm::vec3(0.f));
|
||||
|
||||
@@ -1591,6 +1591,9 @@ void Mixer::clear()
|
||||
while (busy())
|
||||
update();
|
||||
|
||||
// cancel transition
|
||||
transition_.detach();
|
||||
|
||||
// set for an empty session
|
||||
set(new Session);
|
||||
|
||||
|
||||
+11
-12
@@ -81,6 +81,11 @@ TransitionView::TransitionView() : View(TRANSITION), transition_source_(nullptr)
|
||||
output_surface_ = new Surface;
|
||||
scene.bg()->attach(output_surface_);
|
||||
|
||||
playicon = new Symbol(Symbol::PLAY);
|
||||
playicon->color = glm::vec4( COLOR_FRAME_LIGHT, 1.0f );
|
||||
playicon->scale_ = glm::vec3(2.f, 2.f, 1.f);
|
||||
scene.bg()->attach(playicon);
|
||||
|
||||
Frame *border = new Frame(Frame::ROUND, Frame::THIN, Frame::GLOW);
|
||||
border->color = glm::vec4( COLOR_FRAME, 1.0f );
|
||||
scene.bg()->attach(border);
|
||||
@@ -241,7 +246,6 @@ void TransitionView::draw()
|
||||
const char *tooltip[2] = {"Transition to black", "Cross fading"};
|
||||
ImGuiToolkit::IconToggle(0,2,0,8, &Settings::application.transition.cross_fade, tooltip );
|
||||
|
||||
|
||||
// Duration slider (adjusted width)
|
||||
const float width = (pos_play.x - pos_canl.x) / 5.0;
|
||||
ImGui::SetCursorScreenPos(ImVec2(pos_play.x - width, pos_play.y +2.f));
|
||||
@@ -249,22 +253,17 @@ void TransitionView::draw()
|
||||
ImGui::SliderFloat("##transitionduration", &Settings::application.transition.duration,
|
||||
TRANSITION_MIN_DURATION, TRANSITION_MAX_DURATION, "%.1f s");
|
||||
|
||||
// Play-Pause button just at the end of the timeline
|
||||
ImGui::SetCursorScreenPos(ImVec2(pos_play.x + 10.f, pos_play.y +2.f));
|
||||
if ( ImGui::Button( tg->update_callbacks_.empty() ? ICON_FA_PLAY : ICON_FA_PAUSE) )
|
||||
// toggle play but do not open
|
||||
play(false);
|
||||
|
||||
// "Open" button on the target frame
|
||||
ImGui::SetCursorScreenPos(ImVec2(pos_open.x -80.f, pos_open.y +2.f));
|
||||
ImGui::SetNextItemWidth(160.f);
|
||||
if ( ImGui::Button(ICON_FA_FILE_UPLOAD " Open") )
|
||||
// Fast forwardoutput_surface_ button on the target frame
|
||||
float w = output_surface_->scale_.x * 80.f;
|
||||
ImGui::SetCursorScreenPos(ImVec2(pos_open.x + w, pos_open.y + 2.f));
|
||||
if (ImGuiToolkit::IconButton(ICON_FA_FAST_FORWARD, "Fast-forward & Open"))
|
||||
open();
|
||||
|
||||
ImGui::PopFont();
|
||||
ImGui::PopStyleColor(7); // 7 colors
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,7 +342,7 @@ std::pair<Node *, glm::vec2> TransitionView::pick(glm::vec2 P)
|
||||
|
||||
if (transition_source_ != nullptr) {
|
||||
// start animation when clic on target
|
||||
if (pick.first == output_surface_)
|
||||
if (pick.first == output_surface_ || pick.first == playicon)
|
||||
play(true);
|
||||
// otherwise cancel animation
|
||||
else
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
|
||||
private:
|
||||
Surface *output_surface_;
|
||||
Symbol *playicon;
|
||||
Mesh *mark_100ms_, *mark_1s_;
|
||||
Switch *gradient_;
|
||||
SessionFileSource *transition_source_;
|
||||
|
||||
Reference in New Issue
Block a user