diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-06 18:42:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-06 18:44:55 +0400 |
commit | dd5acaaa6c3fde6d7a0b161faa54696045780e7b (patch) | |
tree | 7c2bf6bed7b9e4cc243d9eb2f58ac04594273aa3 /release/scripts | |
parent | c9dee2b054363ab8ae4e07c96685d6a41e38f0bd (diff) |
Correct Python exceptions
T35358 by Codemanx
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/modules/bpy_extras/mesh_utils.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_lightmap.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_smart_project.py | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/release/scripts/modules/bpy_extras/mesh_utils.py b/release/scripts/modules/bpy_extras/mesh_utils.py index 1e3e4c873a8..4293930e823 100644 --- a/release/scripts/modules/bpy_extras/mesh_utils.py +++ b/release/scripts/modules/bpy_extras/mesh_utils.py @@ -421,7 +421,6 @@ def ngon_tessellate(from_data, indices, fix_loops=True): loop_segments.append(context_loop) else: if context_loop and context_loop[-1][1] == v[1]: - #raise "as" pass else: context_loop.append(v) diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index 6f54c051c0b..8f618e0632e 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -470,9 +470,7 @@ def lightmap_uvpack(meshes, pretty_faces.append(pf_parent) w, h = pf_parent.width, pf_parent.height - - if w > h: - raise "error" + assert(w <= h) if w == h: even_dict.setdefault(w, []).append(pf_parent) diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py index bf8b10ac4af..aa8a1742c1e 100644 --- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py +++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py @@ -634,7 +634,7 @@ def packIslands(islandList): # print 'Box Packing Time:', time.time() - time1 #if len(pa ckedLs) != len(islandList): - # raise "Error packed boxes differs from original length" + # raise ValueError("Packed boxes differs from original length") #print '\tWriting Packed Data to faces' #XXX Window.DrawProgressBar(0.8, "Writing Packed Data to faces") |