mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 05:00:06 -05:00
Add FPS parameter to UI
This commit is contained in:
parent
2909af2408
commit
2ae68776a9
@ -1232,6 +1232,7 @@ void Fractorium::SetTabOrders()
|
||||
w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendCWCheckBox);
|
||||
w = SetTabOrder(this, w, ui.SequenceRotationsPerBlendMaxSpinBox);
|
||||
w = SetTabOrder(this, w, ui.SequenceLinearCheckBox);
|
||||
w = SetTabOrder(this, w, ui.SequenceAnimationFpsSpinBox);
|
||||
w = SetTabOrder(this, w, ui.SequenceGenerateButton);
|
||||
w = SetTabOrder(this, w, ui.SequenceRenderButton);
|
||||
w = SetTabOrder(this, w, ui.SequenceSaveButton);
|
||||
|
@ -8070,6 +8070,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QSpinBox" name="SequenceAnimationFpsSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>The number of frames per second for preview animation.</p></body></html></string>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string>Animation FPS: </string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>200</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -65,8 +65,11 @@ void Fractorium::InitLibraryUI()
|
||||
ui.SequenceRotationsPerBlendMaxSpinBox->setMinimum(m_Settings->RotationsPerBlend());//Upper min = lower max.
|
||||
//Linear.
|
||||
ui.SequenceLinearCheckBox->setChecked(m_Settings->Linear());
|
||||
//Animation FPS.
|
||||
ui.SequenceAnimationFpsSpinBox->setValue(m_Settings->AnimationFps());
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Select the item in the library tree specified by the passed in index.
|
||||
/// </summary>
|
||||
@ -849,8 +852,8 @@ void FractoriumEmberController<T>::SequenceAnimateButtonClicked()
|
||||
{
|
||||
animation->setExpanded(true);
|
||||
m_AnimateFrame = 0;
|
||||
const auto fps = 30;//TODO Make this a UI Parameter
|
||||
m_AnimateTimer->start(1000 / fps);
|
||||
// TODO look at duration based instead of time
|
||||
m_AnimateTimer->start(1000 / m_Fractorium->ui.SequenceAnimationFpsSpinBox->value());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1018,6 +1021,7 @@ void Fractorium::SyncSequenceSettings()
|
||||
m_Settings->RotationsPerBlend(ui.SequenceRotationsPerBlendSpinBox->value());
|
||||
m_Settings->RotationsPerBlendMax(ui.SequenceRotationsPerBlendMaxSpinBox->value());
|
||||
m_Settings->Linear(ui.SequenceLinearCheckBox->isChecked());
|
||||
m_Settings->AnimationFps(ui.SequenceAnimationFpsSpinBox->value());
|
||||
}
|
||||
|
||||
template class FractoriumEmberController<float>;
|
||||
|
@ -242,6 +242,9 @@ void FractoriumSettings::RotationsPerBlendMax(uint i) { setValue(ROTATIONSPERBLE
|
||||
bool FractoriumSettings::Linear() { return value(LINEAR).toBool(); }
|
||||
void FractoriumSettings::Linear(bool b) { setValue(LINEAR, b); }
|
||||
|
||||
uint FractoriumSettings::AnimationFps() { return value(ANIMATION_FPS).toUInt(); }
|
||||
void FractoriumSettings::AnimationFps(uint i) { setValue(ANIMATION_FPS, i); }
|
||||
|
||||
/// <summary>
|
||||
/// Variations filter settings.
|
||||
/// </summary>
|
||||
|
@ -43,6 +43,7 @@
|
||||
#define ROTATIONSPERBLEND "sequence/rotationsperblend"
|
||||
#define ROTATIONSPERBLENDMAX "sequence/rotationsperblendmax"
|
||||
#define LINEAR "sequence/linear"
|
||||
#define ANIMATION_FPS "sequence/animationfps"
|
||||
|
||||
#define VARFILTERSUM "varfilter/sumcheckbox"
|
||||
#define VARFILTERASSIGN "varfilter/assigncheckbox"
|
||||
@ -218,6 +219,9 @@ public:
|
||||
bool Linear();
|
||||
void Linear(bool b);
|
||||
|
||||
uint AnimationFps();
|
||||
void AnimationFps(uint i);
|
||||
|
||||
int VarFilterSum();
|
||||
void VarFilterSum(int i);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user