diff --git a/docs/getting_started/img/quickstart_advanced.png b/docs/getting_started/img/quickstart_advanced.png index 3cb0ad8..2416b2d 100644 Binary files a/docs/getting_started/img/quickstart_advanced.png and b/docs/getting_started/img/quickstart_advanced.png differ diff --git a/docs/getting_started/img/quickstart_presence.png b/docs/getting_started/img/quickstart_presence.png new file mode 100644 index 0000000..eca6b87 Binary files /dev/null and b/docs/getting_started/img/quickstart_presence.png differ diff --git a/docs/getting_started/img/quickstart_users.png b/docs/getting_started/img/quickstart_users.png index 473130c..0839e40 100644 Binary files a/docs/getting_started/img/quickstart_users.png and b/docs/getting_started/img/quickstart_users.png differ diff --git a/docs/getting_started/quickstart.rst b/docs/getting_started/quickstart.rst index b7295bc..319960f 100644 --- a/docs/getting_started/quickstart.rst +++ b/docs/getting_started/quickstart.rst @@ -46,6 +46,8 @@ If 5555 is given in host settings, it will use 5555, 5556 (5555+1), 5557 (5555+2 .. image:: img/quickstart_advanced.png +**Synchronise render settings** (only host) enable replication of EEVEE and CYCLES render settings to match render between clients. + **Right strategy** (only host) enable you to choose between a strict and a relaxed pattern: - **Strict**: Host is the king, by default the host own each properties, only him can grant modification rights. @@ -76,6 +78,19 @@ By selecting a user in the list you'll have access to different **actions**: - The **camera button** allow you to snap on the user viewpoint. - The **time button** allow you to snap on the user time. +- The **cross button** [**host only**] allow the admin to kick users + +------------------- +Presence show flags +------------------- + +.. image:: img/quickstart_presence.png + +This pannel allow you to tweak users overlay in the viewport: + +- **Show selected objects**: display other users current selection +- **Show users**: display users current viewpoint +- **Show different scenes**: display users on other scenes --------------------- Replicated properties diff --git a/multi_user/__init__.py b/multi_user/__init__.py index 1015e79..e328298 100644 --- a/multi_user/__init__.py +++ b/multi_user/__init__.py @@ -41,7 +41,6 @@ import bpy from bpy.app.handlers import persistent from . import environment, utils -from .libs.replication.replication.constants import RP_COMMON # TODO: remove dependency as soon as replication will be installed as a module diff --git a/multi_user/libs/replication b/multi_user/libs/replication index 83caa04..d3601d5 160000 --- a/multi_user/libs/replication +++ b/multi_user/libs/replication @@ -1 +1 @@ -Subproject commit 83caa04e71ca7ded8ba44fb12cf8042e61308d7a +Subproject commit d3601d508235b32a268371f062a5ccb6f03c8406 diff --git a/multi_user/operators.py b/multi_user/operators.py index 1d302c1..4c7560c 100644 --- a/multi_user/operators.py +++ b/multi_user/operators.py @@ -199,6 +199,36 @@ class SessionStopOperator(bpy.types.Operator): return {"FINISHED"} +class SessionKickOperator(bpy.types.Operator): + bl_idname = "session.kick" + bl_label = "Kick" + bl_description = "Kick the user" + bl_options = {"REGISTER"} + + user: bpy.props.StringProperty() + + @classmethod + def poll(cls, context): + return True + + def execute(self, context): + global client, delayables, stop_modal_executor + assert(client) + + try: + client.kick(self.user) + except Exception as e: + self.report({'ERROR'}, repr(e)) + + return {"FINISHED"} + + def invoke(self, context, event): + return context.window_manager.invoke_props_dialog(self) + + + def draw(self, context): + row = self.layout + row.label(text=f" Do you really want to kick {self.user} ? " ) class SessionPropertyRemoveOperator(bpy.types.Operator): bl_idname = "session.remove_prop" @@ -464,6 +494,7 @@ classes = ( SessionApply, SessionCommit, ApplyArmatureOperator, + SessionKickOperator, ) diff --git a/multi_user/preferences.py b/multi_user/preferences.py index f86bdcb..414c2ef 100644 --- a/multi_user/preferences.py +++ b/multi_user/preferences.py @@ -21,6 +21,7 @@ import bpy import string from . import utils, bl_types, environment, addon_updater_ops, presence +from .libs.replication.replication.constants import RP_COMMON logger = logging.getLogger(__name__) diff --git a/multi_user/ui.py b/multi_user/ui.py index d23f244..1c13367 100644 --- a/multi_user/ui.py +++ b/multi_user/ui.py @@ -286,7 +286,7 @@ class SESSION_PT_user(bpy.types.Panel): selected_user = context.window_manager.user_index settings = utils.get_preferences() active_user = online_users[selected_user] if len(online_users)-1>=selected_user else 0 - + runtime_settings = context.window_manager.session # Create a simple row. row = layout.row() @@ -316,6 +316,12 @@ class SESSION_PT_user(bpy.types.Panel): text="", icon='TIME').target_client = active_user.username + if runtime_settings.session_mode == 'HOST': + user_operations.operator( + "session.kick", + text="", + icon='CANCEL').user = active_user.username + class SESSION_UL_users(bpy.types.UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index, flt_flag):