Do not list material colors when vertex colors are applied.
This commit is contained in:
parent
15b49457af
commit
7bfab03c42
@ -78,12 +78,15 @@ OV.SidebarDetailsPanel = class extends OV.SidebarPanel
|
||||
}
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Text, 'Source', material.isDefault ? 'Default' : 'Model'));
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Text, 'Type', typeString));
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Color', material.color));
|
||||
if (material.type === OV.MaterialType.Phong) {
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Ambient', material.ambient));
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Specular', material.specular));
|
||||
if (material.vertexColors) {
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Text, 'Color', 'Vertex colors'));
|
||||
} else {
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Color', material.color));
|
||||
if (material.type === OV.MaterialType.Phong) {
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Ambient', material.ambient));
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Color, 'Specular', material.specular));
|
||||
}
|
||||
}
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Boolean, 'Vertex Colors', material.vertexColors));
|
||||
if (material.type === OV.MaterialType.Physical) {
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Percent, 'Metalness', material.metalness));
|
||||
this.AddProperty (table, new OV.Property (OV.PropertyType.Percent, 'Roughness', material.roughness));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user