feat: request (with bug)
This commit is contained in:
Submodule multi_user/libs/replication updated: ff88725991...b8bb7d221e
@ -877,7 +877,6 @@ class SessionStopAutoSaveOperator(bpy.types.Operator):
|
|||||||
|
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper):
|
class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper):
|
||||||
bl_idname = "session.load"
|
bl_idname = "session.load"
|
||||||
bl_label = "Load session save"
|
bl_label = "Load session save"
|
||||||
@ -1091,6 +1090,22 @@ class SessionPresetServerRemove(bpy.types.Operator):
|
|||||||
|
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
class SessionGetInfo(bpy.types.Operator):
|
||||||
|
bl_idname = "session.get_info"
|
||||||
|
bl_label = "Get session info"
|
||||||
|
bl_description = "Get session info"
|
||||||
|
|
||||||
|
target_server: bpy.props.StringProperty(default="127.0.0.1:5555")
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
return (session.state != STATE_ACTIVE)
|
||||||
|
|
||||||
|
def execute(self, context):
|
||||||
|
infos = porcelain.request_session_info(self.target_server, timeout=100)
|
||||||
|
logging.info(f"Session info: {infos}")
|
||||||
|
|
||||||
|
return {'FINISHED'}
|
||||||
|
|
||||||
class GetDoc(bpy.types.Operator):
|
class GetDoc(bpy.types.Operator):
|
||||||
"""Get the documentation of the addon"""
|
"""Get the documentation of the addon"""
|
||||||
@ -1152,6 +1167,7 @@ classes = (
|
|||||||
SessionPresetServerAdd,
|
SessionPresetServerAdd,
|
||||||
SessionPresetServerEdit,
|
SessionPresetServerEdit,
|
||||||
SessionPresetServerRemove,
|
SessionPresetServerRemove,
|
||||||
|
SessionGetInfo,
|
||||||
GetDoc,
|
GetDoc,
|
||||||
FirstLaunch,
|
FirstLaunch,
|
||||||
)
|
)
|
||||||
|
@ -143,7 +143,7 @@ class SESSION_PT_settings(bpy.types.Panel):
|
|||||||
split.label(text="Online")
|
split.label(text="Online")
|
||||||
|
|
||||||
col = row.column(align=True)
|
col = row.column(align=True)
|
||||||
col.operator("session.preset_server_add", icon="FILE_REFRESH", text="") # TODO : Replace add by refresh operator
|
col.operator("session.get_info", icon="FILE_REFRESH", text="") # TODO : Replace add by refresh operator
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
col = row.column(align=True)
|
col = row.column(align=True)
|
||||||
@ -156,7 +156,7 @@ class SESSION_PT_settings(bpy.types.Panel):
|
|||||||
connectopcol.operator("session.connect", text="Connect")
|
connectopcol.operator("session.connect", text="Connect")
|
||||||
|
|
||||||
col = row.column(align=True)
|
col = row.column(align=True)
|
||||||
col.operator("session.preset_server_add", icon="ADD", text="") # TODO : Replace add by refresh operator
|
col.operator("session.preset_server_add", icon="ADD", text="")
|
||||||
row_visible = col.row(align=True)
|
row_visible = col.row(align=True)
|
||||||
col_visible = row_visible.column(align=True)
|
col_visible = row_visible.column(align=True)
|
||||||
col_visible.enabled = is_server_selected
|
col_visible.enabled = is_server_selected
|
||||||
@ -669,6 +669,8 @@ class SESSION_UL_network(bpy.types.UIList):
|
|||||||
# Session status
|
# Session status
|
||||||
# TODO : if session online : vert else rouge
|
# TODO : if session online : vert else rouge
|
||||||
# TODO : ping
|
# TODO : ping
|
||||||
|
|
||||||
|
|
||||||
from multi_user import icons
|
from multi_user import icons
|
||||||
server_status = icons.icons_col["server_offline"]
|
server_status = icons.icons_col["server_offline"]
|
||||||
split.label(icon_value=server_status.icon_id)
|
split.label(icon_value=server_status.icon_id)
|
||||||
|
Reference in New Issue
Block a user