Cleanup: spelling, grammar, and other corrections

D5084 by @nBurn with edits
This commit is contained in:
2019-06-21 09:50:23 +10:00
parent 1e050bd08e
commit 0c538fc923
8 changed files with 469 additions and 454 deletions

View File

@@ -11,8 +11,8 @@ will not run. Modal operators are especially useful for interactive tools, an
operator can have its own state where keys toggle options as the operator runs. operator can have its own state where keys toggle options as the operator runs.
Grab, Rotate, Scale, and Fly-Mode are examples of modal operators. Grab, Rotate, Scale, and Fly-Mode are examples of modal operators.
:class:`Operator.invoke` is used to initialize the operator as being by :class:`Operator.invoke` is used to initialize the operator as being active
returning ``{'RUNNING_MODAL'}``, initializing the modal loop. by returning ``{'RUNNING_MODAL'}``, initializing the modal loop.
Notice ``__init__()`` and ``__del__()`` are declared. Notice ``__init__()`` and ``__del__()`` are declared.
For other operator types they are not useful but for modal operators they will For other operator types they are not useful but for modal operators they will

View File

@@ -342,8 +342,8 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
# Split registering up into 3 steps so we can undo # Split registering up into 3 steps so we can undo
# if it fails par way through. # if it fails par way through.
# disable the context, using the context at all is # Disable the context: using the context at all
# really bad while loading an addon, don't do it! # while loading an addon is really bad, don't do it!
with RestrictBlend(): with RestrictBlend():
# 1) try import # 1) try import
@@ -362,16 +362,16 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
_addon_remove(module_name) _addon_remove(module_name)
return None return None
# 1.1) fail when add-on is too old # 1.1) Fail when add-on is too old.
# This is a temporary 2.8x migration check, so we can manage addons that are supported. # This is a temporary 2.8x migration check, so we can manage addons that are supported.
if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0): if mod.bl_info.get("blender", (0, 0, 0)) < (2, 80, 0):
if _bpy.app.debug: if _bpy.app.debug:
print(f"Warning: Add-on '{module_name:s}' has not been upgraded to 2.8, ignoring") print(f"Warning: Add-on '{module_name:s}' was not upgraded for 2.80, ignoring")
return None return None
# 2) try register collected modules # 2) Try register collected modules.
# removed, addons need to handle own registration now. # Removed register_module, addons need to handle their own registration now.
use_owner = mod.bl_info.get("use_owner", True) use_owner = mod.bl_info.get("use_owner", True)
if use_owner: if use_owner:
@@ -379,7 +379,7 @@ def enable(module_name, *, default_set=False, persistent=False, handle_error=Non
owner_id_prev = _bl_owner_id_get() owner_id_prev = _bl_owner_id_get()
_bl_owner_id_set(module_name) _bl_owner_id_set(module_name)
# 3) try run the modules register function # 3) Try run the modules register function.
try: try:
mod.register() mod.register()
except Exception as ex: except Exception as ex:

View File

@@ -468,7 +468,7 @@ static PyMethodDef BLF_methods[] = {
{NULL, NULL, 0, NULL}, {NULL, NULL, 0, NULL},
}; };
PyDoc_STRVAR(BLF_doc, "This module provides access to blenders text drawing functions."); PyDoc_STRVAR(BLF_doc, "This module provides access to Blender's text drawing functions.");
static struct PyModuleDef BLF_module_def = { static struct PyModuleDef BLF_module_def = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"blf", /* m_name */ "blf", /* m_name */

View File

@@ -86,7 +86,7 @@ static PyStructSequence_Field app_info_fields[] = {
{(char *)"version_char", (char *)"The Blender version character (for minor releases)"}, {(char *)"version_char", (char *)"The Blender version character (for minor releases)"},
{(char *)"version_cycle", (char *)"The release status of this build alpha/beta/rc/release"}, {(char *)"version_cycle", (char *)"The release status of this build alpha/beta/rc/release"},
{(char *)"binary_path", {(char *)"binary_path",
(char *)"The location of blenders executable, useful for utilities that spawn new instances"}, (char *)"The location of Blender's executable, useful for utilities that open new instances"},
{(char *)"background", {(char *)"background",
(char *)"Boolean, True when blender is running without a user interface (started with -b)"}, (char *)"Boolean, True when blender is running without a user interface (started with -b)"},
{(char *)"factory_startup", {(char *)"factory_startup",

View File

@@ -17,7 +17,7 @@
/** \file /** \file
* \ingroup pythonintern * \ingroup pythonintern
* *
* This file inserts an exit callback into pythons 'atexit' module. * This file inserts an exit callback into Python's 'atexit' module.
* Without this sys.exit() can crash because blender is not properly closing * Without this sys.exit() can crash because blender is not properly closing
* resources. * resources.
*/ */

View File

@@ -19,9 +19,9 @@
* *
* This file exposed blend file library appending/linking to python, typically * This file exposed blend file library appending/linking to python, typically
* this would be done via RNA api but in this case a hand written python api * this would be done via RNA api but in this case a hand written python api
* allows us to use pythons context manager (__enter__ and __exit__). * allows us to use Python's context manager (`__enter__` and `__exit__`).
* *
* Everything here is exposed via bpy.data.libraries.load(...) which returns * Everything here is exposed via `bpy.data.libraries.load(...)` which returns
* a context manager. * a context manager.
*/ */

View File

@@ -2986,8 +2986,8 @@ PyDoc_STRVAR(
" .. warning::\n" " .. warning::\n"
"\n" "\n"
" There is a known bug with using a callback,\n" " There is a known bug with using a callback,\n"
" Python must keep a reference to the strings returned or Blender will misbehave\n" " Python must keep a reference to the strings returned by the callback or Blender\n"
" or even crash." " will misbehave or even crash."
"\n" "\n"
" :type items: sequence of string tuples or a function\n" BPY_PROPDEF_NAME_DOC " :type items: sequence of string tuples or a function\n" BPY_PROPDEF_NAME_DOC
BPY_PROPDEF_DESC_DOC BPY_PROPDEF_DESC_DOC

File diff suppressed because it is too large Load Diff