diff --git a/.github/ISSUE_TEMPLATE/ask_question.md b/.github/ISSUE_TEMPLATE/ask_question.md deleted file mode 100644 index ba695f96..00000000 --- a/.github/ISSUE_TEMPLATE/ask_question.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Ask a question -about: Post a question about ArmorPaint -title: '' -labels: question -assignees: '' ---- - - diff --git a/armorforge/Plugins/kfile.js b/armorforge/Plugins/project.js similarity index 100% rename from armorforge/Plugins/kfile.js rename to armorforge/Plugins/project.js diff --git a/armorlab/Plugins/kfile.js b/armorlab/Plugins/project.js similarity index 100% rename from armorlab/Plugins/kfile.js rename to armorlab/Plugins/project.js diff --git a/armorpaint/Plugins/kfile.js b/armorpaint/Plugins/project.js similarity index 91% rename from armorpaint/Plugins/kfile.js rename to armorpaint/Plugins/project.js index 9d96dfc2..aec95e6f 100644 --- a/armorpaint/Plugins/kfile.js +++ b/armorpaint/Plugins/project.js @@ -5,4 +5,5 @@ let project = new Project('plugins'); project.addDefine('WITH_PLUGIN_EMBED'); project.addDefine('TINYUSDZ_NO_STB_IMAGE_IMPLEMENTATION'); +project.flatten(); return project; diff --git a/armorpaint/project.js b/armorpaint/project.js index 7402b863..99b63ab1 100644 --- a/armorpaint/project.js +++ b/armorpaint/project.js @@ -39,4 +39,5 @@ if (flags.raytrace) { } } +project.flatten(); return project; diff --git a/armorsculpt/Plugins/kfile.js b/armorsculpt/Plugins/project.js similarity index 100% rename from armorsculpt/Plugins/kfile.js rename to armorsculpt/Plugins/project.js diff --git a/base/Sources/base.ts b/base/Sources/base.ts index 26ee2b3e..c9589a47 100644 --- a/base/Sources/base.ts +++ b/base/Sources/base.ts @@ -447,13 +447,13 @@ function base_on_resize() { base_resize(); - ///if (krom_linux || krom_darwin) + ///if (krom_linux || krom_macos) base_save_window_rect(); ///end } function base_save_window_rect() { - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) config_raw.window_w = sys_width(); config_raw.window_h = sys_height(); config_raw.window_x = sys_x(); @@ -706,7 +706,7 @@ function base_material_dropped() { function base_handle_drop_paths() { if (base_drop_paths.length > 0) { - ///if (krom_linux || krom_darwin) + ///if (krom_linux || krom_macos) let wait: bool = !mouse_moved; // Mouse coords not updated during drag ///else let wait: bool = false; @@ -942,7 +942,7 @@ function base_get_asset_index(file_name: string): i32 { function base_toggle_fullscreen() { if (sys_mode() == window_mode_t.WINDOWED) { - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) config_raw.window_w = sys_width(); config_raw.window_h = sys_height(); config_raw.window_x = sys_x(); @@ -984,8 +984,8 @@ function base_get_uis(): zui_t[] { function base_is_decal_layer(): bool { ///if is_paint - let is_paint: bool = context_raw.tool != workspace_tool_t.MATERIAL && context_raw.tool != workspace_tool_t.BAKE; - return is_paint && context_raw.layer.fill_layer != null && context_raw.layer.uv_type == uv_type_t.PROJECT; + let is_painting: bool = context_raw.tool != workspace_tool_t.MATERIAL && context_raw.tool != workspace_tool_t.BAKE; + return is_painting && context_raw.layer.fill_layer != null && context_raw.layer.uv_type == uv_type_t.PROJECT; ///end ///if (is_sculpt || is_lab) diff --git a/base/Sources/config.ts b/base/Sources/config.ts index 6a457046..8e026de7 100644 --- a/base/Sources/config.ts +++ b/base/Sources/config.ts @@ -121,7 +121,7 @@ function config_init() { config_raw.window_maximizable = true; config_raw.window_w = 1600; config_raw.window_h = 900; - ///if krom_darwin + ///if krom_macos config_raw.window_w *= 2; config_raw.window_h *= 2; ///end @@ -131,7 +131,7 @@ function config_init() { if (sys_display_width() >= 2560 && sys_display_height() >= 1600) { config_raw.window_scale = 2.0; } - ///if (krom_android || krom_ios || krom_darwin) + ///if (krom_android || krom_ios || krom_macos) config_raw.window_scale = 2.0; ///end config_raw.window_vsync = true; diff --git a/base/Sources/file.ts b/base/Sources/file.ts index 1c9597c7..fba5186d 100644 --- a/base/Sources/file.ts +++ b/base/Sources/file.ts @@ -79,7 +79,7 @@ type file_download_data_t = { let _file_download_map: map_t = map_create(); function file_download(url: string, dst_path: string, done: (url: string)=>void, size: i32 = 0) { - ///if (krom_windows || krom_darwin || krom_ios || krom_android) + ///if (krom_windows || krom_macos || krom_ios || krom_android) let fdd: file_download_data_t = { dst_path: dst_path, done: done }; map_set(_file_download_map, url, fdd); krom_http_request(url, size, function (url: string, ab: buffer_t) { @@ -149,7 +149,7 @@ function file_cache_cloud(path: string, done: (s: string)=>void) { dest += path2; if (file_exists(dest)) { - ///if (krom_darwin || krom_ios) + ///if (krom_macos || krom_ios) done(dest); ///else let p: string; @@ -184,7 +184,7 @@ function file_cache_cloud(path: string, done: (s: string)=>void) { fccd.done(null); return; } - ///if (krom_darwin || krom_ios) + ///if (krom_macos || krom_ios) fccd.done(fccd.dest); ///else let p: string; diff --git a/base/Sources/history.ts b/base/Sources/history.ts index b240cfa3..e5e3b6af 100644 --- a/base/Sources/history.ts +++ b/base/Sources/history.ts @@ -623,7 +623,7 @@ function history_delete_material_group(group: node_group_t) { ///end function history_push(name: string): step_t { - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) let filename: string = project_filepath == "" ? ui_files_filename : substring(project_filepath, string_last_index_of(project_filepath, path_sep) + 1, project_filepath.length - 4); sys_title_set(filename + "* - " + manifest_title); ///end diff --git a/base/Sources/project.ts b/base/Sources/project.ts index 7585f9c1..721322ce 100644 --- a/base/Sources/project.ts +++ b/base/Sources/project.ts @@ -58,7 +58,7 @@ function project_save(save_and_quit: bool = false) { ///end } - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) let filename: string = substring(project_filepath, string_last_index_of(project_filepath, path_sep) + 1, project_filepath.length - 4); sys_title_set(filename + " - " + manifest_title); ///end @@ -139,7 +139,7 @@ function project_new_box() { } function project_new(reset_layers: bool = true) { - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) sys_title_set(manifest_title); ///end project_filepath = ""; diff --git a/base/Sources/tab_console.ts b/base/Sources/tab_console.ts index 55f3a913..72446c36 100644 --- a/base/Sources/tab_console.ts +++ b/base/Sources/tab_console.ts @@ -9,7 +9,7 @@ function tab_console_draw(htab: zui_handle_t) { if (zui_tab(htab, title, false, color) && statush > ui_status_default_status_h * zui_SCALE(ui)) { zui_begin_sticky(); - ///if (krom_windows || krom_linux || krom_darwin) // Copy + ///if (krom_windows || krom_linux || krom_macos) // Copy if (config_raw.touch_ui) { let row: f32[] = [1 / 4, 1 / 4, 1 / 4]; zui_row(row); @@ -46,7 +46,7 @@ function tab_console_draw(htab: zui_handle_t) { krom_file_save_bytes(path, sys_string_to_buffer(str), 0); }); } - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) if (zui_button(tr("Copy"))) { let str: string = string_array_join(console_last_traces, "\n"); krom_copy_to_clipboard(str); diff --git a/base/Sources/tab_swatches.ts b/base/Sources/tab_swatches.ts index 694a2eb2..cfb0fa82 100644 --- a/base/Sources/tab_swatches.ts +++ b/base/Sources/tab_swatches.ts @@ -183,7 +183,7 @@ function tab_swatches_draw(htab: zui_handle_t) { if (ui.is_hovered && ui.input_released_r) { context_set_swatch(project_raw.swatches[i]); let add: i32 = project_raw.swatches.length > 1 ? 1 : 0; - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) add += 1; // Copy ///end @@ -203,7 +203,7 @@ function tab_swatches_draw(htab: zui_handle_t) { context_set_swatch(project_clone_swatch(context_raw.swatch)); array_push(project_raw.swatches, context_raw.swatch); } - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) else if (ui_menu_button(ui, tr("Copy Hex Code"))) { let color: i32 = context_raw.swatch.base; color = color_set_ab(color, context_raw.swatch.opacity * 255); diff --git a/base/Sources/ui_box.ts b/base/Sources/ui_box.ts index 817394ff..f47dfef1 100644 --- a/base/Sources/ui_box.ts +++ b/base/Sources/ui_box.ts @@ -87,7 +87,7 @@ function ui_box_render() { } _zui_end_element(); - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) if (ui_box_copyable) { let row: f32[] = [1 / 3, 1 / 3, 1 / 3]; zui_row(row); @@ -103,7 +103,7 @@ function ui_box_render() { _zui_end_element(); - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) if (ui_box_copyable && zui_button(tr("Copy"))) { krom_copy_to_clipboard(ui_box_text); } diff --git a/base/Sources/ui_files.ts b/base/Sources/ui_files.ts index 2e6176e7..d552650b 100644 --- a/base/Sources/ui_files.ts +++ b/base/Sources/ui_files.ts @@ -4,7 +4,7 @@ let ui_files_default_path: string = "C:\\Users" ///elseif krom_android "/storage/emulated/0/Download" - ///elseif krom_darwin + ///elseif krom_macos "/Users" ///else "/" @@ -58,7 +58,7 @@ function ui_files_release_keys() { // File dialog may prevent firing key up events keyboard_up_listener(key_code_t.SHIFT); keyboard_up_listener(key_code_t.CONTROL); - ///if krom_darwin + ///if krom_macos keyboard_up_listener(key_code_t.META); ///end } diff --git a/base/Sources/ui_menu.ts b/base/Sources/ui_menu.ts index 5750b96c..cb1cbc03 100644 --- a/base/Sources/ui_menu.ts +++ b/base/Sources/ui_menu.ts @@ -506,14 +506,14 @@ function ui_menu_render() { file_load_url("https://github.com/armory3d/armortools/issues"); } if (ui_menu_button(ui, tr("Report Bug"))) { - ///if (krom_darwin || krom_ios) // Limited url length + ///if (krom_macos || krom_ios) // Limited url length file_load_url("https://github.com/armory3d/armortools/issues/new?labels=bug&template=bug_report.md&body=*" + manifest_title + "%20" + manifest_version + "-" + config_get_sha() + ",%20" + sys_system_id()); ///else file_load_url("https://github.com/armory3d/armortools/issues/new?labels=bug&template=bug_report.md&body=*" + manifest_title + "%20" + manifest_version + "-" + config_get_sha() + ",%20" + sys_system_id() + "*%0A%0A**Issue description:**%0A%0A**Steps to reproduce:**%0A%0A"); ///end } if (ui_menu_button(ui, tr("Request Feature"))) { - ///if (krom_darwin || krom_ios) // Limited url length + ///if (krom_macos || krom_ios) // Limited url length file_load_url("https://github.com/armory3d/armortools/issues/new?labels=feature%20request&template=feature_request.md&body=*" + manifest_title + "%20" + manifest_version + "-" + config_get_sha() + ",%20" + sys_system_id()); ///else file_load_url("https://github.com/armory3d/armortools/issues/new?labels=feature%20request&template=feature_request.md&body=*" + manifest_title + "%20" + manifest_version + "-" + config_get_sha() + ",%20" + sys_system_id() + "*%0A%0A**Feature description:**%0A%0A"); @@ -611,7 +611,7 @@ function ui_menu_render() { let row: f32[] = [1 / 3, 1 / 3, 1 / 3]; zui_row(row); - ///if (krom_windows || krom_linux || krom_darwin) + ///if (krom_windows || krom_linux || krom_macos) if (zui_button(tr("Copy"))) { krom_copy_to_clipboard(_ui_menu_render_msg); } diff --git a/base/project.js b/base/project.js index 49bffece..a11859d1 100644 --- a/base/project.js +++ b/base/project.js @@ -20,45 +20,47 @@ flags.with_iron = true; flags.with_zui = true; flags.physics = false; //// -flags.on_c_project_created = function(c_project) { - c_project.addDefine("IDLE_SLEEP"); +let project = new Project("Base"); + +{ + project.addDefine("IDLE_SLEEP"); let dir = flags.name.toLowerCase(); if (graphics === "vulkan") { - c_project.addDefine("KINC_VKRT"); - c_project.addProject("../" + dir + "/glsl_to_spirv"); + project.addDefine("KINC_VKRT"); + project.addProject("../" + dir + "/glsl_to_spirv"); } if (flags.with_onnx) { - c_project.addDefine("WITH_ONNX"); - c_project.addIncludeDir("../" + dir + "/onnx/include"); + project.addDefine("WITH_ONNX"); + project.addIncludeDir("../" + dir + "/onnx/include"); if (platform === "win32") { - c_project.addLib("../" + dir + "/onnx/win32/onnxruntime"); + project.addLib("../" + dir + "/onnx/win32/onnxruntime"); } else if (platform === "linux") { // patchelf --set-rpath . ArmorLab - c_project.addLib("onnxruntime -L" + flags.dirname + "/../" + dir + "/onnx/linux"); - // c_project.addLib("onnxruntime_providers_cuda"); - // c_project.addLib("onnxruntime_providers_shared"); - // c_project.addLib("cublasLt"); - // c_project.addLib("cublas"); - // c_project.addLib("cudart"); - // c_project.addLib("cudnn"); - // c_project.addLib("cufft"); - // c_project.addLib("curand"); + project.addLib("onnxruntime -L" + flags.dirname + "/../" + dir + "/onnx/linux"); + // project.addLib("onnxruntime_providers_cuda"); + // project.addLib("onnxruntime_providers_shared"); + // project.addLib("cublasLt"); + // project.addLib("cublas"); + // project.addLib("cudart"); + // project.addLib("cudnn"); + // project.addLib("cufft"); + // project.addLib("curand"); } - else if (platform === "osx") { - c_project.addLib("../" + dir + "/onnx/macos/libonnxruntime.1.14.1.dylib"); + else if (platform === "macos") { + project.addLib("../" + dir + "/onnx/macos/libonnxruntime.1.14.1.dylib"); } } - c_project.addProject("../" + dir + "/Plugins"); -}; + project.addProject("../" + dir + "/Plugins"); +} -let project = new Project("Base"); +project.addProject("../armorcore"); project.addSources("Sources"); project.addSources("Sources/nodes"); -project.addShaders("../armorcore/Shaders/*.glsl", { embed: flags.embed }); +project.addShaders("../armorcore/shaders/*.glsl", { embed: flags.embed }); project.addShaders("Shaders/*.glsl", { embed: flags.embed }); project.addAssets("Assets/*", { destination: "data/{name}", embed: flags.embed }); project.addAssets("Assets/locale/*", { destination: "data/locale/{name}" }); @@ -121,4 +123,5 @@ if (export_version_info) { project.addAssets(dir + "/version.json", { destination: "data/{name}", embed: flags.embed }); } +project.flatten(); return project; diff --git a/misc/pad/project.js b/misc/pad/project.js index f6ebd607..aa977216 100644 --- a/misc/pad/project.js +++ b/misc/pad/project.js @@ -14,7 +14,7 @@ flags.on_c_project_created = function(c_project) { let project = new Project("ArmorPad"); let root = "../../"; project.addSources("Sources"); -project.addShaders(root + "armorcore/Shaders/*.glsl",); +project.addShaders(root + "armorcore/shaders/*.glsl",); project.addAssets(root + "base/Assets/font_mono.ttf", { destination: "data/{name}" }); project.addAssets(root + "base/Assets/text_coloring.json", { destination: "data/{name}" });