Commit 0e867cb5 authored by David Llewellyn-Jones's avatar David Llewellyn-Jones

Added option to export animation frames in STL format.

parent 0e7dce55
...@@ -216,6 +216,15 @@ ...@@ -216,6 +216,15 @@
<property name="use_underline">True</property> <property name="use_underline">True</property>
</object> </object>
</child> </child>
<child>
<object class="GtkMenuItem" id="MenuExportAnimSTL">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="label" translatable="yes">STL</property>
<property name="use_underline">True</property>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
......
...@@ -170,8 +170,8 @@ bool ExportModelAnimatedSTL (char const * szFilename, bool boBinary, bool boScre ...@@ -170,8 +170,8 @@ bool ExportModelAnimatedSTL (char const * szFilename, bool boBinary, bool boScre
fTimeIncrement = (fTimeEnd - fTimeStart) / ((double)nFrames); fTimeIncrement = (fTimeEnd - fTimeStart) / ((double)nFrames);
// Create the format for the filename // Create the format for the filename
szFileNameFormat = g_string_new (""); szFileNameFormat = g_string_new ("");
// Format is a decimal integer with EXPORTANIM_FRAMES_EXP digits padded with zeros, followed by .ply // Format is a decimal integer with EXPORTANIM_FRAMES_EXP digits padded with zeros, followed by .stl
g_string_printf (szFileNameFormat, "%%0%dd.ply", EXPORTANIM_FRAMES_EXP); g_string_printf (szFileNameFormat, "%%0%dd.stl", EXPORTANIM_FRAMES_EXP);
szFileIncrement = g_string_new (""); szFileIncrement = g_string_new ("");
fTime = fTimeStart; fTime = fTimeStart;
......
This diff is collapsed.
...@@ -2607,7 +2607,7 @@ bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScr ...@@ -2607,7 +2607,7 @@ bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScr
} }
*/ */
bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData) { bool ExportModelFileAnimatedPLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData) {
bool boSuccess; bool boSuccess;
boSuccess = ExportModelAnimatedPLY (szFilename, boBinary, boScreenCoords, boExportAlpha, fMultiplier, fScale, fTimeStart, fTimeEnd, nFrames, psVisData->psFuncList); boSuccess = ExportModelAnimatedPLY (szFilename, boBinary, boScreenCoords, boExportAlpha, fMultiplier, fScale, fTimeStart, fTimeEnd, nFrames, psVisData->psFuncList);
...@@ -2615,6 +2615,14 @@ bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScr ...@@ -2615,6 +2615,14 @@ bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScr
return boSuccess; return boSuccess;
} }
bool ExportModelFileAnimatedSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData) {
bool boSuccess;
boSuccess = ExportModelAnimatedSTL (szFilename, boBinary, boScreenCoords, fMultiplier, fScale, fTimeStart, fTimeEnd, nFrames, psVisData->psFuncList);
return boSuccess;
}
ControlvarPersist * SetControlVar (char const * const szVarName, char const * const szVarValue, VisPersist * psVisData) { ControlvarPersist * SetControlVar (char const * const szVarName, char const * const szVarValue, VisPersist * psVisData) {
ControlvarPersist * psControlvarData; ControlvarPersist * psControlvarData;
GSList * psControlvarList; GSList * psControlvarList;
......
...@@ -116,7 +116,8 @@ void GetView (float * pfViewRadius, float * pfRotation, float * pfElevation, Vis ...@@ -116,7 +116,8 @@ void GetView (float * pfViewRadius, float * pfRotation, float * pfElevation, Vis
void ScaleFunctionRange (double fScale, VisPersist * psVisData); void ScaleFunctionRange (double fScale, VisPersist * psVisData);
bool ExportModelFilePLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, VisPersist * psVisData); bool ExportModelFilePLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, VisPersist * psVisData);
bool ExportModelFileSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, VisPersist * psVisData); bool ExportModelFileSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, VisPersist * psVisData);
bool ExportModelFileAnimated (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData); bool ExportModelFileAnimatedPLY (char const * szFilename, bool boBinary, bool boScreenCoords, bool boExportAlpha, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData);
bool ExportModelFileAnimatedSTL (char const * szFilename, bool boBinary, bool boScreenCoords, double fMultiplier, double fScale, double fTimeStart, double fTimeEnd, int nFrames, VisPersist * psVisData);
void SetPauseAnimation (bool boPause, VisPersist * psVisData); void SetPauseAnimation (bool boPause, VisPersist * psVisData);
bool GetPauseAnimation (VisPersist * psVisData); bool GetPauseAnimation (VisPersist * psVisData);
ControlvarPersist * SetControlVar (char const * const szVarName, char const * const szVarValue, VisPersist * psVisData); ControlvarPersist * SetControlVar (char const * const szVarName, char const * const szVarValue, VisPersist * psVisData);
......
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