Editor function to replace object meshes