Brecht Van Lommel (brecht) Campbell Barton (campbellbarton) Bastien Montagne (mont29)
- Maniphest Tasks
- T65357: after applying a boolean mod, faces are initialized with a facemap index of 0 instead of -1
- rBbe52b25d3953: Fix T65357: wrong facemap indices after applying a boolean modifier
I think there is a deeper issue here, booleans should not have to do anything specifically for facemaps.
BM_mesh_bm_from_me seems to be using CD_CALLOC, using CD_DEFAULT instead may help?
- in CustomData_bmesh_merge, CustomData_merge is called [in which customData_add_layer__internal would take care of layer creation/data init nicely if CD_DEFAULT is used], but we are calling it with totelem=0
- (this is just for detecting if a change to customdata would take place at all...)
- dont see another place where CD_DEFAULT would kick in
- then CustomData_bmesh_copy_data copies data of existing layers into the (merged) customdata-layout [this initializes with 0 and then copies stuff over], so no call to LayerTypeInfo->set_default()...
So instead of the previous solution, I have added code to CustomData_bmesh_copy_data that would take care of setting to default, will post in a bit...
This seems to work nicely (e.g. also vertex colors are now initialized to white)
This is fine, I'll commit a modified version that uses the same logic as CustomData_to_bmesh_block to avoid having two variations.
As far as I can tell it is not needed to make this optional.