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:
authorCampbell Barton <ideasman42@gmail.com>2011-12-17 07:46:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-17 07:46:38 +0400
commit84236c2502e83f6622ede35d18b3a0df94bb54ab (patch)
tree83020c9fa170924d0c01e2b9a53a9f78b69bb9d1 /source/blender/modifiers
parent994f4bb3f78a467b6c34e30a9b8868fc4d01caf0 (diff)
use 2d copy functions with UV's in more places.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index af61c8049b1..acf65a56561 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -295,15 +295,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
}
else {
/* apply transformed coords as UVs */
- tface->uv[0][0] = coords[mf->v1][0];
- tface->uv[0][1] = coords[mf->v1][1];
- tface->uv[1][0] = coords[mf->v2][0];
- tface->uv[1][1] = coords[mf->v2][1];
- tface->uv[2][0] = coords[mf->v3][0];
- tface->uv[2][1] = coords[mf->v3][1];
- if(mf->v4) {
- tface->uv[3][0] = coords[mf->v4][0];
- tface->uv[3][1] = coords[mf->v4][1];
+ copy_v2_v2(tface->uv[0], coords[mf->v1]);
+ copy_v2_v2(tface->uv[1], coords[mf->v2]);
+ copy_v2_v2(tface->uv[2], coords[mf->v3]);
+ if (mf->v4) {
+ copy_v2_v2(tface->uv[3], coords[mf->v4]);
}
}
} else {
@@ -358,15 +354,11 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
mul_project_m4_v3(best_projector->projmat, co4);
/* apply transformed coords as UVs */
- tface->uv[0][0] = co1[0];
- tface->uv[0][1] = co1[1];
- tface->uv[1][0] = co2[0];
- tface->uv[1][1] = co2[1];
- tface->uv[2][0] = co3[0];
- tface->uv[2][1] = co3[1];
- if(mf->v4) {
- tface->uv[3][0] = co4[0];
- tface->uv[3][1] = co4[1];
+ copy_v2_v2(tface->uv[0], co1);
+ copy_v2_v2(tface->uv[1], co2);
+ copy_v2_v2(tface->uv[2], co3);
+ if (mf->v4) {
+ copy_v2_v2(tface->uv[3], co4);
}
}
}