Add node flags

This commit is contained in:
luboslenco
2025-09-26 11:52:38 +02:00
parent ef7f28aa34
commit fd2075698e
32 changed files with 390 additions and 289 deletions
Binary file not shown.
Binary file not shown.
+2 -1
View File
@@ -55,7 +55,8 @@ let node_list = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
}
];
+2 -1
View File
@@ -43,7 +43,8 @@ let node_list = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
}
];
@@ -291,6 +291,7 @@ function brush_output_paint(self: brush_output_node_t) {
// height: 0
// }
// ],
// width: 0
// width: 0,
// flags: 0
// };
+2 -1
View File
@@ -86,5 +86,6 @@ let float_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -180,5 +180,6 @@ let input_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -204,5 +204,6 @@ let math_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -106,5 +106,6 @@ let random_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
@@ -86,5 +86,6 @@ let separate_vector_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -99,5 +99,6 @@ let tex_image_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -72,5 +72,6 @@ let time_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
@@ -212,5 +212,6 @@ let vector_math_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -118,5 +118,6 @@ let vector_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
+7 -12
View File
@@ -40,6 +40,8 @@ function config_save() {
path += "config.json";
json_encode_begin();
json_encode_string("version", config_raw.version);
json_encode_string("sha", config_raw.sha);
json_encode_string("locale", config_raw.locale);
json_encode_i32("window_mode", config_raw.window_mode);
json_encode_i32("window_w", config_raw.window_w);
@@ -57,8 +59,6 @@ function config_save() {
json_encode_bool("rp_bloom", config_raw.rp_bloom);
json_encode_f32("rp_vignette", config_raw.rp_vignette);
json_encode_f32("rp_grain", config_raw.rp_grain);
json_encode_string("version", config_raw.version);
json_encode_string("sha", config_raw.sha);
json_encode_string_array("recent_projects", config_raw.recent_projects);
json_encode_string_array("bookmarks", config_raw.bookmarks);
json_encode_string_array("plugins", config_raw.plugins);
@@ -112,6 +112,8 @@ function config_save() {
function config_init() {
if (!config_loaded || config_raw == null) {
config_raw = {};
config_raw.version = manifest_version_config;
config_raw.sha = config_get_sha();
config_raw.locale = "system";
config_raw.window_mode = 0;
config_raw.window_resizable = true;
@@ -149,9 +151,6 @@ function config_init() {
config_raw.rp_supersample = 0.5;
}
///end
config_raw.version = manifest_version;
config_raw.sha = config_get_sha();
config_raw.recent_projects = [];
config_raw.bookmarks = [];
config_raw.plugins = [];
@@ -206,11 +205,7 @@ function config_init() {
config_raw.grid_snap = false;
}
else {
// Upgrade config format created by older ArmorPaint build
// if (config_raw.version != manifest_version) {
// config_raw.version = manifest_version;
// save();
// }
// Discard old config
if (config_raw.sha != config_get_sha()) {
config_loaded = false;
config_init();
@@ -422,6 +417,8 @@ type version_t = {
};
type config_t = {
version?: string;
sha?: string; // Commit id
// The locale should be specified in ISO 639-1 format:
// https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
// "system" is a special case that will use the system locale
@@ -445,8 +442,6 @@ type config_t = {
rp_vignette?: f32;
rp_grain?: f32;
// Application
version?: string;
sha?: string; // Commit id
recent_projects?: string[]; // Recently opened projects
bookmarks?: string[]; // Bookmarked folders in browser
plugins?: string[]; // List of enabled plugins
+4 -4
View File
@@ -110,7 +110,7 @@ function export_arm_run_project() {
let same_drive: bool = project_raw.envmap != null ? char_at(project_filepath, 0) == char_at(project_raw.envmap, 0) : true;
///end
project_raw.version = manifest_version;
project_raw.version = manifest_version_project;
project_raw.material_groups = mgroups;
project_raw.assets = texture_files;
project_raw.packed_assets = packed_assets;
@@ -270,7 +270,7 @@ function export_arm_run_material(path: string) {
}
let raw: project_format_t = {
version: manifest_version,
version: manifest_version_project,
material_nodes: mnodes,
material_groups: mgroups,
material_icons: micons,
@@ -337,7 +337,7 @@ function export_arm_run_brush(path: string) {
}
let raw: project_format_t = {
version: manifest_version,
version: manifest_version_project,
brush_nodes: bnodes,
brush_icons: bicons,
assets: texture_files,
@@ -477,7 +477,7 @@ function export_arm_run_swatches(path: string) {
path += ".arm";
}
let raw: project_format_t = {
version: manifest_version,
version: manifest_version_project,
swatches: project_raw.swatches
};
let buffer: buffer_t = util_encode_project(raw);
-186
View File
@@ -641,193 +641,7 @@ function import_arm_unpack_asset(project: project_format_t, abs: string, file: s
}
}
function _import_arm_get_node_socket_array(old: map_t<string, any>, key: string): ui_node_socket_t[] {
let sockets: ui_node_socket_t[] = [];
let ias: any[] = map_get(old, key);
for (let i: i32 = 0; i < ias.length; ++i) {
let old: map_t<string, any> = ias[i];
let s: ui_node_socket_t = {};
s.id = armpack_map_get_i32(old, "id");
s.node_id = armpack_map_get_i32(old, "node_id");
s.name = map_get(old, "name");
s.type = map_get(old, "type");
s.color = armpack_map_get_i32(old, "color");
if (s.type == "VALUE") {
let x: f32 = armpack_map_get_f32(old, "default_value");
s.default_value = f32_array_create_x(x);
}
else { // VECTOR, RGBA
let dv: map_t<string, any> = map_get(old, "default_value");
let x: f32 = armpack_map_get_f32(dv, "0");
let y: f32 = armpack_map_get_f32(dv, "1");
let z: f32 = armpack_map_get_f32(dv, "2");
if (s.type == "VECTOR") {
s.default_value = f32_array_create_xyz(x, y, z);
}
else { // RGBA
let w: f32 = armpack_map_get_f32(dv, "3");
s.default_value = f32_array_create_xyzw(x, y, z, w);
}
}
s.min = armpack_map_get_f32(old, "min");
s.max = armpack_map_get_f32(old, "max");
if (s.max == 0.0) {
s.max = 1.0;
}
s.precision = armpack_map_get_f32(old, "precision");
if (s.precision == 0.0) {
s.precision = 100.0;
}
s.display = armpack_map_get_i32(old, "display");
array_push(sockets, s);
}
return sockets;
}
function _import_arm_get_node_canvas_array(map: map_t<string, any>, key: string): ui_node_canvas_t[] {
let cas: any[] = map_get(map, key);
if (cas == null) {
return null;
}
let ar: ui_node_canvas_t[] = [];
for (let i: i32 = 0; i < cas.length; ++i) {
let old: map_t<string, any> = cas[i];
let c: ui_node_canvas_t = {};
c.name = map_get(old, "name");
c.nodes = [];
let nas: any[] = map_get(old, "nodes");
for (let i: i32 = 0; i < nas.length; ++i) {
let old: map_t<string, any> = nas[i];
let n: ui_node_t = {};
n.id = armpack_map_get_i32(old, "id");
n.name = map_get(old, "name");
n.type = map_get(old, "type");
n.x = armpack_map_get_f32(old, "x");
n.y = armpack_map_get_f32(old, "y");
n.color = armpack_map_get_i32(old, "color");
n.inputs = _import_arm_get_node_socket_array(old, "inputs");
n.outputs = _import_arm_get_node_socket_array(old, "outputs");
n.buttons = [];
let bas: any[] = map_get(old, "buttons");
for (let i: i32 = 0; i < bas.length; ++i) {
let old: map_t<string, any> = bas[i];
let b: ui_node_button_t = {};
b.name = map_get(old, "name");
b.type = map_get(old, "type");
b.output = armpack_map_get_i32(old, "output");
if (b.type == "ENUM") {
let x: f32 = armpack_map_get_i32(old, "default_value");
b.default_value = f32_array_create_x(x);
if (b.name == "File") {
let data_string: string = map_get(old, "data");
b.data = sys_string_to_buffer(data_string);
}
else {
let data_strings: string[] = map_get(old, "data");
let joined: string = string_array_join(data_strings, "\n");
b.data = sys_string_to_buffer(joined);
}
}
else if (b.type == "BOOL") {
let x: f32 = armpack_map_get_i32(old, "default_value");
b.default_value = f32_array_create_x(x);
}
else if (b.type == "CUSTOM") {
if (b.name == "arm.shader.NodesMaterial.newGroupButton") {
b.name = "nodes_material_new_group_button";
}
else if (b.name == "arm.shader.NodesMaterial.groupOutputButton") {
b.name = "nodes_material_group_output_button";
}
else if (b.name == "arm.shader.NodesMaterial.groupInputButton") {
b.name = "nodes_material_group_input_button";
}
else if (b.name == "arm.shader.NodesMaterial.vectorCurvesButton") {
b.name = "nodes_material_vector_curves_button";
}
else if (b.name == "arm.shader.NodesMaterial.colorRampButton") {
b.name = "nodes_material_color_ramp_button";
}
}
b.min = armpack_map_get_f32(old, "min");
b.max = armpack_map_get_f32(old, "max");
b.precision = armpack_map_get_f32(old, "precision");
b.height = armpack_map_get_f32(old, "height");
array_push(n.buttons, b);
}
n.width = armpack_map_get_f32(old, "width");
array_push(c.nodes, n);
}
c.links = [];
let las: any[] = map_get(old, "links");
for (let i: i32 = 0; i < las.length; ++i) {
let old: map_t<string, any> = las[i];
let l: ui_node_link_t = {};
l.id = armpack_map_get_i32(old, "id");
l.from_id = armpack_map_get_i32(old, "from_id");
l.from_socket = armpack_map_get_i32(old, "from_socket");
l.to_id = armpack_map_get_i32(old, "to_id");
l.to_socket = armpack_map_get_i32(old, "to_socket");
array_push(c.links, l);
}
array_push(ar, c);
}
return ar;
}
function import_arm_has_version(b: buffer_t): bool {
let has_version: bool = b[10] == 118; // 'v';
return has_version;
}
function import_arm_is_legacy(b: buffer_t): bool {
// Cloud materials are at version 0.8 / 0.9
let has_version: bool = b[10] == 118; // 'v'
let has_zero: bool = b[22] == 48; // '0'
let has_dot: bool = b[23] == 46; // '.'
let has_eight: bool = b[24] == 56; // '8'
let has_nine: bool = b[24] == 57; // '9'
if (has_version && has_zero && has_dot && (has_eight || has_nine)) {
return true;
}
return false;
}
function import_arm_from_legacy(b: buffer_t): project_format_t {
// Deprecated
let old: map_t<string, any> = armpack_decode_to_map(b);
let project: project_format_t = {};
project.version = "1.0 alpha";
project.assets = map_get(old, "assets");
if (project.assets == null) {
project.assets = [];
}
project.is_bgra = armpack_map_get_i32(old, "is_bgra") > 0;
let pas: any[] = map_get(old, "packed_assets");
if (pas != null) {
project.packed_assets = [];
for (let i: i32 = 0; i < pas.length; ++i) {
let old: map_t<string, any> = pas[i];
let pa: packed_asset_t = {};
pa.name = map_get(old, "name");
pa.bytes = map_get(old, "bytes");
array_push(project.packed_assets, pa);
}
}
project.brush_nodes = _import_arm_get_node_canvas_array(old, "brush_nodes");
project.brush_icons = map_get(old, "brush_icons");
project.material_nodes = _import_arm_get_node_canvas_array(old, "material_nodes");
project.material_groups = _import_arm_get_node_canvas_array(old, "material_groups");
project.material_icons = map_get(old, "material_icons");
return project;
}
+187
View File
@@ -0,0 +1,187 @@
function _import_arm_get_legacy_node_socket_array(old: map_t<string, any>, key: string): ui_node_socket_t[] {
let sockets: ui_node_socket_t[] = [];
let ias: any[] = map_get(old, key);
for (let i: i32 = 0; i < ias.length; ++i) {
let old: map_t<string, any> = ias[i];
let s: ui_node_socket_t = {};
s.id = armpack_map_get_i32(old, "id");
s.node_id = armpack_map_get_i32(old, "node_id");
s.name = map_get(old, "name");
s.type = map_get(old, "type");
s.color = armpack_map_get_i32(old, "color");
if (s.type == "VALUE") {
let x: f32 = armpack_map_get_f32(old, "default_value");
s.default_value = f32_array_create_x(x);
}
else { // VECTOR, RGBA
let dv: map_t<string, any> = map_get(old, "default_value");
let x: f32 = armpack_map_get_f32(dv, "0");
let y: f32 = armpack_map_get_f32(dv, "1");
let z: f32 = armpack_map_get_f32(dv, "2");
if (s.type == "VECTOR") {
s.default_value = f32_array_create_xyz(x, y, z);
}
else { // RGBA
let w: f32 = armpack_map_get_f32(dv, "3");
s.default_value = f32_array_create_xyzw(x, y, z, w);
}
}
s.min = armpack_map_get_f32(old, "min");
s.max = armpack_map_get_f32(old, "max");
if (s.max == 0.0) {
s.max = 1.0;
}
s.precision = armpack_map_get_f32(old, "precision");
if (s.precision == 0.0) {
s.precision = 100.0;
}
s.display = armpack_map_get_i32(old, "display");
array_push(sockets, s);
}
return sockets;
}
function _import_arm_get_legacy_node_canvas_array(map: map_t<string, any>, key: string): ui_node_canvas_t[] {
let cas: any[] = map_get(map, key);
if (cas == null) {
return null;
}
let ar: ui_node_canvas_t[] = [];
for (let i: i32 = 0; i < cas.length; ++i) {
let old: map_t<string, any> = cas[i];
let c: ui_node_canvas_t = {};
c.name = map_get(old, "name");
c.nodes = [];
let nas: any[] = map_get(old, "nodes");
for (let i: i32 = 0; i < nas.length; ++i) {
let old: map_t<string, any> = nas[i];
let n: ui_node_t = {};
n.id = armpack_map_get_i32(old, "id");
n.name = map_get(old, "name");
n.type = map_get(old, "type");
n.x = armpack_map_get_f32(old, "x");
n.y = armpack_map_get_f32(old, "y");
n.color = armpack_map_get_i32(old, "color");
n.inputs = _import_arm_get_legacy_node_socket_array(old, "inputs");
n.outputs = _import_arm_get_legacy_node_socket_array(old, "outputs");
n.buttons = [];
let bas: any[] = map_get(old, "buttons");
for (let i: i32 = 0; i < bas.length; ++i) {
let old: map_t<string, any> = bas[i];
let b: ui_node_button_t = {};
b.name = map_get(old, "name");
b.type = map_get(old, "type");
b.output = armpack_map_get_i32(old, "output");
if (b.type == "ENUM") {
let x: f32 = armpack_map_get_i32(old, "default_value");
b.default_value = f32_array_create_x(x);
if (b.name == "File") {
let data_string: string = map_get(old, "data");
b.data = sys_string_to_buffer(data_string);
}
else {
let data_strings: string[] = map_get(old, "data");
let joined: string = string_array_join(data_strings, "\n");
b.data = sys_string_to_buffer(joined);
}
}
else if (b.type == "BOOL") {
let x: f32 = armpack_map_get_i32(old, "default_value");
b.default_value = f32_array_create_x(x);
}
else if (b.type == "CUSTOM") {
if (b.name == "arm.shader.NodesMaterial.newGroupButton") {
b.name = "nodes_material_new_group_button";
}
else if (b.name == "arm.shader.NodesMaterial.groupOutputButton") {
b.name = "nodes_material_group_output_button";
}
else if (b.name == "arm.shader.NodesMaterial.groupInputButton") {
b.name = "nodes_material_group_input_button";
}
else if (b.name == "arm.shader.NodesMaterial.vectorCurvesButton") {
b.name = "nodes_material_vector_curves_button";
}
else if (b.name == "arm.shader.NodesMaterial.colorRampButton") {
b.name = "nodes_material_color_ramp_button";
}
}
b.min = armpack_map_get_f32(old, "min");
b.max = armpack_map_get_f32(old, "max");
b.precision = armpack_map_get_f32(old, "precision");
b.height = armpack_map_get_f32(old, "height");
array_push(n.buttons, b);
}
n.width = armpack_map_get_f32(old, "width");
n.flags = 0;
array_push(c.nodes, n);
}
c.links = [];
let las: any[] = map_get(old, "links");
for (let i: i32 = 0; i < las.length; ++i) {
let old: map_t<string, any> = las[i];
let l: ui_node_link_t = {};
l.id = armpack_map_get_i32(old, "id");
l.from_id = armpack_map_get_i32(old, "from_id");
l.from_socket = armpack_map_get_i32(old, "from_socket");
l.to_id = armpack_map_get_i32(old, "to_id");
l.to_socket = armpack_map_get_i32(old, "to_socket");
array_push(c.links, l);
}
array_push(ar, c);
}
return ar;
}
function import_arm_is_legacy(b: buffer_t): bool {
// Cloud materials are at version 0.8 / 0.9
let has_version: bool = b[10] == 118; // 'v'
let has_zero: bool = b[22] == 48; // '0'
let has_dot: bool = b[23] == 46; // '.'
let has_eight: bool = b[24] == 56; // '8'
let has_nine: bool = b[24] == 57; // '9'
if (has_version && has_zero && has_dot && (has_eight || has_nine)) {
return true;
}
return false;
}
function import_arm_from_legacy(b: buffer_t): project_format_t {
// Deprecated
let old: map_t<string, any> = armpack_decode_to_map(b);
let project: project_format_t = {};
project.version = manifest_version_project;
project.assets = map_get(old, "assets");
if (project.assets == null) {
project.assets = [];
}
project.is_bgra = armpack_map_get_i32(old, "is_bgra") > 0;
let pas: any[] = map_get(old, "packed_assets");
if (pas != null) {
project.packed_assets = [];
for (let i: i32 = 0; i < pas.length; ++i) {
let old: map_t<string, any> = pas[i];
let pa: packed_asset_t = {};
pa.name = map_get(old, "name");
pa.bytes = map_get(old, "bytes");
array_push(project.packed_assets, pa);
}
}
project.brush_nodes = _import_arm_get_legacy_node_canvas_array(old, "brush_nodes");
project.brush_icons = map_get(old, "brush_icons");
project.material_nodes = _import_arm_get_legacy_node_canvas_array(old, "material_nodes");
project.material_groups = _import_arm_get_legacy_node_canvas_array(old, "material_groups");
project.material_icons = map_get(old, "material_icons");
return project;
}
+2
View File
@@ -1,6 +1,8 @@
let manifest_title: string = "ArmorPaint";
let manifest_version: string = "1.0 alpha";
let manifest_version_project: string = "2";
let manifest_version_config: string = "1";
let manifest_url: string = "https://armorpaint.org";
let manifest_url_android: string = "https://play.google.com/store/apps/details?id=org.armorpaint";
let manifest_url_ios: string = "https://apps.apple.com/app/armorpaint/id1533967534";
@@ -98,5 +98,6 @@ let image_texture_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -251,5 +251,6 @@ let inpaint_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
@@ -271,5 +271,6 @@ let photo_to_pbr_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -71,5 +71,6 @@ let rgb_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
@@ -336,7 +336,8 @@ let text_to_photo_node_def: ui_node_t = {
height: 1
}
],
width: 0
width: 0,
flags: 0
};
let text_to_photo_node_text_input_ids: i32[] = [49406, 49407, 49407, 49407, 49407, 49407, 49407, 49407, 49407,
+2 -1
View File
@@ -161,5 +161,6 @@ let tiling_node_def: ui_node_t = {
height: 0
}
],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -165,5 +165,6 @@ let upscale_node_def: ui_node_t = {
}
],
buttons: [],
width: 0
width: 0,
flags: 0
};
+2 -1
View File
@@ -147,5 +147,6 @@ let variance_node_def: ui_node_t = {
height: 1
}
],
width: 0
width: 0,
flags: 0
};
+134 -66
View File
@@ -69,7 +69,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -118,7 +119,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -168,7 +170,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -289,7 +292,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -422,7 +426,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -459,7 +464,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -521,7 +527,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -654,7 +661,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -727,7 +735,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -848,7 +857,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -885,7 +895,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -922,7 +933,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -959,7 +971,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -984,7 +997,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1105,7 +1119,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1142,7 +1157,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1179,7 +1195,8 @@ let nodes_material_input: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1229,7 +1246,8 @@ let nodes_material_input: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
];
@@ -1353,7 +1371,8 @@ let nodes_material_input: ui_node_t[] = [
// ],
// outputs: [],
// buttons: [],
// width: 0
// width: 0,
// flags: 0
// }
// ];
@@ -1454,7 +1473,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1540,7 +1560,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1602,7 +1623,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1664,7 +1686,8 @@ let nodes_material_texture: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1737,7 +1760,8 @@ let nodes_material_texture: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1799,7 +1823,8 @@ let nodes_material_texture: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1861,7 +1886,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1911,7 +1937,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -1973,7 +2000,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2047,7 +2075,8 @@ let nodes_material_texture: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2109,7 +2138,8 @@ let nodes_material_texture: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
}
];
@@ -2162,7 +2192,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2224,7 +2255,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2274,7 +2306,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2360,7 +2393,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2410,7 +2444,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2495,7 +2530,8 @@ let nodes_material_color: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2545,7 +2581,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2676,7 +2713,8 @@ let nodes_material_color: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
}
];
@@ -2753,7 +2791,8 @@ let nodes_material_vector: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2827,7 +2866,8 @@ let nodes_material_vector: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2889,7 +2929,8 @@ let nodes_material_vector: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -2951,7 +2992,8 @@ let nodes_material_vector: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3001,7 +3043,8 @@ let nodes_material_vector: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3063,7 +3106,8 @@ let nodes_material_vector: ui_node_t[] = [
height: 8.5
}
],
width: 0
width: 0,
flags: 0
}
];
@@ -3140,7 +3184,8 @@ let nodes_material_converter: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3202,7 +3247,8 @@ let nodes_material_converter: ui_node_t[] = [
height: 4.5
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3276,7 +3322,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3338,7 +3385,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3400,7 +3448,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3462,7 +3511,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3560,7 +3610,8 @@ let nodes_material_converter: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3633,7 +3684,8 @@ let nodes_material_converter: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3671,7 +3723,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3733,7 +3786,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3795,7 +3849,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3857,7 +3912,8 @@ let nodes_material_converter: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -3931,7 +3987,8 @@ let nodes_material_converter: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
}
];
@@ -3982,7 +4039,8 @@ let nodes_material_neural: ui_node_t[] = [
height: 1
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -4043,7 +4101,8 @@ let nodes_material_neural: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -4141,7 +4200,8 @@ let nodes_material_neural: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -4202,7 +4262,8 @@ let nodes_material_neural: ui_node_t[] = [
height: 0
}
],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -4240,7 +4301,8 @@ let nodes_material_neural: ui_node_t[] = [
}
],
buttons: [],
width: 0
width: 0,
flags: 0
},
{
id: 0,
@@ -4302,7 +4364,8 @@ let nodes_material_neural: ui_node_t[] = [
height: 1
}
],
width: 0
width: 0,
flags: 0
}
];
@@ -4329,7 +4392,8 @@ let nodes_material_group: ui_node_t[] = [
height: 1
}
],
width: 0
width: 0,
flags: 0
}
];
@@ -4538,7 +4602,9 @@ function nodes_material_new_group_button(node_id: i32) {
type: "CUSTOM",
height: 1
}
]
],
width: 0,
flags: 0
},
{
id: 1,
@@ -4555,7 +4621,9 @@ function nodes_material_new_group_button(node_id: i32) {
type: "CUSTOM",
height: 1
}
]
],
width: 0,
flags: 0
}
],
links: []
+1
View File
@@ -102,6 +102,7 @@ function util_clone_canvas_node(n: ui_node_t): ui_node_t {
r.outputs = util_clone_canvas_sockets(n.outputs);
r.buttons = util_clone_canvas_buttons(n.buttons);
r.width = n.width;
r.flags = n.flags;
return r;
}