Fixing array pass by refererence

This commit is contained in:
Tanasart 2023-09-14 16:29:39 +02:00
parent c0ba9c1057
commit 818473dc45
147 changed files with 605 additions and 530 deletions

View file

@ -98,7 +98,7 @@
{"name":"effects","order":3,"path":"folders/nodes/data/filter/effects.yy",}, {"name":"effects","order":3,"path":"folders/nodes/data/filter/effects.yy",},
{"name":"fixes","order":6,"path":"folders/nodes/data/filter/fixes.yy",}, {"name":"fixes","order":6,"path":"folders/nodes/data/filter/fixes.yy",},
{"name":"warps","order":2,"path":"folders/nodes/data/filter/warps.yy",}, {"name":"warps","order":2,"path":"folders/nodes/data/filter/warps.yy",},
{"name":"fluidSim","order":17,"path":"folders/nodes/data/fluidSim.yy",}, {"name":"fluidSim","order":2,"path":"folders/nodes/data/simulation/fluidSim.yy",},
{"name":"generator","order":5,"path":"folders/nodes/data/generator.yy",}, {"name":"generator","order":5,"path":"folders/nodes/data/generator.yy",},
{"name":"noise","order":14,"path":"folders/nodes/data/generator/noise.yy",}, {"name":"noise","order":14,"path":"folders/nodes/data/generator/noise.yy",},
{"name":"pattern","order":15,"path":"folders/nodes/data/generator/pattern.yy",}, {"name":"pattern","order":15,"path":"folders/nodes/data/generator/pattern.yy",},
@ -122,8 +122,7 @@
{"name":"draw","order":3,"path":"folders/nodes/data/pixel builder/draw.yy",}, {"name":"draw","order":3,"path":"folders/nodes/data/pixel builder/draw.yy",},
{"name":"effect","order":4,"path":"folders/nodes/data/pixel builder/effect.yy",}, {"name":"effect","order":4,"path":"folders/nodes/data/pixel builder/effect.yy",},
{"name":"render","order":3,"path":"folders/nodes/data/render.yy",}, {"name":"render","order":3,"path":"folders/nodes/data/render.yy",},
{"name":"rigidSim","order":15,"path":"folders/nodes/data/rigidSim.yy",}, {"name":"strandSim","order":1,"path":"folders/nodes/data/simulation/strandSim.yy",},
{"name":"strandSim","order":18,"path":"folders/nodes/data/strandSim.yy",},
{"name":"transform","order":9,"path":"folders/nodes/data/transform.yy",}, {"name":"transform","order":9,"path":"folders/nodes/data/transform.yy",},
{"name":"value","order":4,"path":"folders/nodes/data/value.yy",}, {"name":"value","order":4,"path":"folders/nodes/data/value.yy",},
{"name":"atlas","order":9,"path":"folders/nodes/data/value/atlas.yy",}, {"name":"atlas","order":9,"path":"folders/nodes/data/value/atlas.yy",},
@ -132,7 +131,7 @@
{"name":"struct","order":6,"path":"folders/nodes/data/value/struct.yy",}, {"name":"struct","order":6,"path":"folders/nodes/data/value/struct.yy",},
{"name":"surface","order":10,"path":"folders/nodes/data/value/surface.yy",}, {"name":"surface","order":10,"path":"folders/nodes/data/value/surface.yy",},
{"name":"trigger","order":8,"path":"folders/nodes/data/value/trigger.yy",}, {"name":"trigger","order":8,"path":"folders/nodes/data/value/trigger.yy",},
{"name":"VFX","order":12,"path":"folders/nodes/data/VFX.yy",}, {"name":"VFX","order":3,"path":"folders/nodes/data/simulation/VFX.yy",},
{"name":"3D","order":133,"path":"folders/nodes/icons/3D.yy",}, {"name":"3D","order":133,"path":"folders/nodes/icons/3D.yy",},
{"name":"animation","order":135,"path":"folders/nodes/icons/animation.yy",}, {"name":"animation","order":135,"path":"folders/nodes/icons/animation.yy",},
{"name":"filter","order":141,"path":"folders/nodes/icons/filter.yy",}, {"name":"filter","order":141,"path":"folders/nodes/icons/filter.yy",},
@ -167,6 +166,7 @@
{"name":"preview","order":3,"path":"folders/panels/preview.yy",}, {"name":"preview","order":3,"path":"folders/panels/preview.yy",},
{"name":"overlay","order":2,"path":"folders/panels/preview/overlay.yy",}, {"name":"overlay","order":2,"path":"folders/panels/preview/overlay.yy",},
{"name":"sprites","order":3,"path":"folders/panels/preview/sprites.yy",}, {"name":"sprites","order":3,"path":"folders/panels/preview/sprites.yy",},
{"name":"what?","order":10,"path":"folders/panels/what?.yy",},
{"name":"shader","order":8,"path":"folders/shader.yy",}, {"name":"shader","order":8,"path":"folders/shader.yy",},
{"name":"_helper","order":49,"path":"folders/shader/_helper.yy",}, {"name":"_helper","order":49,"path":"folders/shader/_helper.yy",},
{"name":"3d","order":29,"path":"folders/shader/3d.yy",}, {"name":"3d","order":29,"path":"folders/shader/3d.yy",},
@ -200,14 +200,14 @@
{"name":"transition","order":52,"path":"folders/shader/transition.yy",}, {"name":"transition","order":52,"path":"folders/shader/transition.yy",},
{"name":"warp","order":41,"path":"folders/shader/warp.yy",}, {"name":"warp","order":41,"path":"folders/shader/warp.yy",},
{"name":"sprites","order":11,"path":"folders/sprites.yy",}, {"name":"sprites","order":11,"path":"folders/sprites.yy",},
{"name":"bs","order":4,"path":"folders/sprites/bs.yy",},
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",}, {"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
{"name":"misc","order":3,"path":"folders/sprites/misc.yy",}, {"name":"misc","order":3,"path":"folders/sprites/misc.yy",},
{"name":"VCT","order":12,"path":"folders/VCT.yy",}, {"name":"VCT","order":12,"path":"folders/VCT.yy",},
{"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",}, {"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",},
{"name":"widget","order":3,"path":"folders/VCT/widget.yy",}, {"name":"widget","order":3,"path":"folders/VCT/widget.yy",},
{"name":"widgets","order":5,"path":"folders/widgets.yy",}, {"name":"widgets","order":5,"path":"folders/widgets.yy",},
{"name":"what?","order":10,"path":"folders/panels/what?.yy",}, {"name":"simulation","order":23,"path":"folders/nodes/data/simulation.yy",},
{"name":"bs","order":4,"path":"folders/sprites/bs.yy",},
], ],
"ResourceOrderSettings": [ "ResourceOrderSettings": [
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",}, {"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},

View file

@ -122,7 +122,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"effects","folderPath":"folders/nodes/data/filter/effects.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effects","folderPath":"folders/nodes/data/filter/effects.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"fixes","folderPath":"folders/nodes/data/filter/fixes.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fixes","folderPath":"folders/nodes/data/filter/fixes.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"warps","folderPath":"folders/nodes/data/filter/warps.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warps","folderPath":"folders/nodes/data/filter/warps.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluidSim","folderPath":"folders/nodes/data/fluidSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluidSim","folderPath":"folders/nodes/data/simulation/fluidSim.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/nodes/data/generator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/nodes/data/generator.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"noise","folderPath":"folders/nodes/data/generator/noise.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"noise","folderPath":"folders/nodes/data/generator/noise.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"pattern","folderPath":"folders/nodes/data/generator/pattern.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"pattern","folderPath":"folders/nodes/data/generator/pattern.yy",},
@ -148,8 +148,8 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"draw","folderPath":"folders/nodes/data/pixel builder/draw.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"draw","folderPath":"folders/nodes/data/pixel builder/draw.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"effect","folderPath":"folders/nodes/data/pixel builder/effect.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effect","folderPath":"folders/nodes/data/pixel builder/effect.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"render","folderPath":"folders/nodes/data/render.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"render","folderPath":"folders/nodes/data/render.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"rigidSim","folderPath":"folders/nodes/data/rigidSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rigidSim","folderPath":"folders/nodes/data/simulation/rigidSim.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"strandSim","folderPath":"folders/nodes/data/strandSim.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"strandSim","folderPath":"folders/nodes/data/simulation/strandSim.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"transform","folderPath":"folders/nodes/data/transform.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"transform","folderPath":"folders/nodes/data/transform.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"value","folderPath":"folders/nodes/data/value.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"value","folderPath":"folders/nodes/data/value.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"array","folderPath":"folders/nodes/data/value/array.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"array","folderPath":"folders/nodes/data/value/array.yy",},
@ -164,7 +164,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface","folderPath":"folders/nodes/data/value/surface.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface","folderPath":"folders/nodes/data/value/surface.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"texts","folderPath":"folders/nodes/data/value/texts.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"texts","folderPath":"folders/nodes/data/value/texts.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"trigger","folderPath":"folders/nodes/data/value/trigger.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"trigger","folderPath":"folders/nodes/data/value/trigger.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"VFX","folderPath":"folders/nodes/data/VFX.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"VFX","folderPath":"folders/nodes/data/simulation/VFX.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"icons","folderPath":"folders/nodes/icons.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"icons","folderPath":"folders/nodes/icons.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"3D","folderPath":"folders/nodes/icons/3D.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"3D","folderPath":"folders/nodes/icons/3D.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/nodes/icons/animation.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"animation","folderPath":"folders/nodes/icons/animation.yy",},
@ -201,6 +201,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"preview","folderPath":"folders/panels/preview.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"preview","folderPath":"folders/panels/preview.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"overlay","folderPath":"folders/panels/preview/overlay.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"overlay","folderPath":"folders/panels/preview/overlay.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/panels/preview/sprites.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/panels/preview/sprites.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"what?","folderPath":"folders/panels/what?.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"shader","folderPath":"folders/shader.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shader","folderPath":"folders/shader.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"_helper","folderPath":"folders/shader/_helper.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"_helper","folderPath":"folders/shader/_helper.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/shader/3d.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"3d","folderPath":"folders/shader/3d.yy",},
@ -234,6 +235,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"transition","folderPath":"folders/shader/transition.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"transition","folderPath":"folders/shader/transition.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"warp","folderPath":"folders/shader/warp.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warp","folderPath":"folders/shader/warp.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/sprites.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/sprites.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"bs","folderPath":"folders/sprites/bs.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"gameframe","folderPath":"folders/sprites/gameframe.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"gameframe","folderPath":"folders/sprites/gameframe.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/sprites/misc.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/sprites/misc.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"texture","folderPath":"folders/sprites/texture.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"texture","folderPath":"folders/sprites/texture.yy",},
@ -243,8 +245,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"biterator","folderPath":"folders/VCT/biterator.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widget","folderPath":"folders/VCT/widget.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"what?","folderPath":"folders/panels/what?.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"simulation","folderPath":"folders/nodes/data/simulation.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"bs","folderPath":"folders/sprites/bs.yy",},
], ],
"IncludedFiles": [ "IncludedFiles": [
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},
@ -523,10 +524,10 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_rotator_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_rotator_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_rotator_knob.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_rotator_knob.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_slider.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_slider.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node/widget",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"credit_badge_popular.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"credit_badge_popular.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"credit_badge_value.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"credit_badge_value.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"fade_up.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"fade_up.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"node_credit_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"node_credit_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_key_display_mouse_strip6.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_key_display_mouse_strip6.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/others",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_arrow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_arrow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",},
@ -896,7 +897,7 @@
{"id":{"name":"fd_rectangle_get_collision_mask_sprite","path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},}, {"id":{"name":"fd_rectangle_get_collision_mask_sprite","path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},},
{"id":{"name":"node_flip","path":"scripts/node_flip/node_flip.yy",},}, {"id":{"name":"node_flip","path":"scripts/node_flip/node_flip.yy",},},
{"id":{"name":"s_node_pb_fx_subtract","path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",},}, {"id":{"name":"s_node_pb_fx_subtract","path":"sprites/s_node_pb_fx_subtract/s_node_pb_fx_subtract.yy",},},
{"id":{"name":"panel_node_cost","path":"scripts/panel_node_cost/panel_node_cost.yy",},}, {"id":{"name":"panel_node_credit","path":"scripts/panel_node_credit/panel_node_credit.yy",},},
{"id":{"name":"sh_FXAA","path":"shaders/sh_FXAA/sh_FXAA.yy",},}, {"id":{"name":"sh_FXAA","path":"shaders/sh_FXAA/sh_FXAA.yy",},},
{"id":{"name":"s_biterator_slider","path":"sprites/s_biterator_slider/s_biterator_slider.yy",},}, {"id":{"name":"s_biterator_slider","path":"sprites/s_biterator_slider/s_biterator_slider.yy",},},
{"id":{"name":"shader_functions","path":"scripts/shader_functions/shader_functions.yy",},}, {"id":{"name":"shader_functions","path":"scripts/shader_functions/shader_functions.yy",},},
@ -1912,6 +1913,7 @@
{"id":{"name":"node_scale_algo","path":"scripts/node_scale_algo/node_scale_algo.yy",},}, {"id":{"name":"node_scale_algo","path":"scripts/node_scale_algo/node_scale_algo.yy",},},
{"id":{"name":"s_node_image_replace","path":"sprites/s_node_image_replace/s_node_image_replace.yy",},}, {"id":{"name":"s_node_image_replace","path":"sprites/s_node_image_replace/s_node_image_replace.yy",},},
{"id":{"name":"node_alpha_hash","path":"scripts/node_alpha_hash/node_alpha_hash.yy",},}, {"id":{"name":"node_alpha_hash","path":"scripts/node_alpha_hash/node_alpha_hash.yy",},},
{"id":{"name":"node_PCX_condition","path":"scripts/node_PCX_condition/node_PCX_condition.yy",},},
{"id":{"name":"toggleGroup","path":"scripts/toggleGroup/toggleGroup.yy",},}, {"id":{"name":"toggleGroup","path":"scripts/toggleGroup/toggleGroup.yy",},},
{"id":{"name":"mouse_input","path":"scripts/mouse_input/mouse_input.yy",},}, {"id":{"name":"mouse_input","path":"scripts/mouse_input/mouse_input.yy",},},
{"id":{"name":"string_cut","path":"scripts/string_cut/string_cut.yy",},}, {"id":{"name":"string_cut","path":"scripts/string_cut/string_cut.yy",},},

View file

@ -10,7 +10,7 @@
"overriddenProperties": [], "overriddenProperties": [],
"parent": { "parent": {
"name": "rigidSim", "name": "rigidSim",
"path": "folders/nodes/data/rigidSim.yy", "path": "folders/nodes/data/simulation/rigidSim.yy",
}, },
"parentObjectId": null, "parentObjectId": null,
"persistent": true, "persistent": true,

View file

@ -596,6 +596,8 @@ event_inherited();
return hh; return hh;
}); #endregion }); #endregion
content_pane.always_scroll = true;
#endregion #endregion
#region resize #region resize

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -46,20 +46,20 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
direction = parent.angle; direction = parent.angle;
} }
static addChild = function(bone) { static addChild = function(bone) { #region
array_push(childs, bone); array_push(childs, bone);
bone.parent = self; bone.parent = self;
return self; return self;
} } #endregion
static childCount = function() { static childCount = function() { #region
var amo = array_length(childs); var amo = array_length(childs);
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
amo += childs[i].childCount(); amo += childs[i].childCount();
return amo; return amo;
} } #endregion
static freeze = function() { static freeze = function() { #region
freeze_data = { freeze_data = {
angle: angle, angle: angle,
length: length, length: length,
@ -69,9 +69,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].freeze(); childs[i].freeze();
} } #endregion
static findBone = function(_id) { static findBone = function(_id) { #region
if(ID == _id) if(ID == _id)
return self; return self;
@ -82,9 +82,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
} }
return noone; return noone;
} } #endregion
static findBoneByName = function(_name) { static findBoneByName = function(_name) { #region
//print($"Print {string_length(string_trim(name))} : {string_length(string_trim(_name))}"); //print($"Print {string_length(string_trim(name))} : {string_length(string_trim(_name))}");
if(string_trim(name) == string_trim(_name)) if(string_trim(name) == string_trim(_name))
return self; return self;
@ -96,9 +96,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
} }
return noone; return noone;
} } #endregion
static getPoint = function(progress, pose = true) { static getPoint = function(progress, pose = true) { #region
var _len = pose? length : init_length; var _len = pose? length : init_length;
var _ang = pose? angle : init_angle; var _ang = pose? angle : init_angle;
@ -118,18 +118,18 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
.add(lengthdir_x(distance, direction), lengthdir_y(distance, direction)) .add(lengthdir_x(distance, direction), lengthdir_y(distance, direction))
.add(lengthdir_x(len, _ang), lengthdir_y(len, _ang)) .add(lengthdir_x(len, _ang), lengthdir_y(len, _ang))
return p; return p;
} } #endregion
static draw = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { static draw = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { #region
var hover = _drawBone(attributes, edit, _x, _y, _s, _mx, _my, hovering, selecting); var hover = _drawBone(attributes, edit, _x, _y, _s, _mx, _my, hovering, selecting);
drawControl(attributes); drawControl(attributes);
return hover; return hover;
} } #endregion
control_x0 = 0; control_y0 = 0; control_i0 = 0; control_x0 = 0; control_y0 = 0; control_i0 = 0;
control_x1 = 0; control_y1 = 0; control_i1 = 0; control_x1 = 0; control_y1 = 0; control_i1 = 0;
static _drawBone = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { static _drawBone = function(attributes, edit = false, _x = 0, _y = 0, _s = 1, _mx = 0, _my = 0, hovering = noone, selecting = noone) { #region
var hover = noone; var hover = noone;
var p0 = getPoint(0); var p0 = getPoint(0);
@ -226,9 +226,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
} }
return hover; return hover;
} } #endregion
static drawControl = function(attributes) { static drawControl = function(attributes) { #region
if(parent != noone && IKlength == 0) { if(parent != noone && IKlength == 0) {
var spr, ind0, ind1; var spr, ind0, ind1;
if(attributes.display_bone == 0) { if(attributes.display_bone == 0) {
@ -244,23 +244,23 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].drawControl(attributes); childs[i].drawControl(attributes);
} } #endregion
static resetPose = function() { static resetPose = function() { #region
pose_angle = 0; pose_angle = 0;
pose_scale = 1; pose_scale = 1;
pose_posit = [ 0, 0 ]; pose_posit = [ 0, 0 ];
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].resetPose(); childs[i].resetPose();
} } #endregion
static setPose = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { static setPose = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { #region
setPoseTransform(_position, _angle, _scale); setPoseTransform(_position, _angle, _scale);
setIKconstrain(); setIKconstrain();
} } #endregion
static setPoseTransform = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { static setPoseTransform = function(_position = [ 0, 0 ], _angle = 0, _scale = 1) { #region
if(is_main) { if(is_main) {
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].setPoseTransform(_position, _angle, _scale); childs[i].setPoseTransform(_position, _angle, _scale);
@ -289,9 +289,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].setPoseTransform(_position, pose_angle, pose_scale); childs[i].setPoseTransform(_position, pose_angle, pose_scale);
} } #endregion
static setIKconstrain = function() { static setIKconstrain = function() { #region
if(IKlength > 0 && IKTarget != noone) { if(IKlength > 0 && IKTarget != noone) {
var points = array_create(IKlength + 1); var points = array_create(IKlength + 1);
var lengths = array_create(IKlength); var lengths = array_create(IKlength);
@ -330,10 +330,10 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].setIKconstrain(); childs[i].setIKconstrain();
} } #endregion
FABRIK_result = []; FABRIK_result = [];
static FABRIK = function(bones, points, lengths, dx, dy) { static FABRIK = function(bones, points, lengths, dx, dy) { #region
var threshold = 0.01; var threshold = 0.01;
var _bo = array_create(array_length(points)); var _bo = array_create(array_length(points));
for( var i = 0, n = array_length(points); i < n; i++ ) for( var i = 0, n = array_length(points); i < n; i++ )
@ -369,9 +369,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
} }
FABRIK_result[i] = p1; FABRIK_result[i] = p1;
} } #endregion
static FABRIK_backward = function(points, lengths, dx, dy) { static FABRIK_backward = function(points, lengths, dx, dy) { #region
var tx = dx; var tx = dx;
var ty = dy; var ty = dy;
@ -390,9 +390,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
tx = p0.x; tx = p0.x;
ty = p0.y; ty = p0.y;
} }
} } #endregion
static FABRIK_forward = function(points, lengths, sx, sy) { static FABRIK_forward = function(points, lengths, sx, sy) { #region
var tx = sx; var tx = sx;
var ty = sy; var ty = sy;
@ -411,9 +411,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
tx = p1.x; tx = p1.x;
ty = p1.y; ty = p1.y;
} }
} } #endregion
static __getBBOX = function() { static __getBBOX = function() { #region
var p0 = getPoint(0); var p0 = getPoint(0);
var p1 = getPoint(1); var p1 = getPoint(1);
@ -423,9 +423,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
var y1 = max(p0.y, p1.y); var y1 = max(p0.y, p1.y);
return [ x0, y0, x1, y1 ]; return [ x0, y0, x1, y1 ];
} } #endregion
static bbox = function() { static bbox = function() { #region
var _bbox = __getBBOX(); var _bbox = __getBBOX();
//print($"BBOX: {_bbox}") //print($"BBOX: {_bbox}")
@ -440,9 +440,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
} }
return _bbox; return _bbox;
} } #endregion
static serialize = function() { static serialize = function() { #region
var bone = {}; var bone = {};
bone.ID = ID; bone.ID = ID;
@ -466,9 +466,9 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
bone.childs[i] = childs[i].serialize(); bone.childs[i] = childs[i].serialize();
return bone; return bone;
} } #endregion
static deserialize = function(bone, node) { static deserialize = function(bone, node) { #region
ID = bone.ID; ID = bone.ID;
name = bone.name; name = bone.name;
distance = bone.distance; distance = bone.distance;
@ -494,18 +494,18 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
} }
return self; return self;
} } #endregion
static connect = function() { static connect = function() { #region
IKTarget = noone; IKTarget = noone;
if(parent != noone && IKTargetID != "") if(parent != noone && IKTargetID != "")
IKTarget = parent.findBone(IKTargetID); IKTarget = parent.findBone(IKTargetID);
for( var i = 0, n = array_length(childs); i < n; i++ ) for( var i = 0, n = array_length(childs); i < n; i++ )
childs[i].connect(); childs[i].connect();
} } #endregion
static clone = function() { static clone = function() { #region
var _b = new __Bone(parent, distance, direction, angle, length); var _b = new __Bone(parent, distance, direction, angle, length);
_b.ID = ID; _b.ID = ID;
_b.name = name; _b.name = name;
@ -522,9 +522,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
_b.addChild(childs[i].clone()); _b.addChild(childs[i].clone());
return _b; return _b;
} } #endregion
static toString = function() { static toString = function() { return $"Bone {name} [{ID}]"; }
return $"Bone {name} [{ID}]";
}
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "strandSim", "name": "strandSim",
"path": "folders/nodes/data/strandSim.yy", "path": "folders/nodes/data/simulation/strandSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -4,7 +4,7 @@ function Node_Fluid(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
static updateForward = function(frame = PROJECT.animator.current_frame, _update = true) { static updateForward = function(frame = PROJECT.animator.current_frame, _update = true) {
if(_update) update(frame); if(_update) update(frame);
print("Update " + string(frame) + ": " + name); //print($"Update {frame}: {name}");
var outJunc = outputs[| 0]; var outJunc = outputs[| 0];
for( var i = 0; i < ds_list_size(outJunc.value_to); i++ ) { for( var i = 0; i < ds_list_size(outJunc.value_to); i++ ) {

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "strandSim", "name": "strandSim",
"path": "folders/nodes/data/strandSim.yy", "path": "folders/nodes/data/simulation/strandSim.yy",
}, },
} }

