added support for material to reference meshes