Cleanup: use BKE_animdata_* prefix
authorCampbell Barton <ideasman42@gmail.com>
Sat, 4 Apr 2015 04:13:56 +0000 (15:13 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 4 Apr 2015 04:13:56 +0000 (15:13 +1100)
40 files changed:
source/blender/blenkernel/BKE_animsys.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lamp.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/linestyle.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/speaker.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/armature_naming.c
source/blender/editors/armature/armature_relations.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_relations.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c

index 0acfd40a110dd88efc527b1d4e2e40378c5e60cd..a8e430c78dff8918aad8f8e2c2687712d07ace94 100644 (file)
@@ -56,22 +56,22 @@ bool id_type_can_have_animdata(struct ID *id);
 struct AnimData *BKE_animdata_from_id(struct ID *id);
 
 /* Add AnimData to the given ID-block */
-struct AnimData *BKE_id_add_animdata(struct ID *id);
+struct AnimData *BKE_animdata_add_id(struct ID *id);
 
 /* Set active action used by AnimData from the given ID-block */
 bool BKE_animdata_set_action(struct ReportList *reports, struct ID *id, struct bAction *act);
 
 /* Free AnimData */
-void BKE_free_animdata(struct ID *id);
+void BKE_animdata_free(struct ID *id);
 
 /* Copy AnimData */
-struct AnimData *BKE_copy_animdata(struct AnimData *adt, const bool do_action);
+struct AnimData *BKE_animdata_copy(struct AnimData *adt, const bool do_action);
 
 /* Copy AnimData */
-bool BKE_copy_animdata_id(struct ID *id_to, struct ID *id_from, const bool do_action);
+bool BKE_animdata_copy_id(struct ID *id_to, struct ID *id_from, const bool do_action);
 
 /* Copy AnimData Actions */
-void BKE_copy_animdata_id_action(struct ID *id);
+void BKE_animdata_copy_id_action(struct ID *id);
 
 /* Merge copies of data from source AnimData block */
 typedef enum eAnimData_MergeCopy_Modes {
@@ -91,7 +91,7 @@ void BKE_animdata_merge_copy(struct ID *dst_id, struct ID *src_id, eAnimData_Mer
 void BKE_animdata_make_local(struct AnimData *adt);
 
 /* Re-Assign ID's */
-void BKE_relink_animdata(struct AnimData *adt);
+void BKE_animdata_relink(struct AnimData *adt);
 
 /* ************************************* */
 /* KeyingSets API */
@@ -134,7 +134,7 @@ void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, st
                                    bool verify_paths);
 
 /* Fix all the paths for the entire database... */
-void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const char *oldName, const char *newName);
+void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const char *oldName, const char *newName);
 
 /* Fix the path after removing elements that are not ID (e.g., node) */
 void BKE_animdata_fix_paths_remove(struct ID *id, const char *path);
index b4c396d38d2b28ea7649da399dc12b6e1aeae855..3c98d11dbdb8d7a3a9e1ce5f115877c27f447632 100644 (file)
@@ -134,7 +134,7 @@ AnimData *BKE_animdata_from_id(ID *id)
  * the AnimData pointer is stored immediately after the given ID-block in the struct,
  * as per IdAdtTemplate. Also note that 
  */
