mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-06 00:06:00 -04:00
--User changes
-Add animation sequence creation to Fractorium. -Add two new options to EmberGenome which are used when generating an animation sequence.: --startcount: Add this number to the filename of each flame. --padding: Override the automatically calculated amount of padding zeroes added to each filename. --Bug fixes -Prevent filenames in command line programs from using scientific notation when rendering a large number of frames. -Fix tab orders to match newer GUI items which were overlooked in previous releases. -Re-render previews if transparency value in the options dialog was changed. Re-rendering was previously only done if early clip or y axis up was changed. -Use transparency when rendering thumbnail previews. --Code changes -Wrap EmberCommon.h in a namespace called EmberCommon. -Move FormatName() from EmberGenome to EmberCommon.h/cpp -Add a prefix parameter to EmberFile::DefaultFilename() to allow for creating a default filename for sequences. -When showing the final render dialog, allow specifying where it came from: the toolbar or the render sequence button. -Refactor all preview rendering code out into its own class hierarchy with overrides for the main window and the final render dialog. -Remove all preview render cancelling functions, they are now built into the new class hierarchy and a new render will not start until the previous one is stopped. -Add two new function ConstrainLow() and ConstrainHigh() which wrap constraining two min/max spinboxes to each others' values. -Add a bool to FractoriumEmberControllerBase::CopyEmberFile() to specify whether to copy the main file or the sequence file. This is somewhat of a hack and was done in a rush. -Add a bool to FractoriumEmberControllerBase::SetEmberFile() to specify whether to move the file rather than copy. This is used in FinalRenderEmberController and improves efficiency. -Add wrapper functions for variations filter dialog settings.
This commit is contained in:
@ -28,7 +28,7 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
connect(ui.FinalRenderDoublePrecisionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnDoublePrecisionCheckBoxStateChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderDoAllCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnDoAllCheckBoxStateChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderDoSequenceCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnDoSequenceCheckBoxStateChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderCurrentSpin, SIGNAL(valueChanged(int)), this, SLOT(OnCurrentSpinChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderCurrentSpin, SIGNAL(valueChanged(int)), this, SLOT(OnCurrentSpinChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderApplyToAllCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnApplyAllCheckBoxStateChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderKeepAspectCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnKeepAspectCheckBoxStateChanged(int)), Qt::QueuedConnection);
|
||||
connect(ui.FinalRenderScaleNoneRadioButton, SIGNAL(toggled(bool)), this, SLOT(OnScaleRadioButtonChanged(bool)), Qt::QueuedConnection);
|
||||
@ -189,6 +189,16 @@ FractoriumFinalRenderDialog::FractoriumFinalRenderDialog(FractoriumSettings* set
|
||||
w = SetTabOrder(this, w, ui.FinalRenderCloseButton);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the final render dialog and specify whether it was called from the toolbar or the sequence render button.
|
||||
/// </summary>
|
||||
/// <param name="fromSequence">True if this is called from the sequence render button, else false.</param>
|
||||
void FractoriumFinalRenderDialog::Show(bool fromSequence)
|
||||
{
|
||||
m_FromSequence = fromSequence;
|
||||
show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GUI settings wrapper functions, getters only.
|
||||
/// </summary>
|
||||
@ -636,7 +646,7 @@ void FractoriumFinalRenderDialog::OnCancelRenderClicked(bool checked)
|
||||
/// <param name="e">The event</param>
|
||||
void FractoriumFinalRenderDialog::showEvent(QShowEvent* e)
|
||||
{
|
||||
if (m_Controller.get() && m_Controller->m_Run)
|
||||
if (m_Controller.get() && m_Controller->m_Run)//On Linux, this event will be called when the main window minimized/maximized while rendering, so filter it out.
|
||||
return;
|
||||
|
||||
if (CreateControllerFromGUI(true))//Create controller if it does not exist, or if it does and the renderer is not running.
|
||||
@ -645,16 +655,17 @@ void FractoriumFinalRenderDialog::showEvent(QShowEvent* e)
|
||||
#ifdef DO_DOUBLE
|
||||
Ember<double> ed;
|
||||
EmberFile<double> efi;
|
||||
m_Fractorium->m_Controller->CopyEmberFile(efi, [&](Ember<double>& ember)
|
||||
m_Fractorium->m_Controller->CopyEmberFile(efi, m_FromSequence, [&](Ember<double>& ember)
|
||||
{
|
||||
ember.SyncSize();
|
||||
ember.m_Quality = m_Settings->FinalQuality();
|
||||
ember.m_Supersample = m_Settings->FinalSupersample();
|
||||
ember.m_TemporalSamples = m_Settings->FinalTemporalSamples();
|
||||
});//Copy the whole file, will take about 0.2ms per ember in the file.
|
||||
#else
|
||||
Ember<float> ed;
|
||||
EmberFile<float> efi;
|
||||
m_Fractorium->m_Controller->CopyEmberFile(efi, [&](Ember<float>& ember)
|
||||
m_Fractorium->m_Controller->CopyEmberFile(efi, m_FromSequence, [&](Ember<float>& ember)
|
||||
{
|
||||
ember.SyncSize();
|
||||
ember.m_Quality = m_Settings->FinalQuality();
|
||||
@ -662,7 +673,7 @@ void FractoriumFinalRenderDialog::showEvent(QShowEvent* e)
|
||||
ember.m_TemporalSamples = m_Settings->FinalTemporalSamples();
|
||||
});//Copy the whole file, will take about 0.2ms per ember in the file.
|
||||
#endif
|
||||
m_Controller->SetEmberFile(efi);//Copy the temp file into the final render controller.
|
||||
m_Controller->SetEmberFile(efi, true);//Move the temp file into the final render controller.
|
||||
ui.FinalRenderCurrentSpin->setMaximum(int(efi.Size()));
|
||||
ui.FinalRenderCurrentSpin->blockSignals(true);
|
||||
ui.FinalRenderCurrentSpin->setValue(index);//Set the currently selected ember to the one that was being edited.
|
||||
@ -677,6 +688,12 @@ void FractoriumFinalRenderDialog::showEvent(QShowEvent* e)
|
||||
Path(m_Controller->ComposePath(m_Controller->Name()));//Update the GUI.
|
||||
}
|
||||
|
||||
if (m_FromSequence)
|
||||
{
|
||||
ui.FinalRenderDoAllCheckBox->setChecked(true);
|
||||
ui.FinalRenderDoSequenceCheckBox->setChecked(true);
|
||||
}
|
||||
|
||||
ui.FinalRenderTextOutput->clear();
|
||||
QDialog::showEvent(e);
|
||||
}
|
||||
@ -726,9 +743,9 @@ bool FractoriumFinalRenderDialog::CreateControllerFromGUI(bool createRenderer)
|
||||
if (m_Controller.get())
|
||||
{
|
||||
#ifdef DO_DOUBLE
|
||||
m_Controller->CopyEmberFile(efd, [&](Ember<double>& ember) { });//Convert float to double or save double verbatim;
|
||||
m_Controller->CopyEmberFile(efd, false, [&](Ember<double>& ember) { });//Convert float to double or save double verbatim;
|
||||
#else
|
||||
m_Controller->CopyEmberFile(efd, [&](Ember<float>& ember) { });//Convert float to double or save double verbatim;
|
||||
m_Controller->CopyEmberFile(efd, false, [&](Ember<float>& ember) { });//Convert float to double or save double verbatim;
|
||||
#endif
|
||||
m_Controller->Shutdown();
|
||||
}
|
||||
@ -745,7 +762,7 @@ bool FractoriumFinalRenderDialog::CreateControllerFromGUI(bool createRenderer)
|
||||
//Restore the ember and ember file.
|
||||
if (m_Controller.get())
|
||||
{
|
||||
m_Controller->SetEmberFile(efd);//Convert float to double or set double verbatim;
|
||||
m_Controller->SetEmberFile(efd, true);//Convert float to double and move or move double verbatim.
|
||||
m_Controller->SetEmber(index, false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user