feat: show basic service states in ui
This commit is contained in:
@ -118,8 +118,8 @@ class SessionProps(bpy.types.PropertyGroup):
|
||||
description='Distant host port',
|
||||
default=5555
|
||||
)
|
||||
ttl_port: bpy.props.IntProperty(
|
||||
name="ttl_port",
|
||||
ipc_port: bpy.props.IntProperty(
|
||||
name="ipc_port",
|
||||
description='internal ttl port(only usefull for multiple local instances)',
|
||||
default=5561
|
||||
)
|
||||
|
Submodule multi_user/libs/replication updated: 6accb222a3...9e00109933
@ -101,7 +101,7 @@ class SessionStartOperator(bpy.types.Operator):
|
||||
id=settings.username,
|
||||
address=settings.ip,
|
||||
port=settings.port,
|
||||
ttl_port=settings.ttl_port)
|
||||
ipc_port=settings.ipc_port)
|
||||
except Exception as e:
|
||||
self.report({'ERROR'}, repr(e))
|
||||
logger.error(f"Error: {e}")
|
||||
@ -117,7 +117,7 @@ class SessionStartOperator(bpy.types.Operator):
|
||||
id=settings.username,
|
||||
address=settings.ip,
|
||||
port=settings.port,
|
||||
ipc_port=settings.ttl_port
|
||||
ipc_port=settings.ipc_port
|
||||
)
|
||||
except Exception as e:
|
||||
self.report({'ERROR'}, repr(e))
|
||||
|
@ -121,30 +121,24 @@ class SESSION_PT_settings_network(bpy.types.Panel):
|
||||
row.prop(settings, "session_mode", expand=True)
|
||||
row = layout.row()
|
||||
|
||||
box = row.box()
|
||||
|
||||
row = box.row()
|
||||
row.prop(settings, "ip", text="IP")
|
||||
row = box.row()
|
||||
row.label(text="Port:")
|
||||
row.prop(settings, "port", text="")
|
||||
row = box.row()
|
||||
row.label(text="IPC Port:")
|
||||
row.prop(settings, "ipc_port", text="")
|
||||
|
||||
if settings.session_mode == 'HOST':
|
||||
box = row.box()
|
||||
row = box.row()
|
||||
row.label(text="Start empty:")
|
||||
row.prop(settings, "start_empty", text="")
|
||||
row = box.row()
|
||||
row.label(text="Port:")
|
||||
row.prop(settings, "port", text="")
|
||||
row = box.row()
|
||||
row.label(text="IPC Port:")
|
||||
row.prop(settings, "ttl_port", text="")
|
||||
row = box.row()
|
||||
row.operator("session.start", text="HOST").host = True
|
||||
else:
|
||||
box = row.box()
|
||||
row = box.row()
|
||||
row.prop(settings, "ip", text="IP")
|
||||
row = box.row()
|
||||
row.label(text="Port:")
|
||||
row.prop(settings, "port", text="")
|
||||
row = box.row()
|
||||
row.label(text="IPC Port:")
|
||||
row.prop(settings, "ttl_port", text="")
|
||||
|
||||
row = box.row()
|
||||
row.operator("session.start", text="CONNECT").host = False
|
||||
|
||||
@ -334,13 +328,12 @@ class SESSION_PT_services(bpy.types.Panel):
|
||||
settings = context.window_manager.session
|
||||
active_user = online_users[selected_user] if len(online_users)-1>=selected_user else 0
|
||||
|
||||
|
||||
# Create a simple row.
|
||||
row = layout.row()
|
||||
for name, state in operators.client.services_state.items():
|
||||
row = layout.row()
|
||||
row.label(text=name)
|
||||
row.label(text=get_state_str(state))
|
||||
row = layout.row()
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user