Neural nodes progress
This commit is contained in:
@@ -17,7 +17,7 @@ function parser_material_texture_store(node: ui_node_t, tex: bind_tex_t, tex_nam
|
||||
node_shader_context_add_elem(parser_material_kong.context, "tex", "short2norm");
|
||||
node_shader_add_texture(parser_material_kong, "" + tex_name);
|
||||
let uv_name: string = "";
|
||||
if (parser_material_get_input_link(node.inputs[0]) != null) {
|
||||
if (node.type == "TEX_IMAGE" && parser_material_get_input_link(node.inputs[0]) != null) {
|
||||
uv_name = parser_material_parse_vector_input(node.inputs[0]);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -32,7 +32,7 @@ function edit_image_node_button(node_id: i32) {
|
||||
ui_button("Cancel...");
|
||||
}
|
||||
else if (ui_button("Run")) {
|
||||
let inp: ui_node_socket_t = node.inputs[1];
|
||||
let inp: ui_node_socket_t = node.inputs[0];
|
||||
let from_node: ui_node_t = null;
|
||||
for (let i: i32 = 0; i < canvas.links.length; ++i) {
|
||||
let l: ui_node_link_t = canvas.links[i];
|
||||
@@ -98,18 +98,6 @@ let edit_image_node_def: ui_node_t = {
|
||||
y: 0,
|
||||
color: 0xff4982a0,
|
||||
inputs: [
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
node_id: 0,
|
||||
|
||||
@@ -118,18 +118,6 @@ let text_to_image_node_def: ui_node_t = {
|
||||
y: 0,
|
||||
color: 0xff4982a0,
|
||||
inputs: [
|
||||
{
|
||||
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
|
||||
}
|
||||
],
|
||||
outputs: [
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ function upscale_image_node_button(node_id: i32) {
|
||||
ui_button("Cancel...");
|
||||
}
|
||||
else if (ui_button("Run")) {
|
||||
let inp: ui_node_socket_t = node.inputs[1];
|
||||
let inp: ui_node_socket_t = node.inputs[0];
|
||||
let from_node: ui_node_t = null;
|
||||
for (let i: i32 = 0; i < canvas.links.length; ++i) {
|
||||
let l: ui_node_link_t = canvas.links[i];
|
||||
@@ -81,18 +81,6 @@ let upscale_image_node_def: ui_node_t = {
|
||||
y: 0,
|
||||
color: 0xff4982a0,
|
||||
inputs: [
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
node_id: 0,
|
||||
|
||||
@@ -1134,6 +1134,9 @@ function ui_nodes_render() {
|
||||
}
|
||||
|
||||
function ui_nodes_get_node_preview_image(n: ui_node_t): gpu_texture_t {
|
||||
if (n == null) {
|
||||
return null;
|
||||
}
|
||||
let img: gpu_texture_t = null;
|
||||
if (n.type == "LAYER" || n.type == "LAYER_MASK") {
|
||||
let id: i32 = n.buttons[0].default_value[0];
|
||||
|
||||
Reference in New Issue
Block a user