Skip to content
Permalink
Browse files

Add support for exporting Inter-Quake Export (IQE) models

  • Loading branch information...
zturtleman committed Aug 2, 2018
1 parent 1dab1e1 commit 9a82103c0711f7714f061f63ad2558f8654f58f7
@@ -1,4 +1,5 @@
Changes for 1.3.10
Add support for exporting Inter-Quake Export (IQE) models
Fix new/rename material window titles
Move animation Loop setting between FPS and Start/Stop buttons
Don't sort opaque RGBA textures in 3D Alpha Blend view mode
@@ -322,6 +322,7 @@ LIB_OBJ= \
${B}/libmm3d/filefactory.o \
${B}/libmm3d/filtermgr.o \
${B}/libmm3d/glmath.o \
${B}/libmm3d/iqefilter.o \
${B}/libmm3d/log.o \
${B}/libmm3d/lwofilter.o \
${B}/libmm3d/md2filter.o \
@@ -398,6 +399,7 @@ MM3D_UI= \
${B}/qtui/modelview.base.h \
${B}/qtui/newanim.base.h \
${B}/qtui/cal3dprompt.base.h \
${B}/qtui/iqeprompt.base.h \
${B}/qtui/ms3dprompt.base.h \
${B}/qtui/objprompt.base.h \
${B}/qtui/pluginwin.base.h \
@@ -450,6 +452,7 @@ MM3D_MOC= \
${B}/depui/modelviewport.moc.cc \
${B}/implui/newanim.moc.cc \
${B}/implui/cal3dprompt.moc.cc \
${B}/implui/iqeprompt.moc.cc \
${B}/implui/ms3dprompt.moc.cc \
${B}/implui/objprompt.moc.cc \
${B}/implui/pluginwin.moc.cc \
@@ -515,6 +518,7 @@ MM3D_MOC_OBJ= \
${B}/depui/modelviewport.moc.o \
${B}/implui/newanim.moc.o \
${B}/implui/cal3dprompt.moc.o \
${B}/implui/iqeprompt.moc.o \
${B}/implui/ms3dprompt.moc.o \
${B}/implui/objprompt.moc.o \
${B}/implui/pluginwin.moc.o \
@@ -626,6 +630,7 @@ MM3D_OBJ= \
${B}/mm3dcore/pluginmgr.o \
${B}/implui/newanim.o \
${B}/implui/cal3dprompt.o \
${B}/implui/iqeprompt.o \
${B}/implui/ms3dprompt.o \
${B}/implui/objprompt.o \
${B}/implui/pluginwin.o \
@@ -39,6 +39,7 @@ SPAGES = \
olh_cal3dprompt.htm \
olh_ms3dprompt.htm \
olh_objprompt.htm \
olh_iqeprompt.htm \
olh_painttexturewin.htm \
olh_pointwin.htm \
olh_pluginwin.htm \
@@ -94,6 +95,7 @@ PAGES = \
olh_cal3dprompt.html \
olh_ms3dprompt.html \
olh_objprompt.html \
olh_iqeprompt.html \
olh_painttexturewin.html \
olh_pointwin.html \
olh_pluginwin.html \
@@ -183,6 +183,7 @@ <h2>Format-Specific Notes</h2>
</li>
<li> <a href="olh_ms3dprompt.html">MS3D Export Options</a> </li>
<li> <a href="olh_objprompt.html">OBJ Export Options</a> </li>
<li> <a href="olh_iqeprompt.html">IQE Export Options</a> </li>
</ul>
</li>
</ul>
@@ -0,0 +1,49 @@
<h1>IQE Export Options</h1>

<p>
The <b>IQE Export Options</b> window is displayed when you save
a model in Inter-Quake Export (IQE) format. It allows you to specify
things like whether or not to save the bone joints in the file and
which animations to save.
</p>

<p>
The <b>Save Meshes</b> checkbox allows you indicate if you want
the meshes saved in the file or not.
</p>

<p>
The <b>Save Points as Bone Joints</b> checkbox allows you to indicate
if you want the <a href="olh_pointdetails.html">points</a> to be saved
as skeleton bone joints or not at all. Points can only have one bone
joint influence. Points will be saved even if "Save Skeleton" is not
checked.
</p>

<p>
The <b>Save Points in Animations</b> checkbox allows you to indicate
if you want the points saved in animations. Points are not animated.
This is only useful for compatibility with programs that require all
joints to be animated. This only has affect if "Save Animations" is
checked.
</p>

<p>
The <b>Save Skeleton</b> checkbox allows you to indicate if you want
the bone joints saved in the file or not.
</p>

<p>
The <b>Save Animations</b> checkbox allows you to indicate if you want
animations saved in the file or not.
</p>

<p>
The animations list box allows you to specify which animations you want
to be saved in the file.
</p>

