Exemplo n.º 1
0
        //============================================================
        // <T>添加任务对象<T>
        //
        // @param model 模型
        //============================================================
        public void TaskExport(FDrModel model)
        {
            FRsExportTask task = new FRsExportTask();

            task.Exporter = model;
            RMoCore.TaskConsole.Push(task);
        }
Exemplo n.º 2
0
        //============================================================
        // <T>扫描所有节点。</T>
        //
        // @param folder 文件夹
        // @param path 路径
        //============================================================
        private void ScanNodes(FDrFolder folder, string path)
        {
            string fileTag = string.Empty;

            // 文件夹排序
            folder.Folders.Sort();
            // 循环取得每个文件
            foreach (FDrFolder subfloder in folder.Folders)
            {
                // 获得经过处理的名称
                string[] items = subfloder.Name.Split('-');
                if (items.Length >= 3)
                {
                    string type    = items[0];
                    string dotPath = path + "\\" + items[1];
                    if ("fd" == type)
                    {
                        subfloder.Type  = "folder";
                        subfloder.Label = items[1] + " [" + items[2] + "]";
                    }
                    else if ("md" == type)
                    {
                        subfloder.Type = "material";
                        FDrModel model = new FDrModel();
                        subfloder.Label       = items[1] + " [" + items[2] + "]";
                        model.Name            = dotPath;
                        model.Label           = items[2];
                        model.Directory       = subfloder.Directory;
                        model.DirectoryExprot = _exportDirectory;
                        model.Scan();
                        subfloder.Tag = model;
                        // 存储对照表
                        _models.Set(model.Code, model);
                        _folders.Push(subfloder);
                    }
                    ScanNodes(subfloder, dotPath);
                }
            }
        }
Exemplo n.º 3
0
 //============================================================
 // <T>构造模型材质集合。</T>
 //============================================================
 public FDrModelMaterialCollection(FDrModel model)
 {
     _model = model;
 }