diff options
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index d353042b711..69152f23476 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -50,7 +50,6 @@ #include "DNA_brush_types.h" #include "DNA_node_types.h" #include "DNA_color_types.h" -#include "DNA_particle_types.h" #include "DNA_linestyle_types.h" #include "IMB_imbuf.h" @@ -910,7 +909,6 @@ void BKE_texture_make_local(Tex *tex) World *wrld; Lamp *la; Brush *br; - ParticleSettings *pa; FreestyleLineStyle *ls; int a; bool is_local = false, is_lib = false; @@ -970,16 +968,6 @@ void BKE_texture_make_local(Tex *tex) } br = br->id.next; } - pa = bmain->particle.first; - while (pa) { - for (a = 0; a < MAX_MTEX; a++) { - if (pa->mtex[a] && pa->mtex[a]->tex == tex) { - if (pa->id.lib) is_lib = true; - else is_local = true; - } - } - pa = pa->id.next; - } ls = bmain->linestyle.first; while (ls) { for (a = 0; a < MAX_MTEX; a++) { @@ -1060,19 +1048,6 @@ void BKE_texture_make_local(Tex *tex) } br = br->id.next; } - pa = bmain->particle.first; - while (pa) { - for (a = 0; a < MAX_MTEX; a++) { - if (pa->mtex[a] && pa->mtex[a]->tex == tex) { - if (pa->id.lib == NULL) { - pa->mtex[a]->tex = tex_new; - id_us_plus(&tex_new->id); - id_us_min(&tex->id); - } - } - } - pa = pa->id.next; - } ls = bmain->linestyle.first; while (ls) { for (a = 0; a < MAX_MTEX; a++) { @@ -1235,10 +1210,6 @@ bool give_active_mtex(ID *id, MTex ***mtex_ar, short *act) *mtex_ar = ((FreestyleLineStyle *)id)->mtex; if (act) *act = (((FreestyleLineStyle *)id)->texact); break; - case ID_PA: - *mtex_ar = ((ParticleSettings *)id)->mtex; - if (act) *act = (((ParticleSettings *)id)->texact); - break; default: *mtex_ar = NULL; if (act) *act = 0; @@ -1266,9 +1237,6 @@ void set_active_mtex(ID *id, short act) case ID_LS: ((FreestyleLineStyle *)id)->texact = act; break; - case ID_PA: - ((ParticleSettings *)id)->texact = act; - break; } } @@ -1378,42 +1346,6 @@ void set_current_brush_texture(Brush *br, Tex *newtex) } } -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; -} - -void set_current_particle_texture(ParticleSettings *part, Tex *newtex) -{ - int act = part->texact; - - if (part->mtex[act] && part->mtex[act]->tex) - id_us_min(&part->mtex[act]->tex->id); - - if (newtex) { - if (!part->mtex[act]) { - part->mtex[act] = BKE_texture_mtex_add(); - part->mtex[act]->texco = TEXCO_ORCO; - part->mtex[act]->blendtype = MTEX_MUL; - } - - part->mtex[act]->tex = newtex; - id_us_plus(&newtex->id); - } - else if (part->mtex[act]) { - MEM_freeN(part->mtex[act]); - part->mtex[act] = NULL; - } -} - /* ------------------------------------------------------------------------- */ EnvMap *BKE_texture_envmap_add(void) |