mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-06 16:24:52 -04:00
--User changes
-Edits will not save back to the file in memory on render completion when preview renderer is running. --Bug fixes -dc_perlin was crashing on Nvidia when using SP. -Duplicate images were randomly getting added to the file in memory. -Crash when opening an Xml with less than 2 flames in it. --Code changes -Use raw array of floats in OpenCL for perlin noise, rather than float3/double3. -Add some default cases to dc_perlin. -Redo singleton pattern yet again. Deriving from a templated Singleton<T> class was creating a separate instance per module. Now only one instance of each type will ever be created and it will be wrapped in a shared_ptr which guarantees its deletion as main() exits.
This commit is contained in:
@ -84,8 +84,8 @@ void FractoriumEmberController<T>::FilteredVariations()
|
||||
m_FilteredVariations.clear();
|
||||
m_FilteredVariations.reserve(map.size());
|
||||
|
||||
for (auto i = 0; i < m_VariationList.Size(); i++)
|
||||
if (auto var = m_VariationList.GetVariation(i))
|
||||
for (auto i = 0; i < m_VariationList->Size(); i++)
|
||||
if (auto var = m_VariationList->GetVariation(i))
|
||||
if (map.contains(var->Name().c_str()) && map[var->Name().c_str()].toBool())
|
||||
m_FilteredVariations.push_back(var->VariationId());
|
||||
}
|
||||
@ -107,9 +107,9 @@ void FractoriumEmberController<T>::SetupVariationsTree()
|
||||
tree->clear();
|
||||
tree->blockSignals(true);
|
||||
|
||||
for (size_t i = 0; i < m_VariationList.Size(); i++)
|
||||
for (size_t i = 0; i < m_VariationList->Size(); i++)
|
||||
{
|
||||
auto var = m_VariationList.GetVariation(i);
|
||||
auto var = m_VariationList->GetVariation(i);
|
||||
auto parVar = dynamic_cast<const ParametricVariation<T>*>(var);
|
||||
//First add the variation, with a spinner for its weight.
|
||||
auto item = new VariationTreeWidgetItem(var->VariationId(), tree);
|
||||
@ -206,7 +206,7 @@ void FractoriumEmberController<T>::VariationSpinBoxValueChanged(double d)//Would
|
||||
{
|
||||
UpdateXform([&](Xform<T>* xform)
|
||||
{
|
||||
auto var = m_VariationList.GetVariation(sender->GetVariationId());//The variation attached to the sender, for reference only.
|
||||
auto var = m_VariationList->GetVariation(sender->GetVariationId());//The variation attached to the sender, for reference only.
|
||||
auto parVar = dynamic_cast<const ParametricVariation<T>*>(var);//The parametric cast of that variation.
|
||||
auto xformVar = xform->GetVariationById(var->VariationId());//The corresponding variation in the currently selected xform.
|
||||
auto widgetItem = sender->WidgetItem();
|
||||
@ -294,7 +294,7 @@ void FractoriumEmberController<T>::FillVariationTreeWithXform(Xform<T>* xform)
|
||||
auto item = dynamic_cast<VariationTreeWidgetItem*>(tree->topLevelItem(i));
|
||||
auto var = xform->GetVariationById(item->Id());//See if this variation in the tree was contained in the xform.
|
||||
auto parVar = dynamic_cast<ParametricVariation<T>*>(var);//Attempt cast to parametric variation for later.
|
||||
auto origParVar = dynamic_cast<const ParametricVariation<T>*>(m_VariationList.GetVariation(item->Id()));
|
||||
auto origParVar = dynamic_cast<const ParametricVariation<T>*>(m_VariationList->GetVariation(item->Id()));
|
||||
|
||||
if (auto spinBox = dynamic_cast<VariationTreeDoubleSpinBox*>(tree->itemWidget(item, 1)))//Get the widget for the item, and cast the widget to the VariationTreeDoubleSpinBox type.
|
||||
{
|
||||
|
Reference in New Issue
Block a user