<p>
Click <b>Ok</b> to save the model with the specified
options or click <b>Cancel</b> to ignore any changes.
</p>
@@ -0,0 +1,2 @@
PAGE_TITLE=IQE Export Options
PAGE_CONTENT=<olh_iqeprompt.htm
@@ -27,6 +27,7 @@ libimplui_HFILES = \
groupclean.h \
groupwin.h \
helpwin.h \
iqeprompt.h \
jointwin.h \
keycfg.h \
keyvaluewin.h \
@@ -84,6 +85,7 @@ libimplui_MOC = \
groupclean.moc.cc \
groupwin.moc.cc \
helpwin.moc.cc \
iqeprompt.moc.cc \
jointwin.moc.cc \
pointwin.moc.cc \
painttexturewin.moc.cc \
@@ -137,6 +139,7 @@ libimplui_a_SOURCES = \
groupclean.cc \
groupwin.cc \
helpwin.cc \
iqeprompt.cc \
jointwin.cc \
keycfg.cc \
keyvaluewin.cc \
@@ -0,0 +1,111 @@
/* Misfit Model 3D
*
* Copyright (c) 2004-2007 Kevin Worcester
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
* See the COPYING file for full license text.
*/


#include "iqeprompt.h"
#include "iqefilter.h"
#include "model.h"

#include "helpwin.h"

#include <QtWidgets/QSpinBox>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QShortcut>

IqePrompt::IqePrompt()
: QDialog( NULL )
{
setupUi( this );
setModal( true );

QShortcut * help = new QShortcut( QKeySequence( tr("F1", "Help Shortcut")), this );
connect( help, SIGNAL(activated()), this, SLOT(helpNowEvent()) );
}

IqePrompt::~IqePrompt()
{
}

void IqePrompt::setOptions( IqeFilter::IqeOptions * opts, Model * model )
{
m_saveMeshes->setChecked( opts->m_saveMeshes );
m_savePointsJoint->setChecked( opts->m_savePointsJoint );
m_savePointsAnim->setChecked( opts->m_savePointsAnim );
m_saveSkeleton->setChecked( opts->m_saveSkeleton );
m_saveAnimations->setChecked( opts->m_saveAnimations );
m_animList->clear();

unsigned count = model->getAnimCount( Model::ANIMMODE_SKELETAL );
for ( unsigned t = 0; t < count; t++ )
{
m_animList->insertItem( t, QString::fromUtf8( model->getAnimName( Model::ANIMMODE_SKELETAL, t ) ) );
m_animList->item(t)->setSelected( true );
}
}

void IqePrompt::getOptions( IqeFilter::IqeOptions * opts )
{
opts->m_saveMeshes = m_saveMeshes->isChecked();
opts->m_savePointsJoint= m_savePointsJoint->isChecked();
opts->m_savePointsAnim = m_savePointsAnim->isChecked();
opts->m_saveSkeleton = m_saveSkeleton->isChecked();
opts->m_saveAnimations = m_saveAnimations->isChecked();
opts->m_animations.clear();

unsigned count = m_animList->count();
for ( unsigned t = 0; t < count; t++ )
{
if ( m_animList->item( t )->isSelected() )
{
opts->m_animations.push_back( t );
}
}
}

void IqePrompt::helpNowEvent()
{
HelpWin * win = new HelpWin( "olh_iqeprompt.html", true );
win->show();
}

bool iqeprompt_show( Model * model, ModelFilter::Options * o )
{
bool rval = false;
IqePrompt p;

IqeFilter::IqeOptions * opts = dynamic_cast< IqeFilter::IqeOptions * >( o );
if ( opts )
{
p.setOptions( opts, model );

if ( p.exec() )
{
rval = true;
p.getOptions( opts );
}
}
else
{
rval = true;
}
return rval;
}
@@ -0,0 +1,55 @@
/* Misfit Model 3D
*
* Copyright (c) 2004-2007 Kevin Worcester
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*
* See the COPYING file for full license text.
*/


#ifndef __IQEPROMPT_H
#define __IQEPROMPT_H

#include "iqeprompt.base.h"
#include "modelfilter.h"
#include "iqefilter.h"

#include <QtWidgets/QDialog>

class Model;

class IqePrompt : public QDialog, public Ui::IqePromptBase
{
Q_OBJECT

public:
IqePrompt();
virtual ~IqePrompt();

void setOptions( IqeFilter::IqeOptions * o, Model * model );
void getOptions( IqeFilter::IqeOptions * o );

public slots:
void helpNowEvent();

protected:

};

bool iqeprompt_show( Model * model, ModelFilter::Options * o );

#endif // __IQEPROMPT_H
@@ -20,6 +20,7 @@ libmm3d_HFILES = \
filtermgr.h \
glheaders.h \
glmath.h \
iqefilter.h \
local_array.h \
local_ptr.h \
log.h \
@@ -76,6 +77,7 @@ libmm3d_a_SOURCES = \
filefactory.cc \
filtermgr.cc \
glmath.cc \
iqefilter.cc \
log.cc \
lwofilter.cc \
mesh.cc \
Oops, something went wrong.

0 comments on commit 9a82103

Please sign in to comment.
You can’t perform that action at this time.