Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_edit.c
| Show First 20 Lines • Show All 1,574 Lines • ▼ Show 20 Lines | else { | ||||
| } | } | ||||
| /* free temp data */ | /* free temp data */ | ||||
| ANIM_animdata_freelist(&anim_data); | ANIM_animdata_freelist(&anim_data); | ||||
| } | } | ||||
| /* send notifier that things have changed */ | /* send notifier that things have changed */ | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); | WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ORDER, NULL); | |||||
Severin: This shouldn't send Outliner notifiers IMHO. Animation operators should send animation… | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static void ANIM_OT_channels_move(wmOperatorType *ot) | static void ANIM_OT_channels_move(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Move Channels"; | ot->name = "Move Channels"; | ||||
| ▲ Show 20 Lines • Show All 1,304 Lines • ▼ Show 20 Lines | static int animchannels_rename_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) | ||||
| if (ANIM_animdata_get_context(C, &ac) == 0) { | if (ANIM_animdata_get_context(C, &ac) == 0) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| channel_index = animchannels_channel_get(&ac, event->mval); | channel_index = animchannels_channel_get(&ac, event->mval); | ||||
| /* handle click */ | /* handle click */ | ||||
| if (rename_anim_channels(&ac, channel_index)) { | if (rename_anim_channels(&ac, channel_index)) { | ||||
| WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, NULL); | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| /* allow event to be handled by selectall operator */ | /* allow event to be handled by selectall operator */ | ||||
| return OPERATOR_PASS_THROUGH; | return OPERATOR_PASS_THROUGH; | ||||
| } | } | ||||
| static void ANIM_OT_channels_rename(wmOperatorType *ot) | static void ANIM_OT_channels_rename(wmOperatorType *ot) | ||||
| ▲ Show 20 Lines • Show All 680 Lines • Show Last 20 Lines | |||||
This shouldn't send Outliner notifiers IMHO. Animation operators should send animation notifiers, it's the Outliners responsibility to listen to the notifiers correctly.
Space notifiers should only be send if space data changes, not scene data.
Same applies to the cases below of course.