From de9255f71c774f7d395976c1ae713662d426c396 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 19 Aug 2021 18:04:07 +0200 Subject: [PATCH] feat: presence overlay button+UInfo in side panel --- multi_user/preferences.py | 6 +++--- multi_user/ui.py | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/multi_user/preferences.py b/multi_user/preferences.py index 4eb1b85..b9c3c99 100644 --- a/multi_user/preferences.py +++ b/multi_user/preferences.py @@ -374,9 +374,9 @@ class SessionPrefs(bpy.types.AddonPreferences): description="sidebar_advanced_log_expanded", default=False ) - sidebar_advanced_hosting_expanded: bpy.props.BoolProperty( - name="sidebar_advanced_hosting_expanded", - description="sidebar_advanced_hosting_expanded", + sidebar_advanced_uinfo_expanded: bpy.props.BoolProperty( + name="sidebar_advanced_uinfo_expanded", + description="sidebar_advanced_uinfo_expanded", default=False ) sidebar_advanced_net_expanded: bpy.props.BoolProperty( diff --git a/multi_user/ui.py b/multi_user/ui.py index 69c18cf..46f6f38 100644 --- a/multi_user/ui.py +++ b/multi_user/ui.py @@ -267,6 +267,20 @@ class SESSION_PT_advanced_settings(bpy.types.Panel): layout = self.layout settings = get_preferences() + #ADVANCED USER INFO + uinfo_section = layout.row().box() + uinfo_section.prop( + settings, + "sidebar_advanced_uinfo_expanded", + text="User Info", + icon=get_expanded_icon(settings.sidebar_advanced_uinfo_expanded), + emboss=False) + if settings.sidebar_advanced_uinfo_expanded: + uinfo_section_row = uinfo_section.row() + uinfo_section_split = uinfo_section_row.split(factor=0.7, align=True) + uinfo_section_split.prop(settings, "username", text="") + uinfo_section_split.prop(settings, "client_color", text="") + #ADVANCED NET net_section = layout.row().box() net_section.prop( @@ -633,6 +647,9 @@ class VIEW3D_PT_overlay_session(bpy.types.Panel): pref = get_preferences() layout.active = settings.enable_presence + row = layout.row() + row.prop(settings, "enable_presence",text="Presence Overlay") + row = layout.row() row.prop(settings, "presence_show_selected",text="Selected Objects")