View file

@ -1,6 +1,14 @@
function DynaSurf() constructor { function DynaSurf() constructor {
surfaces = []; surfaces = [];
static getAbsolutePos = function(_x, _y, _xs = 1, _ys = 1, _rot = 0) {
var _w = getWidth() * _xs;
var _h = getHeight() * _ys;
var _px = point_rotate(0, 0, _w / 2, _h / 2, _rot);
return [ _x - _px[0], _y - _px[1] ];
}
static getWidth = function() { return is_surface(surfaces[0])? surface_get_width(surfaces[0]) : 1; } static getWidth = function() { return is_surface(surfaces[0])? surface_get_width(surfaces[0]) : 1; }
static getHeight = function() { return is_surface(surfaces[0])? surface_get_height(surfaces[0]) : 1; } static getHeight = function() { return is_surface(surfaces[0])? surface_get_height(surfaces[0]) : 1; }
@ -31,15 +39,18 @@ function Compute_DynaSurf() : DynaSurf() constructor {
widthFn = noone; widthFn = noone;
heightFn = noone; heightFn = noone;
useAbsolutePose = false;
static getWidth = function() { return widthFn? widthFn.eval() : 1; } static getWidth = function() { return widthFn? widthFn.eval() : 1; }
static getHeight = function() { return heightFn? heightFn.eval() : 1; } static getHeight = function() { return heightFn? heightFn.eval() : 1; }
static draw = function(_x = 0, _y = 0, _sx = 1, _sy = 1, _ang = 0, _col = c_white, _alp = 1) { static draw = function(_x = 0, _y = 0, _sx = 1, _sy = 1, _ang = 0, _col = c_white, _alp = 1) {
if(drawFn == noone) return; if(drawFn == noone) return;
var pos = useAbsolutePose? getAbsolutePos(_x, _y, _xs, _ys, _rot) : [ _x, _y ];
var params = { var params = {
x: _x, x: pos[0],
y: _y, y: pos[1],
sx: _sx, sx: _sx,
sy: _sy, sy: _sy,
angle: _ang, angle: _ang,

View file

@ -4,12 +4,8 @@ function DynaSurf_iso() : DynaSurf() constructor {
static getSurface = function(_rot) {} static getSurface = function(_rot) {}
static draw = function(_x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alp = 1) { static draw = function(_x = 0, _y = 0, _xs = 1, _ys = 1, _rot = 0, _col = c_white, _alp = 1) {
var _surf = getSurface(_rot); var _pos = getAbsolutePos(_x, _y, _xs, _ys, _rot);
var _w = getWidth() * _xs; draw_surface_ext_safe(_surf, _pos[0], _pos[1], _xs, _ys, 0, _col, _alp);
var _h = getHeight() * _ys;
var _px = point_rotate(0, 0, _w / 2, _h / 2, _rot);
draw_surface_ext_safe(_surf, _x - _px[0], _y - _px[1], _xs, _ys, 0, _col, _alp);
} }
static drawTile = function(_x = 0, _y = 0, _xs = 1, _ys = 1, _col = c_white, _alp = 1) { static drawTile = function(_x = 0, _y = 0, _xs = 1, _ys = 1, _col = c_white, _alp = 1) {

View file

@ -30,7 +30,7 @@ function Node_3D_Mesh_Cylinder(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _g
var _smt = _data[in_mesh + 4]; var _smt = _data[in_mesh + 4];
var object = getObject(_array_index); var object = getObject(_array_index);
object.checkParameter({sides: _side, smooth: _smt}); object.checkParameter({ sides: _side, smooth: _smt });
object.materials = [ _mat_top, _mat_bot, _mat_sid ]; object.materials = [ _mat_top, _mat_bot, _mat_sid ];
setTransform(object, _data); setTransform(object, _data);

View file

@ -26,7 +26,7 @@ function Node_3D_Mesh_Extrude(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _gr
var _surf = _mat == noone? noone : _mat.surface; var _surf = _mat == noone? noone : _mat.surface;
var object = getObject(_array_index); var object = getObject(_array_index);
object.checkParameter({surface: _surf, height: _hght, smooth: _smt}, _updt); object.checkParameter({ surface: _surf, height: _hght, smooth: _smt }, _updt);
object.materials = [ _mat ]; object.materials = [ _mat ];
setTransform(object, _data); setTransform(object, _data);

View file

@ -22,7 +22,7 @@ function Node_3D_Mesh_Sphere_Ico(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y,
var _smt = _data[in_mesh + 2]; var _smt = _data[in_mesh + 2];
var object = getObject(_array_index); var object = getObject(_array_index);
object.checkParameter({level: _sub, smooth: _smt}); object.checkParameter({ level: _sub, smooth: _smt });
object.materials = [ _mat ]; object.materials = [ _mat ];
setTransform(object, _data); setTransform(object, _data);

View file

@ -1,4 +1,4 @@
function Node_create_3D_Obj(_x, _y, _group = noone) { function Node_create_3D_Obj(_x, _y, _group = noone) { #region
var path = ""; var path = "";
if(!LOADING && !APPENDING && !CLONING) { if(!LOADING && !APPENDING && !CLONING) {
path = get_open_filename(".obj", ""); path = get_open_filename(".obj", "");
@ -9,15 +9,15 @@ function Node_create_3D_Obj(_x, _y, _group = noone) {
var node = new Node_3D_Mesh_Obj(_x, _y, _group); var node = new Node_3D_Mesh_Obj(_x, _y, _group);
node.setPath(path); node.setPath(path);
return node; return node;
} } #endregion
function Node_create_3D_Obj_path(_x, _y, path) { function Node_create_3D_Obj_path(_x, _y, path) { #region
if(!file_exists(path)) return noone; if(!file_exists(path)) return noone;
var node = new Node_3D_Mesh_Obj(_x, _y, PANEL_GRAPH.getCurrentContext()); var node = new Node_3D_Mesh_Obj(_x, _y, PANEL_GRAPH.getCurrentContext());
node.setPath(path); node.setPath(path);
return node; return node;
} } #endregion
function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) constructor { function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) constructor {
name = "3D Obj"; name = "3D Obj";
@ -121,8 +121,8 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group)
if(array_length(materialNames)) if(array_length(materialNames))
materials = readMtl(_pathMtl); materials = readMtl(_pathMtl);
else { else {
materialNames = ["Material"]; materialNames = [ "Material" ];
materialIndex = [0]; materialIndex = [ 0 ];
materials = [ new MTLmaterial("Material") ]; materials = [ new MTLmaterial("Material") ];
} }

View file

@ -20,7 +20,7 @@ function Node_3D_Mesh_Plane(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _grou
var _axs = _data[in_mesh + 1]; var _axs = _data[in_mesh + 1];
var object = getObject(_array_index); var object = getObject(_array_index);
object.checkParameter({normal: _axs}); object.checkParameter({ normal: _axs });
object.materials = [ _mat ]; object.materials = [ _mat ];
setTransform(object, _data); setTransform(object, _data);

View file

@ -25,7 +25,7 @@ function Node_3D_Mesh_Sphere_UV(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _
var _smt = _data[in_mesh + 3]; var _smt = _data[in_mesh + 3];
var object = getObject(_array_index); var object = getObject(_array_index);
object.checkParameter({hori: _sideH, vert: _sideV, smooth: _smt}); object.checkParameter({ hori: _sideH, vert: _sideV, smooth: _smt });
object.materials = [ _mat ]; object.materials = [ _mat ];
setTransform(object, _data); setTransform(object, _data);

View file

@ -15,7 +15,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_shader(_outSurf, sh_FXAA); surface_set_shader(_outSurf, sh_FXAA);
gpu_set_tex_filter(true); gpu_set_tex_filter(true);
shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]));
@ -24,5 +24,5 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -0,0 +1,24 @@
function Node_PCX_Condition(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor {
name = "Condition";
inputs[| 0] = nodeValue("Condition", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone);
inputs[| 1] = nodeValue("True", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone);
inputs[| 2] = nodeValue("False", self, JUNCTION_CONNECT.input, VALUE_TYPE.PCXnode, noone);
outputs[| 0] = nodeValue("PCX", self, JUNCTION_CONNECT.output, VALUE_TYPE.PCXnode, noone);
static update = function() {
var _cond = inputs[| 0].getValue();
var _true = inputs[| 1].getValue();
var _fals = inputs[| 2].getValue();
var _fn = new __funcIf();
_fn.condition = _cond;
_fn.if_true = _true;
_fn.if_false = _fals;
outputs[| 0].setValue(_fn);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_PCX_condition",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "flow control",
"path": "folders/nodes/data/PCX/flow control.yy",
},
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_outline",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

View file

@ -23,7 +23,7 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
@ -39,5 +39,5 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
_outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]); _outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -20,7 +20,7 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
@ -35,5 +35,5 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -14,16 +14,11 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_target(_outSurf); surface_set_shader(_outSurf, sh_alpha_grey);
DRAW_CLEAR
BLEND_OVERRIDE;
shader_set(sh_alpha_grey);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0], 0, 0);
shader_reset(); surface_reset_shader();
BLEND_NORMAL;
surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -7,7 +7,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
//inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); //inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region
var _b = attributes.bones; var _b = attributes.bones;
if(_b == noone) return 0; if(_b == noone) return 0;
var amo = _b.childCount(); var amo = _b.childCount();
@ -124,13 +124,13 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
} }
return bh; return bh;
}) }); #endregion
input_display_list = [ input_display_list = [
bone_renderer, bone_renderer,
]; ];
static createBone = function(parent, distance, direction) { static createBone = function(parent, distance, direction) { #region
recordAction(ACTION_TYPE.struct_modify, attributes.bones, attributes.bones.serialize()); recordAction(ACTION_TYPE.struct_modify, attributes.bones, attributes.bones.serialize());
var bone = new __Bone(parent, distance, direction,,, self); var bone = new __Bone(parent, distance, direction,,, self);
@ -139,10 +139,11 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
if(parent == attributes.bones) if(parent == attributes.bones)
bone.parent_anchor = false; bone.parent_anchor = false;
return bone; return bone;
} } #endregion
outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone); outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone);
#region ++++ attributes ++++
attributes.bones = new __Bone(,,,,, self); attributes.bones = new __Bone(,,,,, self);
attributes.bones.name = "Main"; attributes.bones.name = "Main";
attributes.bones.is_main = true; attributes.bones.is_main = true;
@ -160,6 +161,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
new scrollBox(["Octahedral", "Stick"], function(ind) { new scrollBox(["Octahedral", "Stick"], function(ind) {
attributes.display_bone = ind; attributes.display_bone = ind;
})]); })]);
#endregion
tools = [ tools = [
new NodeTool( [ "Move", "Scale" ], [ THEME.bone_tool_move, THEME.bone_tool_scale ] ), new NodeTool( [ "Move", "Scale" ], [ THEME.bone_tool_move, THEME.bone_tool_scale ] ),
@ -186,7 +188,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
moving = false; moving = false;
scaling = false; scaling = false;
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var mx = (_mx - _x) / _s; var mx = (_mx - _x) / _s;
var my = (_my - _y) / _s; var my = (_my - _y) / _s;
@ -195,7 +197,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
var _b = attributes.bones; var _b = attributes.bones;
if(builder_bone != noone) { if(builder_bone != noone) { #region
anchor_selecting = _b.draw(attributes, false, _x, _y, _s, _mx, _my, anchor_selecting); anchor_selecting = _b.draw(attributes, false, _x, _y, _s, _mx, _my, anchor_selecting);
var dir = point_direction(builder_sx, builder_sy, smx, smy); var dir = point_direction(builder_sx, builder_sy, smx, smy);
@ -264,7 +266,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
} }
triggerRender(); triggerRender();
} else if(ik_dragging != noone) { #endregion
} else if(ik_dragging != noone) { #region
anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting, ik_dragging); anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting, ik_dragging);
if(anchor_selecting != noone && anchor_selecting[1] == 2) { if(anchor_selecting != noone && anchor_selecting[1] == 2) {
@ -309,9 +312,10 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
} }
triggerRender(); triggerRender();
#endregion
} }
if(isUsingTool("Move")) { if(isUsingTool("Move")) { #region
_b.draw(attributes, false, _x, _y, _s, _mx, _my); _b.draw(attributes, false, _x, _y, _s, _mx, _my);
var bbox = _b.bbox(); var bbox = _b.bbox();
@ -357,7 +361,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
draw_rectangle(x0, y0, x1, y1, true); draw_rectangle(x0, y0, x1, y1, true);
draw_set_alpha(1); draw_set_alpha(1);
} }
} else if(isUsingTool("Scale")) { #endregion
} else if(isUsingTool("Scale")) { #region
_b.draw(attributes, false, _x, _y, _s, _mx, _my); _b.draw(attributes, false, _x, _y, _s, _mx, _my);
var bbox = _b.bbox(); var bbox = _b.bbox();
@ -423,7 +428,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
recordAction(ACTION_TYPE.struct_modify, attributes.bones, attributes.bones.serialize()); recordAction(ACTION_TYPE.struct_modify, attributes.bones, attributes.bones.serialize());
} }
} }
} else if(isUsingTool("Add bones")) { // builder #endregion
} else if(isUsingTool("Add bones")) { #region // builder
if(builder_bone == noone) if(builder_bone == noone)
anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting);
@ -464,7 +470,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
draw_sprite_ext(THEME.bone_tool_add, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); draw_sprite_ext(THEME.bone_tool_add, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1);
} else if(anchor_selecting[1] == 2) } else if(anchor_selecting[1] == 2)
draw_sprite_ext(THEME.bone_tool_add, 0, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); draw_sprite_ext(THEME.bone_tool_add, 0, _mx + 24, _my + 24, 1, 1, 0, c_white, 1);
} else if(isUsingTool("Remove bones")) { //remover #endregion
} else if(isUsingTool("Remove bones")) { #region //remover
anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting);
if(anchor_selecting != noone && anchor_selecting[1] == 2 && anchor_selecting[0].parent != noone && mouse_press(mb_left, active)) { if(anchor_selecting != noone && anchor_selecting[1] == 2 && anchor_selecting[0].parent != noone && mouse_press(mb_left, active)) {
@ -485,7 +492,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
if(anchor_selecting != noone) if(anchor_selecting != noone)
draw_sprite_ext(THEME.bone_tool_remove, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1); draw_sprite_ext(THEME.bone_tool_remove, 1, _mx + 24, _my + 24, 1, 1, 0, c_white, 1);
} else if(isUsingTool("Detach bones")) { //detach #endregion
} else if(isUsingTool("Detach bones")) { #region //detach
if(builder_bone == noone) if(builder_bone == noone)
anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting);
@ -506,14 +514,16 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
builder_my = my; builder_my = my;
UNDO_HOLDING = true; UNDO_HOLDING = true;
} }
} else if(isUsingTool("IK")) { //IK #endregion
} else if(isUsingTool("IK")) { #region //IK
if(ik_dragging == noone) if(ik_dragging == noone)
anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting); anchor_selecting = _b.draw(attributes, active * 0b100, _x, _y, _s, _mx, _my, anchor_selecting);
if(anchor_selecting != noone && anchor_selecting[1] == 2 && mouse_press(mb_left, active)) { if(anchor_selecting != noone && anchor_selecting[1] == 2 && mouse_press(mb_left, active)) {
ik_dragging = anchor_selecting[0]; ik_dragging = anchor_selecting[0];
} }
} else { //mover #endregion
} else { #region //mover
if(builder_bone == noone) if(builder_bone == noone)
anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting); anchor_selecting = _b.draw(attributes, active * 0b111, _x, _y, _s, _mx, _my, anchor_selecting);
@ -545,18 +555,19 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
UNDO_HOLDING = true; UNDO_HOLDING = true;
} }
#endregion
} }
} } #endregion
static step = function() { static step = function() {
} }
static update = function(frame = PROJECT.animator.current_frame) { static update = function(frame = PROJECT.animator.current_frame) { #region
outputs[| 0].setValue(attributes.bones); outputs[| 0].setValue(attributes.bones);
} } #endregion
static getPreviewBoundingBox = function() { static getPreviewBoundingBox = function() { #region
var minx = 9999999; var minx = 9999999;
var miny = 9999999; var miny = 9999999;
var maxx = -9999999; var maxx = -9999999;
@ -587,25 +598,25 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
if(minx == 9999999) return noone; if(minx == 9999999) return noone;
return BBOX().fromPoints(minx, miny, maxx, maxy); return BBOX().fromPoints(minx, miny, maxx, maxy);
} } #endregion
static attributeSerialize = function() { return {}; } static attributeSerialize = function() { return {}; }
static attributeDeserialize = function(attr) {} static attributeDeserialize = function(attr) {}
static doSerialize = function(_map) { static doSerialize = function(_map) { #region
_map.bones = attributes.bones.serialize(); _map.bones = attributes.bones.serialize();
} } #endregion
static postDeserialize = function() { static postDeserialize = function() { #region
if(!struct_has(load_map, "bones")) return; if(!struct_has(load_map, "bones")) return;
attributes.bones = new __Bone(,,,,, self); attributes.bones = new __Bone(,,,,, self);
attributes.bones.deserialize(load_map.bones, self); attributes.bones.deserialize(load_map.bones, self);
attributes.bones.connect(); attributes.bones.connect();
} } #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); var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_armature_create, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); draw_sprite_fit(s_node_armature_create, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
} } #endregion
} }

