cleanup: typos

This commit is contained in:
Campbell Barton 2015-02-27 15:41:50 +11:00
parent cfd176bcb1
commit 7293291a40
13 changed files with 29 additions and 29 deletions

View File

@ -307,7 +307,7 @@ if UTF8_CHECK:
try:
for l in open(f, "r", encoding="utf8"):
i += 1
except:
except UnicodeDecodeError:
print("Non utf8: %s:%d" % (f, i))
if i > 1:
traceback.print_exc()

View File

@ -275,7 +275,7 @@ class pySketchyChainSilhouetteIterator(ChainingIterator):
class pySketchyChainingIterator(ChainingIterator):
"""
Chaining iterator designed for sketchy style. It chaines the same
Chaining iterator designed for sketchy style. It chains the same
ViewEdge several times in order to produce multiple strokes per
ViewEdge.
"""
@ -320,7 +320,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
Builds a pyFillOcclusionsRelativeChainingIterator object.
:arg percent: The maximul length of the occluded part, expressed
:arg percent: The maximal length of the occluded part, expressed
in a percentage of the total chain length.
:type percent: float
"""
@ -454,7 +454,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
Builds a pyFillOcclusionsAbsoluteAndRelativeChainingIterator object.
:arg percent: The maximul length of the occluded part as a
:arg percent: The maximal length of the occluded part as a
percentage of the total chain length.
:type percent: float
:arg l: Absolute length.
@ -524,7 +524,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
Builds a pyFillQi0AbsoluteAndRelativeChainingIterator object.
:arg percent: The maximul length of the occluded part as a
:arg percent: The maximal length of the occluded part as a
percentage of the total chain length.
:type percent: float
:arg l: Absolute length.

View File

@ -189,7 +189,7 @@ class pyConstantThicknessShader(StrokeShader):
class pyFXSVaryingThicknessWithDensityShader(StrokeShader):
"""
Assings thickness to a stroke based on the density of the diffuse map.
Assigns thickness to a stroke based on the density of the diffuse map.
"""
def __init__(self, wsize, threshold_min, threshold_max, thicknessMin, thicknessMax):
StrokeShader.__init__(self)
@ -600,7 +600,7 @@ class pyTimeColorShader(StrokeShader):
class pySamplingShader(StrokeShader):
"""
Resamples the stroke, which gives the stroke the ammount of
Resamples the stroke, which gives the stroke the amount of
vertices specified.
"""
def __init__(self, sampling):
@ -776,7 +776,7 @@ class pyTVertexRemoverShader(StrokeShader):
class pyHLRShader(StrokeShader):
"""
Controlls visibility based upon the quantative invisibility (QI)
Controls visibility based upon the quantitative invisibility (QI)
based on hidden line removal (HLR).
"""
def shade(self, stroke):
@ -874,7 +874,7 @@ class pyBluePrintCirclesShader(StrokeShader):
R = self.__random_radius
C = self.__random_center
# The directions (and phases) are calculated using a seperate
# The directions (and phases) are calculated using a separate
# function decorated with an lru-cache. This guarantees that
# the directions (involving sin and cos) are calculated as few
# times as possible.
@ -942,7 +942,7 @@ class pyBluePrintEllipsesShader(StrokeShader):
c = prev_center + (center - prev_center) * phase
svert.point = (c.x + r.x * direction.x, c.y + r.y * direction.y)
# remove exessive vertices
# remove excess vertices
if not it.is_end:
it.increment()
for sv in tuple(it):
@ -1004,7 +1004,7 @@ class pyBluePrintSquaresShader(StrokeShader):
points = tuple(p + rand for (p, rand) in zip(points, randomization_mat))
# substract even from uneven; result is length four tuple of vectors
# subtract even from uneven; result is length four tuple of vectors
it = iter(points)
old_vecs = tuple(next(it) - current for current in it)
@ -1028,7 +1028,7 @@ class pyBluePrintSquaresShader(StrokeShader):
# special case; remove these vertices
verticesToRemove.append(svert)
# remove exessive vertices (if any)
# remove excess vertices (if any)
if not it.is_end:
it.increment()
verticesToRemove += [svert for svert in it]
@ -1066,7 +1066,7 @@ class pyBluePrintDirectedSquaresShader(StrokeShader):
sqrt_coeff = sqrt(trace * trace - 4 * det)
lambda1, lambda2 = (trace + sqrt_coeff) / 2, (trace - sqrt_coeff) / 2
# make sure those numers aren't to small, if they are, rooting them will yield complex numbers
# make sure those numbers aren't to small, if they are, rooting them will yield complex numbers
lambda1, lambda2 = max(1e-12, lambda1), max(1e-12, lambda2)
theta = atan(2 * p_var_xy / (p_var.x - p_var.y)) / 2
@ -1119,7 +1119,7 @@ class pyBluePrintDirectedSquaresShader(StrokeShader):
# special case; remove these vertices
verticesToRemove.append(svert)
# remove exessive vertices
# remove excess vertices
if not it.is_end:
it.increment()
verticesToRemove += [svert for svert in it]

View File

@ -221,7 +221,7 @@ def iter_material_value(stroke, func, attribute):
value = rgb_to_bw(*material.diffuse[0:3])
elif attribute == 'SPEC':
value = rgb_to_bw(*material.specular[0:3])
# line seperate
# line separate
elif attribute == 'LINE_R':
value = material.line[0]
elif attribute == 'LINE_G':
@ -230,7 +230,7 @@ def iter_material_value(stroke, func, attribute):
value = material.line[2]
elif attribute == 'LINE_A':
value = material.line[3]
# diffuse seperate
# diffuse separate
elif attribute == 'DIFF_R':
value = material.diffuse[0]
elif attribute == 'DIFF_G':
@ -239,7 +239,7 @@ def iter_material_value(stroke, func, attribute):
value = material.diffuse[2]
elif attribute == 'ALPHA':
value = material.diffuse[3]
# specular seperate
# specular separate
elif attribute == 'SPEC_R':
value = material.specular[0]
elif attribute == 'SPEC_G':
@ -262,7 +262,7 @@ def iter_distance_along_stroke(stroke):
distance += (prev - curr).length
yield distance
# -- mathmatical operations -- #
# -- mathematical operations -- #
def stroke_curvature(it):

View File

@ -280,7 +280,7 @@ class ColorAlongStrokeShader(ColorRampModifier):
class AlphaAlongStrokeShader(CurveMappingModifier):
"""Maps a curve to the alpha/transparancy of the stroke, using the curvilinear abscissa (t)."""
"""Maps a curve to the alpha/transparency of the stroke, using the curvilinear abscissa (t)."""
def shade(self, stroke):
for svert, t in zip(stroke, iter_t2d_along_stroke(stroke)):
a = svert.attribute.alpha

View File

@ -19,7 +19,7 @@
# Filename : anisotropic_diffusion.py
# Author : Fredo Durand
# Date : 12/08/2004
# Purpose : Smoothes lines using an anisotropic diffusion scheme
# Purpose : Smooth lines using an anisotropic diffusion scheme
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (

View File

@ -19,7 +19,7 @@
# Filename : apriori_density.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws lines having a high a priori density
# Purpose : Draws lines having a high a prior density
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (

View File

@ -20,7 +20,7 @@
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws colored lines. The color is automatically
# infered from each object's material in a cartoon-like
# inferred from each object's material in a cartoon-like
# fashion.
from freestyle.chainingiterators import ChainSilhouetteIterator

View File

@ -47,7 +47,7 @@ from freestyle.types import IntegrationType, Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
## Splits strokes at points of highest 2D curavture
## Splits strokes at points of highest 2D curvature
## when there are too many abrupt turns in it
func = pyInverseCurvature2DAngleF0D()
Operators.recursive_split(func, pyParameterUP0D(0.2, 0.8), NotUP1D(pyHigherNumberOfTurnsUP1D(3, 0.5)), 2)

View File

@ -20,7 +20,7 @@
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : The topology of the strokes is, first, built
# independantly from the 3D topology of objects,
# independently from the 3D topology of objects,
# and, second, so as to chain several times the same ViewEdge.
from freestyle.chainingiterators import pySketchyChainingIterator
@ -41,7 +41,7 @@ from freestyle.types import Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
## Chain 3 times each ViewEdge indpendantly from the
## Chain 3 times each ViewEdge independently from the
## initial objects topology
Operators.bidirectional_chain(pySketchyChainingIterator(3))
shaders_list = [

View File

@ -124,7 +124,7 @@ class NodeAddOperator:
result = self.execute(context)
if self.use_transform and ('FINISHED' in result):
# removes the node again if transform is cancelled
# removes the node again if transform is canceled
bpy.ops.transform.translate('INVOKE_DEFAULT', remove_on_cancel=True)
return result

View File

@ -173,8 +173,8 @@ class MASK_PT_point:
parent = point.parent
col = layout.column()
# Currently only parenting yo movie clip is allowed, so do not
# ver-oplicate things for now and use single template_ID
# Currently only parenting the movie-clip is allowed,
# so do not over-complicate things for now by using single template_ID
#col.template_any_ID(parent, "id", "id_type", text="")
col.label("Parent:")

View File

@ -350,7 +350,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
subsub.prop(cloth, "bending_stiffness", text="Stiffness")
subsub.prop(psys.settings, "bending_random", text="Random")
sub.prop(cloth, "bending_damping", text="Damping")
# XXX has no noticable effect with stiff hair structure springs
# XXX has no noticeable effect with stiff hair structure springs
#col.prop(cloth, "spring_damping", text="Damping")
split.separator()