Spelling fixes in comments and descriptions, patch by luzpaz.
Differential Revision: https://developer.blender.org/D3668
This commit is contained in:
@@ -26,5 +26,5 @@ col += mathutils.Color((0.25, 0.0, 0.0))
|
||||
# can printed as integers
|
||||
print("Color: %d, %d, %d" % (col * 255.0)[:])
|
||||
|
||||
# This example prints the color as hexidecimal
|
||||
print("Hexidecimal: %.2x%.2x%.2x" % (col * 255.0)[:])
|
||||
# This example prints the color as hexadecimal
|
||||
print("Hexadecimal: %.2x%.2x%.2x" % (col * 255.0)[:])
|
||||
|
@@ -15,7 +15,7 @@ quat_a = mathutils.Quaternion((0.0, 1.0, 0.0), math.radians(90.0))
|
||||
quat_b = mathutils.Quaternion((0.0, 0.0, 1.0), math.radians(45.0))
|
||||
quat_out = quat_a * quat_b
|
||||
|
||||
# print the quat, euler degrees for mear mortals and (axis, angle)
|
||||
# print the quat, euler degrees for mere mortals and (axis, angle)
|
||||
print("Final Rotation:")
|
||||
print(quat_out)
|
||||
print("%.2f, %.2f, %.2f" % tuple(math.degrees(a) for a in quat_out.to_euler()))
|
||||
|
@@ -69,7 +69,7 @@ offers a set of extensive examples, including advanced features.
|
||||
|
||||
.. function:: glBegin(mode):
|
||||
|
||||
Delimit the vertices of a primitive or a group of like primatives
|
||||
Delimit the vertices of a primitive or a group of like primitives
|
||||
|
||||
.. seealso:: `OpenGL Docs <https://www.opengl.org/sdk/docs/man2/xhtml/glBegin.xml>`__
|
||||
|
||||
|
@@ -145,8 +145,8 @@ that happens to redraw but is more flexible and integrates better with Blenders
|
||||
|
||||
**Ok, Ok! I still want to draw from Python**
|
||||
|
||||
If you insist - yes its possible, but scripts that use this hack wont be considered
|
||||
for inclusion in Blender and any issues with using it wont be considered bugs,
|
||||
If you insist - yes its possible, but scripts that use this hack won't be considered
|
||||
for inclusion in Blender and any issues with using it won't be considered bugs,
|
||||
this is also not guaranteed to work in future releases.
|
||||
|
||||
.. code-block:: python
|
||||
@@ -265,7 +265,7 @@ All 3 data types can be used for exporting,
|
||||
the choice mostly depends on whether the target format supports ngons or not.
|
||||
|
||||
- Polygons are the most direct & efficient way to export providing they convert into the output format easily enough.
|
||||
- Tessfaces work well for exporting to formats which dont support ngons,
|
||||
- Tessfaces work well for exporting to formats which don't support ngons,
|
||||
in fact this is the only place where their use is encouraged.
|
||||
- BMesh-Faces can work for exporting too but may not be necessary if polygons can be used
|
||||
since using bmesh gives some overhead because its not the native storage format in object mode.
|
||||
@@ -551,7 +551,7 @@ to avoid getting stuck too deep in encoding problems - here are some suggestions
|
||||
|
||||
.. note::
|
||||
|
||||
Sometimes it's preferrable to avoid string encoding issues by using bytes instead of Python strings,
|
||||
Sometimes it's preferable to avoid string encoding issues by using bytes instead of Python strings,
|
||||
when reading some input its less trouble to read it as binary data
|
||||
though you will still need to decide how to treat any strings you want to use with Blender,
|
||||
some importers do this.
|
||||
|
@@ -209,7 +209,7 @@ Bundled Python & Extensions
|
||||
===========================
|
||||
|
||||
The Blender releases distributed from blender.org include a complete Python installation on all platforms,
|
||||
this has the disadvantage that any extensions you have installed in your systems Python wont be found by Blender.
|
||||
this has the disadvantage that any extensions you have installed in your systems Python won't be found by Blender.
|
||||
|
||||
There are 2 ways around this:
|
||||
|
||||
|
@@ -303,7 +303,7 @@ def main():
|
||||
elif tp_sub == BMO_OP_SLOT_SUBTYPE_PTR_MESH:
|
||||
tp_str = ":class:`bpy.types.Mesh`"
|
||||
else:
|
||||
print("Cant find", vars_dict_reverse[tp_sub])
|
||||
print("Can't find", vars_dict_reverse[tp_sub])
|
||||
assert(0)
|
||||
|
||||
elif tp == BMO_OP_SLOT_ELEMENT_BUF:
|
||||
@@ -340,10 +340,10 @@ def main():
|
||||
elif tp_sub == BMO_OP_SLOT_SUBTYPE_MAP_INTERNAL:
|
||||
tp_str += "unknown internal data, not compatible with python"
|
||||
else:
|
||||
print("Cant find", vars_dict_reverse[tp_sub])
|
||||
print("Can't find", vars_dict_reverse[tp_sub])
|
||||
assert(0)
|
||||
else:
|
||||
print("Cant find", vars_dict_reverse[tp])
|
||||
print("Can't find", vars_dict_reverse[tp])
|
||||
assert(0)
|
||||
|
||||
args_wash.append((name, tp_str, comment))
|
||||
|
@@ -113,7 +113,7 @@ def api_dump():
|
||||
)
|
||||
del props
|
||||
|
||||
# python props, tricky since we dont know much about them.
|
||||
# python props, tricky since we don't know much about them.
|
||||
for prop_id, attr in struct_info.get_py_properties():
|
||||
|
||||
dump_class[prop_id] = (
|
||||
@@ -289,7 +289,7 @@ def api_changelog(api_from, api_to, api_out):
|
||||
if props_old:
|
||||
write_title("Removed", "^")
|
||||
for prop_id in props_old:
|
||||
fw("* **%s**\n" % prop_id) # cant link to remvoed docs
|
||||
fw("* **%s**\n" % prop_id) # can't link to removed docs
|
||||
fw("\n")
|
||||
|
||||
if props_moved:
|
||||
@@ -351,7 +351,7 @@ def main():
|
||||
"--api_out", dest="api_out", metavar='FILE',
|
||||
help="Output sphinx changelog")
|
||||
|
||||
args = parser.parse_args(argv) # In this example we wont use the args
|
||||
args = parser.parse_args(argv) # In this example we won't use the args
|
||||
|
||||
if not argv:
|
||||
print("No args given!")
|
||||
|
@@ -491,7 +491,7 @@ if ARGS.sphinx_build_pdf:
|
||||
|
||||
# --------------------------------API DUMP--------------------------------------
|
||||
|
||||
# lame, python wont give some access
|
||||
# lame, python won't give some access
|
||||
ClassMethodDescriptorType = type(dict.__dict__['fromkeys'])
|
||||
MethodDescriptorType = type(dict.get)
|
||||
GetSetDescriptorType = type(int.real)
|
||||
@@ -690,7 +690,7 @@ def pyfunc2sphinx(ident, fw, module_name, type_name, identifier, py_func, is_cla
|
||||
if not is_class:
|
||||
func_type = "function"
|
||||
|
||||
# ther rest are class methods
|
||||
# the rest are class methods
|
||||
elif arg_str.startswith("(self, ") or arg_str == "(self)":
|
||||
arg_str = "()" if (arg_str == "(self)") else ("(" + arg_str[7:])
|
||||
func_type = "method"
|
||||
@@ -824,7 +824,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
fw(".. module:: %s\n\n" % module_name)
|
||||
|
||||
if module.__doc__:
|
||||
# Note, may contain sphinx syntax, dont mangle!
|
||||
# Note, may contain sphinx syntax, don't mangle!
|
||||
fw(module.__doc__.strip())
|
||||
fw("\n\n")
|
||||
|
||||
@@ -1120,7 +1120,7 @@ def pycontext2sphinx(basepath):
|
||||
def write_contex_cls():
|
||||
|
||||
fw(title_string("Global Context", "-"))
|
||||
fw("These properties are avilable in any contexts.\n\n")
|
||||
fw("These properties are available in any contexts.\n\n")
|
||||
|
||||
# very silly. could make these global and only access once.
|
||||
# structs, funcs, ops, props = rna_info.BuildRNAInfo()
|
||||
@@ -1144,7 +1144,7 @@ def pycontext2sphinx(basepath):
|
||||
if prop.description:
|
||||
fw(" %s\n\n" % prop.description)
|
||||
|
||||
# special exception, cant use genric code here for enums
|
||||
# special exception, can't use generic code here for enums
|
||||
if prop.type == "enum":
|
||||
enum_text = pyrna_enum2sphinx(prop)
|
||||
if enum_text:
|
||||
@@ -1266,7 +1266,7 @@ def pyrna2sphinx(basepath):
|
||||
if prop.name or prop.description:
|
||||
fw(ident + " " + ", ".join(val for val in (prop.name, prop.description) if val) + "\n\n")
|
||||
|
||||
# special exception, cant use genric code here for enums
|
||||
# special exception, can't use generic code here for enums
|
||||
if enum_text:
|
||||
write_indented_lines(ident + " ", fw, enum_text)
|
||||
fw("\n")
|
||||
@@ -1365,7 +1365,7 @@ def pyrna2sphinx(basepath):
|
||||
if prop.description:
|
||||
fw(" %s\n\n" % prop.description)
|
||||
|
||||
# special exception, cant use genric code here for enums
|
||||
# special exception, can't use generic code here for enums
|
||||
if prop.type == "enum":
|
||||
enum_text = pyrna_enum2sphinx(prop)
|
||||
if enum_text:
|
||||
@@ -1398,7 +1398,7 @@ def pyrna2sphinx(basepath):
|
||||
elif func.return_values: # multiple return values
|
||||
fw(" :return (%s):\n" % ", ".join(prop.identifier for prop in func.return_values))
|
||||
for prop in func.return_values:
|
||||
# TODO, pyrna_enum2sphinx for multiple return values... actually dont
|
||||
# TODO, pyrna_enum2sphinx for multiple return values... actually don't
|
||||
# think we even use this but still!!!
|
||||
type_descr = prop.get_type_description(
|
||||
as_ret=True, class_fmt=":class:`%s`", collection_id=_BPY_PROP_COLLECTION_ID)
|
||||
|
@@ -58,7 +58,7 @@ SPHINX_WORKDIR="$(mktemp --directory --suffix=.sphinx)"
|
||||
# Generate reStructuredText (blender/python only)
|
||||
|
||||
if $DO_EXE_BLENDER ; then
|
||||
# dont delete existing docs, now partial updates are used for quick builds.
|
||||
# don't delete existing docs, now partial updates are used for quick builds.
|
||||
$BLENDER_BIN \
|
||||
--background \
|
||||
-noaudio \
|
||||
@@ -89,7 +89,7 @@ if $DO_OUT_HTML ; then
|
||||
# and zip up there, for now this is OK
|
||||
rm -rf sphinx-out/.doctrees
|
||||
|
||||
# incase we have a zip already
|
||||
# in case we have a zip already
|
||||
rm -f blender_python_reference_$BLENDER_VERSION.zip
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user