Skip to content

Commit

Permalink
Fix typos in source comments and descriptions
Browse files Browse the repository at this point in the history
Patch contributed by luzpaz.

Differential Revision: https://developer.blender.org/D5800
  • Loading branch information
brechtvl committed Oct 1, 2019
1 parent 50c493f commit ed16145
Show file tree
Hide file tree
Showing 33 changed files with 50 additions and 51 deletions.
2 changes: 1 addition & 1 deletion archipack/archipack_cutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def locate_manipulators(self):
manipulators[1].prop1_name = "length"
manipulators[1].set_pts([p0, p1, (side, 0, 0)])

# snap manipulator, dont change index !
# snap manipulator, don't change index !
manipulators[2].set_pts([p0, p1, (side, 0, 0)])
# dumb segment id
manipulators[3].set_pts([p0, p1, (side, 0, 0)])
Expand Down
6 changes: 3 additions & 3 deletions archipack/archipack_fence.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def param_t(self, angle_limit, post_spacing):
manipulators[1].prop2_name = "radius"
manipulators[1].set_pts([f.c.to_3d(), v0, v1])

# snap manipulator, dont change index !
# snap manipulator, don't change index !
manipulators[2].set_pts([p0, p1, (1, 0, 0)])

f = self.segs[-1]
Expand Down Expand Up @@ -450,7 +450,7 @@ def make_panels(self, x, z, post_y, altitude, panel_dist,
f = self.segs[i]
if f.t_end < t_end:
if type(f).__name__ == 'CurvedFence':
# cant end after segment
# can't end after segment
t0 = max(0, (t_cur - f.t_start) / f.t_diff)
t1 = min(1, (t_end - f.t_start) / f.t_diff)
n_s = int(max(1, abs(f.da) * (5) / pi - 1))
Expand All @@ -471,7 +471,7 @@ def make_panels(self, x, z, post_y, altitude, panel_dist,
f = self.segs[i]
# last section
if type(f).__name__ == 'CurvedFence':
# cant start before segment
# can't start before segment
t0 = max(0, (t_cur - f.t_start) / f.t_diff)
t1 = min(1, (t_end - f.t_start) / f.t_diff)
n_s = int(max(1, abs(f.da) * (5) / pi - 1))
Expand Down
2 changes: 1 addition & 1 deletion archipack/archipack_keymaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_event(self, context, keyconfig, keymap_item):

def dump_keys(self, context, filename="/tmp/keymap.txt"):
"""
Utility for developpers :
Utility for developers :
Dump all keymaps to a file
filename : string a file path to dump keymaps
"""
Expand Down
4 changes: 2 additions & 2 deletions archipack/archipack_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def poll(cls, context):

def exit(self):
"""
Modal exit, DONT EVEN TRY TO OVERRIDE
Modal exit, DON'T EVEN TRY TO OVERRIDE
"""
if self._handle is not None:
bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
Expand Down Expand Up @@ -2184,7 +2184,7 @@ def manipulable_invoke(self, context):
"""
call this in operator invoke()
NB:
if override dont forget to call:
if override don't forget to call:
_manipulable_invoke(context)
"""
Expand Down
2 changes: 1 addition & 1 deletion archipack/archipack_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def add_to_list(self, path):
"""
Add material library to list
only store name of lib
reloading here dosent make sense
reloading here doesn't make sense
"""
loaded_path = self.loaded_path

Expand Down
2 changes: 1 addition & 1 deletion archipack/archipack_rendering.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def copy_to_user_path(self, category):
presets_path = bpy.utils.user_resource('SCRIPTS',
target_path,
create=True)
# files from factory not found in user dosent require a recompute
# files from factory not found in user doesn't require a recompute
skipfiles = []
for f in file_list:
# copy python/txt preset
Expand Down
2 changes: 1 addition & 1 deletion archipack/archipack_slab.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def locate_manipulators(self):
manipulators[1].prop2_name = "radius"
manipulators[1].set_pts([f.c.to_3d(), v0, v1])

# snap manipulator, dont change index !
# snap manipulator, don't change index !
manipulators[2].set_pts([p0, p1, (1, 0, 0)])
# dumb segment id
manipulators[3].set_pts([p0, p1, (1, 0, 0)])
Expand Down
8 changes: 4 additions & 4 deletions archipack/archipack_wall2.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def locate_manipulators(self, side):
manipulators[1].prop2_name = "radius"
manipulators[1].set_pts([wall.c.to_3d(), scale * v0, scale * v1])

# snap manipulator, dont change index !
# snap manipulator, don't change index !
manipulators[2].set_pts([p0, p1, (1, 0, 0)])

# dumb, segment index
Expand Down Expand Up @@ -436,7 +436,7 @@ def update_t_part(self, context):
# 2 o has parent
# 3 w has parent
# 4 o and w share same parent already
# 5 o and w dosent share parent
# 5 o and w doesn't share parent
link_to_parent = False

# when both walls do have a reference point, we may delete one of them
Expand Down Expand Up @@ -1620,7 +1620,7 @@ def manipulable_invoke(self, context):
self.setup_childs(o, g)
# store gl points
self.update_childs(context, o, g)
# dont do anything ..
# don't do anything ..
# self.manipulable_release(context)
# self.manipulate_mode = True
self.manipulable_setup(context)
Expand Down Expand Up @@ -1669,7 +1669,7 @@ class ARCHIPACK_OT_wall2_throttle_update(Operator):
def modal(self, context, event):
global update_timer_updating
if event.type == 'TIMER' and not update_timer_updating:
# cant rely on TIMER event as another timer may run
# can't rely on TIMER event as another timer may run
if time.time() - throttle_start > throttle_delay:
update_timer_updating = True
o = context.scene.objects.get(self.name.strip())
Expand Down
2 changes: 1 addition & 1 deletion blenderkit/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ def execute(self, context):
s = bpy.context.scene
sr = s['search results']

asset_data = sr[self.asset_index].to_dict() # TODO CHECK ALL OCCURANCES OF PASSING BLENDER ID PROPS TO THREADS!
asset_data = sr[self.asset_index].to_dict() # TODO CHECK ALL OCCURRENCES OF PASSING BLENDER ID PROPS TO THREADS!
au = s.get('assets used')
if au == None:
s['assets used'] = {}
Expand Down
2 changes: 1 addition & 1 deletion blenderkit/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def get_download_filenames(asset_data):
file_names = []
# fn = asset_data['file_name'].replace('blend_', '')
if asset_data.get('url') is not None:
# this means asset is already in scene and we don't nedd to check
# this means asset is already in scene and we don't need to check

fn = extract_filename_from_url(asset_data['url'])
fn.replace('_blend', '')
Expand Down
7 changes: 3 additions & 4 deletions blenderkit/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ def timer_update(): # TODO might get moved to handle all blenderkit stuff.
# causing a lot of throuble literally.
if len(search_threads) == 0 or bpy.context.scene.blenderkitUI.dragging:
return 1
for thread in search_threads: # TODO this doesn't check all processess when one gets removed, but most time only
# one is running anyway

for thread in search_threads: # TODO this doesn't check all processes when one gets removed,
# but most of the time only one is running anyway
if not thread[0].is_alive():
print('parsing')
search_threads.remove(thread) #
Expand Down Expand Up @@ -808,7 +807,7 @@ def run(self):
full_thbs = zip(thumb_full_filepaths, thumb_full_urls)

# we save here because a missing thumbnail check is in the previous loop
# we can also prepend previous results. These have already thumbnails downloaded...
# we can also prepend previous results. These have downloaded thumbnails already...
if params['get_next']:
rdata['results'][0:0] = origdata['results']

Expand Down
2 changes: 1 addition & 1 deletion blenderkit/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def draw_ratings_bgl():
ui_img_name = 'rating_ui.png'
else:
ui_img_name = 'rating_ui_empty.png'
text = 'Try to estimate how many hours it would take to a proffesional artist to create this asset:'
text = 'Try to estimate how many hours it would take for a professional artist to create this asset:'
tx = ui.rating_x + ui.workhours_bar_x
# draw_text_block(x=tx, y=ui.rating_y, width=80, font_size=20, line_height=15, text=text, color=colors.TEXT)

Expand Down
2 changes: 1 addition & 1 deletion curve_tools/Curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def JoinInsertSegment(self, spline2):
self.segments.append(BezierSegment(self.segments[-1].bezierPoint2, spline2.segments[0].bezierPoint1))
for seg2 in spline2.segments: self.segments.append(seg2)

self.resolution += spline2.resolution # extra segment will usually be short -- impact on resolution negligable
self.resolution += spline2.resolution # extra segment will usually be short -- impact on resolution negligible

self.isCyclic = False # is this ok?

Expand Down
2 changes: 1 addition & 1 deletion curve_tools/ShowCurveResolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#


# LOAD MODUL #
# LOAD MODULE #
import bpy
from bpy import *
from bpy.props import *
Expand Down
2 changes: 1 addition & 1 deletion curve_tools/cad.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Fillet(bpy.types.Operator):

radius: bpy.props.FloatProperty(name='Radius', description='Radius of the rounded corners', unit='LENGTH', min=0.0, default=0.1)
chamfer_mode: bpy.props.BoolProperty(name='Chamfer', description='Cut off sharp without rounding', default=False)
limit_half_way: bpy.props.BoolProperty(name='Limit Half Way', description='Limits the segements to half their length in order to prevent collisions', default=False)
limit_half_way: bpy.props.BoolProperty(name='Limit Half Way', description='Limits the segments to half their length in order to prevent collisions', default=False)

@classmethod
def poll(cls, context):
Expand Down
2 changes: 1 addition & 1 deletion curve_tools/curve_remove_doubles.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'version': (1, 1),
'blender': (2, 80, 0),
'location': 'View3D > Context menu (W/RMB) > Remove Doubles',
'description': 'Adds comand "Remove Doubles" for curves',
'description': 'Adds command "Remove Doubles" for curves',
'category': 'Object'
}

Expand Down
2 changes: 1 addition & 1 deletion io_scene_fbx/export_fbx_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ def _infinite_gen(val):
if scene_data.settings.use_tspace:
tspacenumber = len(me.uv_layers)
if tspacenumber:
# We can only compute tspace on tesellated meshes, need to check that here...
# We can only compute tspace on tessellated meshes, need to check that here...
t_lt = [None] * len(me.polygons)
me.polygons.foreach_get("loop_total", t_lt)
if any((lt > 4 for lt in t_lt)):
Expand Down
2 changes: 1 addition & 1 deletion io_scene_gltf2/blender/exp/gltf2_blender_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __gather_animations(blender_scene, export_settings):
animations += animations_

if export_settings['gltf_nla_strips'] is False:
# Fake an animation witha all animations of the scene
# Fake an animation with all animations of the scene
merged_tracks = {}
merged_tracks['Animation'] = []
for idx, animation in enumerate(animations):
Expand Down
2 changes: 1 addition & 1 deletion io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __gather_mesh(blender_object, export_settings):

# retrieve armature
# Because mesh data will be transforms to skeleton space,
# we can't instanciate multiple object at different location, skined by same armature
# we can't instantiate multiple object at different location, skined by same armature
blender_object_for_skined_data = None
if export_settings[gltf2_blender_export_keys.SKINS]:
for idx, modifier in enumerate(blender_object.modifiers):
Expand Down
2 changes: 1 addition & 1 deletion io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def create(gltf):
# Bone head defined a point
# Calcul of distance between point and line
# If < threshold --> In a chain
# Based on an idea of @Menithal, but added alignement detection to avoid some bad cases
# Based on an idea of @Menithal, but added alignment detection to avoid some bad cases

threshold = 0.001
for armobj in [obj for obj in bpy.data.objects if obj.type == "ARMATURE"]:
Expand Down
4 changes: 2 additions & 2 deletions io_scene_obj/import_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def filenames_group_by_ext(line, ext):
"""
Splits material libraries supporting spaces, so:
b'foo bar.mtl baz spam.MTL' -> (b'foo bar.mtl', b'baz spam.MTL')
Also handle " chars (some softwares use those to protect filenames with spaces, see T67266... sic).
Also handle " chars (some software use those to protect filenames with spaces, see T67266... sic).
"""
# Note that we assume that if there are some " in that line,
# then all filenames are properly enclosed within those...
Expand Down Expand Up @@ -93,7 +93,7 @@ def obj_image_load(context_imagepath_map, line, DIR, recursive, relpath):
But we try all space-separated items from current line when file is not found with last one
(users keep generating/using image files with spaces in a format that does not support them, sigh...)
Also tries to replace '_' with ' ' for Max's exporter replaces spaces with underscores.
Also handle " chars (some softwares use those to protect filenames with spaces, see T67266... sic).
Also handle " chars (some software use those to protect filenames with spaces, see T67266... sic).
"""
filepath_parts = line.split(b' ')

Expand Down
10 changes: 5 additions & 5 deletions io_scene_x3d/import_x3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def iskey(k):
if (field_context_len > 2) and (field_context[-2] in {'DEF', 'USE'}):
field_context.append(v)
elif (not iskey(field_context[-1])) or ((field_context_len == 3 and field_context[1] == 'IS')):
# this IS a key but the previous value was not a key, ot it was a defined field.
# this IS a key but the previous value was not a key, or it was a defined field.
field_list.append(field_context)
field_context = [v]
else:
Expand Down Expand Up @@ -1053,7 +1053,7 @@ def parse(self, i, IS_PROTO_DATA=False):

# if self.getExternprotoName():
if self.getExternprotoName():
if not extern_key: # if none is spesified - use the name
if not extern_key: # if none is specified - use the name
extern_key = self.getSpec()

if extern_key:
Expand Down Expand Up @@ -2463,7 +2463,7 @@ def importMesh_Sphere(geom, ancestry):
else:
nr = ns = GLOBALS['CIRCLE_DETAIL']
# used as both ring count and segment count
lau = pi / nr # Unit angle of latitude (rings) for the given tesselation
lau = pi / nr # Unit angle of latitude (rings) for the given tessellation
lou = 2 * pi / ns # Unit angle of longitude (segments)

bpymesh = bpy.data.meshes.new(name="Sphere")
Expand Down Expand Up @@ -2997,7 +2997,7 @@ def appearance_LoadPixelTexture(pixelTexture, ancestry):
elif plane_count == 1: # Intensity - does Blender even support that?
bpyima.pixels = [(cco & 0xff) / 255 for pixel in pixels
for cco in (pixel, pixel, pixel, 255)]
elif plane_count == 2: # Intensity/aplha
elif plane_count == 2: # Intensity/alpha
bpyima.pixels = [(cco & 0xff) / 255 for pixel in pixels
for cco
in (pixel >> 8, pixel >> 8, pixel >> 8, pixel)]
Expand Down Expand Up @@ -3431,7 +3431,7 @@ def getIpo(act_id):
# for getting definitions
defDict = node.getDefDict()
"""
Handles routing nodes to eachother
Handles routing nodes to each other
ROUTE vpPI.value_changed TO champFly001.set_position
ROUTE vpOI.value_changed TO champFly001.set_orientation
Expand Down
2 changes: 1 addition & 1 deletion materials_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
)


