diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index 62780c315..b241f0a7f 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -682,7 +682,9 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc for( var i = 0, n = array_length(_ilist); i < n; i++ ) { if(!struct_has(_inarr, _ilist[i])) continue; - ds_list_add(inputs, _inarr[$ _ilist[i]]); + var _inJunc = _inarr[$ _ilist[i]]; + _inJunc.index = ds_list_size(inputs); + ds_list_add(inputs, _inJunc); } } @@ -708,7 +710,9 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc for( var i = 0, n = array_length(_ilist); i < n; i++ ) { if(!struct_has(_inarr, _ilist[i])) continue; - ds_list_add(outputs, _inarr[$ _ilist[i]]); + var _outJunc = _inarr[$ _ilist[i]]; + _outJunc.index = ds_list_size(outputs); + ds_list_add(outputs, _outJunc); } } diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index ae5e829d5..a4edf13a8 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -23,6 +23,8 @@ enum NODE_3D { function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor { #region ---- main & active ---- + project = PROJECT; + active = true; renderActive = true; diff --git a/scripts/node_frame/node_frame.gml b/scripts/node_frame/node_frame.gml index d368eff20..cfe99c382 100644 --- a/scripts/node_frame/node_frame.gml +++ b/scripts/node_frame/node_frame.gml @@ -165,14 +165,15 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var x0 = x1 - 16; var y0 = y1 - 16; var ics = 0.5; + var shf = 8 + 8 * ics; if(w * _s < 32 || h * _s < 32) return point_in_rectangle(_mx, _my, xx, yy, x1, y1); if(point_in_rectangle(_mx, _my, xx, yy, x1, y1) || size_dragging) - draw_sprite_ext_add(THEME.node_resize, 0, x1 - 4, y1 - 4, ics, ics, 0, c_white, 0.5); + draw_sprite_ext_add(THEME.node_resize, 0, x1 - shf, y1 - shf, ics, ics, 0, c_white, 0.5); if(!name_hover && point_in_rectangle(_mx, _my, x0, y0, x1, y1)) { - draw_sprite_ext_add(THEME.node_resize, 0, x1 - 4, y1 - 4, ics, ics, 0, c_white, 1); + draw_sprite_ext_add(THEME.node_resize, 0, x1 - shf, y1 - shf, ics, ics, 0, c_white, 1); PANEL_GRAPH.drag_locking = true; diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index 7aaf367ba..4f84ea5a8 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -527,8 +527,8 @@ function Panel_Inspector() : PanelContent() constructor { _inspecting.inspecting = true; prop_hover = noone; var jun = noone; - var amoIn = _inspecting.input_display_list == -1? ds_list_size(_inspecting.inputs) : array_length(_inspecting.input_display_list); - var amoOut = _inspecting.output_display_list == -1? ds_list_size(_inspecting.outputs) : array_length(_inspecting.output_display_list); + var amoIn = is_array(_inspecting.input_display_list)? array_length(_inspecting.input_display_list) : ds_list_size(_inspecting.inputs); + var amoOut = is_array(_inspecting.output_display_list)? array_length(_inspecting.output_display_list) : ds_list_size(_inspecting.outputs); var amo = inspectGroup == 0? amoIn + 1 + amoOut : amoIn; var hh = 0; @@ -637,9 +637,9 @@ function Panel_Inspector() : PanelContent() constructor { var yy = hh + _y; if(i < amoIn) { // inputs - if(_inspecting.input_display_list == -1) jun = _inspecting.inputs[| i]; - else if(is_real(_inspecting.input_display_list[i])) jun = _inspecting.inputs[| _inspecting.input_display_list[i]]; - else jun = _inspecting.input_display_list[i]; + if(!is_array(_inspecting.input_display_list)) jun = _inspecting.inputs[| i]; + else if(is_real(_inspecting.input_display_list[i])) jun = _inspecting.inputs[| _inspecting.input_display_list[i]]; + else jun = _inspecting.input_display_list[i]; } else if(i == amoIn) { // output label hh += ui(8 + 32 + 8); @@ -652,8 +652,8 @@ function Panel_Inspector() : PanelContent() constructor { } else { // outputs var _oi = i - amoIn - 1; - if(_inspecting.output_display_list == -1) jun = _inspecting.outputs[| _oi]; - else if(is_real(_inspecting.output_display_list[i])) jun = _inspecting.outputs[| _inspecting.output_display_list[_oi]]; + if(!is_array(_inspecting.output_display_list)) jun = _inspecting.outputs[| _oi]; + else if(is_real(_inspecting.output_display_list[_oi])) jun = _inspecting.outputs[| _inspecting.output_display_list[_oi]]; else jun = _inspecting.output_display_list[_oi]; } diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index af72fc801..1b92b8763 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -389,14 +389,20 @@ function Panel_Preview() : PanelContent() constructor { if(preview_node[1] == node) preview_node[1] = noone; } #endregion - function resetNodePreview() { #region + function resetNodePreview() { preview_node = [ noone, noone ]; locked = false; - } #endregion + } function __getNodePreview() { return preview_node[splitView? splitSelection : 0]; } function getNodePreview() { var _node = __getNodePreview(); + if(_node == noone) return noone; + + if(!_node.project.active) { + resetNodePreview(); + return noone; + } if(is_instanceof(_node, Node)) _node = _node.getPreviewingNode(); @@ -2030,7 +2036,6 @@ function Panel_Preview() : PanelContent() constructor { var _prev_node = getNodePreview(); d3_active = _prev_node == noone? NODE_3D.none : _prev_node.is_3D; - //print($"{_prev_node} : {d3_active}") bg_color = lerp_color(bg_color, d3_active? COLORS.panel_3d_bg : COLORS.panel_bg_clear, 0.3); draw_clear(bg_color);