-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy paththingy.py
More file actions
53 lines (39 loc) · 1.43 KB
/
thingy.py
File metadata and controls
53 lines (39 loc) · 1.43 KB
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
43
44
45
46
47
48
49
50
51
52
53
'''
import os, sys, signal, json, requests
base_url = "http://localhost:8011"
player = "/World/audio2face/Player"
fullface_core = "/World/audio2face/CoreFullface"
# Check Status
status = requests.get(base_url + "/status").json()
if status != "OK":
print("ERROR: " + status)
return False
# Request .usd
data = { "file_name": "Path/to/file.usd" }
response = (requests.get(base_url + "A2F/USD/Load", json=data)).json()
# Set root track path
data = { "a2f_player": player, "dir_path": os.path.join(base_dir, root_path) }
response = (requests.post(base_url + "/A2F/Player/SetRootPath", json=data)).json()
# Set track to the last track available
data = { "a2f_player": player }
response = (requests.post(base_url + "/A2F/Player/GetTracks", json=data)).json()
last_track = response["result"][-1]
data = { "a2f_player": player, "file_name": last_track }
response = (requests.post(base_url + "/A2F/Player/SetTrack", json=data)).json()
# Generate Emotion keys
data = { "a2f_instance" }
response = (requests.post(base_url + "/A2F/Player/GenerateKeys", json=data)).json()
# Export data to cache
Data = {
"meshes": ["/World/male_fullface/char_male_model_hi/c_headWatertight_hi"]
"export_directory": os.path.join(base_dir, out_path),
"file_name": out_prefix,
"cache_type" "usd",
"xform_keys": False,
"batch": False,
"fps": 20
}
response = (
requests.post(base_url+"/A2F/Exporter/ExportGeometryCache", json=Data)
).json()
'''