mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-12 03:04:51 -04:00
05/31/2017
--User changes -Add support for adjusting xform color indices in the palette editor. Fixed palettes can now be displayed there, but they will have no color arrows as they are not editable. -Add support for independent dimension scaling in the EmberRender and EmberAnimate programs to bring them in line with the final render dialog Fractorium. --Bug fixes -File paths with a space in them did not work in the command line programs. -Any Xml file in the search paths would erroneously be treated as a palette file. --Code changes -Change some for loops to while loops when iterating through xforms. -Allow FractoriumEmberController<T>::UpdateXform() to be able to apply the action to an xform at a specific index. -Remove old code blocks build files that were never used. -Make GetPath() return empty string if no path is present in the passed in file path. -GetTotalXform() was always counting the final xform, even if it was unused.
This commit is contained in:
@ -108,28 +108,30 @@ public:
|
||||
string TruncateVariations(Ember<T>& ember, size_t maxVars)
|
||||
{
|
||||
intmax_t smallest;
|
||||
size_t i, j, numVars;
|
||||
size_t i = 0, j, numVars;
|
||||
T sv = 0;
|
||||
ostringstream os;
|
||||
|
||||
//First clear out any xforms that are not the final, and have a density of less than 0.001.
|
||||
for (i = 0; i < ember.XformCount(); i++)
|
||||
{
|
||||
auto xform = ember.GetXform(i);
|
||||
|
||||
while (auto xform = ember.GetXform(i))
|
||||
{
|
||||
if (xform->m_Weight < T(0.001))
|
||||
{
|
||||
os << "trunc_density " << i;
|
||||
ember.DeleteXform(i);
|
||||
i = 0;//Size will have changed, so start over.
|
||||
continue;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
//Now consider all xforms, including final.
|
||||
for (i = 0; i < ember.TotalXformCount(); i++)
|
||||
{
|
||||
auto xform = ember.GetTotalXform(i);
|
||||
i = 0;
|
||||
|
||||
while (auto xform = ember.GetTotalXform(i))
|
||||
{
|
||||
do
|
||||
{
|
||||
Variation<T>* var = nullptr;
|
||||
@ -164,6 +166,8 @@ public:
|
||||
}
|
||||
}
|
||||
while (numVars > maxVars);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return os.str();
|
||||
|
Reference in New Issue
Block a user