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>2012-03-03 20:31:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-03 20:31:46 +0400
commita2c182e9233333fc3b8ff40d352113ec95e7e30c (patch)
tree37a9e08f4e6c4bf794aa0c8c15af875299db4a1b /source/blender/editors/uvedit
parent86cec98f9e1523ed41b67ef998174289dbae9b83 (diff)
style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide).
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c12
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c8
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c38
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h36
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c2
6 files changed, 52 insertions, 46 deletions
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index db71f74b8e1..66ba28e70a6 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -661,12 +661,14 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
}
glEnd();
- /*glBegin(GL_LINE_STRIP);
+#if 0
+ glBegin(GL_LINE_STRIP);
luv = CustomData_bmesh_get(&em->bm->ldata, efa->lbase->head.data, CD_MLOOPUV);
glVertex2fv(luv->uv);
luv = CustomData_bmesh_get(&em->bm->ldata, efa->lbase->next->head.data, CD_MLOOPUV);
glVertex2fv(luv->uv);
- glEnd();*/
+ glEnd();
+#endif
setlinestyle(0);
}
@@ -900,8 +902,10 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
index += stitch_preview->uvs_per_polygon[i];
}
glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
- /*UI_ThemeColor4(TH_STITCH_PREVIEW_VERT);
- glDrawArrays(GL_TRIANGLES, 0, stitch_preview->num_tris*3);*/
+#if 0
+ UI_ThemeColor4(TH_STITCH_PREVIEW_VERT);
+ glDrawArrays(GL_TRIANGLES, 0, stitch_preview->num_tris*3);
+#endif
glDisable(GL_BLEND);
/* draw vert preview */
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 42e6ec39e46..15d8a644035 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -2348,9 +2348,11 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
vmap= EDBM_make_uv_vert_map(em, 0, 0, limit);
/* verts are numbered above in make_uv_vert_map_EM, make sure this stays true! */
- /*for(a=0, eve= em->verts.first; eve; a++, eve= eve->next)
- eve->tmp.l = a; */
-
+ /* BMESH_TODO - why keep this commented? - campbell */
+#if 0
+ for(a=0, eve= em->verts.first; eve; a++, eve= eve->next)
+ eve->tmp.l = a;
+#endif
if(vmap == NULL) {
return;
}
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 49bfb786f20..d6035b08fd6 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -219,10 +219,10 @@ typedef struct PHandle {
/* PHash
- - special purpose hash that keeps all its elements in a single linked list.
- - after construction, this hash is thrown away, and the list remains.
- - removing elements is not possible efficiently.
-*/
+ * - special purpose hash that keeps all its elements in a single linked list.
+ * - after construction, this hash is thrown away, and the list remains.
+ * - removing elements is not possible efficiently.
+ */
static int PHashSizes[] = {
1, 3, 5, 11, 17, 37, 67, 131, 257, 521, 1031, 2053, 4099, 8209,
@@ -497,7 +497,7 @@ static PBool p_intersect_line_2d(float *v1, float *v2, float *v3, float *v4, flo
if (!p_intersect_line_2d_dir(v1, dir1, v2, dir2, isect)) {
/* parallel - should never happen in theory for polygon kernel, but
- let's give a point nearby in case things go wrong */
+ * let's give a point nearby in case things go wrong */
isect[0] = (v1[0] + v2[0])*0.5f;
isect[1] = (v1[1] + v2[1])*0.5f;
return P_FALSE;
@@ -1121,9 +1121,9 @@ static PBool p_quad_split_direction(PHandle *handle, float **co, PHashKey *vkeys
PBool dir = (fac <= 0.0f);
/* the face exists check is there because of a special case: when
- two quads share three vertices, they can each be split into two
- triangles, resulting in two identical triangles. for example in
- suzanne's nose. */
+ * two quads share three vertices, they can each be split into two
+ * triangles, resulting in two identical triangles. for example in
+ * suzanne's nose. */
if (dir) {
if (p_face_exists(handle,vkeys,0,1,2) || p_face_exists(handle,vkeys,0,2,3))
return !dir;
@@ -1536,8 +1536,8 @@ static void p_vert_harmonic_insert(PVert *v)
if (!p_vert_map_harmonic_weights(v)) {
/* do polygon kernel center insertion: this is quite slow, but should
- only be needed for 0.01 % of verts or so, when insert with harmonic
- weights fails */
+ * only be needed for 0.01 % of verts or so, when insert with harmonic
+ * weights fails */
int npoints = 0, i;
float (*points)[2];
@@ -1759,7 +1759,7 @@ static PBool p_collapse_allowed_topologic(PEdge *edge, PEdge *pair)
return P_FALSE;
}
/* avoid merging two boundaries (oldv and keepv are on the 'other side' of
- the chart) */
+ * the chart) */
else if (!p_vert_interior(oldv) && !p_vert_interior(keepv))
return P_FALSE;
@@ -1870,7 +1870,7 @@ static PBool p_collapse_allowed(PEdge *edge, PEdge *pair)
static float p_collapse_cost(PEdge *edge, PEdge *pair)
{
/* based on volume and boundary optimization from:
- "Fast and Memory Efficient Polygonal Simplification" P. Lindstrom, G. Turk */
+ * "Fast and Memory Efficient Polygonal Simplification" P. Lindstrom, G. Turk */
PVert *oldv, *keepv;
PEdge *e;
@@ -2036,7 +2036,7 @@ static void p_chart_post_collapse_flush(PChart *chart, PEdge *collapsed)
}
/* these are added last so they can be popped of in the right order
- for splitting */
+ * for splitting */
for (e=collapsed; e; e=e->nextlink) {
e->nextlink = e->u.nextcollapse;
laste = e;
@@ -2098,9 +2098,9 @@ static void p_chart_post_split_flush(PChart *chart)
static void p_chart_simplify_compute(PChart *chart)
{
/* Computes a list of edge collapses / vertex splits. The collapsed
- simplices go in the chart->collapsed_* lists, The original and
- collapsed may then be view as stacks, where the next collapse/split
- is at the top of the respective lists. */
+ * simplices go in the chart->collapsed_* lists, The original and
+ * collapsed may then be view as stacks, where the next collapse/split
+ * is at the top of the respective lists. */
Heap *heap = BLI_heap_new();
PVert *v, **wheelverts;
@@ -2320,7 +2320,7 @@ static float p_abf_compute_sin_product(PAbfSystem *sys, PVert *v, int aid)
if (aid == e1->u.id) {
/* we are computing a derivative for this angle,
- so we use cos and drop the other part */
+ * so we use cos and drop the other part */
sin1 *= sys->cosine[e1->u.id];
sin2 = 0.0;
}
@@ -2810,7 +2810,7 @@ static PBool p_chart_symmetry_pins(PChart *chart, PEdge *outer, PVert **pin1, PV
float len1, len2;
/* find longest series of verts split in the chart itself, these are
- marked during construction */
+ * marked during construction */
be = outer;
lastbe = p_boundary_edge_prev(be);
do {
@@ -3406,7 +3406,7 @@ static PBool p_chart_convex_hull(PChart *chart, PVert ***verts, int *nverts, int
static float p_rectangle_area(float *p1, float *dir, float *p2, float *p3, float *p4)
{
/* given 4 points on the rectangle edges and the direction of on edge,
- compute the area of the rectangle */
+ * compute the area of the rectangle */
float orthodir[2], corner1[2], corner2[2], corner3[2];
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index 5adb3074314..00cbbd16073 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -19,15 +19,15 @@ typedef enum ParamBool {
} ParamBool;
/* Chart construction:
- -------------------
- - faces and seams may only be added between construct_{begin|end}
- - the pointers to co and uv are stored, rather than being copied
- - 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)
- - output will be written to the uv pointers
-*/
+ * -------------------
+ * - faces and seams may only be added between construct_{begin|end}
+ * - the pointers to co and uv are stored, rather than being copied
+ * - 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)
+ * - output will be written to the uv pointers
+ */
ParamHandle *param_construct_begin(void);
@@ -51,15 +51,15 @@ void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl);
void param_delete(ParamHandle *chart);
/* Least Squares Conformal Maps:
- -----------------------------
- - 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)
- - end: clean up
- - uv coordinates are allowed to change within begin/end, for
- quick re-solving
-*/
+ * -----------------------------
+ * - 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)
+ * - end: clean up
+ * - uv coordinates are allowed to change within begin/end, for
+ * quick re-solving
+ */
void param_lscm_begin(ParamHandle *handle, ParamBool live, ParamBool abf);
void param_lscm_solve(ParamHandle *handle);
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index c7750fd516b..f7dd90e6084 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -383,7 +383,7 @@ static void stitch_island_calculate_edge_rotation(UvEdge *edge, StitchState *sta
index2 = uvfinal_map[element2 - state->element_map->buf];
/* the idea here is to take the directions of the edges and find the rotation between final and initial
- * direction. This, using inner and outer vector products, gives the angle. Directions are differences so... */
+ * direction. This, using inner and outer vector products, gives the angle. Directions are differences so... */
uv1[0] = luv2->uv[0] - luv1->uv[0];
uv1[1] = luv2->uv[1] - luv1->uv[1];
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 56d088577b6..85bf3064d7f 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -154,7 +154,7 @@ static int uvedit_have_selection(Scene *scene, BMEditMesh *em, short implicit)
MLoopUV *luv;
/* verify if we have any selected uv's before unwrapping,
- so we can cancel the operator early */
+ * so we can cancel the operator early */
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
if(scene->toolsettings->uv_flag & UV_SYNC_SELECTION) {
if(BM_elem_flag_test(efa, BM_ELEM_HIDDEN))