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/animation/anim_deps.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/animation/anim_deps.c')
-rw-r--r--source/blender/editors/animation/anim_deps.c70
1 files changed, 4 insertions, 66 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c
index 1ff2169bf61..13667159fe0 100644
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@ -77,72 +77,6 @@ void ED_anim_object_flush_update(const bContext *C, Object *ob)
}
-/* **************************** animation tool notifiers ******************************** */
-
-/* Send notifiers on behalf of animation editing tools, based on various context info
- * - data_changed: eAnimData_Changed
- */
-void ANIM_animdata_send_notifiers (bContext *C, bAnimContext *ac, short data_changed)
-{
- /* types of notifiers to send, depends on the editor context */
- switch (ac->datatype) {
- case ANIMCONT_DOPESHEET: /* dopesheet */
- case ANIMCONT_FCURVES: /* fcurve editor */
- case ANIMCONT_DRIVERS: /* drivers editor */ // XXX probably this will need separate handling, since these are part of dependency system
- {
- /* what action was taken */
- switch (data_changed) {
- case ANIM_CHANGED_KEYFRAMES_VALUES:
- /* keyframe values changed, so transform may have changed */
- // XXX what about other cases? maybe we need general ND_KEYFRAMES or ND_ANIMATION?
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS|ND_TRANSFORM, NULL);
- break;
- case ANIM_CHANGED_KEYFRAMES_SELECT:
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, NULL);
- break;
- case ANIM_CHANGED_CHANNELS:
- // XXX err... check available datatypes in dopesheet first?
- // FIXME: this currently doesn't work (to update own view)
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE|ND_OB_SELECT, ac->scene);
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE|ND_BONE_SELECT, NULL);
- break;
- }
-
- // XXX for now, at least update own editor!
- ED_area_tag_redraw(CTX_wm_area(C));
- }
- break;
-
- case ANIMCONT_ACTION: /* action editor */
- {
- Object *obact= CTX_data_active_object(C);
-
- switch (data_changed) {
- case ANIM_CHANGED_KEYFRAMES_VALUES:
- /* keyframe values changed, so transform may have changed */
- // XXX what about other cases? maybe we need general ND_KEYFRAMES or ND_ANIMATION?
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS|ND_TRANSFORM, obact);
- break;
- case ANIM_CHANGED_KEYFRAMES_SELECT:
- WM_event_add_notifier(C, NC_OBJECT|ND_KEYS, obact);
- break;
- case ANIM_CHANGED_CHANNELS:
- // XXX err... check available datatypes in dopesheet first?
- // FIXME: this currently doesn't work (to update own view)
- WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE|ND_BONE_SELECT, obact);
- break;
- }
-
- // XXX for now, at least update own editor!
- ED_area_tag_redraw(CTX_wm_area(C));
- }
- break;
-
- default: /* some other data... just update area for now */
- ED_area_tag_redraw(CTX_wm_area(C));
- }
-}
-
/* **************************** pose <-> action syncing ******************************** */
/* Summary of what needs to be synced between poses and actions:
* 1) Flags
@@ -152,6 +86,10 @@ void ANIM_animdata_send_notifiers (bContext *C, bAnimContext *ac, short data_cha
* 3) Grouping (only for pose to action for now)
*/
+/* XXX OBSOLETE CODE WARNING:
+ * With the Animato system, the code below is somewhat obsolete now...
+ */
+
/* Notifier from Action/Dopesheet (this may be extended to include other things such as Python...)
* Channels in action changed, so update pose channels/groups to reflect changes.
*