Exemplo n.º 1
0
        public YAMLNode ExportYAML()
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(SerializedVersion);
            node.Add("time", Time);
            node.Add("value", Value.ExportYAML());
            node.Add("inSlope", InSlope.ExportYAML());
            node.Add("outSlope", OutSlope.ExportYAML());
            node.Add("tangentMode", 0);
            return(node);
        }
Exemplo n.º 2
0
        public YAMLNode ExportYAML(IAssetsExporter exporter)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("time", Time);
            node.Add("value", Value.ExportYAML(exporter));
            node.Add("inSlope", InSlope.ExportYAML(exporter));
            node.Add("outSlope", OutSlope.ExportYAML(exporter));
            if (GetSerializedVersion(exporter.Version) >= 2)
            {
#warning TODO: value?
                node.Add("tangentMode", 0);
            }
            return(node);
        }
Exemplo n.º 3
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("time", Time);
            node.Add("value", Value.ExportYAML(container));
            node.Add("inSlope", InSlope.ExportYAML(container));
            node.Add("outSlope", OutSlope.ExportYAML(container));
            if (GetSerializedVersion(container.Version) >= 2)
            {
                node.Add("tangentMode", (int)GetTangentMode(container.Version, container.Flags));
            }
            if (GetSerializedVersion(container.Version) >= 3)
            {
                node.Add("weightedMode", (int)WeightedMode);
                node.Add("inWeight", InWeight.ExportYAML(container));
                node.Add("outWeight", OutWeight.ExportYAML(container));
            }
            return(node);
        }
Exemplo n.º 4
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(TimeName, Time);
            node.Add(ValueName, Value.ExportYAML(container));
            node.Add(InSlopeName, InSlope.ExportYAML(container));
            node.Add(OutSlopeName, OutSlope.ExportYAML(container));
            if (IsReadTangentMode(container.ExportVersion, container.ExportFlags))
            {
                node.Add(TangentModeName, (int)TangentMode);
            }
            if (IsReadWeight(container.ExportVersion))
            {
                node.Add(WeightedModeName, (int)WeightedMode);
                node.Add(InWeightName, InWeight.ExportYAML(container));
                node.Add(OutWeightName, OutWeight.ExportYAML(container));
            }
            return(node);
        }
Exemplo n.º 5
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            KeyframeTplLayout layout = container.ExportLayout.Misc.KeyframeTpl;
            YAMLMappingNode   node   = new YAMLMappingNode();

            node.AddSerializedVersion(layout.Version);
            node.Add(layout.TimeName, Time);
            node.Add(layout.ValueName, Value.ExportYAML(container));
            node.Add(layout.InSlopeName, InSlope.ExportYAML(container));
            node.Add(layout.OutSlopeName, OutSlope.ExportYAML(container));
            if (layout.HasTangentMode)
            {
                node.Add(layout.TangentModeName, TangentMode);
            }
            if (layout.HasWeightedMode)
            {
                node.Add(layout.WeightedModeName, (int)WeightedMode);
                node.Add(layout.InWeightName, InWeight.ExportYAML(container));
                node.Add(layout.OutWeightName, OutWeight.ExportYAML(container));
            }
            return(node);
        }