예제 #1
0
        public static void SetSave(PuzzleObject obj)
        {
            SaveModel sm = new SaveModel();

            sm.obj_id  = obj._component.id;
            sm.enabled = obj._component.rt.gameObject.GetComponent <PuzzleDragAndDrop>().enabled == true ? 1 : 0;
            sm.posx    = obj._component.rt.anchoredPosition3D.x + "";
            sm.posy    = obj._component.rt.anchoredPosition3D.y + "";
            sm.parent  = obj.GetParent();

            sm.Save();
        }
예제 #2
0
 /// <summary>
 /// Saves the model and created textures as an OBJ file
 /// </summary>
 /// <param name="obj"></param>
 private void ExportOBJ(object obj)
 {
     SaveModel.Save(selectedCategory, modelName, SelectedMesh.ID, selectedItem.ItemName, meshData, meshList);
 }
예제 #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //
            // GEAR
            //
            CategoryViewModel Gear = (CategoryViewModel)textureTreeView.Items.GetItemAt(0);

            Gear.IsSelected = true;

            foreach (CategoryViewModel category in Gear.Children)
            {
                category.IsExpanded = true;
                category.IsSelected = true;

                string time        = string.Format("{0:HH:mm:ss tt}", DateTime.Now);
                string logfilename = "E:\\xivdb\\FFXIV_TextTools2_Output\\log.txt";

                File.AppendAllText(logfilename, time + " - Category: " + category.Name.ToString() + " - Items: " + category.Children.Count.ToString() + Environment.NewLine);

                foreach (CategoryViewModel item in category.Children)
                {
                    item.IsExpanded = true;
                    item.IsSelected = true;
                    actionSelectedItemChanged(item);

                    SaveModel.Save(
                        mViewModel.getMvm().getModelName(),
                        mViewModel.getMvm().getSelectedMeshId(),
                        mViewModel.getMvm().getMeshData(),
                        mViewModel.getMvm().getMeshList()
                        );

                    File.AppendAllText(logfilename, time + " - Saved: " + item.Name.ToString() + " -- " + mViewModel.getMvm().getModelName() + Environment.NewLine);
                }
            }

            //
            // COMPANIONS
            //
            CategoryViewModel Companions = (CategoryViewModel)textureTreeView.Items.GetItemAt(2);

            Companions.IsSelected = true;

            foreach (CategoryViewModel category in Companions.Children)
            {
                category.IsExpanded = true;
                category.IsSelected = true;

                string time        = string.Format("{0:HH:mm:ss tt}", DateTime.Now);
                string logfilename = "E:\\xivdb\\FFXIV_TextTools2_Output\\log.txt";

                File.AppendAllText(logfilename, time + " - Category: " + category.Name.ToString() + " - Items: " + category.Children.Count.ToString() + Environment.NewLine);

                foreach (CategoryViewModel item in category.Children)
                {
                    item.IsExpanded = true;
                    item.IsSelected = true;
                    actionSelectedItemChanged(item);

                    SaveModel.Save(
                        mViewModel.getMvm().getModelName(),
                        mViewModel.getMvm().getSelectedMeshId(),
                        mViewModel.getMvm().getMeshData(),
                        mViewModel.getMvm().getMeshList()
                        );

                    File.AppendAllText(logfilename, time + " - Saved: " + item.Name.ToString() + " -- " + mViewModel.getMvm().getModelName() + Environment.NewLine);
                }
            }
        }