Beispiel #1
0
        public static void Execute(GenericMeshImport gmi)
        {
            GenericImportForm f = new GenericImportForm();

            f.gmi = gmi;
            f.Setup();
            f.ShowDialog();
            f.Dispose();
        }
Beispiel #2
0
        public bool Run()
        {
            scn.ClearTags();
            meshes = new MeshListViewItemExt[0];
            bones  = new BoneListViewItemExt[0];

            GenericImportForm.Execute(this);

            if (meshes.Length == 0)
            {
                return(false);
            }

            if (this.ClearGroupsOnImport)
            {
                for (int i = Gmdc.Groups.Length - 1; i >= 0; i--)
                {
                    Gmdc.RemoveGroup(i);
                }
                foreach (MeshListViewItemExt m in meshes)
                {
                    m.Group = null;
                }
            }

            foreach (BoneListViewItemExt b in bones)
            {
                b.AssignVertices();
            }

            foreach (MeshListViewItemExt m in meshes)
            {
                m.BuildGroup();
            }

            scn.ClearTags();
            return(true);
        }