paint: cleanup
This commit is contained in:
@@ -2,6 +2,87 @@
|
||||
#include "../global.h"
|
||||
|
||||
void checker_texture_node_init() {
|
||||
|
||||
checker_texture_node_def =
|
||||
GC_ALLOC_INIT(ui_node_t, {.id = 0,
|
||||
.name = _tr("Checker Texture"),
|
||||
.type = "TEX_CHECKER",
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.color = 0xff4982a0,
|
||||
.inputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Vector"),
|
||||
.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 = 0}),
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Color 1"),
|
||||
.type = "RGBA",
|
||||
.color = 0xffc7c729,
|
||||
.default_value = f32_array_create_xyz(0.8, 0.8, 0.8),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Color 2"),
|
||||
.type = "RGBA",
|
||||
.color = 0xffc7c729,
|
||||
.default_value = f32_array_create_xyz(0.2, 0.2, 0.2),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Scale"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(5.0),
|
||||
.min = 0.0,
|
||||
.max = 10.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
},
|
||||
4),
|
||||
.outputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Color"),
|
||||
.type = "RGBA",
|
||||
.color = 0xffc7c729,
|
||||
.default_value = f32_array_create_xyzw(0.8, 0.8, 0.8, 1.0),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Factor"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(1.0),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
},
|
||||
2),
|
||||
.buttons = any_array_create_from_raw((void *[]){}, 0),
|
||||
.width = 0,
|
||||
.flags = 0});
|
||||
gc_root(checker_texture_node_def);
|
||||
|
||||
any_array_push(nodes_material_texture, checker_texture_node_def);
|
||||
any_map_set(parser_material_node_vectors, "TEX_CHECKER", checker_texture_node_vector);
|
||||
any_map_set(parser_material_node_values, "TEX_CHECKER", checker_texture_node_value);
|
||||
|
||||
Reference in New Issue
Block a user