2014-07-08 03:11:14 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ui_FinalRenderDialog.h"
|
|
|
|
#include "SpinBox.h"
|
|
|
|
#include "DoubleSpinBox.h"
|
2014-10-14 11:53:15 -04:00
|
|
|
#include "TwoButtonComboWidget.h"
|
2014-07-08 03:11:14 -04:00
|
|
|
#include "FractoriumSettings.h"
|
|
|
|
#include "FinalRenderEmberController.h"
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// FractoriumFinalRenderDialog class.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
class Fractorium;//Forward declaration since Fractorium uses this dialog.
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The final render dialog is for when the user is satisfied with the parameters they've
|
|
|
|
/// set and they want to do a final render at a higher quality and at a specific resolution
|
|
|
|
/// and save it out to a file.
|
|
|
|
/// It supports rendering either the current ember, or all of them in the opened file.
|
|
|
|
/// If a single ember is rendered, it will be saved to a single output file.
|
|
|
|
/// If multiple embers are rendered, they will all be saved to a specified directory using
|
|
|
|
/// default names.
|
|
|
|
/// The user can optionally save the Xml file with each ember.
|
|
|
|
/// They can be treated as individual images, or as an animation sequence in which case
|
|
|
|
/// motion blurring with temporal samples will be applied.
|
|
|
|
/// It keeps a pointer to the main window and the global settings object for convenience.
|
|
|
|
/// The settings used here are saved to the /finalrender portion of the settings file.
|
|
|
|
/// It has its own OpenCLWrapper member for populating the combo boxes.
|
|
|
|
/// Upon running, it will delete the main window's renderer to save memory/GPU resources and restore it to its
|
|
|
|
/// original state upon exiting.
|
|
|
|
/// This class uses a controller-based design similar to the main window.
|
|
|
|
/// </summary>
|
|
|
|
class FractoriumFinalRenderDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
friend Fractorium;
|
|
|
|
friend FinalRenderEmberControllerBase;
|
|
|
|
friend FinalRenderEmberController<float>;
|
|
|
|
#ifdef DO_DOUBLE
|
|
|
|
friend FinalRenderEmberController<double>;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
public:
|
|
|
|
FractoriumFinalRenderDialog(FractoriumSettings* settings, QWidget* parent, Qt::WindowFlags f = 0);
|
|
|
|
bool EarlyClip();
|
2014-07-26 15:03:51 -04:00
|
|
|
bool YAxisUp();
|
2014-07-08 03:11:14 -04:00
|
|
|
bool Transparency();
|
|
|
|
bool OpenCL();
|
|
|
|
bool Double();
|
|
|
|
bool SaveXml();
|
|
|
|
bool DoAll();
|
|
|
|
bool DoSequence();
|
|
|
|
bool KeepAspect();
|
2014-10-14 11:53:15 -04:00
|
|
|
bool ApplyToAll();
|
2014-07-08 03:11:14 -04:00
|
|
|
eScaleType Scale();
|
|
|
|
void Scale(eScaleType scale);
|
2014-10-14 11:53:15 -04:00
|
|
|
QString Ext();
|
2014-07-08 03:11:14 -04:00
|
|
|
QString Path();
|
2014-10-14 11:53:15 -04:00
|
|
|
void Path(const QString& s);
|
2014-07-08 03:11:14 -04:00
|
|
|
QString Prefix();
|
|
|
|
QString Suffix();
|
2014-10-14 11:53:15 -04:00
|
|
|
unsigned int Current();
|
2014-07-08 03:11:14 -04:00
|
|
|
unsigned int PlatformIndex();
|
|
|
|
unsigned int DeviceIndex();
|
|
|
|
unsigned int ThreadCount();
|
2014-10-14 11:53:15 -04:00
|
|
|
double WidthScale();
|
|
|
|
double HeightScale();
|
2014-07-20 20:16:23 -04:00
|
|
|
double Quality();
|
2014-07-08 03:11:14 -04:00
|
|
|
unsigned int TemporalSamples();
|
|
|
|
unsigned int Supersample();
|
2014-10-14 11:53:15 -04:00
|
|
|
unsigned int Strips();
|
2014-07-08 03:11:14 -04:00
|
|
|
FinalRenderGuiState State();
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
void MoveCursorToEnd();
|
|
|
|
void OnEarlyClipCheckBoxStateChanged(int state);
|
2014-07-26 15:03:51 -04:00
|
|
|
void OnYAxisUpCheckBoxStateChanged(int state);
|
2014-07-08 03:11:14 -04:00
|
|
|
void OnTransparencyCheckBoxStateChanged(int state);
|
|
|
|
void OnOpenCLCheckBoxStateChanged(int state);
|
|
|
|
void OnDoublePrecisionCheckBoxStateChanged(int state);
|
|
|
|
void OnDoAllCheckBoxStateChanged(int state);
|
2014-10-14 11:53:15 -04:00
|
|
|
void OnDoSequenceCheckBoxStateChanged(int state);
|
|
|
|
void OnFinalRenderCurrentSpinChanged(int d);
|
|
|
|
void OnPlatformComboCurrentIndexChanged(int index);
|
|
|
|
void OnApplyAllCheckBoxStateChanged(int state);
|
|
|
|
void OnFinalRenderWidthScaleChanged(double d);
|
|
|
|
void OnFinalRenderHeightScaleChanged(double d);
|
2014-07-08 03:11:14 -04:00
|
|
|
void OnKeepAspectCheckBoxStateChanged(int state);
|
|
|
|
void OnScaleRadioButtonChanged(bool checked);
|
2014-07-20 20:16:23 -04:00
|
|
|
void OnQualityChanged(double d);
|
2014-07-08 03:11:14 -04:00
|
|
|
void OnTemporalSamplesChanged(int d);
|
|
|
|
void OnSupersampleChanged(int d);
|
2014-10-14 11:53:15 -04:00
|
|
|
void OnStripsChanged(int d);
|
2014-07-08 03:11:14 -04:00
|
|
|
void OnFileButtonClicked(bool checked);
|
|
|
|
void OnShowFolderButtonClicked(bool checked);
|
2014-10-14 11:53:15 -04:00
|
|
|
void OnFinalRenderExtIndexChanged(int d);
|
|
|
|
void OnFinalRenderPrefixChanged(const QString& s);
|
|
|
|
void OnFinalRenderSuffixChanged(const QString& s);
|
2014-07-08 03:11:14 -04:00
|
|
|
void OnRenderClicked(bool checked);
|
|
|
|
void OnCancelRenderClicked(bool checked);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void reject();
|
|
|
|
virtual void showEvent(QShowEvent* e);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool CreateControllerFromGUI(bool createRenderer);
|
2014-10-14 11:53:15 -04:00
|
|
|
bool SetMemory();
|
2014-07-08 03:11:14 -04:00
|
|
|
|
2014-10-14 11:53:15 -04:00
|
|
|
int m_MemoryCellIndex;
|
2014-10-18 15:56:37 -04:00
|
|
|
int m_ItersCellIndex;
|
2014-10-14 11:53:15 -04:00
|
|
|
int m_PathCellIndex;
|
2014-07-08 03:11:14 -04:00
|
|
|
OpenCLWrapper m_Wrapper;
|
|
|
|
Timing m_RenderTimer;
|
2014-10-14 11:53:15 -04:00
|
|
|
DoubleSpinBox* m_WidthScaleSpin;
|
|
|
|
DoubleSpinBox* m_HeightScaleSpin;
|
2014-07-20 20:16:23 -04:00
|
|
|
DoubleSpinBox* m_QualitySpin;
|
2014-07-08 03:11:14 -04:00
|
|
|
SpinBox* m_TemporalSamplesSpin;
|
|
|
|
SpinBox* m_SupersampleSpin;
|
2014-10-14 11:53:15 -04:00
|
|
|
SpinBox* m_StripsSpin;
|
|
|
|
TwoButtonComboWidget* m_Tbcw;
|
2014-07-08 03:11:14 -04:00
|
|
|
QLineEdit* m_PrefixEdit;
|
|
|
|
QLineEdit* m_SuffixEdit;
|
|
|
|
FractoriumSettings* m_Settings;
|
|
|
|
Fractorium* m_Fractorium;
|
2014-10-18 17:07:07 -04:00
|
|
|
unique_ptr<FinalRenderEmberControllerBase> m_Controller;
|
2014-07-08 03:11:14 -04:00
|
|
|
Ui::FinalRenderDialog ui;
|
|
|
|
};
|