diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-17 18:10:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-17 18:10:19 +0300 |
commit | 06a1a66a9b6f120867d3bbebe3928744ec8e3495 (patch) | |
tree | 42e827a3cf58eb76474e479206b02a8d97dd3bf7 /source/blender/blenkernel/intern/texture.c | |
parent | 61d27db35967710421ab92748e09624db068258d (diff) | |
parent | a24b4e6090057479796e914bc603119b12f6ca06 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 2bf2fa7807b..ad60e81fe19 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -76,9 +76,9 @@ TexMapping *BKE_texture_mapping_add(int type) { TexMapping *texmap = MEM_callocN(sizeof(TexMapping), "TexMapping"); - + BKE_texture_mapping_default(texmap, type); - + return texmap; } @@ -132,7 +132,7 @@ void BKE_texture_mapping_init(TexMapping *texmap) if (fabsf(size[2]) < 1e-5f) size[2] = signf(size[2]) * 1e-5f; } - + size_to_mat4(smat, texmap->size); /* rotation */ @@ -173,9 +173,9 @@ void BKE_texture_mapping_init(TexMapping *texmap) ColorMapping *BKE_texture_colormapping_add(void) { ColorMapping *colormap = MEM_callocN(sizeof(ColorMapping), "ColorMapping"); - + BKE_texture_colormapping_default(colormap); - + return colormap; } @@ -211,7 +211,7 @@ void BKE_texture_free(Tex *tex) } MEM_SAFE_FREE(tex->coba); - + BKE_icon_id_delete((ID *)tex); BKE_previewimg_free(&tex->preview); } @@ -271,7 +271,7 @@ void BKE_texture_default(Tex *tex) tex->iuser.ok = 1; tex->iuser.frames = 100; tex->iuser.sfra = 1; - + tex->preview = NULL; } @@ -287,9 +287,9 @@ Tex *BKE_texture_add(Main *bmain, const char *name) Tex *tex; tex = BKE_libblock_alloc(bmain, ID_TE, name, 0); - + BKE_texture_default(tex); - + return tex; } @@ -369,11 +369,11 @@ void BKE_texture_mtex_default(MTex *mtex) MTex *BKE_texture_mtex_add(void) { MTex *mtex; - + mtex = MEM_callocN(sizeof(MTex), "BKE_texture_mtex_add"); - + BKE_texture_mtex_default(mtex); - + return mtex; } @@ -388,7 +388,7 @@ MTex *BKE_texture_mtex_add_id(ID *id, int slot) if (mtex_ar == NULL) { return NULL; } - + if (slot == -1) { /* find first free */ int i; @@ -474,19 +474,19 @@ Tex *BKE_texture_localize(Tex *tex) * ... Once f*** nodes are fully converted to that too :( */ Tex *texn; - + texn = BKE_libblock_copy_nolib(&tex->id, false); - + /* image texture: BKE_texture_free also doesn't decrease */ - + if (texn->coba) texn->coba = MEM_dupallocN(texn->coba); - + texn->preview = NULL; - + if (tex->nodetree) { texn->nodetree = ntreeLocalize(tex->nodetree); } - + return texn; } @@ -590,12 +590,12 @@ Tex *give_current_particle_texture(ParticleSettings *part) { MTex *mtex = NULL; Tex *tex = NULL; - + if (!part) return NULL; - + mtex = part->mtex[(int)(part->texact)]; if (mtex) tex = mtex->tex; - + return tex; } @@ -612,7 +612,7 @@ void set_current_particle_texture(ParticleSettings *part, Tex *newtex) part->mtex[act]->texco = TEXCO_ORCO; part->mtex[act]->blendtype = MTEX_MUL; } - + part->mtex[act]->tex = newtex; id_us_plus(&newtex->id); } @@ -657,7 +657,7 @@ PointDensity *BKE_texture_pointdensity_add(void) PointDensity *pd = MEM_callocN(sizeof(PointDensity), "pointdensity"); BKE_texture_pointdensity_init_data(pd); return pd; -} +} PointDensity *BKE_texture_pointdensity_copy(const PointDensity *pd, const int UNUSED(flag)) { |