Fix incorrect parsing of legacy "symmetry" xform Xml element.

This commit is contained in:
mfeemster 2015-01-23 18:26:18 -08:00
parent c2ef02a8bf
commit 73cd4f9718
4 changed files with 9 additions and 9 deletions

View File

@ -4,6 +4,7 @@
Add total time output for verbose mode in EmberAnimate to match EmberRender.
--Bug Fixes
Fix incorrect parsing of legacy "symmetry" xform Xml element.
Fix incorrect iters ran/requested percentage in EmberAnimate to match EmberRender.
Fix motion blur being disabled when doing animations in final render dialog.
Allow for boolean command line options which default to true to be set to false.

View File

@ -1091,7 +1091,7 @@ public:
m_Xforms[i].m_Weight = 1;
m_Xforms[i].m_ColorSpeed = 0;
m_Xforms[i].m_Animate = 0.0;
m_Xforms[i].m_Animate = 0;
m_Xforms[i].m_ColorX = 1;
m_Xforms[i].m_ColorY = 1;//Added in case 2D palette support is ever added.
m_Xforms[i].m_Affine.A(-1);
@ -1114,9 +1114,9 @@ public:
Xform<T> xform;
AddXform(xform);
m_Xforms[i].m_Weight = 1.0;
m_Xforms[i].m_ColorSpeed = 0.0;
m_Xforms[i].m_Animate = 0.0;
m_Xforms[i].m_Weight = 1;
m_Xforms[i].m_ColorSpeed = 0;
m_Xforms[i].m_Animate = 0;
m_Xforms[i].m_ColorX = m_Xforms[i].m_ColorY = (sym < 3) ? 0 : (T(k - 1) / T(sym - 2));//Added Y.
m_Xforms[i].m_Affine.A(Round6(cos(k * a)));
m_Xforms[i].m_Affine.D(Round6(sin(k * a)));

View File

@ -1067,7 +1067,6 @@ private:
//First parse out simple float reads.
if (ParseAndAssignFloat(curAtt->name, attStr, "weight", xform.m_Weight, success)) { }
else if (ParseAndAssignFloat(curAtt->name, attStr, "color_speed", xform.m_ColorSpeed, success)) { }
else if (ParseAndAssignFloat(curAtt->name, attStr, "symmetry", xform.m_ColorSpeed, success)) { xform.m_ColorSpeed = (1 - xform.m_ColorSpeed) / 2; }//Legacy support.
else if (ParseAndAssignFloat(curAtt->name, attStr, "animate", xform.m_Animate, success)) { }
else if (ParseAndAssignFloat(curAtt->name, attStr, "opacity", xform.m_Opacity, success)) { }
else if (ParseAndAssignFloat(curAtt->name, attStr, "var_color", xform.m_DirectColor, success)) { }
@ -1081,7 +1080,7 @@ private:
xform.m_Name = string(attStr);
std::replace(xform.m_Name.begin(), xform.m_Name.end(), ' ', '_');
}
else if (!Compare(curAtt->name, "symmetry"))
else if (!Compare(curAtt->name, "symmetry"))//Legacy support.
{
//Deprecated, set both color_speed and animate to this value.
//Huh? Either set it or not?

View File

@ -85,7 +85,7 @@ bool EmberGenome(EmberOptions& opt)
os2.imbue(std::locale(""));
if (!errorReport.empty())
emberReport.DumpErrorReport();
cerr << emberReport.ErrorReportString();
if (!renderer.get())
{
@ -225,7 +225,7 @@ bool EmberGenome(EmberOptions& opt)
return false;
}
if ((!doCross0) ^ (!doCross1))
if (doCross0 != doCross1)//Must both be either true or false.
{
cerr << "Must specify both crossover arguments. Returning without executing." << endl;
return false;
@ -518,7 +518,7 @@ bool EmberGenome(EmberOptions& opt)
}
if (opt.Enclosed())
out << "<pick version=\"EMBER-" << EmberVersion() << "\">" << endl;
cout << "<pick version=\"EMBER-" << EmberVersion() << "\">" << endl;
for (rep = 0; rep < opt.Repeat(); rep++)
{