From e1bf674c16e3c8472b29574159c789cd3f0c64e0 Mon Sep 17 00:00:00 2001 From: Bryan Galdrikian Date: Fri, 24 Feb 2017 09:32:20 -0800 Subject: Updating to blast_source-windows@1.0.347-21749006 and blast_tools_and_samples-windows@1.0.347-21749006 with a new directory structure. NvBlast folder is gone, files have been moved to top level directory. README is changed to reflect this. --- .../BlastPlugin/Window/FractureGeneralPanel.cpp | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp (limited to 'tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp') diff --git a/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp b/tools/ArtistTools/source/BlastPlugin/Window/FractureGeneralPanel.cpp new file mode 100644 index 0000000..1f7068d --- /dev/null +++ b/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; +} -- cgit v1.2.3