Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-05-01 09:41:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-01 09:41:08 +0400
commit84d55542c32e5c979f7ed7a301f28e7bb4c96d36 (patch)
tree14b63ba0f8d0286d149107f540c494965ebdc5d3 /source/blender/blenkernel/intern/texture.c
parent9736061c07491286021b039d1307b3951496cf3b (diff)
fix for r36399
- missing copy, free calls to curve falloff. - missing localizing call for texture preview. - also moved versioning into do_versions()
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r--source/blender/blenkernel/intern/texture.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 5cba963b0a6..c518403d663 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -486,7 +486,10 @@ void free_texture(Tex *tex)
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->pd) {
+ curvemapping_free(tex->pd->falloff_curve);
+ BKE_free_pointdensity(tex->pd);
+ }
if(tex->vd) BKE_free_voxeldata(tex->vd);
BKE_free_animdata((struct ID *)tex);
@@ -762,9 +765,15 @@ Tex *copy_texture(Tex *tex)
if(texn->coba) texn->coba= MEM_dupallocN(texn->coba);
if(texn->env) texn->env= BKE_copy_envmap(texn->env);
- if(texn->pd) texn->pd= MEM_dupallocN(texn->pd);
+
+ if(texn->pd) {
+ texn->pd= MEM_dupallocN(texn->pd);
+ if(texn->pd->falloff_curve) {
+ texn->pd->falloff_curve = curvemapping_copy(texn->pd->falloff_curve);
+ }
+ }
+
if(texn->vd) texn->vd= MEM_dupallocN(texn->vd);
-
if(tex->preview) texn->preview = BKE_previewimg_copy(tex->preview);
if(tex->nodetree) {
@@ -802,6 +811,8 @@ Tex *localize_texture(Tex *tex)
texn->pd->coba= MEM_dupallocN(texn->pd->coba);
}
+ texn->pd->falloff_curve= curvemapping_copy(texn->pd->falloff_curve);
+
}
if(texn->vd) {
texn->vd= MEM_dupallocN(texn->vd);