paint: cleanup
This commit is contained in:
@@ -152,75 +152,75 @@ void math2_node_init() {
|
||||
_tr("Ceil"), _tr("Truncate"), _tr("Fraction"), _tr("Truncated Modulo"), _tr("Floored 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"));
|
||||
math2_node_def = GC_ALLOC_INIT(ui_node_t, {.id = 0,
|
||||
.name = _tr("Math"),
|
||||
.type = "MATH",
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.color = 0xff62676d,
|
||||
.inputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Value"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(0.5),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Value"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(0.5),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
},
|
||||
2),
|
||||
.outputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Value"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(0.0),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
},
|
||||
1),
|
||||
.buttons = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_button_t, {.name = _tr("operation"),
|
||||
.type = "ENUM",
|
||||
.output = 0,
|
||||
.default_value = f32_array_create_x(0),
|
||||
.data = u8_array_create_from_string(math_operation_data),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.height = 0}),
|
||||
GC_ALLOC_INIT(ui_node_button_t, {.name = _tr("Clamp"),
|
||||
.type = "BOOL",
|
||||
.output = 0,
|
||||
.default_value = f32_array_create_x(0),
|
||||
.data = NULL,
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.height = 0}),
|
||||
},
|
||||
2),
|
||||
.width = 0,
|
||||
.flags = 0});
|
||||
gc_root(math2_node_def);
|
||||
ui_node_t *math2_node_def =
|
||||
GC_ALLOC_INIT(ui_node_t, {.id = 0,
|
||||
.name = _tr("Math"),
|
||||
.type = "MATH",
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.color = 0xff62676d,
|
||||
.inputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Value"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(0.5),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Value"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(0.5),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
},
|
||||
2),
|
||||
.outputs = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_socket_t, {.id = 0,
|
||||
.node_id = 0,
|
||||
.name = _tr("Value"),
|
||||
.type = "VALUE",
|
||||
.color = 0xffa1a1a1,
|
||||
.default_value = f32_array_create_x(0.0),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.display = 0}),
|
||||
},
|
||||
1),
|
||||
.buttons = any_array_create_from_raw(
|
||||
(void *[]){
|
||||
GC_ALLOC_INIT(ui_node_button_t, {.name = _tr("operation"),
|
||||
.type = "ENUM",
|
||||
.output = 0,
|
||||
.default_value = f32_array_create_x(0),
|
||||
.data = u8_array_create_from_string(math_operation_data),
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.height = 0}),
|
||||
GC_ALLOC_INIT(ui_node_button_t, {.name = _tr("Clamp"),
|
||||
.type = "BOOL",
|
||||
.output = 0,
|
||||
.default_value = f32_array_create_x(0),
|
||||
.data = NULL,
|
||||
.min = 0.0,
|
||||
.max = 1.0,
|
||||
.precision = 100,
|
||||
.height = 0}),
|
||||
},
|
||||
2),
|
||||
.width = 0,
|
||||
.flags = 0});
|
||||
|
||||
any_array_push(nodes_material_utilities, math2_node_def);
|
||||
any_map_set(parser_material_node_values, "MATH", math2_node_value);
|
||||
|
||||
Reference in New Issue
Block a user