diff options
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 76c495c078d..6cb9600b9b4 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -441,11 +441,6 @@ class Mesh(bpy_types.ID): When an empty iterable is passed in, the edges are inferred from the polygons. - When non-emtpy, either: - - - Edges must be provided for all polygons. - - Edges must be calculated afterwards using :class:`Mesh.update` with ``calc_edges=True``. - :type edges: iterable object :arg faces: @@ -481,11 +476,15 @@ class Mesh(bpy_types.ID): self.polygons.foreach_set("loop_start", loop_starts) self.polygons.foreach_set("vertices", vertex_indices) - # if no edges - calculate them - if faces and (not edges): - self.update(calc_edges=True) - elif edges: - self.update(calc_edges_loose=True) + if edges or faces: + self.update( + # Needed to either: + # - Calculate edges that don't exist for polygons. + # - Assign edges to polygon loops. + calc_edges=bool(faces), + # Flag loose edges. + calc_edges_loose=bool(edges), + ) @property def edge_keys(self): |