diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index bfeaedbf8..45ac39659 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -1236,6 +1236,7 @@ {"name":"s_node_rigidSim_force","order":2,"path":"sprites/s_node_rigidSim_force/s_node_rigidSim_force.yy",}, {"name":"s_node_vec2","order":7,"path":"sprites/s_node_vec2/s_node_vec2.yy",}, {"name":"node_twirl","order":4,"path":"scripts/node_twirl/node_twirl.yy",}, + {"name":"node_collection_inline","order":16,"path":"scripts/node_collection_inline/node_collection_inline.yy",}, {"name":"s_node_fluidSim_update_paused","order":7,"path":"sprites/s_node_fluidSim_update_paused/s_node_fluidSim_update_paused.yy",}, {"name":"s_node_decorner","order":17,"path":"sprites/s_node_decorner/s_node_decorner.yy",}, {"name":"s_node_text_combine","order":3,"path":"sprites/s_node_text_combine/s_node_text_combine.yy",}, @@ -1461,6 +1462,7 @@ {"name":"fd_rectangle_get_acceleration_b","order":1,"path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",}, {"name":"surface_draw_functions","order":7,"path":"scripts/surface_draw_functions/surface_draw_functions.yy",}, {"name":"s_node_region_fill","order":29,"path":"sprites/s_node_region_fill/s_node_region_fill.yy",}, + {"name":"__node_controller","order":15,"path":"scripts/__node_controller/__node_controller.yy",}, {"name":"sh_default","order":6,"path":"shaders/sh_default/sh_default.yy",}, {"name":"BBMOD_Matrix","order":2,"path":"scripts/BBMOD_Matrix/BBMOD_Matrix.yy",}, {"name":"pack_shelf","order":1,"path":"scripts/pack_shelf/pack_shelf.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 89ad5b822..accd75850 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -1560,6 +1560,7 @@ {"id":{"name":"fd_rectangle_set_acceleration","path":"scripts/fd_rectangle_set_acceleration/fd_rectangle_set_acceleration.yy",},}, {"id":{"name":"s_node_vec2","path":"sprites/s_node_vec2/s_node_vec2.yy",},}, {"id":{"name":"node_twirl","path":"scripts/node_twirl/node_twirl.yy",},}, + {"id":{"name":"node_collection_inline","path":"scripts/node_collection_inline/node_collection_inline.yy",},}, {"id":{"name":"s_node_fluidSim_update_paused","path":"sprites/s_node_fluidSim_update_paused/s_node_fluidSim_update_paused.yy",},}, {"id":{"name":"s_node_decorner","path":"sprites/s_node_decorner/s_node_decorner.yy",},}, {"id":{"name":"s_node_text_combine","path":"sprites/s_node_text_combine/s_node_text_combine.yy",},}, @@ -1822,6 +1823,7 @@ {"id":{"name":"fd_rectangle_get_acceleration_b","path":"scripts/fd_rectangle_get_acceleration_b/fd_rectangle_get_acceleration_b.yy",},}, {"id":{"name":"surface_draw_functions","path":"scripts/surface_draw_functions/surface_draw_functions.yy",},}, {"id":{"name":"s_node_region_fill","path":"sprites/s_node_region_fill/s_node_region_fill.yy",},}, + {"id":{"name":"__node_controller","path":"scripts/__node_controller/__node_controller.yy",},}, {"id":{"name":"sh_default","path":"shaders/sh_default/sh_default.yy",},}, {"id":{"name":"BBMOD_Matrix","path":"scripts/BBMOD_Matrix/BBMOD_Matrix.yy",},}, {"id":{"name":"pack_shelf","path":"scripts/pack_shelf/pack_shelf.yy",},}, diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index d13cb00d9..356888664 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -25,12 +25,9 @@ event_inherited(); anchor = ANCHOR.left | ANCHOR.top; node_menu_selecting = noone; - var _con = PANEL_GRAPH.getCurrentContext(); - var context = _con == noone? "" : instanceof(_con); - #region ---- category ---- category = NODE_CATEGORY; - switch(context) { + switch(instanceof(context)) { case "Node_Pixel_Builder" : category = NODE_PB_CATEGORY; break; case "Node_DynaSurf" : category = NODE_PCX_CATEGORY; break; } @@ -40,7 +37,7 @@ event_inherited(); for(var i = 0; i < ds_list_size(category); i++) { var cat = category[| i]; - if(array_length(cat.filter) && !array_exists(cat.filter, context)) + if(array_length(cat.filter) && !array_exists(cat.filter, instanceof(context))) continue; var name = __txt(cat.name); @@ -164,6 +161,9 @@ event_inherited(); array_pop(global.RECENT_NODES); } + if(is_instanceof(context, Node_Collection_Inline)) + context.addNode(_new_node); + _inputs = _new_node.inputs; _outputs = _new_node.outputs; } else if(is_instanceof(_node, NodeAction)) { @@ -184,6 +184,9 @@ event_inherited(); for( var i = 0; i < ds_list_size(_new_list); i++ ) { tx = min(tx, _new_list[| i].x); ty = min(tx, _new_list[| i].y); + + if(is_instanceof(context, Node_Collection_Inline)) + context.addNode(_new_list[| i]); } var shx = tx - node_target_x; @@ -259,8 +262,6 @@ event_inherited(); var hh = 0; var hg = ui(28); - var context = PANEL_GRAPH.getCurrentContext(); - context = context == noone? "" : instanceof(context); var start = category == NODE_CATEGORY? -2 : 0; @@ -274,7 +275,7 @@ event_inherited(); name = cat.name; if(array_length(cat.filter)) { - if(!array_exists(cat.filter, context)) { + if(!array_exists(cat.filter, instanceof(context))) { if(ADD_NODE_PAGE == i) setPage(NODE_PAGE_DEFAULT); continue; @@ -345,13 +346,10 @@ event_inherited(); var hh = 0; if(ADD_NODE_PAGE == -2) { #region - var context = PANEL_GRAPH.getCurrentContext(); - context = context == noone? "" : instanceof(context); - _list = ds_list_create(); for(var i = 0; i < ds_list_size(category); i++) { var cat = category[| i]; - if(array_length(cat.filter) && !array_exists(cat.filter, context)) + if(array_length(cat.filter) && !array_exists(cat.filter, instanceof(context))) continue; for( var j = 0; j < ds_list_size(cat.list); j++ ) { @@ -375,8 +373,7 @@ event_inherited(); )); } - var _cont = PANEL_GRAPH.getCurrentContext(); - if(_cont != noone) array_append(sug, nodeReleatedQuery("context", instanceof(_cont))); + array_append(sug, nodeReleatedQuery("context", instanceof(context))); if(!array_empty(sug)) { ds_list_add(_list, "Related"); @@ -687,8 +684,6 @@ event_inherited(); ds_list_clear(search_list); var pr_list = ds_priority_create(); - var cnt = PANEL_GRAPH.getCurrentContext(); - var context = cnt == noone? "" : instanceof(cnt); var search_lower = string_lower(search_string); var search_map = ds_map_create(); @@ -697,7 +692,7 @@ event_inherited(); if(!struct_has(cat, "list")) continue; - if(array_length(cat.filter) && !array_exists(cat.filter, context)) + if(array_length(cat.filter) && !array_exists(cat.filter, instanceof(context))) continue; var _content = cat.list; diff --git a/scripts/__node_controller/__node_controller.gml b/scripts/__node_controller/__node_controller.gml new file mode 100644 index 000000000..f81a95319 --- /dev/null +++ b/scripts/__node_controller/__node_controller.gml @@ -0,0 +1,3 @@ +function __Node_Controller(parent) constructor { + +} \ No newline at end of file diff --git a/scripts/__node_controller/__node_controller.yy b/scripts/__node_controller/__node_controller.yy new file mode 100644 index 000000000..1cc405b56 --- /dev/null +++ b/scripts/__node_controller/__node_controller.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "__node_controller", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "__base__", + "path": "folders/nodes/data/__base__.yy", + }, +} \ No newline at end of file diff --git a/scripts/__strandSim/__strandSim.gml b/scripts/__strandSim/__strandSim.gml index 48a571a95..d47cf3130 100644 --- a/scripts/__strandSim/__strandSim.gml +++ b/scripts/__strandSim/__strandSim.gml @@ -37,10 +37,10 @@ function StrandPoint(x, y) constructor { static clone = function() { return new StrandPoint(x, y); } } -function Strand(sx = 0, sy = 0, amount = 5, length = 8, direct = 0, curlFreq = 4, curlSize = 8) constructor { +function Strand(sx = 0, sy = 0, amount = 5, _length = 8, direct = 0, curlFreq = 4, curlSize = 8) constructor { points = []; id = irandom_range(10000, 99999); - self.length = array_create(amount, length); + self.length = array_create(amount, _length); self.direct = direct; curl_freq = curlFreq; curl_size = curlSize; diff --git a/scripts/dialog_management/dialog_management.gml b/scripts/dialog_management/dialog_management.gml index f48605a1e..249084f13 100644 --- a/scripts/dialog_management/dialog_management.gml +++ b/scripts/dialog_management/dialog_management.gml @@ -2,7 +2,7 @@ function dialogCall(_dia, _x = noone, _y = noone, param = {}, create = false) { if(_x == noone) _x = WIN_SW / 2; if(_y == noone) _y = WIN_SH / 2; - var dia = !create && instance_exists(_dia)? instance_find(_dia, 0) : instance_create_depth(_x, _y, 0, _dia); + var dia = !create && instance_exists(_dia)? instance_find(_dia, 0) : instance_create_depth(_x, _y, 0, _dia, param); dia.x = _x; dia.y = _y; diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 269be6a0e..22b8670a5 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -162,10 +162,6 @@ DEF_SURFACE_RESET(); #endregion -#region PATCH - #macro PATCH_STATIC static _doUpdate = function() { doUpdate() }; -#endregion - #region debug global.FLAG = {}; #endregion \ No newline at end of file diff --git a/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.gml b/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.gml index f27d46b32..a192712f5 100644 --- a/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.gml +++ b/scripts/node_VFX_effect_accelerate/node_VFX_effect_accelerate.gml @@ -22,6 +22,4 @@ function Node_VFX_Accelerate(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, if(scy_s < 0) part.scy = lerp_linear(part.scy, 0, abs(scy_s)); else part.scy += sign(part.scy) * scy_s; } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_attract/node_VFX_effect_attract.gml b/scripts/node_VFX_effect_attract/node_VFX_effect_attract.gml index 1860bd9c4..05d3233cf 100644 --- a/scripts/node_VFX_effect_attract/node_VFX_effect_attract.gml +++ b/scripts/node_VFX_effect_attract/node_VFX_effect_attract.gml @@ -39,6 +39,4 @@ function Node_VFX_Attract(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _g if(_dest && point_distance(part.x, part.y, _area_x, _area_y) <= _sten) part.kill(); } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.gml b/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.gml index 00624e238..8fee71ab1 100644 --- a/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.gml +++ b/scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.gml @@ -12,6 +12,4 @@ function Node_VFX_Destroy(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _g if(random(1) < str * _sten) part.kill(); } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_oscillate/node_VFX_effect_oscillate.gml b/scripts/node_VFX_effect_oscillate/node_VFX_effect_oscillate.gml index b58e71503..1d5467b79 100644 --- a/scripts/node_VFX_effect_oscillate/node_VFX_effect_oscillate.gml +++ b/scripts/node_VFX_effect_oscillate/node_VFX_effect_oscillate.gml @@ -33,6 +33,4 @@ function Node_VFX_Oscillate(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, part.drawx += _dx; part.drawy += _dy; } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_repel/node_VFX_effect_repel.gml b/scripts/node_VFX_effect_repel/node_VFX_effect_repel.gml index 773f3c536..167395a99 100644 --- a/scripts/node_VFX_effect_repel/node_VFX_effect_repel.gml +++ b/scripts/node_VFX_effect_repel/node_VFX_effect_repel.gml @@ -29,6 +29,4 @@ function Node_VFX_Repel(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _gro if(scy_s < 0) part.scy = lerp_linear(part.scy, 0, abs(scy_s)); else part.scy += sign(part.scy) * scy_s; } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.gml b/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.gml index 757a1c988..dd0a0b73c 100644 --- a/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.gml +++ b/scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.gml @@ -41,6 +41,4 @@ function Node_VFX_Turbulence(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, if(scy_s < 0) part.scy = lerp_linear(part.scy, 0, abs(scy_s)); else if(scy_s > 0) part.scy += sign(part.scy) * scy_s; } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.gml b/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.gml index 526226004..93e3da185 100644 --- a/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.gml +++ b/scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.gml @@ -49,6 +49,4 @@ function Node_VFX_Vortex(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _gr if(_dest && point_distance(pv[0], pv[1], _area_x, _area_y) <= 1) part.kill(); } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml b/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml index de4a49ca8..1d7c04773 100644 --- a/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml +++ b/scripts/node_VFX_effect_wind/node_VFX_effect_wind.gml @@ -22,6 +22,4 @@ function Node_VFX_Wind(_x, _y, _group = noone) : Node_VFX_effector(_x, _y, _grou if(scy_s < 0) part.scy = lerp_linear(part.scy, 0, abs(scy_s)); else part.scy += sign(part.scy) * scy_s; } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index d45161fb2..bbe5a6ea5 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -4,6 +4,24 @@ enum COLLECTION_TAG { } function groupNodes(nodeArray, _group = noone, record = true, check_connect = true) { #region + var _ctx_nodes = []; + + for(var i = 0; i < array_length(nodeArray); i++) { + var node = nodeArray[i]; + + for( var j = 0, m = array_length(node.context_data); j < m; j++ ) { + var _cnt = node.context_data[i]; + array_push_unique(_ctx_nodes, _cnt); + + for( var k = 0, n = array_length(_cnt.members); k < n; k++ ) { + if(!array_exists(nodeArray, _cnt.members[k])) { + noti_warning("Grouping incomplete inline group is not allowed."); + return; + } + } + } + } + UNDO_HOLDING = true; if(_group == noone) { @@ -21,12 +39,17 @@ function groupNodes(nodeArray, _group = noone, record = true, check_connect = tr } var _content = []; - + for(var i = 0; i < array_length(nodeArray); i++) { _group.add(nodeArray[i]); _content[i] = nodeArray[i]; } - + + for( var i = 0, n = array_length(_ctx_nodes); i < n; i++ ) { + _group.add(_ctx_nodes[i]); + _content[i] = _ctx_nodes[i]; + } + var _io = []; if(check_connect) for(var i = 0; i < array_length(nodeArray); i++) diff --git a/scripts/node_collection_inline/node_collection_inline.gml b/scripts/node_collection_inline/node_collection_inline.gml new file mode 100644 index 000000000..e4727051b --- /dev/null +++ b/scripts/node_collection_inline/node_collection_inline.gml @@ -0,0 +1,228 @@ +function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { + attributes.members = []; + members = []; + group_vertex = []; + group_dragging = false; + group_adding = false; + group_alpha = 0; + vertex_hash = ""; + + group_hovering = false; + + static removeNode = function(node) { #region + array_remove(attributes.members, node.node_id); + array_remove(members, node); + + array_remove(node.context_data, self); + } #endregion + + static addNode = function(node) { #region + array_push(attributes.members, node.node_id); + array_push(members, node); + + array_push_unique(node.context_data, self); + } #endregion + + static ccw = function(a, b, c) { return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]); } + + static getNodeBorder = function(_i, _vertex, _node) { #region + var _rad = 4; + var _stp = 15; + + var _nx0 = _node.x - 32 + _rad; + var _ny0 = _node.y - 32 + _rad; + var _nx1 = _node.x + (_node == self? _node.w / 2 : _node.w + 32 - _rad); + var _ny1 = _node.y + _node.h + 32 - _rad; + + var _ind = 0; + for( var i = 0; i <= 90; i += _stp ) _vertex[_i * 7 * 4 + _ind++] = [ _nx1 + lengthdir_x(_rad, i), _ny0 + lengthdir_y(_rad, i) ]; + for( var i = 90; i <= 180; i += _stp ) _vertex[_i * 7 * 4 + _ind++] = [ _nx0 + lengthdir_x(_rad, i), _ny0 + lengthdir_y(_rad, i) ]; + for( var i = 180; i <= 270; i += _stp ) _vertex[_i * 7 * 4 + _ind++] = [ _nx0 + lengthdir_x(_rad, i), _ny1 + lengthdir_y(_rad, i) ]; + for( var i = 270; i <= 360; i += _stp ) _vertex[_i * 7 * 4 + _ind++] = [ _nx1 + lengthdir_x(_rad, i), _ny1 + lengthdir_y(_rad, i) ]; + } #endregion + + static refreshMember = function() { #region + members = []; + + for( var i = 0, n = array_length(attributes.members); i < n; i++ ) { + if(!ds_map_exists(PROJECT.nodeMap, attributes.members[i])) { + print($"Node not found {attributes.members[i]}"); + continue; + } + + var _node = PROJECT.nodeMap[? attributes.members[i]]; + array_push(members, _node); + } + } #endregion + + static refreshGroupBG = function() { #region + var _hash = ""; + var _ind = 0; + + for( var i = 0, n = array_length(members); i < n; i++ ) { + var _node = members[i]; + if(!_node.active) continue; + _hash += $"{_node.x},{_node.y},{_node.w},{_node.h}|"; + _ind++; + } + if(_hash == "") { + nodeDelete(self); + return; + } + _hash = md5_string_utf8(_hash); + + if(vertex_hash == _hash) return; + vertex_hash = _hash; + + group_vertex = []; + + if(_ind == 0) return; + var _vtrx = array_create(_ind * 4 * 7); + + var _ind = 0; + for( var i = 0, n = array_length(members); i < n; i++ ) { + var _node = members[i]; + if(!_node.active) continue; + getNodeBorder(_ind, _vtrx, _node); + _ind++; + } + + __temp_minP = [ x, y ]; + __temp_minI = 0; + + for( var i = 0, n = array_length(_vtrx); i < n; i++ ) { + var _v = _vtrx[i]; + + if(_v[1] > __temp_minP[1] || (_v[1] == __temp_minP[1] && _v[0] < __temp_minP[0])) { + __temp_minP = _v; + __temp_minI = i; + } + } + + _vtrx = array_map( _vtrx, function(a, i) { return [ a[0], a[1], i == __temp_minI? -999 : point_direction(__temp_minP[0], __temp_minP[1], a[0], a[1]) + 360 ] }); + array_sort(_vtrx, function(a0, a1) { return a0[2] == a1[2]? sign(a0[0] - a1[0]) : sign(a0[2] - a1[2]); }); + + var _linS = 0; + for( var i = 1, n = array_length(_vtrx); i < n; i++ ) { + if(_vtrx[i][1] != _vtrx[0][1]) break; + _linS = i; + } + + array_delete(_vtrx, 1, _linS - 1); + + group_vertex = [ _vtrx[0], _vtrx[1] ]; + + for( var i = 2, n = array_length(_vtrx); i < n; i++ ) { + var _v = _vtrx[i]; + + while( array_length(group_vertex) >= 2 && ccw( group_vertex[array_length(group_vertex) - 2], group_vertex[array_length(group_vertex) - 1], _v ) >= 0 ) + array_pop(group_vertex); + array_push(group_vertex, _v); + } + } #endregion + + static groupCheck = function(_x, _y, _s, _mx, _my) { #region + if(array_length(group_vertex) < 3) return; + var _inGroup = true; + var _m = [ _mx / _s - _x, _my / _s - _y ]; + + group_adding = false; + + if(PANEL_GRAPH.node_dragging && key_mod_press(SHIFT)) { + var side = undefined; + for( var i = 1, n = array_length(group_vertex); i < n; i++ ) { + var a = group_vertex[i - 1]; + var b = group_vertex[i - 0]; + + var _side = sign(ccw(a, b, _m)); + if(side == undefined) side = _side; + else if(side != _side) _inGroup = false; + } + + var _list = PANEL_GRAPH.nodes_selecting; + + if(_inGroup) { + group_adding = true; + for( var i = 0, n = array_length(_list); i < n; i++ ) + array_push_unique(attributes.members, _list[i].node_id); + } else { + for( var i = 0, n = array_length(_list); i < n; i++ ) + array_remove(attributes.members, _list[i].node_id); + } + + if(!group_dragging) { + for( var i = 0, n = array_length(_list); i < n; i++ ) + array_remove(attributes.members, _list[i].node_id); + refreshMember(); + refreshGroupBG(); + } + group_dragging = true; + } + + if(group_dragging && mouse_release(mb_left)) { + refreshMember(); + refreshGroupBG(); + + group_dragging = false; + } + } #endregion + + static drawNodeBG = function(_x, _y, _mx, _my, _s) { #region + refreshGroupBG(); + if(array_length(group_vertex) < 3) return false; + + var _hov = false; + var _color = getColor(); + + draw_set_color(_color); + group_alpha = lerp_float(group_alpha, group_adding, 4); + draw_set_alpha(0.025 + 0.025 * group_alpha + 0.025 * group_hovering); + draw_primitive_begin(pr_trianglelist); + var a = group_vertex[0]; + var b = group_vertex[1]; + var c; + + for( var i = 2, n = array_length(group_vertex); i < n; i++ ) { + c = group_vertex[i]; + + var v0x = _x + a[0] * _s; + var v0y = _y + a[1] * _s; + var v1x = _x + b[0] * _s; + var v1y = _y + b[1] * _s; + var v2x = _x + c[0] * _s; + var v2y = _y + c[1] * _s; + + draw_vertex(v0x, v0y); + draw_vertex(v1x, v1y); + draw_vertex(v2x, v2y); + + if(!_hov && point_in_triangle(_mx, _my, v0x, v0y, v1x, v1y, v2x, v2y)) + _hov = true; + + b = group_vertex[i]; + } + draw_primitive_end(); + + draw_set_alpha(0.3); + draw_primitive_begin(pr_linestrip); + for( var i = 0, n = array_length(group_vertex); i < n; i++ ) { + var a = group_vertex[i]; + draw_vertex(_x + a[0] * _s, _y + a[1] * _s); + } + + a = group_vertex[0]; + draw_vertex(_x + a[0] * _s, _y + a[1] * _s); + draw_primitive_end(); + + draw_set_alpha(1); + + group_hovering = _hov; + return _hov; + } #endregion + + static drawNode = function(_x, _y, _mx, _my, _s, display_parameter = noone) {} + + static postDeserialize = function() { #region + refreshMember(); + } #endregion +} \ No newline at end of file diff --git a/scripts/node_collection_inline/node_collection_inline.yy b/scripts/node_collection_inline/node_collection_inline.yy new file mode 100644 index 000000000..4bb1ad9be --- /dev/null +++ b/scripts/node_collection_inline/node_collection_inline.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_collection_inline", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "__base__", + "path": "folders/nodes/data/__base__.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_color_data/node_color_data.gml b/scripts/node_color_data/node_color_data.gml index 9cb307244..ecd22e63c 100644 --- a/scripts/node_color_data/node_color_data.gml +++ b/scripts/node_color_data/node_color_data.gml @@ -41,6 +41,4 @@ function Node_Color_Data(_x, _y, _group = noone) : Node_Processor(_x, _y, _group return _n? val / 255 : val; } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_color_replacement/node_color_replacement.gml b/scripts/node_color_replacement/node_color_replacement.gml index be9f82f3e..9714a88ac 100644 --- a/scripts/node_color_replacement/node_color_replacement.gml +++ b/scripts/node_color_replacement/node_color_replacement.gml @@ -155,7 +155,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g for( var i = 0; i < ww * hh; i++ ) { var b = buffer_read(c_buffer, buffer_u32); var c = b & ~(0b11111111 << 24); - var a = b & (0b11111111 << 24); + var a = b & (0b11111111 << 24); if(a == 0) continue; c = make_color_rgb(color_get_red(c), color_get_green(c), color_get_blue(c)); _pall[? c] = 1; diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index fb04dbcdb..25856974f 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -15,11 +15,10 @@ enum DYNA_INPUT_COND { function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x, _y) constructor { #region ---- main & active ---- - active = true; + active = true; renderActive = true; node_id = UUID_generate(); - group = _group; manual_deletable = true; destroy_when_upgroup = false; @@ -29,6 +28,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x active_range = [ 0, TOTAL_FRAMES - 1 ]; array_push(PROJECT.nodeArray, self); + + context_data = []; #endregion static resetInternalName = function() { #region diff --git a/scripts/node_feedback_input/node_feedback_input.gml b/scripts/node_feedback_input/node_feedback_input.gml index 3af27f837..4fe45feb4 100644 --- a/scripts/node_feedback_input/node_feedback_input.gml +++ b/scripts/node_feedback_input/node_feedback_input.gml @@ -23,6 +23,4 @@ function Node_Feedback_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, } outputs[| 1] = nodeValue("Feedback loop", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, 0).nonForward(); - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_fluid_sim/node_fluid_sim.gml b/scripts/node_fluid_sim/node_fluid_sim.gml index 35ccaf876..cabfe651f 100644 --- a/scripts/node_fluid_sim/node_fluid_sim.gml +++ b/scripts/node_fluid_sim/node_fluid_sim.gml @@ -116,6 +116,4 @@ function Node_Fluid_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro if(outputNode == noone) return false; return outputNode.cacheExist(frame); } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_group/node_group.gml b/scripts/node_group/node_group.gml index f5ddb8b1b..6eb646c14 100644 --- a/scripts/node_group/node_group.gml +++ b/scripts/node_group/node_group.gml @@ -2,6 +2,4 @@ function Node_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) co name = "Group"; color = COLORS.node_blend_collection; icon = THEME.group_s; - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index 66134291e..56c04cb6a 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -366,8 +366,6 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru } } #endregion - PATCH_STATIC - static update = function(frame = CURRENT_FRAME) { #region if(is_undefined(inParent)) return; } #endregion diff --git a/scripts/node_iterate_sort/node_iterate_sort.gml b/scripts/node_iterate_sort/node_iterate_sort.gml index bc1262e93..b1923af55 100644 --- a/scripts/node_iterate_sort/node_iterate_sort.gml +++ b/scripts/node_iterate_sort/node_iterate_sort.gml @@ -158,6 +158,4 @@ function Node_Iterate_Sort(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr quickSort(arrOut, 0, array_length(arrOut) - 1); outputs[| 0].setValue(arrOut); } #endregion - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_iterator_input/node_iterator_input.gml b/scripts/node_iterator_input/node_iterator_input.gml index 122bd0597..42b71b88e 100644 --- a/scripts/node_iterator_input/node_iterator_input.gml +++ b/scripts/node_iterator_input/node_iterator_input.gml @@ -35,6 +35,4 @@ function Node_Iterator_Input(_x, _y, _group = noone) : Node_Group_Input(_x, _y, outputs[| 1] = nodeValue("Loop entrance", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, 0) .nonForward(); - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 2f0b617a1..c002422e1 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -512,7 +512,7 @@ function __initNodes() { addNodeObject(filter, "HSV Extract", s_node_HSV, "Node_HSV_Channel", [1, Node_HSV_Channel],, "Extract HSVA channel on an image, each channel becomes its own image.").setVersion(1070); addNodeObject(filter, "Alpha to Grey", s_node_alpha_grey, "Node_Alpha_Grey", [1, Node_Alpha_Grey],, "Convert alpha value into solid greyscale."); addNodeObject(filter, "Grey to Alpha", s_node_grey_alpha, "Node_Grey_Alpha", [1, Node_Grey_Alpha],, "Convert greyscale to alpha value."); - + ds_list_add(filter, "Fixes"); addNodeObject(filter, "De-Corner", s_node_decorner, "Node_De_Corner", [1, Node_De_Corner], ["decorner"], "Attempt to remove single pixel corner from the image."); addNodeObject(filter, "De-Stray", s_node_destray, "Node_De_Stray", [1, Node_De_Stray], ["destray"], "Attempt to remove orphan pixel."); diff --git a/scripts/node_rigid_group/node_rigid_group.gml b/scripts/node_rigid_group/node_rigid_group.gml index d707df2da..17592c859 100644 --- a/scripts/node_rigid_group/node_rigid_group.gml +++ b/scripts/node_rigid_group/node_rigid_group.gml @@ -31,6 +31,4 @@ function Node_Rigid_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro if(CURRENT_FRAME == 0) reset(); } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index bbbe2c9a4..1eda450f0 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -70,52 +70,54 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const groomed = new StrandMesh(); strands = new StrandMesh(); - tool_push = new NodeTool( "Push", THEME.strand_push ) - .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_push.attribute.radius = val; }, "radius", 6) - .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_push.attribute.strength = val; }, "strength", 0.2) - .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_push.attribute.fall = val; }, "fall", 0.1) - .addSetting("Fix length", VALUE_TYPE.boolean, function() { tool_push.attribute.fix = !tool_push.attribute.fix; }, "fix", false) + #region ---- tools ---- + tool_push = new NodeTool( "Push", THEME.strand_push ) + .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_push.attribute.radius = val; }, "radius", 6) + .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_push.attribute.strength = val; }, "strength", 0.2) + .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_push.attribute.fall = val; }, "fall", 0.1) + .addSetting("Fix length", VALUE_TYPE.boolean, function() { tool_push.attribute.fix = !tool_push.attribute.fix; }, "fix", false) - tool_comb = new NodeTool( "Comb", THEME.strand_comb ) - .addSetting("Width", VALUE_TYPE.float, function(val) { tool_comb.attribute.width = val; }, "width", 8) - .addSetting("Thick", VALUE_TYPE.float, function(val) { tool_comb.attribute.thick = val; }, "thick", 4) - .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_comb.attribute.strength = val; }, "strength", 0.75) + tool_comb = new NodeTool( "Comb", THEME.strand_comb ) + .addSetting("Width", VALUE_TYPE.float, function(val) { tool_comb.attribute.width = val; }, "width", 8) + .addSetting("Thick", VALUE_TYPE.float, function(val) { tool_comb.attribute.thick = val; }, "thick", 4) + .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_comb.attribute.strength = val; }, "strength", 0.75) - tool_stretch = new NodeTool( "Stretch", THEME.strand_stretch ) - .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_stretch.attribute.radius = val; }, "radius", 6) - .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_stretch.attribute.strength = val; }, "strength", 0.5) - .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_stretch.attribute.fall = val; }, "fall", 0.1) + tool_stretch = new NodeTool( "Stretch", THEME.strand_stretch ) + .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_stretch.attribute.radius = val; }, "radius", 6) + .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_stretch.attribute.strength = val; }, "strength", 0.5) + .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_stretch.attribute.fall = val; }, "fall", 0.1) - tool_cut = new NodeTool( "Shorten", THEME.strand_cut ) - .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_cut.attribute.radius = val; }, "radius", 6) - .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_cut.attribute.strength = val; }, "strength", 0.5) - .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_cut.attribute.fall = val; }, "fall", 0.1) + tool_cut = new NodeTool( "Shorten", THEME.strand_cut ) + .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_cut.attribute.radius = val; }, "radius", 6) + .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_cut.attribute.strength = val; }, "strength", 0.5) + .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_cut.attribute.fall = val; }, "fall", 0.1) - tool_grab = new NodeTool( "Grab", THEME.strand_grab ) - .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_grab.attribute.radius = val; }, "radius", 4) - .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_grab.attribute.strength = val; }, "strength", 1) - .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_grab.attribute.fall = val; }, "fall", 0.2) + tool_grab = new NodeTool( "Grab", THEME.strand_grab ) + .addSetting("Radius", VALUE_TYPE.float, function(val) { tool_grab.attribute.radius = val; }, "radius", 4) + .addSetting("Strength", VALUE_TYPE.float, function(val) { tool_grab.attribute.strength = val; }, "strength", 1) + .addSetting("Falloff", VALUE_TYPE.float, function(val) { tool_grab.attribute.fall = val; }, "fall", 0.2) - groomTools = [ - tool_push, - tool_comb, - tool_stretch, - tool_cut, - tool_grab, - ]; + groomTools = [ + tool_push, + tool_comb, + tool_stretch, + tool_cut, + tool_grab, + ]; - tool_dragging = noone; - tool_mx = 0; - tool_my = 0; - tool_dmx = 0; - tool_dmy = 0; - tool_dir = 0; - tool_dir_fix = 0; - tool_dir_to = 0; + tool_dragging = noone; + tool_mx = 0; + tool_my = 0; + tool_dmx = 0; + tool_dmy = 0; + tool_dir = 0; + tool_dir_fix = 0; + tool_dir_to = 0; - tool_grabbing = []; + tool_grabbing = []; + #endregion - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _typ = getInputData(0); var _pre = getInputData(16); if(!attributes.use_groom) @@ -418,9 +420,9 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const tool_dmx = __mx; tool_dmy = __my; - } + } #endregion - static step = function() { + static step = function() { #region var _typ = getInputData(0); inputs[| 5].setVisible(_typ == 1, _typ == 1); @@ -430,9 +432,9 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 15].editWidget.text = attributes.use_groom? "Unbake" : "Bake"; inputs[| 15].editWidget.blend = attributes.use_groom? COLORS._main_value_negative : COLORS._main_value_positive; - } + } #endregion - static strandUpdate = function(willReset = false) { + static strandUpdate = function(willReset = false) { #region var _typ = getInputData(0); var _den = getInputData(1); var _len = getInputData(2); @@ -531,28 +533,28 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const ind++; } - } + } #endregion - static update = function(frame = CURRENT_FRAME) { + static update = function(frame = CURRENT_FRAME) { #region strandUpdate(CURRENT_FRAME == 0); - } + } #endregion - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region var bbox = drawGetBbox(xx, yy, _s); draw_sprite_fit(s_node_strandSim_create, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); - } + } #endregion - static attributeSerialize = function() { + static attributeSerialize = function() { #region var att = {}; att.use_groom = attributes.use_groom; att.fixStrand = groomed.serialize(); return att; - } + } #endregion - static attributeDeserialize = function(attr) { + static attributeDeserialize = function(attr) { #region if(struct_has(attr, "fixStrand")) groomed.deserialize(attr.fixStrand); attributes.use_groom = struct_try_get(attr, "use_groom", false); - } + } #endregion } \ No newline at end of file diff --git a/scripts/node_strand_render/node_strand_render.gml b/scripts/node_strand_render/node_strand_render.gml index b57f8aeef..827a9ddda 100644 --- a/scripts/node_strand_render/node_strand_render.gml +++ b/scripts/node_strand_render/node_strand_render.gml @@ -23,9 +23,11 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 7] = nodeValue("Child", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Render extra strands between the real strands."); + inputs[| 8] = nodeValue("Update quality", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4); + outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); - input_display_list = [ 6, + input_display_list = [ 6, 8, ["Output", false], 0, ["Strand", false], 7, 1, 2, 3, ["Color", false], 4, 5, @@ -36,14 +38,14 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const static onInspector2Update = function() { clearCache(); } - static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region var _str = getInputData(1); if(_str == noone) return; if(!is_array(_str)) _str = [ _str ]; for( var i = 0, n = array_length(_str); i < n; i++ ) _str[i].draw(_x, _y, _s); - } + } #endregion static update = function(frame = CURRENT_FRAME) { if(!PROJECT.animator.is_playing && recoverCache()) return; @@ -56,6 +58,7 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const var _col = getInputData(5); var _sed = getInputData(6); var _chd = getInputData(7); + var _stp = getInputData(8); var _surf = outputs[| 0].getValue(); _surf = surface_verify(_surf, _dim[0], _dim[1]); @@ -75,6 +78,8 @@ function Node_Strand_Render(_x, _y, _group = noone) : Node(_x, _y, _group) const var _strand = _str[h]; var hairs = _strand.hairs; + if(_stp) _strand.step(_stp); + for( var i = 0, n = array_length(hairs); i < n; i++ ) { var hair = hairs[i]; var os, ns, ot, nt; diff --git a/scripts/node_strand_sim/node_strand_sim.gml b/scripts/node_strand_sim/node_strand_sim.gml index 8ce4396b8..e0315fc8e 100644 --- a/scripts/node_strand_sim/node_strand_sim.gml +++ b/scripts/node_strand_sim/node_strand_sim.gml @@ -1,28 +1,17 @@ -function Node_Strand_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) constructor { +function Node_Strand_Group(_x, _y, _group = noone) : Node_Collection_Inline(_x, _y, _group) constructor { name = "StrandSim"; color = COLORS.node_blend_strand; icon = THEME.strandSim; - ungroupable = false; update_on_frame = true; if(!LOADING && !APPENDING && !CLONING) { - var _create = nodeBuild("Node_Strand_Create", -384, -32, self); - var _update = nodeBuild("Node_Strand_Update", 0, -32, self); - var _render = nodeBuild("Node_Strand_Render", 128, -32, self); - var _output = nodeBuild("Node_Group_Output", 384, -32, self); + var _create = nodeBuild("Node_Strand_Create", x, y); + var _render = nodeBuild("Node_Strand_Render", x + 256, y); - _output.inputs[| 0].setFrom(_render.outputs[| 0]); - _render.inputs[| 1].setFrom(_update.outputs[| 0]); - _update.inputs[| 0].setFrom(_create.outputs[| 0]); - } - - static onStep = function() { - RETURN_ON_REST + _render.inputs[| 1].setFrom(_create.outputs[| 0]); - setRenderStatus(false); - RENDER_ALL + addNode(_create); + addNode(_render); } - - PATCH_STATIC } \ No newline at end of file diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 7a2563a2c..5910c0132 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -104,6 +104,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { value_focus = noone; value_dragging = noone; value_draggings = []; + + frame_hovering = noone; #endregion #region ---- minimap ---- @@ -729,7 +731,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var t = get_timer(); printIf(log, "============ Draw start ============"); - var frame_hovering = noone; + frame_hovering = noone; for(var i = 0; i < ds_list_size(nodes_list); i++) { nodes_list[| i].cullCheck(gr_x, gr_y, graph_s, -32, -32, w + 32, h + 64); @@ -870,7 +872,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { array_push(menu, menuItem(__txt("Copy"), function() { doCopy(); }, THEME.copy, ["Graph", "Copy"]).setActive(array_length(nodes_selecting))); array_push(menu, menuItem(__txt("Paste"), function() { doPaste(); }, THEME.paste, ["Graph", "Paste"]).setActive(clipboard_get_text() != "")); - callAddDialog(); + var ctx = is_instanceof(frame_hovering, Node_Collection_Inline)? frame_hovering : getCurrentContext(); + callAddDialog(ctx); + menuCall("graph_node_selected_menu", o_dialog_add_node.dialog_x - ui(8), o_dialog_add_node.dialog_y + ui(4), menu, fa_right ); setFocus(o_dialog_add_node.id, "Dialog"); } @@ -1187,7 +1191,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { value_dragging.node.triggerRender(); if(value_focus != value_dragging) { - with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8)) { + var ctx = is_instanceof(frame_hovering, Node_Collection_Inline)? frame_hovering : getCurrentContext(); + with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx })) { node_target_x = other.mouse_grid_x; node_target_y = other.mouse_grid_y; node_called = other.value_dragging; @@ -1261,10 +1266,11 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { #endregion } #endregion - function callAddDialog() { #region - with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8)) { - node_target_x = other.mouse_grid_x; - node_target_y = other.mouse_grid_y; + function callAddDialog(ctx = getCurrentContext()) { #region + + with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx })) { + node_target_x = other.mouse_grid_x; + node_target_y = other.mouse_grid_y; junction_hovering = other.junction_hovering; resetPosition(); diff --git a/scripts/project_data/project_data.gml b/scripts/project_data/project_data.gml index 69c803c98..fabae5da9 100644 --- a/scripts/project_data/project_data.gml +++ b/scripts/project_data/project_data.gml @@ -22,8 +22,9 @@ nodeNameMap = ds_map_create(); nodeTopo = ds_list_create(); - animator = new AnimationManager(); - globalNode = new Node_Global(); + animator = new AnimationManager(); + globalNode = new Node_Global(); + nodeController = new __Node_Controller(self); previewGrid = { #region show : false,