Bridge is actively listening to a local TCP port when it’s running. By default, this port is set to 28241. You can modify this port by clicking Bridge → Edit → Settings menu inside the app at any time.
.
We have developed an API to fetch information from Bridge using this port. The following is an initial list of endpoints any software will be able to retrieve information from.
- Get Megascans repository path
- Get downloaded assets
- Get latest 10
- Search downloaded assets
- Get Custom assets
- Get selected assets
We shall continue to improve and expand this API with more functionality.
Bridge runs a web server that any application can connect to. Querying one of the above listed endpoints results in a JSON response.
The JSON response format is the same as the one used for Export JSON format explained above.
The calls to each of the functions above can be made in the following format:
Default port : 28241
Example: (Maya)
import urllib2
response = urllib2.urlopen('http://localhost:28241/GetSelectedAssets/')
print response.read()
API CALLS
Get Megascans repository path
This returns the Megascans repository path as set inside Bridge in the following format.
http://localhost:28241/GetMegascansFolder/
RESPONSE : {"folder":"/...folder path/"}
Get downloaded assets
Using this you can get the downloaded assets from Bridge. If you apply a search term, Bridge will filter the assets by that search and return the result. If no search term is sent, then the latest 10 downloaded assets will be returned.
To get recent 10 downloaded assets:
http://localhost:28241/GetDownloadedAssets/
To search in downloaded assets:
http://localhost:28241/GetDownloadedAssets/[search term]
For example:
http://localhost:28241/GetDownloadedAssets/rock
RESPONSE : [...assets]
Get Custom assets
This returns all the custom assets created in Mixer.
http://localhost:28241/GetCustomAssets/
RESPONSE : [...assets]
Get selected assets
This returns the currently selected assets.
http://localhost:28241/GetSelectedAssets/
RESPONSE : [...assets]
Deprecated calls from previous version
/GetAllAssets/ |
|
/Search/ |
Use GetDownloadedAssets with a search term |
/GetSelectedAsset/ |
Removed calls from previous version
/RegisterSendTo/
/GetZipFolderPaths/
Comments
0 comments
Article is closed for comments.