[Bf-blender-cvs] [50a7843] master: Bake-API: replacing some MEM_callocN by MEM_mallocN
Dalai Felinto
noreply at git.blender.org
Fri May 30 04:19:12 CEST 2014
Commit: 50a7843ab1f339755a807a712280bb9e364b130e
Author: Dalai Felinto
Date: Thu May 29 23:18:21 2014 -0300
https://developer.blender.org/rB50a7843ab1f339755a807a712280bb9e364b130e
Bake-API: replacing some MEM_callocN by MEM_mallocN
As suggested and reviewed by Campbell Barton. This is the most trivial of the cases. I will look if I can do it elsewhere in the bake code
===================================================================
M source/blender/render/intern/source/bake_api.c
===================================================================
diff --git a/source/blender/render/intern/source/bake_api.c b/source/blender/render/intern/source/bake_api.c
index 92b639c..48516ea 100644
--- a/source/blender/render/intern/source/bake_api.c
+++ b/source/blender/render/intern/source/bake_api.c
@@ -395,8 +395,8 @@ void RE_bake_pixels_populate_from_objects(
TriTessFace **tris_high;
/* assume all lowpoly tessfaces can be quads */
- tris_low = MEM_callocN(sizeof(TriTessFace) * (me_low->totface * 2), "MVerts Lowpoly Mesh");
- tris_high = MEM_callocN(sizeof(TriTessFace *) * tot_highpoly, "MVerts Highpoly Mesh Array");
+ tris_low = MEM_mallocN(sizeof(TriTessFace) * (me_low->totface * 2), "MVerts Lowpoly Mesh");
+ tris_high = MEM_mallocN(sizeof(TriTessFace *) * tot_highpoly, "MVerts Highpoly Mesh Array");
/* assume all highpoly tessfaces are triangles */
dm_highpoly = MEM_callocN(sizeof(DerivedMesh *) * tot_highpoly, "Highpoly Derived Meshes");
@@ -407,7 +407,7 @@ void RE_bake_pixels_populate_from_objects(
invert_m4_m4(imat_low, mat_low);
for (i = 0; i < tot_highpoly; i++) {
- tris_high[i] = MEM_callocN(sizeof(TriTessFace) * highpoly[i].me->totface, "MVerts Highpoly Mesh");
+ tris_high[i] = MEM_mallocN(sizeof(TriTessFace) * highpoly[i].me->totface, "MVerts Highpoly Mesh");
mesh_calc_tri_tessface(tris_high[i], highpoly[i].me, false, NULL);
dm_highpoly[i] = CDDM_from_mesh(highpoly[i].me);
@@ -628,7 +628,7 @@ void RE_bake_normal_world_to_tangent(
DerivedMesh *dm = CDDM_from_mesh(me);
- triangles = MEM_callocN(sizeof(TriTessFace) * (me->totface * 2), "MVerts Mesh");
+ triangles = MEM_mallocN(sizeof(TriTessFace) * (me->totface * 2), "MVerts Mesh");
mesh_calc_tri_tessface(triangles, me, true, dm);
BLI_assert(num_pixels >= 3);
More information about the Bf-blender-cvs
mailing list