mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-07 00:34:50 -04:00
--User changes
-Add animation sequence creation to Fractorium. -Add two new options to EmberGenome which are used when generating an animation sequence.: --startcount: Add this number to the filename of each flame. --padding: Override the automatically calculated amount of padding zeroes added to each filename. --Bug fixes -Prevent filenames in command line programs from using scientific notation when rendering a large number of frames. -Fix tab orders to match newer GUI items which were overlooked in previous releases. -Re-render previews if transparency value in the options dialog was changed. Re-rendering was previously only done if early clip or y axis up was changed. -Use transparency when rendering thumbnail previews. --Code changes -Wrap EmberCommon.h in a namespace called EmberCommon. -Move FormatName() from EmberGenome to EmberCommon.h/cpp -Add a prefix parameter to EmberFile::DefaultFilename() to allow for creating a default filename for sequences. -When showing the final render dialog, allow specifying where it came from: the toolbar or the render sequence button. -Refactor all preview rendering code out into its own class hierarchy with overrides for the main window and the final render dialog. -Remove all preview render cancelling functions, they are now built into the new class hierarchy and a new render will not start until the previous one is stopped. -Add two new function ConstrainLow() and ConstrainHigh() which wrap constraining two min/max spinboxes to each others' values. -Add a bool to FractoriumEmberControllerBase::CopyEmberFile() to specify whether to copy the main file or the sequence file. This is somewhat of a hack and was done in a rush. -Add a bool to FractoriumEmberControllerBase::SetEmberFile() to specify whether to move the file rather than copy. This is used in FinalRenderEmberController and improves efficiency. -Add wrapper functions for variations filter dialog settings.
This commit is contained in:
@ -7,6 +7,8 @@
|
||||
/// Ember and its derivatives.
|
||||
/// </summary>
|
||||
|
||||
namespace EmberCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Derivation of the RenderCallback class to do custom printing action
|
||||
/// whenever the progress function is internally called inside of Ember
|
||||
@ -147,6 +149,20 @@ static bool InitPaletteList(const string& filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Formats a filename with digits using the passed in amount of 0 padding.
|
||||
/// </summary>
|
||||
/// <param name="result">The ember whose name will be set</param>
|
||||
/// <param name="os">The ostringstream which will be used to format</param>
|
||||
/// <param name="padding">The amount of padding to use</param>
|
||||
template <typename T>
|
||||
void FormatName(Ember<T>& result, ostringstream& os, streamsize padding)
|
||||
{
|
||||
os << std::setw(padding) << result.m_Time;
|
||||
result.m_Name = os.str();
|
||||
os.str("");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert an RGBA buffer to an RGB buffer.
|
||||
/// The two buffers can point to the same memory location if needed.
|
||||
@ -162,7 +178,7 @@ static void RgbaToRgb(vector<byte>& rgba, vector<byte>& rgb, size_t width, size_
|
||||
|
||||
for (size_t i = 0, j = 0; i < (width * height * 4); i += 4, j += 3)
|
||||
{
|
||||
rgb[j] = rgba[i];
|
||||
rgb[j] = rgba[i];
|
||||
rgb[j + 1] = rgba[i + 1];
|
||||
rgb[j + 2] = rgba[i + 2];
|
||||
}
|
||||
@ -371,7 +387,7 @@ static vector<unique_ptr<Renderer<T, float>>> CreateRenderers(eRendererType rend
|
||||
else
|
||||
{
|
||||
s = "CPU";
|
||||
v.push_back(std::move(unique_ptr<Renderer<T, float>>(::CreateRenderer<T>(eRendererType::CPU_RENDERER, devices, shared, texId, errorReport))));
|
||||
v.push_back(std::move(unique_ptr<Renderer<T, float>>(EmberCommon::CreateRenderer<T>(eRendererType::CPU_RENDERER, devices, shared, texId, errorReport))));
|
||||
}
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
@ -388,7 +404,7 @@ static vector<unique_ptr<Renderer<T, float>>> CreateRenderers(eRendererType rend
|
||||
try
|
||||
{
|
||||
s = "CPU";
|
||||
v.push_back(std::move(unique_ptr<Renderer<T, float>>(::CreateRenderer<T>(eRendererType::CPU_RENDERER, devices, shared, texId, errorReport))));
|
||||
v.push_back(std::move(unique_ptr<Renderer<T, float>>(EmberCommon::CreateRenderer<T>(eRendererType::CPU_RENDERER, devices, shared, texId, errorReport))));
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
@ -628,6 +644,7 @@ static vector<const Variation<T>*> FindVarsWithout(const vector<const Variation<
|
||||
|
||||
return vec;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Simple macro to print a string if the --verbose options has been specified.
|
||||
|
Reference in New Issue
Block a user