Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyingsets.c
| Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | static int add_default_keyingset_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void ANIM_OT_keying_set_add(wmOperatorType *ot) | void ANIM_OT_keying_set_add(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Add Empty Keying Set"; | ot->name = "Add Empty Keying Set"; | ||||
| ot->idname = "ANIM_OT_keying_set_add"; | ot->idname = "ANIM_OT_keying_set_add"; | ||||
| ot->description = "Add a new (empty) Keying Set to the active Scene"; | ot->description = "Add a new (empty) keying set to the active Scene"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->exec = add_default_keyingset_exec; | ot->exec = add_default_keyingset_exec; | ||||
| ot->poll = keyingset_poll_default_add; | ot->poll = keyingset_poll_default_add; | ||||
| } | } | ||||
| /* Remove 'Active' Keying Set ------------------------- */ | /* Remove 'Active' Keying Set ------------------------- */ | ||||
| Show All 31 Lines | static int remove_active_keyingset_exec(bContext *C, wmOperator *op) | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void ANIM_OT_keying_set_remove(wmOperatorType *ot) | void ANIM_OT_keying_set_remove(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Remove Active Keying Set"; | ot->name = "Remove Active Keying Set"; | ||||
| ot->idname = "ANIM_OT_keying_set_remove"; | ot->idname = "ANIM_OT_keying_set_remove"; | ||||
| ot->description = "Remove the active Keying Set"; | ot->description = "Remove the active keying set"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->exec = remove_active_keyingset_exec; | ot->exec = remove_active_keyingset_exec; | ||||
| ot->poll = keyingset_poll_active_edit; | ot->poll = keyingset_poll_active_edit; | ||||
| } | } | ||||
| /* Add Empty Keying Set Path ------------------------- */ | /* Add Empty Keying Set Path ------------------------- */ | ||||
| Show All 26 Lines | static int add_empty_ks_path_exec(bContext *C, wmOperator *op) | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void ANIM_OT_keying_set_path_add(wmOperatorType *ot) | void ANIM_OT_keying_set_path_add(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Add Empty Keying Set Path"; | ot->name = "Add Empty Keying Set Path"; | ||||
| ot->idname = "ANIM_OT_keying_set_path_add"; | ot->idname = "ANIM_OT_keying_set_path_add"; | ||||
| ot->description = "Add empty path to active Keying Set"; | ot->description = "Add empty path to active keying set"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->exec = add_empty_ks_path_exec; | ot->exec = add_empty_ks_path_exec; | ||||
| ot->poll = keyingset_poll_active_edit; | ot->poll = keyingset_poll_active_edit; | ||||
| } | } | ||||
| /* Remove Active Keying Set Path ------------------------- */ | /* Remove Active Keying Set Path ------------------------- */ | ||||
| Show All 26 Lines | static int remove_active_ks_path_exec(bContext *C, wmOperator *op) | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void ANIM_OT_keying_set_path_remove(wmOperatorType *ot) | void ANIM_OT_keying_set_path_remove(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Remove Active Keying Set Path"; | ot->name = "Remove Active Keying Set Path"; | ||||
| ot->idname = "ANIM_OT_keying_set_path_remove"; | ot->idname = "ANIM_OT_keying_set_path_remove"; | ||||
| ot->description = "Remove active Path from active Keying Set"; | ot->description = "Remove active Path from active keying set"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->exec = remove_active_ks_path_exec; | ot->exec = remove_active_ks_path_exec; | ||||
| ot->poll = keyingset_poll_activePath_edit; | ot->poll = keyingset_poll_activePath_edit; | ||||
| } | } | ||||
| /* ************************************************** */ | /* ************************************************** */ | ||||
| /* KEYING SETS - OPERATORS (for use in UI menus) */ | /* KEYING SETS - OPERATORS (for use in UI menus) */ | ||||
| ▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | if (ptr.owner_id && ptr.data && prop) { | ||||
| } | } | ||||
| } | } | ||||
| if (changed) { | if (changed) { | ||||
| /* send updates */ | /* send updates */ | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL); | WM_event_add_notifier(C, NC_SCENE | ND_KEYINGSET, NULL); | ||||
| /* show warning */ | /* show warning */ | ||||
| BKE_report(op->reports, RPT_INFO, "Property removed from Keying Set"); | BKE_report(op->reports, RPT_INFO, "Property removed from keying set"); | ||||
| } | } | ||||
| return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; | return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; | ||||
| } | } | ||||
| void ANIM_OT_keyingset_button_remove(wmOperatorType *ot) | void ANIM_OT_keyingset_button_remove(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| void ANIM_OT_keying_set_active_set(wmOperatorType *ot) | void ANIM_OT_keying_set_active_set(wmOperatorType *ot) | ||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Set Active Keying Set"; | ot->name = "Set Active Keying Set"; | ||||
| ot->idname = "ANIM_OT_keying_set_active_set"; | ot->idname = "ANIM_OT_keying_set_active_set"; | ||||
| ot->description = "Select a new keying set as the active one"; | ot->description = "Set a new active keying set"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->invoke = keyingset_active_menu_invoke; | ot->invoke = keyingset_active_menu_invoke; | ||||
| ot->exec = keyingset_active_menu_exec; | ot->exec = keyingset_active_menu_exec; | ||||
| ot->poll = ED_operator_areaactive; | ot->poll = ED_operator_areaactive; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| ▲ Show 20 Lines • Show All 682 Lines • Show Last 20 Lines | |||||