diff --git a/multi_user/delayable.py b/multi_user/delayable.py index 199cbee..4f492d5 100644 --- a/multi_user/delayable.py +++ b/multi_user/delayable.py @@ -236,7 +236,7 @@ class ClientUpdate(Timer): local_user_metadata = local_user.get('metadata') current_view_corners = presence.get_view_corners() - + scene_current = bpy.context.scene.name if not local_user_metadata or 'color' not in local_user_metadata.keys(): metadata = { 'view_corners': current_view_corners, @@ -245,7 +245,8 @@ class ClientUpdate(Timer): settings.client_color.g, settings.client_color.b, 1), - 'frame_current':bpy.context.scene.frame_current + 'frame_current':bpy.context.scene.frame_current, + 'scene_current': scene_current } session.update_user_metadata(metadata) elif current_view_corners != local_user_metadata['view_corners']: @@ -253,6 +254,9 @@ class ClientUpdate(Timer): local_user_metadata['view_corners'] = current_view_corners local_user_metadata['view_matrix'] = presence.get_view_matrix() session.update_user_metadata(local_user_metadata) + elif scene_current != local_user_metadata['scene_current']: + local_user_metadata['scene_current'] = scene_current + session.update_user_metadata(local_user_metadata) # sync online users session_users = operators.client.online_users @@ -260,12 +264,9 @@ class ClientUpdate(Timer): for index, user in enumerate(ui_users): if user.username not in session_users.keys(): - ui_users.remove(index) - + ui_users.remove(index) renderer.flush_selection() renderer.flush_users() - - break for user in session_users: diff --git a/multi_user/ui.py b/multi_user/ui.py index 37931d9..d2d9db6 100644 --- a/multi_user/ui.py +++ b/multi_user/ui.py @@ -266,8 +266,10 @@ class SESSION_PT_user(bpy.types.Panel): # Create a simple row. row = layout.row() box = row.box() - split = box.split(factor=0.5) + split = box.split(factor=0.3) split.label(text="user") + split = split.split(factor=0.5) + split.label(text="localisation") split.label(text="frame") split.label(text="ping") @@ -297,6 +299,7 @@ class SESSION_UL_users(bpy.types.UIList): is_local_user = item.username == settings.username ping = '-' frame_current = '-' + scene_current = '-' if session: user = session.online_users.get(item.username) if user: @@ -304,12 +307,14 @@ class SESSION_UL_users(bpy.types.UIList): metadata = user.get('metadata') if metadata and 'frame_current' in metadata: frame_current = str(metadata['frame_current']) - - split = layout.split(factor=0.5) + scene_current = metadata['scene_current'] + split = layout.split(factor=0.3) split.label(text=item.username) + split = split.split(factor=0.5) + split.label(text=scene_current) split.label(text=frame_current) split.label(text=ping) - + class SESSION_PT_presence(bpy.types.Panel): bl_idname = "MULTIUSER_MODULE_PT_panel"