Cleanup
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
---
|
||||
name: Ask a question
|
||||
about: Post a question about ArmorPaint
|
||||
title: ''
|
||||
labels: question
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
<!-- Please search existing issues for potential duplicates before filing yours:
|
||||
https://github.com/armory3d/armortools/issues?q=is%3Aissue
|
||||
-->
|
||||
@@ -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;
|
||||
@@ -39,4 +39,5 @@ if (flags.raytrace) {
|
||||
}
|
||||
}
|
||||
|
||||
project.flatten();
|
||||
return project;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -79,7 +79,7 @@ type file_download_data_t = {
|
||||
let _file_download_map: map_t<string, file_download_data_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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+25
-22
@@ -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;
|
||||
|
||||
+1
-1
@@ -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}" });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user