From 4c774d5d5392083b4bf21cdc10ac08e9fc66014f Mon Sep 17 00:00:00 2001 From: Swann Date: Wed, 2 Jun 2021 12:59:53 +0200 Subject: [PATCH] refactor: move update user metadata to porcelain --- multi_user/__init__.py | 2 +- multi_user/libs/replication | 2 +- multi_user/operators.py | 2 +- multi_user/timers.py | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/multi_user/__init__.py b/multi_user/__init__.py index e9c7d2a..64ed972 100644 --- a/multi_user/__init__.py +++ b/multi_user/__init__.py @@ -19,7 +19,7 @@ bl_info = { "name": "Multi-User", "author": "Swann Martinez", - "version": (0, 4, 0), + "version": (0, 5, 0), "description": "Enable real-time collaborative workflow inside blender", "blender": (2, 82, 0), "location": "3D View > Sidebar > Multi-User tab", diff --git a/multi_user/libs/replication b/multi_user/libs/replication index b3123e5..c0db624 160000 --- a/multi_user/libs/replication +++ b/multi_user/libs/replication @@ -1 +1 @@ -Subproject commit b3123e51429c2db1fff710dd06aefdff4ee6abd1 +Subproject commit c0db6246f3d49187cc4c673ffd48d692041b4828 diff --git a/multi_user/operators.py b/multi_user/operators.py index b57536d..4e74151 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -937,7 +937,7 @@ def load_pre_handler(dummy): @persistent def update_client_frame(scene): if session and session.state == STATE_ACTIVE: - session.update_user_metadata({ + porcelain.update_user_metadata(session.repository, { 'frame_current': scene.frame_current }) diff --git a/multi_user/timers.py b/multi_user/timers.py index 9547936..3235f3e 100644 --- a/multi_user/timers.py +++ b/multi_user/timers.py @@ -230,7 +230,7 @@ class DynamicRightSelectTimer(Timer): 'selected_objects': current_selection } - session.update_user_metadata(user_metadata) + porcelain.update_user_metadata(session.repository, user_metadata) logging.debug("Update selection") # Fix deselection until right managment refactoring (with Roles concepts) @@ -305,18 +305,18 @@ class ClientUpdate(Timer): 'frame_current': bpy.context.scene.frame_current, 'scene_current': scene_current } - session.update_user_metadata(metadata) + porcelain.update_user_metadata(session.repository, metadata) # Update client representation # Update client current scene elif scene_current != local_user_metadata['scene_current']: local_user_metadata['scene_current'] = scene_current - session.update_user_metadata(local_user_metadata) + porcelain.update_user_metadata(session.repository, local_user_metadata) elif 'view_corners' in local_user_metadata and current_view_corners != local_user_metadata['view_corners']: local_user_metadata['view_corners'] = current_view_corners local_user_metadata['view_matrix'] = get_view_matrix( ) - session.update_user_metadata(local_user_metadata) + porcelain.update_user_metadata(session.repository, local_user_metadata) class SessionStatusUpdate(Timer):