@@ -866,9 +866,9 @@ public void SaveToFile(string filePath, Action<bool, string> loggingFunction = n
866
866
cmd . Parameters . AddWithValue ( "value" , "ffxiv_tt" ) ;
867
867
cmd . ExecuteScalar ( ) ;
868
868
869
- // Does the framework NOT have a version identifier? I couldn't find one, so the Cache version works.
869
+
870
870
cmd . Parameters . AddWithValue ( "key" , "version" ) ;
871
- cmd . Parameters . AddWithValue ( "value" , XivCache . CacheVersion ) ;
871
+ cmd . Parameters . AddWithValue ( "value" , typeof ( XivCache ) . Assembly . GetName ( ) . Version ) ;
872
872
cmd . ExecuteScalar ( ) ;
873
873
874
874
// Axis information
@@ -886,7 +886,7 @@ public void SaveToFile(string filePath, Action<bool, string> loggingFunction = n
886
886
887
887
888
888
// FFXIV stores stuff in Meters.
889
- cmd . Parameters . AddWithValue ( "key" , "name " ) ;
889
+ cmd . Parameters . AddWithValue ( "key" , "root_name " ) ;
890
890
cmd . Parameters . AddWithValue ( "value" , Path . GetFileNameWithoutExtension ( Source ) ) ;
891
891
cmd . ExecuteScalar ( ) ;
892
892
@@ -914,6 +914,21 @@ public void SaveToFile(string filePath, Action<bool, string> loggingFunction = n
914
914
}
915
915
}
916
916
917
+ var modelIdx = 0 ;
918
+ var models = new List < string > ( ) { Path . GetFileNameWithoutExtension ( Source ) } ;
919
+ foreach ( var model in models )
920
+ {
921
+ query = @"insert into models (model, name) values ($model, $name);" ;
922
+ using ( var cmd = new SQLiteCommand ( query , db ) )
923
+ {
924
+ cmd . Parameters . AddWithValue ( "model" , modelIdx ) ;
925
+ cmd . Parameters . AddWithValue ( "name" , model ) ;
926
+ cmd . ExecuteScalar ( ) ;
927
+
928
+ }
929
+ modelIdx ++ ;
930
+ }
931
+
917
932
var matIdx = 0 ;
918
933
foreach ( var material in Materials )
919
934
{
@@ -963,11 +978,15 @@ public void SaveToFile(string filePath, Action<bool, string> loggingFunction = n
963
978
}
964
979
965
980
966
- query = @"insert into meshes (mesh, name, material_id) values ($mesh, $name, $material_id);" ;
981
+ // Groups
982
+ query = @"insert into meshes (mesh, name, material_id, model) values ($mesh, $name, $material_id, $model);" ;
967
983
using ( var cmd = new SQLiteCommand ( query , db ) )
968
984
{
969
985
cmd . Parameters . AddWithValue ( "name" , m . Name ) ;
970
986
cmd . Parameters . AddWithValue ( "mesh" , meshIdx ) ;
987
+
988
+ // This is always 0 for now. Support element for Liinko's work on multi-model export.
989
+ cmd . Parameters . AddWithValue ( "model" , 0 ) ;
971
990
cmd . Parameters . AddWithValue ( "material_id" , GetMaterialIndex ( meshIdx ) ) ;
972
991
cmd . ExecuteScalar ( ) ;
973
992
}
0 commit comments