diff --git a/multi_user/operators.py b/multi_user/operators.py index db60ca7..80ebc43 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -274,10 +274,10 @@ class SessionStartOperator(bpy.types.Operator): # Background client updates service deleyables.append(timers.ClientUpdate()) deleyables.append(timers.DynamicRightSelectTimer()) - deleyables.append(timers.PushTimer( - queue=stagging, - timeout=settings.depsgraph_update_rate - )) + # deleyables.append(timers.PushTimer( + # queue=stagging, + # timeout=settings.depsgraph_update_rate + # )) session_update = timers.SessionStatusUpdate() session_user_sync = timers.SessionUserSync() session_background_executor = timers.MainThreadExecutor( @@ -980,8 +980,18 @@ def depsgraph_evaluation(scene): not settings.sync_flags.sync_during_editmode: break - if node.uuid not in stagging: - stagging.append(node.uuid) + try: + if node.has_changed(): + session.commit(node.uuid) + session.push(node.uuid, check_data=False) + except ReferenceError: + logging.debug(f"Reference error {node.uuid}") + if not node.is_valid(): + session.remove(node.uuid) + except ContextError as e: + logging.debug(e) + except Exception as e: + logging.error(e) else: continue diff --git a/multi_user/timers.py b/multi_user/timers.py index ff17505..5867177 100644 --- a/multi_user/timers.py +++ b/multi_user/timers.py @@ -152,6 +152,7 @@ class PushTimer(Timer): logging.debug(e) except Exception as e: logging.error(e) + class DynamicRightSelectTimer(Timer): def __init__(self, timeout=.1): super().__init__(timeout)