@jfperusse @sim - It’s probably me but I am struggling to address image assets I have located in an asset folder within the Codea root.
What I’ve been used to is providing a path name to a file directly like
Pic = project.documents.folder.image
I initially used to use assets in the project folder itself but I later started to use assets stored in a project assets folder to minimise storage of high sized images so I could try multiple projects using the same assets.
Usually I would use a path description like
Pic = project.documents folder…“image”
Or sometimes I would define the path and use
Pic = path…“image”
Or Pic = path.image
Or Pic = path.table[number]
But none of these seem to work.
Are we restricted to the parent folder of the project or have to work through the folder/asset dialogue for each project?
Oh - and as an aside - I am finding the loading of asset options in the assets options bar above the keyboard much slower than it used to be.
Update: Ah, it I think I’ve twigged on to what is happening - it looks like you need to specify in the Codea asset filer the image that you need (wherever it is) and Codea then copies it to Codea root. That’s fine - I can get that working but I think Codea root is going to rapidly fill up with lots of images - kinda messy and it may lead to multiple copies from different projects.
Oh I also noticed that when you look into the project folder it looks like you find the project itself - tapping on it runs it. Is that the case ? If so that feels a little like the wrong way round - I would expect project in Codea root and assets (code plus images etc) in a folder - similar to what it used to be.
Solved my problem by addressing the folder and then the project name (usually both the same) to access images by code like -
pic = asset.document.project.project.picname
So we don’t need an image in the root if you place it in the project. Seems a bit non-intuitive though.