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:
Person
2017-05-31 19:50:05 -07:00
parent f4bdc1c50a
commit 5a8b4b1148
49 changed files with 743 additions and 4031 deletions

View File

@ -308,10 +308,11 @@ void GLEmberController<T>::DrawAffines(bool pre, bool post)
{
if (pre && m_Fractorium->DrawAllPre())//Draw all pre affine if specified.
{
for (size_t i = 0; i < ember->TotalXformCount(); i++)
size_t i = 0;
while (auto xform = ember->GetTotalXform(i))
{
auto xform = ember->GetTotalXform(i);
bool selected = m_Fractorium->IsXformSelected(i) || (dragging ? (m_SelectedXform == xform) : (m_HoverXform == xform));
bool selected = m_Fractorium->IsXformSelected(i++) || (dragging ? (m_SelectedXform == xform) : (m_HoverXform == xform));
DrawAffine(xform, true, selected);
}
}
@ -322,10 +323,11 @@ void GLEmberController<T>::DrawAffines(bool pre, bool post)
if (post && m_Fractorium->DrawAllPost())//Draw all post affine if specified.
{
for (size_t i = 0; i < ember->TotalXformCount(); i++)
size_t i = 0;
while (auto xform = ember->GetTotalXform(i))
{
auto xform = ember->GetTotalXform(i);
bool selected = m_Fractorium->IsXformSelected(i) || (dragging ? (m_SelectedXform == xform) : (m_HoverXform == xform));
bool selected = m_Fractorium->IsXformSelected(i++) || (dragging ? (m_SelectedXform == xform) : (m_HoverXform == xform));
DrawAffine(xform, false, selected);
}
}
@ -1029,7 +1031,7 @@ int GLEmberController<T>::UpdateHover(v3T& glCoords)
bool post = m_Fractorium->ui.PostAffineGroupBox->isChecked();
bool preAll = pre && m_Fractorium->DrawAllPre();
bool postAll = post && m_Fractorium->DrawAllPost();
int bestIndex = -1;
int i = 0, bestIndex = -1;
T bestDist = 10;
auto ember = m_FractoriumEmberController->CurrentEmber();
m_HoverType = eHoverType::HoverNone;
@ -1053,10 +1055,8 @@ int GLEmberController<T>::UpdateHover(v3T& glCoords)
}
//Check all xforms.
for (int i = 0; i < int(ember->TotalXformCount()); i++)
while (auto xform = ember->GetTotalXform(i))
{
auto xform = ember->GetTotalXform(i);
if (preAll || (pre && m_HoverXform == xform))//Only check pre affine if they are shown.
{
if (CheckXformHover(xform, glCoords, bestDist, true, false))
@ -1074,6 +1074,8 @@ int GLEmberController<T>::UpdateHover(v3T& glCoords)
bestIndex = i;
}
}
i++;
}
}