The enums have to be menually registered in pdb/enums-external.pl. Currently supports enums from GEGL only. Add enum GeglDistanceMetric as first external enum.