From 2790624094ab0b81dfdc3150eaf0da08accf610e Mon Sep 17 00:00:00 2001 From: tech kaczynski Date: Thu, 1 Oct 2026 05:30:26 +1000 Subject: added model picker panel. work on property panel components. --- res.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'res.c') diff --git a/res.c b/res.c index b1ed86f..ef4f2c2 100644 --- a/res.c +++ b/res.c @@ -174,6 +174,34 @@ void res_update(void) { } +char** +asset_mdl_keys(int *count) { + *count = 0; + + if (!res.assets.base.nnodes) { + return NULL; + } + + char **keys = malloc(res.assets.base.nnodes * sizeof(*keys)); + if (!keys) { + perror("asset_mdl_keys: mem allocation failed."); + exit(1); + } + + map_iter_t iter = map_iter(&res.assets); + cstr key; + + while ((key = map_next(&res.assets, &iter))) { + if (strcmp(GetFileExtension(key), ".glb") != 0) { + continue; + } + + keys[(*count)++] = map_get(&res.assets, key)->path; + } + + return keys; +} + Asset* asset_get(cstr key) { Asset *asset = map_get(&res.assets, key); -- cgit v1.2.3