Skip to content
This repository has been archived by the owner on Dec 12, 2017. It is now read-only.

Commit

Permalink
make return values consistent for old and new cutting methods to help…
Browse files Browse the repository at this point in the history
… isolate cut failures

fix #66
  • Loading branch information
patmo141 committed Jun 16, 2014
1 parent 2687de7 commit 8c29236
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1839,9 +1839,15 @@ def undo_action(self):


def invoke(self, context, event):
#HINT you are in contours code
#TODO Settings harmon CODE REVIEW
settings = context.user_preferences.addons[AL.FolderName].preferences

if context.space_data.viewport_shade in {'WIREFRAME','BOUNDBOX'}:
self.report({'ERROR'}, 'Viewport shading must be at lease SOLID')
return {'CANCELLED'}


self.valid_cut_inds = []
self.existing_loops = []

Expand Down Expand Up @@ -1899,10 +1905,10 @@ def invoke(self, context, event):
if len(ed_inds):
vert_loops = contour_utilities.edge_loops_from_bmedges(self.dest_bme, ed_inds)



if len(vert_loops) > 1:
self.report('WARNING', 'Only one edge loop will be used for extension')
self.report({'WARNING'}, 'Only one edge loop will be used for extension')
print('there are %i edge loops selected' % len(vert_loops))

#for loop in vert_loops:
Expand Down
4 changes: 2 additions & 2 deletions contour_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ def cross_section_seed_ver0(bme, mx,

if not len(seeds):
print('cancelling until your programmer gets smarter')
return None
return (None,None)

#we have found one edge that crosses, now, baring any terrible disconnections in the mesh,
#we traverse through the link faces, wandering our way through....removing edges from our list
Expand Down Expand Up @@ -2261,7 +2261,7 @@ def cross_section_seed_ver0(bme, mx,

return (verts, eds)
else:
return None
return (None, None)



Expand Down

0 comments on commit 8c29236

Please sign in to comment.