-AnimData *BKE_id_add_animdata(ID *id)
+AnimData *BKE_animdata_add_id(ID *id)
 {
        /* Only some ID-blocks have this info for now, so we cast the 
         * types that do to be of type IdAdtTemplate, and add the AnimData
@@ -216,7 +216,7 @@ bool BKE_animdata_set_action(ReportList *reports, ID *id, bAction *act)
 /* Freeing -------------------------------------------- */
 
 /* Free AnimData used by the nominated ID-block, and clear ID-block's AnimData pointer */
-void BKE_free_animdata(ID *id)
+void BKE_animdata_free(ID *id)
 {
        /* Only some ID-blocks have this info for now, so we cast the 
         * types that do to be of type IdAdtTemplate
@@ -253,7 +253,7 @@ void BKE_free_animdata(ID *id)
 /* Copying -------------------------------------------- */
 
 /* Make a copy of the given AnimData - to be used when copying datablocks */
-AnimData *BKE_copy_animdata(AnimData *adt, const bool do_action)
+AnimData *BKE_animdata_copy(AnimData *adt, const bool do_action)
 {
        AnimData *dadt;
        
@@ -285,25 +285,25 @@ AnimData *BKE_copy_animdata(AnimData *adt, const bool do_action)
        return dadt;
 }
 
-bool BKE_copy_animdata_id(ID *id_to, ID *id_from, const bool do_action)
+bool BKE_animdata_copy_id(ID *id_to, ID *id_from, const bool do_action)
 {
        AnimData *adt;
 
        if ((id_to && id_from) && (GS(id_to->name) != GS(id_from->name)))
                return false;
 
-       BKE_free_animdata(id_to);
+       BKE_animdata_free(id_to);
 
        adt = BKE_animdata_from_id(id_from);
        if (adt) {
                IdAdtTemplate *iat = (IdAdtTemplate *)id_to;
-               iat->adt = BKE_copy_animdata(adt, do_action);
+               iat->adt = BKE_animdata_copy(adt, do_action);
        }
 
        return true;
 }
 
-void BKE_copy_animdata_id_action(ID *id)
+void BKE_animdata_copy_id_action(ID *id)
 {
        AnimData *adt = BKE_animdata_from_id(id);
        if (adt) {
@@ -426,7 +426,7 @@ void BKE_animdata_make_local(AnimData *adt)
 /* When duplicating data (i.e. objects), drivers referring to the original data will 
  * get updated to point to the duplicated data (if drivers belong to the new data)
  */
-void BKE_relink_animdata(AnimData *adt)
+void BKE_animdata_relink(AnimData *adt)
 {
        /* sanity check */
        if (adt == NULL)
@@ -571,7 +571,7 @@ void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths
        
        /* get animdata from src, and create for destination (if needed) */
        srcAdt = BKE_animdata_from_id(srcID);
-       dstAdt = BKE_id_add_animdata(dstID);
+       dstAdt = BKE_animdata_add_id(dstID);
        
        if (ELEM(NULL, srcAdt, dstAdt)) {
                if (G.debug & G_DEBUG)
@@ -1167,7 +1167,7 @@ void BKE_animdata_main_cb(Main *mainptr, ID_AnimData_Edit_Callback func, void *u
  *      i.e. pose.bones["Bone"]
  */
 /* TODO: use BKE_animdata_main_cb for looping over all data  */
-void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const char *oldName, const char *newName)
+void BKE_animdata_fix_paths_rename_all(ID *ref_id, const char *prefix, const char *oldName, const char *newName)
 {
        Main *mainptr = G.main;
        ID *id;
index f775b67eedb24cce858dd7508baca9980d86d638..9e209cb16b607963348e5746063488dd1b90d3f2 100644 (file)
@@ -127,7 +127,7 @@ void BKE_armature_free(bArmature *arm)
 
                /* free animation data */
                if (arm->adt) {
-                       BKE_free_animdata(&arm->id);
+                       BKE_animdata_free(&arm->id);
                        arm->adt = NULL;
                }
        }
index 886df16d0ee428a15bb00743bc51ea5ffefb8e24..5b4d7ba82148391f239e5126f68eccc9a6897163 100644 (file)
@@ -138,7 +138,7 @@ void BKE_camera_make_local(Camera *cam)
 
 void BKE_camera_free(Camera *ca)
 {
-       BKE_free_animdata((ID *)ca);
+       BKE_animdata_free((ID *)ca);
 }
 
 /******************************** Camera Usage *******************************/
index b6a167da53d2dc2b8d3cb2e25a4da9f1517a9c76..5fcdc9c2e78a0cd67e970d07a179ac9bca5dec88 100644 (file)
@@ -147,7 +147,7 @@ void BKE_curve_free(Curve *cu)
 
        BKE_curve_editNurb_free(cu);
        BKE_curve_unlink(cu);
-       BKE_free_animdata((ID *)cu);
+       BKE_animdata_free((ID *)cu);
 
        if (cu->mat)
                MEM_freeN(cu->mat);
index dd2155505fbcec1171e1892b26af6fa9e3a8f826..17d87394118d806a754496c0a998b8247ebd1c63 100644 (file)
@@ -119,7 +119,7 @@ void BKE_gpencil_free(bGPdata *gpd)
        
        /* free animation data */
        if (gpd->adt) {
-               BKE_free_animdata(&gpd->id);
+               BKE_animdata_free(&gpd->id);
                gpd->adt = NULL;
        }
 }
index 09ce9484a693072880216381cca3c32b37810d68..6d37f3ae006d4a17de6071a99022b2ab57799dfb 100644 (file)
@@ -1712,7 +1712,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* check if object has any animation data */
                if (ob->nlastrips.first) {
                        /* Add AnimData block */
-                       BKE_id_add_animdata(id);
+                       BKE_animdata_add_id(id);
                        
                        /* IPO first to take into any non-NLA'd Object Animation */
                        if (ob->ipo) {
@@ -1735,7 +1735,7 @@ void do_versions_ipos_to_animato(Main *main)
                }
                else if ((ob->ipo) || (ob->action)) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Action first - so that Action name get conserved */
                        if (ob->action) {
@@ -1776,7 +1776,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* check PoseChannels for constraints with local data */
                if (ob->pose) {
                        /* Verify if there's AnimData block */
-                       BKE_id_add_animdata(id);
+                       BKE_animdata_add_id(id);
                        
                        for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
                                for (con = pchan->constraints.first; con; con = con->next) {
@@ -1802,7 +1802,7 @@ void do_versions_ipos_to_animato(Main *main)
                         */
                        if (con->ipo) {
                                /* Verify if there's AnimData block, just in case */
-                               BKE_id_add_animdata(id);
+                               BKE_animdata_add_id(id);
                                
                                /* although this was the constraint's local IPO, we still need to provide con 
                                 * so that drivers can be added properly...
@@ -1819,7 +1819,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* check constraint channels - we need to remove them anyway... */
                if (ob->constraintChannels.first) {
                        /* Verify if there's AnimData block */
-                       BKE_id_add_animdata(id);
+                       BKE_animdata_add_id(id);
                        
                        for (conchan = ob->constraintChannels.first; conchan; conchan = conchann) {
                                /* get pointer to next Constraint Channel */
@@ -1857,7 +1857,7 @@ void do_versions_ipos_to_animato(Main *main)
                 */
                if (key->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert Shapekey data... */
                        ipo_to_animdata(id, key->ipo, NULL, NULL, NULL);
@@ -1879,7 +1879,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* we're only interested in the IPO */
                if (ma->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert Material data... */
                        ipo_to_animdata(id, ma->ipo, NULL, NULL, NULL);
@@ -1901,7 +1901,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* we're only interested in the IPO */
                if (wo->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert World data... */
                        ipo_to_animdata(id, wo->ipo, NULL, NULL, NULL);
@@ -1921,7 +1921,7 @@ void do_versions_ipos_to_animato(Main *main)
                if (ed && ed->seqbasep) {
                        Sequence *seq;
                        
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        SEQ_BEGIN(ed, seq)
                        {
@@ -1977,7 +1977,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* we're only interested in the IPO */
                if (te->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert Texture data... */
                        ipo_to_animdata(id, te->ipo, NULL, NULL, NULL);
@@ -1999,7 +1999,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* we're only interested in the IPO */
                if (ca->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert Camera data... */
                        ipo_to_animdata(id, ca->ipo, NULL, NULL, NULL);
@@ -2021,7 +2021,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* we're only interested in the IPO */
                if (la->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert Lamp data... */
                        ipo_to_animdata(id, la->ipo, NULL, NULL, NULL);
@@ -2043,7 +2043,7 @@ void do_versions_ipos_to_animato(Main *main)
                /* we're only interested in the IPO */
                if (cu->ipo) {
                        /* Add AnimData block */
-                       AnimData *adt = BKE_id_add_animdata(id);
+                       AnimData *adt = BKE_animdata_add_id(id);
                        
                        /* Convert Curve data... */
                        ipo_to_animdata(id, cu->ipo, NULL, NULL, NULL);
index 560a3c0726b4beae535ae6b334772b3ee875fcf1..3aea343ec5abe9cb7b137c1d874e79d5014385f6 100644 (file)
@@ -77,7 +77,7 @@ void BKE_key_free(Key *key)
 {
        KeyBlock *kb;
        
-       BKE_free_animdata((ID *)key);
+       BKE_animdata_free((ID *)key);
 
        while ((kb = BLI_pophead(&key->block))) {
                if (kb->data)
index 93b9c22566dd7328e3cbf8b5a188579679d85b38..96b0b95adf3c4cdb1607c42fffd9139cf0305b5a 100644 (file)
@@ -221,7 +221,7 @@ void BKE_lamp_free(Lamp *la)
                if (mtex) MEM_freeN(mtex);
        }
        
-       BKE_free_animdata((ID *)la);
+       BKE_animdata_free((ID *)la);
 
        curvemapping_free(la->curfalloff);
 
index 4cf99dc173c13f50fa072b3faa0da49b54b3b9ff..73dca9436efea57ef0993cb61a5f109e0e83bfe6 100644 (file)
@@ -307,7 +307,7 @@ void BKE_lattice_free(Lattice *lt)
        
        /* free animation data */
        if (lt->adt) {
-               BKE_free_animdata(&lt->id);
+               BKE_animdata_free(&lt->id);
                lt->adt = NULL;
        }
 }
index 9cda4d9193341560f69264191c9e2494a9499ab5..2cee08a821b1e9dfdfb1b10354a1e985871b54fb 100644 (file)
@@ -432,7 +432,7 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
                if (RNA_property_editable(ptr, prop)) {
                        if (id_copy(id, &newid, false) && newid) {
                                /* copy animation actions too */
-                               BKE_copy_animdata_id_action(id);
+                               BKE_animdata_copy_id_action(id);
                                /* us is 1 by convention, but RNA_property_pointer_set
                                 * will also increment it, so set it to zero */
                                newid->us = 0;
@@ -785,7 +785,7 @@ static void id_copy_animdata(ID *id, const bool do_action)
        
        if (adt) {
                IdAdtTemplate *iat = (IdAdtTemplate *)id;
-               iat->adt = BKE_copy_animdata(iat->adt, do_action); /* could be set to false, need to investigate */
+               iat->adt = BKE_animdata_copy(iat->adt, do_action); /* could be set to false, need to investigate */
        }
 }
 
index 28b7ceded67fa03325ef3cb76bcc60cda84aeda6..40db411ef4c208c29b3541dad1f3829d54713712 100644 (file)
@@ -135,7 +135,7 @@ void BKE_linestyle_free(FreestyleLineStyle *linestyle)
                MEM_freeN(linestyle->nodetree);
        }
 
-       BKE_free_animdata(&linestyle->id);
+       BKE_animdata_free(&linestyle->id);
        while ((m = (LineStyleModifier *)linestyle->color_modifiers.first))
                BKE_linestyle_color_modifier_remove(linestyle, m);
        while ((m = (LineStyleModifier *)linestyle->alpha_modifiers.first))
index 9b682f101add27bf67764810a024b4a633ea3ff6..b5b7f3d06aa2e418ce616b22176b345a8e68ffca 100644 (file)
@@ -99,7 +99,7 @@ void BKE_material_free_ex(Material *ma, bool do_id_user)
        if (ma->ramp_col) MEM_freeN(ma->ramp_col);
        if (ma->ramp_spec) MEM_freeN(ma->ramp_spec);
        
-       BKE_free_animdata((ID *)ma);
+       BKE_animdata_free((ID *)ma);
        
        if (ma->preview)
                BKE_previewimg_free(&ma->preview);
index 25031183545e4103863cd557d6731b26e221bcd3..8728e6f98d595e95c9acff0545901c4f29e7ffca 100644 (file)
@@ -83,7 +83,7 @@ void BKE_mball_free(MetaBall *mb)
        BKE_mball_unlink(mb);
        
        if (mb->adt) {
-               BKE_free_animdata((ID *)mb);
+               BKE_animdata_free((ID *)mb);
                mb->adt = NULL;
        }
        if (mb->mat) MEM_freeN(mb->mat);
index adce6e15732e7c59062215b7ef8a73e4d3240907..840ef473691417a28aeb42c656ed28b931cdbd8a 100644 (file)
@@ -463,7 +463,7 @@ void BKE_mesh_free(Mesh *me, int unlink)
        CustomData_free(&me->pdata, me->totpoly);
 
        if (me->adt) {
-               BKE_free_animdata(&me->id);
+               BKE_animdata_free(&me->id);
                me->adt = NULL;
        }
        
index 73f75f4f96d4c293538d6258db6f26a6bc6eb1b1..1aeb7bed86c4025338f749f8fd709438f4d325a1 100644 (file)
@@ -1168,7 +1168,7 @@ static void free_buffers(MovieClip *clip)
                clip->anim = NULL;
        }
 
-       BKE_free_animdata((ID *) clip);
+       BKE_animdata_free((ID *) clip);
 }
 
 void BKE_movieclip_clear_cache(MovieClip *clip)
index ac79e13ac835f5f95a2eb9738535dd6453f23c5d..7f3db7005341437d12da4aaf80a7c77b9b8b1c16 100644 (file)
@@ -1733,7 +1733,7 @@ void ntreeFreeTree_ex(bNodeTree *ntree, const bool do_id_user)
        /* unregister associated RNA types */
        ntreeInterfaceTypeFree(ntree);
        
-       BKE_free_animdata((ID *)ntree);
+       BKE_animdata_free((ID *)ntree);
        
        id_us_min((ID *)ntree->gpd);
 
index b3607d38014baee08716ac5d9098406f79b92233..9e771b3d39e6fb18ec185469732c6b595f49f39c 100644 (file)
@@ -408,7 +408,7 @@ void BKE_object_free_ex(Object *ob, bool do_id_user)
        ob->iuser = NULL;
        if (ob->bb) MEM_freeN(ob->bb); 
        ob->bb = NULL;
-       if (ob->adt) BKE_free_animdata((ID *)ob);
+       if (ob->adt) BKE_animdata_free((ID *)ob);
        if (ob->poselib) ob->poselib->id.us--;
        if (ob->gpd) ((ID *)ob->gpd)->us--;
        if (ob->defbase.first)
@@ -1707,7 +1707,7 @@ void BKE_object_copy_proxy_drivers(Object *ob, Object *target)
                
                /* add new animdata block */
                if (!ob->adt)
-                       ob->adt = BKE_id_add_animdata(&ob->id);
+                       ob->adt = BKE_animdata_add_id(&ob->id);
                
                /* make a copy of all the drivers (for now), then correct any links that need fixing */
                free_fcurves(&ob->adt->drivers);
@@ -3731,7 +3731,7 @@ void BKE_object_relink(Object *ob)
        modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
 
        if (ob->adt)
-               BKE_relink_animdata(ob->adt);
+               BKE_animdata_relink(ob->adt);
        
        if (ob->rigidbody_constraint)
                BKE_rigidbody_relink_constraint(ob->rigidbody_constraint);
index 5d553f5deee02b4d2ad565a73bcea3d02c37f5ce..8d3f92182d4e221044fc2f2e9b6d0dabc04b834d 100644 (file)
@@ -375,7 +375,7 @@ void BKE_particlesettings_free(ParticleSettings *part)
 {
        MTex *mtex;
        int a;
-       BKE_free_animdata(&part->id);
+       BKE_animdata_free(&part->id);
        
        if (part->clumpcurve)
                curvemapping_free(part->clumpcurve);
index f51dadf1da65e7373b0a5e92291ede32f2d40de6..3b48de1355396e2088bb853e0272bdac72c21294 100644 (file)
@@ -224,7 +224,7 @@ Scene *BKE_scene_copy(Scene *sce, int type)
                            sizeof(scen->sequencer_colorspace_settings.name));
 
                /* copy action and remove animation used by sequencer */
-               BKE_copy_animdata_id_action(&scen->id);
+               BKE_animdata_copy_id_action(&scen->id);
 
                if (type != SCE_COPY_FULL)
                        remove_sequencer_fcurves(scen);
@@ -300,7 +300,7 @@ Scene *BKE_scene_copy(Scene *sce, int type)
                if (scen->world) {
                        id_us_plus((ID *)scen->world);
                        scen->world = BKE_world_copy(scen->world);
-                       BKE_copy_animdata_id_action((ID *)scen->world);
+                       BKE_animdata_copy_id_action((ID *)scen->world);
                }
 
                if (sce->ed) {
@@ -361,7 +361,7 @@ void BKE_scene_free(Scene *sce)
        BLI_freelistN(&sce->base);
        BKE_sequencer_editing_free(sce);
 
-       BKE_free_animdata((ID *)sce);
+       BKE_animdata_free((ID *)sce);
        BKE_keyingsets_free(&sce->keyingsets);
        
        if (sce->rigidbody_world)
index b11d0ae03b03e95ed6b90e8373b128a2e73fc8db..7a800555144294300828dfadbd457e7d4484fec8 100644 (file)
@@ -130,5 +130,5 @@ void BKE_speaker_free(Speaker *spk)
        if (spk->sound)
                spk->sound->id.us--;
 
-       BKE_free_animdata((ID *)spk);
+       BKE_animdata_free((ID *)spk);
 }
index 7e7bcace30d42cc368bb69f4eb7bcad1e01f73f2..8e4fcc5d1cc0e75b80b533118c917eb6a26048dc 100644 (file)
@@ -564,7 +564,7 @@ void BKE_texture_free(Tex *tex)
        if (tex->pd) BKE_texture_pointdensity_free(tex->pd);
        if (tex->vd) BKE_texture_voxeldata_free(tex->vd);
        if (tex->ot) BKE_texture_ocean_free(tex->ot);
-       BKE_free_animdata((struct ID *)tex);
+       BKE_animdata_free((struct ID *)tex);
        
        BKE_previewimg_free(&tex->preview);
        BKE_icon_delete((struct ID *)tex);
index 699e0d34161d9dd0eb2a4c63d9b86868d1b2aef6..f26cbf7880a90a640768339e0027f75715f0220f 100644 (file)
@@ -63,7 +63,7 @@ void BKE_world_free_ex(World *wrld, bool do_id_user)
        }
        BKE_previewimg_free(&wrld->preview);
 
-       BKE_free_animdata((ID *)wrld);
+       BKE_animdata_free((ID *)wrld);
 
        /* is no lib link block, but world extension */
        if (wrld->nodetree) {
index 1782152560a938d7adb9c1bcf756fbe06170f21e..4828343fa0ef3bf0819af12526d40803fc0641e2 100644 (file)
@@ -2117,7 +2117,7 @@ static int animchannels_clean_empty_exec(bContext *C, wmOperator *UNUSED(op))
                
                /* remove AnimData? */
                if (action_empty && nla_empty && drivers_empty) {
-                       BKE_free_animdata(id);
+                       BKE_animdata_free(id);
                }
        }
        
index 67ba82f1858a4a6cfd2a9f0c9948ad55a3c2d73d..08e0daf8eb93296485be8a5d69b8a19406aac28c 100644 (file)
@@ -84,7 +84,7 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde
        /* init animdata if none available yet */
        adt = BKE_animdata_from_id(id);
        if ((adt == NULL) && (add))
-               adt = BKE_id_add_animdata(id);
+               adt = BKE_animdata_add_id(id);
        if (adt == NULL) {
                /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
                return NULL;
index 78509dd6079941df86dddb4d46d0404adc3f4db7..64ced437142a8020e28cddd5bc5792c00789dfb8 100644 (file)
@@ -130,7 +130,7 @@ bAction *verify_adt_action(ID *id, short add)
        /* init animdata if none available yet */
        adt = BKE_animdata_from_id(id);
        if ((adt == NULL) && (add))
-               adt = BKE_id_add_animdata(id);
+               adt = BKE_animdata_add_id(id);
        if (adt == NULL) {
                /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */
                printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>");
index 177fb6c91182c962342ccf31e1a9f6986d34e63c..eedff89631515eb03ca8c8ceb27d9c4229f4b68b 100644 (file)
@@ -270,7 +270,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
                // XXX: the ID here is for armatures, but most bone drivers are actually on the object instead...
                {
                        
-                       BKE_all_animdata_fix_paths_rename(&arm->id, "pose.bones", oldname, newname);
+                       BKE_animdata_fix_paths_rename_all(&arm->id, "pose.bones", oldname, newname);
                }
                
                /* correct view locking */
index ad9715d2ab28b5dd7012db1b41c5c0f6dfcf01e9..cee34257b2c0e2f62c0e21c8d625e9b3e66330e2 100644 (file)
@@ -380,7 +380,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
                        if (base->object->adt) {
                                if (ob->adt == NULL) {
                                        /* no animdata, so just use a copy of the whole thing */
-                                       ob->adt = BKE_copy_animdata(base->object->adt, false);
+                                       ob->adt = BKE_animdata_copy(base->object->adt, false);
                                }
                                else {
                                        /* merge in data - we'll fix the drivers manually */
@@ -391,7 +391,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
                        if (curarm->adt) {
                                if (arm->adt == NULL) {
                                        /* no animdata, so just use a copy of the whole thing */
-                                       arm->adt = BKE_copy_animdata(curarm->adt, false);
+                                       arm->adt = BKE_animdata_copy(curarm->adt, false);
                                }
                                else {
                                        /* merge in data - we'll fix the drivers manually */
index 99b351561c7e44809920d1d270cf921c6b97c001..37faa7ba664af7ccb3d53d71692e42db105e485b 100644 (file)
@@ -1051,7 +1051,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op)
         */
        {
                /* create new data for NLA hierarchy */
-               AnimData *adt = BKE_id_add_animdata(&ob->id);
+               AnimData *adt = BKE_animdata_add_id(&ob->id);
                NlaTrack *nlt = add_nlatrack(adt, NULL);
                NlaStrip *strip = add_nla_soundstrip(scene, ob->data);
                strip->start = CFRA;
@@ -1358,7 +1358,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
                basen->object = ob;
 
                /* make sure apply works */
-               BKE_free_animdata(&ob->id);
+               BKE_animdata_free(&ob->id);
                ob->adt = NULL;
 
                /* Proxies are not to be copied. */
@@ -1976,7 +1976,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
 
                /* duplicates using userflags */
                if (dupflag & USER_DUP_ACT) {
-                       BKE_copy_animdata_id_action(&obn->id);
+                       BKE_animdata_copy_id_action(&obn->id);
                }
 
                if (dupflag & USER_DUP_MAT) {
@@ -1989,7 +1989,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
                                        id->us--;
 
                                        if (dupflag & USER_DUP_ACT) {
-                                               BKE_copy_animdata_id_action(&obn->mat[a]->id);
+                                               BKE_animdata_copy_id_action(&obn->mat[a]->id);
                                        }
                                }
                        }
@@ -2004,7 +2004,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
                                                psys->part = BKE_particlesettings_copy(psys->part);
 
                                        if (dupflag & USER_DUP_ACT) {
-                                               BKE_copy_animdata_id_action(&psys->part->id);
+                                               BKE_animdata_copy_id_action(&psys->part->id);
                                        }
 
                                        id->us--;
@@ -2132,9 +2132,9 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
                        if (dupflag & USER_DUP_ACT) {
                                bActuator *act;
 
-                               BKE_copy_animdata_id_action((ID *)obn->data);
+                               BKE_animdata_copy_id_action((ID *)obn->data);
                                if (key) {
-                                       BKE_copy_animdata_id_action((ID *)key);
+                                       BKE_animdata_copy_id_action((ID *)key);
                                }
 
                                /* Update the duplicated action in the action actuators */
index bfa501c373286276e16b886aa0cc273fa958ee7f..2d9815945246af57313c113d243eae2da172fe50 100644 (file)
@@ -1574,13 +1574,13 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
                                                DAG_id_tag_update(&ob_dst->id, 0);
                                                break;
                                        case MAKE_LINKS_ANIMDATA:
-                                               BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, false);
+                                               BKE_animdata_copy_id((ID *)ob_dst, (ID *)ob_src, false);
                                                if (ob_dst->data && ob_src->data) {
                                                        if (obdata_id->lib) {
                                                                is_lib = true;
                                                                break;
                                                        }
-                                                       BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, false);
+                                                       BKE_animdata_copy_id((ID *)ob_dst->data, (ID *)ob_src->data, false);
                                                }
                                                DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
                                                break;
@@ -1871,7 +1871,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag)
                                        case OB_MESH:
                                                ob->data = me = BKE_mesh_copy(ob->data);
                                                if (me->key)
-                                                       BKE_copy_animdata_id_action((ID *)me->key);
+                                                       BKE_animdata_copy_id_action((ID *)me->key);
                                                break;
                                        case OB_MBALL:
                                                ob->data = BKE_mball_copy(ob->data);
@@ -1883,12 +1883,12 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag)
                                                ID_NEW(cu->bevobj);
                                                ID_NEW(cu->taperobj);
                                                if (cu->key)
-                                                       BKE_copy_animdata_id_action((ID *)cu->key);
+                                                       BKE_animdata_copy_id_action((ID *)cu->key);
                                                break;
                                        case OB_LATTICE:
                                                ob->data = lat = BKE_lattice_copy(ob->data);
                                                if (lat->key)
-                                                       BKE_copy_animdata_id_action((ID *)lat->key);
+                                                       BKE_animdata_copy_id_action((ID *)lat->key);
                                                break;
                                        case OB_ARMATURE:
                                                DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -1909,7 +1909,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag)
                                 * AnimData structure, which is not what we want.
                                 *                                             (sergey)
                                 */
-                               BKE_copy_animdata_id_action((ID *)ob->data);
+                               BKE_animdata_copy_id_action((ID *)ob->data);
 
                                id->us--;
                                id->newid = ob->data;
@@ -1933,7 +1933,7 @@ static void single_object_action_users(Scene *scene, const int flag)
                ob = base->object;
                if (ob->id.lib == NULL && (flag == 0 || (base->flag & SELECT)) ) {
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
-                       BKE_copy_animdata_id_action(&ob->id);
+                       BKE_animdata_copy_id_action(&ob->id);
                }
        }
 }
@@ -1956,7 +1956,7 @@ static void single_mat_users(Scene *scene, const int flag, const bool do_texture
 
                                        if (ma->id.us > 1) {
                                                man = BKE_material_copy(ma);
-                                               BKE_copy_animdata_id_action(&man->id);
+                                               BKE_animdata_copy_id_action(&man->id);
 
                                                man->id.us = 0;
                                                assign_material(ob, man, a, BKE_MAT_ASSIGN_USERPREF);
@@ -1967,7 +1967,7 @@ static void single_mat_users(Scene *scene, const int flag, const bool do_texture
                                                                        if (tex->id.us > 1) {
                                                                                tex->id.us--;
                                                                                tex = BKE_texture_copy(tex);
-                                                                               BKE_copy_animdata_id_action(&tex->id);
+                                                                               BKE_animdata_copy_id_action(&tex->id);
                                                                                man->mtex[b]->tex = tex;
                                                                        }
                                                                }
@@ -1994,7 +1994,7 @@ static void do_single_tex_user(Tex **from)
        }
        else if (tex->id.us > 1) {
                texn = BKE_texture_copy(tex);
-               BKE_copy_animdata_id_action(&texn->id);
+               BKE_animdata_copy_id_action(&texn->id);
                tex->id.newid = (ID *)texn;
                tex->id.us--;
                *from = texn;
index 70d9bfe99fe5e5ec56b6595b46b4aa7b08fb2235..4ed4a3f95143ea863d34dc58f32c5f60db53b0b3 100644 (file)
@@ -771,7 +771,7 @@ static int nlaedit_objects_add_exec(bContext *C, wmOperator *UNUSED(op))
        CTX_DATA_BEGIN (C, Object *, ob, selected_objects)
        {
                /* ensure that object has AnimData... that's all */
-               BKE_id_add_animdata(&ob->id);
+               BKE_animdata_add_id(&ob->id);
        }
        CTX_DATA_END;
        
index af21478150ba96320e40620a112fe039029ebc05..e58331036580c1c5215f7233f2311dd4529cfe17 100644 (file)
@@ -467,7 +467,7 @@ void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOops *soop
 static void clear_animdata_cb(int UNUSED(event), TreeElement *UNUSED(te),
                               TreeStoreElem *tselem, void *UNUSED(arg))
 {
-       BKE_free_animdata(tselem->id);
+       BKE_animdata_free(tselem->id);
 }
 
 
index 009e3799c49f4f0974af5fbd5dfbfcfc38612c23..8632467281a78510ddcf33e3759fd891acadd36e 100644 (file)
@@ -598,12 +598,12 @@ static void rna_def_ID(BlenderRNA *brna)
        RNA_def_function_ui_description(func, "Clear the user count of a datablock so its not saved, "
                                        "on reload the data will be removed");
 
-       func = RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata");
+       func = RNA_def_function(srna, "animation_data_create", "BKE_animdata_add_id");
        RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this");
        parm = RNA_def_pointer(func, "anim_data", "AnimData", "", "New animation data or NULL");
        RNA_def_function_return(func, parm);
 
-       func = RNA_def_function(srna, "animation_data_clear", "BKE_free_animdata");
+       func = RNA_def_function(srna, "animation_data_clear", "BKE_animdata_free");
        RNA_def_function_ui_description(func, "Clear animation on this this ID");
 
        func = RNA_def_function(srna, "update_tag", "rna_ID_update_tag");
index e4aa21867e7387e2db4532095113f2972e455da5..2cff8cfb37650afd4ea6b838ff30e6ae1f814b3d 100644 (file)
@@ -241,7 +241,7 @@ static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
        }
        
        /* fix all the animation data which may link to this */
-       BKE_all_animdata_fix_paths_rename(NULL, "constraints", oldname, con->name);
+       BKE_animdata_fix_paths_rename_all(NULL, "constraints", oldname, con->name);
 }
 
 static char *rna_Constraint_path(PointerRNA *ptr)
index 8a3626de81dc01aae2b8916d92784a4501ad8dc2..249d132068c9cac849acd90452d151899983326f 100644 (file)
@@ -89,7 +89,7 @@ static void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
        }
        
        /* fix all the animation data which may link to this */
-       BKE_all_animdata_fix_paths_rename(NULL, "key_blocks", oldname, kb->name);
+       BKE_animdata_fix_paths_rename_all(NULL, "key_blocks", oldname, kb->name);
 }
 
 static float rna_ShapeKey_frame_get(PointerRNA *ptr)
index 93f29dbee66898c9ffe6aa1f6dfda3a5984a8aa8..8d0e95504a82c4881006bff0f6b3150e1bd636ef 100644 (file)
@@ -408,7 +408,7 @@ static void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
        }
        
        /* fix all the animation data which may link to this */
-       BKE_all_animdata_fix_paths_rename(NULL, "modifiers", oldname, md->name);
+       BKE_animdata_fix_paths_rename_all(NULL, "modifiers", oldname, md->name);
 }
 
 static char *rna_Modifier_path(PointerRNA *ptr)
index 90ee9e1d7d9d08c5016d16dcf7fc464cdbf6cf54..e577f7635f114ca2716dd8481cbd669781651709 100644 (file)
@@ -1549,7 +1549,7 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value)
        nodeUniqueName(ntree, node);
        
        /* fix all the animation data which may link to this */
-       BKE_all_animdata_fix_paths_rename(NULL, "nodes", oldname, node->name);
+       BKE_animdata_fix_paths_rename_all(NULL, "nodes", oldname, node->name);
 }
 
 static bNodeSocket *rna_Node_inputs_new(ID *id, bNode *node, ReportList *reports, const char *type, const char *name, const char *identifier)
index 700d1aa91ea50421a29af4aa7efb4133127d6cb4..c9d1a4b64298d2491d4e6ecbde011b4ea5f9cddb 100644 (file)
@@ -1251,7 +1251,7 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
        }
 
        /* fix all the animation data which may link to this */
-       BKE_all_animdata_fix_paths_rename(NULL, "render.layers", oldname, rl->name);
+       BKE_animdata_fix_paths_rename_all(NULL, "render.layers", oldname, rl->name);
 }
 
 static char *rna_SceneRenderLayer_path(PointerRNA *ptr)
index 0d46924c12908a9d0d25d4f4467959d99854cecb..fc9a501dae8f0bb1e6a2cb532c84814d06b44875 100644 (file)
@@ -485,7 +485,7 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
        /* fix all the animation data which may link to this */
 
        /* don't rename everywhere because these are per scene */
-       /* BKE_all_animdata_fix_paths_rename(NULL, "sequence_editor.sequences_all", oldname, seq->name + 2); */
+       /* BKE_animdata_fix_paths_rename_all(NULL, "sequence_editor.sequences_all", oldname, seq->name + 2); */
        adt = BKE_animdata_from_id(&scene->id);
        if (adt)
                BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
index 8e262df7e67c0d1477f4b946e74aa54f8ed4b492..6aaa947e9e4a0efb7adf96399f46b488c8d4abd9 100644 (file)
@@ -1117,12 +1117,12 @@ static void rna_SpaceDopeSheetEditor_action_update(Main *UNUSED(bmain), Scene *s
                
                if (saction->mode == SACTCONT_ACTION) {
                        /* TODO: context selector could help decide this with more control? */
-                       adt = BKE_id_add_animdata(&obact->id); /* this only adds if non-existent */
+                       adt = BKE_animdata_add_id(&obact->id); /* this only adds if non-existent */
                }
                else if (saction->mode == SACTCONT_SHAPEKEY) {
                        Key *key = BKE_key_from_object(obact);
                        if (key)
-                               adt = BKE_id_add_animdata(&key->id);  /* this only adds if non-existent */
+                               adt = BKE_animdata_add_id(&key->id);  /* this only adds if non-existent */
                }
                
                /* set action */