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>2010-03-22 12:30:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-22 12:30:00 +0300
commit1e9bf0cfdb6c925b28af6f0330467e7d9d798c05 (patch)
treec8356d8bc812dc6e3f23b9c381e94ec4c9d4c879 /source/blender/editors/uvedit
parent9b2dd9aac65aa49c05176bb8b7aabde9fe1aeeac (diff)
spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text)
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c8
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c80
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h18
4 files changed, 54 insertions, 54 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 17010c25e31..62f188dd19d 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -731,7 +731,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
pointsize = UI_GetThemeValuef(TH_FACEDOT_SIZE);
glPointSize(pointsize); // TODO - drawobject.c changes this value after - Investigate!
- /* unselected faces */
+ /* unselected faces */
UI_ThemeColor(TH_WIRE);
bglBegin(GL_POINTS);
@@ -763,7 +763,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* 6. draw uv vertices */
if(drawfaces != 2) { /* 2 means Mesh Face Mode */
- /* unselected uvs */
+ /* unselected uvs */
UI_ThemeColor(TH_VERTEX);
pointsize = UI_GetThemeValuef(TH_VERTEX_SIZE);
glPointSize(pointsize);
@@ -787,7 +787,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* pinned uvs */
/* give odd pointsizes odd pin pointsizes */
- glPointSize(pointsize*2 + (((int)pointsize % 2)? (-1): 0));
+ glPointSize(pointsize*2 + (((int)pointsize % 2)? (-1): 0));
cpack(0xFF);
bglBegin(GL_POINTS);
@@ -809,7 +809,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
/* selected uvs */
UI_ThemeColor(TH_VERTEX_SELECT);
- glPointSize(pointsize);
+ glPointSize(pointsize);
bglBegin(GL_POINTS);
for(efa= em->faces.first; efa; efa= efa->next) {
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index bc63d412046..4ddb03f859a 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -2294,7 +2294,7 @@ int circle_select_exec(bContext *C, wmOperator *op)
MTFace *tface;
int x, y, radius, width, height, select;
float zoomx, zoomy, offset[2], ellipse[2];
- int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
+ int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
/* get operator properties */
select= (gesture_mode == GESTURE_MODAL_SELECT);
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 2de3c60f54c..dbc04f85497 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -388,7 +388,7 @@ static float p_face_area(PFace *f)
static float p_area_signed(float *v1, float *v2, float *v3)
{
return 0.5f*(((v2[0] - v1[0])*(v3[1] - v1[1])) -
- ((v3[0] - v1[0])*(v2[1] - v1[1])));
+ ((v3[0] - v1[0])*(v2[1] - v1[1])));
}
static float p_face_uv_area_signed(PFace *f)
@@ -397,30 +397,30 @@ static float p_face_uv_area_signed(PFace *f)
PVert *v1 = e1->vert, *v2 = e2->vert, *v3 = e3->vert;
return 0.5f*(((v2->uv[0] - v1->uv[0])*(v3->uv[1] - v1->uv[1])) -
- ((v3->uv[0] - v1->uv[0])*(v2->uv[1] - v1->uv[1])));
+ ((v3->uv[0] - v1->uv[0])*(v2->uv[1] - v1->uv[1])));
}
static float p_edge_length(PEdge *e)
{
- PVert *v1 = e->vert, *v2 = e->next->vert;
- float d[3];
+ PVert *v1 = e->vert, *v2 = e->next->vert;
+ float d[3];
- d[0] = v2->co[0] - v1->co[0];
- d[1] = v2->co[1] - v1->co[1];
- d[2] = v2->co[2] - v1->co[2];
+ d[0] = v2->co[0] - v1->co[0];
+ d[1] = v2->co[1] - v1->co[1];
+ d[2] = v2->co[2] - v1->co[2];
- return sqrt(d[0]*d[0] + d[1]*d[1] + d[2]*d[2]);
+ return sqrt(d[0]*d[0] + d[1]*d[1] + d[2]*d[2]);
}
static float p_edge_uv_length(PEdge *e)
{
- PVert *v1 = e->vert, *v2 = e->next->vert;
- float d[3];
+ PVert *v1 = e->vert, *v2 = e->next->vert;
+ float d[3];
- d[0] = v2->uv[0] - v1->uv[0];
- d[1] = v2->uv[1] - v1->uv[1];
+ d[0] = v2->uv[0] - v1->uv[0];
+ d[1] = v2->uv[1] - v1->uv[1];
- return sqrt(d[0]*d[0] + d[1]*d[1]);
+ return sqrt(d[0]*d[0] + d[1]*d[1]);
}
static void p_chart_uv_bbox(PChart *chart, float *minv, float *maxv)
@@ -522,7 +522,7 @@ static PEdge *p_boundary_edge_next(PEdge *e)
static PEdge *p_boundary_edge_prev(PEdge *e)
{
- PEdge *we = e, *last;
+ PEdge *we = e, *last;
do {
last = we;
@@ -591,7 +591,7 @@ static void p_vert_load_pin_select_uvs(PHandle *handle, PVert *v)
if (e->flag & PEDGE_SELECT)
v->flag |= PVERT_SELECT;
- if (e->flag & PEDGE_PIN) {
+ if (e->flag & PEDGE_PIN) {
pinuv[0] += e->orig_uv[0]*handle->aspx;
pinuv[1] += e->orig_uv[1]*handle->aspy;
npins++;
@@ -821,7 +821,7 @@ static PBool p_edge_has_pair(PHandle *handle, PEdge *e, PEdge **pair, PBool impl
/* don't connect seams and t-junctions */
if ((pe->flag & PEDGE_SEAM) || *pair ||
- (impl && p_edge_implicit_seam(e, pe))) {
+ (impl && p_edge_implicit_seam(e, pe))) {
*pair = NULL;
return P_FALSE;
}
@@ -1030,8 +1030,8 @@ static PFace *p_face_add(PHandle *handle)
}
static PFace *p_face_add_construct(PHandle *handle, ParamKey key, ParamKey *vkeys,
- float *co[3], float *uv[3], int i1, int i2, int i3,
- ParamBool *pin, ParamBool *select)
+ float *co[3], float *uv[3], int i1, int i2, int i3,
+ ParamBool *pin, ParamBool *select)
{
PFace *f = p_face_add(handle);
PEdge *e1 = f->edge, *e2 = e1->next, *e3 = e2->next;
@@ -1122,8 +1122,8 @@ static PBool p_quad_split_direction(PHandle *handle, float **co, PHashKey *vkeys
static void p_chart_boundaries(PChart *chart, int *nboundaries, PEdge **outer)
{
- PEdge *e, *be;
- float len, maxlen = -1.0;
+ PEdge *e, *be;
+ float len, maxlen = -1.0;
if (nboundaries)
*nboundaries = 0;
@@ -1131,29 +1131,29 @@ static void p_chart_boundaries(PChart *chart, int *nboundaries, PEdge **outer)
*outer = NULL;
for (e=chart->edges; e; e=e->nextlink) {
- if (e->pair || (e->flag & PEDGE_DONE))
- continue;
+ if (e->pair || (e->flag & PEDGE_DONE))
+ continue;
if (nboundaries)
(*nboundaries)++;
- len = 0.0f;
+ len = 0.0f;
be = e;
do {
- be->flag |= PEDGE_DONE;
- len += p_edge_length(be);
+ be->flag |= PEDGE_DONE;
+ len += p_edge_length(be);
be = be->next->vert->edge;
- } while(be != e);
+ } while(be != e);
- if (outer && (len > maxlen)) {
+ if (outer && (len > maxlen)) {
*outer = e;
- maxlen = len;
- }
- }
+ maxlen = len;
+ }
+ }
for (e=chart->edges; e; e=e->nextlink)
- e->flag &= ~PEDGE_DONE;
+ e->flag &= ~PEDGE_DONE;
}
static float p_edge_boundary_angle(PEdge *e)
@@ -1270,8 +1270,8 @@ static void p_chart_fill_boundaries(PChart *chart, PEdge *outer)
for (e=chart->edges; e; e=e->nextlink) {
/* enext = e->nextlink; - as yet unused */
- if (e->pair || (e->flag & PEDGE_FILLED))
- continue;
+ if (e->pair || (e->flag & PEDGE_FILLED))
+ continue;
nedges = 0;
be = e;
@@ -1283,7 +1283,7 @@ static void p_chart_fill_boundaries(PChart *chart, PEdge *outer)
if (e != outer)
p_chart_fill_boundary(chart, e, nedges);
- }
+ }
}
#if 0
@@ -1846,7 +1846,7 @@ static PBool p_collapse_allowed(PEdge *edge, PEdge *pair)
return P_FALSE;
return (p_collapse_allowed_topologic(edge, pair) &&
- p_collapse_allowed_geometric(edge, pair));
+ p_collapse_allowed_geometric(edge, pair));
}
static float p_collapse_cost(PEdge *edge, PEdge *pair)
@@ -2791,7 +2791,7 @@ static PBool p_chart_symmetry_pins(PChart *chart, PEdge *outer, PVert **pin1, PV
float maxlen = 0.0f, curlen = 0.0f, totlen = 0.0f, firstlen = 0.0f;
float len1, len2;
- /* find longest series of verts split in the chart itself, these are
+ /* find longest series of verts split in the chart itself, these are
marked during construction */
be = outer;
lastbe = p_boundary_edge_prev(be);
@@ -2802,7 +2802,7 @@ static PBool p_chart_symmetry_pins(PChart *chart, PEdge *outer, PVert **pin1, PV
nextbe = p_boundary_edge_next(be);
if ((be->vert->flag & PVERT_SPLIT) ||
- (lastbe->vert->flag & nextbe->vert->flag & PVERT_SPLIT)) {
+ (lastbe->vert->flag & nextbe->vert->flag & PVERT_SPLIT)) {
if (!cure) {
if (be == outer)
firste1 = be;
@@ -4072,7 +4072,7 @@ void param_delete(ParamHandle *handle)
int i;
param_assert((phandle->state == PHANDLE_STATE_ALLOCATED) ||
- (phandle->state == PHANDLE_STATE_CONSTRUCTED));
+ (phandle->state == PHANDLE_STATE_CONSTRUCTED));
for (i = 0; i < phandle->ncharts; i++)
p_chart_delete(phandle->charts[i]);
@@ -4093,8 +4093,8 @@ void param_delete(ParamHandle *handle)
}
void param_face_add(ParamHandle *handle, ParamKey key, int nverts,
- ParamKey *vkeys, float **co, float **uv,
- ParamBool *pin, ParamBool *select)
+ ParamKey *vkeys, float **co, float **uv,
+ ParamBool *pin, ParamBool *select)
{
PHandle *phandle = (PHandle*)handle;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index f1454ee3865..0fa54c64d95 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -22,7 +22,7 @@ typedef enum ParamBool {
- vertices are implicitly created
- in construct_end the mesh will be split up according to the seams
- the resulting charts must be:
- - manifold, connected, open (at least one boundary loop)
+ - manifold, connected, open (at least one boundary loop)
- output will be written to the uv pointers
*/
@@ -31,16 +31,16 @@ ParamHandle *param_construct_begin();
void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy);
void param_face_add(ParamHandle *handle,
- ParamKey key,
- int nverts,
- ParamKey *vkeys,
- float **co,
- float **uv,
+ ParamKey key,
+ int nverts,
+ ParamKey *vkeys,
+ float **co,
+ float **uv,
ParamBool *pin,
ParamBool *select);
void param_edge_set_seam(ParamHandle *handle,
- ParamKey *vkeys);
+ ParamKey *vkeys);
void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl);
void param_delete(ParamHandle *chart);
@@ -49,8 +49,8 @@ void param_delete(ParamHandle *chart);
-----------------------------
- charts with less than two pinned vertices are assigned 2 pins
- lscm is divided in three steps:
- - begin: compute matrix and it's factorization (expensive)
- - solve using pinned coordinates (cheap)
+ - begin: compute matrix and it's factorization (expensive)
+ - solve using pinned coordinates (cheap)
- end: clean up
- uv coordinates are allowed to change within begin/end, for
quick re-solving