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:
authorBastien Montagne <montagne29@wanadoo.fr>2011-12-19 12:26:53 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-12-19 12:26:53 +0400
commit90ef435145416313596cafa6f8c4c6c6aebe4e44 (patch)
treea4fb3a2027baee153227365f65a3795529b99a31 /source/blender/modifiers
parent53f88b231a3cd492ba45914a1813a633b1189218 (diff)
Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex layers like CD_MDEFORMVERT ones, so rather use copy func when available.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c4
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 347af0066c6..067d66fc82c 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -75,8 +75,8 @@ static void dm_calc_normal(DerivedMesh *dm, float (*temp_nors)[3])
/* we don't want to overwrite any referenced layers */
/*
- Dosnt work here!
- mv = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MVERT);
+ Doesn't work here!
+ mv = CustomData_duplicate_referenced_layer(&dm->vertData, CD_MVERT, numVerts);
cddm->mvert = mv;
*/
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index acf65a56561..3146d1c9d5d 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -259,11 +259,12 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
mul_mat3_m4_v3(projectors[i].ob->obmat, projectors[i].normal);
}
+ numFaces = dm->getNumFaces(dm);
+
/* make sure we are not modifying the original UV map */
tface = CustomData_duplicate_referenced_layer_named(&dm->faceData,
- CD_MTFACE, uvname);
+ CD_MTFACE, uvname, numFaces);
-
numVerts = dm->getNumVerts(dm);
coords = MEM_callocN(sizeof(*coords) * numVerts,
@@ -280,7 +281,6 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
mul_project_m4_v3(projectors[0].projmat, *co);
mface = dm->getFaceArray(dm);
- numFaces = dm->getNumFaces(dm);
/* apply coords as UVs, and apply image if tfaces are new */
for(i = 0, mf = mface; i < numFaces; ++i, ++mf, ++tface) {