Could there be a parameter function that, when tapped in the side panel, pulls up the asset browser?
This is interesting to me. Hope you donāt mind some questions:
What would you use it for?
Would you want it to show a particular subfolder only? Or by default?
Would you want to be able to import assets?
I canāt remember everything off the top of my head but I feel like I think of things all the time that could use this.
I had a project based on making a primitive adventure game for my daughters, and I wanted to turn it into an adventure game building kit, but the difficulty of letting people load and place backgrounds stopped me.
I donāt know if you remember the Craft scene-building project I made, but about 80% of the time I spent making it was trying to figure out how to use the parameter pane to let people load the default models, and even though I did come up with a solution, it was as clunky as can be and it would have been awesome as heck to just pop a parameter panel up there.
The voxel editor upgrade I made could use itāas could the existing one in the example projects.
Recently Iāve been wondering how hard it would be to make a primitive Craft-shader-lab project, and being able to load files and textures would be really great for that.
I attempted to extend my SimpleButtons project into an art program a while backāfwiw the color picker I made for that one is one of the few pieces of code Iāve had someone else use in their own project, which was coolābut again the difficulty of loading saved files made me abandon the concept. I could have used such a parameter panel then. And so could every drawing project everyone has ever made in Codea, for that matter.
I donāt know if you recall a very old project someone made where a little 3D crate rolls around in a maze made of 3D crates, but I added a map editor to it, and there again it would have been way cooler if Iād had an easy way to load saved maps.
I also tried to make a project where you could draw directly on 3D modelsāanother place I could have used an asset picker.
So I guess the general answer is ātoolsā? Seems like any project that aims to help people make things inside Codea itself could use it.
To your other questions:
-
seems to me the exact current asset picker behavior would be best: open in the main Codea folder
-
absolutely, yes, importing assets would be a key ability. That said, for making things like drawing programs or the Craft model scene builder or the voxel editor I guess it wouldnāt be essential.
Would this solve your use-cases?
parameter.asset("Select Image", function(selected)
-- selected is an `asset.key` the user picked
end)
parameter.asset("Select Image", "images", function(selected)
-- selected is an `asset.key` the user picked
-- tapping on the asset picker in this mode shows only images
end)
Oooooo yes yes yes. Thatād do it all right.
By the by is there a reason thereās no ārenameā in the edit mode of the asset picker? Since weāre on the topic kindaā¦
@Sim while on the subject of assets!ā¦
The .obj models should be accompanied by a .mtl file. When i use āadd toā to move an .obj to the assets of my project, i donāt think you automatically copy over the corresponding .mtl?
If not, may i suggest you also display the .mtl files and also allow them to be āadd toā. In fact, i would prefer to show the extensions of all the asset files. Sometimes a model might be .blend, .stl etc. and it is useful to know what is what.
Is there a way with the files app to move assets directly into a project? I can move assets to the Codea documents.
@sim expanding on @UberGooberās request for a parameter asset browserā¦
Could it also be an incode function with callback that could be used within the code, even if the sidebar is not visible? Similarly for the colour picker.