View file

@ -256,7 +256,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
hold_visibility = !_vis[index]; hold_visibility = !_vis[index];
if(mouse_click(mb_left, _focus) && _vis[index] != hold_visibility) { if(mouse_click(mb_left, _focus) && _vis[index] != hold_visibility) {
_vis[@ index] = hold_visibility; _vis[index] = hold_visibility;
doUpdate(); doUpdate();
} }
} else } else
@ -270,7 +270,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
hold_select = !_sel[index]; hold_select = !_sel[index];
if(mouse_click(mb_left, _focus) && _sel[index] != hold_select) if(mouse_click(mb_left, _focus) && _sel[index] != hold_select)
_sel[@ index] = hold_select; _sel[index] = hold_select;
} else } else
draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel); draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel);
@ -322,7 +322,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
} }
#endregion #endregion
if(layer_dragging != noone && mouse_release(mb_left)) { if(layer_dragging != noone && mouse_release(mb_left)) { #region
if(layer_dragging != hoverIndex && hoverIndex != noone) { if(layer_dragging != hoverIndex && hoverIndex != noone) {
var index = input_fix_len + layer_dragging * data_length; var index = input_fix_len + layer_dragging * data_length;
var targt = input_fix_len + hoverIndex * data_length; var targt = input_fix_len + hoverIndex * data_length;
@ -351,7 +351,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
} }
layer_dragging = noone; layer_dragging = noone;
} } #endregion
layer_renderer.h = bh + ui(40) + sh; layer_renderer.h = bh + ui(40) + sh;
return layer_renderer.h; return layer_renderer.h;
@ -435,16 +435,16 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
bone = noone; bone = noone;
surface_selecting = noone; surface_selecting = noone;
static getInputAmount = function() { static getInputAmount = function() { #region
return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length; return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length;
} } #endregion
static getInputIndex = function(index) { static getInputIndex = function(index) { #region
if(index < input_fix_len) return index; if(index < input_fix_len) return index;
return input_fix_len + (index - input_fix_len) * data_length; return input_fix_len + (index - input_fix_len) * data_length;
} } #endregion
static setHeight = function() { static setHeight = function() { #region
var _hi = ui(32); var _hi = ui(32);
var _ho = ui(32); var _ho = ui(32);
@ -457,15 +457,14 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
_ho += 24; _ho += 24;
h = max(min_h, (preview_surface && previewable)? 128 : 0, _hi, _ho); h = max(min_h, (preview_surface && previewable)? 128 : 0, _hi, _ho);
} } #endregion
static onValueFromUpdate = function(index) { #region static onValueFromUpdate = function(index) { #region
if(LOADING || APPENDING) return; if(LOADING || APPENDING) return;
if(index + data_length >= ds_list_size(inputs)) if(index + data_length >= ds_list_size(inputs))
createNewInput(); createNewInput();
#endregion } #endregion
}
static setBone = function() { #region static setBone = function() { #region
ds_map_clear(boneMap); ds_map_clear(boneMap);
@ -488,8 +487,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
} }
ds_stack_destroy(_bst); ds_stack_destroy(_bst);
#endregion } #endregion
}
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var dim = inputs[| 0].getValue(); var dim = inputs[| 0].getValue();
@ -521,7 +519,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
var y0 = _y; var y0 = _y;
var y1 = _y + hh * _s; var y1 = _y + hh * _s;
if(surf_dragging > -1) { if(surf_dragging > -1) { #region
var _surf = current_data[surf_dragging + 0]; var _surf = current_data[surf_dragging + 0];
var _tran = current_data[surf_dragging + 1]; var _tran = current_data[surf_dragging + 1];
var _aang = current_data[surf_dragging + 2]; var _aang = current_data[surf_dragging + 2];
@ -529,6 +527,8 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
var _asca = current_data[surf_dragging + 4]; var _asca = current_data[surf_dragging + 4];
var _psca = current_data[surf_dragging + 5]; var _psca = current_data[surf_dragging + 5];
_tran = array_clone(_tran);
var _bone = inputs[| surf_dragging].extra_data.bone_id; var _bone = inputs[| surf_dragging].extra_data.bone_id;
_bone = boneMap[? _bone]; _bone = boneMap[? _bone];
@ -584,7 +584,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surf_dragging = -1; surf_dragging = -1;
UNDO_HOLDING = false; UNDO_HOLDING = false;
} }
} } #endregion
var hovering = noone; var hovering = noone;
var hovering_type = noone; var hovering_type = noone;
@ -594,7 +594,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
var amo = (ds_list_size(inputs) - input_fix_len) / data_length; var amo = (ds_list_size(inputs) - input_fix_len) / data_length;
var anchors = array_create(ds_list_size(inputs)); var anchors = array_create(ds_list_size(inputs));
for(var i = 0; i < amo; i++) { for(var i = 0; i < amo; i++) { #region
var index = input_fix_len + i * data_length; var index = input_fix_len + i * data_length;
var _surf = array_safe_get(current_data, index); var _surf = array_safe_get(current_data, index);
if(!_surf || is_array(_surf)) continue; if(!_surf || is_array(_surf)) continue;
@ -652,9 +652,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
rot: _rot, rot: _rot,
} }
} } #endregion
for(var i = 0; i < amo; i++) { for(var i = 0; i < amo; i++) { #region
var vis = array_safe_get(_vis, i); var vis = array_safe_get(_vis, i);
var sel = array_safe_get(_sel, i); var sel = array_safe_get(_sel, i);
if(!vis) continue; if(!vis) continue;
@ -695,7 +695,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
hovering = index; hovering = index;
hovering_type = NODE_COMPOSE_DRAG.move; hovering_type = NODE_COMPOSE_DRAG.move;
} }
} } #endregion
if(mouse_press(mb_left, active)) if(mouse_press(mb_left, active))
surface_selecting = hovering; surface_selecting = hovering;
@ -724,7 +724,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]); draw_line(a.d3[0], a.d3[1], a.d2[0], a.d2[1]);
} }
if(hovering != noone && hovering_type != noone && mouse_press(mb_left, active)) { if(hovering != noone && hovering_type != noone && mouse_press(mb_left, active)) { #region
var _tran = current_data[hovering + 1]; var _tran = current_data[hovering + 1];
var _aang = current_data[hovering + 2]; var _aang = current_data[hovering + 2];
var _asca = current_data[hovering + 3]; var _asca = current_data[hovering + 3];
@ -751,16 +751,15 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
dragging_mx = (a.d0[0] + a.d3[0]) / 2; dragging_mx = (a.d0[0] + a.d3[0]) / 2;
dragging_my = (a.d0[1] + a.d3[1]) / 2; dragging_my = (a.d0[1] + a.d3[1]) / 2;
} }
} } #endregion
if(layer_remove > -1) { if(layer_remove > -1) {
deleteLayer(layer_remove); deleteLayer(layer_remove);
layer_remove = -1; layer_remove = -1;
} }
#endregion } #endregion
}
static step = function() { static step = function() { #region
var _dim_type = getSingleValue(1); var _dim_type = getSingleValue(1);
inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant); inputs[| 2].setVisible(_dim_type == COMPOSE_OUTPUT_SCALING.constant);
@ -768,9 +767,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
inputs[| i + 3].setVisible(current_data[i + 2]); inputs[| i + 3].setVisible(current_data[i + 2]);
inputs[| i + 5].setVisible(current_data[i + 4]); inputs[| i + 5].setVisible(current_data[i + 4]);
} }
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
if(_output_index == 1) return atlas_data; if(_output_index == 1) return atlas_data;
if(_output_index == 2) return bind_data; if(_output_index == 2) return bind_data;
if(_output_index == 0 && _array_index == 0) { if(_output_index == 0 && _array_index == 0) {
@ -872,9 +871,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;
} } #endregion
static resetTransform = function(surfIndex) { static resetTransform = function(surfIndex) { #region
var _bind = inputs[| 2].getValue(); var _bind = inputs[| 2].getValue();
var use_data = _bind != noone; var use_data = _bind != noone;
@ -895,26 +894,26 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
var _tr = [ _cx - _anc.x, _cy - _anc.y, _rot, 1, 1 ]; var _tr = [ _cx - _anc.x, _cy - _anc.y, _rot, 1, 1 ];
inputs[| surfIndex + 1].setValue(_tr); inputs[| surfIndex + 1].setValue(_tr);
} } #endregion
static attributeSerialize = function() { static attributeSerialize = function() { #region
var att = {}; var att = {};
att.layer_visible = attributes.layer_visible; att.layer_visible = attributes.layer_visible;
att.layer_selectable = attributes.layer_selectable; att.layer_selectable = attributes.layer_selectable;
return att; return att;
} } #endregion
static attributeDeserialize = function(attr) { static attributeDeserialize = function(attr) { #region
if(struct_has(attr, "layer_visible")) if(struct_has(attr, "layer_visible"))
attributes.layer_visible = attr.layer_visible; attributes.layer_visible = attr.layer_visible;
if(struct_has(attr, "layer_selectable")) if(struct_has(attr, "layer_selectable"))
attributes.layer_selectable = attr.layer_selectable; attributes.layer_selectable = attr.layer_selectable;
} } #endregion
static doApplyDeserialize = function() { static doApplyDeserialize = function() { #region
setBone(); setBone();
} } #endregion
} }

