Reality Capture - GastonBC/adeskForgeWrapper GitHub Wiki
Guides for afw's Reality Capture (ReCap) module - afw.RealityCapture
First thing you have to do is get a token and create your photoscene
cli = afw.client.Client(forgeCliId, forgeCliSec, B360AccId, B360AccName)
token = afw.client.Token.get2LeggedToken("data:write", cli)
# Set up parameters with the Options class
ops = afw.RealityCapture.Options.PhotosceneCreationOptions("afwScene", "rcm", "object")
# Create the scene
scene = afw.RealityCapture.Photoscene.create(token, ops)
Upload photos
You need to provide a list of directories, here we choose the photos from tkinter file dialog
from tkinter import Tk
from tkinter import filedialog
root = Tk()
root.withdraw()
# Choose the files
files = filedialog.askopenfilenames(filetypes = (("jpeg files","*.jpg"),("all files","*.*")))
# Get the scene
sceneId = "SCENE_ID"
scene = afw.RealityCapture.Photoscene.psById(sceneId)
scene.uploadFiles(token, files)
After uploading, start processing
scene.startProcessing(token)
Get a process status update
scene.getProgress(token)
After it's finished, get the links to download
# Provide the same format you used to create the scene
scene.getDownloadURL(token, "rcm")
Maybe you want to cancel the progress
scene.cancelProgress(token)
Or maybe you want to delete the scene
scene.deleteScene(token)