mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-18 18:44:39 +00:00
update savemask exporter with init a mask [base type]
This commit is contained in:
parent
439ac6f38e
commit
96bdbd9608
@ -24,6 +24,9 @@
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.44 2006/01/14 11:23:24 fmazzant
|
||||
update savemask exporter with init a mask [base type]
|
||||
|
||||
Revision 1.43 2006/01/14 00:02:52 fmazzant
|
||||
added new include for exporter dialog
|
||||
|
||||
@ -352,10 +355,15 @@ bool ExtraMeshIOPlugin::save(const QString &formatName,QString &fileName, MeshMo
|
||||
|
||||
if(formatName.toUpper() == tr("3DS"))
|
||||
{
|
||||
//int newmask = vcg::tri::io::SaveMaskToExporter::GetMaskToExporter(mask,tr("3DS"));
|
||||
//if( newmask == 0 )return false;
|
||||
bool result = vcg::tri::io::Exporter3DS<CMeshO>::Save(m.cm,filename.c_str(),true,mask,cb);//salva esclusivamente in formato binario
|
||||
if(result!=0)
|
||||
{
|
||||
QMessageBox::warning(parent, tr("3DS Saving Error"), errorMsgFormat.arg(fileName, vcg::tri::io::Exporter3DS<CMeshO>::ErrorMsg(result)));
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
QMessageBox::warning(parent, "Unknow type", "file's extension not supported!!!");
|
||||
|
||||
@ -25,6 +25,9 @@
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.2 2006/01/14 11:23:24 fmazzant
|
||||
update savemask exporter with init a mask [base type]
|
||||
|
||||
Revision 1.1 2006/01/13 23:59:51 fmazzant
|
||||
first commit exporter dialog
|
||||
|
||||
@ -40,18 +43,57 @@ SaveMaskExporterDialog::SaveMaskExporterDialog(QWidget *parent) : QDialog(parent
|
||||
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(SlotCancelButton()));
|
||||
}
|
||||
|
||||
SaveMaskExporterDialog::SaveMaskExporterDialog(QWidget *parent, int &mask) : QDialog(parent)
|
||||
SaveMaskExporterDialog::SaveMaskExporterDialog(QWidget *parent, int &mask) : QDialog(parent), mask(mask)
|
||||
{
|
||||
SaveMaskExporterDialog::ui.setupUi(this);
|
||||
connect(ui.okButton, SIGNAL(clicked()), this, SLOT(SlotOkButton()));
|
||||
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(SlotCancelButton()));
|
||||
}
|
||||
|
||||
SaveMaskExporterDialog::SaveMaskExporterDialog(QWidget *parent, int &mask, QString type) : QDialog(parent), mask(mask), type(type)
|
||||
{
|
||||
SaveMaskExporterDialog::ui.setupUi(this);
|
||||
connect(ui.okButton, SIGNAL(clicked()), this, SLOT(SlotOkButton()));
|
||||
connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(SlotCancelButton()));
|
||||
}
|
||||
|
||||
void SaveMaskExporterDialog::Initialize()
|
||||
{
|
||||
if( mask & vcg::tri::io::Mask::IOM_VERTFLAGS ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_VERTCOLOR ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_VERTQUALITY ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_VERTTEXCOORD ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_VERTNORMAL ) {}
|
||||
|
||||
if( mask & vcg::tri::io::Mask::IOM_FACEFLAGS ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_FACECOLOR ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_FACEQUALITY ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_FACENORMAL ) {}
|
||||
|
||||
if( mask & vcg::tri::io::Mask::IOM_WEDGCOLOR ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD ) {}
|
||||
if( mask & vcg::tri::io::Mask::IOM_WEDGNORMAL ) {}
|
||||
|
||||
if( mask & vcg::tri::io::Mask::IOM_CAMERA ) {}
|
||||
}
|
||||
|
||||
int SaveMaskExporterDialog::GetNewMask()
|
||||
{
|
||||
return this->mask;
|
||||
}
|
||||
|
||||
//slot
|
||||
void SaveMaskExporterDialog::SlotOkButton()
|
||||
{
|
||||
int newmask = 0;
|
||||
|
||||
newmask |= vcg::tri::io::Mask::IOM_VERTQUALITY;
|
||||
newmask |= vcg::tri::io::Mask::IOM_FACEQUALITY;
|
||||
|
||||
this->mask=newmask;
|
||||
}
|
||||
|
||||
void SaveMaskExporterDialog::SlotCancelButton()
|
||||
{
|
||||
this->mask=0;
|
||||
}
|
||||
@ -25,6 +25,9 @@
|
||||
History
|
||||
|
||||
$Log$
|
||||
Revision 1.2 2006/01/14 11:23:24 fmazzant
|
||||
update savemask exporter with init a mask [base type]
|
||||
|
||||
Revision 1.1 2006/01/13 23:59:51 fmazzant
|
||||
first commit exporter dialog
|
||||
|
||||
@ -34,6 +37,8 @@
|
||||
#ifndef __VCGLIB_SAVEMASK_EXPORT
|
||||
#define __VCGLIB_SAVEMASK_EXPORT
|
||||
|
||||
#include <wrap/io_trimesh/io_mask.h>
|
||||
|
||||
#include "ui_savemaskexporter.h"
|
||||
|
||||
class SaveMaskExporterDialog : public QDialog
|
||||
@ -42,6 +47,10 @@ class SaveMaskExporterDialog : public QDialog
|
||||
public:
|
||||
SaveMaskExporterDialog(QWidget *parent);
|
||||
SaveMaskExporterDialog(QWidget *parent,int &mask);
|
||||
SaveMaskExporterDialog(QWidget *parent,int &mask,QString type);
|
||||
|
||||
void Initialize();
|
||||
int GetNewMask();
|
||||
|
||||
private slots:
|
||||
void SlotOkButton();
|
||||
@ -49,8 +58,33 @@ private slots:
|
||||
|
||||
private:
|
||||
Ui::MaskExporterDialog ui;
|
||||
int mask;
|
||||
QString type;
|
||||
|
||||
};//end class
|
||||
|
||||
|
||||
namespace vcg {
|
||||
namespace tri {
|
||||
namespace io {
|
||||
|
||||
class SaveMaskToExporter
|
||||
{
|
||||
public:
|
||||
inline static int GetMaskToExporter(int &mask,QString type)
|
||||
{
|
||||
SaveMaskExporterDialog dialog(new QWidget(),mask,type);
|
||||
dialog.Initialize();
|
||||
dialog.exec();
|
||||
int newmask = dialog.GetNewMask();
|
||||
dialog.close();
|
||||
return newmask;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
} // end Namespace tri
|
||||
} // end Namespace io
|
||||
} // end Namespace vcg
|
||||
|
||||
#endif
|
||||
@ -9,7 +9,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>248</height>
|
||||
<height>229</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -25,6 +25,55 @@
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_3" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>10</y>
|
||||
<width>120</width>
|
||||
<height>161</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Wedg</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox" >
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_2" >
|
||||
<property name="text" >
|
||||
<string>TexCoord</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_3" >
|
||||
<property name="text" >
|
||||
<string>TextMulti</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_4" >
|
||||
<property name="text" >
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
@ -37,6 +86,49 @@
|
||||
<property name="title" >
|
||||
<string>Face</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_5" >
|
||||
<property name="text" >
|
||||
<string>Index</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_6" >
|
||||
<property name="text" >
|
||||
<string>Flags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_7" >
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_8" >
|
||||
<property name="text" >
|
||||
<string>Quality</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_9" >
|
||||
<property name="text" >
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox" >
|
||||
<property name="geometry" >
|
||||
@ -50,25 +142,104 @@
|
||||
<property name="title" >
|
||||
<string>Vert</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_10" >
|
||||
<property name="text" >
|
||||
<string>Coord</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_11" >
|
||||
<property name="text" >
|
||||
<string>Flags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_12" >
|
||||
<property name="text" >
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_13" >
|
||||
<property name="text" >
|
||||
<string>Quality</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_14" >
|
||||
<property name="text" >
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_15" >
|
||||
<property name="text" >
|
||||
<string>TextCoord</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_3" >
|
||||
<widget class="QWidget" name="" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>10</y>
|
||||
<x>10</x>
|
||||
<y>180</y>
|
||||
<width>120</width>
|
||||
<height>161</height>
|
||||
<height>46</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Wedg</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_17" >
|
||||
<property name="text" >
|
||||
<string>All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QCheckBox" name="checkBox_18" >
|
||||
<property name="text" >
|
||||
<string>Camera</string>
|
||||
</property>
|
||||
<property name="checkable" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QCheckBox" name="checkBox_16" >
|
||||
<property name="text" >
|
||||
<string>None</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="okButton" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>220</y>
|
||||
<y>200</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
@ -81,7 +252,7 @@
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>220</y>
|
||||
<y>200</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user