View file

@ -31,7 +31,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
attributes.display_bone = ind; attributes.display_bone = ind;
})]); })]);
static createNewInput = function(bone = noone) { static createNewInput = function(bone = noone) { #region
var index = ds_list_size(inputs); var index = ds_list_size(inputs);
inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] ) inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] )
@ -44,7 +44,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
array_push(input_display_list, index); array_push(input_display_list, index);
return inputs[| index]; return inputs[| index];
} } #endregion
static setBone = function() { #region static setBone = function() { #region
//print("Setting dem bones..."); //print("Setting dem bones...");
@ -97,8 +97,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
input_display_list = _input_display_list; input_display_list = _input_display_list;
//print(_input_display_list); //print(_input_display_list);
#endregion } #endregion
}
tools = [ tools = [
@ -114,7 +113,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
posing_mx = 0; posing_mx = 0;
posing_my = 0; posing_my = 0;
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var _b = outputs[| 0].getValue(); var _b = outputs[| 0].getValue();
if(_b == noone) return; if(_b == noone) return;
@ -126,7 +125,7 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
var smx = value_snap(mx, _snx); var smx = value_snap(mx, _snx);
var smy = value_snap(my, _sny); var smy = value_snap(my, _sny);
if(posing_bone) { if(posing_bone) { #region
if(posing_type == 0 && posing_bone.parent) { //move if(posing_type == 0 && posing_bone.parent) { //move
var ang = posing_bone.parent.pose_angle; var ang = posing_bone.parent.pose_angle;
var pp = point_rotate(smx - posing_mx, smy - posing_my, 0, 0, -ang); var pp = point_rotate(smx - posing_mx, smy - posing_my, 0, 0, -ang);
@ -170,9 +169,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
posing_type = noone; posing_type = noone;
UNDO_HOLDING = false; UNDO_HOLDING = false;
} }
} } #endregion
if(anchor_selecting != noone && mouse_press(mb_left, active)) { if(anchor_selecting != noone && mouse_press(mb_left, active)) { #region
if(anchor_selecting[1] == 0 || anchor_selecting[0].IKlength) { // move if(anchor_selecting[1] == 0 || anchor_selecting[0].IKlength) { // move
posing_bone = anchor_selecting[0]; posing_bone = anchor_selecting[0];
if(!ds_map_exists(boneMap, posing_bone.ID)) if(!ds_map_exists(boneMap, posing_bone.ID))
@ -220,11 +219,11 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
posing_mx = mx; posing_mx = mx;
posing_my = my; posing_my = my;
} }
} } #endregion
} } #endregion
bone_prev = noone; bone_prev = noone;
static step = function() { static step = function() { #region
var _b = inputs[| 0].getValue(); var _b = inputs[| 0].getValue();
if(_b == noone) return; if(_b == noone) return;
if(bone_prev != _b) { if(bone_prev != _b) {
@ -235,9 +234,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
var _boneCount = ds_list_size(inputs) - input_fix_len; var _boneCount = ds_list_size(inputs) - input_fix_len;
if(_boneCount != _b.childCount()) setBone(); if(_boneCount != _b.childCount()) setBone();
} } #endregion
static update = function(frame = PROJECT.animator.current_frame) { static update = function(frame = PROJECT.animator.current_frame) { #region
var _b = inputs[| 0].getValue(); var _b = inputs[| 0].getValue();
if(_b == noone) return; if(_b == noone) return;
@ -272,9 +271,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
_bone_pose.setPose(); _bone_pose.setPose();
outputs[| 0].setValue(_bone_pose); outputs[| 0].setValue(_bone_pose);
} } #endregion
static getPreviewBoundingBox = function() { static getPreviewBoundingBox = function() { #region
var minx = 9999999; var minx = 9999999;
var miny = 9999999; var miny = 9999999;
var maxx = -9999999; var maxx = -9999999;
@ -307,9 +306,9 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
if(minx == 9999999) return noone; if(minx == 9999999) return noone;
return BBOX().fromPoints(minx, miny, maxx, maxy); return BBOX().fromPoints(minx, miny, maxx, maxy);
} } #endregion
static doApplyDeserialize = function() { static doApplyDeserialize = function() { #region
for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) { for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) {
var inp = inputs[| i]; var inp = inputs[| i];
var idx = struct_try_get(inp.extra_data, "bone_id"); var idx = struct_try_get(inp.extra_data, "bone_id");
@ -318,11 +317,11 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
} }
setBone(); setBone();
} } #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); var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_armature_pose, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); draw_sprite_fit(s_node_armature_pose, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
} } #endregion
} }

