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/blenloader
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/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 085866414de..3db42e84b94 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2964,20 +2964,9 @@ static void direct_link_texture(FileData *fd, Tex *tex)
tex->pd->point_tree = NULL;
tex->pd->coba= newdataadr(fd, tex->pd->coba);
tex->pd->falloff_curve= newdataadr(fd, tex->pd->falloff_curve);
-
- /*hack to avoid a do_versions patch*/
- if (tex->pd->falloff_speed_scale == 0.0)
- tex->pd->falloff_speed_scale = 100.0;
-
- if (!tex->pd->falloff_curve) {
- tex->pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1);
-
- tex->pd->falloff_curve->preset = CURVE_PRESET_LINE;
- tex->pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
- curvemap_reset(tex->pd->falloff_curve->cm, &tex->pd->falloff_curve->clipr, tex->pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE);
- curvemapping_changed(tex->pd->falloff_curve, 0);
- } else
+ if(tex->pd->falloff_curve) {
direct_link_curvemapping(fd, tex->pd->falloff_curve);
+ }
}
tex->vd= newdataadr(fd, tex->vd);
@@ -11637,6 +11626,26 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
+
+ {
+ /* Initialize texture point density curve falloff */
+ Tex *tex;
+ for(tex= main->tex.first; tex; tex= tex->id.next) {
+ if(tex->pd) {
+ if (tex->pd->falloff_speed_scale == 0.0)
+ tex->pd->falloff_speed_scale = 100.0;
+
+ if (!tex->pd->falloff_curve) {
+ tex->pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1);
+
+ tex->pd->falloff_curve->preset = CURVE_PRESET_LINE;
+ tex->pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
+ curvemap_reset(tex->pd->falloff_curve->cm, &tex->pd->falloff_curve->clipr, tex->pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE);
+ curvemapping_changed(tex->pd->falloff_curve, 0);
+ }
+ }
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */