Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 060b7507b6 |
@@ -79,6 +79,8 @@ def on_scene_update(scene):
|
||||
logging.debug(f"Ignoring distant update of {dependency_updates[0].id.name}")
|
||||
return
|
||||
|
||||
update_external_dependencies()
|
||||
|
||||
# NOTE: maybe we don't need to check each update but only the first
|
||||
for update in reversed(dependency_updates):
|
||||
update_uuid = getattr(update.id, 'uuid', None)
|
||||
@@ -107,11 +109,6 @@ def on_scene_update(scene):
|
||||
porcelain.commit(session.repository, scn_uuid)
|
||||
porcelain.push(session.repository, 'origin', scn_uuid)
|
||||
|
||||
scene_graph_changed = [u for u in reversed(dependency_updates) if getattr(u.id, 'uuid', None) and isinstance(u.id,(bpy.types.Scene,bpy.types.Collection))]
|
||||
if scene_graph_changed:
|
||||
porcelain.purge_orphan_nodes(session.repository)
|
||||
|
||||
update_external_dependencies()
|
||||
|
||||
@persistent
|
||||
def resolve_deps_graph(dummy):
|
||||
|
||||
Submodule multi_user/libs/replication updated: 15dc5c62c0...aafbfe9716
@@ -689,6 +689,7 @@ class SessionPurgeOperator(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
try:
|
||||
sanitize_deps_graph(remove_nodes=True)
|
||||
porcelain.purge_orphan_nodes(session.repository)
|
||||
except Exception as e:
|
||||
self.report({'ERROR'}, repr(e))
|
||||
@@ -783,6 +784,22 @@ class SessionStopAutoSaveOperator(bpy.types.Operator):
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
class SessionGetInfo(bpy.types.Operator):
|
||||
bl_idname = "session.get_info"
|
||||
bl_label = "Get session info"
|
||||
bl_description = "Get session info"
|
||||
|
||||
target_server: bpy.props.StringProperty(default="127.0.0.1:5555")
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (session.state != STATE_ACTIVE)
|
||||
|
||||
def execute(self, context):
|
||||
infos = porcelain.request_session_info(self.target_server, timeout=100)
|
||||
logging.info(f"Session info: {infos}")
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper):
|
||||
bl_idname = "session.load"
|
||||
@@ -921,6 +938,7 @@ classes = (
|
||||
SessionPurgeOperator,
|
||||
SessionPresetServerAdd,
|
||||
SessionPresetServerRemove,
|
||||
SessionGetInfo,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user