Fix bug with xaos interpolation, by setting all xaos values to zero first.

Remove unnecessary resize() in Interpolate().

These are from Simon Detheridge's PR:

Set file name padding in EmberRender and
EmberAnimate based on the log10() of how many images are getting rendered, rather than hardcoding it to 5.

Use non-locale-imbued stream for writing filename in EmberAnimate.

Properly cast immediate float value used with pow() in density filter kernel.
This commit is contained in:
mfeemster
2015-03-30 17:46:52 -07:00
parent e746ae33ab
commit 4067422075
7 changed files with 29 additions and 19 deletions

View File

@ -32,7 +32,7 @@ bool EmberAnimate(EmberOptions& opt)
bool finishXml = false;
bool appendXml = false;
uint finalImageIndex = 0;
uint i, channels, ftime;
uint i, channels, ftime, padding;
string s, flameName, filename, inputPath = GetPath(opt.Input());
ostringstream os;
vector<Ember<T>> embers;
@ -248,6 +248,7 @@ bool EmberAnimate(EmberOptions& opt)
//Final setup steps before running.
os.imbue(std::locale(""));
padding = uint(log10((double)embers.size())) + 1;
renderer->SetEmber(embers);
renderer->EarlyClip(opt.EarlyClip());
renderer->YAxisUp(opt.YAxisUp());
@ -300,7 +301,8 @@ bool EmberAnimate(EmberOptions& opt)
if (opt.Out().empty())
{
ostringstream fnstream;
fnstream << inputPath << opt.Prefix() << setfill('0') << setw(opt.FilenamePadding()) << ftime << opt.Suffix() << "." << opt.Format();
fnstream << inputPath << opt.Prefix() << setfill('0') << setw(padding) << ftime << opt.Suffix() << "." << opt.Format();
filename = fnstream.str();
}