Skip to content

Commit

Permalink
Spelling fixes in comments and descriptions, patch by luzpaz
Browse files Browse the repository at this point in the history
  • Loading branch information
brechtvl committed Jul 31, 2019
1 parent 2176c8f commit 4e1cda9
Show file tree
Hide file tree
Showing 45 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion add_curve_sapling/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ def perform_pruning(baseSize, baseSplits, childP, cu, currentMax, currentMin, cu
stemsegL, lengthV[n], taperCrown, boneStep, rotate, rotateV
)

# If pruning is enabled then we must to the check to see if the end of the spline is within the evelope
# If pruning is enabled then we must check to see if the end of the spline is within the envelope
if prune:
# Check each endpoint to see if it is inside
for s in splineList:
Expand Down
10 changes: 5 additions & 5 deletions add_mesh_BoltFactory/createMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,20 @@ def Mirror_Verts_Faces(VERTS, FACES, AXIS, FLIP_POINT=0):

# Returns a list of faces that
# make up an array of 4 point polygon.
def Build_Face_List_Quads(OFFSET, COLUM, ROW, FLIP=0):
def Build_Face_List_Quads(OFFSET, COLUMN, ROW, FLIP=0):
Ret = []
RowStart = 0
for j in range(ROW):
for i in range(COLUM):
for i in range(COLUMN):
Res1 = RowStart + i
Res2 = RowStart + i + (COLUM + 1)
Res3 = RowStart + i + (COLUM + 1) + 1
Res2 = RowStart + i + (COLUMN + 1)
Res3 = RowStart + i + (COLUMN + 1) + 1
Res4 = RowStart + i + 1
if FLIP:
Ret.append([OFFSET + Res1, OFFSET + Res2, OFFSET + Res3, OFFSET + Res4])
else:
Ret.append([OFFSET + Res4, OFFSET + Res3, OFFSET + Res2, OFFSET + Res1])
RowStart += COLUM + 1
RowStart += COLUMN + 1
return Ret


