public void SetTexture([Localizable(false)] string textureName, string filename) { var bytes = File.ReadAllBytes(filename); Textures[textureName] = new Kn5Texture { Active = true, Name = textureName, Length = bytes.Length }; TexturesData[textureName] = bytes; }
private void ExportCollada_Texture(XmlWriter xml, Kn5Texture texture) { xml.WriteStartElement("image"); xml.WriteAttributeStringSafe("id", $"{texture.Name}-image"); xml.WriteAttributeStringSafe("name", texture.Name); xml.WriteStartElement("init_from"); xml.WriteString("file://texture/" + texture.Name); xml.WriteEndElement(); xml.WriteEndElement(); }
public void Write(Kn5Texture texture) { Write(texture.Active ? 1 : 0); Write(texture.Name); Write(texture.Length); }