protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion)); node.Add(WidthName, Width); node.Add(HeightName, Height); node.Add(CompleteImageSizeName, CompleteImageSize); node.Add(TextureFormatName, (int)TextureFormat); node.Add(MipCountName, MipCount); node.Add(IsReadableName, IsReadable); if (IsReadStreamingMipmaps(container.ExportVersion)) { node.Add(StreamingMipmapsName, StreamingMipmaps); } if (IsReadStreamingMipmapsPriority(container.ExportVersion)) { node.Add(StreamingMipmapsPriorityName, StreamingMipmapsPriority); } node.Add(AlphaIsTransparencyName, GetAlphaIsTransparency(container.Version, container.Flags)); node.Add(ImageCountName, ImageCount); node.Add(TextureDimensionName, (int)TextureDimension); node.Add(TextureSettingsName, TextureSettings.ExportYAML(container)); node.Add(LightmapFormatName, (int)LightmapFormat); node.Add(ColorSpaceName, (int)ColorSpace); IReadOnlyList <byte> imageData = GetExportImageData(); node.Add(ImageDataName, imageData.Count); node.Add(TypelessdataName, imageData.ExportYAML()); StreamingInfo streamData = new StreamingInfo(true); node.Add(StreamDataName, streamData.ExportYAML(container)); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion)); node.Add(WidthName, Width); node.Add(HeightName, Height); node.Add(AntiAliasingName, AntiAliasing); if (IsReadMipCount(container.ExportVersion)) { node.Add(MipCountName, MipCount); } node.Add(DepthFormatName, DepthFormat); node.Add(ColorFormatName, (int)ColorFormat); node.Add(MipMapName, MipMap); node.Add(GenerateMipsName, GenerateMips); node.Add(SRGBName, SRGB); node.Add(UseDynamicScaleName, UseDynamicScale); node.Add(BindMSName, BindMS); if (IsReadEnableCompatibleFormat(container.ExportVersion)) { node.Add(EnableCompatibleFormatName, GetEnableCompatibleFormat(container.Version)); } node.Add(TextureSettingsName, TextureSettings.ExportYAML(container)); node.Add(DimensionName, Dimension); node.Add(VolumeDepthName, VolumeDepth); return(node); }
protected sealed override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); if (HasColorSpace(container.ExportVersion)) { node.Add(ColorSpaceName, (int)ColorSpace); } node.Add(FormatName, (int)Format); node.Add(WidthName, Width); node.Add(HeightName, Height); node.Add(DepthName, Depth); node.Add(MipCountName, MipCount); node.Add(DataSizeName, DataSize); node.Add(TextureSettingsName, TextureSettings.ExportYAML(container)); node.Add(IsReadableName, IsReadable); IReadOnlyList <byte> imageData = GetImageData(container.Version); node.Add(ImageDataName, imageData.Count); node.Add(TypelessdataName, imageData.ExportYAML()); StreamingInfo streamData = new StreamingInfo(true); node.Add(StreamDataName, streamData.ExportYAML(container)); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.Add(TextureSettingsName, TextureSettings.ExportYAML(container)); node.Add(IsReadableName, IsReadable); if (HasSRGBTexture(container.ExportVersion)) { node.Add(SRGBTextureName, SRGBTexture); } if (HasStreamingMipmaps(container.ExportVersion)) { node.Add(StreamingMipmapsName, StreamingMipmaps); node.Add(StreamingMipmapsPriorityName, StreamingMipmapsPriority); } PostExportYAML(container, node); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter) { YAMLMappingNode node = base.ExportYAMLRoot(exporter); node.Add("m_Width", Width); node.Add("m_Height", Height); node.Add("m_AntiAliasing", AntiAliasing); node.Add("m_DepthFormat", DepthFormat); node.Add("m_ColorFormat", (int)ColorFormat); node.Add("m_MipMap", MipMap); node.Add("m_GenerateMips", GenerateMips); node.Add("m_SRGB", SRGB); node.Add("m_UseDynamicScale", UseDynamicScale); node.Add("m_BindMS", BindMS); node.Add("m_TextureSettings", TextureSettings.ExportYAML(exporter)); node.Add("m_Dimension", Dimension); node.Add("m_VolumeDepth", VolumeDepth); return(node); }
protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container) { YAMLMappingNode node = base.ExportYAMLRoot(container); node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion)); YAMLMappingNode mipmap = new YAMLMappingNode(); mipmap.Add(MipMapModeName, (int)MipMapMode); mipmap.Add(EnableMipMapName, EnableMipMap); if (HasSRGBTexture(container.ExportVersion)) { mipmap.Add(SRGBTextureName, SRGBTexture); } if (HasLinearTexture(container.ExportVersion)) { mipmap.Add(LinearTextureName, LinearTexture); } if (HasCorrectGamma(container.ExportVersion)) { mipmap.Add(CorrectGammaName, CorrectGamma); } mipmap.Add(FadeOutName, FadeOut); mipmap.Add(BorderMipMapName, BorderMipMap); if (HasMipMapsPreserveCoverage(container.ExportVersion)) { mipmap.Add(MipMapsPreserveCoverageName, MipMapsPreserveCoverage); mipmap.Add(AlphaTestReferenceValueName, AlphaTestReferenceValue); } mipmap.Add(MipMapFadeDistanceStartName, MipMapFadeDistanceStart); mipmap.Add(MipMapFadeDistanceEndName, MipMapFadeDistanceEnd); node.Add(MipmapsName, mipmap); YAMLMappingNode bumpmap = new YAMLMappingNode(); bumpmap.Add(ConvertToNormalMapName, ConvertToNormalMap); if (HasExternalNormalMap(container.ExportVersion)) { bumpmap.Add(ExternalNormalMapName, ExternalNormalMap); } bumpmap.Add(HeightScaleName, HeightScale); bumpmap.Add(NormalMapFilterName, (int)NormalMapFilter); node.Add(BumpmapName, bumpmap); if (HasIsReadable(container.ExportVersion)) { node.Add(IsReadableName, IsReadable); } if (HasStreamingMipmaps(container.ExportVersion)) { node.Add(StreamingMipmapsName, StreamingMipmaps); node.Add(StreamingMipmapsPriorityName, StreamingMipmapsPriority); } node.Add(GrayScaleToAlphaName, GrayScaleToAlpha); node.Add(GenerateCubemapName, (int)GenerateCubemap); if (HasCubemapConvolution(container.ExportVersion)) { node.Add(CubemapConvolutionName, CubemapConvolution); } if (HasCubemapConvolutionSteps(container.ExportVersion)) { node.Add(CubemapConvolutionStepsName, CubemapConvolutionSteps); node.Add(CubemapConvolutionExponentName, CubemapConvolutionExponent); } if (HasSeamlessCubemap(container.ExportVersion)) { node.Add(SeamlessCubemapName, SeamlessCubemap); } node.Add(TextureFormatName, (int)TextureFormat); if (HasRecommendedTextureFormat(container.ExportVersion) && RecommendedTextureFormatFirst(container.ExportVersion)) { node.Add(RecommendedTextureFormatName, RecommendedTextureFormat); } node.Add(MaxTextureSizeName, MaxTextureSize); node.Add(TextureSettingsName, TextureSettings.ExportYAML(container)); node.Add(NPOTScaleName, (int)NPOTScale); if (HasLightmap(container.ExportVersion)) { node.Add(LightmapName, Lightmap); } if (HasRGBM(container.ExportVersion)) { node.Add(RGBMName, RGBM); } if (HasCompressionQuality(container.ExportVersion)) { node.Add(CompressionQualityName, CompressionQuality); } if (HasAllowsAlphaSplitting(container.ExportVersion)) { node.Add(AllowsAlphaSplittingName, AllowsAlphaSplitting); } if (HasSprite(container.ExportVersion)) { node.Add(SpriteModeName, (int)SpriteMode); node.Add(SpriteExtrudeName, SpriteExtrude); node.Add(SpriteMeshTypeName, (int)SpriteMeshType); node.Add(AlignmentName, (int)Alignment); node.Add(SpritePivotName, SpritePivot.ExportYAML(container)); } if (HasSprite(container.ExportVersion) && SpritePixelsToUnitsFirst(container.ExportVersion)) { node.Add(SpritePixelsToUnitsName, SpritePixelsToUnits); } if (HasSpriteBorder(container.ExportVersion)) { node.Add(SpriteBorderName, SpriteBorder.ExportYAML(container)); } if (HasSprite(container.ExportVersion) && !SpritePixelsToUnitsFirst(container.ExportVersion)) { node.Add(SpritePixelsToUnitsName, SpritePixelsToUnits); } if (HasSpriteGenerateFallbackPhysicsShape(container.ExportVersion)) { node.Add(SpriteGenerateFallbackPhysicsShapeName, SpriteGenerateFallbackPhysicsShape); } if (HasAlphaUsage(container.ExportVersion)) { node.Add(AlphaUsageName, (int)AlphaUsage); } if (HasAlphaIsTransparency(container.ExportVersion)) { node.Add(AlphaIsTransparencyName, AlphaIsTransparency); } if (HasSpriteTessellationDetail(container.ExportVersion)) { node.Add(SpriteTessellationDetailName, SpriteTessellationDetail); } if (HasTextureType(container.ExportVersion)) { node.Add(TextureTypeName, (int)TextureType); } if (HasRecommendedTextureFormat(container.ExportVersion) && !RecommendedTextureFormatFirst(container.ExportVersion)) { node.Add(RecommendedTextureFormatName, RecommendedTextureFormat); } if (HasSourceTextureInformation(container.ExportVersion)) { node.Add(SourceTextureInformationName, SourceTextureInformation.ExportYAML(container)); } if (HasTextureShape(container.ExportVersion)) { node.Add(TextureShapeName, (int)TextureShape); } if (HasSingleChannelComponent(container.ExportVersion)) { node.Add(SingleChannelComponentName, SingleChannelComponent); } if (HasMaxTextureSizeSet(container.ExportVersion)) { node.Add(MaxTextureSizeSetName, MaxTextureSizeSet); node.Add(CompressionQualitySetName, CompressionQualitySet); node.Add(TextureFormatSetName, TextureFormatSet); } if (HasPlatformSettings(container.ExportVersion)) { node.Add(GetPlatformSettingsName(container.ExportVersion), PlatformSettings.ExportYAML(container)); } if (HasSprite(container.ExportVersion)) { node.Add(SpriteSheetName, SpriteSheet.ExportYAML(container)); node.Add(SpritePackingTagName, SpritePackingTag); } /*if (HasOutput(container.ExportVersion)) * { * node.Add(OutputName, Output.ExportYAML(container)); * }*/ if (HasPSDRemoveMatte(container.ExportVersion)) { node.Add(PSDRemoveMatteName, PSDRemoveMatte); node.Add(PSDShowRemoveMatteOptionName, PSDShowRemoveMatteOption); } PostExportYAML(container, node); return(node); }