diff options
author | Matt Ebb <matt@mke3.net> | 2010-06-18 08:39:32 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-06-18 08:39:32 +0400 |
commit | bfd0810bebb5e26a89ced4c75a7e877600892537 (patch) | |
tree | afb7e65c93eb05559fb38c7ad07e2e31a15dc1b7 /source/blender/editors/animation | |
parent | 557f0525eaeb2e093a48915426d90fa17758b1b6 (diff) |
Notifier cleanup - replaced ND_*_EDIT and ND_*_SELECT data notifiers
with the generic action equivalents (NA_EDITED and new NA_SELECTED)
Diffstat (limited to 'source/blender/editors/animation')
5 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 3f00c1abe68..fee66384e65 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -2858,7 +2858,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float /* callback for (normal) widget settings - send notifiers */ static void achannel_setting_widget_cb(bContext *C, void *poin, void *poin2) { - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); } /* callback for widget settings that need flushing */ @@ -2872,7 +2872,7 @@ static void achannel_setting_flush_widget_cb(bContext *C, void *ale_npoin, void short on = 0; /* send notifiers before doing anything else... */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); /* verify animation context */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -2936,7 +2936,7 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi done= insert_keyframe_direct(ptr, prop, fcu, cfra, flag); if (done) - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); } } @@ -2978,7 +2978,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi done= insert_keyframe_direct(ptr, prop, fcu, cfra, flag); if (done) - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); } /* free the path */ diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index bdaf0bf700a..21bdb591df9 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -842,7 +842,7 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) rearrange_action_channels(&ac, mode); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -998,7 +998,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *op) } /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1075,7 +1075,7 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *op) /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1148,7 +1148,7 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *op) BLI_freelistN(&all_data); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1279,7 +1279,7 @@ static int animchannels_setflag_exec(bContext *C, wmOperator *op) setflag_anim_channels(&ac, setting, mode, 1, flush); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1413,7 +1413,7 @@ static int animchannels_expand_exec (bContext *C, wmOperator *op) setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_ADD, onlysel, 0); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1455,7 +1455,7 @@ static int animchannels_collapse_exec (bContext *C, wmOperator *op) setflag_anim_channels(&ac, ACHANNEL_SETTING_EXPAND, ACHANNEL_SETFLAG_CLEAR, onlysel, 0); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1495,7 +1495,7 @@ static int animchannels_deselectall_exec(bContext *C, wmOperator *op) ANIM_deselect_anim_channels(&ac, ac.data, ac.datatype, 1, ACHANNEL_SETFLAG_ADD); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -1597,7 +1597,7 @@ static int animchannels_borderselect_exec(bContext *C, wmOperator *op) borderselect_anim_channels(&ac, &rect, selectmode); /* send notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -1676,7 +1676,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh if (adt) adt->flag |= ADT_UI_SELECTED; } - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; case ANIMTYPE_OBJECT: @@ -1715,7 +1715,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh if ((adt) && (adt->flag & ADT_UI_SELECTED)) adt->flag |= ADT_UI_ACTIVE; - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; @@ -1751,7 +1751,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh ale->adt->flag |= ADT_UI_ACTIVE; } - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; @@ -1786,7 +1786,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh if (agrp->flag & AGRP_SELECTED) ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; case ANIMTYPE_FCURVE: @@ -1808,7 +1808,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh if (fcu->flag & FCURVE_SELECTED) ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; case ANIMTYPE_SHAPEKEY: @@ -1826,7 +1826,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh kb->flag |= KEYBLOCK_SEL; } - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; case ANIMTYPE_GPDATABLOCK: @@ -1836,7 +1836,7 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh /* toggle expand */ gpd->flag ^= GP_DATA_EXPAND; - notifierFlags |= ND_ANIMCHAN_EDIT; + notifierFlags |= (ND_ANIMCHAN|NA_EDITED); } break; case ANIMTYPE_GPLAYER: diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 3bd8b50c889..cd6714ec51f 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -95,7 +95,7 @@ static void delete_fmodifier_cb (bContext *C, void *fmods_v, void *fcm_v) /* send notifiers */ // XXX for now, this is the only way to get updates in all the right places... but would be nice to have a special one in this case - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } /* --------------- */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 5089d58883a..882fb3e91dc 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1094,7 +1094,7 @@ static int insert_key_exec (bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "Successfully added %d Keyframes for KeyingSet '%s'", success, ks->name); /* send notifiers that keyframes have been changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } else BKE_report(op->reports, RPT_WARNING, "Keying Set failed to insert any keyframes"); @@ -1236,7 +1236,7 @@ static int delete_key_exec (bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "Successfully removed %d Keyframes for KeyingSet '%s'", success, ks->name); /* send notifiers that keyframes have been changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } else BKE_report(op->reports, RPT_WARNING, "Keying Set failed to remove any keyframes"); @@ -1397,7 +1397,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op) DAG_ids_flush_update(0); /* send notifiers that keyframes have been changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; @@ -1467,7 +1467,7 @@ static int delete_key_button_exec (bContext *C, wmOperator *op) DAG_ids_flush_update(0); /* send notifiers that keyframes have been changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 49b8c1101d6..f496cec7b39 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -924,7 +924,7 @@ int ANIM_apply_keyingset (bContext *C, ListBase *dsources, bAction *act, KeyingS } /* send notifiers for updates (this doesn't require context to work!) */ - WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } } |