Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/keyframing.c
| Context not available. | |||||
| * it is more useful for animators working in the 3D view. | * it is more useful for animators working in the 3D view. | ||||
| */ | */ | ||||
| static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) | static int clear_anim_v3d_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| CTX_DATA_BEGIN (C, Object *, ob, selected_objects) | CTX_DATA_BEGIN (C, Object *, ob, selected_objects) | ||||
| { | { | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| /* notify user */ | |||||
| BKE_reportf(op->reports, RPT_INFO, "Keyframes removed from object '%s'", ob->id->name); | |||||
brecht: There should only be one info message for the operator I think, not one for each object. As… | |||||
| /* update... */ | /* update... */ | ||||
| DAG_id_tag_update(&ob->id, OB_RECALC_OB); | DAG_id_tag_update(&ob->id, OB_RECALC_OB); | ||||
| } | } | ||||
| CTX_DATA_END; | CTX_DATA_END; | ||||
| /* send updates */ | /* send updates */ | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, NULL); | WM_event_add_notifier(C, NC_OBJECT | ND_KEYS, NULL); | ||||
Not Done Inline ActionsThe correct message would be: "Deleted %d animation f-curves from selected objects.", as you aren't counting the objects here. brecht: The correct message would be: "Deleted %d animation f-curves from selected objects.", as you… | |||||
| Context not available. | |||||
| ot->idname = "ANIM_OT_keyframe_clear_v3d"; | ot->idname = "ANIM_OT_keyframe_clear_v3d"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->invoke = WM_operator_confirm; | |||||
| ot->exec = clear_anim_v3d_exec; | ot->exec = clear_anim_v3d_exec; | ||||
| ot->poll = ED_operator_areaactive; | ot->poll = ED_operator_areaactive; | ||||
| Context not available. | |||||
| ot->idname = "ANIM_OT_keyframe_delete_v3d"; | ot->idname = "ANIM_OT_keyframe_delete_v3d"; | ||||
| /* callbacks */ | /* callbacks */ | ||||
| ot->invoke = WM_operator_confirm; | |||||
| ot->exec = delete_key_v3d_exec; | ot->exec = delete_key_v3d_exec; | ||||
| ot->poll = ED_operator_areaactive; | ot->poll = ED_operator_areaactive; | ||||
| Context not available. | |||||
There should only be one info message for the operator I think, not one for each object. As only one message is shown at the time, it would only show one object as modified and that's misleading, so better don't show objects names at all, but rather something like "Keyframes removed from %d objects".
The other things is that this should check that some fcurve was in fact removed for this object.