Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-06-18 08:39:32 +0400
committerMatt Ebb <matt@mke3.net>2010-06-18 08:39:32 +0400
commitbfd0810bebb5e26a89ced4c75a7e877600892537 (patch)
treeafb7e65c93eb05559fb38c7ad07e2e31a15dc1b7 /source/blender/editors/space_graph
parent557f0525eaeb2e093a48915426d90fa17758b1b6 (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/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c26
-rw-r--r--source/blender/editors/space_graph/graph_select.c14
-rw-r--r--source/blender/editors/space_graph/space_graph.c13
3 files changed, 26 insertions, 27 deletions
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);