add editor for Raven Software carcass/Assimilate definition files

This commit is contained in:
Michael Becker 2020-09-02 11:55:52 -04:00
parent 2cd8177b65
commit 03aad74804
No known key found for this signature in database
GPG Key ID: 506F54899E2BFED7
13 changed files with 2359 additions and 2 deletions

View File

@ -0,0 +1,994 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjFramestepValue">
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjOriginX">
<property name="lower">-2147483648</property>
<property name="upper">2147483647</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjOriginY">
<property name="lower">-2147483648</property>
<property name="upper">2147483647</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjOriginZ">
<property name="lower">-2147483648</property>
<property name="upper">2147483647</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjSkeletonScale">
<property name="lower">-9.9999999999999996e+30</property>
<property name="upper">1.0000000000000001e+32</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkTreeStore" id="tmModelFiles">
<columns>
<!-- column-name colModelFileFrameStart -->
<column type="gchararray"/>
<!-- column-name colModelFileFrameCount -->
<column type="gchararray"/>
<!-- column-name colModelFileFrameLoop -->
<column type="gchararray"/>
<!-- column-name colModelFileFrameSpeed -->
<column type="gchararray"/>
<!-- column-name colModelFileName -->
<column type="gchararray"/>
<!-- column-name colModelFileAnimation -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkTreeStore" id="tmPCJList">
<columns>
<!-- column-name colPCJListName -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkWindow">
<property name="can_focus">False</property>
<child type="titlebar">
<placeholder/>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkNotebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkToolbar" id="tbModelFiles">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="tsbModelFileAdd">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Add</property>
<property name="label" translatable="yes">_Add</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-add</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbModelFileEdit">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Edit</property>
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-edit</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbModelFileRemove">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Remove</property>
<property name="label" translatable="yes">_Remove</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-remove</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbModelFileMoveUp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Move Up</property>
<property name="label" translatable="yes">Move _Up</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-go-up</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbModelFileMoveDown">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Move Down</property>
<property name="label" translatable="yes">Move _Down</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-go-down</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="lvModelFiles">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">tmModelFiles</property>
<child internal-child="selection">
<object class="GtkTreeSelection">
<property name="mode">multiple</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcModelFileFrameStart">
<property name="resizable">True</property>
<property name="title" translatable="yes">Start</property>
<property name="clickable">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcModelFileFrameCount">
<property name="resizable">True</property>
<property name="title" translatable="yes">Count</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort_column_id">1</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcModelFileFrameLoop">
<property name="resizable">True</property>
<property name="title" translatable="yes">Loop</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort_column_id">2</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcModelFileFrameSpeed">
<property name="resizable">True</property>
<property name="title" translatable="yes">Speed</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort_column_id">3</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcModelFileName">
<property name="resizable">True</property>
<property name="title" translatable="yes">Name</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort_column_id">4</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcModelFileAnimation">
<property name="resizable">True</property>
<property name="title" translatable="yes">Animation</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort_column_id">5</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Model Files</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="row_spacing">8</property>
<property name="column_spacing">8</property>
<child>
<object class="GtkCheckButton" id="chkSkew90">
<property name="label" translatable="yes">Skew 90 (only use this if you REALLY need to, i.e. leave it alone!)</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkSmoothAllSurfaces">
<property name="label" translatable="yes">Smooth all surfaces</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkRemoveDuplicateVertices">
<property name="label" translatable="yes">Remove duplicate vertices from mesh during compile</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkMakeSkinFile">
<property name="label" translatable="yes">Make EF1-type .skin file</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Framestep value</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">( keep only 1/n frames, eg 1 = full, 2 = half, 3 = third )</property>
<property name="xalign">0</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtFramestepValue">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adjFramestepValue</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Origin - Adjust</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkSpinButton" id="txtOriginX">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adjOriginX</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtOriginY">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adjOriginY</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtOriginZ">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adjOriginZ</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">X</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Y</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Z</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
</packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Build Parameters</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="row_spacing">8</property>
<property name="column_spacing">8</property>
<child>
<object class="GtkCheckButton" id="chkMakeSkeleton">
<property name="label" translatable="yes">Makes its own skeleton</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkUseLegacyCompression">
<property name="label" translatable="yes">Uses (older) pre-quaternian animation-compression</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtSkeletonScale">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adjSkeletonScale</property>
<property name="digits">5</property>
<property name="value">1</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lblSkeletonPath">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Path</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">eg "models/players/interrogator/interrogator" ( no extension )</property>
<property name="xalign">0</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lblSkeletonGLAFile">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Optional GLA file to clone bone indices from</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lblSkeletonScale">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Scale</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">( default = 1.0 )</property>
<property name="xalign">0</property>
<attributes>
<attribute name="scale" value="0.80000000000000004"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="fcbSkeletonGLAFile">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">4</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="fcbSkeletonPath">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkKeepMotionBone">
<property name="label" translatable="yes">Keep "motion" bone</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="fraPCJList">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkEntry" id="txtPCJName">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="placeholder_text" translatable="yes">Enter a name and click "Add"</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="tbPCJList">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="tsbPCJListAdd">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Add</property>
<property name="label" translatable="yes">_Add</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-add</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbPCJListRemove">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Remove</property>
<property name="label" translatable="yes">_Remove</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-remove</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbPCJListMoveUp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Move Up</property>
<property name="label" translatable="yes">Move _Up</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-go-up</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="tsbPCJListMoveDown">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Move Down</property>
<property name="label" translatable="yes">Move _Down</property>
<property name="use_underline">True</property>
<property name="stock_id">gtk-go-down</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="lvPCJList">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="model">tmPCJList</property>
<child internal-child="selection">
<object class="GtkTreeSelection">
<property name="mode">multiple</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="tvcPCJListName">
<property name="resizable">True</property>
<property name="title" translatable="yes">Name</property>
<property name="clickable">True</property>
<property name="reorderable">True</property>
<property name="sort_column_id">0</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">PCJ List</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Skeleton</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,320 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkDialog">
<property name="can_focus">False</property>
<property name="title" translatable="yes">Edit Model Reference</property>
<property name="type_hint">dialog</property>
<child type="titlebar">
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="cmdOK">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cmdCancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">File _path</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkFileChooserButton" id="fcbFilePath">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="title" translatable="yes"/>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="ct">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Start</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Master</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Loop Frame</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Frame</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Frame Speed</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Animation Enum</property>
</object>
<packing>
<property name="left_attach">6</property>
<property name="top_attach">0</property>
<property name="width">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkGenLoopFrame">
<property name="label" translatable="yes">GenLoopFrame</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtFrame1">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtLoop1">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtSpeed1">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="txtEnum1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
</object>
<packing>
<property name="left_attach">6</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cmdChoose1">
<property name="label" translatable="yes">Choose</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">7</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cmdClear1">
<property name="label" translatable="yes">Clear</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">8</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="txtStart1">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Sequence</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

