mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-12 03:04:51 -04:00
--User changes
-Add a palette editor. -Add support for reading .ugr/.gradient/.gradients palette files. -Allow toggling on spinners whose minimum value is not zero. -Allow toggling display of image, affines and grid. -Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial. --Bug fixes -cpow2 was wrong. -Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3. -Use exec() on Apple and show() on all other OSes for dialog boxes. -Trying to render a sequence with no frames would crash. -Selecting multiple xforms and rotating them would produce the wrong rotation. -Better handling when parsing flames using different encoding, such as unicode and UTF-8. -Switching between SP/DP didn't reselect the selected flame in the Library tab. --Code changes -Make all types concerning palettes be floats, including PaletteTableWidgetItem. -PaletteTableWidgetItem is no longer templated because all palettes are float. -Include the source colors for user created gradients. -Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems. -Split conditional out of accumulation loop on the CPU for better performance. -Vectorize summing when doing density filter for better performance. -Make all usage of palettes be of type float, double is pointless. -Allow palettes to reside in multiple folders, while ensuring only one of each name is added. -Refactor some palette path searching code. -Make ReadFile() throw and catch an exception if the file operation fails. -A little extra safety in foci and foci3D with a call to Zeps(). -Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac. -Fixing missing comma between paths in InitPaletteList(). -Move Xml and PaletteList classes into cpp to shorten build times when working on them. -Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file. -Change more NULL to nullptr.
This commit is contained in:
@ -43,6 +43,25 @@ void Fractorium::InitLibraryUI()
|
||||
connect(ui.SequenceRandomBlendMaxFramesSpinBox, SIGNAL(valueChanged(int)), this, SLOT(OnSequenceRandomBlendMaxFramesSpinBoxChanged(int)), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select the item in the library tree specified by the passed in index.
|
||||
/// </summary>
|
||||
/// <param name="index">The 0-based index of the item in the library tree to select</param>
|
||||
void Fractorium::SelectLibraryItem(size_t index)
|
||||
{
|
||||
if (auto top = ui.LibraryTree->topLevelItem(0))
|
||||
{
|
||||
for (int i = 0; i < top->childCount(); i++)
|
||||
{
|
||||
if (auto emberItem = dynamic_cast<EmberTreeWidgetItemBase*>(top->child(i)))
|
||||
{
|
||||
emberItem->setSelected(i == index);
|
||||
emberItem->setCheckState(0, i == index ? Qt::Checked : Qt::Unchecked);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the index of the currently selected ember in the library tree.
|
||||
/// </summary>
|
||||
@ -153,9 +172,7 @@ void FractoriumEmberController<T>::FillLibraryTree(int selectIndex)
|
||||
tree->blockSignals(false);
|
||||
|
||||
if (selectIndex != -1)
|
||||
if (auto top = tree->topLevelItem(0))
|
||||
if (auto emberItem = dynamic_cast<EmberTreeWidgetItem<T>*>(top->child(selectIndex)))
|
||||
emberItem->setSelected(true);
|
||||
m_Fractorium->SelectLibraryItem(selectIndex);
|
||||
|
||||
m_Fractorium->SyncFileCountToSequenceCount();
|
||||
QCoreApplication::flush();
|
||||
@ -568,12 +585,13 @@ void FractoriumEmberController<T>::SequenceGenerateButtonClicked()
|
||||
vector<pair<size_t, size_t>> devices;//Dummy.
|
||||
EmberReport emberReport;
|
||||
ostringstream os;
|
||||
string palettePath =
|
||||
#ifdef _WIN32
|
||||
"./flam3-palettes.xml";
|
||||
#else
|
||||
"~/.config/fractorium";
|
||||
#endif
|
||||
string palettePath = FindFirstDefaultPalette().toStdString();
|
||||
|
||||
if (palettePath.empty())//This should never happen because the program requires a palette file to run this far.
|
||||
{
|
||||
QMessageBox::warning(nullptr, "Sequence", "No flam3-palettes.xml file found, sequence will not be generated.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!randRot && !randBlend)
|
||||
{
|
||||
@ -700,12 +718,15 @@ void Fractorium::OnSequenceGenerateButtonClicked(bool checked) { m_Controller->S
|
||||
/// <param name="checked">Ignored.</param>
|
||||
void Fractorium::OnSequenceRenderButtonClicked(bool checked)
|
||||
{
|
||||
//First completely stop what the current rendering process is doing.
|
||||
m_Controller->DeleteRenderer();//Delete the renderer, but not the controller.
|
||||
m_Controller->StopAllPreviewRenderers();
|
||||
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
|
||||
m_RenderStatusLabel->setText("Renderer stopped.");
|
||||
m_FinalRenderDialog->Show(true);//Show with a bool specifying that it came from the sequence generator.
|
||||
if (ui.SequenceTree->topLevelItemCount() > 0)
|
||||
{
|
||||
//First completely stop what the current rendering process is doing.
|
||||
m_Controller->DeleteRenderer();//Delete the renderer, but not the controller.
|
||||
m_Controller->StopAllPreviewRenderers();
|
||||
m_Controller->SaveCurrentToOpenedFile(false);//Save whatever was edited back to the current open file.
|
||||
m_RenderStatusLabel->setText("Renderer stopped.");
|
||||
m_FinalRenderDialog->Show(true);//Show with a bool specifying that it came from the sequence generator.
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -825,5 +846,5 @@ void Fractorium::SyncSequenceSettings()
|
||||
template class FractoriumEmberController<float>;
|
||||
|
||||
#ifdef DO_DOUBLE
|
||||
template class FractoriumEmberController<double>;
|
||||
template class FractoriumEmberController<double>;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user