This commit is contained in:
luboslenco
2025-01-12 15:57:03 +01:00
parent 2dd81d42d2
commit ddd016f657
6 changed files with 26 additions and 26 deletions
+9 -9
View File
@@ -1,8 +1,8 @@
function layers_ext_flatten(height_to_normal: bool = false, layers: slot_layer_t[] = null): slot_layer_t {
let texpaint: image_t = brush_output_node_inst.texpaint;
let texpaint_nor: image_t = brush_output_node_inst.texpaint_nor;
let texpaint_pack: image_t = brush_output_node_inst.texpaint_pack;
let texpaint: image_t = context_raw.brush_output_node_inst.texpaint;
let texpaint_nor: image_t = context_raw.brush_output_node_inst.texpaint_nor;
let texpaint_pack: image_t = context_raw.brush_output_node_inst.texpaint_pack;
let nodes: ui_nodes_t = ui_nodes_get_nodes();
let canvas: ui_node_canvas_t = ui_nodes_get_canvas(true);
@@ -23,17 +23,17 @@ function layers_ext_flatten(height_to_normal: bool = false, layers: slot_layer_t
}
function layers_ext_on_resized() {
image_unload(brush_output_node_inst.texpaint);
image_unload(context_raw.brush_output_node_inst.texpaint);
let texpaint_rt: render_target_t = map_get(render_path_render_targets, "texpaint");
brush_output_node_inst.texpaint = texpaint_rt._image = image_create_render_target(config_get_texture_res_x(), config_get_texture_res_y());
context_raw.brush_output_node_inst.texpaint = texpaint_rt._image = image_create_render_target(config_get_texture_res_x(), config_get_texture_res_y());
image_unload(brush_output_node_inst.texpaint_nor);
image_unload(context_raw.brush_output_node_inst.texpaint_nor);
let texpaint_nor_rt: render_target_t = map_get(render_path_render_targets, "texpaint_nor");
brush_output_node_inst.texpaint_nor = texpaint_nor_rt._image = image_create_render_target(config_get_texture_res_x(), config_get_texture_res_y());
context_raw.brush_output_node_inst.texpaint_nor = texpaint_nor_rt._image = image_create_render_target(config_get_texture_res_x(), config_get_texture_res_y());
image_unload(brush_output_node_inst.texpaint_pack);
image_unload(context_raw.brush_output_node_inst.texpaint_pack);
let texpaint_pack_rt: render_target_t = map_get(render_path_render_targets, "texpaint_pack");
brush_output_node_inst.texpaint_pack = texpaint_pack_rt._image = image_create_render_target(config_get_texture_res_x(), config_get_texture_res_y());
context_raw.brush_output_node_inst.texpaint_pack = texpaint_pack_rt._image = image_create_render_target(config_get_texture_res_x(), config_get_texture_res_y());
if (inpaint_node_image != null) {
image_unload(inpaint_node_image);
+6 -6
View File
@@ -17,11 +17,11 @@ function ui_nodes_ext_draw_buttons(ew: f32, start_y: f32) {
parser_logic_parse(project_canvas);
photo_to_pbr_node_cached_source = null;
let texbase: image_t = logic_node_get_as_image(brush_output_node_inst.base, channel_type_t.BASE_COLOR);
let texocc: image_t = logic_node_get_as_image(brush_output_node_inst.base, channel_type_t.OCCLUSION);
let texrough: image_t = logic_node_get_as_image(brush_output_node_inst.base, channel_type_t.ROUGHNESS);
let texnor: image_t = logic_node_get_as_image(brush_output_node_inst.base, channel_type_t.NORMAL_MAP);
let texheight: image_t = logic_node_get_as_image(brush_output_node_inst.base, channel_type_t.HEIGHT);
let texbase: image_t = logic_node_get_as_image(context_raw.brush_output_node_inst.base, channel_type_t.BASE_COLOR);
let texocc: image_t = logic_node_get_as_image(context_raw.brush_output_node_inst.base, channel_type_t.OCCLUSION);
let texrough: image_t = logic_node_get_as_image(context_raw.brush_output_node_inst.base, channel_type_t.ROUGHNESS);
let texnor: image_t = logic_node_get_as_image(context_raw.brush_output_node_inst.base, channel_type_t.NORMAL_MAP);
let texheight: image_t = logic_node_get_as_image(context_raw.brush_output_node_inst.base, channel_type_t.HEIGHT);
if (texbase != null) {
let texpaint: render_target_t = map_get(render_path_render_targets, "texpaint");
@@ -64,7 +64,7 @@ function ui_nodes_ext_draw_buttons(ew: f32, start_y: f32) {
g4_draw();
g4_end();
let is_float_node: bool = brush_output_node_inst.base.inputs[channel_type_t.HEIGHT].node.base.get == float_node_get;
let is_float_node: bool = context_raw.brush_output_node_inst.base.inputs[channel_type_t.HEIGHT].node.base.get == float_node_get;
if (ui_header_worktab.position == space_type_t.SPACE3D && !is_float_node) {