Skip to content

Commit

Permalink
iqefilter: Add Quake 3 player export for IQE
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Dec 30, 2023
1 parent 2d2f9c9 commit b820c2d
Show file tree
Hide file tree
Showing 8 changed files with 615 additions and 6 deletions.
23 changes: 23 additions & 0 deletions doc/html/olh_iqeprompt.htm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ <h1>IQE Export Options</h1>
which animations to save.
</p>

<p>
The <b>Save as a Quake 3 Player</b> checkbox allows you indicate
if you want to export as a Quake 3 composite player model
(head.iqe, upper.iqe, and lower.iqe models).
If it is grayed out, see the list of requirements for export on the <a href="olh_quakemd3.html">MD3</a> page.
</p>

<p>
For exporting as a Quake 3 player, there must be a root joint with a desendent torso joint and desendent (of torso joint) head joint. There must be a "tag_torso" point at the exact location of the torso joint and attached to the torso joint. Same for "tag_head" at exact location of head joint and attached to it. The point names must be "tag_torso" and "tag_head", the joint names can be anything. Do not make the root joint be the torso joint; everything will be a desendent of it and there cannot be leg joints.
</p>

<p>
Joints/points that are not a desendents of torso joint are exported in lower.iqe. Torso joint and desendent joints/points to (and including) head joint and "tag_head" point are exported to upper.iqe. Head joint and desendent joints/points are exported to head.iqe.
</p>

<p>
The <b>Save Quake 3 animation.cfg</b> checkbox allows you to indicate
if you want to write "animation.cfg" file along side the model.
This file contains a list of animations with looping and frames
per-second information and can contain other arbitry data from
MD3_CFG_* meta data. See the <a href="olh_quakemd3.html">MD3</a> page for details.
</p>

<p>
The <b>Save Meshes</b> checkbox allows you indicate if you want
the meshes saved in the file or not.
Expand Down
4 changes: 2 additions & 2 deletions doc/html/olh_quakemd3prompt.htm
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ <h1>MD3 Export Options</h1>
</p>

<p>
The <b>Save as a Player Model</b> checkbox allows you indicate
The <b>Save as a Quake 3 Player</b> checkbox allows you indicate
if you want to export as a Quake 3 composite player model
(head.md3, upper.md3, and lower.md3 models).
If it is grayed out, see the list of requirements for export on the MD3 page.
</p>

<p>
The <b>Save animation.cfg</b> checkbox allows you to indicate
The <b>Save Quake 3 animation.cfg</b> checkbox allows you to indicate
if you want to write "animation.cfg" file along side the model.
This file contains a list of animations with looping and frames
per-second information and can contain other arbitry data from
Expand Down
6 changes: 6 additions & 0 deletions src/implui/iqeprompt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ IqePrompt::~IqePrompt()

void IqePrompt::setOptions( IqeFilter::IqeOptions * opts, Model * model )
{
m_saveAsPlayer->setEnabled( opts->m_playerSupported );
m_saveAsPlayer->setChecked( opts->m_saveAsPlayer );
m_saveAnimationCfg->setChecked( opts->m_saveAnimationCfg );
m_saveMeshes->setChecked( opts->m_saveMeshes );
m_savePointsJoint->setChecked( opts->m_savePointsJoint );
m_saveSkeleton->setChecked( opts->m_saveSkeleton );
Expand All @@ -63,6 +66,8 @@ void IqePrompt::setOptions( IqeFilter::IqeOptions * opts, Model * model )

void IqePrompt::getOptions( IqeFilter::IqeOptions * opts )
{
opts->m_saveAsPlayer = m_saveAsPlayer->isChecked();
opts->m_saveAnimationCfg = m_saveAnimationCfg->isChecked();
opts->m_saveMeshes = m_saveMeshes->isChecked();
opts->m_savePointsJoint= m_savePointsJoint->isChecked();
opts->m_saveSkeleton = m_saveSkeleton->isChecked();
Expand Down Expand Up @@ -93,6 +98,7 @@ bool iqeprompt_show( Model * model, const char * const filename, ModelFilter::Op
IqeFilter::IqeOptions * opts = dynamic_cast< IqeFilter::IqeOptions * >( o );
if ( opts )
{
opts->setOptionsFromModel( model, filename );
p.setOptions( opts, model );

if ( p.exec() )
Expand Down
Loading

0 comments on commit b820c2d

Please sign in to comment.