diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-01-11 02:14:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-01-11 02:19:00 +0300 |
commit | 6112cde3f90e4e0f2ba5fc37150efcd239b97250 (patch) | |
tree | c933cac2e4c385a6ec6a5045cd479d25f2a8c998 /source/blender/blenkernel/intern | |
parent | 3f16810150c0f6057d6e6354f5a97bc3f20a13eb (diff) | |
parent | f33000526679c543c1398a68a84b93dad521a5cb (diff) |
Merge branch 'master' into blender2.8
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/subsurf_ccg.c | 31 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/world.c | 6 |
8 files changed, 28 insertions, 29 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 88c0aa6f35a..acb2db8d7ad 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -85,7 +85,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 f9324b33ebe..82bce6e346d 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -529,7 +529,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", @@ -537,7 +537,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 d8b9b14d755..931fc09d235 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -165,7 +165,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; @@ -181,7 +181,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 df8a2268100..7235aa0aaf6 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -272,7 +272,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 77c648e53fe..ae9066c2b05 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3146,7 +3146,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)); @@ -3305,7 +3305,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/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index b2f859ad1f5..24bcd4c8476 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1484,8 +1484,7 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop) int totface; int gridSize = ccgSubSurf_getGridSize(ss); int edgeSize = ccgSubSurf_getEdgeSize(ss); - int i = 0; - MLoop *mv; + MLoop *ml; /* DMFlagMat *faceFlags = ccgdm->faceFlags; */ /* UNUSED */ if (!ccgdm->ehash) { @@ -1497,7 +1496,7 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop) ehash = BLI_edgehash_new_ex(__func__, ccgdm->dm.numEdgeData); medge = ccgdm->dm.getEdgeArray((DerivedMesh *)ccgdm); - for (i = 0; i < ccgdm->dm.numEdgeData; i++) { + for (int i = 0; i < ccgdm->dm.numEdgeData; i++) { BLI_edgehash_insert(ehash, medge[i].v1, medge[i].v2, SET_INT_IN_POINTER(i)); } @@ -1508,7 +1507,7 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop) BLI_rw_mutex_lock(&ccgdm->loops_cache_rwlock, THREAD_LOCK_READ); totface = ccgSubSurf_getNumFaces(ss); - mv = mloop; + ml = mloop; for (index = 0; index < totface; index++) { CCGFace *f = ccgdm->faceMap[index].face; int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f); @@ -1530,21 +1529,21 @@ static void ccgDM_copyFinalLoopArray(DerivedMesh *dm, MLoop *mloop) v4 = getFaceIndex(ss, f, S, x + 1, y + 0, edgeSize, gridSize); - mv->v = v1; - mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v1, v2)); - mv++; i++; + ml->v = v1; + ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v1, v2)); + ml++; - mv->v = v2; - mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v2, v3)); - mv++; i++; + ml->v = v2; + ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v2, v3)); + ml++; - mv->v = v3; - mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v3, v4)); - mv++; i++; + ml->v = v3; + ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v3, v4)); + ml++; - mv->v = v4; - mv->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v4, v1)); - mv++; i++; + ml->v = v4; + ml->e = GET_UINT_FROM_POINTER(BLI_edgehash_lookup(ccgdm->ehash, v4, v1)); + ml++; } } } diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 4abd2a01d40..5da8dc563e2 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)); } } |