public PmxMaterial() { Name = ""; NameE = ""; Diffuse = new Vector4(0f, 0f, 0f, 1f); Specular = new Vector3(0f, 0f, 0f); Power = 0f; Ambient = new Vector3(0f, 0f, 0f); ClearFlags(); EdgeColor = new Vector4(0f, 0f, 0f, 1f); EdgeSize = 1f; Tex = ""; Sphere = ""; SphereMode = SphereModeType.Mul; Toon = ""; Memo = ""; OffsetMul = default(PmxMaterialMorph.MorphData); OffsetAdd = default(PmxMaterialMorph.MorphData); ClearOffset(); ExDraw = ExDrawMode.F3; Attribute = new PmxMaterialAttribute(); }
public void FromPmxMaterial(PmxMaterial m, bool nonStr = false) { Diffuse = m.Diffuse; Specular = m.Specular; Power = m.Power; Ambient = m.Ambient; Flags = m.Flags; EdgeColor = m.EdgeColor; EdgeSize = m.EdgeSize; SphereMode = m.SphereMode; FaceCount = m.FaceCount; ExDraw = m.ExDraw; if (!nonStr) { Name = m.Name; NameE = m.NameE; Tex = m.Tex; Sphere = m.Sphere; Toon = m.Toon; Memo = m.Memo; } Attribute = m.Attribute; FromID(m); }