diff --git a/docs/getting_started/img/quickstart_cancel_save_session_data.png b/docs/getting_started/img/quickstart_cancel_save_session_data.png new file mode 100644 index 0000000..81e5793 Binary files /dev/null and b/docs/getting_started/img/quickstart_cancel_save_session_data.png differ diff --git a/docs/getting_started/img/quickstart_import_session_data.png b/docs/getting_started/img/quickstart_import_session_data.png new file mode 100644 index 0000000..83dadfd Binary files /dev/null and b/docs/getting_started/img/quickstart_import_session_data.png differ diff --git a/docs/getting_started/img/quickstart_save_session_data.png b/docs/getting_started/img/quickstart_save_session_data.png new file mode 100644 index 0000000..08841b1 Binary files /dev/null and b/docs/getting_started/img/quickstart_save_session_data.png differ diff --git a/docs/getting_started/img/quickstart_save_session_data_cancel.png b/docs/getting_started/img/quickstart_save_session_data_cancel.png new file mode 100644 index 0000000..81e5793 Binary files /dev/null and b/docs/getting_started/img/quickstart_save_session_data_cancel.png differ diff --git a/docs/getting_started/img/quickstart_save_session_data_dialog.png b/docs/getting_started/img/quickstart_save_session_data_dialog.png new file mode 100644 index 0000000..941fe80 Binary files /dev/null and b/docs/getting_started/img/quickstart_save_session_data_dialog.png differ diff --git a/docs/getting_started/quickstart.rst b/docs/getting_started/quickstart.rst index 4e25ac8..d81eff1 100644 --- a/docs/getting_started/quickstart.rst +++ b/docs/getting_started/quickstart.rst @@ -292,7 +292,7 @@ a connected user or be under :ref:`common-right<**COMMON**>` rights. The Repository panel (see image below) allows you to monitor, change datablock states and rights manually. -.. figure:: img/quickstart_properties.png +.. figure:: img/quickstart_save_session_data.png :align: center Repository panel @@ -319,6 +319,40 @@ Here is a quick list of available actions: | .. image:: img/quickstart_remove.png | **Delete** | Remove the data-block from network replication | +---------------------------------------+-------------------+------------------------------------------------------------------------------------+ +Save session data +----------------- + +.. danger:: + This is an experimental feature, until the stable release it is highly recommended to use regular .blend save. + +The save session data allows you to create a backup of the session data. + +When you hit the **save session data** button, the following popup dialog will appear. +It allows you to choose the destination folder and if you want to run an auto-save. + +.. figure:: img/quickstart_save_session_data_dialog.png + :align: center + + Save session data dialog. + +If you enabled the auto-save option, you can cancel it from the **Cancel auto-save** button. + +.. figure:: img/quickstart_save_session_data_cancel.png + :align: center + + Cancel session autosave. + + +To import session data backups, use the following **Multiuser session snapshot** import dialog + +.. figure:: img/quickstart_import_session_data.png + :align: center + + Import session data dialog. + +.. note:: + It is not yet possible to start a session directly from a backup. + .. _advanced: Advanced settings diff --git a/multi_user/operators.py b/multi_user/operators.py index 2fa102b..24942e2 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -761,6 +761,12 @@ class SessionSaveBackupOperator(bpy.types.Operator, ExportHelper): # ExportHelper mixin class uses this filename_ext = ".db" + filter_glob: bpy.props.StringProperty( + default="*.db", + options={'HIDDEN'}, + maxlen=255, # Max internal buffer length, longer would be clamped. + ) + enable_autosave: bpy.props.BoolProperty( name="Auto-save", description="Enable session auto-save", @@ -804,15 +810,21 @@ class SessionStopAutoSaveOperator(bpy.types.Operator): return {'FINISHED'} -class SessionLoadGraphOperator(bpy.types.Operator, ImportHelper): +class SessionLoadSaveOperator(bpy.types.Operator, ImportHelper): bl_idname = "session.load" - bl_label = "SessionLoadGraph" + bl_label = "Load session save" bl_description = "Load a Multi-user session save" bl_options = {'REGISTER', 'UNDO'} # ExportHelper mixin class uses this filename_ext = ".db" + filter_glob: bpy.props.StringProperty( + default="*.db", + options={'HIDDEN'}, + maxlen=255, # Max internal buffer length, longer would be clamped. + ) + def execute(self, context): from replication.graph import ReplicationGraph @@ -882,7 +894,7 @@ class SessionLoadGraphOperator(bpy.types.Operator, ImportHelper): return True def menu_func_import(self, context): - self.layout.operator(SessionLoadGraphOperator.bl_idname, text='Multi-user session snapshot (.db)') + self.layout.operator(SessionLoadSaveOperator.bl_idname, text='Multi-user session snapshot (.db)') classes = ( @@ -900,7 +912,7 @@ classes = ( SessionClearCache, SessionNotifyOperator, SessionSaveBackupOperator, - SessionLoadGraphOperator, + SessionLoadSaveOperator, SessionStopAutoSaveOperator, )