fix: RNA removed error by disabling the push timer

This commit is contained in:
Swann 2021-01-13 15:49:07 +01:00
parent 52ebb874b0
commit 89a8891073
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB
2 changed files with 17 additions and 6 deletions

View File

@ -274,10 +274,10 @@ class SessionStartOperator(bpy.types.Operator):
# Background client updates service # Background client updates service
deleyables.append(timers.ClientUpdate()) deleyables.append(timers.ClientUpdate())
deleyables.append(timers.DynamicRightSelectTimer()) deleyables.append(timers.DynamicRightSelectTimer())
deleyables.append(timers.PushTimer( # deleyables.append(timers.PushTimer(
queue=stagging, # queue=stagging,
timeout=settings.depsgraph_update_rate # timeout=settings.depsgraph_update_rate
)) # ))
session_update = timers.SessionStatusUpdate() session_update = timers.SessionStatusUpdate()
session_user_sync = timers.SessionUserSync() session_user_sync = timers.SessionUserSync()
session_background_executor = timers.MainThreadExecutor( session_background_executor = timers.MainThreadExecutor(
@ -980,8 +980,18 @@ def depsgraph_evaluation(scene):
not settings.sync_flags.sync_during_editmode: not settings.sync_flags.sync_during_editmode:
break break
if node.uuid not in stagging: try:
stagging.append(node.uuid) 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: else:
continue continue

View File

@ -152,6 +152,7 @@ class PushTimer(Timer):
logging.debug(e) logging.debug(e)
except Exception as e: except Exception as e:
logging.error(e) logging.error(e)
class DynamicRightSelectTimer(Timer): class DynamicRightSelectTimer(Timer):
def __init__(self, timeout=.1): def __init__(self, timeout=.1):
super().__init__(timeout) super().__init__(timeout)