View File

@ -306,6 +306,8 @@
<Content Include="Configuration\QuickAccessToolbar.uexml" />
<Content Include="Editors\RavenSoftware\Icarus\IcarusScriptEditor.glade" />
<Content Include="Editors\RavenSoftware\Icarus\Dialogs\IcarusExpressionHelperDialog.glade" />
<Content Include="Editors\RavenSoftware\Carcass\CarcassEditor.glade" />
<Content Include="Editors\RavenSoftware\Carcass\Dialogs\ModelReferencePropertiesDialog.glade" />
</ItemGroup>
<ItemGroup>
<Content Include="Configuration\Application.upl" />
@ -335,6 +337,7 @@
<Folder Include="Editors\Setup\BootstrapScript\" />
<Folder Include="Editors\Database\Views\" />
<Folder Include="Extensions\Amiga\Associations\VectorImage\" />
<Folder Include="Editors\RavenSoftware\Carcass\Dialogs\" />
</ItemGroup>
<ItemGroup>
<Content Include="Templates\Project\Concertroid\Images\Concert.xcf" />

View File

@ -0,0 +1,368 @@
//
// CarcassEditor.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2020 Mike Becker's Software
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
using MBS.Framework.UserInterface;
using MBS.Framework.UserInterface.Controls;
using MBS.Framework.UserInterface.Controls.ListView;
using MBS.Framework.UserInterface.Dialogs;
using UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass;
using UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Carcass.Dialogs;
using UniversalEditor.UserInterface;
namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Carcass
{
[ContainerLayout("~/Editors/RavenSoftware/Carcass/CarcassEditor.glade")]
public class CarcassEditor : Editor
{
private Toolbar tbModelFiles;
private ListViewControl lvModelFiles;
private CheckBox chkSkew90;
private CheckBox chkSmoothAllSurfaces;
private CheckBox chkRemoveDuplicateVertices;
private CheckBox chkMakeSkinFile;
private CheckBox chkKeepMotionBone;
private NumericTextBox txtFramestepValue;
private NumericTextBox txtOriginX;
private NumericTextBox txtOriginY;
private NumericTextBox txtOriginZ;
private CheckBox chkMakeSkeleton;
private CheckBox chkUseLegacyCompression;
private FileChooserButton fcbSkeletonPath;
private FileChooserButton fcbSkeletonGLAFile;
private NumericTextBox txtSkeletonScale;
private Toolbar tbPCJList;
private ListViewControl lvPCJList;
private TextBox txtPCJName;
private Label lblSkeletonPath;
private Label lblSkeletonGLAFile;
private Label lblSkeletonScale;
private Container fraPCJList;
private static EditorReference _er = null;
public override EditorReference MakeReference()
{
if (_er == null)
{
_er = base.MakeReference();
_er.SupportedObjectModels.Add(typeof(CarcassObjectModel));
}
return _er;
}
protected override void OnCreated(EventArgs e)
{
base.OnCreated(e);
fcbSkeletonPath.RequireExistingFile = false;
fcbSkeletonGLAFile.RequireExistingFile = false;
chkMakeSkinFile.Changed += chk_Changed;
chkKeepMotionBone.Changed += chk_Changed;
chkSmoothAllSurfaces.Changed += chk_Changed;
chkUseLegacyCompression.Changed += chk_Changed;
chkRemoveDuplicateVertices.Changed += chk_Changed;
txtOriginX.Changed += txtOrigin_Changed;
txtOriginY.Changed += txtOrigin_Changed;
txtOriginZ.Changed += txtOrigin_Changed;
(tbModelFiles.Items["tsbModelFileAdd"] as ToolbarItemButton).Click += tsbModelFileAdd_Click;
(tbModelFiles.Items["tsbModelFileEdit"] as ToolbarItemButton).Click += tsbModelFileEdit_Click;
(tbModelFiles.Items["tsbModelFileRemove"] as ToolbarItemButton).Click += tsbModelFileRemove_Click;
(tbModelFiles.Items["tsbModelFileMoveUp"] as ToolbarItemButton).Click += tsbModelFileMoveUp_Click;
(tbModelFiles.Items["tsbModelFileMoveDown"] as ToolbarItemButton).Click += tsbModelFileMoveDown_Click;
(tbPCJList.Items["tsbPCJListAdd"] as ToolbarItemButton).Click += tsbPCJListAdd_Click;
(tbPCJList.Items["tsbPCJListRemove"] as ToolbarItemButton).Click += tsbPCJListRemove_Click;
(tbPCJList.Items["tsbPCJListMoveUp"] as ToolbarItemButton).Click += tsbPCJListMoveUp_Click;
(tbPCJList.Items["tsbPCJListMoveDown"] as ToolbarItemButton).Click += tsbPCJListMoveDown_Click;
OnObjectModelChanged(e);
}
private void tsbPCJListAdd_Click(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
if (txtPCJName.Text == String.Empty)
{
MessageDialog.ShowDialog("Please enter a name for the PCJ to add it to the list!", "Missing PCJ Name", MessageDialogButtons.OK, MessageDialogIcon.Error);
return;
}
BeginEdit();
lvPCJList.Model.Rows.Add(new TreeModelRow(new TreeModelRowColumn[]
{
new TreeModelRowColumn(lvPCJList.Model.Columns[0], txtPCJName.Text)
}));
car.PCJ.Add(txtPCJName.Text);
txtPCJName.Text = String.Empty;
EndEdit();
}
private void tsbPCJListRemove_Click(object sender, EventArgs e)
{
if (lvPCJList.SelectedRows.Count > 0)
{
// FIXME: this CRASHES!!! in GTK native code: "gtk_tree_store_remove: assertion failed (parent != NULL)"
for (int i = 0; i < lvPCJList.SelectedRows.Count; i++)
{
lvPCJList.Model.Rows.Remove(lvPCJList.SelectedRows[i]);
}
}
}
private void tsbPCJListMoveUp_Click(object sender, EventArgs e)
{
}
private void tsbPCJListMoveDown_Click(object sender, EventArgs e)
{
}
[EventHandler(nameof(chkMakeSkeleton), "Changed")]
private void chkMakeSkeleton_Changed(object sender, EventArgs e)
{
bool enabled = chkMakeSkeleton.Checked;
chkUseLegacyCompression.Enabled = enabled;
lblSkeletonPath.Enabled = enabled;
fcbSkeletonPath.Enabled = enabled;
lblSkeletonGLAFile.Enabled = enabled;
fcbSkeletonGLAFile.Enabled = enabled;
lblSkeletonScale.Enabled = enabled;
txtSkeletonScale.Enabled = enabled;
chkKeepMotionBone.Enabled = enabled;
// fraPCJList.Enabled = enabled;
tbPCJList.Enabled = enabled;
lvPCJList.Enabled = enabled;
}
private void tsbModelFileAdd_Click(object sender, EventArgs e)
{
ModelReference mr = lvModelFiles.SelectedRows[0].GetExtraData<ModelReference>("model");
ModelReferencePropertiesDialog dlg = new ModelReferencePropertiesDialog();
if (dlg.ShowDialog() == DialogResult.OK)
{
ModelReference ase = new ModelReference();
ase.FileName = dlg.SelectedFileName;
BeginEdit();
EndEdit();
}
}
private void tsbModelFileEdit_Click(object sender, EventArgs e)
{
if (lvModelFiles.SelectedRows.Count != 1)
{
MessageDialog.ShowDialog("Please select EXACTLY ONE item to edit!", "Invalid Selection", MessageDialogButtons.OK, MessageDialogIcon.Error);
return;
}
ModelReference mr = lvModelFiles.SelectedRows[0].GetExtraData<ModelReference>("model");
ModelReferencePropertiesDialog dlg = new ModelReferencePropertiesDialog();
dlg.Item = mr;
if (dlg.ShowDialog() == DialogResult.OK)
{
BeginEdit();
EndEdit();
}
}
private void tsbModelFileRemove_Click(object sender, EventArgs e)
{
}
private void tsbModelFileMoveUp_Click(object sender, EventArgs e)
{
}
private void tsbModelFileMoveDown_Click(object sender, EventArgs e)
{
}
[EventHandler(nameof(lvModelFiles), "RowActivated")]
private void lvModelFiles_RowActivated(object sender, ListViewRowActivatedEventArgs e)
{
tsbModelFileEdit_Click(sender, e);
}
[EventHandler(nameof(fcbSkeletonPath), "Changed")]
private void fcbSkeletonPath_Changed(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
BeginEdit();
car.SkeletonFileName = fcbSkeletonPath.SelectedFileName;
EndEdit();
}
[EventHandler(nameof(fcbSkeletonGLAFile), "Changed")]
private void fcbSkeletonGLAFile_Changed(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
BeginEdit();
car.GLAFileName = fcbSkeletonGLAFile.SelectedFileName;
EndEdit();
}
protected override void OnObjectModelChanged(EventArgs e)
{
base.OnObjectModelChanged(e);
if (!IsCreated) return;
lvModelFiles.Model.Rows.Clear();
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
chkSmoothAllSurfaces.Checked = car.SmoothAllSurfaces;
chkRemoveDuplicateVertices.Checked = car.RemoveDuplicateVertices;
chkMakeSkinFile.Checked = car.MakeSkin;
chkMakeSkeleton.Checked = (car.SkeletonFileName != null);
chkKeepMotionBone.Checked = car.KeepMotionBone;
_inhibit_txtOrigin_Changed = true;
txtOriginX.Value = car.Origin.X;
txtOriginY.Value = car.Origin.Y;
txtOriginZ.Value = car.Origin.Z;
_inhibit_txtOrigin_Changed = false;
chkUseLegacyCompression.Checked = car.UseLegacyCompression;
txtSkeletonScale.Value = car.Scale;
fcbSkeletonPath.SelectedFileName = car.SkeletonFileName;
fcbSkeletonGLAFile.SelectedFileName = car.GLAFileName;
int frameStart = 0, frameCount = 250;
for (int i = 0; i < car.ModelReferences.Count; i++)
{
ModelReference mr = car.ModelReferences[i];
string modelName = System.IO.Path.GetFileNameWithoutExtension(mr.FileName).ToUpper();
string enumName = mr.EnumName;
TreeModelRow row = new TreeModelRow(new TreeModelRowColumn[]
{
new TreeModelRowColumn(lvModelFiles.Model.Columns[0], frameStart),
new TreeModelRowColumn(lvModelFiles.Model.Columns[1], frameCount),
new TreeModelRowColumn(lvModelFiles.Model.Columns[2], mr.LoopCount),
new TreeModelRowColumn(lvModelFiles.Model.Columns[3], mr.FrameSpeed),
new TreeModelRowColumn(lvModelFiles.Model.Columns[4], modelName),
new TreeModelRowColumn(lvModelFiles.Model.Columns[5], enumName ?? String.Format("( (BAD: {0}) )", modelName))
});
row.SetExtraData<ModelReference>("model", mr);
lvModelFiles.Model.Rows.Add(row);
frameStart += frameCount;
}
for (int i = 0; i < car.PCJ.Count; i++)
{
TreeModelRow row = new TreeModelRow(new TreeModelRowColumn[]
{
new TreeModelRowColumn(lvPCJList.Model.Columns[0], car.PCJ[i])
});
row.SetExtraData<int>("index", i);
lvPCJList.Model.Rows.Add(row);
}
}
private void chk_Changed(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
CheckBox chk = (sender as CheckBox);
BeginEdit();
if (chk == chkMakeSkinFile)
{
car.MakeSkin = chk.Checked;
}
else if (chk == chkKeepMotionBone)
{
car.KeepMotionBone = chk.Checked;
}
else if (chk == chkSmoothAllSurfaces)
{
car.SmoothAllSurfaces = chk.Checked;
}
else if (chk == chkUseLegacyCompression)
{
car.UseLegacyCompression = chk.Checked;
}
else if (chk == chkRemoveDuplicateVertices)
{
car.RemoveDuplicateVertices = chk.Checked;
}
EndEdit();
}
private bool _inhibit_txtOrigin_Changed = false;
private void txtOrigin_Changed(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
if (_inhibit_txtOrigin_Changed) return;
BeginEdit();
car.Origin = new PositionVector3(txtOriginX.Value, txtOriginY.Value, txtOriginZ.Value);
EndEdit();
}
[EventHandler(nameof(txtFramestepValue), "Changed")]
private void txtFramestepValue_Changed(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
BeginEdit();
car.Framestep = (int)txtFramestepValue.Value;
EndEdit();
}
[EventHandler(nameof(txtSkeletonScale), "Changed")]
private void txtSkeletonScale_Changed(object sender, EventArgs e)
{
CarcassObjectModel car = (ObjectModel as CarcassObjectModel);
if (car == null) return;
BeginEdit();
car.Scale = txtSkeletonScale.Value;
EndEdit();
}
public override void UpdateSelections()
{
}
protected override Selection CreateSelectionInternal(object content)
{
throw new NotImplementedException();
}
}
}

