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:
authorJoshua Leung <aligorith@gmail.com>2009-07-10 14:48:25 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-10 14:48:25 +0400
commit6f0de59c551235d5e26281eca6e172d08ff5eb73 (patch)
tree6a119fd0740cf21854a8d34919d5780a677c86aa /source/blender/editors/space_graph/graph_edit.c
parentb1a9281ed801ae8b2483cd4246880b1009efe955 (diff)
NLA SoC: Notifier Fixes for Animation Editors
I've gone through all the Animation Editor operators, making sure they send appropriate notifiers, and that these notifiers are handled. * Added a separate category for animation-related notifiers, since the old-style ones attached to specific datatypes only was turning out to be not too feasible. * For now, the focus has been on making sure that all Animation Editors update when there have been any potentially suitable changes at all. Later on, we can filter these more carefully to only take the ones we really need (for optimisation purposes)
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 86970f3565c..1837b6d4ecd 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -474,8 +474,8 @@ static int graphkeys_insertkey_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -532,8 +532,8 @@ static int graphkeys_click_insert_exec (bContext *C, wmOperator *op)
/* free temp data */
MEM_freeN(ale);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
/* done */
return OPERATOR_FINISHED;
@@ -644,9 +644,7 @@ static int graphkeys_copy_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
-
+ /* just return - no operator needed here (no changes) */
return OPERATOR_FINISHED;
}
@@ -683,8 +681,8 @@ static int graphkeys_paste_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -740,8 +738,8 @@ static int graphkeys_duplicate_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -811,8 +809,8 @@ static int graphkeys_delete_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -872,8 +870,8 @@ static int graphkeys_clean_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -953,8 +951,9 @@ static int graphkeys_bake_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* 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);
return OPERATOR_FINISHED;
}
@@ -1079,8 +1078,8 @@ static int graphkeys_sample_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -1153,8 +1152,8 @@ static int graphkeys_expo_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
@@ -1221,8 +1220,8 @@ static int graphkeys_ipo_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframe properties have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
@@ -1309,7 +1308,7 @@ static int graphkeys_handletype_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
return OPERATOR_FINISHED;
}
@@ -1554,8 +1553,8 @@ static int graphkeys_snap_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -1665,8 +1664,8 @@ static int graphkeys_mirror_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -1719,8 +1718,8 @@ static int graphkeys_smooth_exec(bContext *C, wmOperator *op)
/* validate keyframes after editing */
ANIM_editkeyframes_refresh(&ac);
- /* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_KEYFRAMES_VALUES);
+ /* set notifier that keyframes have changed */
+ WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME_EDIT, NULL);
return OPERATOR_FINISHED;
}
@@ -1810,7 +1809,8 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
ANIM_editkeyframes_refresh(&ac);
/* set notifier that things have changed */
- ANIM_animdata_send_notifiers(C, &ac, ANIM_CHANGED_BOTH);
+ // FIXME: this really isn't the best description for it...
+ WM_event_add_notifier(C, NC_ANIMATION, NULL);
return OPERATOR_FINISHED;
}