Commit e9964fe3 authored by Isaak Lim's avatar Isaak Lim

now the MixedDecimater decimate functions are actually called from the UI

closes #1025

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15504 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 01a9bc80
...@@ -341,7 +341,7 @@ void DecimaterPlugin::slot_decimate() ...@@ -341,7 +341,7 @@ void DecimaterPlugin::slot_decimate()
McDecimaterType* mcDec = dynamic_cast<McDecimaterType*>(decIter->first.get()); McDecimaterType* mcDec = dynamic_cast<McDecimaterType*>(decIter->first.get());
MixedDecimaterType* mixedDec = dynamic_cast<MixedDecimaterType*>(decIter->first.get()); MixedDecimaterType* mixedDec = dynamic_cast<MixedDecimaterType*>(decIter->first.get());
if(dec) if(dec && tool_->rbUseDecimater->isChecked())
{ {
if ( tool_->rbVertices->isChecked() ) if ( tool_->rbVertices->isChecked() )
dec->decimate_to(tool_->verticesCount->value()); dec->decimate_to(tool_->verticesCount->value());
...@@ -350,7 +350,7 @@ void DecimaterPlugin::slot_decimate() ...@@ -350,7 +350,7 @@ void DecimaterPlugin::slot_decimate()
else // constraints only else // constraints only
dec->decimate_to_faces(0, 1); dec->decimate_to_faces(0, 1);
} }
else if (mcDec) else if (mcDec && tool_->rbUseMC->isChecked())
{ {
mcDec->set_samples(tool_->randomSamplesCounter->value()); mcDec->set_samples(tool_->randomSamplesCounter->value());
if ( tool_->rbVertices->isChecked() ) if ( tool_->rbVertices->isChecked() )
...@@ -360,7 +360,7 @@ void DecimaterPlugin::slot_decimate() ...@@ -360,7 +360,7 @@ void DecimaterPlugin::slot_decimate()
else // constraints only else // constraints only
mcDec->decimate_to_faces(0, 1); mcDec->decimate_to_faces(0, 1);
} }
else if (mixedDec) else if (mixedDec && tool_->rbUseMixed->isChecked())
{ {
float mc_factor = 1.0 - (tool_->mixedFactorCounter->value()*0.01); float mc_factor = 1.0 - (tool_->mixedFactorCounter->value()*0.01);
mixedDec->set_samples(tool_->randomSamplesCounter->value()); mixedDec->set_samples(tool_->randomSamplesCounter->value());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment