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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-28 17:58:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-28 17:58:56 +0400
commitf3ad5bd3ff1aa38da42dc9fbf9871db32d34c8e3 (patch)
treef60dac8067fcc892324ccd097cc09d37979d1f12 /doc/python_api/rst/info_gotcha.rst
parentc7a46d536960adfaac88f1aff5dcbe43d747bc4b (diff)
rename references to faces in docs.
Diffstat (limited to 'doc/python_api/rst/info_gotcha.rst')
-rw-r--r--doc/python_api/rst/info_gotcha.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
index 34145c2ac49..5817f0f0d67 100644
--- a/doc/python_api/rst/info_gotcha.rst
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -585,19 +585,19 @@ So it's best to consider modifying library data an advanced usage of the API and
Edit Mode / Memory Access
-------------------------
-Switching edit-mode ``bpy.ops.object.mode_set(mode='EDIT')`` / ``bpy.ops.object.mode_set(mode='OBJECT')`` will re-allocate objects data, any references to a meshes vertices/faces/uvs, armatures bones, curves points etc cannot be accessed after switching edit-mode.
+Switching edit-mode ``bpy.ops.object.mode_set(mode='EDIT')`` / ``bpy.ops.object.mode_set(mode='OBJECT')`` will re-allocate objects data, any references to a meshes vertices/polygons/uvs, armatures bones, curves points etc cannot be accessed after switching edit-mode.
Only the reference to the data its self can be re-accessed, the following example will crash.
.. code-block:: python
mesh = bpy.context.active_object.data
- faces = mesh.faces
+ polygons = mesh.polygons
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.object.mode_set(mode='OBJECT')
# this will crash
- print(faces)
+ print(polygons)
So after switching edit-mode you need to re-access any object data variables, the following example shows how to avoid the crash above.
@@ -605,13 +605,13 @@ So after switching edit-mode you need to re-access any object data variables, th
.. code-block:: python
mesh = bpy.context.active_object.data
- faces = mesh.faces
+ polygons = mesh.polygons
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.object.mode_set(mode='OBJECT')
- # faces have been re-allocated
- faces = mesh.faces
- print(faces)
+ # polygons have been re-allocated
+ polygons = mesh.polygons
+ print(polygons)
These kinds of problems can happen for any functions which re-allocate the object data but are most common when switching edit-mode.
@@ -620,7 +620,7 @@ These kinds of problems can happen for any functions which re-allocate the objec
Array Re-Allocation
-------------------
-When adding new points to a curve or vertices's/edges/faces to a mesh, internally the array which stores this data is re-allocated.
+When adding new points to a curve or vertices's/edges/polygons to a mesh, internally the array which stores this data is re-allocated.
.. code-block:: python