Skip to content

Commit 4631d6c

Browse files
committed
offset_edges_v0.3.8: changed the preference option 'lock_width' to 'free_move' and fixed some bugs.
1 parent 5c5deee commit 4631d6c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

mesh_offset_edges.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
bl_info = {
2121
"name": "Offset Edges",
2222
"author": "Hidesato Ikeya",
23-
"version": (0, 3, 7),
23+
"version": (0, 3, 8),
2424
"blender": (2, 76, 0),
2525
"location": "VIEW3D > Edge menu(CTRL-E) > Offset Edges",
2626
"description": "Offset Edges",
@@ -51,19 +51,19 @@ class OffsetEdgesPreferences(bpy.types.AddonPreferences):
5151
bl_idname = __name__
5252
interactive = bpy.props.BoolProperty(
5353
name = "Interactive",
54-
description = "adjast offset interactively",
54+
description = "makes operation interactive",
5555
default = True)
56-
lock_width = bpy.props.BoolProperty(
57-
name = "Lock width while ctrl",
58-
description = "offset width doesn't change while pressing ctrl key",
56+
free_move = bpy.props.BoolProperty(
57+
name = "Free Move",
58+
description = "enables to adjust both width and depth while pressing ctrl-key",
5959
default = False)
6060

6161
def draw(self, context):
6262
layout = self.layout
6363
row = layout.row()
6464
row.prop(self, "interactive")
6565
if self.interactive:
66-
row.prop(self, "lock_width")
66+
row.prop(self, "free_move")
6767

6868
#######################################################################
6969

@@ -531,6 +531,8 @@ def get_offset_infos(self, bm, ob_edit):
531531
for v, d in zip(verts, directions):
532532
offset_infos.append((v, v.co.copy(), d))
533533

534+
for e in edges_orig:
535+
e.select = False
534536
for f in bm.faces:
535537
f.select = False
536538

@@ -766,7 +768,7 @@ def invoke(self, context, event):
766768
context.user_preferences.addons[__name__].preferences
767769
if pref.interactive and context.space_data.type == 'VIEW_3D':
768770
# interactive mode
769-
if not pref.lock_width:
771+
if pref.free_move:
770772
self.depth_mode = 'depth'
771773

772774
ret = self.modal_prepare_bmeshes(context, ob_edit)
@@ -827,7 +829,7 @@ def modal(self, context, event):
827829
_mouse_current = Vector((event.mouse_x, event.mouse_y))
828830
vec_delta = _mouse_current - self._mouse_prev
829831

830-
if not pref.lock_width or not event.ctrl:
832+
if pref.free_move or not event.ctrl:
831833
self.width += vec_delta.x * self._factor
832834

833835
if event.ctrl:

0 commit comments

Comments
 (0)