Пример #1
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(VerticesName, Vertices.ExportYAML(container));
            node.Add(UVName, UV.ExportYAML(container));
            if (HasBindPoses(container.ExportVersion))
            {
                node.Add(BindPosesName, BindPoses.ExportYAML(container));
            }

            node.Add(NormalsName, Normals.ExportYAML(container));
            node.Add(TangentsName, Tangents.ExportYAML(container));
            node.Add(WeightsName, Weights.ExportYAML(container));
            node.Add(NormalSignsName, NormalSigns.ExportYAML(container));
            node.Add(TangentSignsName, TangentSigns.ExportYAML(container));
            if (HasFloatColors(container.ExportVersion))
            {
                node.Add(FloatColorsName, FloatColors.ExportYAML(container));
            }

            node.Add(BoneIndicesName, BoneIndices.ExportYAML(container));
            node.Add(TrianglesName, Triangles.ExportYAML(container));
            if (HasColors(container.ExportVersion))
            {
                node.Add(ColorsName, Colors.ExportYAML(container));
            }
            if (HasUVInfo(container.ExportVersion))
            {
                node.Add(UVInfoName, UVInfo);
            }
            return(node);
        }
Пример #2
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add("m_Vertices", Vertices.ExportYAML(container));
            node.Add("m_UV", UV.ExportYAML(container));
            node.Add("m_Normals", Normals.ExportYAML(container));
            node.Add("m_Tangents", Tangents.ExportYAML(container));
            node.Add("m_Weights", Weight.ExportYAML(container));
            node.Add("m_NormalSigns", NormalSigns.ExportYAML(container));
            node.Add("m_TangentSigns", TangentSigns.ExportYAML(container));
            node.Add("m_FloatColors", IsReadFloatColors(container.Version) ? FloatColors.ExportYAML(container) : default(PackedFloatVector).ExportYAML(container));
            node.Add("m_BoneIndices", BoneIndices.ExportYAML(container));
            node.Add("m_Triangles", Triangles.ExportYAML(container));
            node.Add("m_UVInfo", UVInfo);
            return(node);
        }
Пример #3
0
        public YAMLNode ExportYAML(IAssetsExporter exporter)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = new YAMLMappingNode();
            node.Add("m_Vertices", Vertices.ExportYAML(exporter));
            node.Add("m_UV", UV.ExportYAML(exporter));
            node.Add("m_Normals", Normals.ExportYAML(exporter));
            node.Add("m_Tangents", Tangents.ExportYAML(exporter));
            node.Add("m_Weights", Weight.ExportYAML(exporter));
            node.Add("m_NormalSigns", NormalSigns.ExportYAML(exporter));
            node.Add("m_TangentSigns", TangentSigns.ExportYAML(exporter));
            node.Add("m_FloatColors", IsReadFloatColors(exporter.Version) ? FloatColors.ExportYAML(exporter) : default(PackedFloatVector).ExportYAML(exporter));
            node.Add("m_BoneIndices", BoneIndices.ExportYAML(exporter));
            node.Add("m_Triangles", Triangles.ExportYAML(exporter));
            node.Add("m_UVInfo", UVInfo);
            return(node);
        }
Пример #4
0
        public YAMLNode ExportYAML()
        {
#warning TODO: support different versions
            YAMLMappingNode node = new YAMLMappingNode();
            node.Add("m_Vertices", Vertices.ExportYAML());
            node.Add("m_UV", UV.ExportYAML());
            node.Add("m_Normals", Normals.ExportYAML());
            node.Add("m_Tangents", Tangents.ExportYAML());
            node.Add("m_Weights", Weight.ExportYAML());
            node.Add("m_NormalSigns", NormalSigns.ExportYAML());
            node.Add("m_TangentSigns", TangentSigns.ExportYAML());
            if (IsReadFloatColors)
            {
                node.Add("m_FloatColors", FloatColors.ExportYAML());
            }
            else
            {
                node.Add("m_FloatColors", PackedFloatVector.Empty.ExportYAML());
            }
            node.Add("m_BoneIndices", BoneIndices.ExportYAML());
            node.Add("m_Triangles", Triangles.ExportYAML());
            node.Add("m_UVInfo", UVInfo);
            return(node);
        }