View File

@ -0,0 +1,142 @@
//
// ModelReferencePropertiesDialog.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2020 Mike Becker's Software
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
using MBS.Framework.UserInterface;
using MBS.Framework.UserInterface.Controls;
using MBS.Framework.UserInterface.Layouts;
using UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass;
namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Carcass.Dialogs
{
[ContainerLayout("~/Editors/RavenSoftware/Carcass/Dialogs/ModelReferencePropertiesDialog.glade")]
public class ModelReferencePropertiesDialog : CustomDialog
{
private Button cmdCancel;
private Button cmdOK;
private Container ct;
private FileChooserButton fcbFilePath;
private NumericTextBox txtStart1;
private NumericTextBox txtFrame1;
private NumericTextBox txtLoop1;
private NumericTextBox txtSpeed1;
private TextBox txtEnum1;
private Button cmdChoose1;
private Button cmdClear1;
private NumericTextBox[] txtStart = new NumericTextBox[MAX_ITEMS];
private NumericTextBox[] txtFrame = new NumericTextBox[MAX_ITEMS];
private NumericTextBox[] txtLoop = new NumericTextBox[MAX_ITEMS];
private NumericTextBox[] txtSpeed = new NumericTextBox[MAX_ITEMS];
private TextBox[] txtEnum = new TextBox[MAX_ITEMS];
private Button[] cmdChoose = new Button[MAX_ITEMS];
private Button[] cmdClear = new Button[MAX_ITEMS];
public string SelectedFileName { get; set; } = null;
public ModelReference Item { get; set; } = null;
private const int MAX_ITEMS = 18;
protected override void OnCreated(EventArgs e)
{
base.OnCreated(e);
fcbFilePath.RequireExistingFile = false;
DefaultButton = cmdOK;
txtStart[0] = txtStart1;
txtFrame[0] = txtFrame1;
txtLoop[0] = txtLoop1;
txtSpeed[0] = txtSpeed1;
txtEnum[0] = txtEnum1;
txtEnum[0].Editable = false;
cmdChoose[0] = cmdChoose1;
cmdClear[0] = cmdClear1;
for (int i = 1; i < MAX_ITEMS; i++)
{
Label lblAdditional = new Label();
lblAdditional.Text = "Additional " + i.ToString();
ct.Controls.Add(lblAdditional, new GridLayout.Constraints(i + 2, 0, 1, 1));
txtStart[i] = new NumericTextBox();
txtStart[i].Enabled = false;
ct.Controls.Add(txtStart[i], new GridLayout.Constraints(i + 2, 1, 1, 1));
txtFrame[i] = new NumericTextBox();
txtFrame[i].Enabled = false;
ct.Controls.Add(txtFrame[i], new GridLayout.Constraints(i + 2, 2, 1, 1));
txtLoop[i] = new NumericTextBox();
txtLoop[i].Enabled = false;
ct.Controls.Add(txtLoop[i], new GridLayout.Constraints(i + 2, 3, 1, 1));
txtSpeed[i] = new NumericTextBox();
txtSpeed[i].Enabled = false;
ct.Controls.Add(txtSpeed[i], new GridLayout.Constraints(i + 2, 4, 1, 1));
txtEnum[i] = new TextBox();
txtEnum[i].Enabled = false;
ct.Controls.Add(txtEnum[i], new GridLayout.Constraints(i + 2, 6, 1, 1));
cmdChoose[i] = new Button();
cmdChoose[i].Text = "Choose";
cmdChoose[i].Enabled = false;
ct.Controls.Add(cmdChoose[i], new GridLayout.Constraints(i + 2, 7, 1, 1));
cmdClear[i] = new Button();
cmdClear[i].Text = "Clear";
cmdClear[i].Enabled = false;
ct.Controls.Add(cmdClear[i], new GridLayout.Constraints(i + 2, 8, 1, 1));
if (Item != null)
{
fcbFilePath.SelectedFileName = Item.FileName;
if (i - 1 < Item.AdditionalFrames.Count)
{
txtStart[i].Enabled = true;
txtStart[i].Value = Item.AdditionalFrames[i - 1].Target;
txtFrame[i].Enabled = true;
txtFrame[i].Value = Item.AdditionalFrames[i - 1].Count;
txtLoop[i].Enabled = true;
txtLoop[i].Value = Item.AdditionalFrames[i - 1].Loop;
txtSpeed[i].Enabled = true;
txtSpeed[i].Value = Item.AdditionalFrames[i - 1].Speed;
txtEnum[i].Enabled = true;
txtEnum[i].Editable = false;
txtEnum[i].Text = Item.AdditionalFrames[i - 1].Animation;
cmdChoose[i].Enabled = true;
cmdClear[i].Enabled = true;
}
}
}
}
}
}

