mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-01 22:06:10 -04:00
--User changes
-Entering xaos cells will always select the entire cell to make editing easier. -Add radio buttons on the xaos tab to specify how pasting or duplicating xforms should preserve xaos. --Bug fixes -The left header column in the xaos visualization table had somehow disappeared. --Code changes -DoubleSpinBox now has a boolean which specifies whether it clears its selection on enter. Default true. -Make AddXformsWithXaos() be a static member of FractoriumEmberController for quicker build times. -Add new exmaple flames to package_linux.sh
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
|
||||
namespace EmberCommon
|
||||
{
|
||||
enum class eXaosPasteStyle : int { NONE, ZERO_TO_ONE, ZERO_TO_VALS, ONE_TO_VALS, VALS_TO_ONE };
|
||||
|
||||
/// <summary>
|
||||
/// Derivation of the RenderCallback class to do custom printing action
|
||||
/// whenever the progress function is internally called inside of Ember
|
||||
@ -869,43 +871,6 @@ static vector<const Variation<T>*> FindVarsWithout(const vector<const Variation<
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add a vector of xforms to the passed in ember, and optionally preserve the xaos based on position.
|
||||
/// </summary>
|
||||
/// <param name="ember">The ember to add xforms to</param>
|
||||
/// <param name="xforms">The vector of xforms to add</param>
|
||||
/// <param name="preserveXaos">True to preserve xaos else false.</param>
|
||||
template <typename T>
|
||||
static void AddXformsWithXaos(Ember<T>& ember, std::vector<std::pair<Xform<T>, size_t>>& xforms, bool preserveXaos)
|
||||
{
|
||||
auto origXformCount = ember.XformCount();
|
||||
|
||||
for (auto& it : xforms)
|
||||
ember.AddXform(it.first);
|
||||
|
||||
for (auto i = 0; i < ember.XformCount(); i++)
|
||||
{
|
||||
auto xf = ember.GetXform(i);
|
||||
|
||||
if (i < origXformCount)
|
||||
{
|
||||
for (auto j = 0; j < ember.XformCount(); j++)
|
||||
if (j >= origXformCount)
|
||||
xf->SetXaos(j, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (auto j = 0; j < ember.XformCount(); j++)
|
||||
if (j < origXformCount)
|
||||
xf->SetXaos(j, 0);
|
||||
else if (!preserveXaos)
|
||||
xf->SetXaos(j, 1);
|
||||
else if (i - origXformCount < xforms.size())//Should never be out of bounds, but just to be safe.
|
||||
xf->SetXaos(j, xforms[i - origXformCount].first.Xaos(j - origXformCount));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user