forked from ubisoft/mixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixer_lib.py
42 lines (23 loc) · 836 Bytes
/
mixer_lib.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
Functions to be remotely executed in Blender via python_server.py
Remote execution relies on source code extractiona and transmission to the
execution sever, so each function must contain its imports
"""
def connect():
import bpy
bpy.ops.mixer.connect()
def disconnect():
import bpy
bpy.ops.mixer.disconnect()
def create_room():
import bpy
bpy.ops.mixer.create_room()
def set_log_level(log_level):
from mixer.bl_preferences import set_log_level
set_log_level(None, log_level)
def join_room(room_name: str = "mixer_unittest"):
from mixer.connection import join_room
join_room(room_name)
def keep_room_open(room_name: str = "mixer_unittest", keep_open: bool = False):
from mixer.share_data import share_data
share_data.client.set_room_keep_open(room_name, keep_open)