Skip to content

Commit

Permalink
Interface: tweak export section.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosua20 committed Jul 24, 2020
1 parent de7c4b3 commit 79e46c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
4 changes: 3 additions & 1 deletion src/helpers/Recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
17 changes: 10 additions & 7 deletions src/rendering/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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: ");
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/State.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <array>

#define MIDIVIZ_VERSION_MAJOR 5
#define MIDIVIZ_VERSION_MINOR 0
#define MIDIVIZ_VERSION_MINOR 1

#define COLUMN_SIZE 170

Expand Down

0 comments on commit 79e46c1

Please sign in to comment.