Skip to content

Commit

Permalink
Feat: modify top bar show
Browse files Browse the repository at this point in the history
  • Loading branch information
xmx-emm committed Jan 3, 2024
1 parent 5d7d467 commit b0cfbd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/replace_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='')

Expand Down
4 changes: 4 additions & 0 deletions utils/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '仅雕刻模式', '仅在雕刻模式显示剪影图'),
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit b0cfbd9

Please sign in to comment.