Click or drag to resize
AB4D logo

ModelUtilsGetMaterialDiffuseColor Method

Returns the color of the SolidColorBrush in the first DiffuseMaterial

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public static Color GetMaterialDiffuseColor(
	Material material,
	Color defaultColor,
	bool readBrushOpacity = true
)

Parameters

material  Material
material
defaultColor  Color
color that is returned when the DiffuseMaterial with SolidColorBrush is not found
readBrushOpacity  Boolean  (Optional)
when true (by default) the also Brush's Opacity value is read and it is multiplied by the color's Alpha value

Return Value

Color
color of the SolidColorBrush in the first DiffuseMaterial
See Also