Expand is not expected to update the visibility state of the PBVH, only
the Face Sets IDs. If visibility updates are made accidentally, PBVH
rendering breaks.
In order for this to work properly, the following fixes are needed:
- Expand should always check for active component before attempting to modify a Face Set ID
- Expand should always check the visibility state on original_face_sets, as it is the array that contains the visiblilty state that corresponds with the current state used for PBVH rendering. This implies that after any modification done by Expand, the visibility state of ss->face_sets and expand_cache->original_face_sets should match (like in any other tool that does not modify visibility).
- Expand should never modify the Face Set ID of a poly that is hidden in expand_cache->original_face_sets.
- When deleting an ID, hidden Face Sets should be skipped when picking IDs for content filling. This avoids introducing hidden IDs back into the visible geometry even after updating its visibility state.