feat: stash on deps graph update
This commit is contained in:
Submodule multi_user/libs/replication updated: 19d018e31b...343c9d527c
@ -493,19 +493,21 @@ def depsgraph_evaluation(scene):
|
|||||||
# - if its ours or ( under common and diff), launch the
|
# - if its ours or ( under common and diff), launch the
|
||||||
# update process
|
# update process
|
||||||
# - if its to someone else, ignore the update (go deeper ?)
|
# - if its to someone else, ignore the update (go deeper ?)
|
||||||
if node.owner == session_infos.username:
|
if node.owner in [session_infos.username]:
|
||||||
# Avoid slow geometry update
|
# Avoid slow geometry update
|
||||||
if 'EDIT' in context.mode:
|
if 'EDIT' in context.mode:
|
||||||
break
|
break
|
||||||
logger.error("UPDATE: MODIFIFY {}".format(type(update.id)))
|
client.stash(node.uuid)
|
||||||
# client.commit(node.uuid)
|
# TODO: Do this from replication api...Maybe as a task !
|
||||||
# client.push(node.uuid)
|
if node.owner == 'COMMON':
|
||||||
|
if node.diff():
|
||||||
|
client.stash(node.uuid)
|
||||||
else:
|
else:
|
||||||
# Distant update
|
# Distant update
|
||||||
continue
|
continue
|
||||||
# else:
|
# else:
|
||||||
# # New items !
|
# # New items !
|
||||||
# logger.error("UPDATE: ADD")C.obj
|
# logger.error("UPDATE: ADD")
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
@ -520,7 +522,7 @@ def register():
|
|||||||
|
|
||||||
bpy.app.handlers.frame_change_pre.append(update_client_frame)
|
bpy.app.handlers.frame_change_pre.append(update_client_frame)
|
||||||
|
|
||||||
# bpy.app.handlers.depsgraph_update_post.append(depsgraph_evaluation)
|
bpy.app.handlers.depsgraph_update_post.append(depsgraph_evaluation)
|
||||||
|
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
@ -541,7 +543,7 @@ def unregister():
|
|||||||
|
|
||||||
bpy.app.handlers.frame_change_pre.remove(update_client_frame)
|
bpy.app.handlers.frame_change_pre.remove(update_client_frame)
|
||||||
|
|
||||||
# bpy.app.handlers.depsgraph_update_post.remove(depsgraph_evaluation)
|
bpy.app.handlers.depsgraph_update_post.remove(depsgraph_evaluation)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Reference in New Issue
Block a user