Expand Down
14 changes: 7 additions & 7 deletions animation_add_corrective_shape_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
it will be set to zero.
- new "delta" option usage, when you hope to make new shape-key with keep currently visible other shape keys value.
it can generate new shape key, with value as 1.00. then deform target shape as soruce shape with keep other shape key values relative.
- If overwrite shape key,<select active shape key of target as non "base shape">
current shape key value is ignored and turn as 1.00.
then if active shape key was driven (bone rotation etc), you may get un-expected result. When transfer, I recommend, keep set active-shape key as base . so transfered shape key do not "overwrite". but generate new shape key.
it can generate new shape key, with value as 1.00. then deform target shape as source shape with keep other shape key values relative.
- If overwrite shape key,<select active shape key of target as non "base shape">
current shape key value is ignored and turn as 1.00.
then if active shape key was driven (bone rotation etc), you may get un-expected result. When transfer, I recommend, keep set active-shape key as base. so transferred shape key do not "overwrite". but generate new shape key.
if active-shape key have no driver, you can overwrite it (but as 1.00 value )
"""

Expand Down Expand Up @@ -254,7 +254,7 @@ def execute(self, context):
class add_corrective_pose_shape_delta (bpy.types.Operator):
"""Adds first object as shape to second object for the current pose """ \
"""while maintaining modifiers and currently used other shape keys""" \
"""with keep other shape key value, generate new shape key which deform to soruce shape """
"""with keep other shape key value, generate new shape key which deform to source shape """

bl_idname = "object.add_corrective_pose_shape_delta"
bl_label = "Add object as corrective pose shape delta"
Expand Down
2 changes: 1 addition & 1 deletion archimesh/achm_roof_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def create_roof_mesh(self):
bpy.context.view_layer.objects.active = myroof
myroof.select_set(True)

# Thicknes
# Thickness
if self.roof_thick > 0.0:
set_modifier_solidify(myroof, self.roof_thick)
# Subsurf
Expand Down
2 changes: 1 addition & 1 deletion archipack/archipack_gl.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def normal(self, t=0):
def sized_normal(self, t, size):
"""
GlLine perpendicular on plane defined by z_axis and of given size
positionned at t in current line
positioned at t in current line
lie on the right side
p1
|--x
Expand Down
4 changes: 2 additions & 2 deletions archipack/archipack_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ class SizeLocationManipulator(SizeManipulator):
Also take care of moving linked objects too
Changing size is not necessary as link does
allredy handle this and childs panels are
already handle this and childs panels are
updated by base object.
"""
def __init__(self, context, o, datablock, manipulator, handle_size, snap_callback=None):
Expand Down Expand Up @@ -1185,7 +1185,7 @@ class SnapSizeLocationManipulator(SizeLocationManipulator):
Also take care of moving linked objects too
Changing size is not necessary as link does
allredy handle this and childs panels are
already handle this and childs panels are
updated by base object.
Expand Down
2 changes: 1 addition & 1 deletion blenderkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class BlenderKitUIProps(PropertyGroup):
thumb_size: IntProperty(name="Thumbnail Size", default=thumb_size_def, min=-1, max=256)

margin: IntProperty(name="Margin", default=margin_def, min=-1, max=256)
highlight_margin: IntProperty(name="Higlight Margin", default=int(margin_def / 2), min=-10, max=256)
highlight_margin: IntProperty(name="Highlight Margin", default=int(margin_def / 2), min=-10, max=256)

bar_height: IntProperty(name="Bar Height", default=thumb_size_def + 2 * margin_def, min=-1, max=2048)
bar_x_offset: IntProperty(name="Bar X Offset", default=20, min=0, max=5000)
Expand Down
2 changes: 1 addition & 1 deletion blenderkit/append_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def append_material(file_name, matname=None, link=False, fake_user=True):
'''append a material type asset'''
# first, we have to check if there is a material with same name
# in previous step there's check if the imported material
# is allready in the scene, so we know same name != same material
# is already in the scene, so we know same name != same material

mats_before = bpy.data.materials.keys()

Expand Down
24 changes: 12 additions & 12 deletions blenderkit/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,
sprops.append_link = 'APPEND'
sprops.import_as = 'INDIVIDUAL'

# set consistency for objects allready in scene, otherwise this literally breaks blender :)
# set consistency for objects already in scene, otherwise this literally breaks blender :)
ain = asset_in_scene(asset_data)
if ain is not False:
if ain == 'LINKED':
Expand Down Expand Up @@ -382,7 +382,7 @@ def append_asset(asset_data, **kwargs): # downloaders=[], location=None,

elif asset_data['asset_type'] == 'brush':

# TODO if allready in scene, should avoid reappending.
# TODO if already in scene, should avoid reappending.
inscene = False
for b in bpy.data.brushes:

Expand Down Expand Up @@ -539,7 +539,7 @@ def run(self):
get_download_url(asset_data, scene_id, api_key, tcom=tcom)
if tcom.error:
return
# only now we can check if the file allready exists. This should have 2 levels, for materials and for brushes
# only now we can check if the file already exists. This should have 2 levels, for materials and for brushes
# different than for the non free content. delete is here when called after failed append tries.
if check_existing(asset_data) and not tcom.passargs.get('delete'):
# this sends the thread for processing, where another check should occur, since the file might be corrupted.
Expand Down Expand Up @@ -622,7 +622,7 @@ def download(asset_data, **kwargs):


def check_downloading(asset_data, **kwargs):
''' check if an asset is allready downloading, if yes, just make a progress bar with downloader object.'''
''' check if an asset is already downloading, if yes, just make a progress bar with downloader object.'''
global download_threads

downloading = False
Expand All @@ -646,7 +646,7 @@ def check_existing(asset_data):

file_names = paths.get_download_filenames(asset_data)

utils.p('check if file allready exists')
utils.p('check if file already exists')
if len(file_names) == 2:
# TODO this should check also for failed or running downloads.
# If download is running, assign just the running thread. if download isn't running but the file is wrong size,
Expand All @@ -663,11 +663,11 @@ def check_existing(asset_data):


def try_finished_append(asset_data, **kwargs): # location=None, material_target=None):
''' try to append asset, if not successfull delete source files.
''' try to append asset, if not successfully delete source files.
This means probably wrong download, so download should restart'''
file_names = paths.get_download_filenames(asset_data)
done = False
utils.p('try to append allready existing asset')
utils.p('try to append already existing asset')
if len(file_names) > 0:
if os.path.isfile(file_names[-1]):
kwargs['name'] = asset_data['name']
Expand All @@ -688,7 +688,7 @@ def try_finished_append(asset_data, **kwargs): # location=None, material_target


def asset_in_scene(asset_data):
'''checks if the asset is allready in scene. If yes, modifies asset data so the asset can be reached again.'''
'''checks if the asset is already in scene. If yes, modifies asset data so the asset can be reached again.'''
scene = bpy.context.scene
au = scene.get('assets used', {})

Expand Down Expand Up @@ -746,7 +746,7 @@ def get_download_url(asset_data, scene_id, api_key, tcom=None):
if r.status_code == 403:
r = 'You need Full plan to get this item.'
tcom.report = r
r1 = 'All materials and brushes are aviable for free. Only users registered to Standart plan can use all models.'
r1 = 'All materials and brushes are available for free. Only users registered to Standard plan can use all models.'
tasks_queue.add_task((ui.add_report, (r1, 5, colors.RED)))
tcom.error = True

Expand All @@ -764,7 +764,7 @@ def start_download(asset_data, **kwargs):
'''
check if file isn't downloading or doesn't exist, then start new download
'''
# first check if the asset is allready in scene. We can use that asset without checking with server
# first check if the asset is already in scene. We can use that asset without checking with server
quota_ok = asset_in_scene(asset_data) is not False

# otherwise, check on server
Expand All @@ -774,7 +774,7 @@ def start_download(asset_data, **kwargs):
# is the asseet being currently downloaded?
downloading = check_downloading(asset_data, **kwargs)
if not downloading:
# check if there are files allready. This check happens 2x once here(for free assets),
# check if there are files already. This check happens 2x once here(for free assets),
# once in thread(for non-free)
fexists = check_existing(asset_data)

Expand Down Expand Up @@ -823,7 +823,7 @@ def execute(self, context):


class BlenderkitDownloadOperator(bpy.types.Operator):
"""Download and link asset to scene. Only link if asset allready available locally."""
"""Download and link asset to scene. Only link if asset already available locally."""
bl_idname = "scene.blenderkit_download"
bl_label = "BlenderKit Asset Download"
bl_options = {'REGISTER', 'UNDO'}
Expand Down
4 changes: 2 additions & 2 deletions 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 allready in scene and we don't nedd to check
# this means asset is already in scene and we don't nedd to check

fn = extract_filename_from_url(asset_data['url'])
fn.replace('_blend', '')
Expand Down Expand Up @@ -236,7 +236,7 @@ def get_addon_thumbnail_path(name):
# fpath = os.path.join(p, subpath)
ext = name.split('.')[-1]
next = ''
if not (ext == 'jpg' or ext == 'png'): # allready has ext?
if not (ext == 'jpg' or ext == 'png'): # already has ext?
next = '.jpg'
subpath = "thumbnails" + os.sep + name + next
return os.path.join(script_path, subpath)
14 changes: 7 additions & 7 deletions blenderkit/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def refresh_token_timer():
def scene_load(context):
wm = bpy.context.window_manager
fetch_server_data()
# following doesn't necessarilly happen if version isn't checked yet or similar, first run.
# following doesn't necessarily happen if version isn't checked yet or similar, first run.
# wm['bkit_update'] = version_checker.compare_versions(blenderkit)
categories.load_categories()
if not bpy.app.timers.is_registered(refresh_token_timer):
Expand All @@ -116,7 +116,7 @@ def fetch_server_data():
def timer_update(): # TODO might get moved to handle all blenderkit stuff.

global search_threads
# don't do anything while dragging - this could switch asset type during drag, and make results list lenght different,
# don't do anything while dragging - this could switch asset type during drag, and make results list length different,
# causing a lot of throuble literally.
if len(search_threads) == 0 or bpy.context.scene.blenderkitUI.dragging:
return 1
Expand Down Expand Up @@ -803,7 +803,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 allready thumbnails downloaded...
# we can also prepend previous results. These have already thumbnails downloaded...
if params['get_next']:
rdata['results'][0:0] = origdata['results']

Expand Down Expand Up @@ -1149,12 +1149,12 @@ def unregister_search():


'''
search -
search -
build query
START THREAD
send query (bg allready)
get result - metadata, small thumbnails, big thumbnails paths (now genereate this?)
write metadata, possibly to
send query (bg already)
get result - metadata, small thumbnails, big thumbnails paths (now generate this?)
write metadata, possibly to
download small thumbnails first
start big thumbnails download. these don't have to be there on updates, if they aren't the Image in image editor doesn't get updated.
parse metadata, save it in json in the temp dir which gets read on each update of the search.
Expand Down
4 changes: 2 additions & 2 deletions blenderkit/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ def is_rating_possible():
ad = ao.get('asset_data')
if ad is not None:
rated = bpy.context.scene['assets rated'].get(ad['asset_base_id'])
# originally hidden for allready rated assets
# originally hidden for already rated assets
return True, rated, ao, ad

# check also materials
Expand Down Expand Up @@ -1599,7 +1599,7 @@ def invoke(self, context, event):
# this sends message to the originally running operator, so it quits, and then it ends this one too.
# If it initiated a search, the search will finish in a thread. The switch off procedure is run
# by the 'original' operator, since if we get here, it means
# same operator is allready running.
# same operator is already running.
ui_props.turn_off = True
# if there was an error, we need to turn off these props so we can restart after 2 clicks
ui_props.assetbar_on = False
Expand Down
4 changes: 2 additions & 2 deletions blenderkit/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def start_upload(self, context, asset_type, as_new, metadata_only):
json_metadata["verificationStatus"] = "uploading"
r = requests.put(url, json=json_metadata, headers=headers, verify=True) # files = files,
props.upload_state = 'uploaded metadata'
# parse the reqest
# parse the request
# print('uploaded metadata')
# print(r.text)
except requests.exceptions.RequestException as e:
Expand Down Expand Up @@ -714,7 +714,7 @@ class ModelUploadOperator(Operator):

as_new: BoolProperty(
name="upload as new",
description="delets asset id and uploads as new file",
description="deletes asset id and uploads as new file",
default=False,
options={'SKIP_SAVE'}
)
Expand Down
2 changes: 1 addition & 1 deletion blenderkit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def save_prefs(self, context):
# first check context, so we don't do this on registration or blender startup
if not bpy.app.background: #(hasattr kills blender)
user_preferences = bpy.context.preferences.addons['blenderkit'].preferences
# we test the api key for lenght, so not a random accidentaly typed sequence gets saved.
# we test the api key for length, so not a random accidentally typed sequence gets saved.
lk = len(user_preferences.api_key)
if 0 < lk < 25:
# reset the api key in case the user writes some nonsense, e.g. a search string instead of the Key
Expand Down
2 changes: 1 addition & 1 deletion io_anim_bvh/export_bvh.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class DecoratedBone:
"pose_mat",
# Blender rest matrix (armature space).
"rest_arm_mat",
# Blender rest batrix (local space).
# Blender rest matrix (local space).
"rest_local_mat",
# Pose_mat inverted.
"pose_imat",
Expand Down
4 changes: 2 additions & 2 deletions io_coat3D/tex.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def readtexturefolder(objekti, mat_list, texturelist, is_new, udim_textures): #r
coat3D.remove_path = True
createnodes(index_mat, texcoat, create_group_node, tile_list, objekti, ind, is_new)

def createnodes(active_mat,texcoat, create_group_node, tile_list, objekti, ind, is_new): # Cretes new nodes and link textures into them
def createnodes(active_mat,texcoat, create_group_node, tile_list, objekti, ind, is_new): # Creates new nodes and link textures into them
bring_color = True # Meaning of these is to check if we can only update textures or do we need to create new nodes
bring_metalness = True
bring_roughness = True
Expand All @@ -366,7 +366,7 @@ def createnodes(active_mat,texcoat, create_group_node, tile_list, objekti, ind,
main_material = coatMat.node_tree
applink_group_node = False

# First go throug all image nodes and let's check if it starts with 3DC and reload if needed
# First go through all image nodes and let's check if it starts with 3DC and reload if needed

for node in coatMat.node_tree.nodes:
if (node.type == 'OUTPUT_MATERIAL'):
Expand Down
4 changes: 2 additions & 2 deletions io_export_paper_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def copy_island_names(self, island_list):

def save(self, properties):
"""Export the document"""
# Note about scale: input is direcly in blender length
# Note about scale: input is directly in blender length
# Mesh.scale_islands multiplies everything by a user-defined ratio
# exporters (SVG or PDF) multiply everything by 1000 (output in millimeters)
Exporter = SVG if properties.file_format == 'SVG' else PDF
Expand Down Expand Up @@ -438,7 +438,7 @@ def uvedge_sortkey(uvedge):
def generate_stickers(self, default_width, do_create_numbers=True):
"""Add sticker faces where they are needed."""
def uvedge_priority(uvedge):
"""Retuns whether it is a good idea to stick something on this edge's face"""
"""Returns whether it is a good idea to stick something on this edge's face"""
# TODO: it should take into account overlaps with faces and with other stickers
face = uvedge.uvface.face
return face.calc_area() / face.calc_perimeter()
Expand Down
2 changes: 1 addition & 1 deletion io_mesh_atomic/utility_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def modify_objects(action_type,
break


# Separating atoms from a dupliverts strucutre.
# Separating atoms from a dupliverts structure.
def separate_atoms(scn):

# Get the mesh.
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 @@ -2972,7 +2972,7 @@ def save_single(operator, scene, depsgraph, filepath="",
path_mode,
os.path.dirname(bpy.data.filepath), # base_src
os.path.dirname(filepath), # base_dst
# Local dir where to put images (medias), using FBX conventions.
# Local dir where to put images (media), using FBX conventions.
os.path.splitext(os.path.basename(filepath))[0] + ".fbm", # subdir
embed_textures,
set(), # copy_set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def get_output_node(node_tree):
"""Retrive output node."""
"""Retrieve output node."""
output = [node for node in node_tree.nodes if node.type == 'OUTPUT_MATERIAL'][0]
return output

Expand Down
Loading

0 comments on commit 4e1cda9

Please sign in to comment.