void ExportRenderModel(string file_name)
        {
            RenderModelInfoInternal model_info = new RenderModelInfoInternal();

            List <int> added_permutations = new List <int>();

            foreach (int index in registeredInfos)
            {
                RenderModelInfoInternal info = internalInfoList[index] as RenderModelInfoInternal;

                if (!added_permutations.Contains(info.Permutation))
                {
                    added_permutations.Add(info.Permutation);
                }

                for (int i = 0; i < info.GetShaderCount(); i++)
                {
                    model_info.AddShaderDatum(info.GetShaderDatum(i), info.GetShaderName(i));
                }
                for (int i = 0; i < info.GetGeometryCount(); i++)
                {
                    model_info.AddGeometry(info.GetGeometryName(i), info.GetGeometryIndex(i));
                }
            }

            if (added_permutations.Count == 1)
            {
                model_info.Permutation = added_permutations[0];
            }
            else
            {
                model_info.IsMultiplePermutations = true;
            }

            ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
            var exporter = new Halo2.ColladaRenderModelExporter(arguments, model_info, tagIndex, tagManager);

            ExportSave(exporter, RelativeFilePath + file_name + ".dae");
        }
Ejemplo n.º 2
0
		void ExportRenderModel(string file_name)
		{
			RenderModelInfoInternal model_info = new RenderModelInfoInternal();

			List<int> added_permutations = new List<int>();

			foreach (int index in registeredInfos)
			{
				RenderModelInfoInternal info = internalInfoList[index] as RenderModelInfoInternal;

				if (!added_permutations.Contains(info.Permutation))
					added_permutations.Add(info.Permutation);

				for (int i = 0; i < info.GetShaderCount(); i++)
					model_info.AddShaderDatum(info.GetShaderDatum(i), info.GetShaderName(i));
				for (int i = 0; i < info.GetGeometryCount(); i++)
					model_info.AddGeometry(info.GetGeometryName(i), info.GetGeometryIndex(i));
			}

			if (added_permutations.Count == 1)
				model_info.Permutation = added_permutations[0];
			else
				model_info.IsMultiplePermutations = true;

			ColladaExportArgs arguments = new ColladaExportArgs(Overwrite, RelativeFilePath, BitmapFormat);
			var exporter = new Halo2.ColladaRenderModelExporter(arguments, model_info, tagIndex, tagManager);

			ExportSave(exporter, RelativeFilePath + file_name + ".dae");
		}