Index: Plugin-Decimater/DecimaterPlugin.cc
===================================================================
--- Plugin-Decimater/DecimaterPlugin.cc	(revision 16506)
+++ Plugin-Decimater/DecimaterPlugin.cc	(working copy)
@@ -75,6 +75,9 @@
 
 void DecimaterPlugin::initializePlugin()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_ = new DecimaterToolbarWidget();
   QSize size(100, 100);
   tool_->resize(size);
@@ -160,6 +163,9 @@
                           QString(tr("objectId,constraints")).split(","),
                           QString(tr("ID of an object; Object that can has one or more constraint properties (decimation_order,distance,edge_length,normal_deviation,roundness,aspect_ratio,independent_sets,vertices,triangles)")).split(";"));
 
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->decTypeOps->setVisible(false);
 }
 
@@ -172,17 +178,26 @@
  */
 void DecimaterPlugin::updateRoundness(int _value)
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->roundness->setValue( (double) _value / 100.0 );
   tool_->cbRoundness->setChecked (true);
 }
 
 void DecimaterPlugin::slotMixedCounterValueChanged(double _value)
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->mixedFactorLabel->setText(QString::number(100-_value)+QString("%"));
   tool_->mixedFactorSlider->setValue(100-_value);
 }
 void DecimaterPlugin::slotMixedSliderValueChanged(int _value)
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->mixedFactorLabel->setText(QString::number(_value)+QString("%"));
   tool_->mixedFactorCounter->setValue(100.0-_value);
 }
@@ -195,6 +210,9 @@
  */
 void DecimaterPlugin::updateRoundness(double _value)
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->roundnessSlider->setValue( (int) (_value * 100) );
   tool_->cbRoundness->setChecked (true);
 }
@@ -208,6 +226,9 @@
  */
 void DecimaterPlugin::updateAspectRatio(int _value)
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->aspectRatio->setValue( (double) _value / 100.0 );
   tool_->cbAspectRatio->setChecked (true);
 }
@@ -221,6 +242,9 @@
  */
 void DecimaterPlugin::updateAspectRatio(double _value)
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->aspectRatioSlider->setValue( (int) (_value * 100) );
   tool_->cbAspectRatio->setChecked (true);
 }
@@ -231,6 +255,9 @@
 void DecimaterPlugin::slot_initialize()
 {
 
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   decimater_objects_.clear();
 
   for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS,DATA_TRIANGLE_MESH) ;
@@ -384,6 +411,9 @@
 void DecimaterPlugin::slot_decimate()
 {
 
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   //decimate
   for (std::vector< ptr::shared_ptr<DecimaterInit> >::iterator decIter = decimater_objects_.begin();
       decIter != decimater_objects_.end(); ++decIter)
@@ -738,7 +768,7 @@
 void DecimaterPlugin::slotUpdateNumVertices()
 {
   // Only update if tool is visible
-  if ( !tool_->isVisible() ) {
+  if ( !OpenFlipper::Options::gui() || !tool_->isVisible() ) {
     return;
   }
 
@@ -789,7 +819,7 @@
  */
 void DecimaterPlugin::slotUpdateNumTriangles() {
   // only update if the tool is visible
-  if (!tool_->isVisible())
+  if (!OpenFlipper::Options::gui() || !tool_->isVisible())
     return;
 
   uint max = 0;
@@ -845,6 +875,9 @@
 
 void DecimaterPlugin::slotDisableDecimation()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   decimater_objects_.clear();
   tool_->pbDecimate->setEnabled(false);
 }
@@ -864,6 +897,9 @@
 // activate checkbox if value has changed
 void DecimaterPlugin::updateVertices()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->rbVertices->setChecked (true);
 }
 
@@ -872,6 +908,9 @@
 // activate checkbox if value has changed
 void DecimaterPlugin::updateTriangles()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->rbTriangles->setChecked (true);
 }
 
@@ -880,6 +919,9 @@
 // activate checkbox if value has changed
 void DecimaterPlugin::updateNormalDev()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->cbNormalDev->setChecked (true);
 }
 
@@ -888,6 +930,9 @@
 // activate checkbox if value has changed
 void DecimaterPlugin::updateEdgeLength()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->cbEdgeLength->setChecked (true);
 }
 
@@ -896,6 +941,9 @@
 // activate checkbox if value has changed
 void DecimaterPlugin::updateDistance()
 {
+  if ( ! OpenFlipper::Options::gui())
+    return;
+
   tool_->cbDistance->setChecked (true);
 }
 
Index: Plugin-Decimater/DecimaterPlugin.hh
===================================================================
--- Plugin-Decimater/DecimaterPlugin.hh	(revision 16506)
+++ Plugin-Decimater/DecimaterPlugin.hh	(working copy)
@@ -135,6 +135,9 @@
 
     void slotAboutToRestore(int _id); //BackupInterface
 
+    // Tell system that this plugin runs without ui
+    void noguiSupported( ) {} ;
+
 public :
 
   /// Default constructor