# All classes used by Material Utilities, that need to be registred
# All classes used by Material Utilities, that need to be registered
classes = (
VIEW3D_OT_materialutilities_assign_material_object,
VIEW3D_OT_materialutilities_assign_material_edit,
Expand Down
4 changes: 2 additions & 2 deletions materials_utils/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def mu_assign_material(self, material_name = "Default", override_type = 'APPEND_
obj.material_slots[0].material = target

if obj.type == 'META':
self.report({'INFO'}, "Meta balls only support one material, all other materials overriden!")
self.report({'INFO'}, "Meta balls only support one material, all other materials overridden!")

# If we should override each material slot
elif override_type == 'OVERRIDE_SLOTS':
Expand Down Expand Up @@ -626,7 +626,7 @@ def mu_change_material_link(self, link, affect, override_data_material = False):
elif not override_data_material:
self.report({'INFO'},
'The object Data for object ' + object.name_full + ' already had a material assigned ' +
'to slot #' + str(index) + ' (' + slot.material.name + '), it was not overriden!')
'to slot #' + str(index) + ' (' + slot.material.name + '), it was not overridden!')

if override_data_material:
slot.material = present_material
Expand Down
4 changes: 2 additions & 2 deletions mesh_tiny_cad/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ __________________

### OK, what's this all about?

Dedicated CAD software speeds up drafting significantly with functions like: `Extend`, `Trim`, `Intersect`, `Fillet /w radius` and `Offset /w distance`. At the moment of this writing many of these functions aren't included by default in regular distributions on Blender.org, so i've coded scripts to perform a few of the main features that I missed most.
Dedicated CAD software speeds up drafting significantly with functions like: `Extend`, `Trim`, `Intersect`, `Fillet /w radius` and `Offset /w distance`. At the moment of this writing many of these functions aren't included by default in regular distributions on Blender.org, so I've coded scripts to perform a few of the main features that I missed most.

My scripts have shortnames: `VTX, V2X, XALL, BIX, CCEN` and are described separately in sections below. `Fillet` and `Offset` are written by zmj100 and can be found [here](http://blenderartists.org/forum/showthread.php?179375).

Expand Down Expand Up @@ -45,7 +45,7 @@ Expect full freedom of orientation, but stuff must really intersect within error

### X ALL

Intersect all, it programatically goes through all selected edges and slices them all using any found intersections, then welds them.
Intersect all, it programmatically goes through all selected edges and slices them all using any found intersections, then welds them.

- XALL is fast!
![Imgur](http://i.imgur.com/1I7totI.gif)
Expand Down
2 changes: 1 addition & 1 deletion object_boolean_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def Operation(context, _operation):
selObj["BoolTool_FTransform"] = "False"


# Remove Obejcts form the BoolTool System
# Remove Objects form the BoolTool System
def Remove(context, thisObj_name, Prop):
# Find the Brush pointed in the Tree View and Restore it, active is the Canvas
actObj = context.active_object
Expand Down
2 changes: 1 addition & 1 deletion power_sequencer/operators/fade_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class POWER_SEQUENCER_OT_fade_add(bpy.types.Operator):
Fade options:
- In, Out, In and Out create a fade animation of the given duration from
the start of the sequence, to the end of the sequence, or on boths sides
the start of the sequence, to the end of the sequence, or on both sides
- From playhead: the fade animation goes from the start of sequences under the playhead to the playhead
- To playhead: the fade animation goes from the playhead to the end of sequences under the playhead
Expand Down
2 changes: 1 addition & 1 deletion power_sequencer/operators/mouse_trim_modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class POWER_SEQUENCER_OT_mouse_trim(bpy.types.Operator):
*brief* Cut or Trim strips quickly with the mouse cursor
Click somehwere in the Sequencer to insert a cut, click and drag to trim
Click somewehre in the Sequencer to insert a cut, click and drag to trim
With this function you can quickly cut and remove a section of strips while keeping or
collapsing the remaining gap.
Press <kbd>Ctrl</kbd> to snap to cuts.
Expand Down
2 changes: 1 addition & 1 deletion power_sequencer/scripts/BPSProxy/bpsproxy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def checktools(tools):
msg += [
(
"Check if you have them properly installed and available in the PATH"
" environemnt variable."
" environment variable."
)
]
raise ToolError("\n".join(msg))
Expand Down
2 changes: 1 addition & 1 deletion power_sequencer/scripts/BPSRender/bpsrender/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def checktools(tools):
msg += [
(
"Check if you have them properly installed and available in the PATH"
" environemnt variable."
" environment variable."
),
"Exiting...",
]
Expand Down
Loading

0 comments on commit ed16145

Please sign in to comment.