View File

@ -28,7 +28,7 @@ using MBS.Framework.UserInterface;
using MBS.Framework.UserInterface.Controls;
using MBS.Framework.UserInterface.Controls.ListView;
using MBS.Framework.UserInterface.Dialogs;
using UniversalEditor.DataFormats.Icarus;
using UniversalEditor.ObjectModels.Icarus;
using UniversalEditor.ObjectModels.Icarus.Commands;
using UniversalEditor.ObjectModels.Icarus.Expressions;
@ -344,7 +344,7 @@ namespace UniversalEditor.Plugins.RavenSoftware.UserInterface.Editors.Icarus
IcarusScriptObjectModel script = (ObjectModel as IcarusScriptObjectModel);
IcarusScriptObjectModel icarus = new IcarusScriptObjectModel();
DataFormats.Icarus.IcarusTextDataFormat ictxt = new DataFormats.Icarus.IcarusTextDataFormat();
IcarusTextDataFormat ictxt = new IcarusTextDataFormat();
Document.Load(icarus, ictxt, new Accessors.FileAccessor(dlg.SelectedFileName));
int start = script.Commands.Count;

View File

@ -38,12 +38,16 @@
<Compile Include="Editors\Icarus\IcarusScriptEditorConfiguration.cs" />
<Compile Include="Editors\Icarus\IcarusScriptEditorCommand.cs" />
<Compile Include="SettingsProviders\IcarusSettingsProvider.cs" />
<Compile Include="Editors\Carcass\CarcassEditor.cs" />
<Compile Include="Editors\Carcass\Dialogs\ModelReferencePropertiesDialog.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controls\" />
<Folder Include="Dialogs\" />
<Folder Include="Editors\" />
<Folder Include="SettingsProviders\" />
<Folder Include="Editors\Carcass\" />
<Folder Include="Editors\Carcass\Dialogs\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\MBS.Framework\MBS.Framework\MBS.Framework.csproj">
@ -70,6 +74,14 @@
<Project>{B2DFA94A-A468-48A1-AB31-04EE432E7B2B}</Project>
<Name>UniversalEditor.Plugins.RavenSoftware</Name>
</ProjectReference>
<ProjectReference Include="..\..\Plugins\UniversalEditor.Plugins.Multimedia\UniversalEditor.Plugins.Multimedia.csproj">
<Project>{BE4D0BA3-0888-42A5-9C09-FC308A4509D2}</Project>
<Name>UniversalEditor.Plugins.Multimedia</Name>
</ProjectReference>
<ProjectReference Include="..\..\Plugins\UniversalEditor.Plugins.Multimedia3D\UniversalEditor.Plugins.Multimedia3D.csproj">
<Project>{4FD9DB1D-76AA-48D1-8446-95376C4A2BC2}</Project>
<Name>UniversalEditor.Plugins.Multimedia3D</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<UniversalEditor Version="4.0">
<Associations>
<Association>
<Filters>
<Filter Title="Assimilate/Carcass text script">
<FileNameFilters>
<FileNameFilter>*.car</FileNameFilter>
</FileNameFilters>
<MagicByteSequences>
<MagicByteSequence>
<MagicByte Type="String">$aseanimgrabinit</MagicByte>
</MagicByteSequence>
</MagicByteSequences>
</Filter>
</Filters>
<ObjectModels>
<ObjectModel TypeName="UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass.CarcassObjectModel" />
</ObjectModels>
<DataFormats>
<DataFormat TypeName="UniversalEditor.Plugins.RavenSoftware.DataFormats.Carcass.Text.CarcassTextDataFormat" />
</DataFormats>
</Association>
</Associations>
</UniversalEditor>

