Open tdidonna opened 1 year ago
Update on this issue: I created a close replica to your Figma sample scene as a test, and that does import to UE 100% correctly. I believe the problem is your plug in is having difficulty handling more than a couple levels deep of parent/child hierarchy. Thanks!
Hi, it looks like it's failing when it tries to download an image with an id that can't be found in the main map of rendered images:
This part of the code:
def downloadImage(self): FileResponse=requests.get("https://api.figma.com/v1/images/" + self.Document.FileID + "?ids=" + self.id, headers={"X-Figma-Token": self.Document.AccessToken})
File = json.loads(FileResponse.text)
ImageURL = File["images"][self.id]
ImageData = requests.get(ImageURL).content
This code gets a map of all the rendered image urls in the Figma file using the Figma API: https://www.figma.com/developers/api#get-images-endpoint
It then uses the id of the current node to download the associated image. It might be worth playing around with the endpoint above with your particular file and any potential problem components to see where the problem lies.
Hello Phil,
Really excited about your plugin! I've gotten your Aug '22 release partially functional with UE5.0.3 / Python 3.6 / Requests-2.31 but am getting some significant blockers, despite increasingly simplifying my Figma project.
I'm attaching a UE5 error log, if you have any ideas/suggestions about gaining functionality on any of these fronts, I'd be quite excited about using even a simple but functional version. I'll keep experimenting with further simplification of my Figma doc as well.
ImportFigmaErrorLogs.log