feat: presence overlay button+UInfo in side panel

This commit is contained in:
Fabian 2021-08-19 18:04:07 +02:00
parent 99528ea3e0
commit de9255f71c
2 changed files with 20 additions and 3 deletions

View File

@ -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(

View File

@ -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")