Code Cleanup: style and correct API class ref

This commit is contained in:
Campbell Barton
2014-01-26 22:17:01 +11:00
parent 97aab5acc4
commit 1c29fd77d3
7 changed files with 17 additions and 19 deletions

View File

@@ -720,8 +720,8 @@ base class --- :class:`SCA_IObject`
:rtype: :rtype:
* 3-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz)) * 3-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz))
* or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`) * or 4-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`)
* or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`PolyProxy`, 2-tuple (u, v)) * or 5-tuple (:class:`KX_GameObject`, 3-tuple (x, y, z), 3-tuple (nx, ny, nz), :class:`KX_PolyProxy`, 2-tuple (u, v))
.. note:: .. note::

View File

@@ -108,7 +108,7 @@ base class --- :class:`SCA_IObject`
:arg index: polygon number :arg index: polygon number
:type index: integer :type index: integer
:return: a polygon object. :return: a polygon object.
:rtype: :class:`PolyProxy` :rtype: :class:`KX_PolyProxy`
.. method:: transform(matid, matrix) .. method:: transform(matid, matrix)

View File

@@ -367,8 +367,6 @@ static void make_duplis_frames(const DupliContext *ctx)
} }
if (ok) { if (ok) {
DupliObject *dob;
/* WARNING: doing animation updates in this way is not terribly accurate, as the dependencies /* WARNING: doing animation updates in this way is not terribly accurate, as the dependencies
* and/or other objects which may affect this object's transforms are not updated either. * and/or other objects which may affect this object's transforms are not updated either.
* However, this has always been the way that this worked (i.e. pre 2.5), so I guess that it'll be fine! * However, this has always been the way that this worked (i.e. pre 2.5), so I guess that it'll be fine!
@@ -376,7 +374,7 @@ static void make_duplis_frames(const DupliContext *ctx)
BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, (float)scene->r.cfra, ADT_RECALC_ANIM); /* ob-eval will do drivers, so we don't need to do them */ BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, (float)scene->r.cfra, ADT_RECALC_ANIM); /* ob-eval will do drivers, so we don't need to do them */
BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra); BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra);
dob = make_dupli(ctx, ob, ob->obmat, scene->r.cfra, false, false); make_dupli(ctx, ob, ob->obmat, scene->r.cfra, false, false);
} }
} }

View File

@@ -3677,7 +3677,7 @@ static void find_even_superellipse_params(int n, float r, float *r_params)
/* n is odd, so get one corner-cut chord. /* n is odd, so get one corner-cut chord.
* Solve u == sqrt(2*(1-n2*u)^2) where n2 = floor(n/2) */ * Solve u == sqrt(2*(1-n2*u)^2) where n2 = floor(n/2) */
n2 = n / 2; n2 = n / 2;
u = (2.0f * n2 - M_SQRT2) / (2.0f * n2 * n2 - 1); u = (2.0f * n2 - (float)M_SQRT2) / (2.0f * n2 * n2 - 1.0f);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
r_params[i] = i * u; r_params[i] = i * u;
r_params[n] = umax; r_params[n] = umax;

View File

@@ -195,7 +195,7 @@ void ScreenLensDistortionOperation::deinitExecution()
void ScreenLensDistortionOperation::determineUV(float result[6], float x, float y) const void ScreenLensDistortionOperation::determineUV(float result[6], float x, float y) const
{ {
float xy[2] = { x, y }; const float xy[2] = {x, y};
float uv[2]; float uv[2];
get_uv(xy, uv); get_uv(xy, uv);
float uv_dot = len_squared_v2(uv); float uv_dot = len_squared_v2(uv);