Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_modifier.c
| Show First 20 Lines • Show All 1,127 Lines • ▼ Show 20 Lines | static int modifier_apply_exec(bContext *C, wmOperator *op) | ||||
| ModifierData *md = edit_modifier_property_get(op, ob, 0); | ModifierData *md = edit_modifier_property_get(op, ob, 0); | ||||
| int apply_as = RNA_enum_get(op->ptr, "apply_as"); | int apply_as = RNA_enum_get(op->ptr, "apply_as"); | ||||
| if (!md || !ED_object_modifier_apply(bmain, op->reports, depsgraph, scene, ob, md, apply_as)) { | if (!md || !ED_object_modifier_apply(bmain, op->reports, depsgraph, scene, ob, md, apply_as)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | ||||
| DEG_relations_tag_update(bmain); | |||||
| WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); | WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| if (edit_modifier_invoke_properties(C, op)) { | if (edit_modifier_invoke_properties(C, op)) { | ||||
| ▲ Show 20 Lines • Show All 1,382 Lines • Show Last 20 Lines | |||||