Adding selecting from face maps to Blender 4.0

Because it is currently not possible to select faces based on the values in a face map, and because creating new face maps is cumbersome (First: Add attribute, select name, domain and type, then: Mesh -> Set attribute), I decided to create a tiny add-on that provides this functionality for the time being.

It is called facemap_select.py and can be downloaded from this GitHub repository (or you can right click and this link directly and select download.)

It is a bit rough-and-ready, but once downloaded, you can install and enable it in the usual way by selecting Edit -> Preferences -> Add-ons -> Install and then locating the file you downloaded. Don't forget the check the enable checkbox.

The add-on will add two options to the Select menu (in mesh edit mode):


From facemap will select faces based on the currently active face map, while Create facemap will create a new facemap and set its values to reflect the currently selected faces.

From facemap will be grayed out if no suitable facemap is selected.

A created face map will have a name starting with 'Facemap' and will be in the FACE domain and have a boolean type.

Note: face maps are not typically called that in the Blender documentation but are custom attributes (to be found in the Object data properties of a mesh object in the Attributes panel:

There might be more and different kinds of attribute layers here as well, like a uv map, as shown in the image).

I don't think (hope?) this add-on will last forever, as I expect this missing bit of functionality to be added to Blender sometime in the future (or someone might take my code and incorporate it, that's fine too of course). In the mean time I hope this might help some people with multiple complex selections to switch easily between those.