开发:材质支持引用数据

pull/1641/head
ChenX 3 years ago
parent 3bddab5660
commit 200d5c77ed

@ -28,6 +28,7 @@ export enum UVType
export class PhysicalMaterialRecord extends MaterialTableRecord
{
@AutoRecord type: MaterialType = "木纹";
@AutoRecord ref: string = "";//参考材质,当存在这个变量时,使用ue材质
//基础色
@AutoRecord color: string = "#ffffff";//基础色
@ -234,6 +235,8 @@ export class PhysicalMaterialRecord extends MaterialTableRecord
if (ver > 6)
this.type = file.Read();
if (ver > 7)
this.ref = file.Read();
}
this.Update();
@ -242,7 +245,7 @@ export class PhysicalMaterialRecord extends MaterialTableRecord
WriteFile(file: CADFiler)
{
super.WriteFile(file);
file.Write(7);
file.Write(8);
file.Write(this.color);
file.Write(this.transparent);
file.Write(this.matalness);
@ -300,6 +303,9 @@ export class PhysicalMaterialRecord extends MaterialTableRecord
//ver 7
file.Write(this.type);
//ver8
file.Write(this.ref);
}
//#endregion
}

Loading…
Cancel
Save