View File

@ -0,0 +1,250 @@
//
// CarcassTextDataFormat.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2020 Mike Becker's Software
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
using UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass;
namespace UniversalEditor.Plugins.RavenSoftware.DataFormats.Carcass.Text
{
public class CarcassTextDataFormat : DataFormat
{
private static DataFormatReference _dfr = null;
protected override DataFormatReference MakeReferenceInternal()
{
if (_dfr == null)
{
_dfr = base.MakeReferenceInternal();
_dfr.Capabilities.Add(typeof(CarcassObjectModel), DataFormatCapabilities.All);
}
return _dfr;
}
protected override void LoadInternal(ref ObjectModel objectModel)
{
CarcassObjectModel car = (objectModel as CarcassObjectModel);
if (car == null)
throw new ObjectModelNotSupportedException();
IO.Reader reader = Accessor.Reader;
string signature = reader.ReadLine();
if (signature != "$aseanimgrabinit")
throw new InvalidDataFormatException("file does not begin with '$aseanimgrabinit' ");
while (!reader.EndOfStream)
{
string line = reader.ReadLine();
if (line.Equals("$keepmotion"))
{
car.KeepMotionBone = true;
}
else if (line.StartsWith("$scale "))
{
car.Scale = Double.Parse(line.Substring("$scale ".Length));
}
else if (line.StartsWith("$aseanimref_gla "))
{
car.GLAFileName = line.Substring("$aseanimref_gla ".Length);
}
else if (line.StartsWith("$pcj "))
{
car.PCJ.Add(line.Substring("$pcj ".Length));
}
else if (line.StartsWith("$aseanimgrab "))
{
ModelReference ase = new ModelReference();
string filenameAndParms = line.Substring("$aseanimgrab ".Length);
string filenameOnly = filenameAndParms;
string parmsOnly = String.Empty;
if (filenameAndParms.IndexOf(' ') != -1)
{
filenameOnly = filenameAndParms.Substring(0, filenameAndParms.IndexOf(' '));
parmsOnly = filenameAndParms.Substring(filenameAndParms.IndexOf(' ') + 1);
}
ase.FileName = filenameOnly;
if (filenameOnly.EndsWith(".xsi"))
ase.FrameSpeed = ModelReference.DEFAULT_FRAMESPEED_XSI; // weird
string[] parms = parmsOnly.Split(new char[] { ' ' });
for (int i = 0; i < parms.Length; i++)
{
if (parms[i].Equals("-loop"))
{
ase.LoopCount = Int32.Parse(parms[i + 1]);
}
if (parms[i].Equals("-framespeed"))
{
ase.FrameSpeed = Int32.Parse(parms[i + 1]);
}
if (parms[i] == "-genloopframe")
{
ase.GenerateLoopFrame = true;
}
if (parms[i] == "-prequat")
{
car.UseLegacyCompression = true;
}
if (parms[i].Equals("-enum"))
{
ase.EnumName = parms[i + 1];
}
if (parms[i].Equals("-additional"))
{
if (i + 5 < parms.Length)
{
CarcassFrame addlFrame = new CarcassFrame();
addlFrame.Target = Int32.Parse(parms[i + 1]);
addlFrame.Count = Int32.Parse(parms[i + 2]);
addlFrame.Loop = Int32.Parse(parms[i + 3]);
addlFrame.Speed = Int32.Parse(parms[i + 4]);
addlFrame.Animation = parms[i + 5];
ase.AdditionalFrames.Add(addlFrame);
}
}
}
car.ModelReferences.Add(ase);
}
else if (line.StartsWith("$aseanimconvertmdx_noask "))
{
string filenameAndParms = line.Substring("$aseanimconvertmdx_noask ".Length);
string filenameOnly = filenameAndParms;
string parmsOnly = String.Empty;
if (filenameAndParms.IndexOf(' ') != -1)
{
filenameOnly = filenameAndParms.Substring(0, filenameAndParms.IndexOf(' '));
parmsOnly = filenameAndParms.Substring(filenameAndParms.IndexOf(' ') + 1);
}
car.BasePath = filenameOnly;
string[] parms = parmsOnly.Split(new char[] { ' ' });
for (int i = 0; i < parms.Length; i++)
{
if (parms[i] == "-makeskin")
{
car.MakeSkin = true;
}
if (parms[i] == "-smooth")
{
car.SmoothAllSurfaces = true;
}
if (parms[i] == "-losedupverts")
{
car.RemoveDuplicateVertices = true;
}
if (parms[i].Equals("-makeskel"))
{
car.SkeletonFileName = parms[i + 1];
}
if (parms[i].Equals("-origin"))
{
if (i + 3 < parms.Length)
{
car.Origin = new PositionVector3(Double.Parse(parms[i + 1]), Double.Parse(parms[i + 2]), Double.Parse(parms[i + 3]));
}
}
}
}
}
}
protected override void SaveInternal(ObjectModel objectModel)
{
CarcassObjectModel car = (objectModel as CarcassObjectModel);
if (car == null)
throw new ObjectModelNotSupportedException();
IO.Writer writer = Accessor.Writer;
writer.WriteLine("$aseanimgrabinit");
if (car.Scale != 1.0)
{
writer.WriteLine(String.Format("$scale {0}", car.Scale));
}
if (car.KeepMotionBone)
{
writer.WriteLine("$keepmotion");
}
if (car.GLAFileName != null)
{
writer.Write("$aseanimref_gla ");
writer.WriteLine(car.GLAFileName);
}
for (int i = 0; i < car.PCJ.Count; i++)
{
writer.WriteLine(String.Format("$pcj {0}", car.PCJ[i]));
}
for (int i = 0; i < car.ModelReferences.Count; i++)
{
writer.Write(String.Format("$aseanimgrab {0}", car.ModelReferences[i].FileName));
writer.Write(String.Format(" -loop {0}", car.ModelReferences[i].LoopCount));
if (car.ModelReferences[i].EnumName != null)
{
writer.Write(String.Format(" -enum {0}", car.ModelReferences[i].EnumName));
}
if ((!(car.ModelReferences[i].FileName?.ToLower()?.EndsWith(".xsi")).GetValueOrDefault() && car.ModelReferences[i].FrameSpeed != ModelReference.DEFAULT_FRAMESPEED) ||
((car.ModelReferences[i].FileName?.ToLower()?.EndsWith(".xsi")).GetValueOrDefault() && car.ModelReferences[i].FrameSpeed != ModelReference.DEFAULT_FRAMESPEED_XSI))
{
writer.Write(String.Format(" -framespeed {0}", car.ModelReferences[i].FrameSpeed));
}
if (car.ModelReferences[i].GenerateLoopFrame)
{
writer.Write(" -genloopframe");
}
if (i == 0)
{
if (car.UseLegacyCompression)
{
writer.Write(" -qdskipstart -prequat -qdskipstop");
}
}
writer.WriteLine();
}
writer.WriteLine("$aseanimgrabfinalize");
writer.Write(String.Format("$aseanimconvertmdx_noask {0}", car.BasePath));
if (car.MakeSkin)
{
writer.Write(" -makeskin");
}
if (car.SmoothAllSurfaces)
{
writer.Write(" -smooth");
}
if (car.RemoveDuplicateVertices)
{
writer.Write(" -losedupverts");
}
if (car.SkeletonFileName != null)
{
writer.Write(" -makeskel ");
writer.Write(car.SkeletonFileName);
}
if (car.Origin != PositionVector3.Empty)
{
writer.Write(String.Format(" -origin {0} {1} {2}", car.Origin.X, car.Origin.Y, car.Origin.Z));
}
}
}
}

