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>2010-01-30 08:08:42 +0300
committerJoshua Leung <aligorith@gmail.com>2010-01-30 08:08:42 +0300
commit78934da5c46946b768850005d7bebbbdb4cd3777 (patch)
tree904e367c6babd18ca8b716d32f8cb5a25531dcda /source/blender/blenkernel/intern/anim_sys.c
parente1fdf7fc58573de84fba5514bcdef1749bb61d16 (diff)
A few minor code cleanup tweaks for recent commits in animation code, to better follow conventions elsewhere here :)
Diffstat (limited to 'source/blender/blenkernel/intern/anim_sys.c')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 81871828af2..bcc25b6a60f 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -422,14 +422,17 @@ void BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, char *prefix, c
MEM_freeN(newN);
}
-void BKE_animdata_main_cb(Main *main, void (*func)(ID *, AnimData *, void *), void *user_data)
+/* Whole Database Ops -------------------------------------------- */
+
+/* apply the given callback function on all data in main database */
+void BKE_animdata_main_cb (Main *main, ID_AnimData_Edit_Callback func, void *user_data)
{
ID *id;
#define ANIMDATA_IDS_CB(first) \
for (id= first; id; id= id->next) { \
AnimData *adt= BKE_animdata_from_id(id); \
- if(adt) func(id, adt, user_data); \
+ if (adt) func(id, adt, user_data); \
}
ANIMDATA_IDS_CB(main->nodetree.first); /* nodes */
@@ -450,15 +453,15 @@ void BKE_animdata_main_cb(Main *main, void (*func)(ID *, AnimData *, void *), vo
for (id= main->scene.first; id; id= id->next) {
AnimData *adt= BKE_animdata_from_id(id);
Scene *scene= (Scene *)id;
-
+
/* do compositing nodes first (since these aren't included in main tree) */
if (scene->nodetree) {
AnimData *adt2= BKE_animdata_from_id((ID *)scene->nodetree);
- if(adt2) func(id, adt2, user_data);
+ if (adt2) func(id, adt2, user_data);
}
-
+
/* now fix scene animation data as per normal */
- if(adt) func((ID *)id, adt, user_data);
+ if (adt) func((ID *)id, adt, user_data);
}
}