diff options
Diffstat (limited to 'source/blender/editors')
24 files changed, 165 insertions, 159 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); } } diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 613a3bd99db..408a2e1e599 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -806,7 +806,7 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData } /* send notifiers for this */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } /* Apply the relevant changes to the pose */ diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 207230a914d..4108e1c8532 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -111,7 +111,7 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) fcu->flag &= ~FCURVE_SELECTED; insert_keyframe(id, action, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); - 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/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 541b0cf494f..5ef805e25b4 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1321,7 +1321,7 @@ static int select_all_exec(bContext *C, wmOperator *op) } PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, ob); return OPERATOR_FINISHED; } @@ -1371,7 +1371,7 @@ int PE_mouse_particles(bContext *C, short *mval, int extend) for_mouse_hit_keys(&data, toggle_key_select, 1); /* nearest only */ PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1395,7 +1395,7 @@ static int select_roots_exec(bContext *C, wmOperator *op) foreach_point(&data, select_root); PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1435,7 +1435,7 @@ static int select_tips_exec(bContext *C, wmOperator *op) foreach_point(&data, select_tip); PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1475,7 +1475,7 @@ static int select_linked_exec(bContext *C, wmOperator *op) for_mouse_hit_keys(&data, select_keys, 1); /* nearest only */ PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1541,7 +1541,7 @@ int PE_border_select(bContext *C, rcti *rect, int select, int extend) for_mouse_hit_keys(&data, select_key, 0); PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, ob); return OPERATOR_FINISHED; } @@ -1566,7 +1566,7 @@ int PE_circle_select(bContext *C, int selecting, short *mval, float rad) for_mouse_hit_keys(&data, select_key, 0); PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, ob); return OPERATOR_FINISHED; } @@ -1632,7 +1632,7 @@ int PE_lasso_select(bContext *C, short mcords[][2], short moves, short select) } PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, ob); return OPERATOR_FINISHED; } @@ -1666,7 +1666,7 @@ static int hide_exec(bContext *C, wmOperator *op) } PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, ob); return OPERATOR_FINISHED; } @@ -1708,7 +1708,7 @@ static int reveal_exec(bContext *C, wmOperator *op) } PE_update_selection(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, ob); return OPERATOR_FINISHED; } @@ -1766,7 +1766,7 @@ static int select_less_exec(bContext *C, wmOperator *op) foreach_point(&data, select_less_keys); PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1827,7 +1827,7 @@ static int select_more_exec(bContext *C, wmOperator *op) foreach_point(&data, select_more_keys); PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1864,7 +1864,7 @@ static int select_inverse_exec(bContext *C, wmOperator *op) } PE_update_selection(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob); return OPERATOR_FINISHED; } @@ -1955,7 +1955,7 @@ static int rekey_exec(bContext *C, wmOperator *op) recalc_lengths(data.edit); PE_update_object(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, data.ob); return OPERATOR_FINISHED; } @@ -2260,7 +2260,7 @@ static int subdivide_exec(bContext *C, wmOperator *op) recalc_lengths(data.edit); PE_update_object(data.scene, data.ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, data.ob); return OPERATOR_FINISHED; } @@ -2348,7 +2348,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles.", totremoved); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); return OPERATOR_FINISHED; } @@ -2398,7 +2398,7 @@ static int weight_set_exec(bContext *C, wmOperator *op) } DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); return OPERATOR_FINISHED; } @@ -2575,7 +2575,7 @@ static int delete_exec(bContext *C, wmOperator *op) } DAG_id_flush_update(&data.ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, data.ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, data.ob); return OPERATOR_FINISHED; } @@ -2734,7 +2734,7 @@ static int mirror_exec(bContext *C, wmOperator *op) PE_mirror_x(scene, ob, 0); update_world_cos(ob, edit); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); return OPERATOR_FINISHED; @@ -3519,7 +3519,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) else PE_update_object(scene, ob, 1); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_SELECT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); bedit->lastmouse[0]= mouse[0]; bedit->lastmouse[1]= mouse[1]; @@ -4138,7 +4138,7 @@ static int clear_edited_exec(bContext *C, wmOperator *op) psys->flag &= ~PSYS_EDITED; psys_reset(psys, PSYS_RESET_DEPSGRAPH); - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index b6e3327bd12..01c8ede6a2a 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -99,7 +99,7 @@ static int act_new_exec(bContext *C, wmOperator *op) } /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -379,7 +379,7 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -474,7 +474,7 @@ static int actkeys_insertkey_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -542,7 +542,7 @@ static int actkeys_duplicate_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; // xxx - start transform } @@ -629,7 +629,7 @@ static int actkeys_delete_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -693,7 +693,7 @@ static int actkeys_clean_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -757,7 +757,7 @@ static int actkeys_sample_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -1238,7 +1238,7 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -1355,7 +1355,7 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 33f918c0711..e852afa9a87 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -156,7 +156,7 @@ static int actkeys_deselectall_exec(bContext *C, wmOperator *op) deselect_action_keys(&ac, 1, SELECT_ADD); /* set notifier that keyframe selection have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -317,7 +317,7 @@ static int actkeys_borderselect_exec(bContext *C, wmOperator *op) borderselect_action(&ac, rect, mode, selectmode); /* set notifier that keyframe selection have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -531,7 +531,7 @@ static int actkeys_columnselect_exec(bContext *C, wmOperator *op) columnselect_action_keys(&ac, mode); /* set notifier that keyframe selection have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -589,7 +589,7 @@ static int actkeys_select_linked_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -667,7 +667,7 @@ static int actkeys_select_more_exec (bContext *C, wmOperator *op) select_moreless_action_keys(&ac, SELMAP_MORE); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -701,7 +701,7 @@ static int actkeys_select_less_exec (bContext *C, wmOperator *op) select_moreless_action_keys(&ac, SELMAP_LESS); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -1138,7 +1138,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even } /* set notifier that keyframe selection (and channels too) have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT|ND_ANIMCHAN_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL); /* for tweak grab to work */ return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 41ae6609b80..bad35d9d3e6 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -352,7 +352,7 @@ static void action_listener(ScrArea *sa, wmNotifier *wmn) switch (wmn->category) { case NC_ANIMATION: /* for selection changes of animation data, we can just redraw... otherwise autocolor might need to be done again */ - if (ELEM(wmn->data, ND_KEYFRAME_SELECT, ND_ANIMCHAN_SELECT)) + if (ELEM(wmn->data, ND_KEYFRAME, ND_ANIMCHAN) && (wmn->action == NA_SELECTED)) ED_area_tag_redraw(sa); else ED_area_tag_refresh(sa); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 97cee5c730f..e28fcf8c28a 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -293,8 +293,9 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) buttons_area_redraw(sa, BCONTEXT_CONSTRAINT); buttons_area_redraw(sa, BCONTEXT_BONE_CONSTRAINT); break; - case ND_PARTICLE_DATA: - buttons_area_redraw(sa, BCONTEXT_PARTICLE); + case ND_PARTICLE: + if (wmn->action == NA_EDITED) + buttons_area_redraw(sa, BCONTEXT_PARTICLE); break; case ND_DRAW: buttons_area_redraw(sa, BCONTEXT_OBJECT); @@ -357,8 +358,9 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) break; case NC_ANIMATION: switch(wmn->data) { - case ND_KEYFRAME_EDIT: - ED_area_tag_redraw(sa); + case ND_KEYFRAME: + if (wmn->action == NA_EDITED) + ED_area_tag_redraw(sa); break; } } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index eb4be32658d..6834dfac58a 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -467,7 +467,7 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -531,7 +531,7 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op) MEM_freeN(ale); /* set notifier that keyframes have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -682,7 +682,7 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -740,7 +740,7 @@ static int graphkeys_duplicate_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -820,7 +820,7 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -882,7 +882,7 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -965,7 +965,7 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *op) /* set notifier that keyframes have changed */ // NOTE: some distinction between order/number of keyframes and type should be made? - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); return OPERATOR_FINISHED; } @@ -1085,7 +1085,7 @@ static int graphkeys_sound_bake_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that 'keyframes' have 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 OPERATOR_FINISHED; } @@ -1170,7 +1170,7 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -1690,7 +1690,7 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -1814,7 +1814,7 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -1869,7 +1869,7 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } @@ -2086,7 +2086,7 @@ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op) ANIM_editkeyframes_refresh(&ac); /* set notifier that keyframes have 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 OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 17b0a87b0a8..6a9d8801e28 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -160,7 +160,7 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) deselect_graph_keys(&ac, 1, SELECT_ADD); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -329,7 +329,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) borderselect_graphkeys(&ac, rect, mode, selectmode, incl_handles); /* send notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -520,7 +520,7 @@ static int graphkeys_columnselect_exec(bContext *C, wmOperator *op) columnselect_graph_keys(&ac, mode); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -578,7 +578,7 @@ static int graphkeys_select_linked_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -656,7 +656,7 @@ static int graphkeys_select_more_exec (bContext *C, wmOperator *op) select_moreless_graph_keys(&ac, SELMAP_MORE); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -690,7 +690,7 @@ static int graphkeys_select_less_exec (bContext *C, wmOperator *op) select_moreless_graph_keys(&ac, SELMAP_LESS); /* set notifier that keyframe selection has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -1260,7 +1260,7 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *ev } /* set notifier that keyframe selection (and also channel selection in some cases) has changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_SELECT|ND_ANIMCHAN_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|ND_ANIMCHAN|NA_SELECTED, NULL); /* for tweak grab to work */ return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index e7cee30f374..1e006ca38ec 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -382,9 +382,12 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn) case ND_OB_ACTIVE: case ND_FRAME: case ND_MARKERS: - case ND_SEQUENCER_SELECT: ED_region_tag_redraw(ar); break; + case ND_SEQUENCER: + if (wmn->action == NA_SELECTED) + ED_region_tag_redraw(ar); + break; } break; case NC_OBJECT: @@ -401,13 +404,9 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_NODE: - switch(wmn->data) { - case ND_NODE_SELECT: - ED_region_tag_redraw(ar); - break; - } switch(wmn->action) { case NA_EDITED: + case NA_SELECTED: ED_region_tag_redraw(ar); break; } @@ -432,7 +431,7 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) switch (wmn->category) { case NC_ANIMATION: /* for selection changes of animation data, we can just redraw... otherwise autocolor might need to be done again */ - if (ELEM(wmn->data, ND_KEYFRAME_SELECT, ND_ANIMCHAN_SELECT)) + if (ELEM(wmn->data, ND_KEYFRAME, ND_ANIMCHAN) && (wmn->action == NA_SELECTED)) ED_area_tag_redraw(sa); else ED_area_tag_refresh(sa); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 4deab9d82ab..cf98decb825 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -116,7 +116,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho if (adt) adt->flag |= ADT_UI_SELECTED; } - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; case ANIMTYPE_OBJECT: @@ -157,7 +157,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho adt->flag |= ADT_UI_ACTIVE; /* notifiers - channel was selected */ - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } } break; @@ -194,7 +194,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho ale->adt->flag |= ADT_UI_ACTIVE; } - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } break; @@ -220,21 +220,21 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho nlt->flag ^= NLATRACK_PROTECTED; /* notifier flags - channel was edited */ - notifierFlags |= ND_ANIMCHAN_EDIT; + notifierFlags |= (ND_ANIMCHAN|NA_EDITED); } else if (x >= (v2d->cur.xmax-2*NLACHANNEL_BUTTON_WIDTH)) { /* toggle mute */ nlt->flag ^= NLATRACK_MUTED; /* notifier flags - channel was edited */ - notifierFlags |= ND_ANIMCHAN_EDIT; + notifierFlags |= (ND_ANIMCHAN|NA_EDITED); } else if (x <= ((NLACHANNEL_BUTTON_WIDTH*2)+offset)) { /* toggle 'solo' */ BKE_nlatrack_solo_toggle(adt, nlt); /* notifier flags - channel was edited */ - notifierFlags |= ND_ANIMCHAN_EDIT; + notifierFlags |= (ND_ANIMCHAN|NA_EDITED); } else if (nlaedit_is_tweakmode_on(ac) == 0) { /* set selection */ @@ -253,7 +253,7 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK); /* notifier flags - channel was selected */ - notifierFlags |= ND_ANIMCHAN_SELECT; + notifierFlags |= (ND_ANIMCHAN|NA_SELECTED); } } break; @@ -406,7 +406,7 @@ static int nlaedit_add_tracks_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -462,7 +462,7 @@ static int nlaedit_delete_tracks_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index b017a6102e9..38c6ecdca22 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -311,7 +311,7 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -430,7 +430,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -497,7 +497,7 @@ static int nlaedit_add_meta_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -549,7 +549,7 @@ static int nlaedit_remove_meta_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -639,7 +639,7 @@ static int nlaedit_duplicate_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -727,7 +727,7 @@ static int nlaedit_delete_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -872,7 +872,7 @@ static int nlaedit_split_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -925,7 +925,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -987,7 +987,7 @@ static int nlaedit_toggle_mute_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1061,7 +1061,7 @@ static int nlaedit_move_up_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1135,7 +1135,7 @@ static int nlaedit_move_down_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1211,7 +1211,7 @@ static int nlaedit_sync_actlen_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1312,7 +1312,7 @@ static int nlaedit_apply_scale_exec (bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1375,7 +1375,7 @@ static int nlaedit_clear_scale_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1516,7 +1516,7 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op) ED_nla_postop_refresh(&ac); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1631,7 +1631,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op) BLI_freelistN(&anim_data); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); /* done */ return OPERATOR_FINISHED; @@ -1753,7 +1753,7 @@ static int nla_fmodifier_paste_exec(bContext *C, wmOperator *op) if (ok) { /* set notifier that things have changed */ /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); return OPERATOR_FINISHED; } else { diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 1416e0afdc9..55463580115 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -176,7 +176,7 @@ static int nlaedit_deselectall_exec(bContext *C, wmOperator *op) deselect_nla_strips(&ac, DESELECT_STRIPS_TEST, SELECT_ADD); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -313,7 +313,7 @@ static int nlaedit_borderselect_exec(bContext *C, wmOperator *op) borderselect_nla_strips(&ac, rect, mode, selectmode); /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -570,7 +570,7 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even } /* set notifier that things have changed */ - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_SELECT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_SELECTED, NULL); /* for tweak grab to work */ return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 32e57e29ab0..ccd1555e1a2 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -120,7 +120,7 @@ static int node_select_exec(bContext *C, wmOperator *op) } /* send notifiers */ - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); /* allow tweak event to work too */ return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; @@ -188,7 +188,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -264,7 +264,7 @@ static int node_select_all_exec(bContext *C, wmOperator *op) node->flag |= NODE_SELECT; } - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -304,7 +304,7 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *op) node->flag |= NODE_SELECT; } - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -344,7 +344,7 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *op) node->flag |= NODE_SELECT; } - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -370,7 +370,7 @@ static int node_select_same_type_exec(bContext *C, wmOperator *op) SpaceNode *snode = CTX_wm_space_node(C); node_select_same_type(snode); - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -396,7 +396,7 @@ static int node_select_same_type_next_exec(bContext *C, wmOperator *op) SpaceNode *snode = CTX_wm_space_node(C); node_select_same_type_np(snode, 0); - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } @@ -420,7 +420,7 @@ static int node_select_same_type_prev_exec(bContext *C, wmOperator *op) SpaceNode *snode = CTX_wm_space_node(C); node_select_same_type_np(snode, 1); - WM_event_add_notifier(C, NC_NODE|ND_NODE_SELECT, NULL); + WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 37e05cbc682..aed8472b8d9 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -2222,7 +2222,7 @@ static int tree_element_active_psys(bContext *C, Scene *scene, TreeElement *te, if(set) { Object *ob= (Object *)tselem->id; - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); // XXX extern_set_butspace(F7KEY, 0); } diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 6681fa98747..170b9fbda80 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -239,7 +239,7 @@ static int sequencer_deselect_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -277,7 +277,7 @@ static int sequencer_select_inverse_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -505,7 +505,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } #endif - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); /* allowing tweaks */ return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; @@ -595,7 +595,7 @@ static int sequencer_select_more_exec(bContext *C, wmOperator *op) if(!select_more_less_seq__internal(scene, 0, 0)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -626,7 +626,7 @@ static int sequencer_select_less_exec(bContext *C, wmOperator *op) if(!select_more_less_seq__internal(scene, 1, 0)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -681,7 +681,7 @@ static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEv selected = select_more_less_seq__internal(scene, 1, 1); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -716,7 +716,7 @@ static int sequencer_select_linked_exec(bContext *C, wmOperator *op) selected = select_more_less_seq__internal(scene, 1, 1); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -766,7 +766,7 @@ static int sequencer_select_handles_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -803,7 +803,7 @@ static int sequencer_select_active_side_exec(bContext *C, wmOperator *op) select_active_side(ed->seqbasep, RNA_enum_get(op->ptr, "side"), seq_act->machine, seq_act->startdisp); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -865,7 +865,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 81edb6e4dd7..49c2049c66c 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -357,7 +357,6 @@ static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn) case ND_FRAME: case ND_MARKERS: case ND_SEQUENCER: - case ND_SEQUENCER_SELECT: ED_region_tag_redraw(ar); break; } @@ -408,7 +407,6 @@ static void sequencer_preview_area_listener(ARegion *ar, wmNotifier *wmn) case ND_FRAME: case ND_MARKERS: case ND_SEQUENCER: - case ND_SEQUENCER_SELECT: ED_region_tag_redraw(ar); break; } @@ -450,7 +448,6 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn) switch(wmn->data) { case ND_FRAME: case ND_SEQUENCER: - case ND_SEQUENCER_SELECT: ED_region_tag_redraw(ar); break; } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 8d6b731e850..472379ec6e1 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -523,13 +523,19 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) switch(wmn->category) { case NC_ANIMATION: switch(wmn->data) { - case ND_KEYFRAME_EDIT: case ND_KEYFRAME_PROP: - case ND_NLA_EDIT: case ND_NLA_ACTCHANGE: - case ND_ANIMCHAN_SELECT: ED_region_tag_redraw(ar); break; + case ND_NLA: + case ND_KEYFRAME: + if (wmn->action == NA_EDITED) + ED_region_tag_redraw(ar); + break; + case ND_ANIMCHAN: + if (wmn->action == NA_SELECTED) + ED_region_tag_redraw(ar); + break; } break; case NC_SCENE: @@ -557,8 +563,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) case ND_MODIFIER: case ND_CONSTRAINT: case ND_KEYS: - case ND_PARTICLE_SELECT: - case ND_PARTICLE_DATA: + case ND_PARTICLE: ED_region_tag_redraw(ar); break; } @@ -709,12 +714,15 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) switch(wmn->category) { case NC_ANIMATION: switch(wmn->data) { - case ND_KEYFRAME_EDIT: case ND_KEYFRAME_PROP: - case ND_NLA_EDIT: case ND_NLA_ACTCHANGE: ED_region_tag_redraw(ar); break; + case ND_NLA: + case ND_KEYFRAME: + if (wmn->action == NA_EDITED) + ED_region_tag_redraw(ar); + break; } break; case NC_SCENE: diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 350683f1466..6532a94971d 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -311,14 +311,14 @@ static void viewRedrawForce(const bContext *C, TransInfo *t) } else if (t->spacetype == SPACE_ACTION) { //SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first; - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } else if (t->spacetype == SPACE_IPO) { //SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first; - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } else if (t->spacetype == SPACE_NLA) { - WM_event_add_notifier(C, NC_ANIMATION|ND_NLA_EDIT, NULL); + WM_event_add_notifier(C, NC_ANIMATION|ND_NLA|NA_EDITED, NULL); } else if(t->spacetype == SPACE_NODE) { @@ -344,7 +344,7 @@ static void viewRedrawPost(TransInfo *t) if(t->spacetype == SPACE_VIEW3D) { /* if autokeying is enabled, send notifiers that keyframes were added */ if (IS_AUTOKEY_ON(t->scene)) - WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); + WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); } #if 0 // TRANSFORM_FIX_ME |