Cleanup: spelling in comments, update dictionary
This commit is contained in:
@@ -113,7 +113,7 @@ def get_object_name(stroke):
|
||||
|
||||
|
||||
def material_from_fedge(fe):
|
||||
"get the diffuse rgba color from an FEdge"
|
||||
"get the diffuse RGBA color from an FEdge"
|
||||
if fe is None:
|
||||
return None
|
||||
if fe.is_smooth:
|
||||
|
||||
@@ -836,7 +836,7 @@ class PerlinNoise2DShader(StrokeShader):
|
||||
that in a scene no strokes will be distorted identically.
|
||||
|
||||
More information on the noise shaders can be found at:
|
||||
freestyleintegration.wordpress.com/2011/09/25/development-updates-on-september-25/
|
||||
https://freestyleintegration.wordpress.com/2011/09/25/development-updates-on-september-25/
|
||||
"""
|
||||
|
||||
def __init__(self, freq=10, amp=10, oct=4, angle=radians(45), seed=-1):
|
||||
|
||||
@@ -43,7 +43,7 @@ def reduce_newlines(text):
|
||||
|
||||
|
||||
def reduce_spaces(text):
|
||||
"""Reduces multiple whitespaces to a single space.
|
||||
"""Reduces multiple white-spaces to a single space.
|
||||
|
||||
:arg text: text with multiple spaces
|
||||
:type text: str
|
||||
@@ -100,7 +100,7 @@ def get_argspec(func, *, strip_self=True, doc=None, source=None):
|
||||
func_name = func.__name__
|
||||
except AttributeError:
|
||||
return ''
|
||||
# from docstring
|
||||
# From doc-string.
|
||||
if doc is None:
|
||||
doc = get_doc(func)
|
||||
match = re.search(DEF_DOC % func_name, doc, RE_FLAG)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# Copyright (c) 2009 Fernando Perez, www.stani.be
|
||||
|
||||
# Original copyright (see docstring):
|
||||
# Original copyright (see doc-string):
|
||||
# ****************************************************************************
|
||||
# Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
|
||||
#
|
||||
@@ -175,6 +175,6 @@ def complete(line):
|
||||
return filter_prefix(try_import(mod), words[-1])
|
||||
|
||||
# get here if the import is not found
|
||||
# import invalidmodule
|
||||
# ^, in this case return nothing
|
||||
# import invalid_module
|
||||
# ^, in this case return nothing
|
||||
return []
|
||||
|
||||
@@ -81,7 +81,7 @@ def complete(line, cursor, namespace, private):
|
||||
|
||||
|
||||
def expand(line, cursor, namespace, *, private=True):
|
||||
"""This method is invoked when the user asks autocompletion,
|
||||
"""This method is invoked when the user asks auto-completion,
|
||||
e.g. when Ctrl+Space is clicked.
|
||||
|
||||
:arg line: incomplete text line
|
||||
|
||||
@@ -108,10 +108,10 @@ IMPORT_LANGUAGES_RTL = {
|
||||
'ar_EG', 'fa_IR', 'he_IL',
|
||||
}
|
||||
|
||||
# The comment prefix used in generated messages.txt file.
|
||||
# The comment prefix used in generated `messages.txt` file.
|
||||
MSG_COMMENT_PREFIX = "#~ "
|
||||
|
||||
# The comment prefix used in generated messages.txt file.
|
||||
# The comment prefix used in generated `messages.txt` file.
|
||||
MSG_CONTEXT_PREFIX = "MSGCTXT:"
|
||||
|
||||
# The default comment prefix used in po's.
|
||||
@@ -514,12 +514,12 @@ if not os.path.exists(BLENDER_EXEC):
|
||||
# The gettext msgfmt "compiler". You’ll likely have to edit it in your user_settings.py if you’re under Windows.
|
||||
GETTEXT_MSGFMT_EXECUTABLE = "msgfmt"
|
||||
|
||||
# The FriBidi C compiled library (.so under Linux, .dll under windows...).
|
||||
# You’ll likely have to edit it in your user_settings.py if you’re under Windows., e.g. using the included one:
|
||||
# FRIBIDI_LIB = os.path.join(TOOLS_DIR, "libfribidi.dll")
|
||||
# The FriBidi C compiled library (.so under Linux, `.dll` under windows...).
|
||||
# You’ll likely have to edit it in your `user_settings.py` if you’re under Windows., e.g. using the included one:
|
||||
# `FRIBIDI_LIB = os.path.join(TOOLS_DIR, "libfribidi.dll")`
|
||||
FRIBIDI_LIB = "libfribidi.so.0"
|
||||
|
||||
# The name of the (currently empty) file that must be present in a po's directory to enable rtl-preprocess.
|
||||
# The name of the (currently empty) file that must be present in a po's directory to enable RTL-preprocess.
|
||||
RTL_PREPROCESS_FILE = "is_rtl"
|
||||
|
||||
# The Blender source root path.
|
||||
@@ -565,7 +565,7 @@ ASSET_CATALOG_FILE = "blender_assets.cats.txt"
|
||||
# The template messages file (relative to I18N_DIR).
|
||||
REL_FILE_NAME_POT = os.path.join(REL_BRANCHES_DIR, DOMAIN + ".pot")
|
||||
|
||||
# Mo root datapath.
|
||||
# Mo root data-path.
|
||||
REL_MO_PATH_ROOT = os.path.join(REL_TRUNK_DIR, "locale")
|
||||
|
||||
# Mo path generator for a given language.
|
||||
|
||||
@@ -41,7 +41,7 @@ def gen_menu_file(stats, settings):
|
||||
highest_uid = 0
|
||||
for lvl, uid_num, label, uid, flag in stats:
|
||||
if lvl < limits[idx][0]:
|
||||
# Sub-sort languages by iso-codes.
|
||||
# Sub-sort languages by ISO-codes.
|
||||
langs_cats[idx].sort(key=lambda it: it[2])
|
||||
idx += 1
|
||||
if lvl < settings.IMPORT_MIN_LEVEL and flag == OK:
|
||||
@@ -49,7 +49,7 @@ def gen_menu_file(stats, settings):
|
||||
langs_cats[idx].append((uid_num, label, uid, flag))
|
||||
if abs(uid_num) > highest_uid:
|
||||
highest_uid = abs(uid_num)
|
||||
# Sub-sort last group of languages by iso-codes!
|
||||
# Sub-sort last group of languages by ISO-codes!
|
||||
langs_cats[idx].sort(key=lambda it: it[2])
|
||||
data_lines = [
|
||||
"# File used by Blender to know which languages (translations) are available, ",
|
||||
|
||||
@@ -756,7 +756,7 @@ class SpellChecker:
|
||||
"hc",
|
||||
"hdc",
|
||||
"hdr", "hdri", "hdris",
|
||||
"hh", "mm", "ss", "ff", # hh:mm:ss:ff timecode
|
||||
"hh", "mm", "ss", "ff", # `hh:mm:ss:ff` time-code.
|
||||
"hpg", # Intel Xe-HPG architecture
|
||||
"hsv", "hsva", "hsl",
|
||||
"id",
|
||||
|
||||
@@ -287,7 +287,7 @@ def bake_action_iter(
|
||||
while pbone.constraints:
|
||||
pbone.constraints.remove(pbone.constraints[0])
|
||||
|
||||
# Create compatible eulers, quats.
|
||||
# Create compatible euler & quaternion rotation values.
|
||||
euler_prev = None
|
||||
quat_prev = None
|
||||
|
||||
|
||||
@@ -233,19 +233,19 @@ def edge_loops_from_edges(mesh, edges=None):
|
||||
|
||||
def ngon_tessellate(from_data, indices, fix_loops=True, debug_print=True):
|
||||
"""
|
||||
Takes a polyline of indices (ngon) and returns a list of face
|
||||
Takes a poly-line of indices (ngon) and returns a list of face
|
||||
index lists. Designed to be used for importers that need indices for an
|
||||
ngon to create from existing verts.
|
||||
|
||||
:arg from_data: either a mesh, or a list/tuple of vectors.
|
||||
:type from_data: list or :class:`bpy.types.Mesh`
|
||||
:arg indices: a list of indices to use this list
|
||||
is the ordered closed polyline
|
||||
is the ordered closed poly-line
|
||||
to fill, and can be a subset of the data given.
|
||||
:type indices: list
|
||||
:arg fix_loops: If this is enabled polylines
|
||||
:arg fix_loops: If this is enabled poly-lines
|
||||
that use loops to make multiple
|
||||
polylines are delt with correctly.
|
||||
poly-lines are dealt with correctly.
|
||||
:type fix_loops: bool
|
||||
"""
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ def location_3d_to_region_2d(region, rv3d, coord, *, default=None):
|
||||
:type region: :class:`bpy.types.Region`
|
||||
:arg rv3d: 3D region data, typically bpy.context.space_data.region_3d.
|
||||
:type rv3d: :class:`bpy.types.RegionView3D`
|
||||
:arg coord: 3d worldspace location.
|
||||
:arg coord: 3d world-space location.
|
||||
:type coord: 3d vector
|
||||
:arg default: Return this value if ``coord``
|
||||
is behind the origin of a perspective view.
|
||||
|
||||
@@ -304,7 +304,7 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
||||
col.row().prop(self, "v3d_mmb_action", text="Middle Mouse Action", expand=True)
|
||||
col.row().prop(self, "v3d_alt_mmb_drag_action", text="Alt Middle Mouse Drag Action", expand=True)
|
||||
|
||||
# Checkboxes sub-layout.
|
||||
# Check-boxes sub-layout.
|
||||
col = layout.column()
|
||||
sub = col.column(align=True)
|
||||
sub.prop(self, "use_v3d_tab_menu")
|
||||
|
||||
@@ -850,7 +850,7 @@ def km_screen(params):
|
||||
])
|
||||
|
||||
if params.apple:
|
||||
# Apple undo and user prefs
|
||||
# Apple undo and user-preferences.
|
||||
items.extend([
|
||||
("screen.userpref_show", {"type": 'COMMA', "value": 'PRESS', "oskey": True}, None),
|
||||
])
|
||||
@@ -4041,7 +4041,7 @@ def km_grease_pencil_stroke_sculpt_mode(params):
|
||||
("gpencil.active_frames_delete_all", {"type": 'DEL', "value": 'PRESS', "shift": True}, None),
|
||||
# Context menu
|
||||
*_template_items_context_panel("VIEW3D_PT_gpencil_sculpt_context_menu", params.context_menu_event),
|
||||
# Automasking Pie menu
|
||||
# Auto-masking Pie menu.
|
||||
op_menu_pie("VIEW3D_MT_sculpt_gpencil_automasking_pie", {
|
||||
"type": 'A', "shift": True, "alt": True, "value": 'PRESS'}),
|
||||
])
|
||||
|
||||
@@ -3442,7 +3442,7 @@ def km_image_paint(params):
|
||||
# Stabilize Strokes
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.image_paint.brush.use_smooth_stroke')]}),
|
||||
# Contrext Menu
|
||||
# Context menu.
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_texture_context_menu",
|
||||
{"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
# Tools
|
||||
@@ -3500,7 +3500,7 @@ def km_vertex_paint(params):
|
||||
# Stabilize Stroke
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.vertex_paint.brush.use_smooth_stroke')]}),
|
||||
# Contrext Menu
|
||||
# Context menu.
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_vertex_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
# Tools
|
||||
op_tool_cycle("builtin.select_box", {"type": 'Q', "value": 'PRESS'}),
|
||||
@@ -3546,7 +3546,7 @@ def km_weight_paint(params):
|
||||
# Stabilize Stroke
|
||||
("wm.context_toggle", {"type": 'L', "value": 'PRESS'},
|
||||
{"properties": [("data_path", 'tool_settings.weight_paint.brush.use_smooth_stroke')]}),
|
||||
# Contrext Menu
|
||||
# Context menu.
|
||||
*_template_items_context_panel("VIEW3D_PT_paint_weight_context_menu", {"type": 'RIGHTMOUSE', "value": 'PRESS'}),
|
||||
# For combined weight paint + pose mode.
|
||||
("view3d.select", {"type": 'LEFTMOUSE', "value": 'PRESS', "shift": True, "alt": True}, None),
|
||||
@@ -3817,7 +3817,7 @@ def km_armature(params):
|
||||
return keymap
|
||||
|
||||
|
||||
# Metaball edit mode.
|
||||
# Meta-ball edit mode.
|
||||
def km_metaball(params):
|
||||
items = []
|
||||
keymap = (
|
||||
|
||||
@@ -29,7 +29,7 @@ if sys.platform == "win32":
|
||||
|
||||
# OIIO will by default add all paths from the path variable to add_dll_directory
|
||||
# problem there is that those folders will be searched before ours and versions of
|
||||
# some dlls may be found that are not blenders and may not even be the right version
|
||||
# some DLL files may be found that are not blenders and may not even be the right version
|
||||
# causing compatibility issues.
|
||||
os.environ["OIIO_LOAD_DLLS_FROM_PATH"] = "0"
|
||||
|
||||
|
||||
@@ -677,7 +677,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
|
||||
self.createCollection(context, "foreground")
|
||||
self.createCollection(context, "background")
|
||||
|
||||
# rendersettings
|
||||
# Render settings.
|
||||
setup_collection_recursively(
|
||||
vlayers["Foreground"].layer_collection.children,
|
||||
"background",
|
||||
|
||||
@@ -69,7 +69,7 @@ class SCENE_OT_freestyle_fill_range_by_selection(Operator):
|
||||
else:
|
||||
self.report({'ERROR'}, "Unexpected modifier type: " + m.type)
|
||||
return {'CANCELLED'}
|
||||
# Find selected vertices in editmesh
|
||||
# Find selected vertices in edit-mesh.
|
||||
ob = context.active_object
|
||||
if ob.type == 'MESH' and ob.mode == 'EDIT' and ob.name != ref.name:
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
|
||||
@@ -313,7 +313,7 @@ class SequencerFadesAdd(Operator):
|
||||
for point in (fade.start, fade.end):
|
||||
keyframe_points.insert(frame=point.x, value=point.y, options={'FAST'})
|
||||
fade_fcurve.update()
|
||||
# The graph editor and the audio waveforms only redraw upon "moving" a keyframe
|
||||
# The graph editor and the audio wave-forms only redraw upon "moving" a keyframe.
|
||||
keyframe_points[-1].co = keyframe_points[-1].co
|
||||
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ class PREFERENCES_OT_copy_prev(Operator):
|
||||
import shutil
|
||||
shutil.copytree(self._old_path(), self._new_path(), dirs_exist_ok=True, symlinks=True)
|
||||
|
||||
# reload preferences and recent-files.txt
|
||||
# Reload preferences and `recent-files.txt`.
|
||||
bpy.ops.wm.read_userpref()
|
||||
bpy.ops.wm.read_history()
|
||||
|
||||
|
||||
@@ -1183,7 +1183,7 @@ class WM_OT_path_open(Operator):
|
||||
try:
|
||||
subprocess.check_call(["xdg-open", filepath])
|
||||
except BaseException:
|
||||
# xdg-open *should* be supported by recent Gnome, KDE, Xfce
|
||||
# `xdg-open` *should* be supported by recent Gnome, KDE, XFCE.
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
|
||||
@@ -957,7 +957,7 @@ class ConstraintButtonsPanel:
|
||||
self.draw_influence(layout, con)
|
||||
|
||||
|
||||
# Parent class for constraint subpanels
|
||||
# Parent class for constraint sub-panels.
|
||||
class ConstraintButtonsSubPanel:
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
@@ -1443,7 +1443,7 @@ class BONE_PT_bTransformConstraint_to(BoneConstraintPanel, ConstraintButtonsSubP
|
||||
self.draw_transform_to(context)
|
||||
|
||||
|
||||
# Shrinkwrap Constraint
|
||||
# Shrink-wrap Constraint.
|
||||
|
||||
class OBJECT_PT_bShrinkwrapConstraint(ObjectConstraintPanel, ConstraintButtonsPanel, Panel):
|
||||
def draw(self, context):
|
||||
|
||||
@@ -235,7 +235,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
|
||||
# TODO: 1) the template_any_ID needs to be fixed for the text alignment.
|
||||
# 2) use_property_decorate has to properly skip the non animatable properties.
|
||||
# Properties affected with needless draw:
|
||||
# group_method, template_any_ID dropdown, use_entire_array
|
||||
# group_method, template_any_ID drop-down, use_entire_array.
|
||||
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False # No animation (remove this later on).
|
||||
|
||||
@@ -49,7 +49,7 @@ class DopesheetFilterPopoverBase:
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Filters"
|
||||
|
||||
# Generic = Affects all datatypes
|
||||
# Generic = Affects all data-types.
|
||||
# XXX: Perhaps we want these to stay in the header instead, for easy/fast access
|
||||
@classmethod
|
||||
def draw_generic_filters(cls, context, layout):
|
||||
@@ -160,7 +160,7 @@ class DopesheetFilterPopoverBase:
|
||||
col.prop(dopesheet, "use_datablock_sort", icon='NONE')
|
||||
|
||||
|
||||
# Popover for Dopesheet Editor(s) - Dopesheet, Action, Shapekey, GPencil, Mask, etc.
|
||||
# Popover for Dope-sheet Editor(s) - Dope-sheet, Action, Shape-key, GPencil, Mask, etc.
|
||||
class DOPESHEET_PT_filters(DopesheetFilterPopoverBase, Panel):
|
||||
bl_space_type = 'DOPESHEET_EDITOR'
|
||||
bl_region_type = 'HEADER'
|
||||
|
||||
@@ -249,7 +249,7 @@ class NODE_MT_add(bpy.types.Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
# actual node submenus are defined by draw functions from node categories
|
||||
# Actual node sub-menus are defined by draw functions from node categories.
|
||||
nodeitems_utils.draw_node_categories_menu(self, context)
|
||||
|
||||
|
||||
|
||||
@@ -7641,7 +7641,7 @@ class VIEW3D_PT_context_properties(Panel):
|
||||
rna_prop_ui.draw(self.layout, context, member, object, use_edit=False)
|
||||
|
||||
|
||||
# Grease Pencil Object - Multiframe falloff tools
|
||||
# Grease Pencil Object - Multi-frame falloff tools.
|
||||
class VIEW3D_PT_gpencil_multi_frame(Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'HEADER'
|
||||
|
||||
@@ -738,9 +738,9 @@ class VIEW3D_PT_tools_brush_stroke_smooth_stroke(Panel, View3DPaintPanel, Smooth
|
||||
|
||||
|
||||
class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel):
|
||||
# dont give context on purpose to not show this in the generic header toolsettings
|
||||
# Don't give context on purpose to not show this in the generic header tool-settings
|
||||
# this is added only in the gradient tool's ToolDef
|
||||
# bl_context = ".weightpaint" # dot on purpose (access from topbar)
|
||||
# `bl_context = ".weightpaint"` # dot on purpose (access from top-bar)
|
||||
bl_label = "Falloff"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
# also dont draw as an extra panel in the sidebar (already included in the Brush settings)
|
||||
|
||||
@@ -82,10 +82,10 @@ def node_group_items(context):
|
||||
for group in context.blend_data.node_groups:
|
||||
if group.bl_idname != ntree.bl_idname:
|
||||
continue
|
||||
# filter out recursive groups
|
||||
# Filter out recursive groups.
|
||||
if group.contains_tree(ntree):
|
||||
continue
|
||||
# filter out hidden nodetrees
|
||||
# Filter out hidden node-trees.
|
||||
if group.name.startswith('.'):
|
||||
continue
|
||||
yield NodeItem(node_tree_group_type[group.bl_idname],
|
||||
|
||||
@@ -73,7 +73,7 @@ def main(context, event):
|
||||
class ViewOperatorRayCast(bpy.types.Operator):
|
||||
"""Modal object selection with a ray cast"""
|
||||
bl_idname = "view3d.modal_operator_raycast"
|
||||
bl_label = "RayCast View Operator"
|
||||
bl_label = "Ray-cast View Operator"
|
||||
|
||||
def modal(self, context, event):
|
||||
if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
|
||||
@@ -100,7 +100,7 @@ def menu_func(self, context):
|
||||
self.layout.operator(ViewOperatorRayCast.bl_idname, text="Raycast View Modal Operator")
|
||||
|
||||
|
||||
# Register and add to the "view" menu (required to also use F3 search "Raycast View Modal Operator" for quick access).
|
||||
# Register and add to the "view" menu (required to also use F3 search "Ray-cast View Modal Operator" for quick access).
|
||||
def register():
|
||||
bpy.utils.register_class(ViewOperatorRayCast)
|
||||
bpy.types.VIEW3D_MT_view.append(menu_func)
|
||||
|
||||
@@ -42,7 +42,7 @@ def enum_previews_from_directory_items(self, context):
|
||||
print("Scanning directory: %s" % directory)
|
||||
|
||||
if directory and os.path.exists(directory):
|
||||
# Scan the directory for png files
|
||||
# Scan the directory for `*.png` files
|
||||
image_paths = []
|
||||
for fn in os.listdir(directory):
|
||||
if fn.lower().endswith(".png"):
|
||||
|
||||
Reference in New Issue
Block a user