23 lines
638 B
Python
23 lines
638 B
Python
import bpy
|
|
import ptsl
|
|
from ptsl import PTSL_pb2 as pt
|
|
|
|
def send_to_pro_tools(speakers: list[bpy.types.Object],
|
|
room_size: float) -> bool:
|
|
try:
|
|
client = ptsl.Client(company_name="Squad 51",
|
|
application_name="Send to Pro Tools Blender Extension")
|
|
|
|
for speaker in speakers:
|
|
assert speaker.data
|
|
result = client.run_command(pt.CId_CreateNewTracks, {
|
|
{'number_of_tracks': 1,
|
|
'track_name': speaker.data.name}
|
|
})
|
|
|
|
client.close()
|
|
return True
|
|
|
|
except:
|
|
return False
|