Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mask/mask_relationships.c
| Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| } | } | ||||
| WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); | WM_event_add_notifier(C, NC_MASK | ND_DATA, mask); | ||||
| DEG_id_tag_update(&mask->id, 0); | DEG_id_tag_update(&mask->id, 0); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| /** based on #OBJECT_OT_parent_set */ | |||||
| void MASK_OT_parent_set(wmOperatorType *ot) | void MASK_OT_parent_set(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Make Parent"; | ot->name = "Make Parent"; | ||||
| ot->description = "Set the mask's parenting"; | ot->description = "Set the mask's parenting"; | ||||
| ot->idname = "MASK_OT_parent_set"; | ot->idname = "MASK_OT_parent_set"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| // ot->invoke = mask_parent_set_invoke; | // ot->invoke = mask_parent_set_invoke; | ||||
| ot->exec = mask_parent_set_exec; | ot->exec = mask_parent_set_exec; | ||||
| ot->poll = ED_space_clip_maskedit_mask_poll; | ot->poll = ED_space_clip_maskedit_mask_poll; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| } | } | ||||