Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_gpencil_modifier.c
| Show First 20 Lines • Show All 590 Lines • ▼ Show 20 Lines | void OBJECT_OT_gpencil_modifier_move_down(wmOperatorType *ot) | ||||
| gpencil_edit_modifier_properties(ot); | gpencil_edit_modifier_properties(ot); | ||||
| } | } | ||||
| /************************ apply modifier operator *********************/ | /************************ apply modifier operator *********************/ | ||||
| static int gpencil_modifier_apply_exec(bContext *C, wmOperator *op) | static int gpencil_modifier_apply_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Object *ob = ED_object_active_context(C); | Object *ob = ED_object_active_context(C); | ||||
| GpencilModifierData *md = gpencil_edit_modifier_property_get(op, ob, 0); | GpencilModifierData *md = gpencil_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_gpencil_modifier_apply(bmain, op->reports, depsgraph, ob, md, apply_as)) { | if (!md || !ED_object_gpencil_modifier_apply(bmain, op->reports, depsgraph, ob, md, apply_as)) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines | |||||