public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(GetSerializedVersion(container.Version)); node.Add("key0", Key0.ExportYAML(container)); node.Add("key1", Key1.ExportYAML(container)); node.Add("key2", Key2.ExportYAML(container)); node.Add("key3", Key3.ExportYAML(container)); node.Add("key4", Key4.ExportYAML(container)); node.Add("key5", Key5.ExportYAML(container)); node.Add("key6", Key6.ExportYAML(container)); node.Add("key7", Key7.ExportYAML(container)); node.Add("ctime0", Ctime0); node.Add("ctime1", Ctime1); node.Add("ctime2", Ctime2); node.Add("ctime3", Ctime3); node.Add("ctime4", Ctime4); node.Add("ctime5", Ctime5); node.Add("ctime6", Ctime6); node.Add("ctime7", Ctime7); node.Add("atime0", Atime0); node.Add("atime1", Atime1); node.Add("atime2", Atime2); node.Add("atime3", Atime3); node.Add("atime4", Atime4); node.Add("atime5", Atime5); node.Add("atime6", Atime6); node.Add("atime7", Atime7); node.Add("m_Mode", (int)Mode); node.Add("m_NumColorKeys", NumColorKeys); node.Add("m_NumAlphaKeys", NumAlphaKeys); return(node); }
public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); GradientLayout layout = container.ExportLayout.Serialized.Gradient; node.AddSerializedVersion(layout.Version); if (layout.Version == 1) { node.Add(layout.Key0Name, Key0_32.ExportYAML(container)); node.Add(layout.Key1Name, Key1_32.ExportYAML(container)); node.Add(layout.Key2Name, Key2_32.ExportYAML(container)); node.Add(layout.Key3Name, Key3_32.ExportYAML(container)); node.Add(layout.Key4Name, Key4_32.ExportYAML(container)); node.Add(layout.Key5Name, Key5_32.ExportYAML(container)); node.Add(layout.Key6Name, Key6_32.ExportYAML(container)); node.Add(layout.Key7Name, Key7_32.ExportYAML(container)); } else { node.Add(layout.Key0Name, Key0.ExportYAML(container)); node.Add(layout.Key1Name, Key1.ExportYAML(container)); node.Add(layout.Key2Name, Key2.ExportYAML(container)); node.Add(layout.Key3Name, Key3.ExportYAML(container)); node.Add(layout.Key4Name, Key4.ExportYAML(container)); node.Add(layout.Key5Name, Key5.ExportYAML(container)); node.Add(layout.Key6Name, Key6.ExportYAML(container)); node.Add(layout.Key7Name, Key7.ExportYAML(container)); } node.Add(layout.Ctime0Name, Ctime0); node.Add(layout.Ctime1Name, Ctime1); node.Add(layout.Ctime2Name, Ctime2); node.Add(layout.Ctime3Name, Ctime3); node.Add(layout.Ctime4Name, Ctime4); node.Add(layout.Ctime5Name, Ctime5); node.Add(layout.Ctime6Name, Ctime6); node.Add(layout.Ctime7Name, Ctime7); node.Add(layout.Atime0Name, Atime0); node.Add(layout.Atime1Name, Atime1); node.Add(layout.Atime2Name, Atime2); node.Add(layout.Atime3Name, Atime3); node.Add(layout.Atime4Name, Atime4); node.Add(layout.Atime5Name, Atime5); node.Add(layout.Atime6Name, Atime6); node.Add(layout.Atime7Name, Atime7); if (layout.HasMode) { node.Add(layout.ModeName, (int)Mode); } node.Add(layout.NumColorKeysName, NumColorKeys); node.Add(layout.NumAlphaKeysName, NumAlphaKeys); return(node); }
public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion)); if (IsColor32(container.ExportVersion)) { node.Add(Key0Name, ((ColorRGBA32)Key0).ExportYAML(container)); node.Add(Key1Name, ((ColorRGBA32)Key1).ExportYAML(container)); node.Add(Key2Name, ((ColorRGBA32)Key2).ExportYAML(container)); node.Add(Key3Name, ((ColorRGBA32)Key3).ExportYAML(container)); node.Add(Key4Name, ((ColorRGBA32)Key4).ExportYAML(container)); node.Add(Key5Name, ((ColorRGBA32)Key5).ExportYAML(container)); node.Add(Key6Name, ((ColorRGBA32)Key6).ExportYAML(container)); node.Add(Key7Name, ((ColorRGBA32)Key7).ExportYAML(container)); } else { node.Add(Key0Name, Key0.ExportYAML(container)); node.Add(Key1Name, Key1.ExportYAML(container)); node.Add(Key2Name, Key2.ExportYAML(container)); node.Add(Key3Name, Key3.ExportYAML(container)); node.Add(Key4Name, Key4.ExportYAML(container)); node.Add(Key5Name, Key5.ExportYAML(container)); node.Add(Key6Name, Key6.ExportYAML(container)); node.Add(Key7Name, Key7.ExportYAML(container)); } node.Add(Ctime0Name, Ctime0); node.Add(Ctime1Name, Ctime1); node.Add(Ctime2Name, Ctime2); node.Add(Ctime3Name, Ctime3); node.Add(Ctime4Name, Ctime4); node.Add(Ctime5Name, Ctime5); node.Add(Ctime6Name, Ctime6); node.Add(Ctime7Name, Ctime7); node.Add(Atime0Name, Atime0); node.Add(Atime1Name, Atime1); node.Add(Atime2Name, Atime2); node.Add(Atime3Name, Atime3); node.Add(Atime4Name, Atime4); node.Add(Atime5Name, Atime5); node.Add(Atime6Name, Atime6); node.Add(Atime7Name, Atime7); if (HasMode(container.ExportVersion)) { node.Add(ModeName, (int)Mode); } node.Add(NumColorKeysName, NumColorKeys); node.Add(NumAlphaKeysName, NumAlphaKeys); return(node); }