diff options
author | Joseph Eagar <joeedh@gmail.com> | 2011-05-01 07:57:53 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2011-05-01 07:57:53 +0400 |
commit | 9736061c07491286021b039d1307b3951496cf3b (patch) | |
tree | 87a054b6cf014b4170770653bbfc020e1a549b6a /source/blender/blenkernel/intern/texture.c | |
parent | 4734a3321516283d1f2557818ddeb155aa34c56b (diff) |
=trunk=
Made some improvements to the point density texture. Added support
for tweaking the falloff with a custom curve. Also coded new
falloff types based on the age or velocity of particles.
Also added a test break check to the volumetric shade cache code,
to avoid nasty hangups from the preview render (on render, exit,
etc).
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r-- | source/blender/blenkernel/intern/texture.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 672fd06f95d..5cba963b0a6 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -73,7 +73,7 @@ #include "BKE_icons.h" #include "BKE_node.h" #include "BKE_animsys.h" - +#include "BKE_colortools.h" /* ------------------------------------------------------------------------- */ @@ -1367,6 +1367,13 @@ PointDensity *BKE_add_pointdensity(void) pd->object = NULL; pd->psys = 0; pd->psys_cache_space= TEX_PD_WORLDSPACE; + pd->falloff_curve = curvemapping_add(1, 0, 0, 1, 1); + + pd->falloff_curve->preset = CURVE_PRESET_LINE; + pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE; + curvemap_reset(pd->falloff_curve->cm, &pd->falloff_curve->clipr, pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE); + curvemapping_changed(pd->falloff_curve, 0); + return pd; } |