Persisting canvas links to image assets

#1

An image asset uploaded to canvas loses its link to canvas after project is cleaned or moved (not sure which of the two caused it. Causes error: “could not open filename.jpg” after which the project does not run. Trying to fix the problem by editing the canvas does not work, it just throws an error. I think it’s better to 1) To still be able to accesss the canvas in such a situation to fix assets with broken links, 2) Assets linked to the canvas should persist once you click save in the canvas editor such that moving the project folder or cleaning the project would not break the link.

After poking around a bit, I noticed that the ‘Bundled’ folder in the project folder, which contained a folder holding the canvases in use, did not contain the image asset in question, but contained a sound file set up following these steps: https://devga.me/tutorials/armory3d/sound-and-music/ where apart from placing the sound asset in the bundled folder, it was also linked Outliner>DataBlocks (Data Api in Blender 2.8) and made a fake user. Wondered if this was the preferred process for linking media generally when working with the UI, but for that to work, there would have to be a way to connect the stored image in blender, to the canvas rather than navigating to it’s folder location as if attaching afresh.

Copying the image file from it’s location to the ‘bundled’ folder, finding the json file for the canvas and editing the file location, gives a temporary fix, but that fails once you clean the project again, and just doesn’t work anymore afterwards. I don’t know if this is a bug or just something wired wrongly.

0 Likes

#2

do you store the assets that you upload to your game engine in the same directory in which the blend file is located and all other data, so you would move them altogether when you are moving the project?

Append


:point_up_2: This happened when I moved only blend file from the project folder instead of moving all the project together:

0 Likes

#5

I uploaded the file from a different directory not located in the project directory, so I understand why the link could break when I changed the location of the project directory. My expectation however was that the canvas editor should still open, with a warning to relink the missing image and a means to do so. Right now it just refuses to open, and I thought editing the json file for the canvas would fix things, but it doesn’t. You shouldn’t lose all the work done setting up a UI canvas just because of a broken link. Maybe there is a way around it I’m not yet aware of, if not, there should be.

0 Likes

#6

Armory is in the very early development stage. There are a lot of things to be fixed. It’s better for us to make simple projects in order to study the engine for the beginning, or at least work very carefully and be prepared that something might go wrong and not get upset if it does.
Keep your gaming assets in the same folder with the blend file and move whole the project together if you have to move it.

0 Likes

#7

True, makes sense. Thanks.

0 Likes