style cleanup: comments
This commit is contained in:
@@ -83,7 +83,7 @@ static float fcurve_display_alpha(FCurve *fcu)
|
||||
|
||||
/* Envelope -------------- */
|
||||
|
||||
// TODO: draw a shaded poly showing the region of influence too!!!
|
||||
/* TODO: draw a shaded poly showing the region of influence too!!! */
|
||||
static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
|
||||
{
|
||||
FMod_Envelope *env = (FMod_Envelope *)fcm->data;
|
||||
@@ -101,13 +101,13 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
|
||||
|
||||
glVertex2f(v2d->cur.xmin, env->midval + env->max);
|
||||
glVertex2f(v2d->cur.xmax, env->midval + env->max);
|
||||
glEnd(); // GL_LINES
|
||||
glEnd(); /* GL_LINES */
|
||||
setlinestyle(0);
|
||||
|
||||
/* set size of vertices (non-adjustable for now) */
|
||||
glPointSize(2.0f);
|
||||
|
||||
// for now, point color is fixed, and is white
|
||||
/* for now, point color is fixed, and is white */
|
||||
glColor3f(1.0f, 1.0f, 1.0f);
|
||||
|
||||
/* we use bgl points not standard gl points, to workaround vertex
|
||||
@@ -123,7 +123,7 @@ static void draw_fcurve_modifier_controls_envelope(FModifier *fcm, View2D *v2d)
|
||||
glVertex2f(fed->time, fed->max);
|
||||
}
|
||||
}
|
||||
bglEnd(); // GL_POINTS
|
||||
bglEnd(); /* GL_POINTS */
|
||||
|
||||
glPointSize(1.0f);
|
||||
}
|
||||
@@ -160,13 +160,13 @@ static void draw_fcurve_vertices_keyframes(FCurve *fcu, SpaceIpo *UNUSED(sipo),
|
||||
}
|
||||
else {
|
||||
/* no check for selection here, as curve is not editable... */
|
||||
// XXX perhaps we don't want to even draw points? maybe add an option for that later
|
||||
/* XXX perhaps we don't want to even draw points? maybe add an option for that later */
|
||||
bglVertex3fv(bezt->vec[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bglEnd(); // GL_POINTS
|
||||
bglEnd(); /* GL_POINTS */
|
||||
}
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ static void draw_fcurve_handles(SpaceIpo *sipo, FCurve *fcu)
|
||||
}
|
||||
}
|
||||
|
||||
glEnd(); // GL_LINES
|
||||
glEnd(); /* GL_LINES */
|
||||
}
|
||||
|
||||
/* Samples ---------------- */
|
||||
@@ -428,7 +428,7 @@ static void draw_fcurve_sample_control(float x, float y, float xscale, float ysc
|
||||
|
||||
glVertex2f(-0.7f, +0.7f);
|
||||
glVertex2f(+0.7f, -0.7f);
|
||||
glEnd(); // GL_LINES
|
||||
glEnd(); /* GL_LINES */
|
||||
|
||||
glEndList();
|
||||
}
|
||||
@@ -515,7 +515,7 @@ static void draw_fcurve_curve(bAnimContext *ac, ID *id, FCurve *fcu, View2D *v2d
|
||||
* chosen here is just the coarsest value which still looks reasonable...
|
||||
*/
|
||||
/* grid->dx represents the number of 'frames' between gridlines, but we divide by U.v2d_min_gridsize to get pixels-steps */
|
||||
// TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted?
|
||||
/* TODO: perhaps we should have 1.0 frames as upper limit so that curves don't get too distorted? */
|
||||
samplefreq = dx / U.v2d_min_gridsize;
|
||||
if (samplefreq < 0.00001f) samplefreq = 0.00001f;
|
||||
|
||||
@@ -667,7 +667,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
|
||||
}
|
||||
|
||||
/* draw curve between first and last keyframe (if there are enough to do so) */
|
||||
// TODO: optimize this to not have to calc stuff out of view too?
|
||||
/* TODO: optimize this to not have to calc stuff out of view too? */
|
||||
while (b--) {
|
||||
if (prevbezt->ipo == BEZT_IPO_CONST) {
|
||||
/* Constant-Interpolation: draw segment between previous keyframe and next, but holding same value */
|
||||
@@ -691,7 +691,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
|
||||
*/
|
||||
|
||||
/* resol depends on distance between points (not just horizontal) OR is a fixed high res */
|
||||
// TODO: view scale should factor into this someday too...
|
||||
/* TODO: view scale should factor into this someday too... */
|
||||
if (fcu->driver)
|
||||
resol = 32;
|
||||
else
|
||||
@@ -705,7 +705,7 @@ static void draw_fcurve_curve_bezts(bAnimContext *ac, ID *id, FCurve *fcu, View2
|
||||
}
|
||||
else {
|
||||
/* clamp resolution to max of 32 */
|
||||
// NOTE: higher values will crash
|
||||
/* NOTE: higher values will crash */
|
||||
if (resol > 32) resol = 32;
|
||||
|
||||
v1[0] = prevbezt->vec[1][0];
|
||||
@@ -852,7 +852,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid
|
||||
}
|
||||
if (((fcu->grp) && (fcu->grp->flag & AGRP_MUTED)) || (fcu->flag & FCURVE_MUTED)) {
|
||||
/* muted curves are drawn in a grayish hue */
|
||||
// XXX should we have some variations?
|
||||
/* XXX should we have some variations? */
|
||||
UI_ThemeColorShade(TH_HEADER, 50);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user