Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-30 00:39:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-30 00:39:59 +0300
commit6af997710bf8bf48381bebe73d01d8c521a014ac (patch)
tree84cc30df0a266f31858e40e20c8d178206626116 /doc
parentc754b2239c065a76386df211daf365da6ed56312 (diff)
parent8ac2d85d2fd3f8b997e9c9bddadada0dc7bdaf37 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'doc')
-rw-r--r--doc/python_api/rst/info_api_reference.rst1
-rw-r--r--doc/python_api/rst/info_best_practice.rst5
-rw-r--r--doc/python_api/rst/info_gotcha.rst18
-rw-r--r--doc/python_api/rst/info_quickstart.rst5
-rw-r--r--doc/python_api/rst/info_tips_and_tricks.rst1
5 files changed, 13 insertions, 17 deletions
diff --git a/doc/python_api/rst/info_api_reference.rst b/doc/python_api/rst/info_api_reference.rst
index cc7128f3b5d..7d8eaade0f2 100644
--- a/doc/python_api/rst/info_api_reference.rst
+++ b/doc/python_api/rst/info_api_reference.rst
@@ -298,4 +298,3 @@ then copied :kbd:`Control-C`, usually to paste in the text editor or python cons
zooming the view for example isn't so useful to repeat so its excluded from the output.
To display *every* operator that runs see :ref:`Show All Operators <info_show_all_operators>`
-
diff --git a/doc/python_api/rst/info_best_practice.rst b/doc/python_api/rst/info_best_practice.rst
index b9c9f234b72..8b64bacd50e 100644
--- a/doc/python_api/rst/info_best_practice.rst
+++ b/doc/python_api/rst/info_best_practice.rst
@@ -297,13 +297,13 @@ Here are 3 ways of joining multiple strings into one string for writing.
This also applies to any area of your code that involves a lot of string joining.
-``String addition`` -
+``String addition`` -
this is the slowest option, *don't use if you can help it, especially when writing data in a loop*.
>>> file.write(str1 + " " + str2 + " " + str3 + "\n")
-``String formatting`` -
+``String formatting`` -
use this when you are writing string data from floats and ints.
>>> file.write("%s %s %s\n" % (str1, str2, str3))
@@ -392,4 +392,3 @@ While developing a script it is good to time it to be aware of any changes in pe
# do something...
print("My Script Finished: %.4f sec" % (time.time() - time_start))
-
diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
index bbccc27b227..6200936dd04 100644
--- a/doc/python_api/rst/info_gotcha.rst
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -205,8 +205,8 @@ Support Overview
* - Usage
- :class:`bpy.types.MeshPolygon`
- - :class:`bpy.types.MeshTessFace`
- - :class:`bmesh.types.BMFace`
+ - :class:`bpy.types.MeshTessFace`
+ - :class:`bmesh.types.BMFace`
* - Import/Create
- Poor *(inflexible)*
- Good *(supported as upgrade path)*
@@ -288,7 +288,7 @@ Example using :class:`bpy.types.EditBone` in armature editmode:
This is only possible in edit mode.
- >>> bpy.context.object.data.edit_bones["Bone"].head = Vector((1.0, 2.0, 3.0))
+ >>> bpy.context.object.data.edit_bones["Bone"].head = Vector((1.0, 2.0, 3.0))
This will be empty outside of editmode.
@@ -333,7 +333,7 @@ Examples using :class:`bpy.types.PoseBone` in object or pose mode:
.. code-block:: python
# Gets the name of the first constraint (if it exists)
- bpy.context.object.pose.bones["Bone"].constraints[0].name
+ bpy.context.object.pose.bones["Bone"].constraints[0].name
# Gets the last selected pose bone (pose mode only)
bpy.context.active_pose_bone
@@ -378,7 +378,7 @@ This can cause bugs when you add some data (normally imported) then reference it
.. code-block:: python
bpy.data.meshes.new(name=meshid)
-
+
# normally some code, function calls...
bpy.data.meshes[meshid]
@@ -388,7 +388,7 @@ Or with name assignment...
.. code-block:: python
obj.name = objname
-
+
# normally some code, function calls...
obj = bpy.data.meshes[objname]
@@ -408,12 +408,12 @@ this way you don't run this risk of referencing existing data from the blend fil
# typically declared in the main body of the function.
mesh_name_mapping = {}
-
+
mesh = bpy.data.meshes.new(name=meshid)
mesh_name_mapping[meshid] = mesh
-
+
# normally some code, or function calls...
-
+
# use own dictionary rather than bpy.data
mesh = mesh_name_mapping[meshid]
diff --git a/doc/python_api/rst/info_quickstart.rst b/doc/python_api/rst/info_quickstart.rst
index bbedb3f4fd4..1b6965681b6 100644
--- a/doc/python_api/rst/info_quickstart.rst
+++ b/doc/python_api/rst/info_quickstart.rst
@@ -125,7 +125,7 @@ its attributes can be accessed much like you would change a setting using the gr
In fact, the tooltip for each button also displays the Python attribute
which can help in finding what settings to change in a script.
- >>> bpy.data.objects[0].name
+ >>> bpy.data.objects[0].name
'Camera'
>>> bpy.data.scenes["Scene"]
@@ -267,7 +267,7 @@ Operator Poll()
^^^^^^^^^^^^^^^
Many operators have a "poll" function which may check that the cursor
-is in a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc).
+is in a valid area or that the object is in the correct mode (Edit Mode, Weight Paint etc).
When an operator's poll function fails within Python, an exception is raised.
For example, calling ``bpy.ops.view3d.render_border()`` from the console raises the following error:
@@ -477,4 +477,3 @@ Using Low-Level Functions:
fcu_z.keyframe_points.add(2)
fcu_z.keyframe_points[0].co = 10.0, 0.0
fcu_z.keyframe_points[1].co = 20.0, 1.0
-
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst
index 332716087a7..63f7b9410c8 100644
--- a/doc/python_api/rst/info_tips_and_tricks.rst
+++ b/doc/python_api/rst/info_tips_and_tricks.rst
@@ -315,4 +315,3 @@ enable the CMake build option ``WITH_PYTHON_SAFETY``.
This enables data tracking which makes data access about 2x slower
which is why the option isn't enabled in release builds.
-