- Fix crash when grouping inline groups.

This commit is contained in:
Tanasart 2024-06-10 12:36:39 +07:00
parent afbd7eab5a
commit 80fb5622b5
6 changed files with 100 additions and 7 deletions

View file

@ -1665,6 +1665,7 @@
{"name":"s_node_bokeh","order":6,"path":"sprites/s_node_bokeh/s_node_bokeh.yy",},
{"name":"s_node_boolean","order":3,"path":"sprites/s_node_boolean/s_node_boolean.yy",},
{"name":"s_node_border","order":8,"path":"sprites/s_node_border/s_node_border.yy",},
{"name":"s_node_brush_linear","order":65,"path":"sprites/s_node_brush_linear/s_node_brush_linear.yy",},
{"name":"s_node_bubble_noise","order":45,"path":"sprites/s_node_bubble_noise/s_node_bubble_noise.yy",},
{"name":"s_node_BW","order":9,"path":"sprites/s_node_BW/s_node_BW.yy",},
{"name":"s_node_byte_file_read","order":28,"path":"sprites/s_node_byte_file_read/s_node_byte_file_read.yy",},

View file

@ -2226,6 +2226,7 @@
{"id":{"name":"s_node_bokeh","path":"sprites/s_node_bokeh/s_node_bokeh.yy",},},
{"id":{"name":"s_node_boolean","path":"sprites/s_node_boolean/s_node_boolean.yy",},},
{"id":{"name":"s_node_border","path":"sprites/s_node_border/s_node_border.yy",},},
{"id":{"name":"s_node_brush_linear","path":"sprites/s_node_brush_linear/s_node_brush_linear.yy",},},
{"id":{"name":"s_node_bubble_noise","path":"sprites/s_node_bubble_noise/s_node_bubble_noise.yy",},},
{"id":{"name":"s_node_BW","path":"sprites/s_node_BW/s_node_BW.yy",},},
{"id":{"name":"s_node_byte_file_read","path":"sprites/s_node_byte_file_read/s_node_byte_file_read.yy",},},

View file

@ -14,8 +14,9 @@ function groupNodes(nodeArray, _group = noone, record = true, check_connect = tr
if(ctx == noone) continue;
array_push_unique(_ctx_nodes, ctx);
for( var k = 0, n = array_length(ctx.members); k < n; k++ ) {
if(array_exists(nodeArray, ctx.members[k])) continue;
for( var k = 0, n = array_length(ctx.nodes); k < n; k++ ) {
if(array_exists(nodeArray, ctx.nodes[k])) continue;
noti_warning("Grouping incomplete inline group is not allowed.");
return;
}
@ -141,17 +142,17 @@ function upgroupNode(collection, record = true) { #region
_cy = collection.y - _cy / _nn;
}
for (var i = 0, n = array_length(_node_arr); i < n; i++) {
var remNode = _node_arr[i];
remNode.x += _cx;
remNode.y += _cy;
for (var i = array_length(_node_arr) - 1; i >= 0; i--) {
var remNode = _node_arr[i];
remNode.x += _cx;
remNode.y += _cy;
if(remNode.destroy_when_upgroup) {
var _vto = remNode.getJunctionTos();
array_push(_deleted, { node: remNode, value_to : _vto });
} else
array_push(_content, remNode);
collection.remove(remNode);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,90 @@
{
"$GMSprite":"",
"%Name":"s_node_brush_linear",
"bboxMode":0,
"bbox_bottom":63,
"bbox_left":0,
"bbox_right":63,
"bbox_top":0,
"collisionKind":1,
"collisionTolerance":0,
"DynamicTexturePage":false,
"edgeFiltering":false,
"For3D":false,
"frames":[
{"$GMSpriteFrame":"","%Name":"c91ab3e6-6406-4557-9111-86d774ef5f57","name":"c91ab3e6-6406-4557-9111-86d774ef5f57","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
],
"gridX":0,
"gridY":0,
"height":64,
"HTile":false,
"layers":[
{"$GMImageLayer":"","%Name":"25e08881-893e-43d9-b01d-8ee77ed70050","blendMode":0,"displayName":"default","isLocked":false,"name":"25e08881-893e-43d9-b01d-8ee77ed70050","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
],
"name":"s_node_brush_linear",
"nineSlice":null,
"origin":4,
"parent":{
"name":"filter",
"path":"folders/nodes/icons/filter.yy",
},
"preMultiplyAlpha":false,
"resourceType":"GMSprite",
"resourceVersion":"2.0",
"sequence":{
"$GMSequence":"",
"%Name":"s_node_brush_linear",
"autoRecord":true,
"backdropHeight":768,
"backdropImageOpacity":0.5,
"backdropImagePath":"",
"backdropWidth":1366,
"backdropXOffset":0.0,
"backdropYOffset":0.0,
"events":{
"$KeyframeStore<MessageEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MessageEventKeyframe>",
"resourceVersion":"2.0",
},
"eventStubScript":null,
"eventToFunction":{},
"length":1.0,
"lockOrigin":false,
"moments":{
"$KeyframeStore<MomentsEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
"resourceVersion":"2.0",
},
"name":"s_node_brush_linear",
"playback":1,
"playbackSpeed":30.0,
"playbackSpeedType":0,
"resourceType":"GMSequence",
"resourceVersion":"2.0",
"showBackdrop":true,
"showBackdropImage":false,
"timeUnits":1,
"tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"c91ab3e6-6406-4557-9111-86d774ef5f57","path":"sprites/s_node_brush_linear/s_node_brush_linear.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"bb6e049f-3492-449e-9aca-e4aea6807523","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange":null,
"volume":1.0,
"xorigin":32,
"yorigin":32,
},
"swatchColours":null,
"swfPrecision":0.5,
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"type":0,
"VTile":false,
"width":64,
}