[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17501] branches/sim_physics/source/ blender/render/intern/source/pointdensity.c: * fix - constant colour output in point density wasn't working
Matt Ebb
matt at mke3.net
Wed Nov 19 06:30:52 CET 2008
Revision: 17501
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17501
Author: broken
Date: 2008-11-19 06:30:52 +0100 (Wed, 19 Nov 2008)
Log Message:
-----------
* fix - constant colour output in point density wasn't working
Modified Paths:
--------------
branches/sim_physics/source/blender/render/intern/source/pointdensity.c
Modified: branches/sim_physics/source/blender/render/intern/source/pointdensity.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/pointdensity.c 2008-11-19 03:43:03 UTC (rev 17500)
+++ branches/sim_physics/source/blender/render/intern/source/pointdensity.c 2008-11-19 05:30:52 UTC (rev 17501)
@@ -418,15 +418,15 @@
co[1] = texvec[1] + noise_fac * turb;
co[2] = texvec[2] + noise_fac * turb;
- /* reset and do a new BVH query with the perturbed coordinates */
+ /* reset and prepare for a new BVH query with the perturbed coordinates */
density = vec[0] = vec[1] = vec[2] = 0.0f;
- num = BLI_bvhtree_range_query(pd->point_tree, co, pd->radius, accum_density, &pdr);
- if (num > 0) {
- age /= num;
- VecMulf(vec, 1.0f/num);
- }
-
}
+
+ num = BLI_bvhtree_range_query(pd->point_tree, co, pd->radius, accum_density, &pdr);
+ if (num > 0) {
+ age /= num;
+ VecMulf(vec, 1.0f/num);
+ }
texres->tin = density;
BRICONT;
@@ -459,6 +459,7 @@
VECCOPY(&texres->tr, vec);
texres->ta = 1.0f;
break;
+ case TEX_PD_COLOR_CONSTANT:
default:
texres->tr = texres->tg = texres->tb = texres->ta = 1.0f;
break;
More information about the Bf-blender-cvs
mailing list