[Bf-blender-cvs] [a581b65822] master: Fix T49936: Cycles point density get's it's bounding box from basis shape key

Sergey Sharybin noreply at git.blender.org
Tue Feb 28 12:42:09 CET 2017


Commit: a581b6582297c923747b7cc37a814279dc108614
Author: Sergey Sharybin
Date:   Tue Feb 28 12:39:40 2017 +0100
Branches: master
https://developer.blender.org/rBa581b6582297c923747b7cc37a814279dc108614

Fix T49936: Cycles point density get's it's bounding box from basis shape key

===================================================================

M	source/blender/render/intern/source/pointdensity.c

===================================================================

diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index a03ea9cb89..fb047aad89 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -983,11 +983,12 @@ void RE_point_density_minmax(
 	}
 	else {
 		float radius[3] = {pd->radius, pd->radius, pd->radius};
-		float *loc, *size;
+		BoundBox *bb = BKE_object_boundbox_get(object);
 
-		if (BKE_object_obdata_texspace_get(pd->object, NULL, &loc, &size, NULL)) {
-			sub_v3_v3v3(r_min, loc, size);
-			add_v3_v3v3(r_max, loc, size);
+		if (bb != NULL) {
+			BLI_assert((bb->flag & BOUNDBOX_DIRTY) == 0);
+			copy_v3_v3(r_min, bb->vec[0]);
+			copy_v3_v3(r_max, bb->vec[6]);
 			/* Adjust texture space to include density points on the boundaries. */
 			sub_v3_v3(r_min, radius);
 			add_v3_v3(r_max, radius);




More information about the Bf-blender-cvs mailing list