View File

@ -0,0 +1,49 @@
//
// CarcassFrame.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2020 Mike Becker's Software
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
namespace UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass
{
public class CarcassFrame : ICloneable
{
public class CarcassFrameCollection
: System.Collections.ObjectModel.Collection<CarcassFrame>
{
}
public int Target { get; set; }
public int Count { get; set; }
public int Loop { get; set; } = -1;
public int Speed { get; set; } = 1;
public string Animation { get; set; } = null;
public object Clone()
{
CarcassFrame clone = new CarcassFrame();
clone.Target = Target;
clone.Count = Count;
clone.Loop = Loop;
clone.Speed = Speed;
clone.Animation = (Animation?.Clone() as string);
return clone;
}
}
}

View File

@ -0,0 +1,117 @@
//
// CarcassObjectModel.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2020 Mike Becker's Software
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
namespace UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass
{
public class CarcassObjectModel : ObjectModel
{
public CarcassObjectModel()
{
}
public ModelReference.ModelReferenceCollection ModelReferences { get; } = new ModelReference.ModelReferenceCollection();
public string BasePath { get; set; }
public bool MakeSkin { get; set; } = false;
/// <summary>
/// Gets or sets the scale at which the skeleton should be made when <see cref="MakeSkeleton"/> is <c>true</c>.
/// </summary>
/// <value>The scale.</value>
public double Scale { get; set; } = 1.0;
/// <summary>
/// Gets or sets the name of the Ghoul2 animation (GLA) file from which to clone bone indices.
/// </summary>
/// <value>The name of the Ghoul2 animation (GLA) file from which to clone bone indices.</value>
public string GLAFileName { get; set; } = null;
/// <summary>
/// Gets or sets a value indicating whether this <see cref="CarcassObjectModel"/> keep motion bone.
/// </summary>
/// <value><c>true</c> if keep motion bone; otherwise, <c>false</c>.</value>
public bool KeepMotionBone { get; set; } = false;
/// <summary>
/// Gets or sets a value indicating whether this <see cref="CarcassObjectModel"/> smooth all surfaces.
/// </summary>
/// <value><c>true</c> if smooth all surfaces; otherwise, <c>false</c>.</value>
public bool SmoothAllSurfaces { get; set; } = false;
/// <summary>
/// Gets or sets a value indicating whether duplicate vertices should be removed when compiling this <see cref="CarcassObjectModel"/>.
/// </summary>
/// <value><c>true</c> if duplicate vertices should be removed; otherwise, <c>false</c>.</value>
public bool RemoveDuplicateVertices { get; set; } = false;
public PositionVector3 Origin { get; set; } = PositionVector3.Empty;
/// <summary>
/// Gets the pcj.
/// </summary>
/// <value>The pcj.</value>
public System.Collections.Specialized.StringCollection PCJ { get; } = new System.Collections.Specialized.StringCollection();
/// <summary>
/// Gets or sets a value indicating whether this <see cref="CarcassObjectModel"/> uses (older) pre-quaternian animation-compression.
/// </summary>
/// <value><c>true</c> if (older) pre-quaternian animation-compression should be used; otherwise, <c>false</c>.</value>
public bool UseLegacyCompression { get; set; } = false;
public string SkeletonFileName { get; set; } = null;
public int Framestep { get; set; } = 1;
public override void Clear()
{
ModelReferences.Clear();
BasePath = null;
MakeSkin = false;
Scale = 1.0;
GLAFileName = null;
KeepMotionBone = false;
SmoothAllSurfaces = false;
RemoveDuplicateVertices = false;
Origin = PositionVector3.Empty;
UseLegacyCompression = false;
SkeletonFileName = null;
Framestep = 1;
}
public override void CopyTo(ObjectModel where)
{
CarcassObjectModel clone = (where as CarcassObjectModel);
if (clone == null) throw new ObjectModelNotSupportedException();
for (int i = 0; i < ModelReferences.Count; i++)
{
clone.ModelReferences.Add(ModelReferences[i].Clone() as ModelReference);
}
clone.BasePath = (BasePath?.Clone() as string);
clone.MakeSkin = MakeSkin;
clone.Scale = Scale;
clone.GLAFileName = (GLAFileName?.Clone() as string);
clone.KeepMotionBone = KeepMotionBone;
clone.SmoothAllSurfaces = SmoothAllSurfaces;
clone.RemoveDuplicateVertices = RemoveDuplicateVertices;
clone.Origin = (PositionVector3)Origin.Clone();
for (int i = 0; i < PCJ.Count; i++)
{
clone.PCJ.Add(PCJ[i].Clone() as string);
}
clone.UseLegacyCompression = UseLegacyCompression;
clone.SkeletonFileName = (SkeletonFileName?.Clone() as string);
clone.Framestep = Framestep;
}
}
}

