Revision: 15118
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15118
Author: campbellbarton
Date: 2008-06-04 17:06:24 +0200 (Wed, 04 Jun 2008)
Log Message:
-----------
venomgfx needs a center other then 0.5 for some UV maps, use the 2d cursor as a
temp soluition
Modified Paths:
--------------
branches/apricot/source/blender/src/meshtools.c
branches/apricot/source/blender/src/transform_conversions.c
branches/apricot/source/blender/src/transform_generics.c
Modified: branches/apricot/source/blender/src/meshtools.c
===================================================================
--- branches/apricot/source/blender/src/meshtools.c 2008-06-04 14:57:06 UTC
(rev 15117)
+++ branches/apricot/source/blender/src/meshtools.c 2008-06-04 15:06:24 UTC
(rev 15118)
@@ -895,10 +895,10 @@
)
return NULL;
- vec[0]= -((uv[0])-0.5) + 0.5;
+ vec[0]= -((uv[0])-G.v2d->cursor[0]) + G.v2d->cursor[0];
vec[1]= uv[1];
- cent_vec[0]= -((face_cent[0])-0.5) + 0.5;
+ cent_vec[0]= -((face_cent[0])-G.v2d->cursor[0]) + G.v2d->cursor[0];
cent_vec[1] = face_cent[1];
/* TODO - Optimize */
Modified: branches/apricot/source/blender/src/transform_conversions.c
===================================================================
--- branches/apricot/source/blender/src/transform_conversions.c 2008-06-04
14:57:06 UTC (rev 15117)
+++ branches/apricot/source/blender/src/transform_conversions.c 2008-06-04
15:06:24 UTC (rev 15118)
@@ -2293,10 +2293,10 @@
count += (efa->v4)? 4: 3;
if (mirror > 0) { /* check if we should be
negative */
- if (efa_s1 && tf->uv[0][0]
< 0.5) mirror = -mirror;
- else if (efa_s2 && tf->uv[1][0] < 0.5)
mirror = -mirror;
- else if (efa_s3 && tf->uv[2][0] < 0.5)
mirror = -mirror;
- else if (efa->v4 && efa_s4 &&
tf->uv[2][0] < 0.5) mirror = -mirror;
+ if (efa_s1 && tf->uv[0][0]
< G.v2d->cursor[0]) mirror = -mirror;
+ else if (efa_s2 && tf->uv[1][0] <
G.v2d->cursor[0]) mirror = -mirror;
+ else if (efa_s3 && tf->uv[2][0] <
G.v2d->cursor[0]) mirror = -mirror;
+ else if (efa->v4 && efa_s4 &&
tf->uv[2][0] < G.v2d->cursor[0]) mirror = -mirror;
}
} else {
@@ -2378,7 +2378,7 @@
if(simaUVSel_Check(efa, tf, 0)) {
UVsToTransData(td, td2d,
tf->uv[0], 1);
/* Mirror? */
- if( (mirror>0 &&
td->iloc[0]>0.5f) || (mirror<0 && td->iloc[0]<0.5f)) {
+ if( (mirror>0 &&
td->iloc[0]>G.v2d->cursor[0]) || (mirror<0 && td->iloc[0]<G.v2d->cursor[0])) {
float *uvmir=
editmesh_get_x_mirror_uv(G.obedit, td->iloc, cent); /* initializes octree
on first call */
if(uvmir && tf->uv[0]
!= uvmir) {
td->tdmir =
uvmir;
@@ -2390,7 +2390,7 @@
if(simaUVSel_Check(efa, tf, 1)) {
UVsToTransData(td, td2d,
tf->uv[1], 1);
/* Mirror? */
- if( (mirror>0 &&
td->iloc[0]>0.5f) || (mirror<0 && td->iloc[0]<0.5f)) {
+ if( (mirror>0 &&
td->iloc[0]>G.v2d->cursor[0]) || (mirror<0 && td->iloc[0]<G.v2d->cursor[0])) {
float *uvmir=
editmesh_get_x_mirror_uv(G.obedit, td->iloc, cent); /* initializes octree
on first call */
if(uvmir && tf->uv[1]
!= uvmir) {
td->tdmir =
uvmir;
@@ -2402,7 +2402,7 @@
if(simaUVSel_Check(efa, tf, 2)) {
UVsToTransData(td, td2d,
tf->uv[2], 1);
/* Mirror? */
- if( (mirror>0 &&
td->iloc[0]>0.5f) || (mirror<0 && td->iloc[0]<0.5f)) {
+ if( (mirror>0 &&
td->iloc[0]>G.v2d->cursor[0]) || (mirror<0 && td->iloc[0]<G.v2d->cursor[0])) {
float *uvmir=
editmesh_get_x_mirror_uv(G.obedit, td->iloc, cent); /* initializes octree
on first call */
if(uvmir && tf->uv[2]
!= uvmir) {
td->tdmir =
uvmir;
@@ -2414,7 +2414,7 @@
if(efa->v4 && simaUVSel_Check(efa, tf,
3)) {
UVsToTransData(td, td2d,
tf->uv[3], 1);
/* Mirror? */
- if( (mirror>0 &&
td->iloc[0]>0.5f) || (mirror<0 && td->iloc[0]<0.5f)) {
+ if( (mirror>0 &&
td->iloc[0]>G.v2d->cursor[0]) || (mirror<0 && td->iloc[0]<G.v2d->cursor[0])) {
float *uvmir=
editmesh_get_x_mirror_uv(G.obedit, td->iloc, cent); /* initializes octree
on first call */
if(uvmir && tf->uv[3]
!= uvmir) {
td->tdmir =
uvmir;
Modified: branches/apricot/source/blender/src/transform_generics.c
===================================================================
--- branches/apricot/source/blender/src/transform_generics.c 2008-06-04
14:57:06 UTC (rev 15117)
+++ branches/apricot/source/blender/src/transform_generics.c 2008-06-04
15:06:24 UTC (rev 15118)
@@ -277,7 +277,7 @@
uv = td->tdmir;
if(uv) {
- uv[0]= -(td->loc[0]-0.5) + 0.5;
+ uv[0]= -(td->loc[0]-G.v2d->cursor[0]) +
G.v2d->cursor[0];
uv[1]= td->loc[1];
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs