diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-11 01:55:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-11 02:01:01 +0300 |
commit | f33000526679c543c1398a68a84b93dad521a5cb (patch) | |
tree | 91ffe827dd47859eca1c6c84516ff9f9be68a273 /source/blender/blenkernel/intern | |
parent | 76bdd40bfdc7a212c70c2032edaa6faef1423c9f (diff) |
Cleanup: BKE naming conventions for datablock add/localize
Conventions were already followed nearly everywhere.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/lamp.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/world.c | 6 |
7 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 5c2fe0bb040..034248df8d5 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -84,7 +84,7 @@ /* ***************** Library data level operations on action ************** */ -bAction *add_empty_action(Main *bmain, const char name[]) +bAction *BKE_action_add(Main *bmain, const char name[]) { bAction *act; diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index ba8f454aa47..2c6339de500 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -527,7 +527,7 @@ void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths if (srcAdt->action) { /* set up an action if necessary, and name it in a similar way so that it can be easily found again */ if (dstAdt->action == NULL) { - dstAdt->action = add_empty_action(G.main, srcAdt->action->id.name + 2); + dstAdt->action = BKE_action_add(G.main, srcAdt->action->id.name + 2); } else if (dstAdt->action == srcAdt->action) { printf("Argh! Source and Destination share animation! ('%s' and '%s' both use '%s') Making new empty action\n", @@ -535,7 +535,7 @@ void BKE_animdata_separate_by_basepath(ID *srcID, ID *dstID, ListBase *basepaths /* TODO: review this... */ id_us_min(&dstAdt->action->id); - dstAdt->action = add_empty_action(G.main, dstAdt->action->id.name + 2); + dstAdt->action = BKE_action_add(G.main, dstAdt->action->id.name + 2); } /* loop over base paths, trying to fix for each one... */ diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 90247441631..00cf40f06cd 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1559,7 +1559,7 @@ static void ipo_to_animdata(ID *id, Ipo *ipo, char actname[], char constname[], BLI_snprintf(nameBuf, sizeof(nameBuf), "CDA:%s", ipo->id.name + 2); - adt->action = add_empty_action(G.main, nameBuf); + adt->action = BKE_action_add(G.main, nameBuf); if (G.debug & G_DEBUG) printf("\t\tadded new action - '%s'\n", nameBuf); } @@ -2107,7 +2107,7 @@ void do_versions_ipos_to_animato(Main *main) bAction *new_act; /* add a new action for this, and convert all data into that action */ - new_act = add_empty_action(main, id->name + 2); + new_act = BKE_action_add(main, id->name + 2); ipo_to_animato(NULL, ipo, NULL, NULL, NULL, NULL, &new_act->curves, &drivers); new_act->idroot = ipo->blocktype; } diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index fe481905fb2..3a4c920d8fb 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -156,7 +156,7 @@ Lamp *BKE_lamp_copy(Main *bmain, const Lamp *la) return la_copy; } -Lamp *localize_lamp(Lamp *la) +Lamp *BKE_lamp_localize(Lamp *la) { /* TODO replace with something like * Lamp *la_copy; @@ -172,7 +172,7 @@ Lamp *localize_lamp(Lamp *la) for (a = 0; a < MAX_MTEX; a++) { if (lan->mtex[a]) { - lan->mtex[a] = MEM_mallocN(sizeof(MTex), "localize_lamp"); + lan->mtex[a] = MEM_mallocN(sizeof(MTex), __func__); memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex)); } } diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 07c2ff4ba9d..0dd7047a376 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -267,7 +267,7 @@ Material *BKE_material_copy(Main *bmain, const Material *ma) } /* XXX (see above) material copy without adding to main dbase */ -Material *localize_material(Material *ma) +Material *BKE_material_localize(Material *ma) { /* TODO replace with something like * Material *ma_copy; diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index cbbb44c55cb..8b3910c1d53 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3136,7 +3136,7 @@ ModifierData *object_add_particle_system(Scene *scene, Object *ob, const char *n psys->pointcache = BKE_ptcache_add(&psys->ptcaches); BLI_addtail(&ob->particlesystem, psys); - psys->part = psys_new_settings(DATA_("ParticleSettings"), NULL); + psys->part = BKE_particlesettings_add(NULL, DATA_("ParticleSettings")); if (BLI_listbase_count_ex(&ob->particlesystem, 2) > 1) BLI_snprintf(psys->name, sizeof(psys->name), DATA_("ParticleSystem %i"), BLI_listbase_count(&ob->particlesystem)); @@ -3294,7 +3294,7 @@ static void default_particle_settings(ParticleSettings *part) } -ParticleSettings *psys_new_settings(const char *name, Main *main) +ParticleSettings *BKE_particlesettings_add(Main *main, const char *name) { ParticleSettings *part; diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index acab94be9c5..10fcfaa444f 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -108,7 +108,7 @@ void BKE_world_init(World *wrld) wrld->mistdist = 25.0f; } -World *add_world(Main *bmain, const char *name) +World *BKE_world_add(Main *bmain, const char *name) { World *wrld; @@ -158,7 +158,7 @@ World *BKE_world_copy(Main *bmain, const World *wrld) return wrld_copy; } -World *localize_world(World *wrld) +World *BKE_world_localize(World *wrld) { /* TODO replace with something like * World *wrld_copy; @@ -174,7 +174,7 @@ World *localize_world(World *wrld) for (a = 0; a < MAX_MTEX; a++) { if (wrld->mtex[a]) { - wrldn->mtex[a] = MEM_mallocN(sizeof(MTex), "localize_world"); + wrldn->mtex[a] = MEM_mallocN(sizeof(MTex), __func__); memcpy(wrldn->mtex[a], wrld->mtex[a], sizeof(MTex)); } } |