Retrieves the material of a given subentity.
Returns eOk if the operation completed successfully, or an appropriate error code otherwise.