Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.
emlo40 edited this page Aug 23, 2021 · 12 revisions

Welcome to the VsPyYt wiki!

quick msg never remove or change websocket in the functions

get current models information

getmd(websocket)
you can use the code below to get specific data about the model
data the function handels page

model1 = await getmd(websocket)
model1id = model1["data"]["modelID"]#note this can also be used in the other fuctions  
print(model1id)

get statistics of vtube studio

getstat(websocket)
you can use get stat to get statistics about your vtube studio session, example uptime(how long the program has been running)
data the function handels page

stat = await getstat(websocket)
statistic = stat["data"]["uptime"]
print(statistic)

Get api state

getapi(websocket) will give you relevent information about the api data the function handles page

print(await getapi(websocket))

get vtube studio directory's

getvtsfolder(websocket)
if you use this the console will print out all information about thhe vtube studio directory you can also do the code below to get specific data
data the function handles page

stat = await getvtsfolder(websocket)
bg = stat["data"]["backgrounds"]
items = stat["data"]["items"]
models = stat["data"]["models"]
print(bg)
print(items)
print(models)

list models

listvtsmodel(websocket)
if you use this the console will print out data about all models loaded in vtube studio you can also do the code below to get specific data
data the function handels page

md = await listvtsmodel(websocket)
num = md['data']['numberOfModels']
for i in range(num):
    print(md['data']['availableModels'][i]['modelName'])
    print(md["data"]["availableModels"][i]["modelID"])

change current model

mdch(websocket,modelid) this function loads a new model when called note you need to get a id first using getmd or listvtsmodel
how to use

await mdch(websocket,"a5a3mjka3ja3jj3jjj3")

list and get data of all art meshes in model

listArtM(websocket,modeldid)
if you use this the console will print out data about all artmeshes in a loaded model you can also do the code below to get specific data
data the function handels page

md = await listArtM(websocket,"modeldid")
meshnamenumber = md["data"]["numberOfArtMeshNames"]
meshtagnumber = md["data"]["numberOfArtMeshTags"]
artMeshNames = md["data"]["artMeshNames"]
artMeshTags = md["data"]["artMeshTags"]
print(meshnamenumber)
print(meshtagnumber)
print(artMeshNames)
print(artMeshTags)

move model

mdmv(websocket,time,revelance,xp,yp,rot,size)
this function moves the currently loaded model
data the function handles page

await mdmv(websocket,0.2,False,0.1,0.1,300,-22.5)

change model color

TintArtM(websocket,r,g,b,a,tintall,num,exactarray,conarray,tagexactarray,tagconarray)
tintall is a bool that checks is you want to color all art meshes, if True all settings that aren't rgb and alpha can be left as "", if False you need to define those slots using mesh information you get from listArtM
data the function handles page

await TintArtM(websocket,255,150,0,255,True,"","","","","")

Clone this wiki locally