View file

@ -17,6 +17,7 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con
outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ]) outputs[| 0] = nodeValue("Position", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector); .setDisplay(VALUE_DISPLAY.vector);
#region ++++ attributes ++++
attributes.display_name = true; attributes.display_name = true;
attributes.display_bone = 0; attributes.display_bone = 0;
@ -29,15 +30,16 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con
new scrollBox(["Octahedral", "Stick"], function(ind) { new scrollBox(["Octahedral", "Stick"], function(ind) {
attributes.display_bone = ind; attributes.display_bone = ind;
})]); })]);
#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 _b = inputs[| 0].getValue(); var _b = inputs[| 0].getValue();
if(_b == noone) return; if(_b == noone) return;
_b.draw(attributes, false, _x, _y, _s, _mx, _my); _b.draw(attributes, false, _x, _y, _s, _mx, _my);
} } #endregion
function update() { function update() { #region
var _bone = inputs[| 0].getValue(); var _bone = inputs[| 0].getValue();
var _name = inputs[| 1].getValue(); var _name = inputs[| 1].getValue();
var _prog = inputs[| 2].getValue(); var _prog = inputs[| 2].getValue();
@ -45,9 +47,6 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con
if(_bone == noone) return; if(_bone == noone) return;
_name = string_trim(_name); _name = string_trim(_name);
//print($"|{_name}|{string_length(_name)}");
//for( var i = 1; i <= string_length(_name); i++ )
// print($" {i}: |{string_char_at(_name, i)}|");
var _b = _bone.findBoneByName(_name); var _b = _bone.findBoneByName(_name);
if(_b == noone) { if(_b == noone) {
@ -57,10 +56,10 @@ function Node_Armature_Sample(_x, _y, _group = noone) : Node(_x, _y, _group) con
var _p = _b.getPoint(_prog); var _p = _b.getPoint(_prog);
outputs[| 0].setValue([_p.x, _p.y]); outputs[| 0].setValue([_p.x, _p.y]);
} } #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); var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_armature_sample, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); draw_sprite_fit(s_node_armature_sample, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
} } #endregion
} }

