Sets the material object. The material will be copied and stored in the MaterialElem
Returns eOk if successful or an appropriate error code in the other case.