From a021a5b119f4b569e077948c3ad4a37a75d158d1 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Mon, 20 Apr 2026 17:20:47 +0200 Subject: [PATCH] paint: cleanup --- paint/sources/import_folder.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/paint/sources/import_folder.c b/paint/sources/import_folder.c index a19cc508..13412d34 100644 --- a/paint/sources/import_folder.c +++ b/paint/sources/import_folder.c @@ -13,13 +13,13 @@ void import_folder_place_image_node(ui_nodes_t *nodes, ui_node_canvas_t *canvas, void import_folder_run(char *path) { string_array_t *files = file_read_directory(path); - char *mapbase = ""; - char *mapopac = ""; - char *mapnor = ""; - char *mapocc = ""; - char *maprough = ""; - char *mapmet = ""; - char *mapheight = ""; + char *mapbase = ""; + char *mapopac = ""; + char *mapnor = ""; + char *mapocc = ""; + char *maprough = ""; + char *mapmet = ""; + char *mapheight = ""; bool found_texture = false; // Import maps @@ -29,8 +29,6 @@ void import_folder_run(char *path) { continue; } - // TODO: handle -albedo - char *base = to_lower_case(substring(f, 0, string_last_index_of(f, "."))); bool valid = false; if (string_equals(mapbase, "") && path_is_base_color_tex(base)) { @@ -78,7 +76,7 @@ void import_folder_run(char *path) { any_array_push(project_materials, g_context->material); ui_nodes_t *nodes = g_context->material->nodes; ui_node_canvas_t *canvas = g_context->material->canvas; - string_array_t *dirs = string_split(path, PATH_SEP); + string_array_t *dirs = string_split(path, PATH_SEP); canvas->name = string_copy(dirs->buffer[dirs->length - 1]); ui_node_t *nout = NULL; for (i32 i = 0; i < canvas->nodes->length; ++i) {