--User changes

-No longer constrain pitch, yaw or depth spinners to -180 - 180.

--Bug fixes
 -Properly set color index on padded xforms.
 -Adding a padding final xform included a linear variation with a weight of zero to not appear empty. Made it have a weight of 1.
 -Always write animate tag on final xform when saving to Xml.
 -Motion was being applied to the wrong flame in SheepTools::Edge(), so apply it to the correct one.
 -Prevent divide by zero when normalizing variation weights.
 -Was accidentally adding the placeholder value of -9999 for motion_offset to varation weights and parameters when applying motion. Set to zero if no value present.
 -Clamp flame rotation values to -180 - 180 when reading a flame from Xml.
 -Events were not properly wired for user changes in the random rotations per blend controls in the sequencer.
 -Fix major UI bugs with sequencer min/max random controls which made it nearly impossible to hand type values.
 -Values from rotations per blend and rotations per blend max were not being saved to file between program runs.
 -Checking animate for an xform was not applied to all flames even if Apply All was checked.
 -Changing interpolation type, temporal filter width, temporal type, and affine interpolation type were not actually saving to the flame when changed.
 -Grid on the main window was not being drawn at the right scale initially due to some OpenGL initialization occurring in the wrong order.
 -Severe bugs in sequence generation code:
  --Improperly detected padding xforms.
  --When looking for specific variations during xform aligning, only presence was detected, when it should have been presence plus a weight greater than zero.
  --When adding specific variations during xform aligning, must first remove any variations of that type.
  --Two variables were unsigned when they should have been signed. This prevented large blocks of code from ever executing.
  --When interpolating affines, an EPS that was too small was used, causing affine values to interpolate incorrectly. Instead use 1e-10 to ensure results equal to flam3.

--Code changes
 -Modify FractoriumEmberController::UpdateXform() to pass the selected xform index as well as the absolute index to func().
This commit is contained in:
Person
2018-06-12 21:20:15 -07:00
parent 05fabda748
commit 6ff199d1ef
30 changed files with 534 additions and 352 deletions

View File

@ -211,9 +211,12 @@ public:
/// <param name="count">The number of xforms to add</param>
void AddXforms(size_t count)
{
auto oldsize = m_Xforms.size();
for (size_t i = 0; i < count; i++)
{
Xform<T> xform;
xform.m_ColorX = T((oldsize + i) & 1);
xform.AddVariation(m_VariationList->GetVariationCopy(eVariationId::VAR_LINEAR));
AddXform(xform);
}
@ -266,15 +269,18 @@ public:
if (UseFinalXform())//Caller wanted one and this ember has one.
{
ember.m_FinalXform = m_FinalXform;
ember.m_FinalXform.m_ColorX = T(XformCount() & 1);
}
else//Caller wanted one and this ember doesn't have one.
{
//Interpolated-against final xforms need animate & color speed set to 0 and motion elements cleared.
ember.m_FinalXform.m_Affine.MakeID();
ember.m_FinalXform.m_Post.MakeID();
ember.m_FinalXform.m_Animate = 0;
ember.m_FinalXform.m_ColorSpeed = 0;
ember.m_FinalXform.m_Motion.clear();
ember.m_FinalXform.ClearAndDeleteVariations();
ember.m_FinalXform.AddVariation(m_VariationList->GetVariationCopy(eVariationId::VAR_LINEAR, 0));//Do this so it doesn't appear empty.
ember.m_FinalXform.AddVariation(m_VariationList->GetVariationCopy(eVariationId::VAR_LINEAR));//Do this so it doesn't appear empty.
}
}
@ -798,6 +804,9 @@ public:
{
auto thisXform = GetTotalXform(i);
//if (i == 10)
// cout << i << endl;
if (size == 2 && stagger > 0 && thisXform != &m_FinalXform)
{
coefSave[0] = coefs[0];