Class MaterialExtract
- Namespace
- ValveResourceFormat.IO
- Assembly
- ValveResourceFormat.dll
Extracts Source 2 materials to editable vmat format.
public sealed class MaterialExtract
Inheritance
Inherited Members
Constructors
MaterialExtract(Material, ResourceEditInfo, IFileLoader, IShaderDataProvider)
Initializes a new instance of the ValveResourceFormat.IO.MaterialExtract class.
public MaterialExtract(Material material, ResourceEditInfo editInfo, IFileLoader fileLoader, IShaderDataProvider shaderDataProvider = null)
Parameters
material
MaterialeditInfo
ResourceEditInfofileLoader
IFileLoadershaderDataProvider
IShaderDataProvider
MaterialExtract(Resource, IFileLoader)
Initializes a new instance of the ValveResourceFormat.IO.MaterialExtract class.
public MaterialExtract(Resource resource, IFileLoader fileLoader = null)
Parameters
resource
ResourcefileLoader
IFileLoader
Methods
GetTextureUnpackInfos(string, string, Texture, bool, bool)
Gets the texture unpacking information for a material texture parameter.
public IEnumerable<MaterialExtract.UnpackInfo> GetTextureUnpackInfos(string textureType, string texturePath, Texture texture, bool omitDefaults, bool omitUniforms)
Parameters
Returns
OutTextureName(string, bool, bool, string)
Generates the output texture file name from a compiled texture path.
public static string OutTextureName(string texturePath, bool keepOriginalExtension, bool hdr, string desiredSuffix = null)
Parameters
Returns
ToContentFile()
Converts the material to a content file with associated textures.
public ContentFile ToContentFile()
Returns
ToValveMaterial()
Converts the material to Valve material format as a string.
public string ToValveMaterial()