Files
test2/source
Philipp Oeser 481094ff5c Fix #114760: new attribute does not get active for some domains
Problem here is that `BKE_id_attribute_to_index` [which
`BKE_id_attributes_active_set` uses] does not match
`BKE_id_attribute_from_index` which can lead to "wrong" indices (there
are "wrong" layers included while iterating such as ".corner_vert" or
".corner_edge" for faces).

Deeper reason is that `get_domains_types` swaps `ATTR_DOMAIN_FACE` and
`ATTR_DOMAIN_CORNER` (originally introduced in eae36be372 -- but unclear
at this point why this was done). Historically, this was used for operators
[vertex color rotate/inverse] introduced in c75e1598dd & 771a4dee0b,
assumption is that eae36be372 was trying to make this more generic and make
it work for other domains as well (ATTR_DOMAIN_MASK_COLOR -- the tootip
was also changed from "Rotate vertex colors inside faces" to "Rotate color
attributes inside faces"), however, at this point in time the tools clearly only work
for the corner domain (and this was made more specific in ee18b625ca as well).

So now, remove the swapping all together and make
`BKE_id_attribute_from_index` & `BKE_id_attribute_to_index` in sync.

Also change the tooltip of said operators to use "face corner color attribute".

Pull Request: https://projects.blender.org/blender/blender/pulls/114797
2023-12-07 15:33:28 +01:00
..