Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_boolean.c
| Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | #endif | ||||
| false, | false, | ||||
| false, | false, | ||||
| bmd->operation, | bmd->operation, | ||||
| bmd->double_threshold); | bmd->double_threshold); | ||||
| MEM_freeN(looptris); | MEM_freeN(looptris); | ||||
| } | } | ||||
| result = BKE_mesh_from_bmesh_for_eval_nomain(bm, 0); | result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL); | ||||
| BM_mesh_free(bm); | BM_mesh_free(bm); | ||||
| result->runtime.cd_dirty_vert |= CD_MASK_NORMAL; | result->runtime.cd_dirty_vert |= CD_MASK_NORMAL; | ||||
| #ifdef DEBUG_TIME | #ifdef DEBUG_TIME | ||||
| TIMEIT_END(boolean_bmesh); | TIMEIT_END(boolean_bmesh); | ||||
| #endif | #endif | ||||
| } | } | ||||
| /* if new mesh returned, return it; otherwise there was | /* if new mesh returned, return it; otherwise there was | ||||
| * an error, so delete the modifier object */ | * an error, so delete the modifier object */ | ||||
| if (result == NULL) | if (result == NULL) | ||||
| modifier_setError(md, "Cannot execute boolean operation"); | modifier_setError(md, "Cannot execute boolean operation"); | ||||
| } | } | ||||
| return result; | return result; | ||||
| } | } | ||||
| static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md)) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md), CustomData_Masks *r_cddata_masks) | ||||
| { | { | ||||
| CustomDataMask dataMask = CD_MASK_MTFACE | CD_MASK_MEDGE; | r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | ||||
| r_cddata_masks->emask |= CD_MASK_MEDGE; | |||||
| dataMask |= CD_MASK_MDEFORMVERT; | r_cddata_masks->fmask |= CD_MASK_MTFACE; | ||||
| return dataMask; | |||||
| } | } | ||||
| ModifierTypeInfo modifierType_Boolean = { | ModifierTypeInfo modifierType_Boolean = { | ||||
| /* name */ "Boolean", | /* name */ "Boolean", | ||||
| /* structName */ "BooleanModifierData", | /* structName */ "BooleanModifierData", | ||||
| /* structSize */ sizeof(BooleanModifierData), | /* structSize */ sizeof(BooleanModifierData), | ||||
| /* type */ eModifierTypeType_Nonconstructive, | /* type */ eModifierTypeType_Nonconstructive, | ||||
| /* flags */ eModifierTypeFlag_AcceptsMesh | | /* flags */ eModifierTypeFlag_AcceptsMesh | | ||||
| Show All 27 Lines | |||||