Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
quick hack to make sure a simple click doesn't change alignment.
Browse files Browse the repository at this point in the history
Issue #120 is improved by this
  • Loading branch information
patmo141 committed Sep 11, 2013
1 parent 146fb92 commit 800ab52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/addons/contour_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1173,14 +1173,16 @@ def modal(self, context, event):

#user just finished using the widget
if self.drag_target.desc == 'CUT_LINE' and self.widget_interaction:
if not settings.live_update:
if not settings.live_update: #meaning all this hasn't been done
self.drag_target.hit_object(context, self.original_form, method = '3_AXIS_COM')
self.drag_target.cut_object(context, self.original_form, self.bme)
self.hover_target.simplify_cross(self.segments)
self.hover_target.update_com()
self.hover_target.update_screen_coords(context)

self.align_cut(self.drag_target, mode = 'BETWEEN')
if self.cut_line_widget.transform:
self.align_cut(self.drag_target, mode = 'BETWEEN')

self.connect_valid_cuts_to_make_mesh()


Expand Down
6 changes: 6 additions & 0 deletions scripts/addons/contour_tools/contour_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,8 @@ def __init__(self,context, settings, cut_line,x,y,cut_line_a = None, cut_line_b
self.vec_y = self.cut_line.vec_y.copy()
self.initial_plane_no = self.cut_line.plane_no.copy()
self.initial_seed = self.cut_line.seed_face_index
self.initial_int_shift = self.cut_line.int_shift
self.initial_shift = self.cut_line.shift

self.wedge_1 = []
self.wedge_2 = []
Expand Down Expand Up @@ -1644,13 +1646,17 @@ def derive_screen(self,context):

def cancel_transform(self):

self.cut_line = ContourCutLine
#reset our initial values
self.cut_line.plane_com = self.initial_com
self.cut_line.plane_no = self.initial_plane_no
self.cut_line.plane_pt = self.initial_plane_pt
self.cut_line.vec_x = self.vec_x
self.cut_line.vec_y = self.vec_y
self.cut_line.seed_face_index = self.initial_seed

self.cut_line.int_shift = self.initial_int_shift
self.cut_line.shift = self.initial_shift


def draw(self, context):
Expand Down

0 comments on commit 800ab52

Please sign in to comment.