View file

@ -16,6 +16,7 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const
current_length = 0; current_length = 0;
boundary = new BoundingBox(); boundary = new BoundingBox();
#region ++++ attributes ++++
attributes.display_name = true; attributes.display_name = true;
attributes.display_bone = 0; attributes.display_bone = 0;
@ -28,13 +29,14 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const
new scrollBox(["Octahedral", "Stick"], function(ind) { new scrollBox(["Octahedral", "Stick"], function(ind) {
attributes.display_bone = ind; attributes.display_bone = ind;
})]); })]);
#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 _b = inputs[| 0].getValue(); var _b = inputs[| 0].getValue();
if(_b == noone) return; if(_b == noone) return;
_b.draw(attributes, false, _x, _y, _s, _mx, _my); _b.draw(attributes, false, _x, _y, _s, _mx, _my);
} } #endregion
static getBoundary = function() { return boundary; } static getBoundary = function() { return boundary; }
@ -43,11 +45,11 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const
static getLength = function() { return current_length; } static getLength = function() { return current_length; }
static getAccuLength = function() { return [ 0, current_length ]; } static getAccuLength = function() { return [ 0, current_length ]; }
static getWeightDistance = function (_dist, _ind = 0) { static getWeightDistance = function (_dist, _ind = 0) { #region
return getWeightRatio(_dist / current_length, _ind); return getWeightRatio(_dist / current_length, _ind);
} } #endregion
static getWeightRatio = function (_rat, _ind = 0) { static getWeightRatio = function (_rat, _ind = 0) { #region
var _p0 = lines[_ind][0]; var _p0 = lines[_ind][0];
var _p1 = lines[_ind][1]; var _p1 = lines[_ind][1];
@ -55,13 +57,13 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const
if(!is_array(_p1) || array_length(_p1) < 3) return 1; if(!is_array(_p1) || array_length(_p1) < 3) return 1;
return lerp(_p0[2], _p1[2], _rat); return lerp(_p0[2], _p1[2], _rat);
} } #endregion
static getPointDistance = function(_dist, _ind = 0) { static getPointDistance = function(_dist, _ind = 0) { #region
return getPointRatio(_dist / current_length, _ind); return getPointRatio(_dist / current_length, _ind);
} } #endregion
static getPointRatio = function(_rat, _ind = 0) { static getPointRatio = function(_rat, _ind = 0) { #region
var _p0 = lines[_ind][0]; var _p0 = lines[_ind][0];
var _p1 = lines[_ind][1]; var _p1 = lines[_ind][1];
@ -72,9 +74,9 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const
var _y = lerp(_p0[1], _p1[1], _rat); var _y = lerp(_p0[1], _p1[1], _rat);
return new __vec2( _x, _y ); return new __vec2( _x, _y );
} } #endregion
function update() { function update() { #region
var _bone = inputs[| 0].getValue(); var _bone = inputs[| 0].getValue();
if(_bone == noone) return; if(_bone == noone) return;
@ -109,10 +111,10 @@ function Node_Armature_Path(_x, _y, _group = noone) : Node(_x, _y, _group) const
ds_stack_destroy(_bst); ds_stack_destroy(_bst);
outputs[| 0].setValue(self); outputs[| 0].setValue(self);
} } #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); var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_armature_path, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); draw_sprite_fit(s_node_armature_path, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
} } #endregion
} }

View file

@ -44,7 +44,6 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr
static update = function(frame = PROJECT.animator.current_frame) { static update = function(frame = PROJECT.animator.current_frame) {
var _arr = inputs[| 0].getValue(); var _arr = inputs[| 0].getValue();
if(!is_array(_arr)) return; if(!is_array(_arr)) return;
var type = inputs[| 1].getValue(); var type = inputs[| 1].getValue();
@ -52,24 +51,24 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var value = inputs[| 3].getValue(); var value = inputs[| 3].getValue();
var spred = inputs[| 4].getValue(); var spred = inputs[| 4].getValue();
var arr = array_clone(_arr); _arr = array_clone(_arr);
if(type == 0) { if(type == 0) {
if(!is_array(index)) index = [ index ]; if(!is_array(index)) index = [ index ];
array_sort(index, false); array_sort(index, false);
for( var i = 0, n = array_length(index); i < n; i++ ) { for( var i = 0, n = array_length(index); i < n; i++ ) {
if(index[i] < 0) index[i] = array_length(arr) + index[i]; if(index[i] < 0) index[i] = array_length(_arr) + index[i];
array_delete(arr, index[i], 1); array_delete(_arr, index[i], 1);
} }
} else { } else {
if(!spred || !is_array(value)) value = [ value ]; if(!spred || !is_array(value)) value = [ value ];
for( var i = 0, n = array_length(value); i < n; i++ ) for( var i = 0, n = array_length(value); i < n; i++ )
array_remove(arr, value[i]); array_remove(_arr, value[i]);
} }
outputs[| 0].setValue(arr); outputs[| 0].setValue(_arr);
} }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {

View file

@ -25,9 +25,9 @@ function Node_Array_Reverse(_x, _y, _group = noone) : Node(_x, _y, _group) const
outputs[| 0].type = type; outputs[| 0].type = type;
} }
var arr = array_reverse(_arr); _arr = array_reverse(_arr);
outputs[| 0].setValue(arr); outputs[| 0].setValue(_arr);
} }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {

View file

@ -54,11 +54,10 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text);
var idx = inputs[| 1].getValue(); var idx = inputs[| 1].getValue();
var str = string(idx); var str = string(idx);
var bbox = drawGetBbox(xx, yy, _s); var bbox = drawGetBbox(xx, yy, _s);
var ss = string_scale(str, bbox.w, bbox.h); var ss = string_scale(str, bbox.w, bbox.h);
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
} }
} }

View file