View File

@ -0,0 +1,61 @@
//
// ModelReference.cs
//
// Author:
// Michael Becker <alcexhim@gmail.com>
//
// Copyright (c) 2020 Mike Becker's Software
//
// 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 3 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, see <http://www.gnu.org/licenses/>.
using System;
namespace UniversalEditor.Plugins.RavenSoftware.ObjectModels.Carcass
{
public class ModelReference : ICloneable
{
public class ModelReferenceCollection
: System.Collections.ObjectModel.Collection<ModelReference>
{
}
public string FileName { get; set; } = null;
public int LoopCount { get; set; } = -1;
public bool GenerateLoopFrame { get; set; } = false;
public int FrameSpeed { get; set; } = DEFAULT_FRAMESPEED;
public string EnumName { get; set; } = null;
public CarcassFrame.CarcassFrameCollection AdditionalFrames { get; } = new CarcassFrame.CarcassFrameCollection();
public const int MAX_FRAMESPEED = 26083348;
public const int DEFAULT_FRAMESPEED = MAX_FRAMESPEED;
public const int DEFAULT_FRAMESPEED_XSI = 20;
public object Clone()
{
ModelReference clone = new ModelReference();
clone.FileName = (FileName.Clone() as string);
clone.LoopCount = LoopCount;
clone.GenerateLoopFrame = GenerateLoopFrame;
clone.FrameSpeed = FrameSpeed;
clone.EnumName = (EnumName?.Clone() as string);
for (int i = 0; i < AdditionalFrames.Count; i++)
{
clone.AdditionalFrames.Add(AdditionalFrames[i].Clone() as CarcassFrame);
}
return clone;
}
}
}

