From a71896c6cea247d1c26b91b91a2b8b5c91dd1c4a Mon Sep 17 00:00:00 2001 From: Tristan Strathearn Date: Tue, 24 May 2022 09:02:13 +1000 Subject: [PATCH] feat: add cycle operator to fast menu for objects with boolean modifiers present --- interface/fast_menu.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/interface/fast_menu.py b/interface/fast_menu.py index 80db8cc..dd4ad6e 100644 --- a/interface/fast_menu.py +++ b/interface/fast_menu.py @@ -145,11 +145,12 @@ def draw_single_object_predictions(self, context): has_mod_pe = False has_mod_sol = False + has_mod_bool = False + for name in mod_names: - if "— ND PE" in name: - has_mod_pe = True - if "— ND SOL" in name: - has_mod_sol = True + has_mod_pe = bool("— ND PE" in name) + has_mod_sol = bool("— ND SOL" in name) + has_mod_bool = bool("— ND Bool" in name) was_profile_extrude = has_mod_pe and not has_mod_sol @@ -173,10 +174,17 @@ def draw_single_object_predictions(self, context): return if self.form: + if has_mod_bool: + layout.operator("nd.cycle", icon='LONGDISPLAY') + layout.separator() + layout.operator("nd.bevel", icon='MOD_BEVEL') layout.operator("nd.weighted_normal_bevel", icon='MOD_BEVEL') + layout.separator() layout.operator("nd.array_cubed", icon='PARTICLES') + layout.operator("nd.circular_array", icon='DRIVER_ROTATIONAL_DIFFERENCE') layout.operator("nd.mirror", icon='MOD_MIRROR') + layout.separator() layout.operator("nd.screw_head", icon='CANCEL') layout.operator("nd.flare", text="Flare (Lighting)", icon='LIGHT_AREA')