forked from bartvdbraak/blender
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.
This commit is contained in:
parent
96e0f18850
commit
d8403875cc
@ -366,7 +366,7 @@ class Mesh(bpy_types.ID):
|
|||||||
:type edges: iterable object
|
:type edges: iterable object
|
||||||
:arg faces:
|
: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), ...]
|
the *vertices* argument. eg: [(5, 6, 8, 9), (1, 2, 3), ...]
|
||||||
|
|
||||||
:type faces: iterable object
|
:type faces: iterable object
|
||||||
@ -394,6 +394,10 @@ class Mesh(bpy_types.ID):
|
|||||||
p.vertices = f
|
p.vertices = f
|
||||||
loop_index += loop_len
|
loop_index += loop_len
|
||||||
|
|
||||||
|
# if no edges - calculae them
|
||||||
|
if faces and (not edges):
|
||||||
|
self.update(calc_edges=True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def edge_keys(self):
|
def edge_keys(self):
|
||||||
return [ed.key for ed in self.edges]
|
return [ed.key for ed in self.edges]
|
||||||
|
Loading…
Reference in New Issue
Block a user