From b0cfbd9cf92be67ef649c05de84110dd5fee8bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=90=8C=E6=96=B0?= <3209970865@qq.com> Date: Wed, 3 Jan 2024 18:04:46 +0800 Subject: [PATCH] Feat: modify top bar show --- ui/replace_ui.py | 8 ++++---- utils/preferences.py | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/replace_ui.py b/ui/replace_ui.py index 34947be..d1e8f3a 100644 --- a/ui/replace_ui.py +++ b/ui/replace_ui.py @@ -32,12 +32,12 @@ def append_top_editor_menus(self, context): if right and sculpt: sub_row = layout.row(align=True) - sub_row.alert = True + icon = 'EVENT_ESC' if pref.sculpt else 'SCULPTMODE_HLT' + text = "Bbrush" if pref.show_text else '' sub_row.prop(pref, 'sculpt', - emboss=False, - icon='EVENT_ESC' - if pref.sculpt else 'SCULPTMODE_HLT') + text=text, + icon=icon) if pref.sculpt: sub_row.prop(pref, 'always_use_sculpt_mode', emboss=True, icon='AUTO', text='') diff --git a/utils/preferences.py b/utils/preferences.py index 85568be..0480709 100644 --- a/utils/preferences.py +++ b/utils/preferences.py @@ -33,6 +33,9 @@ def sculpt_update(self, context): options={'SKIP_SAVE'}, update=sculpt_update) + show_text: BoolProperty(name='显示顶部文本', + default=False) + depth_display_items = ( ('ALWAYS_DISPLAY', '一直显示', '一直保持显示剪影图,即使不在雕刻模式'), ('ONLY_SCULPT', '仅雕刻模式', '仅在雕刻模式显示剪影图'), @@ -80,6 +83,7 @@ def sculpt_update(self, context): def draw(self, context): layout = self.layout + layout.prop(self, 'show_text') layout.prop(self, 'depth_display_mode') layout.prop(self, 'depth_ray_size') layout.prop(self, 'always_use_sculpt_mode')