Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_boolean_util.c
| Context not available. | |||||
| { | { | ||||
| float (*cos_3d)[3] = BLI_array_alloca(cos_3d, source_poly->totloop); | float (*cos_3d)[3] = BLI_array_alloca(cos_3d, source_poly->totloop); | ||||
| int *source_indices = BLI_array_alloca(source_indices, source_poly->totloop); | int *source_indices = BLI_array_alloca(source_indices, source_poly->totloop); | ||||
| int *source_vert_indices = BLI_array_alloca(source_vert_indices, source_poly->totloop); | |||||
campbellbarton: Improvements to boolean should be handled separately (Sergey, mind checking?) | |||||
| float *weights = BLI_array_alloca(weights, source_poly->totloop); | float *weights = BLI_array_alloca(weights, source_poly->totloop); | ||||
| int i; | int i; | ||||
| int target_vert_index = target_mloop[target_loop_index].v; | int target_vert_index = target_mloop[target_loop_index].v; | ||||
| Context not available. | |||||
| MLoop *mloop = &source_mloops[source_poly->loopstart + i]; | MLoop *mloop = &source_mloops[source_poly->loopstart + i]; | ||||
| source_indices[i] = source_poly->loopstart + i; | source_indices[i] = source_poly->loopstart + i; | ||||
| copy_v3_v3(cos_3d[i], source_mverts[mloop->v].co); | copy_v3_v3(cos_3d[i], source_mverts[mloop->v].co); | ||||
| source_vert_indices[i] = mloop->v; | |||||
| } | } | ||||
| if (transform) { | if (transform) { | ||||
| Context not available. | |||||
| DM_interp_loop_data(source_dm, target_dm, source_indices, weights, | DM_interp_loop_data(source_dm, target_dm, source_indices, weights, | ||||
| source_poly->totloop, target_loop_index); | source_poly->totloop, target_loop_index); | ||||
| /* interpolate vertex data as well, for painted weights interpolation on fracture modifier */ | |||||
| DM_interp_vert_data(source_dm, target_dm, source_vert_indices ,weights, | |||||
Not Done Inline ActionsThis doesn't seem to belong to loop_set function? sergey: This doesn't seem to belong to loop_set function? | |||||
| source_poly->totloop, target_vert_index); | |||||
| } | } | ||||
| typedef struct DMArrays { | typedef struct DMArrays { | ||||
| Context not available. | |||||
| allocate_custom_layers(&dm->loopData, CD_MLOOPUV, num_loops, | allocate_custom_layers(&dm->loopData, CD_MLOOPUV, num_loops, | ||||
| CustomData_number_of_layers(&dm_right->loopData, CD_MLOOPUV)); | CustomData_number_of_layers(&dm_right->loopData, CD_MLOOPUV)); | ||||
| /* also allocate layers for vertex weights, | |||||
Not Done Inline ActionsAllocating layers for left & right seems risky, since the indices will collide between the 2, better just use the right, if they are aligned its OK, otherwise its unsupported to support a true, name based merge. campbellbarton: Allocating layers for left & right seems risky, since the indices will collide between the 2… | |||||
| * for painted weights interpolation on fracture modifier */ | |||||
| allocate_custom_layers(&dm->vertData, CD_MDEFORMVERT, num_verts, | |||||
| CustomData_number_of_layers(&dm_left->vertData, CD_MDEFORMVERT)); | |||||
| allocate_custom_layers(&dm->vertData, CD_MDEFORMVERT, num_verts, | |||||
| CustomData_number_of_layers(&dm_right->vertData, CD_MDEFORMVERT)); | |||||
| /* Merge custom data layers from operands. | /* Merge custom data layers from operands. | ||||
| * | * | ||||
| * Will only create custom data layers for all the layers which appears in | * Will only create custom data layers for all the layers which appears in | ||||
| Context not available. | |||||
Improvements to boolean should be handled separately (Sergey, mind checking?)