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>2012-02-27 20:14:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-27 20:14:08 +0400
commitd8403875ccc422c88e6d46090033e3e31a0da02b (patch)
tree0c009555851a44f8a74ab9d9a18b13c9de70894b /release/scripts/modules/bpy_types.py
parent96e0f188507a1f59c21db5306642d06f32d41220 (diff)
fix for problem that happened since bmesh mere mesh.from_py_data() - edge data for faces was being lost on entering editmode, now check for empty edge list and make edges in that case.
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index c5dc07e493a..a43d26b2c89 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -366,7 +366,7 @@ class Mesh(bpy_types.ID):
:type edges: iterable object
:arg faces:
- iterator of faces, each faces contains three or four indices to
+ iterator of faces, each faces contains three or more indices to
the *vertices* argument. eg: [(5, 6, 8, 9), (1, 2, 3), ...]
:type faces: iterable object
@@ -394,6 +394,10 @@ class Mesh(bpy_types.ID):
p.vertices = f
loop_index += loop_len
+ # if no edges - calculae them
+ if faces and (not edges):
+ self.update(calc_edges=True)
+
@property
def edge_keys(self):
return [ed.key for ed in self.edges]