Whenever a material property is changed call this function. This will rebuild the inspector and validate the properties.