Beispiel #1
0
            private void BuildInternal(string[] filesToBuild)
            {
                if (filesToBuild.Length == 0)
                {
                    Dbg.Write("No files to build for " + id_);
                    return;
                }

                if (!Directory.Exists(GetPathOf(OUTBN)) || !Directory.Exists(GetPathOf(OUTCD)))
                {
                    Dbg.Write("No valid output path for " + id_ + ", cancelling importation");
                    return;
                }

                Dbg.Write("building " + id_ + " from " + path_);

                NamerProcessor proc;

                try
                {
                    proc = new NamerProcessor(namerBox_.Text);
                }
                catch (Exception e)
                {
                    Dbg.Write("### ERROR COMPILING NAMER FUNCTION for " + id_);
                    Dbg.Write(e.Message);
                    Dbg.Write("### NOTE: Use the 'Preview Results' functionality to make sure your code is valid!");
                    return;
                }

                ImportAssets(filesToBuild, proc);
            }
Beispiel #2
0
            protected override void ImportAssets(string[] filesToBuild, NamerProcessor proc)
            {
                AtlasImporter importer = importer_ as AtlasImporter; //TODO use base importer that takes option, not atlas importer

                if (importer != null)
                {
                    importer.ImportWithOption(path_, filesToBuild, GetPathOf(OUTBN), GetPathOf(OUTCD), proc.RunProcessor, multiTick_.Checked);
                }
            }
Beispiel #3
0
            //namer processing
            void PreviewNamer()
            {
                namerPreviewBox_.Clear();
                string[] filesInPath = GetAllFilesInPath();
                if (filesInPath.Length == 0)
                {
                    namerPreviewBox_.AppendText("NO VALID FILE IN PATH!");
                    return;
                }

                try
                {
                    NamerProcessor proc = new NamerProcessor(namerBox_.Text);
                    foreach (string file in filesInPath)
                    {
                        string processed = proc.RunProcessor(file);
                        namerPreviewBox_.AppendText(processed + "\t\t\t\tINPUT: " + file + "\r\n");
                    }
                }
                catch (Exception e)
                {
                    namerPreviewBox_.AppendText(e.Message);
                }
            }
Beispiel #4
0
 protected virtual void ImportAssets(string[] filesToBuild, NamerProcessor proc)
 {
     //todo get paths in importer?
     importer_.Import(path_, filesToBuild, GetPathOf(OUTBN), GetPathOf(OUTCD), proc.RunProcessor);
 }