From 2aff5bcda7a3f65b375f3de1863eb953f50c9d88 Mon Sep 17 00:00:00 2001 From: Tristan Strathearn Date: Mon, 25 Apr 2022 16:20:35 +1000 Subject: [PATCH] feat: add alt mode to geo_lift operator to ignore all bevels when calculating selectable geometry --- sketching/geo_lift.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sketching/geo_lift.py b/sketching/geo_lift.py index d3b5713..b1510f5 100644 --- a/sketching/geo_lift.py +++ b/sketching/geo_lift.py @@ -17,7 +17,8 @@ class ND_OT_geo_lift(bpy.types.Operator): bl_idname = "nd.geo_lift" bl_label = "Geo Lift" - bl_description = "Lift geometry out of a non-destructive object" + bl_description = """Lift geometry out of a non-destructive object +SHIFT — Ignore bevels when calculating selectable geometry""" bl_options = {'UNDO'} @@ -79,6 +80,8 @@ def modal(self, context, event): def invoke(self, context, event): self.selection_type = 2 # ['VERT', 'EDGE', 'FACE'] self.register_mode() + + self.ignore_bevels = event.shift self.prepare_face_selection_mode(context) @@ -111,6 +114,11 @@ def set_selection_mode(self, context): def prepare_face_selection_mode(self, context): bpy.ops.object.duplicate() + if self.ignore_bevels: + mods = [mod.name for mod in context.object.modifiers if mod.type == 'BEVEL' and mod.affect == 'EDGES'] + for mod in mods: + bpy.ops.object.modifier_remove(modifier=mod) + depsgraph = context.evaluated_depsgraph_get() object_eval = context.object.evaluated_get(depsgraph)