Fix accidental disabling of post affine group box. The designer was clobbering it.

This commit is contained in:
mfeemster 2014-11-04 17:38:20 -08:00
parent b2600f0fff
commit 3f29025f99
5 changed files with 88 additions and 31 deletions

View File

@ -13,7 +13,7 @@
<!-- <!--
Change this for every release. Change this for every release.
--> -->
<?define ProductCode="{38F12108-7903-4502-91EE-7125DC2B15A2}"?> <?define ProductCode="{362B35F6-078F-4773-B092-66473A67988E}"?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)"> <Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package <Package

View File

@ -871,11 +871,11 @@ public:
} }
/// <summary> /// <summary>
/// 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. /// variations or parameters in the vector are present.
/// </summary> /// </summary>
/// <param name="names">Vector of variation and parameter names</param> /// <param name="names">Vector of variation and parameter names that inhibit flattening</param>
/// <returns>True if flatten was added, false if it already was present or if none of the specified variations or parameters were present.</returns> /// <returns>True if flatten was added, false if it already was present or if at least one of the specified variations or parameters were present.</returns>
bool Flatten(vector<string>& names) bool Flatten(vector<string>& names)
{ {
bool shouldFlatten = true; bool shouldFlatten = true;
@ -890,7 +890,7 @@ public:
if (var->m_Weight != 0)//This should never happen, but just to be safe. 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; shouldFlatten = false;
keepGoing = false; keepGoing = false;
@ -899,7 +899,7 @@ public:
} }
//Now traverse the parameters for this variation. //Now traverse the parameters for this variation.
if (ParametricVariation<T>* parVar = dynamic_cast<ParametricVariation<T>*>(var)) if (ParametricVariation<T>* parVar = dynamic_cast<ParametricVariation<T>*>(var))//If any parametric variation parameter is present and non-zero, don't flatten.
{ {
ForEach(names, [&] (const string& s) 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<T>* var = new FlattenVariation<T>(); Variation<T>* var = new FlattenVariation<T>();

View File

@ -153,30 +153,33 @@ public:
m_BadParamNames.push_back(pair<string, string>("post_bwraps2_outer_twist", "post_bwraps_outer_twist")); m_BadParamNames.push_back(pair<string, string>("post_bwraps2_outer_twist", "post_bwraps_outer_twist"));
m_FlattenNames.reserve(24); m_FlattenNames.reserve(24);
m_FlattenNames.push_back("linear3D"); m_FlattenNames.push_back("pre_crop");
m_FlattenNames.push_back("bubble"); m_FlattenNames.push_back("pre_falloff2");
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_rotate_x"); m_FlattenNames.push_back("pre_rotate_x");
m_FlattenNames.push_back("pre_rotate_y"); m_FlattenNames.push_back("pre_rotate_y");
m_FlattenNames.push_back("ztranslate"); m_FlattenNames.push_back("pre_ztranslate");
m_FlattenNames.push_back("zcone");
m_FlattenNames.push_back("post_rotate_x"); m_FlattenNames.push_back("blur3D");
m_FlattenNames.push_back("post_rotate_y"); m_FlattenNames.push_back("bubble");
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("bwraps"); m_FlattenNames.push_back("bwraps");
m_FlattenNames.push_back("bwraps2"); m_FlattenNames.push_back("bwraps2");
m_FlattenNames.push_back("falloff2");
m_FlattenNames.push_back("crop"); m_FlattenNames.push_back("crop");
m_FlattenNames.push_back("pre_falloff2"); m_FlattenNames.push_back("cylinder");
m_FlattenNames.push_back("pre_crop"); m_FlattenNames.push_back("falloff2");
m_FlattenNames.push_back("post_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_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. //This is a vector of the param names as they are in the legacy, badly named flam3/Apophysis code.
vector<string> badParams; vector<string> badParams;

View File

@ -2820,8 +2820,8 @@ SpinBox
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>118</width> <width>238</width>
<height>597</height> <height>747</height>
</rect> </rect>
</property> </property>
<property name="palette"> <property name="palette">
@ -3478,7 +3478,7 @@ SpinBox
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="checked"> <property name="checked">
<bool>false</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_14"> <layout class="QVBoxLayout" name="verticalLayout_14">
<property name="spacing"> <property name="spacing">
@ -3498,6 +3498,9 @@ SpinBox
</property> </property>
<item> <item>
<widget class="TableWidget" name="PostAffineTable"> <widget class="TableWidget" name="PostAffineTable">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>2</horstretch> <horstretch>2</horstretch>
@ -3637,6 +3640,9 @@ SpinBox
</property> </property>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QPushButton" name="PostRotate90CcButton"> <widget class="QPushButton" name="PostRotate90CcButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Rotate xform 90 degrees counter clockwise</string> <string>Rotate xform 90 degrees counter clockwise</string>
</property> </property>
@ -3651,6 +3657,9 @@ SpinBox
</item> </item>
<item row="1" column="4"> <item row="1" column="4">
<widget class="QPushButton" name="PostRotate90CButton"> <widget class="QPushButton" name="PostRotate90CButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Rotate xform 90 degrees clockwise</string> <string>Rotate xform 90 degrees clockwise</string>
</property> </property>
@ -3665,6 +3674,9 @@ SpinBox
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QPushButton" name="PostScaleUpButton"> <widget class="QPushButton" name="PostScaleUpButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Scale xform x percent up</string> <string>Scale xform x percent up</string>
</property> </property>
@ -3679,6 +3691,9 @@ SpinBox
</item> </item>
<item row="2" column="4"> <item row="2" column="4">
<widget class="QPushButton" name="PostMoveRightButton"> <widget class="QPushButton" name="PostMoveRightButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Move xform x units right</string> <string>Move xform x units right</string>
</property> </property>
@ -3693,6 +3708,9 @@ SpinBox
</item> </item>
<item row="3" column="2"> <item row="3" column="2">
<widget class="QComboBox" name="PostScaleCombo"> <widget class="QComboBox" name="PostScaleCombo">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -3740,6 +3758,9 @@ SpinBox
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QPushButton" name="PostMoveUpButton"> <widget class="QPushButton" name="PostMoveUpButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Move xform x units up</string> <string>Move xform x units up</string>
</property> </property>
@ -3754,6 +3775,9 @@ SpinBox
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QPushButton" name="PostMoveDownButton"> <widget class="QPushButton" name="PostMoveDownButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Move xform x units down</string> <string>Move xform x units down</string>
</property> </property>
@ -3768,6 +3792,9 @@ SpinBox
</item> </item>
<item row="2" column="2"> <item row="2" column="2">
<widget class="QComboBox" name="PostMoveCombo"> <widget class="QComboBox" name="PostMoveCombo">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -3795,6 +3822,9 @@ SpinBox
</item> </item>
<item row="2" column="3"> <item row="2" column="3">
<widget class="QPushButton" name="PostMoveLeftButton"> <widget class="QPushButton" name="PostMoveLeftButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Move xform x units left</string> <string>Move xform x units left</string>
</property> </property>
@ -3809,6 +3839,9 @@ SpinBox
</item> </item>
<item row="1" column="2"> <item row="1" column="2">
<widget class="QComboBox" name="PostRotateCombo"> <widget class="QComboBox" name="PostRotateCombo">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -3877,6 +3910,9 @@ SpinBox
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QPushButton" name="PostRotateCcButton"> <widget class="QPushButton" name="PostRotateCcButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Rotate xform x degrees counter clockwise</string> <string>Rotate xform x degrees counter clockwise</string>
</property> </property>
@ -3891,6 +3927,9 @@ SpinBox
</item> </item>
<item row="1" column="3"> <item row="1" column="3">
<widget class="QPushButton" name="PostRotateCButton"> <widget class="QPushButton" name="PostRotateCButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Rotate xform x degrees clockwise</string> <string>Rotate xform x degrees clockwise</string>
</property> </property>
@ -3905,6 +3944,9 @@ SpinBox
</item> </item>
<item row="3" column="3"> <item row="3" column="3">
<widget class="QPushButton" name="PostScaleDownButton"> <widget class="QPushButton" name="PostScaleDownButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Scale xform x percent down</string> <string>Scale xform x percent down</string>
</property> </property>
@ -3919,6 +3961,9 @@ SpinBox
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QPushButton" name="PostFlipHorizontalButton"> <widget class="QPushButton" name="PostFlipHorizontalButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Flip xform horizontally</string> <string>Flip xform horizontally</string>
</property> </property>
@ -3933,6 +3978,9 @@ SpinBox
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="PostFlipVerticalButton"> <widget class="QPushButton" name="PostFlipVerticalButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Flip xform vertically</string> <string>Flip xform vertically</string>
</property> </property>
@ -3947,6 +3995,9 @@ SpinBox
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QPushButton" name="PostResetButton"> <widget class="QPushButton" name="PostResetButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed"> <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -3972,7 +4023,7 @@ SpinBox
<item> <item>
<widget class="QGroupBox" name="PostAffineShowGroupBox"> <widget class="QGroupBox" name="PostAffineShowGroupBox">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>true</bool>
</property> </property>
<property name="title"> <property name="title">
<string>Show</string> <string>Show</string>
@ -3993,7 +4044,7 @@ SpinBox
<item> <item>
<widget class="QRadioButton" name="ShowPostAffineCurrentRadio"> <widget class="QRadioButton" name="ShowPostAffineCurrentRadio">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Current</string> <string>Current</string>
@ -4005,6 +4056,9 @@ SpinBox
</item> </item>
<item> <item>
<widget class="QRadioButton" name="ShowPostAffineAllRadio"> <widget class="QRadioButton" name="ShowPostAffineAllRadio">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text"> <property name="text">
<string>All</string> <string>All</string>
</property> </property>

View File

@ -219,7 +219,7 @@ void FractoriumEmberController<T>::Update(std::function<void (void)> func, bool
/// Wrapper to call a function on the current xform, then optionally add the requested action to the rendering queue. /// Wrapper to call a function on the current xform, then optionally add the requested action to the rendering queue.
/// </summary> /// </summary>
/// <param name="func">The function to call</param> /// <param name="func">The function to call</param>
/// <param name="updateRender">True to update renderer, else false. Default: false.</param> /// <param name="updateRender">True to update renderer, else false. Default: true.</param>
/// <param name="action">The action to add to the rendering queue. Default: FULL_RENDER.</param> /// <param name="action">The action to add to the rendering queue. Default: FULL_RENDER.</param>
template <typename T> template <typename T>
void FractoriumEmberController<T>::UpdateCurrentXform(std::function<void (Xform<T>*)> func, bool updateRender, eProcessAction action) void FractoriumEmberController<T>::UpdateCurrentXform(std::function<void (Xform<T>*)> func, bool updateRender, eProcessAction action)