menpo/menpo — pull request #504 by jabooth (2014-11-05 15:03:42+00:00)
Title: explicitly have kwarg in IO for landmark extensions

menpo3d reuses the importing machinery of menpo where possible. We currently have a bug in menpo3d which is that no mesh annotations are imported when using `import_meshes()` - this is because inside `_import()` we were hard coded to call `menpo.io.import_landmark_file` which is only designed to import image annotations.

To get around this, this PR adds a kwarg to the import machinery called `landmark_ext_map`. This is synonymous to `extension_map` but for annotations. By default this kwarg is `None`. This makes the `has_landmarks` kwarg redundant - instead we can simply say we only attempt to import annotations if `landmark_ext_map is not None`.