From 79e46c10e0043a36f2ba5d1383e0fef8bc6ca39e Mon Sep 17 00:00:00 2001 From: Simon Rodriguez Date: Fri, 24 Jul 2020 21:25:08 +0200 Subject: [PATCH] Interface: tweak export section. --- src/helpers/Recorder.cpp | 4 +++- src/rendering/Renderer.cpp | 17 ++++++++++------- src/rendering/State.h | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/helpers/Recorder.cpp b/src/helpers/Recorder.cpp index bef3943..6baf7de 100755 --- a/src/helpers/Recorder.cpp +++ b/src/helpers/Recorder.cpp @@ -96,7 +96,9 @@ bool Recorder::drawGUI(){ bool shouldStart = false; // Pick directory/file. - if (ImGui::Button("Render offline...")) { + const std::string exportType = _outFormat == Format::PNG ? "images" : "video"; + const std::string exportButtonName = "Export " + exportType + " to..."; + if (ImGui::Button(exportButtonName.c_str())) { // Read arguments. nfdchar_t *outPath = NULL; diff --git a/src/rendering/Renderer.cpp b/src/rendering/Renderer.cpp index 70b0928..e3035d2 100755 --- a/src/rendering/Renderer.cpp +++ b/src/rendering/Renderer.cpp @@ -558,6 +558,15 @@ SystemAction Renderer::drawGUI(const float currentTime) { } ImGui::Separator(); + + if(ImGui::CollapsingHeader("Export")){ + if(_recorder.drawGUI()){ + startRecording(); + } + } + + ImGui::Separator(); + if (ImGui::Button("Save config...")) { // Read arguments. nfdchar_t *savePath = NULL; @@ -604,12 +613,6 @@ SystemAction Renderer::drawGUI(const float currentTime) { _state.baseColor = _state.particles.color = _state.minorColor = _state.flashColor = refColor; } - ImGui::Separator(); - - if(_recorder.drawGUI()){ - startRecording(); - } - if (_showDebug) { ImGui::Separator(); ImGui::Text("Debug: "); @@ -808,7 +811,7 @@ void Renderer::startRecording(){ // We can thus: // - backup the camera parameters // - trigger a buffers size update at the target resolution - // - restore thecamera parameters. + // - restore the camera parameters. // All that will be left is to trigger a size update at the end of the recording. const glm::ivec2 backSize = _camera.screenSize(); diff --git a/src/rendering/State.h b/src/rendering/State.h index 7c0ed59..0fe449b 100755 --- a/src/rendering/State.h +++ b/src/rendering/State.h @@ -11,7 +11,7 @@ #include #define MIDIVIZ_VERSION_MAJOR 5 -#define MIDIVIZ_VERSION_MINOR 0 +#define MIDIVIZ_VERSION_MINOR 1 #define COLUMN_SIZE 170