diff options
| author | Bryan Galdrikian <[email protected]> | 2017-02-21 12:07:59 -0800 |
|---|---|---|
| committer | Bryan Galdrikian <[email protected]> | 2017-02-21 12:07:59 -0800 |
| commit | 446ce137c6823ba9eff273bdafdaf266287c7c98 (patch) | |
| tree | d20aab3e2ed08d7b3ca71c2f40db6a93ea00c459 /NvBlast/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp | |
| download | blast-1.0.0-beta.tar.xz blast-1.0.0-beta.zip | |
first commitv1.0.0-beta
Diffstat (limited to 'NvBlast/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp')
| -rw-r--r-- | NvBlast/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/NvBlast/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp b/NvBlast/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp new file mode 100644 index 0000000..1f7068d --- /dev/null +++ b/NvBlast/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp @@ -0,0 +1,63 @@ +#include "FractureGeneralPanel.h" +#include "ui_FractureGeneralPanel.h" +#include "ProjectParams.h" + +FractureGeneralPanel::FractureGeneralPanel(QWidget *parent) : + QWidget(parent), + ui(new Ui::FractureGeneralPanel) +{ + ui->setupUi(this); +} + +FractureGeneralPanel::~FractureGeneralPanel() +{ + delete ui; +} + +void FractureGeneralPanel::updateValues() +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + + ui->comboBoxFracturePreset->setCurrentIndex(fractureGeneral.fracturePreset); + ui->comboBoxFractureType->setCurrentIndex(fractureGeneral.fractureType); + ui->checkBoxAddDepth->setChecked(fractureGeneral.addDepth); + ui->checkBoxPerChunk->setChecked(fractureGeneral.perChunk); + ui->checkBoxNewMatID->setChecked(fractureGeneral.newMatID); + ui->comboBoxApplyMaterial->setCurrentIndex(fractureGeneral.applyMaterial); +} + +void FractureGeneralPanel::on_comboBoxFracturePreset_currentIndexChanged(int index) +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + fractureGeneral.fracturePreset = index; +} + +void FractureGeneralPanel::on_comboBoxFractureType_currentIndexChanged(int index) +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + fractureGeneral.fractureType = index; +} + +void FractureGeneralPanel::on_checkBoxAddDepth_stateChanged(int arg1) +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + fractureGeneral.addDepth = (arg1 != 0 ? true : false); +} + +void FractureGeneralPanel::on_checkBoxPerChunk_stateChanged(int arg1) +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + fractureGeneral.perChunk = (arg1 != 0 ? true : false); +} + +void FractureGeneralPanel::on_checkBoxNewMatID_stateChanged(int arg1) +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + fractureGeneral.newMatID = (arg1 != 0 ? true:false); +} + +void FractureGeneralPanel::on_comboBoxApplyMaterial_currentIndexChanged(int index) +{ + BPPFractureGeneral& fractureGeneral = BlastProject::ins().getParams().fracture.general; + fractureGeneral.applyMaterial = index; +} |