diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-20 13:37:01 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-11-20 14:35:05 +0300 |
commit | 76d602f38d0a948f9d6b03edc4d26153f970fb1c (patch) | |
tree | a3fd7497f214364813d0505e54cfd2c21319a279 /release/scripts/modules/bpy_extras/mesh_utils.py | |
parent | a29740e2904f12833a1c8d26926979a1cfb293da (diff) |
Add option not to print debug/info in ngon_tessellate.
That func can be called a lot, generating a lot of noise in the
console...
Diffstat (limited to 'release/scripts/modules/bpy_extras/mesh_utils.py')
-rw-r--r-- | release/scripts/modules/bpy_extras/mesh_utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index a09282da2fe..85356206482 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -239,7 +239,7 @@ def edge_loops_from_edges(mesh, edges=None): return line_polys -def ngon_tessellate(from_data, indices, fix_loops=True): +def ngon_tessellate(from_data, indices, fix_loops=True, debug_print=True): """ Takes a polyline of indices (fgon) and returns a list of face index lists. Designed to be used for importers that need indices for an @@ -405,7 +405,8 @@ def ngon_tessellate(from_data, indices, fix_loops=True): fill = [[vert_map[i] for i in reversed(f)] for f in fill] if not fill: - print('Warning Cannot scanfill, fallback on a triangle fan.') + if debug_print: + print('Warning Cannot scanfill, fallback on a triangle fan.') fill = [[0, i - 1, i] for i in range(2, len(indices))] else: # Use real scanfill. |