@ -20,6 +20,7 @@ function Node_Array_Shuffle(_x, _y, _group = noone) : Node(_x, _y, _group) const
outputs[| 0].type = VALUE_TYPE.any; outputs[| 0].type = VALUE_TYPE.any;
if(!is_array(arr)) return; if(!is_array(arr)) return;
arr = array_clone(arr);
if(inputs[| 0].value_from != noone) { if(inputs[| 0].value_from != noone) {
inputs[| 0].type = inputs[| 0].value_from.type; inputs[| 0].type = inputs[| 0].value_from.type;

View file

@ -14,7 +14,7 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
@ -28,5 +28,5 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -26,7 +26,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
colors = []; colors = [];
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var inSurf = _data[0]; var inSurf = _data[0];
if(!is_surface(inSurf)) return _outSurf; if(!is_surface(inSurf)) return _outSurf;
@ -78,5 +78,5 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
colors[_array_index] = cc; colors[_array_index] = cc;
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -50,7 +50,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
temp_surface = [ surface_create(1, 1) ]; temp_surface = [ surface_create(1, 1) ];
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _back = _data[0]; var _back = _data[0];
var _fore = _data[1]; var _fore = _data[1];
var _type = _data[2]; var _type = _data[2];
@ -139,5 +139,5 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -31,7 +31,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
attribute_oversample(); attribute_oversample();
surface_blur_init(); surface_blur_init();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _size = _data[1]; var _size = _data[1];
var _clamp = struct_try_get(attributes, "oversample"); var _clamp = struct_try_get(attributes, "oversample");
var _isovr = _data[3]; var _isovr = _data[3];
@ -51,5 +51,5 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -27,7 +27,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _str = _data[1]; var _str = _data[1];
var _mask = _data[2]; var _mask = _data[2];
var _mix = _data[3]; var _mix = _data[3];
@ -48,5 +48,5 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -34,7 +34,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _surf = _data[0]; var _surf = _data[0];
var _size = _data[1]; var _size = _data[1];
var _tres = _data[2]; var _tres = _data[2];
@ -72,5 +72,5 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -27,7 +27,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
attribute_surface_depth(); attribute_surface_depth();
attribute_oversample(); attribute_oversample();
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var _surf = outputs[| 0].getValue(); var _surf = outputs[| 0].getValue();
if(is_array(_surf)) { if(is_array(_surf)) {
if(array_length(_surf) == 0) return; if(array_length(_surf) == 0) return;
@ -38,9 +38,9 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
var hh = surface_get_height_safe(_surf); var hh = surface_get_height_safe(_surf);
inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, _x + ww / 2 * _s, _y + hh / 2 * _s, _s, _mx, _my, _snx, _sny);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _str = _data[1]; var _str = _data[1];
var _dir = _data[2]; var _dir = _data[2];
var _mask = _data[3]; var _mask = _data[3];
@ -57,5 +57,5 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -32,20 +32,22 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_oversample(); attribute_oversample();
attribute_interpolation(); attribute_interpolation();
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var pos = inputs[| 2].getValue(); var pos = inputs[| 2].getValue();
var px = _x + pos[0] * _s; var px = _x + pos[0] * _s;
var py = _y + pos[1] * _s; var py = _y + pos[1] * _s;
inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny);
inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) {
var _str = _data[1]; var _str = _data[1];
var _cen = _data[2]; var _cen = _data[2];
var _mask = _data[4]; var _mask = _data[4];
var _mix = _data[5]; var _mix = _data[5];
_cen = array_clone(_cen);
_cen[0] /= surface_get_width_safe(_outSurf); _cen[0] /= surface_get_width_safe(_outSurf);
_cen[1] /= surface_get_height_safe(_outSurf); _cen[1] /= surface_get_height_safe(_outSurf);

View file

@ -42,7 +42,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
attribute_oversample(); attribute_oversample();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
if(!is_surface(_data[0])) return _outSurf; if(!is_surface(_data[0])) return _outSurf;
var _size = _data[1]; var _size = _data[1];
var _samp = struct_try_get(attributes, "oversample"); var _samp = struct_try_get(attributes, "oversample");
@ -79,5 +79,5 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
_outSurf = mask_apply(_data[0], _outSurf, _msk, _mix); _outSurf = mask_apply(_data[0], _outSurf, _msk, _mix);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -35,16 +35,16 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
attribute_oversample(); attribute_oversample();
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var pos = inputs[| 2].getValue(); var pos = inputs[| 2].getValue();
var px = _x + pos[0] * _s; var px = _x + pos[0] * _s;
var py = _y + pos[1] * _s; var py = _y + pos[1] * _s;
inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 64, THEME.anchor_scale_hori); inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 64, THEME.anchor_scale_hori);
inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _str = _data[1]; var _str = _data[1];
var _cen = _data[2]; var _cen = _data[2];
var _sam = struct_try_get(attributes, "oversample"); var _sam = struct_try_get(attributes, "oversample");
@ -52,6 +52,8 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var _msk = _data[5]; var _msk = _data[5];
var _mask = _data[6]; var _mask = _data[6];
var _mix = _data[7]; var _mix = _data[7];
_cen = array_clone(_cen);
_cen[0] /= surface_get_width_safe(_outSurf); _cen[0] /= surface_get_width_safe(_outSurf);
_cen[1] /= surface_get_height_safe(_outSurf); _cen[1] /= surface_get_height_safe(_outSurf);
@ -70,5 +72,5 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix); _outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -30,7 +30,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _exp = _data[1]; var _exp = _data[1];
var _con = _data[2]; var _con = _data[2];
surface_set_target(_outSurf); surface_set_target(_outSurf);
@ -49,5 +49,5 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -15,7 +15,7 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, output_index) { static processData = function(_outSurf, _data, output_index) { #region
var _out = _data[1]; var _out = _data[1];
var _alp = _data[2]; var _alp = _data[2];
@ -36,5 +36,5 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -13,7 +13,7 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, output_index) { static processData = function(_outSurf, _data, output_index) { #region
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
@ -29,5 +29,5 @@ function Node_HSV_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -82,7 +82,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
outputs[| 1].setVisible(type == 1, type == 1); outputs[| 1].setVisible(type == 1, type == 1);
} }
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _bri = _data[1]; var _bri = _data[1];
var _con = _data[2]; var _con = _data[2];
var _hue = _data[3]; var _hue = _data[3];
@ -104,6 +104,8 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var _surf = _data[0]; var _surf = _data[0];
var _baseSurf = _outSurf; var _baseSurf = _outSurf;
_col = array_clone(_col);
if(_type == 1) { if(_type == 1) {
if(!is_array(_col)) _col = [ _col ]; if(!is_array(_col)) _col = [ _col ];
@ -165,9 +167,9 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
var type = inputs[| 12].getValue(); var type = inputs[| 12].getValue();
if(type == 0) return; if(type == 0) return;
@ -178,5 +180,5 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
if(array_length(pal) && is_array(pal[0])) return; if(array_length(pal) && is_array(pal[0])) return;
drawPalette(pal, bbox.x0, bbox.y0, bbox.w, bbox.h); drawPalette(pal, bbox.x0, bbox.y0, bbox.w, bbox.h);
} } #endregion
} }

View file

@ -48,7 +48,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var fr = _data[1]; var fr = _data[1];
var to = _data[2]; var to = _data[2];
var tr = _data[3]; var tr = _data[3];
@ -100,5 +100,5 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]); if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -35,7 +35,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var frm = _data[1]; var frm = _data[1];
var thr = _data[2]; var thr = _data[2];
var inv = _data[6]; var inv = _data[6];
@ -63,5 +63,5 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -22,14 +22,14 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
selecting_index = 0; selecting_index = 0;
function setColor(colr) { function setColor(colr) { #region
var _to = inputs[| 2].getValue(); var _to = inputs[| 2].getValue();
_to[selecting_index] = colr; _to[selecting_index] = colr;
inputs[| 2].setValue(_to); inputs[| 2].setValue(_to); // Not necessary due to array reference
} } #endregion
render_palette = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { render_palette = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region
var bx = _x; var bx = _x;
var by = _y; var by = _y;
@ -115,7 +115,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
} }
return hh; return hh;
}); }); #endregion
input_display_list = [ 6, input_display_list = [ 6,
["Output", true], 0, 4, 5, ["Output", true], 0, 4, 5,
@ -127,7 +127,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
attribute_surface_depth(); attribute_surface_depth();
static refreshPalette = function() { static refreshPalette = function() { #region
var _surf = array_safe_get(current_data, 0); var _surf = array_safe_get(current_data, 0);
inputs[| 1].setValue([]); inputs[| 1].setValue([]);
@ -164,9 +164,9 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
inputs[| 1].setValue(palette); inputs[| 1].setValue(palette);
inputs[| 2].setValue(palette); inputs[| 2].setValue(palette);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var fr = _data[1]; var fr = _data[1];
var to = _data[2]; var to = _data[2];
var tr = _data[3]; var tr = _data[3];
@ -186,5 +186,5 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]); _outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -35,7 +35,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _gra = _data[1]; var _gra = _data[1];
var _gra_shift = _data[2]; var _gra_shift = _data[2];
var _alpha = _data[6]; var _alpha = _data[6];
@ -65,5 +65,5 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -14,7 +14,7 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _h = _data[0]; var _h = _data[0];
var _s = _data[1]; var _s = _data[1];
var _v = _data[2]; var _v = _data[2];
@ -35,5 +35,5 @@ function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -27,7 +27,7 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _r = _data[0]; var _r = _data[0];
var _g = _data[1]; var _g = _data[1];
var _b = _data[2]; var _b = _data[2];
@ -54,5 +54,5 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -88,7 +88,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
hold_visibility = !_vis[ind]; hold_visibility = !_vis[ind];
if(mouse_click(mb_left, _focus) && _vis[ind] != hold_visibility) { if(mouse_click(mb_left, _focus) && _vis[ind] != hold_visibility) {
_vis[@ ind] = hold_visibility; _vis[ind] = hold_visibility;
doUpdate(); doUpdate();
} }
} else } else
@ -102,7 +102,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
hold_select = !_sel[ind]; hold_select = !_sel[ind];
if(mouse_click(mb_left, _focus) && _sel[ind] != hold_select) if(mouse_click(mb_left, _focus) && _sel[ind] != hold_select)
_sel[@ ind] = hold_select; _sel[ind] = hold_select;
} else } else
draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel); draw_sprite_ui_uniform(THEME.cursor_select, sel, _bx, _cy + lh / 2, 1, COLORS._main_icon, 0.5 + 0.5 * sel);
@ -167,9 +167,8 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
ds_list_delete(inputs, index); ds_list_delete(inputs, index);
} }
for( var i = 0; i < data_length; i++ ) { for( var i = 0; i < data_length; i++ )
ds_list_insert(inputs, targt + i, ext[i]); ds_list_insert(inputs, targt + i, ext[i]);
}
doUpdate(); doUpdate();
} }

View file

