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-05-13 18:47:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-13 18:47:53 +0400
commitc8ebfe1d12f87ae453fc9191fa7e3ae30aa800d4 (patch)
tree5fec94cb3019a6957fb8f094e51d34577c6dbeaa /source/blender/windowmanager
parenta55e97058b409dc9d62cbfc1634acd3810a2af0e (diff)
code cleanup:
- use bmesh iterator macros in more places - rename scanfill variables (were using same names as mesh faces/verts which was confusing)
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index 7f40d2980a6..97a431d296b 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -231,8 +231,8 @@ static void wm_gesture_draw_circle(wmGesture *gt)
static void draw_filled_lasso(wmGesture *gt)
{
ScanFillContext sf_ctx;
- ScanFillVert *v = NULL, *lastv = NULL, *firstv = NULL;
- ScanFillFace *efa;
+ ScanFillVert *sf_vert = NULL, *sf_vert_last = NULL, *sf_vert_first = NULL;
+ ScanFillFace *sf_tri;
short *lasso = (short *)gt->customdata;
int i;
@@ -244,26 +244,26 @@ static void draw_filled_lasso(wmGesture *gt)
co[1] = (float)lasso[1];
co[2] = 0.0f;
- v = BLI_scanfill_vert_add(&sf_ctx, co);
- if (lastv)
- /* e = */ /* UNUSED */ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
- lastv = v;
- if (firstv == NULL) firstv = v;
+ sf_vert = BLI_scanfill_vert_add(&sf_ctx, co);
+ if (sf_vert_last)
+ /* e = */ /* UNUSED */ BLI_scanfill_edge_add(&sf_ctx, sf_vert_last, sf_vert);
+ sf_vert_last = sf_vert;
+ if (sf_vert_first == NULL) sf_vert_first = sf_vert;
}
/* highly unlikely this will fail, but could crash if (gt->points == 0) */
- if (firstv) {
+ if (sf_vert_first) {
float zvec[3] = {0.0f, 0.0f, 1.0f};
- BLI_scanfill_edge_add(&sf_ctx, firstv, v);
+ BLI_scanfill_edge_add(&sf_ctx, sf_vert_first, sf_vert);
BLI_scanfill_calc_ex(&sf_ctx, FALSE, zvec);
glEnable(GL_BLEND);
glColor4f(1.0, 1.0, 1.0, 0.05);
glBegin(GL_TRIANGLES);
- for (efa = sf_ctx.fillfacebase.first; efa; efa = efa->next) {
- glVertex2fv(efa->v1->co);
- glVertex2fv(efa->v2->co);
- glVertex2fv(efa->v3->co);
+ for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next) {
+ glVertex2fv(sf_tri->v1->co);
+ glVertex2fv(sf_tri->v2->co);
+ glVertex2fv(sf_tri->v3->co);
}
glEnd();
glDisable(GL_BLEND);