View File

@ -83,6 +83,10 @@
<Compile Include="ObjectModels\Icarus\Commands\IcarusCommandIf.cs" />
<Compile Include="ObjectModels\Icarus\Commands\IcarusCommandPlay.cs" />
<Compile Include="ObjectModels\Icarus\Commands\IcarusCommandRem.cs" />
<Compile Include="ObjectModels\Carcass\CarcassObjectModel.cs" />
<Compile Include="DataFormats\Carcass\Text\CarcassTextDataFormat.cs" />
<Compile Include="ObjectModels\Carcass\ModelReference.cs" />
<Compile Include="ObjectModels\Carcass\CarcassFrame.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
@ -106,14 +110,26 @@
<Project>{00266B21-35C9-4A7F-A6BA-D54D7FDCC25C}</Project>
<Name>MBS.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\UniversalEditor.Plugins.Multimedia\UniversalEditor.Plugins.Multimedia.csproj">
<Project>{BE4D0BA3-0888-42A5-9C09-FC308A4509D2}</Project>
<Name>UniversalEditor.Plugins.Multimedia</Name>
</ProjectReference>
<ProjectReference Include="..\UniversalEditor.Plugins.Multimedia3D\UniversalEditor.Plugins.Multimedia3D.csproj">
<Project>{4FD9DB1D-76AA-48D1-8446-95376C4A2BC2}</Project>
<Name>UniversalEditor.Plugins.Multimedia3D</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="ObjectModels\Icarus\Parameters\" />
<Folder Include="ObjectModels\Icarus\Expressions\" />
<Folder Include="Associations\" />
<Folder Include="ObjectModels\Carcass\" />
<Folder Include="DataFormats\Carcass\" />
<Folder Include="DataFormats\Carcass\Text\" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Associations\IcarusBinaryDataFormatAssociation.uexml" />
<EmbeddedResource Include="Associations\IcarusTextDataFormatAssociation.uexml" />
<EmbeddedResource Include="Associations\CarcassTextDataFormat.uexml" />
</ItemGroup>
</Project>