diff --git a/armorforge/Assets/default_brush.arm b/armorforge/Assets/default_brush.arm index 68b696d0..c140c4c4 100644 Binary files a/armorforge/Assets/default_brush.arm and b/armorforge/Assets/default_brush.arm differ diff --git a/armorforge/Assets/default_material.arm b/armorforge/Assets/default_material.arm index 8a6c1883..b7853ca8 100644 Binary files a/armorforge/Assets/default_material.arm and b/armorforge/Assets/default_material.arm differ diff --git a/armorlab/Assets/default_brush.arm b/armorlab/Assets/default_brush.arm index c0eb91ae..b6942901 100644 Binary files a/armorlab/Assets/default_brush.arm and b/armorlab/Assets/default_brush.arm differ diff --git a/armorlab/Sources/nodes/image_texture_node.ts b/armorlab/Sources/nodes/image_texture_node.ts index 4a0917a9..8fcf74e9 100644 --- a/armorlab/Sources/nodes/image_texture_node.ts +++ b/armorlab/Sources/nodes/image_texture_node.ts @@ -38,7 +38,11 @@ let image_texture_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -48,7 +52,11 @@ let image_texture_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -56,21 +64,36 @@ let image_texture_node_def: zui_node_t = { name: _tr("Alpha"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("file"), type: "ENUM", + output: -1, default_value: 0, - data: "" + data: "", + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: _tr("color_space"), type: "ENUM", + output: -1, default_value: 0, - data: ["linear", "srgb"] + data: ["linear", "srgb"], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }; diff --git a/armorlab/Sources/nodes/inpaint_node.ts b/armorlab/Sources/nodes/inpaint_node.ts index 528b7567..7dde2e7c 100644 --- a/armorlab/Sources/nodes/inpaint_node.ts +++ b/armorlab/Sources/nodes/inpaint_node.ts @@ -194,7 +194,11 @@ let inpaint_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(1.0, 1.0, 1.0, 1.0) + default_value: f32_array_create_xyzw(1.0, 1.0, 1.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -204,20 +208,36 @@ let inpaint_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("auto"), type: "BOOL", + output: 0, default_value: true, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: "inpaint_node_buttons", type: "CUSTOM", + output: -1, + default_value: null, + data: null, + min: 0.0, + max: 1.0, + precision: 100, height: 0 } - ] + ], + width: 0 }; diff --git a/armorlab/Sources/nodes/photo_to_pbr_node.ts b/armorlab/Sources/nodes/photo_to_pbr_node.ts index 86714e4a..5d06c172 100644 --- a/armorlab/Sources/nodes/photo_to_pbr_node.ts +++ b/armorlab/Sources/nodes/photo_to_pbr_node.ts @@ -191,7 +191,11 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -201,7 +205,11 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Base Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -209,7 +217,11 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Occlusion"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -217,7 +229,11 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Roughness"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -225,7 +241,11 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Metallic"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -233,7 +253,11 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Normal Map"), type: "VECTOR", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -241,8 +265,13 @@ let photo_to_pbr_node_def: zui_node_t = { name: _tr("Height"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/armorlab/Sources/nodes/rgb_node.ts b/armorlab/Sources/nodes/rgb_node.ts index f4097e97..8278b2c0 100644 --- a/armorlab/Sources/nodes/rgb_node.ts +++ b/armorlab/Sources/nodes/rgb_node.ts @@ -50,7 +50,11 @@ let rgb_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ @@ -58,7 +62,13 @@ let rgb_node_def: zui_node_t = { name: _tr("default_value"), type: "RGBA", output: 0, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }; diff --git a/armorlab/Sources/nodes/text_to_photo_node.ts b/armorlab/Sources/nodes/text_to_photo_node.ts index 42bc02a0..2d0378a1 100644 --- a/armorlab/Sources/nodes/text_to_photo_node.ts +++ b/armorlab/Sources/nodes/text_to_photo_node.ts @@ -265,22 +265,39 @@ let text_to_photo_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("tiling"), type: "BOOL", + output: 0, default_value: false, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: "text_to_photo_node_buttons", type: "CUSTOM", - height: 1 + output: -1, + default_value: null, + height: 1, + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }; let text_to_photo_node_text_input_ids: i32[] = [49406, 49407, 49407, 49407, 49407, 49407, 49407, 49407, 49407, diff --git a/armorlab/Sources/nodes/tiling_node.ts b/armorlab/Sources/nodes/tiling_node.ts index 36176945..c1efb5de 100644 --- a/armorlab/Sources/nodes/tiling_node.ts +++ b/armorlab/Sources/nodes/tiling_node.ts @@ -110,7 +110,11 @@ let tiling_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -120,20 +124,36 @@ let tiling_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("auto"), type: "BOOL", + output: 0, default_value: true, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: "tiling_node_buttons", type: "CUSTOM", + output: -1, + default_value: null, + data: null, + min: 0.0, + max: 1.0, + precision: 100, height: 0 } - ] + ], + width: 0 }; diff --git a/armorlab/Sources/nodes/upscale_node.ts b/armorlab/Sources/nodes/upscale_node.ts index e4efdc8b..1f26025d 100644 --- a/armorlab/Sources/nodes/upscale_node.ts +++ b/armorlab/Sources/nodes/upscale_node.ts @@ -138,7 +138,11 @@ let upscale_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -148,8 +152,13 @@ let upscale_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/armorlab/Sources/nodes/variance_node.ts b/armorlab/Sources/nodes/variance_node.ts index 028efce7..42b633e6 100644 --- a/armorlab/Sources/nodes/variance_node.ts +++ b/armorlab/Sources/nodes/variance_node.ts @@ -94,7 +94,11 @@ let variance_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -102,7 +106,11 @@ let variance_node_def: zui_node_t = { name: _tr("Strength"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -112,14 +120,25 @@ let variance_node_def: zui_node_t = { name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: "variance_node_buttons", type: "CUSTOM", + output: -1, + default_value: null, + data: null, + min: 0.0, + max: 1.0, + precision: 100, height: 1 } - ] + ], + width: 0 }; diff --git a/armorpaint/Assets/default_brush.arm b/armorpaint/Assets/default_brush.arm index 68b696d0..c140c4c4 100644 Binary files a/armorpaint/Assets/default_brush.arm and b/armorpaint/Assets/default_brush.arm differ diff --git a/armorpaint/Assets/default_material.arm b/armorpaint/Assets/default_material.arm index c9cca0ab..b7853ca8 100644 Binary files a/armorpaint/Assets/default_material.arm and b/armorpaint/Assets/default_material.arm differ diff --git a/armorpaint/Sources/nodes/brush_output_node.ts b/armorpaint/Sources/nodes/brush_output_node.ts index cc4806aa..9e67a9fe 100644 --- a/armorpaint/Sources/nodes/brush_output_node.ts +++ b/armorpaint/Sources/nodes/brush_output_node.ts @@ -155,7 +155,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Position"), // type: "VECTOR", // color: 0xff63c763, -// default_value: f32([0.0, 0.0, 0.0]) +// default_value: f32([0.0, 0.0, 0.0]), +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // }, // { // id: 0, @@ -163,7 +167,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Radius"), // type: "VALUE", // color: 0xffa1a1a1, -// default_value: 1.0 +// default_value: 1.0, +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // }, // { // id: 0, @@ -171,7 +179,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Scale"), // type: "VALUE", // color: 0xffa1a1a1, -// default_value: 1.0 +// default_value: 1.0, +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // }, // { // id: 0, @@ -179,7 +191,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Angle"), // type: "VALUE", // color: 0xffa1a1a1, -// default_value: 0.0 +// default_value: 0.0, +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // }, // { // id: 0, @@ -187,7 +203,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Opacity"), // type: "VALUE", // color: 0xffa1a1a1, -// default_value: 1.0 +// default_value: 1.0, +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // }, // { // id: 0, @@ -195,7 +215,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Hardness"), // type: "VALUE", // color: 0xffa1a1a1, -// default_value: 1.0 +// default_value: 1.0, +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // }, // { // id: 0, @@ -203,7 +227,11 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // name: _tr("Stencil"), // type: "VALUE", // color: 0xffa1a1a1, -// default_value: 1.0 +// default_value: 1.0, +// min: 0.0, +// max: 1.0, +// precision: 100, +// display: 0 // } // ], // outputs: [], @@ -211,8 +239,14 @@ function brush_output_node_run(self: brush_output_node_t, from: i32) { // { // name: _tr("Directional"), // type: "BOOL", +// output: 0, // default_value: false, -// output: 0 +// data: null, +// min: 0.0, +// max: 1.0, +// precision: 100, +// height: 0 // } -// ] +// ], +// width: 0 // }; diff --git a/armorpaint/Sources/nodes/input_node.ts b/armorpaint/Sources/nodes/input_node.ts index 8ed0e977..38255d15 100644 --- a/armorpaint/Sources/nodes/input_node.ts +++ b/armorpaint/Sources/nodes/input_node.ts @@ -141,7 +141,11 @@ let input_node_def: zui_node_t = { name: _tr("Lazy Radius"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -149,7 +153,11 @@ let input_node_def: zui_node_t = { name: _tr("Lazy Step"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -159,8 +167,13 @@ let input_node_def: zui_node_t = { name: _tr("Position"), type: "VECTOR", color: 0xff63c763, - default_value: null + default_value: null, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/armorpaint/Sources/nodes/tex_image_node.ts b/armorpaint/Sources/nodes/tex_image_node.ts index 718943c6..f1a850e1 100644 --- a/armorpaint/Sources/nodes/tex_image_node.ts +++ b/armorpaint/Sources/nodes/tex_image_node.ts @@ -37,7 +37,11 @@ let tex_image_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -47,7 +51,11 @@ let tex_image_node_def: zui_node_t = { name: _tr("Color"), type: "VALUE", // Match brush output socket type color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -55,21 +63,36 @@ let tex_image_node_def: zui_node_t = { name: _tr("Alpha"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("file"), type: "ENUM", + output: -1, default_value: 0, - data: "" + data: "", + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: _tr("color_space"), type: "ENUM", + output: -1, default_value: 0, - data: ["linear", "srgb"] + data: ["linear", "srgb"], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }; diff --git a/armorpaint/Sources/tab_layers.ts b/armorpaint/Sources/tab_layers.ts index 84858bf0..17b6fd52 100644 --- a/armorpaint/Sources/tab_layers.ts +++ b/armorpaint/Sources/tab_layers.ts @@ -12,8 +12,8 @@ function tab_layers_draw_mini(htab: zui_handle_t) { let ui: zui_t = ui_base_ui; zui_set_hovered_tab_name(tr("Layers")); - let _ELEMENT_H: i32 = ui.t.ELEMENT_H; - ui.t.ELEMENT_H = math_floor(ui_base_sidebar_mini_w / 2 / zui_SCALE(ui)); + let _ELEMENT_H: i32 = ui.ops.theme.ELEMENT_H; + ui.ops.theme.ELEMENT_H = math_floor(ui_base_sidebar_mini_w / 2 / zui_SCALE(ui)); zui_begin_sticky(); zui_separator(5); @@ -28,7 +28,7 @@ function tab_layers_draw_mini(htab: zui_handle_t) { tab_layers_highlight_odd_lines(); tab_layers_draw_slots(true); - ui.t.ELEMENT_H = _ELEMENT_H; + ui.ops.theme.ELEMENT_H = _ELEMENT_H; } function tab_layers_draw_full(htab: zui_handle_t) { @@ -72,11 +72,11 @@ function tab_layers_draw_slots(mini: bool) { function tab_layers_highlight_odd_lines() { let ui: zui_t = ui_base_ui; - let step: i32 = ui.t.ELEMENT_H * 2; + let step: i32 = ui.ops.theme.ELEMENT_H * 2; let full_h: i32 = ui._window_h - ui_base_hwnds[0].scroll_offset; for (let i: i32 = 0; i < math_floor(full_h / step); ++i) { if (i % 2 == 0) { - zui_fill(0, i * step, (ui._w / zui_SCALE(ui) - 2), step, ui.t.WINDOW_BG_COL - 0x00040404); + zui_fill(0, i * step, (ui._w / zui_SCALE(ui) - 2), step, ui.ops.theme.WINDOW_BG_COL - 0x00040404); } } } @@ -261,7 +261,7 @@ function tab_layers_draw_layer_slot(l: slot_layer_t, i: i32, mini: bool) { return; } - let step: i32 = ui.t.ELEMENT_H; + let step: i32 = ui.ops.theme.ELEMENT_H; let checkw: f32 = (ui._window_w / 100 * 8) / zui_SCALE(ui); // Highlight drag destination @@ -277,14 +277,14 @@ function tab_layers_draw_layer_slot(l: slot_layer_t, i: i32, mini: bool) { let nested_group: bool = slot_layer_is_group(base_drag_layer) && to_group; if (!nested_group) { if (slot_layer_can_move(context_raw.layer, context_raw.drag_dest)) { - zui_fill(checkw, step * 2, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL); + zui_fill(checkw, step * 2, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL); } } } else if (i == project_layers.length - 1 && mouse_y < absy + step) { context_raw.drag_dest = project_layers.length - 1; if (slot_layer_can_move(context_raw.layer, context_raw.drag_dest)) { - zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL); + zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL); } } } @@ -292,13 +292,13 @@ function tab_layers_draw_layer_slot(l: slot_layer_t, i: i32, mini: bool) { if (mouse_y > absy + step && mouse_y < absy + step * 3) { context_raw.drag_dest = i; if (tab_layers_can_drop_new_layer(i)) { - zui_fill(checkw, 2 * step, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL); + zui_fill(checkw, 2 * step, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL); } } else if (i == project_layers.length - 1 && mouse_y < absy + step) { context_raw.drag_dest = project_layers.length; if (tab_layers_can_drop_new_layer(project_layers.length)) { - zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.t.HIGHLIGHT_COL); + zui_fill(checkw, 0, (ui._window_w / zui_SCALE(ui) - 2) - checkw, 2 * zui_SCALE(ui), ui.ops.theme.HIGHLIGHT_COL); } } } @@ -329,7 +329,7 @@ function tab_layers_draw_layer_slot_mini(l: slot_layer_t, i: i32) { function tab_layers_draw_layer_slot_full(l: slot_layer_t, i: i32) { let ui: zui_t = ui_base_ui; - let step: i32 = ui.t.ELEMENT_H; + let step: i32 = ui.ops.theme.ELEMENT_H; let has_panel: bool = slot_layer_is_group(l) || (slot_layer_is_layer(l) && slot_layer_get_masks(l, false) != null); if (has_panel) { @@ -346,7 +346,7 @@ function tab_layers_draw_layer_slot_full(l: slot_layer_t, i: i32) { ui._x += 2; ui._y += 3; ui._y += center; - let col: i32 = ui.t.ACCENT_SELECT_COL; + let col: i32 = ui.ops.theme.ACCENT_SELECT_COL; let parent_hidden: bool = l.parent != null && (!l.parent.visible || (l.parent.parent != null && !l.parent.parent.visible)); if (parent_hidden) { col -= 0x99000000; @@ -553,18 +553,18 @@ function tab_layers_layer_toggle_visible(l: slot_layer_t) { function tab_layers_draw_layer_highlight(l: slot_layer_t, mini: bool) { let ui: zui_t = ui_base_ui; - let step: i32 = ui.t.ELEMENT_H; + let step: i32 = ui.ops.theme.ELEMENT_H; // Separator line - zui_fill(0, 0, (ui._w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.t.SEPARATOR_COL); + zui_fill(0, 0, (ui._w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.ops.theme.SEPARATOR_COL); // Highlight selected if (context_raw.layer == l) { if (mini) { - zui_rect(1, -step * 2, ui._w / zui_SCALE(ui) - 1, step * 2 + (mini ? -1 : 1), ui.t.HIGHLIGHT_COL, 3); + zui_rect(1, -step * 2, ui._w / zui_SCALE(ui) - 1, step * 2 + (mini ? -1 : 1), ui.ops.theme.HIGHLIGHT_COL, 3); } else { - zui_rect(1, -step * 2 - 1, ui._w / zui_SCALE(ui) - 2, step * 2 + (mini ? -2 : 1), ui.t.HIGHLIGHT_COL, 2); + zui_rect(1, -step * 2 - 1, ui._w / zui_SCALE(ui) - 2, step * 2 + (mini ? -2 : 1), ui.ops.theme.HIGHLIGHT_COL, 2); } } } @@ -679,11 +679,11 @@ function tab_layers_draw_layer_icon(l: slot_layer_t, i: i32, uix: f32, uiy: f32, if (!is_typing) { if (i < 9 && operator_shortcut(map_get(config_keymap, "select_layer"), shortcut_type_t.DOWN)) { let number: string = any_to_string(i + 1) ; - let width: i32 = g2_font_width(ui.font, ui.font_size, number) + 10; - let height: i32 = g2_font_height(ui.font, ui.font_size); - g2_set_color(ui.t.TEXT_COL); + let width: i32 = g2_font_width(ui.ops.font, ui.font_size, number) + 10; + let height: i32 = g2_font_height(ui.ops.font, ui.font_size); + g2_set_color(ui.ops.theme.TEXT_COL); g2_fill_rect(uix, uiy, width, height); - g2_set_color(ui.t.ACCENT_COL); + g2_set_color(ui.ops.theme.ACCENT_COL); g2_draw_string(number, uix + 5, uiy); } } @@ -694,7 +694,7 @@ function tab_layers_draw_layer_icon(l: slot_layer_t, i: i32, uix: f32, uiy: f32, let folder_closed: rect_t = resource_tile50(icons, 2, 1); let folder_open: rect_t = resource_tile50(icons, 8, 1); let folder: rect_t = l.show_panel ? folder_open : folder_closed; - return zui_image(icons, ui.t.LABEL_COL - 0x00202020, icon_h, folder.x, folder.y, folder.w, folder.h); + return zui_image(icons, ui.ops.theme.LABEL_COL - 0x00202020, icon_h, folder.x, folder.y, folder.w, folder.h); } } diff --git a/armorsculpt/Assets/default_brush.arm b/armorsculpt/Assets/default_brush.arm index ab3d76a5..3f2c3ea2 100644 Binary files a/armorsculpt/Assets/default_brush.arm and b/armorsculpt/Assets/default_brush.arm differ diff --git a/armorsculpt/Assets/default_material.arm b/armorsculpt/Assets/default_material.arm index f9514e4a..d6cb2822 100644 Binary files a/armorsculpt/Assets/default_material.arm and b/armorsculpt/Assets/default_material.arm differ diff --git a/base/Sources/base.ts b/base/Sources/base.ts index 99b399bd..c0cefee6 100644 --- a/base/Sources/base.ts +++ b/base/Sources/base.ts @@ -240,7 +240,7 @@ function base_init() { zui_tr = tr; base_ui_box = zui_create({ theme: base_theme, font: f, scale_factor: config_raw.window_scale, color_wheel: base_color_wheel, black_white_gradient: base_color_wheel_gradient }); base_ui_menu = zui_create({ theme: base_theme, font: f, scale_factor: config_raw.window_scale, color_wheel: base_color_wheel, black_white_gradient: base_color_wheel_gradient }); - base_default_element_h = base_ui_menu.t.ELEMENT_H; + base_default_element_h = base_ui_menu.ops.theme.ELEMENT_H; // Init plugins if (config_raw.plugins != null) { @@ -738,7 +738,7 @@ function base_get_drag_image(): image_t { if (base_drag_file_icon != null) return base_drag_file_icon; let icons: image_t = resource_get("icons.k"); base_drag_rect = string_index_of(base_drag_file, ".") > 0 ? resource_tile50(icons, 3, 1) : resource_tile50(icons, 2, 1); - base_drag_tint = ui_base_ui.t.HIGHLIGHT_COL; + base_drag_tint = ui_base_ui.ops.theme.HIGHLIGHT_COL; return icons; } @@ -751,7 +751,7 @@ function base_get_drag_image(): image_t { let folder_closed: rect_t = resource_tile50(icons, 2, 1); let folder_open: rect_t = resource_tile50(icons, 8, 1); base_drag_rect = base_drag_layer.show_panel ? folder_open : folder_closed; - base_drag_tint = ui_base_ui.t.LABEL_COL - 0x00202020; + base_drag_tint = ui_base_ui.ops.theme.LABEL_COL - 0x00202020; return icons; } if (base_drag_layer != null && slot_layer_is_mask(base_drag_layer) && base_drag_layer.fill_layer == null) { diff --git a/base/Sources/box_preferences.ts b/base/Sources/box_preferences.ts index a17a4fdf..c69e0d26 100644 --- a/base/Sources/box_preferences.ts +++ b/base/Sources/box_preferences.ts @@ -91,7 +91,7 @@ function box_preferences_show() { ui_menu_draw(function (ui: zui_t) { if (ui_menu_button(ui, tr("Confirm"))) { app_notify_on_init(function () { - ui.t.ELEMENT_H = base_default_element_h; + ui.ops.theme.ELEMENT_H = base_default_element_h; config_restore(); box_preferences_set_scale(); if (box_preferences_files_plugin != null) { @@ -111,7 +111,7 @@ function box_preferences_show() { let b: buffer_t = data_get_blob(path); let raw: config_t = json_parse(sys_buffer_to_string(b)); app_notify_on_init(function (raw: config_t) { - ui.t.ELEMENT_H = base_default_element_h; + ui.ops.theme.ELEMENT_H = base_default_element_h; config_import_from(raw); box_preferences_set_scale(); make_material_parse_mesh_material(); @@ -199,7 +199,7 @@ function box_preferences_show() { if (ui.is_hovered && ui.input_released) { ui_menu_draw(function (ui: zui_t) { ui.changed = false; - zui_color_wheel(h, false, null, 11 * ui.t.ELEMENT_H * zui_SCALE(ui), true); + zui_color_wheel(h, false, null, 11 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), true); if (ui.changed) { ui_menu_keep_open = true; } @@ -246,7 +246,7 @@ function box_preferences_show() { h.color = theme[key]; ui_menu_draw(function (ui: zui_t) { ui.changed = false; - let color: i32 = zui_color_wheel(h, false, null, 11 * ui.t.ELEMENT_H * zui_SCALE(ui), true); + let color: i32 = zui_color_wheel(h, false, null, 11 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), true); let theme: any = base_theme; theme[key] = color; if (ui.changed) { diff --git a/base/Sources/box_projects.ts b/base/Sources/box_projects.ts index 4e436bcb..f9ee5e96 100644 --- a/base/Sources/box_projects.ts +++ b/base/Sources/box_projects.ts @@ -118,7 +118,7 @@ function box_projects_tab(ui: zui_t) { let uix: i32 = ui._x; if (icon != null) { - zui_fill(0, 0, 128, 128, ui.t.SEPARATOR_COL); + zui_fill(0, 0, 128, 128, ui.ops.theme.SEPARATOR_COL); let state: i32 = zui_image(icon, 0xffffffff, 128 * zui_SCALE(ui)); if (state == zui_state_t.RELEASED) { diff --git a/base/Sources/config.ts b/base/Sources/config.ts index 89fba765..68241a87 100644 --- a/base/Sources/config.ts +++ b/base/Sources/config.ts @@ -267,7 +267,16 @@ function config_load_theme(theme: string, tag_redraw: bool = true) { if (tag_redraw) { for (let i: i32 = 0; i < base_get_uis().length; ++i) { let ui: zui_t = base_get_uis()[i]; - ui.t = base_theme; + + // ui.ops.theme = base_theme; + + for (let i: i32 = 0; i < zui_theme_keys.length; ++i) { + let key: string = zui_theme_keys[i]; + // @ts-ignore + ui.ops.theme[key] = base_theme[key]; + } + base_theme = ui.ops.theme; + } ui_base_tag_ui_redraw(); } diff --git a/base/Sources/nodes/float_node.ts b/base/Sources/nodes/float_node.ts index cf5eff17..8fffd312 100644 --- a/base/Sources/nodes/float_node.ts +++ b/base/Sources/nodes/float_node.ts @@ -67,7 +67,9 @@ let float_node_def: zui_node_t = { color: 0xffa1a1a1, default_value: 0.5, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -77,8 +79,13 @@ let float_node_def: zui_node_t = { name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/base/Sources/nodes/math_node.ts b/base/Sources/nodes/math_node.ts index 8afde6a6..ef51aac9 100644 --- a/base/Sources/nodes/math_node.ts +++ b/base/Sources/nodes/math_node.ts @@ -145,7 +145,11 @@ let math_node_def: zui_node_t = { name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -153,7 +157,11 @@ let math_node_def: zui_node_t = { name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -163,22 +171,36 @@ let math_node_def: zui_node_t = { name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("operation"), type: "ENUM", - data: ["Add", "Subtract", "Multiply", "Divide", "Power", "Logarithm", "Square Root", "Inverse Square Root", "Absolute", "Exponent", "Minimum", "Maximum", "Less Than", "Greater Than", "Sign", "Round", "Floor", "Ceil", "Truncate", "Fraction", "Modulo", "Snap", "Ping-Pong", "Sine", "Cosine", "Tangent", "Arcsine", "Arccosine", "Arctangent", "Arctan2", "Hyperbolic Sine", "Hyperbolic Cosine", "Hyperbolic Tangent", "To Radians", "To Degrees"], + output: 0, default_value: 0, - output: 0 + data: ["Add", "Subtract", "Multiply", "Divide", "Power", "Logarithm", "Square Root", "Inverse Square Root", "Absolute", "Exponent", "Minimum", "Maximum", "Less Than", "Greater Than", "Sign", "Round", "Floor", "Ceil", "Truncate", "Fraction", "Modulo", "Snap", "Ping-Pong", "Sine", "Cosine", "Tangent", "Arcsine", "Arccosine", "Arctangent", "Arctan2", "Hyperbolic Sine", "Hyperbolic Cosine", "Hyperbolic Tangent", "To Radians", "To Degrees"], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: _tr("use_clamp"), type: "BOOL", + output: 0, default_value: false, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }; diff --git a/base/Sources/nodes/random_node.ts b/base/Sources/nodes/random_node.ts index eacbb37e..4373fd24 100644 --- a/base/Sources/nodes/random_node.ts +++ b/base/Sources/nodes/random_node.ts @@ -70,7 +70,11 @@ let random_node_def: zui_node_t = { name: _tr("Min"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -78,7 +82,11 @@ let random_node_def: zui_node_t = { name: _tr("Max"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -88,8 +96,13 @@ let random_node_def: zui_node_t = { name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/base/Sources/nodes/separate_vector_node.ts b/base/Sources/nodes/separate_vector_node.ts index f743244e..ebee1733 100644 --- a/base/Sources/nodes/separate_vector_node.ts +++ b/base/Sources/nodes/separate_vector_node.ts @@ -40,7 +40,11 @@ let separate_vector_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -50,7 +54,11 @@ let separate_vector_node_def: zui_node_t = { name: _tr("X"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -58,7 +66,11 @@ let separate_vector_node_def: zui_node_t = { name: _tr("Y"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -66,8 +78,13 @@ let separate_vector_node_def: zui_node_t = { name: _tr("Z"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/base/Sources/nodes/time_node.ts b/base/Sources/nodes/time_node.ts index bd22fb42..1793ab70 100644 --- a/base/Sources/nodes/time_node.ts +++ b/base/Sources/nodes/time_node.ts @@ -40,7 +40,11 @@ let time_node_def: zui_node_t = { name: _tr("Time"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -48,7 +52,11 @@ let time_node_def: zui_node_t = { name: _tr("Delta"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -56,8 +64,13 @@ let time_node_def: zui_node_t = { name: _tr("Brush"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/base/Sources/nodes/vector_math_node.ts b/base/Sources/nodes/vector_math_node.ts index 322bc8b0..b205b567 100644 --- a/base/Sources/nodes/vector_math_node.ts +++ b/base/Sources/nodes/vector_math_node.ts @@ -154,7 +154,11 @@ let vector_math_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -162,7 +166,11 @@ let vector_math_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -172,7 +180,11 @@ let vector_math_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -180,16 +192,25 @@ let vector_math_node_def: zui_node_t = { name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("operation"), type: "ENUM", - data: ["Add", "Subtract", "Multiply", "Divide", "Average", "Cross Product", "Project", "Reflect", "Dot Product", "Distance", "Length", "Scale", "Normalize", "Absolute", "Minimum", "Maximum", "Floor", "Ceil", "Fraction", "Modulo", "Snap", "Sine", "Cosine", "Tangent"], + output: 0, default_value: 0, - output: 0 + data: ["Add", "Subtract", "Multiply", "Divide", "Average", "Cross Product", "Project", "Reflect", "Dot Product", "Distance", "Length", "Scale", "Normalize", "Absolute", "Minimum", "Maximum", "Floor", "Ceil", "Fraction", "Modulo", "Snap", "Sine", "Cosine", "Tangent"], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }; diff --git a/base/Sources/nodes/vector_node.ts b/base/Sources/nodes/vector_node.ts index 557105d1..41fdfabc 100644 --- a/base/Sources/nodes/vector_node.ts +++ b/base/Sources/nodes/vector_node.ts @@ -70,7 +70,11 @@ let vector_node_def: zui_node_t = { name: _tr("X"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -78,7 +82,11 @@ let vector_node_def: zui_node_t = { name: _tr("Y"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -86,7 +94,11 @@ let vector_node_def: zui_node_t = { name: _tr("Z"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -96,8 +108,13 @@ let vector_node_def: zui_node_t = { name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }; diff --git a/base/Sources/nodes_material.ts b/base/Sources/nodes_material.ts index 79cecee5..6ba7ca5a 100644 --- a/base/Sources/nodes_material.ts +++ b/base/Sources/nodes_material.ts @@ -25,7 +25,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -33,7 +37,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -41,15 +49,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("Name"), - type: "STRING" + type: "STRING", + output: -1, + default_value: null, + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -66,7 +86,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("View Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -74,7 +98,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("View Z Depth"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -82,10 +110,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("View Distance"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -102,8 +135,10 @@ let nodes_material_list: zui_node_t[][] = [ type: "VALUE", color: 0xffa1a1a1, default_value: 1.45, - min: 0, - max: 3 + min: 0.0, + max: 3.0, + precision: 100, + display: 0 }, { id: 0, @@ -111,7 +146,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -121,10 +160,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -141,7 +185,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Position"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -149,7 +197,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -157,7 +209,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Tangent"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -165,7 +221,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("True Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -173,7 +233,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Incoming"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -181,7 +245,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Parametric"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -189,7 +257,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Backfacing"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -197,7 +269,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Pointiness"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -205,10 +281,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Random Per Island"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -225,7 +306,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Base Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -233,7 +318,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Opacity"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -241,7 +330,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Occlusion"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -249,7 +342,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Roughness"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -257,7 +354,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Metallic"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -265,7 +366,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -273,7 +378,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Emission"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -281,7 +390,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Height"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -289,17 +402,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Subsurface"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("Layer"), type: "ENUM", + output: -1, default_value: 0, - data: "" + data: "", + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -316,17 +439,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("Layer"), type: "ENUM", + output: -1, default_value: 0, - data: "" + data: "", + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -342,7 +475,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Blend"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -350,7 +487,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -360,7 +501,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fresnel"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -368,10 +513,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Facing"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -388,7 +538,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Base Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -396,7 +550,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Opacity"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -404,7 +562,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Occlusion"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -412,7 +574,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Roughness"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -420,7 +586,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Metallic"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -428,7 +598,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -436,7 +610,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Emission"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -444,7 +622,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Height"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -452,17 +634,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Subsurface"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("Material"), type: "ENUM", + output: -1, default_value: 0, - data: "" + data: "", + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -479,7 +671,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Location"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -487,7 +683,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -495,7 +695,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Object Index"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -503,7 +707,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Material Index"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -511,10 +719,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Random"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -531,7 +744,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Base Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -539,7 +756,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Opacity"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -547,7 +768,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Occlusion"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -555,7 +780,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Roughness"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -563,7 +792,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Metallic"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -571,7 +804,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -579,7 +816,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Emission"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -587,7 +828,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Height"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -595,10 +840,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Subsurface"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -615,16 +865,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0) + default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("default_value"), type: "RGBA", - output: 0 + output: 0, + default_value: null, + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -641,16 +902,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: " ", type: "STRING", - default_value: "" + output: -1, + default_value: "", + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -667,16 +939,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: " ", type: "STRING", - default_value: "" + output: -1, + default_value: "", + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -693,10 +976,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Tangent"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -713,7 +1001,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Generated"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -721,7 +1013,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -729,7 +1025,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("UV"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -737,7 +1037,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Object"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -745,7 +1049,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Camera"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -753,7 +1061,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Window"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -761,7 +1073,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Reflection"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [] @@ -781,10 +1097,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("UV"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -801,7 +1122,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ @@ -809,10 +1134,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("default_value"), type: "VALUE", output: 0, + default_value: null, + data: null, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -829,7 +1159,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -837,10 +1171,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Alpha"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -857,7 +1196,10 @@ let nodes_material_list: zui_node_t[][] = [ type: "VALUE", color: 0xffa1a1a1, default_value: 0.01, - max: 0.1 + min: 0.0, + max: 0.1, + precision: 100, + display: 0 }, ], outputs: [ @@ -867,17 +1209,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("Pixel Size"), type: "BOOL", + output: 0, default_value: false, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, ], // [ // Output @@ -895,7 +1247,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Base Color"), // type: "RGBA", // color: 0xffc7c729, - // default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + // default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -903,7 +1259,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Opacity"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 1.0 + // default_value: 1.0, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -911,7 +1271,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Occlusion"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 1.0 + // default_value: 1.0, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -919,7 +1283,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Roughness"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 0.1 + // default_value: 0.1, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -927,7 +1295,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Metallic"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 0.0 + // default_value: 0.0, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -935,7 +1307,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Normal Map"), // type: "VECTOR", // color: -10238109, - // default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + // default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -943,7 +1319,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Emission"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 0.0 + // default_value: 0.0, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -951,7 +1331,11 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Height"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 0.0 + // default_value: 0.0, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // }, // { // id: 0, @@ -959,11 +1343,16 @@ let nodes_material_list: zui_node_t[][] = [ // name: _tr("Subsurface"), // type: "VALUE", // color: 0xffa1a1a1, - // default_value: 0.0 + // default_value: 0.0, + // min: 0.0, + // max: 1.0, + // precision: 100, + // display: 0 // } // ], // outputs: [], - // buttons: [] + // buttons: [], + // width: 0 // } // ], [ // Texture @@ -981,7 +1370,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -989,7 +1382,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color 1"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyz(0.8, 0.8, 0.8) + default_value: f32_array_create_xyz(0.8, 0.8, 0.8), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -997,7 +1394,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color 2"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyz(0.2, 0.2, 0.2) + default_value: f32_array_create_xyz(0.2, 0.2, 0.2), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1005,7 +1406,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Mortar"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1015,7 +1420,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1025,7 +1432,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1033,10 +1444,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1052,7 +1468,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1060,7 +1480,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color 1"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyz(0.8, 0.8, 0.8) + default_value: f32_array_create_xyz(0.8, 0.8, 0.8), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1068,7 +1492,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color 2"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyz(0.2, 0.2, 0.2) + default_value: f32_array_create_xyz(0.2, 0.2, 0.2), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1078,7 +1506,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1088,7 +1518,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1096,10 +1530,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1117,7 +1556,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 1.0, min: 0.0, - max: 2.0 + max: 2.0, + precision: 100, + display: 0 }, { id: 0, @@ -1127,7 +1568,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 1.0, min: 0.0, - max: 2.0 + max: 2.0, + precision: 100, + display: 0 }, { id: 0, @@ -1137,7 +1580,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 0.0, min: -2.0, - max: 2.0 + max: 2.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1147,10 +1592,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1166,7 +1616,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1176,7 +1630,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1184,19 +1642,28 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("gradient_type"), type: "ENUM", - // data: ["Linear", "Quadratic", "Easing", "Diagonal", "Radial", "Quadratic Sphere", "Spherical"], - data: [_tr("Linear"), _tr("Diagonal"), _tr("Radial"), _tr("Spherical")], + output: 0, default_value: 0, - output: 0 + // data: ["Linear", "Quadratic", "Easing", "Diagonal", "Radial", "Quadratic Sphere", "Spherical"] + data: [_tr("Linear"), _tr("Diagonal"), _tr("Radial"), _tr("Spherical")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -1212,7 +1679,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1222,7 +1693,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1230,23 +1705,38 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Alpha"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("File"), type: "ENUM", + output: -1, default_value: 0, - data: "" + data: "", + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: _tr("Color Space"), type: "ENUM", + output: -1, default_value: 0, - data: [_tr("Auto"), _tr("Linear"), _tr("sRGB"), _tr("DirectX Normal Map")] + data: [_tr("Auto"), _tr("Linear"), _tr("sRGB"), _tr("DirectX Normal Map")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -1262,7 +1752,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1272,7 +1766,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1282,7 +1778,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1290,10 +1790,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1309,7 +1814,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1319,7 +1828,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1329,10 +1840,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Height"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1348,7 +1864,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1358,7 +1878,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1368,7 +1890,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1376,10 +1902,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1395,7 +1926,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1405,7 +1940,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1415,7 +1952,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1423,18 +1964,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("coloring"), type: "ENUM", - data: [_tr("Intensity"), _tr("Cells")], + output: 0, default_value: 0, - output: 0 + data: [_tr("Intensity"), _tr("Cells")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -1450,7 +2000,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1460,7 +2014,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 5.0, min: 0.0, - max: 10.0 + max: 10.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1470,7 +2026,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1478,10 +2038,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 } ], [ // Color @@ -1499,7 +2064,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1507,7 +2076,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Strength"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1517,10 +2090,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1536,7 +2114,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1544,7 +2126,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Bright"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1552,7 +2138,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Contrast"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1562,10 +2152,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1581,7 +2176,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1589,7 +2188,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Gamma"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1599,10 +2202,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1618,7 +2226,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Hue"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1626,7 +2238,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Saturation"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1634,7 +2250,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1642,7 +2262,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1650,7 +2274,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1660,10 +2288,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1679,7 +2312,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1687,7 +2324,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1697,10 +2338,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1716,7 +2362,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1724,7 +2374,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color 1"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0) + default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1732,7 +2386,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color 2"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0) + default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1742,24 +2400,38 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("blend_type"), type: "ENUM", - data: [_tr("Mix"), _tr("Darken"), _tr("Multiply"), _tr("Burn"), _tr("Lighten"), _tr("Screen"), _tr("Dodge"), _tr("Add"), _tr("Overlay"), _tr("Soft Light"), _tr("Linear Light"), _tr("Difference"), _tr("Subtract"), _tr("Divide"), _tr("Hue"), _tr("Saturation"), _tr("Color"), _tr("Value")], + output: 0, default_value: 0, - output: 0 + data: [_tr("Mix"), _tr("Darken"), _tr("Multiply"), _tr("Burn"), _tr("Lighten"), _tr("Screen"), _tr("Dodge"), _tr("Add"), _tr("Overlay"), _tr("Soft Light"), _tr("Linear Light"), _tr("Difference"), _tr("Subtract"), _tr("Divide"), _tr("Hue"), _tr("Saturation"), _tr("Color"), _tr("Value")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: _tr("use_clamp"), type: "BOOL", + output: 0, default_value: false, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -1776,8 +2448,10 @@ let nodes_material_list: zui_node_t[][] = [ type: "VALUE", color: 0xffa1a1a1, default_value: 0.1, - min: 0, - max: 1 + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1785,7 +2459,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1795,10 +2473,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1814,7 +2497,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1824,7 +2511,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 0.0, min: 0.0, - max: 360.0 + max: 360.0, + precision: 100, + display: 0 }, { id: 0, @@ -1834,7 +2523,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 0.5, min: 0.0, - max: 1.0 + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1844,10 +2535,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 } ], [ // Vector @@ -1865,7 +2561,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Strength"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1873,7 +2573,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Distance"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1881,7 +2585,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Height"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1889,7 +2597,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1899,10 +2611,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1918,7 +2635,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1927,6 +2648,9 @@ let nodes_material_list: zui_node_t[][] = [ type: "VECTOR", color: 0xff6363c7, default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, display: 1 }, { @@ -1936,7 +2660,9 @@ let nodes_material_list: zui_node_t[][] = [ type: "VECTOR", color: 0xff6363c7, default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, max: 360.0, + precision: 100, display: 1 }, { @@ -1946,6 +2672,9 @@ let nodes_material_list: zui_node_t[][] = [ type: "VECTOR", color: 0xff6363c7, default_value: f32_array_create_xyz(1.0, 1.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, display: 1 } ], @@ -1956,10 +2685,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -1975,7 +2709,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map 1"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -1983,7 +2721,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map 2"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -1993,18 +2735,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("blend_type"), type: "ENUM", - data: [_tr("Partial Derivative"), _tr("Whiteout"), _tr("Reoriented")], + output: 0, default_value: 0, - output: 0 + data: [_tr("Partial Derivative"), _tr("Whiteout"), _tr("Reoriented")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -2020,7 +2771,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2030,7 +2785,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2038,17 +2797,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Dot"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("Vector"), type: "VECTOR", + output: 0, default_value: f32_array_create_xyz(0.0, 0.0, 0.0), - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -2066,7 +2835,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 1.0, min: 0.0, - max: 2.0 + max: 2.0, + precision: 100, + display: 0 }, { id: 0, @@ -2074,7 +2845,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2084,10 +2859,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Normal Map"), type: "VECTOR", color: -10238109, - default_value: f32_array_create_xyz(0.5, 0.5, 1.0) + default_value: f32_array_create_xyz(0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2103,7 +2883,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2111,7 +2895,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2121,18 +2909,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: "nodes_material_vector_curves_button", type: "CUSTOM", - default_value: [[f32_array_create_xy(0.0, 0.0), f32_array_create_xy(0.0, 0.0)], [f32_array_create_xy(0.0, 0.0), f32_array_create_xy(0.0, 0.0)], [f32_array_create_xy(0.0, 0.0), f32_array_create_xy(0.0, 0.0)]], output: 0, + default_value: [[f32_array_create_xy(0.0, 0.0), f32_array_create_xy(0.0, 0.0)], [f32_array_create_xy(0.0, 0.0), f32_array_create_xy(0.0, 0.0)], [f32_array_create_xy(0.0, 0.0), f32_array_create_xy(0.0, 0.0)]], + data: null, + min: 0.0, + max: 1.0, + precision: 100, height: 8.5 } - ] + ], + width: 0 } ], [ // Converter @@ -2150,7 +2947,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2158,7 +2959,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Min"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2166,7 +2971,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Max"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2176,18 +2985,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("operation"), type: "ENUM", - data: [_tr("Min Max"), _tr("Range")], + output: 0, default_value: 0, - output: 0 + data: [_tr("Min Max"), _tr("Range")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -2203,7 +3021,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fac"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2213,7 +3035,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2221,19 +3047,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Alpha"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: "nodes_material_color_ramp_button", type: "CUSTOM", + output: 0, default_value: [f32_array_create_xyzwv(1.0, 1.0, 1.0, 1.0, 0.0)], data: 0, - output: 0, + min: 0.0, + max: 1.0, + precision: 100, height: 4.5 } - ] + ], + width: 0 }, { id: 0, @@ -2249,7 +3083,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2257,7 +3095,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Mask Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2267,7 +3109,9 @@ let nodes_material_list: zui_node_t[][] = [ color: 0xffa1a1a1, default_value: 0.1, min: 0.0, - max: 1.74 + max: 1.74, + precision: 100, + display: 0 }, { id: 0, @@ -2275,7 +3119,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Fuzziness"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2285,10 +3133,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Mask"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2304,7 +3157,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("H"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2312,7 +3169,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("S"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2320,7 +3181,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("V"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2330,10 +3195,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2349,7 +3219,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("R"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2357,7 +3231,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("G"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2365,7 +3243,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("B"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2375,10 +3257,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2394,7 +3281,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("X"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2402,7 +3293,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Y"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2410,7 +3305,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Z"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2420,10 +3319,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2439,7 +3343,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2447,7 +3355,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("From Min"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2455,7 +3367,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("From Max"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2463,7 +3379,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("To Min"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2471,7 +3391,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("To Max"), type: "VALUE", color: 0xffa1a1a1, - default_value: 1.0 + default_value: 1.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2481,17 +3405,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("use_clamp"), type: "BOOL", + output: 0, default_value: false, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -2507,7 +3441,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2515,7 +3453,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.5 + default_value: 0.5, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2525,24 +3467,38 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("operation"), type: "ENUM", - data: [_tr("Add"), _tr("Subtract"), _tr("Multiply"), _tr("Divide"), _tr("Power"), _tr("Logarithm"), _tr("Square Root"), _tr("Inverse Square Root"), _tr("Absolute"), _tr("Exponent"), _tr("Minimum"), _tr("Maximum"), _tr("Less Than"), _tr("Greater Than"), _tr("Sign"), _tr("Round"), _tr("Floor"), _tr("Ceil"), _tr("Truncate"), _tr("Fraction"), _tr("Modulo"), _tr("Snap"), _tr("Ping-Pong"), _tr("Sine"), _tr("Cosine"), _tr("Tangent"), _tr("Arcsine"), _tr("Arccosine"), _tr("Arctangent"), _tr("Arctan2"), _tr("Hyperbolic Sine"), _tr("Hyperbolic Cosine"), _tr("Hyperbolic Tangent"), _tr("To Radians"), _tr("To Degrees")], + output: 0, default_value: 0, - output: 0 + data: [_tr("Add"), _tr("Subtract"), _tr("Multiply"), _tr("Divide"), _tr("Power"), _tr("Logarithm"), _tr("Square Root"), _tr("Inverse Square Root"), _tr("Absolute"), _tr("Exponent"), _tr("Minimum"), _tr("Maximum"), _tr("Less Than"), _tr("Greater Than"), _tr("Sign"), _tr("Round"), _tr("Floor"), _tr("Ceil"), _tr("Truncate"), _tr("Fraction"), _tr("Modulo"), _tr("Snap"), _tr("Ping-Pong"), _tr("Sine"), _tr("Cosine"), _tr("Tangent"), _tr("Arcsine"), _tr("Arccosine"), _tr("Arctangent"), _tr("Arctan2"), _tr("Hyperbolic Sine"), _tr("Hyperbolic Cosine"), _tr("Hyperbolic Tangent"), _tr("To Radians"), _tr("To Degrees")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 }, { name: _tr("use_clamp"), type: "BOOL", + output: 0, default_value: false, - output: 0 + data: null, + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 }, { id: 0, @@ -2558,7 +3514,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 0.0) + default_value: f32_array_create_xyzw(0.0, 0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2568,10 +3528,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Val"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2587,7 +3552,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0) + default_value: f32_array_create_xyzw(0.5, 0.5, 0.5, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2597,7 +3566,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("H"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2605,7 +3578,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("S"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2613,10 +3590,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("V"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2632,7 +3614,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Color"), type: "RGBA", color: 0xffc7c729, - default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0) + default_value: f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2642,7 +3628,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("R"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2650,7 +3640,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("G"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2658,10 +3652,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("B"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2677,7 +3676,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2687,7 +3690,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("X"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2695,7 +3702,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Y"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2703,10 +3714,15 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Z"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], - buttons: [] + buttons: [], + width: 0 }, { id: 0, @@ -2722,7 +3738,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2730,7 +3750,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], outputs: [ @@ -2740,7 +3764,11 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Vector"), type: "VECTOR", color: 0xff6363c7, - default_value: f32_array_create_xyz(0.0, 0.0, 0.0) + default_value: f32_array_create_xyz(0.0, 0.0, 0.0), + min: 0.0, + max: 1.0, + precision: 100, + display: 0 }, { id: 0, @@ -2748,18 +3776,27 @@ let nodes_material_list: zui_node_t[][] = [ name: _tr("Value"), type: "VALUE", color: 0xffa1a1a1, - default_value: 0.0 + default_value: 0.0, + min: 0.0, + max: 1.0, + precision: 100, + display: 0 } ], buttons: [ { name: _tr("operation"), type: "ENUM", - data: [_tr("Add"), _tr("Subtract"), _tr("Multiply"), _tr("Divide"), _tr("Average"), _tr("Cross Product"), _tr("Project"), _tr("Reflect"), _tr("Dot Product"), _tr("Distance"), _tr("Length"), _tr("Scale"), _tr("Normalize"), _tr("Absolute"), _tr("Minimum"), _tr("Maximum"), _tr("Floor"), _tr("Ceil"), _tr("Fraction"), _tr("Modulo"), _tr("Snap"), _tr("Sine"), _tr("Cosine"), _tr("Tangent")], + output: 0, default_value: 0, - output: 0 + data: [_tr("Add"), _tr("Subtract"), _tr("Multiply"), _tr("Divide"), _tr("Average"), _tr("Cross Product"), _tr("Project"), _tr("Reflect"), _tr("Dot Product"), _tr("Distance"), _tr("Length"), _tr("Scale"), _tr("Normalize"), _tr("Absolute"), _tr("Minimum"), _tr("Maximum"), _tr("Floor"), _tr("Ceil"), _tr("Fraction"), _tr("Modulo"), _tr("Snap"), _tr("Sine"), _tr("Cosine"), _tr("Tangent")], + min: 0.0, + max: 1.0, + precision: 100, + height: 0 } - ] + ], + width: 0 } ], [ // Input @@ -2776,9 +3813,16 @@ let nodes_material_list: zui_node_t[][] = [ { name: "nodes_material_new_group_button", type: "CUSTOM", + output: -1, + default_value: null, + data: null, + min: 0.0, + max: 1.0, + precision: 100, height: 1 } - ] + ], + width: 0 } ] ]; diff --git a/base/Sources/parser_material.ts b/base/Sources/parser_material.ts index a25af16b..7de166e9 100644 --- a/base/Sources/parser_material.ts +++ b/base/Sources/parser_material.ts @@ -128,7 +128,6 @@ function parser_material_init() { } function parser_material_parse(canvas: zui_node_canvas_t, _con: node_shader_context_t, _vert: node_shader_t, _frag: node_shader_t, _matcon: material_context_t): shader_out_t { - zui_nodes_update_canvas_format(canvas); parser_material_init(); parser_material_canvases = [canvas]; parser_material_nodes = canvas.nodes; diff --git a/base/Sources/tab_brushes.ts b/base/Sources/tab_brushes.ts index afe07f05..a0ac59d0 100644 --- a/base/Sources/tab_brushes.ts +++ b/base/Sources/tab_brushes.ts @@ -52,16 +52,16 @@ function tab_brushes_draw(htab: zui_handle_t) { let img_full: image_t = project_brushes[i].image; if (context_raw.brush == project_brushes[i]) { - // Zui.fill(1, -2, img.width + 3, img.height + 3, ui.t.HIGHLIGHT_COL); // TODO + // Zui.fill(1, -2, img.width + 3, img.height + 3, ui.ops.theme.HIGHLIGHT_COL); // TODO let off: i32 = row % 2 == 1 ? 1 : 0; let w: i32 = 50; if (config_raw.window_scale > 1) { w += math_floor(config_raw.window_scale * 2); } - zui_fill(-1, -2, w + 3, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-1, w - off, w + 3, 2 + off, ui.t.HIGHLIGHT_COL); - zui_fill(-1, -2, 2, w + 3, ui.t.HIGHLIGHT_COL); - zui_fill(w + 1, -2, 2, w + 4, ui.t.HIGHLIGHT_COL); + zui_fill(-1, -2, w + 3, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-1, w - off, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-1, -2, 2, w + 3, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 1, -2, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); } let uix: f32 = ui._x; diff --git a/base/Sources/tab_console.ts b/base/Sources/tab_console.ts index b9c01c09..469a05e5 100644 --- a/base/Sources/tab_console.ts +++ b/base/Sources/tab_console.ts @@ -51,7 +51,7 @@ function tab_console_draw(htab: zui_handle_t) { zui_end_sticky(); - let _font: g2_font_t = ui.font; + let _font: g2_font_t = ui.ops.font; let _fontSize: i32 = ui.font_size; let f: g2_font_t = data_get_font("font_mono.ttf"); zui_set_font(ui, f); diff --git a/base/Sources/tab_fonts.ts b/base/Sources/tab_fonts.ts index c909b046..a0712014 100644 --- a/base/Sources/tab_fonts.ts +++ b/base/Sources/tab_fonts.ts @@ -60,16 +60,16 @@ function tab_fonts_draw(htab: zui_handle_t) { let img: image_t = project_fonts[i].image; if (context_raw.font == project_fonts[i]) { - // Zui.fill(1, -2, img.width + 3, img.height + 3, ui.t.HIGHLIGHT_COL); // TODO + // Zui.fill(1, -2, img.width + 3, img.height + 3, ui.ops.theme.HIGHLIGHT_COL); // TODO let off: i32 = row % 2 == 1 ? 1 : 0; let w: i32 = 50; if (config_raw.window_scale > 1) { w += math_floor(config_raw.window_scale * 2); } - zui_fill(-1, -2, w + 3, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-1, w - off, w + 3, 2 + off, ui.t.HIGHLIGHT_COL); - zui_fill(-1, -2, 2, w + 3, ui.t.HIGHLIGHT_COL); - zui_fill(w + 1, -2, 2, w + 4, ui.t.HIGHLIGHT_COL); + zui_fill(-1, -2, w + 3, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-1, w - off, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-1, -2, 2, w + 3, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 1, -2, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); } let uix: f32 = ui._x; diff --git a/base/Sources/tab_history.ts b/base/Sources/tab_history.ts index e142a5da..f32d5de5 100644 --- a/base/Sources/tab_history.ts +++ b/base/Sources/tab_history.ts @@ -7,7 +7,7 @@ function tab_history_draw(htab: zui_handle_t) { for (let i: i32 = 0; i < history_steps.length; ++i) { let active: i32 = history_steps.length - 1 - history_redos; if (i == active) { - zui_fill(0, 0, ui._window_w, ui.t.ELEMENT_H, ui.t.HIGHLIGHT_COL); + zui_fill(0, 0, ui._window_w, ui.ops.theme.ELEMENT_H, ui.ops.theme.HIGHLIGHT_COL); } zui_text(history_steps[i].name); if (ui.is_released) { // Jump to undo step @@ -21,7 +21,7 @@ function tab_history_draw(htab: zui_handle_t) { history_undo(); } } - zui_fill(0, 0, (ui._window_w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.t.SEPARATOR_COL); + zui_fill(0, 0, (ui._window_w / zui_SCALE(ui) - 2), 1 * zui_SCALE(ui), ui.ops.theme.SEPARATOR_COL); } } } diff --git a/base/Sources/tab_materials.ts b/base/Sources/tab_materials.ts index fe0f01cf..00f77cc6 100644 --- a/base/Sources/tab_materials.ts +++ b/base/Sources/tab_materials.ts @@ -85,7 +85,7 @@ function tab_materials_draw_slots(mini: bool) { if (context_raw.material == project_materials[i]) { if (mini) { let w: f32 = ui._w / zui_SCALE(ui); - zui_rect(0, -2, w - 2, w - 4, ui.t.HIGHLIGHT_COL, 3); + zui_rect(0, -2, w - 2, w - 4, ui.ops.theme.HIGHLIGHT_COL, 3); } else { let off: i32 = row % 2 == 1 ? 1 : 0; @@ -93,10 +93,10 @@ function tab_materials_draw_slots(mini: bool) { if (config_raw.window_scale > 1) { w += math_floor(config_raw.window_scale * 2); } - zui_fill(-1, -2, w + 3, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-1, w - off, w + 3, 2 + off, ui.t.HIGHLIGHT_COL); - zui_fill(-1, -2, 2, w + 3, ui.t.HIGHLIGHT_COL); - zui_fill(w + 1, -2, 2, w + 4, ui.t.HIGHLIGHT_COL); + zui_fill(-1, -2, w + 3, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-1, w - off, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-1, -2, 2, w + 3, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 1, -2, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); } } @@ -118,11 +118,11 @@ function tab_materials_draw_slots(mini: bool) { if (!is_typing) { if (i < 9 && operator_shortcut(map_get(config_keymap, "select_material"), shortcut_type_t.DOWN)) { let number: string = any_to_string(i + 1); - let width: i32 = g2_font_width(ui.font, ui.font_size, number) + 10; - let height: i32 = g2_font_height(ui.font, ui.font_size); - g2_set_color(ui.t.TEXT_COL); + let width: i32 = g2_font_width(ui.ops.font, ui.font_size, number) + 10; + let height: i32 = g2_font_height(ui.ops.font, ui.font_size); + g2_set_color(ui.ops.theme.TEXT_COL); g2_fill_rect(uix, uiy, width, height); - g2_set_color(ui.t.ACCENT_COL); + g2_set_color(ui.ops.theme.ACCENT_COL); g2_draw_string(number, uix + 5, uiy); } } diff --git a/base/Sources/tab_script.ts b/base/Sources/tab_script.ts index db3de703..a4fbc09f 100644 --- a/base/Sources/tab_script.ts +++ b/base/Sources/tab_script.ts @@ -43,7 +43,7 @@ function tab_script_draw(htab: zui_handle_t) { } zui_end_sticky(); - let _font: g2_font_t = ui.font; + let _font: g2_font_t = ui.ops.font; let _font_size: i32 = ui.font_size; let f: g2_font_t = data_get_font("font_mono.ttf"); zui_set_font(ui, f); diff --git a/base/Sources/tab_swatches.ts b/base/Sources/tab_swatches.ts index 6a1fe3a6..e2206be0 100644 --- a/base/Sources/tab_swatches.ts +++ b/base/Sources/tab_swatches.ts @@ -106,7 +106,7 @@ function tab_swatches_draw(htab: zui_handle_t) { if (context_raw.swatch == project_raw.swatches[i]) { let w: i32 = 32; - zui_fill(-2, -2, w, w, ui.t.HIGHLIGHT_COL); + zui_fill(-2, -2, w, w, ui.ops.theme.HIGHLIGHT_COL); } uix = ui._x; @@ -114,7 +114,7 @@ function tab_swatches_draw(htab: zui_handle_t) { // Draw the drag position indicator if (base_drag_swatch != null && tab_swatches_drag_pos == i) { - zui_fill(-1, -2 , 2, 32, ui.t.HIGHLIGHT_COL); + zui_fill(-1, -2 , 2, 32, ui.ops.theme.HIGHLIGHT_COL); } let state: zui_state_t = zui_image(tab_swatches_empty_get(), project_raw.swatches[i].base, slotw); @@ -140,7 +140,7 @@ function tab_swatches_draw(htab: zui_handle_t) { let h: zui_handle_t = zui_handle(__ID__); h.color = context_raw.swatch.base; - context_raw.swatch.base = zui_color_wheel(h, false, null, 11 * ui.t.ELEMENT_H * zui_SCALE(ui), true, function () { + context_raw.swatch.base = zui_color_wheel(h, false, null, 11 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), true, function () { context_raw.color_picker_previous_tool = context_raw.tool; context_select_tool(workspace_tool_t.PICKER); @@ -243,7 +243,7 @@ function tab_swatches_draw(htab: zui_handle_t) { if (base_drag_swatch != null && tab_swatches_drag_pos == project_raw.swatches.length) { ui._x = uix; // Reset the position because otherwise it would start in the row below ui._y = uiy; - zui_fill(28, -2, 2, 32, ui.t.HIGHLIGHT_COL); + zui_fill(28, -2, 2, 32, ui.ops.theme.HIGHLIGHT_COL); } // Currently there is no valid dragPosition so reset it diff --git a/base/Sources/tab_textures.ts b/base/Sources/tab_textures.ts index 52669f3c..333d4d36 100644 --- a/base/Sources/tab_textures.ts +++ b/base/Sources/tab_textures.ts @@ -95,10 +95,10 @@ function tab_textures_draw(htab: zui_handle_t) { ui._y = uiy; let off: i32 = i % 2 == 1 ? 1 : 0; let w: i32 = 50; - zui_fill(0, 0, w + 3, 2, ui.t.HIGHLIGHT_COL); - zui_fill(0, w - off + 2, w + 3, 2 + off, ui.t.HIGHLIGHT_COL); - zui_fill(0, 0, 2, w + 3, ui.t.HIGHLIGHT_COL); - zui_fill(w + 2, 0, 2, w + 4, ui.t.HIGHLIGHT_COL); + zui_fill(0, 0, w + 3, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(0, w - off + 2, w + 3, 2 + off, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(0, 0, 2, w + 3, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 2, 0, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); ui._x = _uix; ui._y = _uiy; } @@ -223,7 +223,7 @@ function tab_textures_draw(htab: zui_handle_t) { else { let img: image_t = resource_get("icons.k"); let r: rect_t = resource_tile50(img, 0, 1); - zui_image(img, ui.t.BUTTON_COL, r.h, r.x, r.y, r.w, r.h); + zui_image(img, ui.ops.theme.BUTTON_COL, r.h, r.x, r.y, r.w, r.h); if (ui.is_hovered) { zui_tooltip(tr("Drag and drop files here")); } diff --git a/base/Sources/ui_base.ts b/base/Sources/ui_base.ts index d788b1a0..af624977 100644 --- a/base/Sources/ui_base.ts +++ b/base/Sources/ui_base.ts @@ -611,7 +611,7 @@ function ui_base_update() { ui_menu_draw(function (ui: zui_t) { let mode_handle: zui_handle_t = zui_handle(__ID__); mode_handle.position = context_raw.viewport_mode; - zui_text(tr("Viewport Mode"), zui_align_t.RIGHT, ui.t.HIGHLIGHT_COL); + zui_text(tr("Viewport Mode"), zui_align_t.RIGHT, ui.ops.theme.HIGHLIGHT_COL); let modes: string[] = [ tr("Lit"), tr("Base Color"), @@ -863,7 +863,7 @@ function ui_base_operator_search() { ui_menu_draw(function (ui: zui_t) { let search_handle: zui_handle_t = zui_handle(__ID__); - zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.t.ELEMENT_H * 8, ui.t.SEPARATOR_COL); + zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.ops.theme.ELEMENT_H * 8, ui.ops.theme.SEPARATOR_COL); let search: string = zui_text_input(search_handle, "", zui_align_t.LEFT, true, true); ui.changed = false; if (_ui_base_operator_search_first) { @@ -886,13 +886,13 @@ function ui_base_operator_search() { } let enter: bool = keyboard_down("enter"); let count: i32 = 0; - let BUTTON_COL: i32 = ui.t.BUTTON_COL; + let BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL; let keys: string[] = map_keys_to_array(config_keymap); for (let i: i32 = 0; i < keys.length; ++i) { let n: string = keys[i]; if (string_index_of(n, search) >= 0) { - ui.t.BUTTON_COL = count == ui_base_operator_search_offset ? ui.t.HIGHLIGHT_COL : ui.t.SEPARATOR_COL; + ui.ops.theme.BUTTON_COL = count == ui_base_operator_search_offset ? ui.ops.theme.HIGHLIGHT_COL : ui.ops.theme.SEPARATOR_COL; if (zui_button(n, zui_align_t.LEFT, map_get(config_keymap, n)) || (enter && count == ui_base_operator_search_offset)) { if (enter) { ui.changed = true; @@ -910,7 +910,7 @@ function ui_base_operator_search() { ui.changed = true; search_handle.text = ""; } - ui.t.BUTTON_COL = BUTTON_COL; + ui.ops.theme.BUTTON_COL = BUTTON_COL; }, 8, -1, -1); } @@ -1318,9 +1318,9 @@ function ui_base_draw_sidebar() { let expand_button_offset: i32 = config_raw.touch_ui ? math_floor(zui_ELEMENT_H(ui_base_ui) + zui_ELEMENT_OFFSET(ui_base_ui)) : 0; ui_base_tabx = sys_width() - config_raw.layout[layout_size_t.SIDEBAR_W]; - let _SCROLL_W: i32 = ui_base_ui.t.SCROLL_W; + let _SCROLL_W: i32 = ui_base_ui.ops.theme.SCROLL_W; if (mini) { - ui_base_ui.t.SCROLL_W = ui_base_ui.t.SCROLL_MINI_W; + ui_base_ui.ops.theme.SCROLL_W = ui_base_ui.ops.theme.SCROLL_MINI_W; } if (zui_window(ui_base_hwnds[tab_area_t.SIDEBAR0], ui_base_tabx, 0, config_raw.layout[layout_size_t.SIDEBAR_W], config_raw.layout[layout_size_t.SIDEBAR_H0])) { @@ -1335,7 +1335,7 @@ function ui_base_draw_sidebar() { } zui_end_window(); - ui_base_ui.t.SCROLL_W = _SCROLL_W; + ui_base_ui.ops.theme.SCROLL_W = _SCROLL_W; // Collapse / expand button for mini sidebar if (config_raw.touch_ui) { @@ -1343,34 +1343,34 @@ function ui_base_draw_sidebar() { let height: i32 = math_floor(zui_ELEMENT_H(ui_base_ui) + zui_ELEMENT_OFFSET(ui_base_ui)); if (zui_window(zui_handle(__ID__), sys_width() - width, sys_height() - height, width, height + 1)) { ui_base_ui._w = width; - let _BUTTON_H: i32 = ui_base_ui.t.BUTTON_H; - let _BUTTON_COL: i32 = ui_base_ui.t.BUTTON_COL; - ui_base_ui.t.BUTTON_H = ui_base_ui.t.ELEMENT_H; - ui_base_ui.t.BUTTON_COL = ui_base_ui.t.WINDOW_BG_COL; + let _BUTTON_H: i32 = ui_base_ui.ops.theme.BUTTON_H; + let _BUTTON_COL: i32 = ui_base_ui.ops.theme.BUTTON_COL; + ui_base_ui.ops.theme.BUTTON_H = ui_base_ui.ops.theme.ELEMENT_H; + ui_base_ui.ops.theme.BUTTON_COL = ui_base_ui.ops.theme.WINDOW_BG_COL; if (zui_button(mini ? "<<" : ">>")) { config_raw.layout[layout_size_t.SIDEBAR_W] = mini ? ui_base_default_sidebar_full_w : ui_base_default_sidebar_mini_w; config_raw.layout[layout_size_t.SIDEBAR_W] = math_floor(config_raw.layout[layout_size_t.SIDEBAR_W] * zui_SCALE(ui_base_ui)); } - ui_base_ui.t.BUTTON_H = _BUTTON_H; - ui_base_ui.t.BUTTON_COL = _BUTTON_COL; + ui_base_ui.ops.theme.BUTTON_H = _BUTTON_H; + ui_base_ui.ops.theme.BUTTON_COL = _BUTTON_COL; } } // Expand button if (config_raw.layout[layout_size_t.SIDEBAR_W] == 0) { - let width: i32 = math_floor(g2_font_width(ui_base_ui.font, ui_base_ui.font_size, "<<") + 25 * zui_SCALE(ui_base_ui)); + let width: i32 = math_floor(g2_font_width(ui_base_ui.ops.font, ui_base_ui.font_size, "<<") + 25 * zui_SCALE(ui_base_ui)); if (zui_window(ui_base_hminimized, sys_width() - width, 0, width, math_floor(zui_ELEMENT_H(ui_base_ui) + zui_ELEMENT_OFFSET(ui_base_ui) + 1))) { ui_base_ui._w = width; - let _BUTTON_H: i32 = ui_base_ui.t.BUTTON_H; - let _BUTTON_COL: i32 = ui_base_ui.t.BUTTON_COL; - ui_base_ui.t.BUTTON_H = ui_base_ui.t.ELEMENT_H; - ui_base_ui.t.BUTTON_COL = ui_base_ui.t.SEPARATOR_COL; + let _BUTTON_H: i32 = ui_base_ui.ops.theme.BUTTON_H; + let _BUTTON_COL: i32 = ui_base_ui.ops.theme.BUTTON_COL; + ui_base_ui.ops.theme.BUTTON_H = ui_base_ui.ops.theme.ELEMENT_H; + ui_base_ui.ops.theme.BUTTON_COL = ui_base_ui.ops.theme.SEPARATOR_COL; if (zui_button("<<")) { config_raw.layout[layout_size_t.SIDEBAR_W] = context_raw.maximized_sidebar_width != 0 ? context_raw.maximized_sidebar_width : math_floor(ui_base_default_sidebar_w * config_raw.window_scale); } - ui_base_ui.t.BUTTON_H = _BUTTON_H; - ui_base_ui.t.BUTTON_COL = _BUTTON_COL; + ui_base_ui.ops.theme.BUTTON_H = _BUTTON_H; + ui_base_ui.ops.theme.BUTTON_COL = _BUTTON_COL; } } else if (ui_base_htabs[tab_area_t.SIDEBAR0].changed && ui_base_htabs[tab_area_t.SIDEBAR0].position == context_raw.last_htab0_pos) { diff --git a/base/Sources/ui_box.ts b/base/Sources/ui_box.ts index 1bfa3f8e..ba379f2e 100644 --- a/base/Sources/ui_box.ts +++ b/base/Sources/ui_box.ts @@ -187,7 +187,7 @@ function ui_box_window_border(ui: zui_t) { g2_disable_scissor(); } // Border - g2_set_color(ui.t.SEPARATOR_COL); + g2_set_color(ui.ops.theme.SEPARATOR_COL); g2_fill_rect(0, 0, 1, ui._window_h); g2_fill_rect(0 + ui._window_w - 1, 0, 1, ui._window_h); g2_fill_rect(0, 0 + ui._window_h - 1, ui._window_w, 1); diff --git a/base/Sources/ui_files.ts b/base/Sources/ui_files.ts index 758f6534..eb6ed813 100644 --- a/base/Sources/ui_files.ts +++ b/base/Sources/ui_files.ts @@ -157,8 +157,8 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo let _x: f32 = ui._x; let rect: rect_t = string_index_of(f, ".") > 0 ? file : folder; - let col: i32 = rect == file ? ui.t.LABEL_COL : ui.t.LABEL_COL - 0x00202020; - if (ui_files_selected == i) col = ui.t.HIGHLIGHT_COL; + let col: i32 = rect == file ? ui.ops.theme.LABEL_COL : ui.ops.theme.LABEL_COL - 0x00202020; + if (ui_files_selected == i) col = ui.ops.theme.HIGHLIGHT_COL; let off: f32 = ui._w / 2 - 25 * zui_SCALE(ui); ui._x += off; @@ -221,10 +221,10 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo if (icon != null) { let w: i32 = 50; if (i == ui_files_selected) { - zui_fill(-2, -2, w + 4, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-2, w + 2, w + 4, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-2, 0, 2, w + 4, ui.t.HIGHLIGHT_COL); - zui_fill(w + 2 , -2, 2, w + 6, ui.t.HIGHLIGHT_COL); + zui_fill(-2, -2, w + 4, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-2, w + 2, w + 4, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-2, 0, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 2 , -2, 2, w + 6, ui.ops.theme.HIGHLIGHT_COL); } state = zui_image(icon, 0xffffffff, w * zui_SCALE(ui)); if (ui.is_hovered) { @@ -279,10 +279,10 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo if (icon != null) { let w: i32 = 50; if (i == ui_files_selected) { - zui_fill(-2, -2, w + 4, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-2, w + 2, w + 4, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-2, 0, 2, w + 4, ui.t.HIGHLIGHT_COL); - zui_fill(w + 2 , -2, 2, w + 6, ui.t.HIGHLIGHT_COL); + zui_fill(-2, -2, w + 4, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-2, w + 2, w + 4, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-2, 0, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 2 , -2, 2, w + 6, ui.ops.theme.HIGHLIGHT_COL); } state = zui_image(icon, 0xffffffff, w * zui_SCALE(ui)); if (ui.is_hovered) { @@ -327,10 +327,10 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo } if (icon != null) { if (i == ui_files_selected) { - zui_fill(-2, -2, w + 4, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-2, w + 2, w + 4, 2, ui.t.HIGHLIGHT_COL); - zui_fill(-2, 0, 2, w + 4, ui.t.HIGHLIGHT_COL); - zui_fill(w + 2 , -2, 2, w + 6, ui.t.HIGHLIGHT_COL); + zui_fill(-2, -2, w + 4, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-2, w + 2, w + 4, 2, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(-2, 0, 2, w + 4, ui.ops.theme.HIGHLIGHT_COL); + zui_fill(w + 2 , -2, 2, w + 6, ui.ops.theme.HIGHLIGHT_COL); } state = zui_image(icon, 0xffffffff, icon.height * zui_SCALE(ui)); generic = false; @@ -391,7 +391,7 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo ui._y += slotw * 0.75; let label0: string = (ui_files_show_extensions || string_index_of(f, ".") <= 0) ? f : substring(f, 0, string_last_index_of(f, ".")); let label1: string = ""; - while (label0.length > 0 && g2_font_width(ui.font, ui.font_size, label0) > ui._w - 6) { // 2 line split + while (label0.length > 0 && g2_font_width(ui.ops.font, ui.font_size, label0) > ui._w - 6) { // 2 line split label1 = char_at(label0, label0.length - 1) + label1; label0 = substring(label0, 0, label0.length - 1); } @@ -404,12 +404,12 @@ function ui_files_file_browser(ui: zui_t, handle: zui_handle_t, folders_only: bo } if (label1 != "") { // Second line ui._x = _x; - ui._y += g2_font_height(ui.font, ui.font_size); + ui._y += g2_font_height(ui.ops.font, ui.font_size); zui_text(label1, zui_align_t.CENTER); if (ui.is_hovered) { zui_tooltip(label0 + label1); } - ui._y -= g2_font_height(ui.font, ui.font_size); + ui._y -= g2_font_height(ui.ops.font, ui.font_size); } ui._y -= slotw * 0.75; diff --git a/base/Sources/ui_header.ts b/base/Sources/ui_header.ts index 71b89e1a..eb53a72e 100644 --- a/base/Sources/ui_header.ts +++ b/base/Sources/ui_header.ts @@ -146,9 +146,9 @@ function ui_header_draw_tool_properties(ui: zui_t) { if (ui.is_hovered && ui.input_released) { _ui_header_draw_tool_properties_h = h; ui_menu_draw(function (ui: zui_t) { - zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.t.ELEMENT_H * 9, ui.t.SEPARATOR_COL); + zui_fill(0, 0, ui._w / zui_SCALE(ui), ui.ops.theme.ELEMENT_H * 9, ui.ops.theme.SEPARATOR_COL); ui.changed = false; - zui_color_wheel(_ui_header_draw_tool_properties_h, false, null, 10 * ui.t.ELEMENT_H * zui_SCALE(ui), false); + zui_color_wheel(_ui_header_draw_tool_properties_h, false, null, 10 * ui.ops.theme.ELEMENT_H * zui_SCALE(ui), false); if (ui.changed) { ui_menu_keep_open = true; } @@ -266,9 +266,9 @@ function ui_header_draw_tool_properties(ui: zui_t) { let progress: f32 = render_path_raytrace_bake_current_sample / context_raw.bake_samples; if (progress > 1.0) progress = 1.0; // Progress bar - g2_set_color(ui.t.SEPARATOR_COL); + g2_set_color(ui.ops.theme.SEPARATOR_COL); zui_draw_rect(true, ui._x + 1, ui._y, ui._w - 2, zui_ELEMENT_H(ui)); - g2_set_color(ui.t.HIGHLIGHT_COL); + g2_set_color(ui.ops.theme.HIGHLIGHT_COL); zui_draw_rect(true, ui._x + 1, ui._y, (ui._w - 2) * progress, zui_ELEMENT_H(ui)); g2_set_color(0xffffffff); zui_text(tr("Samples") + ": " + render_path_raytrace_bake_current_sample); diff --git a/base/Sources/ui_menu.ts b/base/Sources/ui_menu.ts index 4402d1bf..41810170 100644 --- a/base/Sources/ui_menu.ts +++ b/base/Sources/ui_menu.ts @@ -16,19 +16,19 @@ let _ui_menu_render_msg: string; function ui_menu_render() { let ui: zui_t = base_ui_menu; let menu_w: i32 = ui_menu_commands != null ? math_floor(base_default_element_w * zui_SCALE(base_ui_menu) * 2.3) : math_floor(zui_ELEMENT_W(ui) * 2.3); - let _BUTTON_COL: i32 = ui.t.BUTTON_COL; - ui.t.BUTTON_COL = ui.t.SEPARATOR_COL; - let _ELEMENT_OFFSET: i32 = ui.t.ELEMENT_OFFSET; - ui.t.ELEMENT_OFFSET = 0; - let _ELEMENT_H: i32 = ui.t.ELEMENT_H; - ui.t.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28; + let _BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL; + ui.ops.theme.BUTTON_COL = ui.ops.theme.SEPARATOR_COL; + let _ELEMENT_OFFSET: i32 = ui.ops.theme.ELEMENT_OFFSET; + ui.ops.theme.ELEMENT_OFFSET = 0; + let _ELEMENT_H: i32 = ui.ops.theme.ELEMENT_H; + ui.ops.theme.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28; zui_begin_region(ui, ui_menu_x, ui_menu_y, menu_w); if (ui_menu_commands != null) { - g2_set_color(ui.t.ACCENT_SELECT_COL); + g2_set_color(ui.ops.theme.ACCENT_SELECT_COL); zui_draw_rect(true, ui._x + -1, ui._y + -1, ui._w + 2, zui_ELEMENT_H(ui) * ui_menu_elements + 2); - g2_set_color(ui.t.SEPARATOR_COL); + g2_set_color(ui.ops.theme.SEPARATOR_COL); zui_draw_rect(true, ui._x + 0, ui._y + 0, ui._w, zui_ELEMENT_H(ui) * ui_menu_elements); g2_set_color(0xffffffff); @@ -598,9 +598,9 @@ function ui_menu_render() { ui_menu_show_first = false; ui_menu_keep_open = false; - ui.t.BUTTON_COL = _BUTTON_COL; - ui.t.ELEMENT_OFFSET = _ELEMENT_OFFSET; - ui.t.ELEMENT_H = _ELEMENT_H; + ui.ops.theme.BUTTON_COL = _BUTTON_COL; + ui.ops.theme.ELEMENT_OFFSET = _ELEMENT_OFFSET; + ui.ops.theme.ELEMENT_H = _ELEMENT_H; zui_end_region(); if (ui_menu_hide_flag) { @@ -636,7 +636,7 @@ function ui_menu_fit_to_screen() { ui_menu_x = math_floor(sys_width() - menu_w); } } - let menu_h: f32 = math_floor(ui_menu_elements * 30 * zui_SCALE(base_ui_menu)); // ui.t.ELEMENT_H + let menu_h: f32 = math_floor(ui_menu_elements * 30 * zui_SCALE(base_ui_menu)); // ui.ops.theme.ELEMENT_H if (ui_menu_y + menu_h > sys_height()) { if (ui_menu_y - menu_h > 0) { ui_menu_y = math_floor(ui_menu_y - menu_h); @@ -649,9 +649,9 @@ function ui_menu_fit_to_screen() { } function ui_menu_fill(ui: zui_t) { - g2_set_color(ui.t.ACCENT_SELECT_COL); + g2_set_color(ui.ops.theme.ACCENT_SELECT_COL); g2_fill_rect(ui._x - 1, ui._y, ui._w + 2, zui_ELEMENT_H(ui) + 1 + 1); - g2_set_color(ui.t.SEPARATOR_COL); + g2_set_color(ui.ops.theme.SEPARATOR_COL); g2_fill_rect(ui._x, ui._y, ui._w, zui_ELEMENT_H(ui) + 1); g2_set_color(0xffffffff); } @@ -659,10 +659,10 @@ function ui_menu_fill(ui: zui_t) { function ui_menu_separator(ui: zui_t) { ui._y++; if (config_raw.touch_ui) { - zui_fill(0, 0, ui._w / zui_SCALE(ui), 1, ui.t.ACCENT_SELECT_COL); + zui_fill(0, 0, ui._w / zui_SCALE(ui), 1, ui.ops.theme.ACCENT_SELECT_COL); } else { - zui_fill(26, 0, ui._w / zui_SCALE(ui) - 26, 1, ui.t.ACCENT_SELECT_COL); + zui_fill(26, 0, ui._w / zui_SCALE(ui) - 26, 1, ui.ops.theme.ACCENT_SELECT_COL); } } @@ -688,7 +688,7 @@ function ui_menu_align(ui: zui_t) { function ui_menu_start(ui: zui_t) { // Draw top border - g2_set_color(ui.t.ACCENT_SELECT_COL); + g2_set_color(ui.ops.theme.ACCENT_SELECT_COL); if (config_raw.touch_ui) { g2_fill_rect(ui._x + ui._w / 2 + ui_menu_category_w / 2, ui._y - 1, ui._w / 2 - ui_menu_category_w / 2 + 1, 1); g2_fill_rect(ui._x - 1, ui._y - 1, ui._w / 2 - ui_menu_category_w / 2 + 1, 1); diff --git a/base/Sources/ui_menubar.ts b/base/Sources/ui_menubar.ts index fbb0f77c..cc315d9e 100644 --- a/base/Sources/ui_menubar.ts +++ b/base/Sources/ui_menubar.ts @@ -56,25 +56,25 @@ function ui_menubar_render_ui() { ///end let size: i32 = math_floor(ui._w / zui_SCALE(ui)); if (ui_menu_show && ui_menu_category == menu_category_t.VIEWPORT) { - zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL); + zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL); } if (ui_menubar_icon_button(ui, 8, 2)) { ui_menubar_show_menu(ui, menu_category_t.VIEWPORT); } if (ui_menu_show && ui_menu_category == menu_category_t.MODE) { - zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL); + zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL); } if (ui_menubar_icon_button(ui, 9, 2)) { ui_menubar_show_menu(ui, menu_category_t.MODE); } if (ui_menu_show && ui_menu_category == menu_category_t.CAMERA) { - zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL); + zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL); } if (ui_menubar_icon_button(ui, 10, 2)) { ui_menubar_show_menu(ui, menu_category_t.CAMERA); } if (ui_menu_show && ui_menu_category == menu_category_t.HELP) { - zui_fill(0, -6, size, size - 4, ui.t.HIGHLIGHT_COL); + zui_fill(0, -6, size, size - 4, ui.ops.theme.HIGHLIGHT_COL); } if (ui_menubar_icon_button(ui, 11, 2)) { ui_menubar_show_menu(ui, menu_category_t.HELP); @@ -124,7 +124,7 @@ function ui_menubar_render_ui() { zui_tab(ui_header_worktab, tr("3D View")); } else { - zui_fill(0, 0, ui._window_w, ui._window_h + 4, ui.t.SEPARATOR_COL); + zui_fill(0, 0, ui._window_w, ui._window_h + 4, ui.ops.theme.SEPARATOR_COL); } ///if is_lab @@ -198,7 +198,7 @@ function ui_menubar_show_menu(ui: zui_t, category: i32) { } function ui_menubar_icon_button(ui: zui_t, i: i32, j: i32): bool { - let col: i32 = ui.t.WINDOW_BG_COL; + let col: i32 = ui.ops.theme.WINDOW_BG_COL; if (col < 0) { col += 4294967296; } diff --git a/base/Sources/ui_nodes.ts b/base/Sources/ui_nodes.ts index 3ed78659..e2f9b962 100644 --- a/base/Sources/ui_nodes.ts +++ b/base/Sources/ui_nodes.ts @@ -574,7 +574,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) { ui_menu_draw(function (ui: zui_t) { let search_handle: zui_handle_t = zui_handle(__ID__); - g2_set_color(ui.t.SEPARATOR_COL); + g2_set_color(ui.ops.theme.SEPARATOR_COL); zui_draw_rect(true, ui._x, ui._y, ui._w, zui_ELEMENT_H(ui) * 8); g2_set_color(0xffffffff); @@ -600,7 +600,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) { } let enter: bool = keyboard_down("enter"); let count: i32 = 0; - let BUTTON_COL: i32 = ui.t.BUTTON_COL; + let BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL; ///if (is_paint || is_sculpt) let node_list: zui_node_t[][] = ui_nodes_canvas_type == canvas_type_t.MATERIAL ? nodes_material_list : nodes_brush_list; @@ -614,7 +614,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) { for (let i: i32 = 0; i < list.length; ++i) { let n: zui_node_t = list[i]; if (string_index_of(to_lower_case(tr(n.name)), search) >= 0) { - ui.t.BUTTON_COL = count == ui_nodes_node_search_offset ? ui.t.HIGHLIGHT_COL : ui.t.SEPARATOR_COL; + ui.ops.theme.BUTTON_COL = count == ui_nodes_node_search_offset ? ui.ops.theme.HIGHLIGHT_COL : ui.ops.theme.SEPARATOR_COL; if (zui_button(tr(n.name), zui_align_t.LEFT) || (enter && count == ui_nodes_node_search_offset)) { ui_nodes_push_undo(); let nodes: zui_nodes_t = ui_nodes_get_nodes(); @@ -650,7 +650,7 @@ function ui_nodes_node_search(x: i32 = -1, y: i32 = -1, done: ()=>void = null) { ui.changed = true; search_handle.text = ""; } - ui.t.BUTTON_COL = BUTTON_COL; + ui.ops.theme.BUTTON_COL = BUTTON_COL; }, 8, x, y); } @@ -683,9 +683,9 @@ function ui_nodes_draw_grid() { } ui_nodes_grid = image_create_render_target(w, h); g2_begin(ui_nodes_grid); - g2_clear(ui_nodes_ui.t.SEPARATOR_COL); + g2_clear(ui_nodes_ui.ops.theme.SEPARATOR_COL); - g2_set_color(ui_nodes_ui.t.SEPARATOR_COL - 0x00050505); + g2_set_color(ui_nodes_ui.ops.theme.SEPARATOR_COL - 0x00050505); step = 20 * zui_SCALE(ui_nodes_ui); for (let i: i32 = 0; i < math_floor(h / step) + 1; ++i) { g2_draw_line(0, i * step, w, i * step); @@ -694,7 +694,7 @@ function ui_nodes_draw_grid() { g2_draw_line(i * step, 0, i * step, h); } - g2_set_color(ui_nodes_ui.t.SEPARATOR_COL - 0x00090909); + g2_set_color(ui_nodes_ui.ops.theme.SEPARATOR_COL - 0x00090909); step = 100 * zui_SCALE(ui_nodes_ui); for (let i: i32 = 0; i < math_floor(h / step) + 1; ++i) { g2_draw_line(0, i * step, w, i * step); @@ -1024,7 +1024,7 @@ function ui_nodes_render() { } // Menu - g2_set_color(ui_nodes_ui.t.SEPARATOR_COL); + g2_set_color(ui_nodes_ui.ops.theme.SEPARATOR_COL); g2_fill_rect(0, zui_ELEMENT_H(ui_nodes_ui), ui_nodes_ww, zui_ELEMENT_H(ui_nodes_ui) + zui_ELEMENT_OFFSET(ui_nodes_ui) * 2); g2_set_color(0xffffffff); @@ -1037,7 +1037,7 @@ function ui_nodes_render() { // Editable canvas name let h: zui_handle_t = zui_handle(__ID__); h.text = c.name; - ui_nodes_ui._w = math_floor(math_min(g2_font_width(ui_nodes_ui.font, ui_nodes_ui.font_size, h.text) + 15 * zui_SCALE(ui_nodes_ui), 100 * zui_SCALE(ui_nodes_ui))); + ui_nodes_ui._w = math_floor(math_min(g2_font_width(ui_nodes_ui.ops.font, ui_nodes_ui.font_size, h.text) + 15 * zui_SCALE(ui_nodes_ui), 100 * zui_SCALE(ui_nodes_ui))); let new_name: string = zui_text_input(h, ""); ui_nodes_ui._x += ui_nodes_ui._w + 3; ui_nodes_ui._y = 2 + start_y; @@ -1087,8 +1087,8 @@ function ui_nodes_render() { ui_nodes_ext_draw_buttons(ew, start_y); ///end - let _BUTTON_COL: i32 = ui_nodes_ui.t.BUTTON_COL; - ui_nodes_ui.t.BUTTON_COL = ui_nodes_ui.t.SEPARATOR_COL; + let _BUTTON_COL: i32 = ui_nodes_ui.ops.theme.BUTTON_COL; + ui_nodes_ui.ops.theme.BUTTON_COL = ui_nodes_ui.ops.theme.SEPARATOR_COL; ///if (is_paint || is_sculpt) let cats: string[] = ui_nodes_canvas_type == canvas_type_t.MATERIAL ? nodes_material_categories : nodes_brush_categories; @@ -1136,7 +1136,7 @@ function ui_nodes_render() { ui_nodes_ui._x += ui_nodes_ui._w + 3; ui_nodes_ui._y = 2 + start_y; - ui_nodes_ui.t.BUTTON_COL = _BUTTON_COL; + ui_nodes_ui.ops.theme.BUTTON_COL = _BUTTON_COL; // Close node group if (ui_nodes_group_stack.length > 0 && zui_menu_button(tr("Close"))) { @@ -1170,12 +1170,12 @@ function ui_nodes_render() { let py: i32 = ui_nodes_popup_y; let menuw: i32 = math_floor(ew * 2.3); zui_begin_region(ui_nodes_ui, math_floor(ui_nodes_popup_x), math_floor(py), menuw); - let _BUTTON_COL: i32 = ui_nodes_ui.t.BUTTON_COL; - ui_nodes_ui.t.BUTTON_COL = ui_nodes_ui.t.SEPARATOR_COL; - let _ELEMENT_OFFSET: i32 = ui_nodes_ui.t.ELEMENT_OFFSET; - ui_nodes_ui.t.ELEMENT_OFFSET = 0; - let _ELEMENT_H: i32 = ui_nodes_ui.t.ELEMENT_H; - ui_nodes_ui.t.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28; + let _BUTTON_COL: i32 = ui_nodes_ui.ops.theme.BUTTON_COL; + ui_nodes_ui.ops.theme.BUTTON_COL = ui_nodes_ui.ops.theme.SEPARATOR_COL; + let _ELEMENT_OFFSET: i32 = ui_nodes_ui.ops.theme.ELEMENT_OFFSET; + ui_nodes_ui.ops.theme.ELEMENT_OFFSET = 0; + let _ELEMENT_H: i32 = ui_nodes_ui.ops.theme.ELEMENT_H; + ui_nodes_ui.ops.theme.ELEMENT_H = config_raw.touch_ui ? (28 + 2) : 28; ui_menu_start(ui_nodes_ui); @@ -1202,8 +1202,8 @@ function ui_nodes_render() { if (is_group_category) { for (let i: i32 = 0; i < project_material_groups.length; ++i) { let g: node_group_t = project_material_groups[i]; - zui_fill(0, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui), ui_nodes_ui.t.BUTTON_H + 2, ui_nodes_ui.t.ACCENT_SELECT_COL); - zui_fill(1, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui) - 2, ui_nodes_ui.t.BUTTON_H + 1, ui_nodes_ui.t.SEPARATOR_COL); + zui_fill(0, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui), ui_nodes_ui.ops.theme.BUTTON_H + 2, ui_nodes_ui.ops.theme.ACCENT_SELECT_COL); + zui_fill(1, 1, ui_nodes_ui._w / zui_SCALE(ui_nodes_ui) - 2, ui_nodes_ui.ops.theme.BUTTON_H + 1, ui_nodes_ui.ops.theme.SEPARATOR_COL); ui_nodes_ui.enabled = ui_nodes_can_place_group(g.canvas.name); ui_menu_fill(ui_nodes_ui); zui_row([5 / 6, 1 / 6]); @@ -1232,9 +1232,9 @@ function ui_nodes_render() { ui_nodes_hide_menu = ui_nodes_ui.combo_selected_handle_ptr == 0 && !ui_nodes_show_menu_first && (ui_nodes_ui.changed || ui_nodes_ui.input_released || ui_nodes_ui.input_released_r || ui_nodes_ui.is_escape_down); ui_nodes_show_menu_first = false; - ui_nodes_ui.t.BUTTON_COL = _BUTTON_COL; - ui_nodes_ui.t.ELEMENT_OFFSET = _ELEMENT_OFFSET; - ui_nodes_ui.t.ELEMENT_H = _ELEMENT_H; + ui_nodes_ui.ops.theme.BUTTON_COL = _BUTTON_COL; + ui_nodes_ui.ops.theme.ELEMENT_OFFSET = _ELEMENT_OFFSET; + ui_nodes_ui.ops.theme.ELEMENT_H = _ELEMENT_H; zui_end_region(); } diff --git a/base/Sources/ui_status.ts b/base/Sources/ui_status.ts index 754ad272..27bd13b5 100644 --- a/base/Sources/ui_status.ts +++ b/base/Sources/ui_status.ts @@ -22,7 +22,7 @@ function ui_status_render_ui() { ui._y += 2; // Border - g2_set_color(ui.t.SEPARATOR_COL); + g2_set_color(ui.ops.theme.SEPARATOR_COL); g2_fill_rect(0, 0, 1, ui._window_h); g2_fill_rect(ui._window_w - 1, 0, 1, ui._window_h); diff --git a/base/Sources/ui_toolbar.ts b/base/Sources/ui_toolbar.ts index d30bed88..ceedb7c4 100644 --- a/base/Sources/ui_toolbar.ts +++ b/base/Sources/ui_toolbar.ts @@ -83,7 +83,7 @@ function ui_toolbar_render_ui() { ui.image_scroll_align = false; let img: image_t = resource_get("icons.k"); - let col: i32 = ui.t.WINDOW_BG_COL; + let col: i32 = ui.ops.theme.WINDOW_BG_COL; if (col < 0) { col += 4294967296; } @@ -93,20 +93,20 @@ function ui_toolbar_render_ui() { // Properties icon if (config_raw.layout[layout_size_t.HEADER] == 1) { let rect: rect_t = resource_tile50(img, 7, 1); - if (zui_image(img, light ? 0xff666666 : ui.t.BUTTON_COL, -1.0, rect.x, rect.y, rect.w, rect.h) == zui_state_t.RELEASED) { + if (zui_image(img, light ? 0xff666666 : ui.ops.theme.BUTTON_COL, -1.0, rect.x, rect.y, rect.w, rect.h) == zui_state_t.RELEASED) { config_raw.layout[layout_size_t.HEADER] = 0; } } // Draw ">>" button if header is hidden else { - let _ELEMENT_H: i32 = ui.t.ELEMENT_H; - let _BUTTON_H: i32 = ui.t.BUTTON_H; - let _BUTTON_COL: i32 = ui.t.BUTTON_COL; + let _ELEMENT_H: i32 = ui.ops.theme.ELEMENT_H; + let _BUTTON_H: i32 = ui.ops.theme.BUTTON_H; + let _BUTTON_COL: i32 = ui.ops.theme.BUTTON_COL; let _fontOffsetY: i32 = ui.font_offset_y; - ui.t.ELEMENT_H = math_floor(ui.t.ELEMENT_H * 1.5); - ui.t.BUTTON_H = ui.t.ELEMENT_H; - ui.t.BUTTON_COL = ui.t.WINDOW_BG_COL; - let font_height: i32 = g2_font_height(ui.font, ui.font_size); + ui.ops.theme.ELEMENT_H = math_floor(ui.ops.theme.ELEMENT_H * 1.5); + ui.ops.theme.BUTTON_H = ui.ops.theme.ELEMENT_H; + ui.ops.theme.BUTTON_COL = ui.ops.theme.WINDOW_BG_COL; + let font_height: i32 = g2_font_height(ui.ops.font, ui.font_size); ui.font_offset_y = (zui_ELEMENT_H(ui) - font_height) / 2; let _w: i32 = ui._w; ui._w = ui_toolbar_w; @@ -116,9 +116,9 @@ function ui_toolbar_render_ui() { } ui._w = _w; - ui.t.ELEMENT_H = _ELEMENT_H; - ui.t.BUTTON_H = _BUTTON_H; - ui.t.BUTTON_COL = _BUTTON_COL; + ui.ops.theme.ELEMENT_H = _ELEMENT_H; + ui.ops.theme.BUTTON_H = _BUTTON_H; + ui.ops.theme.BUTTON_COL = _BUTTON_COL; ui.font_offset_y = _fontOffsetY; } if (ui.is_hovered) { @@ -178,10 +178,10 @@ function ui_toolbar_render_ui() { if (config_raw.touch_ui) { // Hide scrollbar - let _SCROLL_W: i32 = ui.t.SCROLL_W; - ui.t.SCROLL_W = 0; + let _SCROLL_W: i32 = ui.ops.theme.SCROLL_W; + ui.ops.theme.SCROLL_W = 0; zui_end_window(); - ui.t.SCROLL_W = _SCROLL_W; + ui.ops.theme.SCROLL_W = _SCROLL_W; } } @@ -224,7 +224,7 @@ function ui_toolbar_tool_properties_menu() { function ui_toolbar_draw_highlight() { let ui: zui_t = ui_base_ui; let size: i32 = ui_toolbar_w - 4; - g2_set_color(ui.t.HIGHLIGHT_COL); + g2_set_color(ui.ops.theme.HIGHLIGHT_COL); zui_draw_rect(true, ui._x + -1, ui._y + 2, size + 2, size + 2); } diff --git a/base/Sources/ui_view2d.ts b/base/Sources/ui_view2d.ts index 3317a801..32f69e41 100644 --- a/base/Sources/ui_view2d.ts +++ b/base/Sources/ui_view2d.ts @@ -286,7 +286,7 @@ function ui_view2d_render() { // Menu let ew: i32 = math_floor(zui_ELEMENT_W(ui_view2d_ui)); - g2_set_color(ui_view2d_ui.t.SEPARATOR_COL); + g2_set_color(ui_view2d_ui.ops.theme.SEPARATOR_COL); g2_fill_rect(0, zui_ELEMENT_H(ui_view2d_ui), ui_view2d_ww, zui_ELEMENT_H(ui_view2d_ui) + zui_ELEMENT_OFFSET(ui_view2d_ui) * 2); g2_set_color(0xffffffff); @@ -304,7 +304,7 @@ function ui_view2d_render() { let text: string = h.text; ///end - ui_view2d_ui._w = math_floor(math_min(g2_font_width(ui_view2d_ui.font, ui_view2d_ui.font_size, text) + 15 * zui_SCALE(ui_view2d_ui), 100 * zui_SCALE(ui_view2d_ui))); + ui_view2d_ui._w = math_floor(math_min(g2_font_width(ui_view2d_ui.ops.font, ui_view2d_ui.font_size, text) + 15 * zui_SCALE(ui_view2d_ui), 100 * zui_SCALE(ui_view2d_ui))); if (ui_view2d_type == view_2d_type_t.ASSET) { let asset: asset_t = context_raw.texture;