From 3f29025f99bcce8d06e8e414045faa2557eb1fcf Mon Sep 17 00:00:00 2001 From: mfeemster Date: Tue, 4 Nov 2014 17:38:20 -0800 Subject: [PATCH] Fix accidental disabling of post affine group box. The designer was clobbering it. --- Builds/MSVC/Installer/Product.wxs | 2 +- Source/Ember/Xform.h | 12 ++-- Source/Ember/XmlToEmber.h | 39 +++++------ Source/Fractorium/Fractorium.ui | 64 +++++++++++++++++-- .../Fractorium/FractoriumEmberController.cpp | 2 +- 5 files changed, 88 insertions(+), 31 deletions(-) diff --git a/Builds/MSVC/Installer/Product.wxs b/Builds/MSVC/Installer/Product.wxs index 83f5a8d..0eb3367 100644 --- a/Builds/MSVC/Installer/Product.wxs +++ b/Builds/MSVC/Installer/Product.wxs @@ -13,7 +13,7 @@ - + - /// Flatten this xform by adding a flatten variation if none is present, and if any of the + /// Flatten this xform by adding a flatten variation if none is present, and if none of the /// variations or parameters in the vector are present. /// - /// Vector of variation and parameter names - /// True if flatten was added, false if it already was present or if none of the specified variations or parameters were present. + /// Vector of variation and parameter names that inhibit flattening + /// True if flatten was added, false if it already was present or if at least one of the specified variations or parameters were present. bool Flatten(vector& names) { bool shouldFlatten = true; @@ -890,7 +890,7 @@ public: if (var->m_Weight != 0)//This should never happen, but just to be safe. { - if (FindIf(names, [&] (const string& s) -> bool { return !_stricmp(s.c_str(), var->Name().c_str()); })) + if (FindIf(names, [&] (const string& s) -> bool { return !_stricmp(s.c_str(), var->Name().c_str()); }))//If any variation is present, don't flatten. { shouldFlatten = false; keepGoing = false; @@ -899,7 +899,7 @@ public: } //Now traverse the parameters for this variation. - if (ParametricVariation* parVar = dynamic_cast*>(var)) + if (ParametricVariation* parVar = dynamic_cast*>(var))//If any parametric variation parameter is present and non-zero, don't flatten. { ForEach(names, [&] (const string& s) { @@ -913,7 +913,7 @@ public: } }); - if (shouldFlatten) + if (shouldFlatten)//Flatten was not present and neither was any variation name or parameter in the list. { Variation* var = new FlattenVariation(); diff --git a/Source/Ember/XmlToEmber.h b/Source/Ember/XmlToEmber.h index 76770e2..64de8b8 100644 --- a/Source/Ember/XmlToEmber.h +++ b/Source/Ember/XmlToEmber.h @@ -153,30 +153,33 @@ public: m_BadParamNames.push_back(pair("post_bwraps2_outer_twist", "post_bwraps_outer_twist")); m_FlattenNames.reserve(24); - m_FlattenNames.push_back("linear3D"); - m_FlattenNames.push_back("bubble"); - m_FlattenNames.push_back("cylinder"); - m_FlattenNames.push_back("zblur"); - m_FlattenNames.push_back("blur3D"); - m_FlattenNames.push_back("pre_ztranslate"); + m_FlattenNames.push_back("pre_crop"); + m_FlattenNames.push_back("pre_falloff2"); m_FlattenNames.push_back("pre_rotate_x"); m_FlattenNames.push_back("pre_rotate_y"); - m_FlattenNames.push_back("ztranslate"); - m_FlattenNames.push_back("zcone"); - m_FlattenNames.push_back("post_rotate_x"); - m_FlattenNames.push_back("post_rotate_y"); - m_FlattenNames.push_back("julia3D"); - m_FlattenNames.push_back("julia3Dz"); - m_FlattenNames.push_back("curl3D_cz"); - m_FlattenNames.push_back("hemisphere"); + m_FlattenNames.push_back("pre_ztranslate"); + + m_FlattenNames.push_back("blur3D"); + m_FlattenNames.push_back("bubble"); m_FlattenNames.push_back("bwraps"); m_FlattenNames.push_back("bwraps2"); - m_FlattenNames.push_back("falloff2"); m_FlattenNames.push_back("crop"); - m_FlattenNames.push_back("pre_falloff2"); - m_FlattenNames.push_back("pre_crop"); - m_FlattenNames.push_back("post_falloff2"); + m_FlattenNames.push_back("cylinder"); + m_FlattenNames.push_back("falloff2"); + m_FlattenNames.push_back("hemisphere"); + m_FlattenNames.push_back("julia3D"); + m_FlattenNames.push_back("julia3Dz"); + m_FlattenNames.push_back("linear3D"); + m_FlattenNames.push_back("zblur"); + m_FlattenNames.push_back("zcone"); + m_FlattenNames.push_back("ztranslate"); + m_FlattenNames.push_back("post_crop"); + m_FlattenNames.push_back("post_falloff2"); + m_FlattenNames.push_back("post_rotate_x"); + m_FlattenNames.push_back("post_rotate_y"); + + m_FlattenNames.push_back("curl3D_cz"); //This is a vector of the param names as they are in the legacy, badly named flam3/Apophysis code. vector badParams; diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui index 0108ced..7d955b2 100644 --- a/Source/Fractorium/Fractorium.ui +++ b/Source/Fractorium/Fractorium.ui @@ -2820,8 +2820,8 @@ SpinBox 0 0 - 118 - 597 + 238 + 747 @@ -3478,7 +3478,7 @@ SpinBox true - false + true @@ -3498,6 +3498,9 @@ SpinBox + + true + 2 @@ -3637,6 +3640,9 @@ SpinBox + + true + Rotate xform 90 degrees counter clockwise @@ -3651,6 +3657,9 @@ SpinBox + + true + Rotate xform 90 degrees clockwise @@ -3665,6 +3674,9 @@ SpinBox + + true + Scale xform x percent up @@ -3679,6 +3691,9 @@ SpinBox + + true + Move xform x units right @@ -3693,6 +3708,9 @@ SpinBox + + true + 0 @@ -3740,6 +3758,9 @@ SpinBox + + true + Move xform x units up @@ -3754,6 +3775,9 @@ SpinBox + + true + Move xform x units down @@ -3768,6 +3792,9 @@ SpinBox + + true + 0 @@ -3795,6 +3822,9 @@ SpinBox + + true + Move xform x units left @@ -3809,6 +3839,9 @@ SpinBox + + true + 0 @@ -3877,6 +3910,9 @@ SpinBox + + true + Rotate xform x degrees counter clockwise @@ -3891,6 +3927,9 @@ SpinBox + + true + Rotate xform x degrees clockwise @@ -3905,6 +3944,9 @@ SpinBox + + true + Scale xform x percent down @@ -3919,6 +3961,9 @@ SpinBox + + true + Flip xform horizontally @@ -3933,6 +3978,9 @@ SpinBox + + true + Flip xform vertically @@ -3947,6 +3995,9 @@ SpinBox + + true + 0 @@ -3972,7 +4023,7 @@ SpinBox - false + true Show @@ -3993,7 +4044,7 @@ SpinBox - false + true Current @@ -4005,6 +4056,9 @@ SpinBox + + true + All diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp index 446f901..2b615ab 100644 --- a/Source/Fractorium/FractoriumEmberController.cpp +++ b/Source/Fractorium/FractoriumEmberController.cpp @@ -219,7 +219,7 @@ void FractoriumEmberController::Update(std::function func, bool /// Wrapper to call a function on the current xform, then optionally add the requested action to the rendering queue. /// /// The function to call -/// True to update renderer, else false. Default: false. +/// True to update renderer, else false. Default: true. /// The action to add to the rendering queue. Default: FULL_RENDER. template void FractoriumEmberController::UpdateCurrentXform(std::function*)> func, bool updateRender, eProcessAction action)