Get a list of current face sets from sculpt mode?

Is a list of the assigned face sets accessible from the api somewhere? Bonus points if the currently assigned colors can be found too. I’m specifically using v2.91

1 Like

I am studying, so I do not have time to analyse the code and how he is doing it,
but Chris Conlan is selecting faces in this code here:

As for the color, I have no idea.

I may be misunderstanding something w/ your answer. I’m not looking to select just any faces, but the ones specifically assigned when creating face sets in sculpt mode. I’m thinking there has to be a location retaining the info what faces belong to what set somewhere.

Face Sets — Blender Manual


The information must be accumulated as it is operated on, but I was not able to find anything that looked like that or even anything that looked even remotely related to faces being stored somewhere. It is possible it is stored in the object itself, but I’m not sure how you would go about retrieving it.

I’m looking for the same thing.
To convert face set colors to sculpt vertex colors.
But I don’t know where to find face set information in bpy.

It looks like the sculpt mode python api needs an overhaul. There’s a lot of stuff that can’t be accessed there…
Sometime ago I was looking for a way to check if my mesh is masked, and I found nothing…

+1 for python api access to the face sets. Is there any feature report/issue to vote for on this?

1 Like

Have made an attempt at exposing the face sets to python;

I know absolutely nothing about the app code side of blender, so I’ll be crossing my fingers that this will do the trick and get merged!

You can “vote” on the revision if you login to the developer portal. There is an “Award Token” button for this.