@ -31,6 +31,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
var _inSurf = current_data[0]; var _inSurf = current_data[0];
var _splice = current_data[1]; var _splice = current_data[1];
_splice = array_clone(_splice);
for( var i = 0, n = array_length(_splice); i < n; i++ ) for( var i = 0, n = array_length(_splice); i < n; i++ )
_splice[i] = round(_splice[i]); _splice[i] = round(_splice[i]);

View file

@ -41,7 +41,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _wcur = _data[1]; var _wcur = _data[1];
var _rcur = _data[2]; var _rcur = _data[2];
var _gcur = _data[3]; var _gcur = _data[3];
@ -70,5 +70,5 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -17,7 +17,7 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_shader(_outSurf, sh_de_corner); surface_set_shader(_outSurf, sh_de_corner);
shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]); shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]);
shader_set_f("tolerance", _data[2]); shader_set_f("tolerance", _data[2]);
@ -26,5 +26,5 @@ function Node_De_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -17,7 +17,7 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_shader(_outSurf, sh_de_stray); surface_set_shader(_outSurf, sh_de_stray);
shader_set_dim("dimension", _data[0]); shader_set_dim("dimension", _data[0]);
shader_set_f("tolerance", _data[1]); shader_set_f("tolerance", _data[1]);
@ -26,5 +26,5 @@ function Node_De_Stray(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -41,7 +41,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
attribute_oversample(); attribute_oversample();
attribute_interpolation(); attribute_interpolation();
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var pos = inputs[| 1].getValue(); var pos = inputs[| 1].getValue();
var px = _x + pos[0] * _s; var px = _x + pos[0] * _s;
@ -49,9 +49,9 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori); inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, 0, 1, THEME.anchor_scale_hori);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var center = _data[1]; var center = _data[1];
var stren = _data[2]; var stren = _data[2];
var rad = _data[3]; var rad = _data[3];
@ -70,5 +70,5 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]); _outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -58,7 +58,7 @@ If set, then strength value control how many times the effect applies on itself.
attribute_oversample(); attribute_oversample();
attribute_interpolation(); attribute_interpolation();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
switch(_data[5]) { switch(_data[5]) {
case 0 : case 0 :
inputs[| 2].setVisible(true); inputs[| 2].setVisible(true);
@ -90,5 +90,5 @@ If set, then strength value control how many times the effect applies on itself.
_outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]); _outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -10,7 +10,7 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
custom_input_index = ds_list_size(inputs); custom_input_index = ds_list_size(inputs);
custom_output_index = ds_list_size(outputs); custom_output_index = ds_list_size(outputs);
if(!LOADING && !APPENDING && !CLONING) { if(!LOADING && !APPENDING && !CLONING) { #region
var _input = nodeBuild("Node_DynaSurf_In", -256, -32, self); var _input = nodeBuild("Node_DynaSurf_In", -256, -32, self);
var _output = nodeBuild("Node_DynaSurf_Out", 256, -32, self); var _output = nodeBuild("Node_DynaSurf_Out", 256, -32, self);
@ -45,9 +45,9 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
_outH.inputs[| 0].setFrom(_surH.outputs[| 0]); _outH.inputs[| 0].setFrom(_surH.outputs[| 0]);
UPDATE |= RENDER_TYPE.full; UPDATE |= RENDER_TYPE.full;
} } #endregion
static setRenderStatus = function(result) { static setRenderStatus = function(result) { #region
rendered = result; rendered = result;
if(result) if(result)
@ -68,9 +68,9 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
if(!result && group != noone) if(!result && group != noone)
group.setRenderStatus(result); group.setRenderStatus(result);
} } #endregion
static setDynamicSurface = function() { static setDynamicSurface = function() { #region
var _dyna = new Compute_DynaSurf(); var _dyna = new Compute_DynaSurf();
for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) { for( var i = 0, n = ds_list_size(nodes); i < n; i++ ) {
@ -85,12 +85,12 @@ function Node_DynaSurf(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
} }
outputs[| 0].setValue(_dyna); outputs[| 0].setValue(_dyna);
} } #endregion
static update = function() {} static update = function() {}
} }
function dynaSurf_output_getNextNode() { function dynaSurf_output_getNextNode() { #region
if(!is_instanceof(group, Node_DynaSurf)) return []; if(!is_instanceof(group, Node_DynaSurf)) return [];
var junc = group.outputs[| 0]; var junc = group.outputs[| 0];
@ -108,5 +108,5 @@ function dynaSurf_output_getNextNode() {
} }
return nodes; return nodes;
} } #endregion

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "fluidSim", "name": "fluidSim",
"path": "folders/nodes/data/fluidSim.yy", "path": "folders/nodes/data/simulation/fluidSim.yy",
}, },
} }

View file

@ -22,12 +22,12 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
static step = function() { static step = function() { #region
var _replace = inputs[| 1].getValue(); var _replace = inputs[| 1].getValue();
inputs[| 2].setVisible(_replace); inputs[| 2].setVisible(_replace);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _replace = inputs[| 1].getValue(); var _replace = inputs[| 1].getValue();
var _color = inputs[| 2].getValue(); var _color = inputs[| 2].getValue();
@ -45,5 +45,5 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_reset_target(); surface_reset_target();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -30,7 +30,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _exp = _data[1]; var _exp = _data[1];
var _con = _data[2]; var _con = _data[2];
surface_set_target(_outSurf); surface_set_target(_outSurf);
@ -49,5 +49,5 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -80,7 +80,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
var _col_gap = _data[6]; var _col_gap = _data[6];
var _gra = _data[5]; var _gra = _data[5];
var _grad = _gra.toArray();; var _grad = _gra.toArray();
var _grad_color = _grad[0]; var _grad_color = _grad[0];
var _grad_time = _grad[1]; var _grad_time = _grad[1];

View file

@ -19,7 +19,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
@ -34,5 +34,5 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]); _outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -48,10 +48,7 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
var _new_val; var _new_val;
surface_array_free(_prev_val); surface_array_free(_prev_val);
if(is_surf) _new_val = is_surf? surface_array_clone(_val) : array_clone(_val);
_new_val = surface_array_clone(_val);
else
_new_val = array_clone(_val);
return _new_val; return _new_val;
} }

View file

@ -265,7 +265,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
} #endregion } #endregion
static processValue = function(_val) { #region static processValue = function(_val) { #region
if(is_array(_val)) return array_clone(_val); if(is_array(_val)) return _val;
if(is_struct(_val)) return _val; if(is_struct(_val)) return _val;
if(is_undefined(_val)) return 0; if(is_undefined(_val)) return 0;

View file

@ -42,7 +42,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
attribute_surface_depth(); attribute_surface_depth();
level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region
var _h = 128; var _h = 128;
var x0 = _x; var x0 = _x;
var x1 = _x + _w; var x1 = _x + _w;
@ -73,7 +73,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
draw_rectangle(x0, y0, x1, y1, true); draw_rectangle(x0, y0, x1, y1, true);
return _h; return _h;
}); }); #endregion
input_display_list = [ 8, input_display_list = [ 8,
level_renderer, level_renderer,
@ -88,15 +88,15 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
histogramUpdate(current_data[0]); histogramUpdate(current_data[0]);
} }
static onValueFromUpdate = function(index) { static onValueFromUpdate = function(index) { #region
if(index == 0) { if(index == 0) {
doUpdate(); doUpdate();
if(array_length(current_data) > 0) if(array_length(current_data) > 0)
histogramUpdate(current_data[0]); histogramUpdate(current_data[0]);
} }
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _wmin = min(_data[1][0], _data[1][1]); var _wmin = min(_data[1][0], _data[1][1]);
var _wmax = max(_data[1][0], _data[1][1]); var _wmax = max(_data[1][0], _data[1][1]);
var _rmin = min(_data[2][0], _data[2][1]); var _rmin = min(_data[2][0], _data[2][1]);
@ -133,5 +133,5 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
_outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]); _outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -25,7 +25,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
attribute_surface_depth(); attribute_surface_depth();
level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { level_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) { #region
var _h = 128; var _h = 128;
var x0 = _x; var x0 = _x;
var x1 = _x + _w; var x1 = _x + _w;
@ -58,7 +58,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
draw_rectangle(x0, y0, x1, y1, true); draw_rectangle(x0, y0, x1, y1, true);
return _h; return _h;
}); }); #endregion
input_display_list = [ 5, input_display_list = [ 5,
level_renderer, level_renderer,
@ -67,20 +67,20 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
]; ];
histogramInit(); histogramInit();
static onInspect = function() { static onInspect = function() { #region
if(array_length(current_data) > 0) if(array_length(current_data) > 0)
histogramUpdate(current_data[0]); histogramUpdate(current_data[0]);
} } #endregion
static onValueFromUpdate = function(index) { static onValueFromUpdate = function(index) { #region
if(index == 0) { if(index == 0) {
update(); update();
if(array_length(current_data) > 0) if(array_length(current_data) > 0)
histogramUpdate(current_data[0]); histogramUpdate(current_data[0]);
} }
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _middle = _data[1]; var _middle = _data[1];
var _range = _data[2]; var _range = _data[2];
@ -101,5 +101,5 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -21,7 +21,7 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
attribute_surface_depth(); attribute_surface_depth();
attribute_interpolation(); attribute_interpolation();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var sFrom = _data[0]; var sFrom = _data[0];
var sTo = _data[1]; var sTo = _data[1];
var amo = _data[2]; var amo = _data[2];
@ -42,5 +42,5 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -67,14 +67,12 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
if(_type == 0) switch(_type) {
shader = sh_cell_noise; case 0 : shader = sh_cell_noise; break;
else if(_type == 1) case 1 : shader = sh_cell_noise_edge; break;
shader = sh_cell_noise_edge; case 2 : shader = sh_cell_noise_random; break;
else if(_type == 2) case 3 : shader = sh_cell_noise_crystal; break;
shader = sh_cell_noise_random; }
else if(_type == 3)
shader = sh_cell_noise_crystal;
surface_set_target(_outSurf); surface_set_target(_outSurf);
shader_set(shader); shader_set(shader);

View file

@ -26,7 +26,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
attribute_surface_depth(); attribute_surface_depth();
static processData = function(_outSurf, _data, _output_index, _array_index) { static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _pal = _data[1]; var _pal = _data[1];
var _shf = _data[2]; var _shf = _data[2];
@ -48,5 +48,5 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]); _outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
return _outSurf; return _outSurf;
} } #endregion
} }

View file

@ -6,6 +6,6 @@
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "VFX", "name": "VFX",
"path": "folders/nodes/data/VFX.yy", "path": "folders/nodes/data/simulation/VFX.yy",
}, },
} }

Some files were not shown because too many files have changed in this diff Show more