Cleanup
This commit is contained in:
+1
-5
@@ -56,14 +56,10 @@ if (!flags.lite) {
|
||||
}
|
||||
|
||||
project.add_tsfiles("sources/ts");
|
||||
project.add_tsfiles("sources/ts/iron");
|
||||
project.add_tsfiles("sources/ts/nodes");
|
||||
project.add_shaders("shaders/*.kong");
|
||||
project.add_shaders("shaders/draw/*.kong");
|
||||
project.add_assets("assets/*", { destination: "data/{name}" });
|
||||
project.add_assets("assets/locale/*", { destination: "data/locale/{name}" });
|
||||
project.add_assets("assets/licenses/**", { destination: "data/licenses/{name}" });
|
||||
project.add_assets("assets/plugins/*", { destination: "data/plugins/{name}" });
|
||||
project.add_assets("assets/themes/*.json", { destination: "data/themes/{name}" });
|
||||
|
||||
if (platform === "linux" && fs_exists(os_cwd() + "/icon.png")) {
|
||||
@@ -120,7 +116,7 @@ if (!flags.lite) {
|
||||
if (export_data_list) {
|
||||
let root = "../" + flags.name.substr(5).toLowerCase();
|
||||
let data_list = {
|
||||
"/data/plugins": fs_readdir("../base/assets/plugins").concat(fs_readdir(root + "/assets/plugins")).join(","),
|
||||
"/data/plugins": fs_readdir(root + "/assets/plugins").join(","),
|
||||
"/data/export_presets": fs_readdir(root + "/assets/export_presets").join(","),
|
||||
"/data/keymap_presets": fs_readdir(root + "/assets/keymap_presets").join(","),
|
||||
"/data/locale": fs_readdir("../base/assets/locale").join(","),
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
function brush_output_node_create(raw: ui_node_t, args: f32_array_t): brush_output_node_t {
|
||||
context_raw.run_brush = brush_output_node_run;
|
||||
context_raw.parse_brush_inputs = brush_output_node_parse_inputs;
|
||||
|
||||
let n: brush_output_node_t = {};
|
||||
n.base = logic_node_create(n);
|
||||
n.raw = raw;
|
||||
brush_output_node_create_ext(n);
|
||||
return n;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
let ui_header_default_h: i32 = 28;
|
||||
let ui_header_h: i32 = ui_header_default_h;
|
||||
let ui_header_handle: ui_handle_t = ui_handle_create();
|
||||
let ui_header_worktab: ui_handle_t = ui_handle_create();
|
||||
|
||||
function ui_header_init() {
|
||||
ui_header_handle.layout = ui_layout_t.HORIZONTAL;
|
||||
}
|
||||
|
||||
function ui_header_render_ui() {
|
||||
if (config_raw.touch_ui) {
|
||||
ui_header_h = ui_header_default_h + 6;
|
||||
}
|
||||
else {
|
||||
ui_header_h = ui_header_default_h;
|
||||
}
|
||||
ui_header_h = math_floor(ui_header_h * UI_SCALE());
|
||||
|
||||
if (config_raw.layout[layout_size_t.HEADER] == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
let nodesw: i32 = (ui_nodes_show || ui_view2d_show) ? config_raw.layout[layout_size_t.NODES_W] : 0;
|
||||
let ww: i32 = iron_window_width() - ui_toolbar_w(true) - config_raw.layout[layout_size_t.SIDEBAR_W] - nodesw;
|
||||
|
||||
if (ui_window(ui_header_handle, sys_x(), ui_header_h, ww, ui_header_h)) {
|
||||
ui._y += 2;
|
||||
ui_header_draw_tool_properties();
|
||||
}
|
||||
}
|
||||
@@ -783,3 +783,37 @@ function base_init_config() {
|
||||
|
||||
base_ext_init_config(raw);
|
||||
}
|
||||
|
||||
|
||||
function base_ext_init() {
|
||||
}
|
||||
|
||||
function base_ext_render() {
|
||||
if (context_raw.frame == 2) {
|
||||
util_render_make_material_preview();
|
||||
ui_base_hwnds[tab_area_t.SIDEBAR1].redraws = 2;
|
||||
|
||||
base_init_undo_layers();
|
||||
}
|
||||
|
||||
if (context_raw.tool == tool_type_t.GIZMO) {
|
||||
sim_init();
|
||||
sim_update();
|
||||
}
|
||||
}
|
||||
|
||||
function base_ext_init_config(raw: config_t) {
|
||||
|
||||
}
|
||||
|
||||
function base_ext_update() {
|
||||
if (context_raw.tool == tool_type_t.GIZMO) {
|
||||
if (keyboard_down("control") && keyboard_started("d")) {
|
||||
sim_duplicate();
|
||||
}
|
||||
|
||||
if (keyboard_started("delete")) {
|
||||
sim_delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
function base_ext_init() {
|
||||
}
|
||||
|
||||
function base_ext_render() {
|
||||
if (context_raw.frame == 2) {
|
||||
util_render_make_material_preview();
|
||||
ui_base_hwnds[tab_area_t.SIDEBAR1].redraws = 2;
|
||||
|
||||
base_init_undo_layers();
|
||||
}
|
||||
|
||||
if (context_raw.tool == tool_type_t.GIZMO) {
|
||||
sim_init();
|
||||
sim_update();
|
||||
}
|
||||
}
|
||||
|
||||
function base_ext_init_config(raw: config_t) {
|
||||
|
||||
}
|
||||
|
||||
function base_ext_update() {
|
||||
if (context_raw.tool == tool_type_t.GIZMO) {
|
||||
if (keyboard_down("control") && keyboard_started("d")) {
|
||||
sim_duplicate();
|
||||
}
|
||||
|
||||
if (keyboard_started("delete")) {
|
||||
sim_delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -1,4 +1,16 @@
|
||||
|
||||
function brush_output_node_create(raw: ui_node_t, args: f32_array_t): brush_output_node_t {
|
||||
context_raw.run_brush = brush_output_node_run;
|
||||
context_raw.parse_brush_inputs = brush_output_node_parse_inputs;
|
||||
|
||||
let n: brush_output_node_t = {};
|
||||
n.base = logic_node_create(n);
|
||||
n.raw = raw;
|
||||
brush_output_node_create_ext(n);
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
type brush_output_node_t = {
|
||||
base?: logic_node_t;
|
||||
raw?: ui_node_t;
|
||||
@@ -277,3 +289,4 @@ function brush_output_paint(self: brush_output_node_t) {
|
||||
// ],
|
||||
// width: 0
|
||||
// };
|
||||
|
||||
@@ -775,3 +775,39 @@ function context_enable_import_plugin(file: string): bool {
|
||||
function context_set_swatch(s: swatch_color_t) {
|
||||
context_raw.swatch = s;
|
||||
}
|
||||
|
||||
|
||||
function context_ext_init(c: context_t) {
|
||||
c.tool = tool_type_t.BRUSH;
|
||||
c.color_picker_previous_tool = tool_type_t.BRUSH;
|
||||
c.brush_radius = 0.5;
|
||||
c.brush_radius_handle.value = 0.5;
|
||||
c.brush_hardness = 0.8;
|
||||
}
|
||||
|
||||
function context_ext_select_paint_object(o: mesh_object_t) {
|
||||
ui_header_handle.redraws = 2;
|
||||
for (let i: i32 = 0; i < project_paint_objects.length; ++i) {
|
||||
let p: mesh_object_t = project_paint_objects[i];
|
||||
p.skip_context = "paint";
|
||||
}
|
||||
|
||||
///if_forge
|
||||
context_raw.paint_object.skip_context = "";
|
||||
///end
|
||||
|
||||
context_raw.paint_object = o;
|
||||
|
||||
let mask: i32 = slot_layer_get_object_mask(context_raw.layer);
|
||||
if (context_layer_filter_used()) {
|
||||
mask = context_raw.layer_filter;
|
||||
}
|
||||
|
||||
if (context_raw.merged_object == null || mask > 0) {
|
||||
context_raw.paint_object.skip_context = "";
|
||||
}
|
||||
util_uv_uvmap_cached = false;
|
||||
util_uv_trianglemap_cached = false;
|
||||
util_uv_dilatemap_cached = false;
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
function context_ext_init(c: context_t) {
|
||||
c.tool = tool_type_t.BRUSH;
|
||||
c.color_picker_previous_tool = tool_type_t.BRUSH;
|
||||
c.brush_radius = 0.5;
|
||||
c.brush_radius_handle.value = 0.5;
|
||||
c.brush_hardness = 0.8;
|
||||
}
|
||||
|
||||
function context_ext_select_paint_object(o: mesh_object_t) {
|
||||
ui_header_handle.redraws = 2;
|
||||
for (let i: i32 = 0; i < project_paint_objects.length; ++i) {
|
||||
let p: mesh_object_t = project_paint_objects[i];
|
||||
p.skip_context = "paint";
|
||||
}
|
||||
|
||||
///if_forge
|
||||
context_raw.paint_object.skip_context = "";
|
||||
///end
|
||||
|
||||
context_raw.paint_object = o;
|
||||
|
||||
let mask: i32 = slot_layer_get_object_mask(context_raw.layer);
|
||||
if (context_layer_filter_used()) {
|
||||
mask = context_raw.layer_filter;
|
||||
}
|
||||
|
||||
if (context_raw.merged_object == null || mask > 0) {
|
||||
context_raw.paint_object.skip_context = "";
|
||||
}
|
||||
util_uv_uvmap_cached = false;
|
||||
util_uv_trianglemap_cached = false;
|
||||
util_uv_dilatemap_cached = false;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user