diff options
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 119 |
1 files changed, 3 insertions, 116 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index fe8b97db606..eeffbfe5ef6 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -38,12 +38,11 @@ #include "PIL_dynlib.h" - +#include "MTC_matrixops.h" #include "BLI_blenlib.h" #include "BLI_arithb.h" #include "BLI_rand.h" -#include "BLI_kdopbvh.h" #include "DNA_texture_types.h" #include "DNA_key_types.h" @@ -418,8 +417,6 @@ void free_texture(Tex *tex) free_plugin_tex(tex->plugin); if(tex->coba) MEM_freeN(tex->coba); if(tex->env) BKE_free_envmap(tex->env); - if(tex->pd) BKE_free_pointdensity(tex->pd); - if(tex->vd) BKE_free_voxeldata(tex->vd); BKE_previewimg_free(&tex->preview); BKE_icon_delete((struct ID*)tex); tex->id.icon_id = 0; @@ -489,16 +486,6 @@ void default_tex(Tex *tex) tex->env->depth=0; } - if (tex->pd) { - tex->pd->radius = 0.3f; - tex->pd->falloff_type = TEX_PD_FALLOFF_STD; - } - - if (tex->vd) { - tex->vd->resol[0] = tex->vd->resol[1] = tex->vd->resol[2] = 0; - tex->vd->interp_type=TEX_VD_LINEAR; - tex->vd->file_format=TEX_VD_SMOKE; - } pit = tex->plugin; if (pit) { varstr= pit->varstr; @@ -750,9 +737,9 @@ void make_local_texture(Tex *tex) void autotexname(Tex *tex) { - char texstr[20][15]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend", + char texstr[20][12]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend", "Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave", - "Voronoi", "DistNoise", "Point Density", "Voxel Data", "", "", "", ""}; + "Voronoi", "DistNoise", "", "", "", "", "", ""}; Image *ima; char di[FILE_MAXDIR], fi[FILE_MAXFILE]; @@ -901,106 +888,6 @@ void BKE_free_envmap(EnvMap *env) } /* ------------------------------------------------------------------------- */ - -PointDensity *BKE_add_pointdensity(void) -{ - PointDensity *pd; - - pd= MEM_callocN(sizeof(PointDensity), "pointdensity"); - pd->flag = 0; - pd->radius = 0.3f; - pd->falloff_type = TEX_PD_FALLOFF_STD; - pd->falloff_softness = 2.0; - pd->source = TEX_PD_PSYS; - pd->point_tree = NULL; - pd->point_data = NULL; - pd->noise_size = 0.5f; - pd->noise_depth = 1; - pd->noise_fac = 1.0f; - pd->noise_influence = TEX_PD_NOISE_STATIC; - pd->coba = add_colorband(1); - pd->speed_scale = 1.0f; - pd->totpoints = 0; - pd->coba = add_colorband(1); - pd->object = NULL; - pd->psys = NULL; - return pd; -} - -PointDensity *BKE_copy_pointdensity(PointDensity *pd) -{ - PointDensity *pdn; - - pdn= MEM_dupallocN(pd); - pdn->point_tree = NULL; - pdn->point_data = NULL; - if(pdn->coba) pdn->coba= MEM_dupallocN(pdn->coba); - - return pdn; -} - -void BKE_free_pointdensitydata(PointDensity *pd) -{ - if (pd->point_tree) { - BLI_bvhtree_free(pd->point_tree); - pd->point_tree = NULL; - } - if (pd->point_data) { - MEM_freeN(pd->point_data); - pd->point_data = NULL; - } - if(pd->coba) MEM_freeN(pd->coba); -} - -void BKE_free_pointdensity(PointDensity *pd) -{ - BKE_free_pointdensitydata(pd); - MEM_freeN(pd); -} - - -void BKE_free_voxeldatadata(struct VoxelData *vd) -{ - if (vd->dataset) { - MEM_freeN(vd->dataset); - vd->dataset = NULL; - } - -} - -void BKE_free_voxeldata(struct VoxelData *vd) -{ - BKE_free_voxeldatadata(vd); - MEM_freeN(vd); -} - -struct VoxelData *BKE_add_voxeldata(void) -{ - VoxelData *vd; - - vd= MEM_callocN(sizeof(struct VoxelData), "voxeldata"); - vd->dataset = NULL; - vd->resol[0] = vd->resol[1] = vd->resol[2] = 1; - vd->interp_type= TEX_VD_LINEAR; - vd->file_format= TEX_VD_SMOKE; - vd->int_multiplier = 1.0; - vd->object = NULL; - - return vd; - } - -struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd) -{ - VoxelData *vdn; - - vdn= MEM_dupallocN(vd); - vdn->dataset = NULL; - - return vdn; -} - - -/* ------------------------------------------------------------------------- */ int BKE_texture_dependsOnTime(const struct Tex *texture) { if(texture->plugin) { |