Skip to content

Commit

Permalink
fixed send scene on join room
Browse files Browse the repository at this point in the history
  • Loading branch information
grosdax committed Dec 8, 2020
1 parent 52050bd commit c9663ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mixer/bl_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
is_client_connected,
connect,
join_room,
create_room,
leave_current_room,
disconnect,
network_consumer_timer,
Expand Down Expand Up @@ -94,7 +95,7 @@ def execute(self, context):
prefs = get_mixer_prefs()
room = prefs.room
logger.warning(f"CreateRoomOperator.execute({room})")
join_room(room, prefs.vrtist_protocol)
create_room(room, prefs.vrtist_protocol)

return {"FINISHED"}

Expand Down
6 changes: 5 additions & 1 deletion mixer/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ def set_client_attributes():
)


def create_room(room_name: str, vrtist_protocol: bool = False):
join_room(room_name, vrtist_protocol)
share_data.client.send_set_current_scene(bpy.context.scene.name_full)


def join_room(room_name: str, vrtist_protocol: bool = False):
prefs = get_mixer_prefs()
logger.warning(f"join: room: {room_name}, user: {prefs.user}")
Expand All @@ -63,7 +68,6 @@ def join_room(room_name: str, vrtist_protocol: bool = False):
share_data.client._joining_room_name = room_name
set_client_attributes()
share_data.client.join_room(room_name)
share_data.client.send_set_current_scene(bpy.context.scene.name_full)

share_data.set_vrtist_protocol(vrtist_protocol)
share_data.pending_test_update = False
Expand Down

0 comments on commit c9663ca

Please sign in to comment.