This commit is contained in:
MakhamDev 2023-10-18 19:58:55 +07:00
parent b1b422d79b
commit be1d1af2b3
77 changed files with 6492 additions and 206 deletions

View file

@ -87,9 +87,9 @@
{"name":"d3d light","order":14,"path":"folders/nodes/data/3D/d3d light.yy",},
{"name":"d3d mesh","order":12,"path":"folders/nodes/data/3D/d3d mesh.yy",},
{"name":"animation","order":6,"path":"folders/nodes/data/animation.yy",},
{"name":"compose","order":14,"path":"folders/nodes/data/compose.yy",},
{"name":"compose","order":12,"path":"folders/nodes/data/compose.yy",},
{"name":"armature","order":5,"path":"folders/nodes/data/compose/armature.yy",},
{"name":"dynasurf","order":21,"path":"folders/nodes/data/dynasurf.yy",},
{"name":"dynasurf","order":15,"path":"folders/nodes/data/dynasurf.yy",},
{"name":"filter","order":2,"path":"folders/nodes/data/filter.yy",},
{"name":"colors","order":4,"path":"folders/nodes/data/filter/colors.yy",},
{"name":"combine","order":1,"path":"folders/nodes/data/filter/combine.yy",},
@ -102,26 +102,27 @@
{"name":"pattern","order":15,"path":"folders/nodes/data/generator/pattern.yy",},
{"name":"regions","order":23,"path":"folders/nodes/data/generator/regions.yy",},
{"name":"group","order":7,"path":"folders/nodes/data/group.yy",},
{"name":"IO","order":1,"path":"folders/nodes/data/IO.yy",},
{"name":"network","order":16,"path":"folders/nodes/data/IO/network.yy",},
{"name":"iterate","order":10,"path":"folders/nodes/data/iterate.yy",},
{"name":"feedback","order":7,"path":"folders/nodes/data/iterate/feedback.yy",},
{"name":"for each","order":1,"path":"folders/nodes/data/iterate/for each.yy",},
{"name":"for filter","order":3,"path":"folders/nodes/data/iterate/for filter.yy",},
{"name":"for sort","order":5,"path":"folders/nodes/data/iterate/for sort.yy",},
{"name":"lua","order":16,"path":"folders/nodes/data/lua.yy",},
{"name":"lua","order":13,"path":"folders/nodes/data/lua.yy",},
{"name":"misc","order":11,"path":"folders/nodes/data/misc.yy",},
{"name":"PCX","order":22,"path":"folders/nodes/data/PCX.yy",},
{"name":"PCX","order":16,"path":"folders/nodes/data/PCX.yy",},
{"name":"array","order":6,"path":"folders/nodes/data/PCX/array.yy",},
{"name":"flow control","order":7,"path":"folders/nodes/data/PCX/flow control.yy",},
{"name":"fn","order":2,"path":"folders/nodes/data/PCX/fn.yy",},
{"name":"surface","order":3,"path":"folders/nodes/data/PCX/surface.yy",},
{"name":"value","order":4,"path":"folders/nodes/data/PCX/value.yy",},
{"name":"pixel builder","order":20,"path":"folders/nodes/data/pixel builder.yy",},
{"name":"pixel builder","order":14,"path":"folders/nodes/data/pixel builder.yy",},
{"name":"box","order":2,"path":"folders/nodes/data/pixel builder/box.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":"render","order":3,"path":"folders/nodes/data/render.yy",},
{"name":"simulation","order":23,"path":"folders/nodes/data/simulation.yy",},
{"name":"simulation","order":17,"path":"folders/nodes/data/simulation.yy",},
{"name":"fluidSim","order":2,"path":"folders/nodes/data/simulation/fluidSim.yy",},
{"name":"strandSim","order":1,"path":"folders/nodes/data/simulation/strandSim.yy",},
{"name":"VFX","order":3,"path":"folders/nodes/data/simulation/VFX.yy",},
@ -208,6 +209,7 @@
{"name":"sprites","order":2,"path":"folders/shader/sprites.yy",},
{"name":"surface replace","order":16,"path":"folders/shader/surface replace.yy",},
{"name":"transition","order":15,"path":"folders/shader/transition.yy",},
{"name":"UI","order":21,"path":"folders/shader/UI.yy",},
{"name":"warp","order":8,"path":"folders/shader/warp.yy",},
{"name":"sprites","order":11,"path":"folders/sprites.yy",},
{"name":"bs","order":4,"path":"folders/sprites/bs.yy",},
@ -217,7 +219,6 @@
{"name":"biterator","order":2,"path":"folders/VCT/biterator.yy",},
{"name":"widget","order":3,"path":"folders/VCT/widget.yy",},
{"name":"widgets","order":5,"path":"folders/widgets.yy",},
{"name":"UI","order":21,"path":"folders/shader/UI.yy",},
],
"ResourceOrderSettings": [
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},
@ -249,6 +250,7 @@
{"name":"s_node_text_trim","order":7,"path":"sprites/s_node_text_trim/s_node_text_trim.yy",},
{"name":"s_node_pb_fx_shading","order":3,"path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",},
{"name":"sh_noise_grid_hex","order":2,"path":"shaders/sh_noise_grid_hex/sh_noise_grid_hex.yy",},
{"name":"__node_process_template","order":19,"path":"scripts/__node_process_template/__node_process_template.yy",},
{"name":"__node_3d_obj","order":4,"path":"scripts/__node_3d_obj/__node_3d_obj.yy",},
{"name":"__path","order":1,"path":"scripts/__path/__path.yy",},
{"name":"draw_text_path","order":25,"path":"scripts/draw_text_path/draw_text_path.yy",},
@ -326,6 +328,7 @@
{"name":"sh_draw_color","order":8,"path":"shaders/sh_draw_color/sh_draw_color.yy",},
{"name":"d3d_scene","order":4,"path":"scripts/d3d_scene/d3d_scene.yy",},
{"name":"sh_channel_R2A","order":13,"path":"shaders/sh_channel_R2A/sh_channel_R2A.yy",},
{"name":"__node_module","order":14,"path":"scripts/__node_module/__node_module.yy",},
{"name":"s_node_array_find","order":2,"path":"sprites/s_node_array_find/s_node_array_find.yy",},
{"name":"fd_rectangle_set_velocity_time_step","order":17,"path":"scripts/fd_rectangle_set_velocity_time_step/fd_rectangle_set_velocity_time_step.yy",},
{"name":"fd_rectangle_set_collision_mask_sprite","order":1,"path":"scripts/fd_rectangle_set_collision_mask_sprite/fd_rectangle_set_collision_mask_sprite.yy",},
@ -557,6 +560,7 @@
{"name":"panel_tunnels","order":1,"path":"scripts/panel_tunnels/panel_tunnels.yy",},
{"name":"node_processor","order":7,"path":"scripts/node_processor/node_processor.yy",},
{"name":"animation_controller","order":1,"path":"scripts/animation_controller/animation_controller.yy",},
{"name":"node_module_test","order":20,"path":"scripts/node_module_test/node_module_test.yy",},
{"name":"s_node_shadow","order":36,"path":"sprites/s_node_shadow/s_node_shadow.yy",},
{"name":"s_node_grid_hex_noise","order":21,"path":"sprites/s_node_grid_hex_noise/s_node_grid_hex_noise.yy",},
{"name":"s_node_logic_opr","order":2,"path":"sprites/s_node_logic_opr/s_node_logic_opr.yy",},
@ -888,6 +892,7 @@
{"name":"fd_README","order":6,"path":"scripts/fd_README/fd_README.yy",},
{"name":"ase_object","order":7,"path":"scripts/ase_object/ase_object.yy",},
{"name":"node_rigid_object","order":1,"path":"scripts/node_rigid_object/node_rigid_object.yy",},
{"name":"__node_template","order":18,"path":"scripts/__node_template/__node_template.yy",},
{"name":"node_pb_box_transform","order":9,"path":"scripts/node_pb_box_transform/node_pb_box_transform.yy",},
{"name":"areaBox","order":1,"path":"scripts/areaBox/areaBox.yy",},
{"name":"__global_object_depths","order":7,"path":"scripts/__global_object_depths/__global_object_depths.yy",},

View file

@ -239,6 +239,7 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/shader/sprites.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface replace","folderPath":"folders/shader/surface replace.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"transition","folderPath":"folders/shader/transition.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"UI","folderPath":"folders/shader/UI.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":"bs","folderPath":"folders/sprites/bs.yy",},
@ -251,15 +252,17 @@
{"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":"widgets","folderPath":"folders/widgets.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"UI","folderPath":"folders/shader/UI.yy",},
],
"IncludedFiles": [
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Actions.zip","CopyToMask":-1,"filePath":"datafiles/data",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"icons.ai","CopyToMask":-1,"filePath":"datafiles/data/Actions",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Armature Build.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Armature Build.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Follow Path.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Follow Path.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Iso cube.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Iso cube.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Line from Path.json","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Line from Path.png","CopyToMask":-1,"filePath":"datafiles/data/Actions/Nodes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Addons.zip","CopyToMask":-1,"filePath":"datafiles/data",},
@ -799,6 +802,7 @@
{"id":{"name":"s_node_text_trim","path":"sprites/s_node_text_trim/s_node_text_trim.yy",},},
{"id":{"name":"s_node_pb_fx_shading","path":"sprites/s_node_pb_fx_shading/s_node_pb_fx_shading.yy",},},
{"id":{"name":"sh_noise_grid_hex","path":"shaders/sh_noise_grid_hex/sh_noise_grid_hex.yy",},},
{"id":{"name":"__node_process_template","path":"scripts/__node_process_template/__node_process_template.yy",},},
{"id":{"name":"__node_3d_obj","path":"scripts/__node_3d_obj/__node_3d_obj.yy",},},
{"id":{"name":"__path","path":"scripts/__path/__path.yy",},},
{"id":{"name":"draw_text_path","path":"scripts/draw_text_path/draw_text_path.yy",},},
@ -882,6 +886,7 @@
{"id":{"name":"sh_draw_color","path":"shaders/sh_draw_color/sh_draw_color.yy",},},
{"id":{"name":"d3d_scene","path":"scripts/d3d_scene/d3d_scene.yy",},},
{"id":{"name":"sh_channel_R2A","path":"shaders/sh_channel_R2A/sh_channel_R2A.yy",},},
{"id":{"name":"__node_module","path":"scripts/__node_module/__node_module.yy",},},
{"id":{"name":"s_node_array_find","path":"sprites/s_node_array_find/s_node_array_find.yy",},},
{"id":{"name":"fd_rectangle_set_velocity_time_step","path":"scripts/fd_rectangle_set_velocity_time_step/fd_rectangle_set_velocity_time_step.yy",},},
{"id":{"name":"fd_rectangle_set_collision_mask_sprite","path":"scripts/fd_rectangle_set_collision_mask_sprite/fd_rectangle_set_collision_mask_sprite.yy",},},
@ -1149,6 +1154,7 @@
{"id":{"name":"panel_tunnels","path":"scripts/panel_tunnels/panel_tunnels.yy",},},
{"id":{"name":"node_processor","path":"scripts/node_processor/node_processor.yy",},},
{"id":{"name":"animation_controller","path":"scripts/animation_controller/animation_controller.yy",},},
{"id":{"name":"node_module_test","path":"scripts/node_module_test/node_module_test.yy",},},
{"id":{"name":"s_node_shadow","path":"sprites/s_node_shadow/s_node_shadow.yy",},},
{"id":{"name":"s_node_grid_hex_noise","path":"sprites/s_node_grid_hex_noise/s_node_grid_hex_noise.yy",},},
{"id":{"name":"sh_rsh_corner","path":"shaders/sh_rsh_corner/sh_rsh_corner.yy",},},
@ -1530,6 +1536,7 @@
{"id":{"name":"fd_README","path":"scripts/fd_README/fd_README.yy",},},
{"id":{"name":"ase_object","path":"scripts/ase_object/ase_object.yy",},},
{"id":{"name":"node_rigid_object","path":"scripts/node_rigid_object/node_rigid_object.yy",},},
{"id":{"name":"__node_template","path":"scripts/__node_template/__node_template.yy",},},
{"id":{"name":"node_pb_box_transform","path":"scripts/node_pb_box_transform/node_pb_box_transform.yy",},},
{"id":{"name":"areaBox","path":"scripts/areaBox/areaBox.yy",},},
{"id":{"name":"__global_object_depths","path":"scripts/__global_object_depths/__global_object_depths.yy",},},

Binary file not shown.

View file

@ -0,0 +1,25 @@
{
"name": "Iso cube",
"tags": [],
"tooltip": "",
"location": ["3D", "3D"],
"sprPath": "./Iso cube.png",
"nodes": [
{ "id": "cube", "node": "Node_3D_Mesh_Cube", "x": 0, "y": 0 },
{ "id": "light", "node": "Node_3D_Light_Directional", "x": 0, "y": 160 },
{ "id": "scene", "node": "Node_3D_Scene", "x": 160, "y": 0 },
{ "id": "camera", "node": "Node_3D_Camera", "x": 320, "y": 0,
"setValues": [ { "index": "projection", "value": 1 },
{ "index": "orthographic_scale", "value": 0.5 },
{ "index": "postioning_mode", "value": 2 },
{ "index": "horizontal_angle", "value": 45 },
{ "index": "vertical_angle", "value": 30 }
]
}
],
"connections": [
{ "from": "cube", "fromIndex": 0, "to": "scene", "toIndex": 0 },
{ "from": "light", "fromIndex": 0, "to": "scene", "toIndex": 1 },
{ "from": "scene", "fromIndex": 0, "to": "camera", "toIndex": "scene" }
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because one or more lines are too long

View file

@ -26,6 +26,12 @@
"context": {
"key": "contextNode",
"relations": {
"Node_Group": [ "Node_Group_Input", "Node_Group_Output", "Node_Group_Thumbnail" ],
"Node_Iterate": [ "Node_Iterate_Input", "Node_Iterate_Output", "Node_Group_Thumbnail", "Node_Iterator_Index", "Node_Iterator_Length" ],
"Node_Iterate_Each": [ "Node_Group_Input", "Node_Group_Output", "Node_Group_Thumbnail", "Node_Iterator_Index", "Node_Iterator_Each_Length" ],
"Node_Iterate_Filter": [ "Node_Group_Input", "Node_Group_Output", "Node_Group_Thumbnail" ],
"Node_Feedback": [ "Node_Feedback_Input", "Node_Feedback_Output", "Node_Group_Thumbnail" ],
"Node_Fluid_Group": [ "Node_Fluid_Add", "Node_Fluid_Apply_Velocity", "Node_Fluid_Update", "Node_Fluid_Render", "Node_Fluid_Render_Output" ],
"Node_Rigid_Group": [ "Node_Rigid_Object", "Node_Rigid_Force_Apply", "Node_Rigid_Render", "Node_Rigid_Render_Output" ],
"Node_Strand_Group": [ "Node_Strand_Create", "Node_Strand_Gravity", "Node_Strand_Update", "Node_Strand_Render", "Node_Strand_Render_Texture" ],

Binary file not shown.

View file

@ -31,12 +31,8 @@ event_inherited();
#region ---- category ----
category = NODE_CATEGORY;
switch(context) {
case "Node_Pixel_Builder" :
category = NODE_PB_CATEGORY;
break;
case "Node_DynaSurf" :
category = NODE_PCX_CATEGORY;
break;
case "Node_Pixel_Builder" : category = NODE_PB_CATEGORY; break;
case "Node_DynaSurf" : category = NODE_PCX_CATEGORY; break;
}
draw_set_font(f_p0);
@ -169,10 +165,10 @@ event_inherited();
var res = _node.build(node_target_x, node_target_y,, _param);
if(_node.inputNode != noone)
_inputs = res[_node.inputNode].inputs;
_inputs = res[$ _node.inputNode].inputs;
if(_node.outputNode != noone)
_outputs = res[_node.outputNode].outputs;
_outputs = res[$ _node.outputNode].outputs;
} else {
var _new_list = APPEND(_node.path);
_inputs = ds_list_create();

View file

@ -12,9 +12,10 @@ event_inherited();
destroy_on_click_out = false;
meta = METADATA.clone();
meta = METADATA.clone();
meta_expand = false;
updating = noone;
updating = noone;
update_note = "Updated";
node = noone;
data_path = "";
@ -29,10 +30,13 @@ event_inherited();
t_alias = new textArea(TEXTBOX_INPUT.text, function(str) { meta.alias = str; });
t_tags = new textArrayBox(function() { return meta.tags; }, META_TAGS);
t_desc.auto_update = true;
t_auth.auto_update = true;
t_cont.auto_update = true;
t_alias.auto_update = true;
t_update = new textArea(TEXTBOX_INPUT.text, function(str) { update_note = str; });
t_desc.auto_update = true;
t_auth.auto_update = true;
t_cont.auto_update = true;
t_alias.auto_update = true;
t_update.auto_update = true;
function doExpand() {
meta_expand = true;

View file

@ -64,7 +64,7 @@
json_save_struct(updating.path, _map);
json_save_struct(updating.meta_path, _meta);
updating.meta = _meta;
updating.meta = meta;
PANEL_COLLECTION.refreshContext();
}
@ -73,7 +73,7 @@
ugc_loading = true;
} else if(ugc == 2) {
saveCollection(node, data_path, updating.path, false, updating.meta);
steam_ugc_update_collection(updating);
steam_ugc_update_collection(updating,, update_note);
ugc_loading = true;
} else
instance_destroy();
@ -92,58 +92,82 @@
if(meta_expand) {
var yy = dialog_y + ui(56);
if(ugc == 2) {
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
draw_text(dialog_x + ui(16), yy, __txt("Update note"));
yy += line_get_height() + ui(4);
dialog_h += line_get_height() + ui(4);
var wd_h = ui(160);
t_update.setFocusHover(sFOCUS, sHOVER);
t_update.register();
t_update.draw(dialog_x + ui(16), yy, dialog_w - ui(32), wd_h, update_note, mouse_ui);
yy += wd_h + ui(8);
dialog_h += wd_h + ui(8);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
draw_text(dialog_x + ui(16), yy, __txt("Description"));
yy += line_get_height() + ui(4);
dialog_h += line_get_height() + ui(4);
var wd_h = ugc == 2? ui(100) : ui(200);
t_desc.setFocusHover(sFOCUS, sHOVER);
t_desc.register();
t_desc.draw(dialog_x + ui(16), yy, dialog_w - ui(32), ui(200), meta.description, mouse_ui);
yy += ui(200) + ui(8);
dialog_h += ui(200) + ui(8);
t_desc.draw(dialog_x + ui(16), yy, dialog_w - ui(32), wd_h, meta.description, mouse_ui);
yy += wd_h + ui(8);
dialog_h += wd_h + ui(8);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
draw_text(dialog_x + ui(16), yy, __txt("Author"));
yy += line_get_height() + ui(4);
dialog_h += line_get_height() + ui(4);
var wd_h = TEXTBOX_HEIGHT;
t_auth.setFocusHover(sFOCUS, sHOVER);
t_auth.register();
t_auth.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.author, mouse_ui);
yy += TEXTBOX_HEIGHT + ui(8);
dialog_h += TEXTBOX_HEIGHT + ui(8);
t_auth.draw(dialog_x + ui(16), yy, dialog_w - ui(32), wd_h, meta.author, mouse_ui);
yy += wd_h + ui(8);
dialog_h += wd_h + ui(8);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
draw_text(dialog_x + ui(16), yy, __txt("Contact info"));
yy += line_get_height() + ui(4);
dialog_h += line_get_height() + ui(4);
var wd_h = TEXTBOX_HEIGHT;
t_cont.setFocusHover(sFOCUS, sHOVER);
t_cont.register();
t_cont.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.contact, mouse_ui);
yy += TEXTBOX_HEIGHT + ui(8);
dialog_h += TEXTBOX_HEIGHT + ui(8);
t_cont.draw(dialog_x + ui(16), yy, dialog_w - ui(32), wd_h, meta.contact, mouse_ui);
yy += wd_h + ui(8);
dialog_h += wd_h + ui(8);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
draw_text(dialog_x + ui(16), yy, __txt("Alias"));
yy += line_get_height() + ui(4);
dialog_h += line_get_height() + ui(4);
var wd_h = TEXTBOX_HEIGHT;
t_alias.setFocusHover(sFOCUS, sHOVER);
t_alias.register();
t_alias.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.alias, mouse_ui);
yy += TEXTBOX_HEIGHT + ui(8);
dialog_h += TEXTBOX_HEIGHT + ui(8);
t_alias.draw(dialog_x + ui(16), yy, dialog_w - ui(32), wd_h, meta.alias, mouse_ui);
yy += wd_h + ui(8);
dialog_h += wd_h + ui(8);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
draw_text(dialog_x + ui(16), yy, __txt("Tags"));
yy += line_get_height() + ui(4);
dialog_h += line_get_height() + ui(4);
var wd_h = TEXTBOX_HEIGHT;
t_tags.setFocusHover(sFOCUS, sHOVER);
t_tags.register();
var hh = t_tags.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, mouse_ui);
var hh = t_tags.draw(dialog_x + ui(16), yy, dialog_w - ui(32), wd_h, mouse_ui);
yy += hh + ui(8);
dialog_h += hh + ui(8);
}

View file

@ -497,7 +497,16 @@ event_inherited();
PREF_MAP[? "alt_picker"] = val;
PREF_SAVE();
})
])
]);
ds_list_add(pref_hot, [
__txtx("pref_pan_key", "Panning key"),
function() { return PREF_MAP[? "pan_mouse_key"] - 3; },
new scrollBox([ "Middle Mouse", "Mouse 4", "Mouse 5" ], function(val) {
PREF_MAP[? "pan_mouse_key"] = val + 3;
PREF_SAVE();
})
]);
vk_list = [
vk_left, vk_right, vk_up, vk_down, vk_space, vk_backspace, vk_tab, vk_home, vk_end, vk_delete, vk_insert,

View file

@ -69,7 +69,9 @@
addHotkey("", "Undo", "Z", MOD_KEY.ctrl, function() { UNDO(); });
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); });
addHotkey("", "Full panel", "`", MOD_KEY.none, set_focus_fullscreen);
addHotkey("", "Full panel", "`", MOD_KEY.none, set_focus_fullscreen);
addHotkey("", "Reset layout", vk_f10, MOD_KEY.ctrl, function() { resetPanel(); });
addHotkey("", "Open notification", vk_f12, MOD_KEY.none, function() { dialogPanelCall(new Panel_Notification()); });
addHotkey("", "Fullscreen", vk_f11, MOD_KEY.none, function() {

View file

@ -21,7 +21,7 @@ if(string(ev_id) == string(STEAM_UGC_ITEM_ID) && ev_type == "ugc_create_item") {
steam_ugc_set_item_preview(STEAM_UGC_UPDATE_HANDLE, "steamUGCthumbnail.png");
steam_ugc_set_item_content(STEAM_UGC_UPDATE_HANDLE, "steamUGC");
STEAM_UGC_SUBMIT_ID = steam_ugc_submit_item_update(STEAM_UGC_UPDATE_HANDLE, "Uploaded");
STEAM_UGC_SUBMIT_ID = steam_ugc_submit_item_update(STEAM_UGC_UPDATE_HANDLE, "Initial upload");
exit;
}

View file

@ -51,7 +51,7 @@ function Node_3D(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
for( var i = 0, n = array_length(_prev_obj); i < n; i++ ) {
var _prev = _prev_obj[i];
if(_prev == noone) continue;
if(!is_struct(_prev) || !struct_has(_prev, "getBBOX")) continue;
var _b = _prev.getBBOX();
var _c = _prev.getCenter();

View file

@ -7,7 +7,7 @@ enum ITERATION_STATUS {
function Node_Iterator(_x, _y, _group = noone) : Node_Collection(_x, _y, _group) constructor {
willRestart = false; //in the next getNextNode, reset all child nodes, use in loop.
static initLoop = function() {
static initLoop = function() { #region
resetRender();
iterated = 0;
@ -23,13 +23,13 @@ function Node_Iterator(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
doInitLoop();
LOG_LINE_IF(global.FLAG.render, "------------------< Loop begin >------------------");
}
} #endregion
static doInitLoop = function() {}
static update = function(frame = CURRENT_FRAME) { initLoop(); }
static outputNextNode = function() {
static outputNextNode = function() { #region
LOG_BLOCK_START();
LOG_IF(global.FLAG.render == 1, "[outputNextNode] Get next node from Loop output");
@ -62,17 +62,17 @@ function Node_Iterator(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
LOG_BLOCK_END();
return _nodes;
}
} #endregion
static getIterationCount = function() { return 0; }
static iterationStatus = function() {
static iterationStatus = function() { #region
if(iterated >= getIterationCount())
return ITERATION_STATUS.complete;
return ITERATION_STATUS.loop;
}
} #endregion
static iterationUpdate = function() {
static iterationUpdate = function() { #region
var maxIter = getIterationCount();
for( var i = 0; i < ds_list_size(nodes); i++ ) // check if every node is updated
@ -93,5 +93,5 @@ function Node_Iterator(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
LOG_LINE_IF(global.FLAG.render, $"------------------< Iteration update: {iterated} / {maxIter} [RESTART] >------------------");
willRestart = true;
}
}
} #endregion
}

View file

@ -0,0 +1,46 @@
function NodeModule(parent) constructor {
self.parent = parent;
inputs = ds_list_create();
load_map = -1;
load_scale = false;
static resetCache = function() { #region
for( var i = 0; i < ds_list_size(inputs); i++ ) {
if(!is_instanceof(inputs[| i], NodeValue)) continue;
inputs[| i].resetCache();
}
} #endregion
static serialize = function(scale = false, preset = false) { #region
var _map = {};
var _inputs = [];
for(var i = 0; i < ds_list_size(inputs); i++)
array_push(_inputs, inputs[| i].serialize(scale, preset));
_map.inputs = _inputs;
_map.outputs = [];
return _map;
} #endregion
static deserialize = function(_map, scale = false, preset = false) { #region
load_map = _map;
load_scale = scale;
} #endregion
static applyDeserialize = function(preset = false) { #region
var _inputs = load_map.inputs;
var amo = min(ds_list_size(inputs), array_length(_inputs));
for(var i = 0; i < amo; i++)
inputs[| i].applyDeserialize(_inputs[i], load_scale, preset);
} #endregion
static connect = function() { #region
for(var i = 0; i < ds_list_size(inputs); i++)
inputs[| i].connect(false);
} #endregion
}

View file

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

View file

@ -0,0 +1,13 @@
function Node_Process_Template(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "";
inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0);
input_display_list = [ 0 ];
static step = function() {}
static processData = function(_outSurf, _data, _output_index, _array_index = 0) { return _outSurf; }
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "__node_process_template",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "data",
"path": "folders/nodes/data.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

@ -0,0 +1,13 @@
function Node_Template(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "";
inputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
outputs[| 0] = nodeValue("", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, 0);
input_display_list = [ 0 ];
static step = function() {}
static update = function() {}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "__node_template",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "data",
"path": "folders/nodes/data.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

@ -27,8 +27,8 @@
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER;
VERSION = 11550;
SAVE_VERSION = 11530;
VERSION_STRING = "1.15";
SAVE_VERSION = 11550;
VERSION_STRING = "1.15.5";
BUILD_NUMBER = 11550;
globalvar APPEND_MAP;

View file

@ -11,7 +11,7 @@ function LOAD() {
}
function TEST_PATH(path) {
TESTING = true;
TESTING = true;
TEST_ERROR = true;
PROJECT.cleanup();
@ -124,13 +124,13 @@ function __LOAD_PATH(path, readonly = false, safe_mode = false, override = false
}
if(struct_has(_load_content, "onion_skin"))
PROJECT.onion_skin = _load_content.onion_skin;
struct_override(PROJECT.onion_skin, _load_content.onion_skin);
if(struct_has(_load_content, "previewGrid"))
PROJECT.previewGrid = _load_content.previewGrid;
struct_override(PROJECT.previewGrid, _load_content.previewGrid);
if(struct_has(_load_content, "graphGrid"))
PROJECT.graphGrid = _load_content.graphGrid;
struct_override(PROJECT.graphGrid, _load_content.graphGrid);
if(struct_has(_load_content, "attributes"))
struct_override(PROJECT.attributes, _load_content.attributes);

View file

@ -21,14 +21,14 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var butx = xx;
if(jun.connect_type == JUNCTION_CONNECT.input && jun.isAnimable() && !jun.expUse) { #region animation
var index = jun.value_from == noone? jun.is_anim : 2;
var index = jun.hasJunctionFrom()? 2 : jun.is_anim;
draw_sprite_ui_uniform(THEME.animate_clock, index, butx, lb_y, 1, index == 2? COLORS._main_accent : c_white, 0.8);
if(_hover && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
if(anim_hold != noone)
jun.setAnim(anim_hold);
draw_sprite_ui_uniform(THEME.animate_clock, index, butx, lb_y, 1, index == 2? COLORS._main_accent : c_white, 1);
TOOLTIP = jun.value_from == noone? __txtx("panel_inspector_toggle_anim", "Toggle animation") : __txtx("panel_inspector_remove_link", "Remove link");
TOOLTIP = jun.hasJunctionFrom()? __txtx("panel_inspector_remove_link", "Remove link") : __txtx("panel_inspector_toggle_anim", "Toggle animation");
if(mouse_press(mb_left, _focus)) {
if(jun.value_from != noone)
@ -230,7 +230,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
jun.editWidget.setFocusHover(_focus, _hover);
if(jun.connect_type == JUNCTION_CONNECT.input) {
jun.editWidget.setInteract(jun.value_from == noone);
jun.editWidget.setInteract(!jun.hasJunctionFrom());
if(_focus) jun.editWidget.register(_scrollPane);
} else {
jun.editWidget.setInteract(false);

View file

@ -22,7 +22,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
inputs[| in_d3d + 1] = nodeValue("Clipping Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 10 ] )
.setDisplay(VALUE_DISPLAY.vector);
inputs[| in_d3d + 2] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF )
.setDisplay(VALUE_DISPLAY.vector);
@ -203,6 +203,8 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
var _qi3 = new BBMOD_Quaternion().FromAxisAngle(new BBMOD_Vec3(1, 0, 0), 90);
#endregion
if(_sobj == noone || !struct_has(_sobj, "submit")) return [ noone, noone, noone ];
switch(_posm) { #region ++++ camera positioning ++++
case 0 :
camera.useFocus = false;
@ -247,8 +249,6 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
object.transform.rotation = camera.rotation.Clone();
object.transform.scale.set(1, _dim[0] / _dim[1], 1);
if(_sobj == noone) return;
#region camera view project
camera.projection = _proj;
camera.setViewFov(_fov, _clip[0], _clip[1]);

View file

@ -21,34 +21,46 @@
static getTooltip = function() { return tooltip; }
static build = function(_x = 0, _y = 0, _group = PANEL_GRAPH.getCurrentContext(), _param = {}) { #region
var _n = [];
var _n = {};
for( var i = 0, n = array_length(nodes); i < n; i++ ) {
var __n = nodes[i];
var _nx = struct_has(__n, "x")? _x + __n.x : _x + 160 * i;
var _ny = struct_has(__n, "y")? _y + __n.y : _y;
_n[i] = nodeBuild(__n.node, _nx, _ny, _group);
var _id = struct_try_get(__n, "id", i);
var _node = nodeBuild(__n.node, _nx, _ny, _group);
_n[$ _id] = _node;
if(struct_has(__n, "setValues")) {
var _setVals = __n.setValues;
for(var j = 0, m = array_length(_setVals); j < m; j++ ) {
var _setVal = _setVals[j];
var _index = _n[i].inputs[| _setVal.index];
var _input = is_string(_setVal.index)? _node.inputMap[? _setVal.index] : _node.inputs[| _setVal.index];
if(_input == undefined) continue;
if(struct_has(_setVal, "value"))
_index.setValue(_setVal.value);
_input.setValue(_setVal.value);
if(struct_has(_setVal, "unit"))
_index.unit.setMode(_setVal.unit);
_input.unit.setMode(_setVal.unit);
if(struct_has(_setVal, "expression"))
_index.setExpression(_setVal.expression);
_input.setExpression(_setVal.expression);
}
}
}
for( var i = 0, n = array_length(connections); i < n; i++ ) {
var _c = connections[i];
_n[_c.to].inputs[| _c.toIndex].setFrom(_n[_c.from].outputs[| _c.fromIndex]);
var _c = connections[i];
var _frN = _n[$ _c.from];
var _toN = _n[$ _c.to];
if(_frN == undefined || _toN == undefined) continue;
var _frO = is_string(_c.fromIndex)? _frN.outputMap[? _c.fromIndex] : _frN.outputs[| _c.fromIndex];
var _toI = is_string(_c.toIndex)? _toN.inputMap[? _c.toIndex] : _toN.inputs[| _c.toIndex];
if(_frO == undefined || _toI == undefined) continue;
_toI.setFrom(_frO);
}
return _n;
@ -109,6 +121,7 @@
var _list = NODE_CATEGORY[| i].list;
var j = 0;
if(_grp != "")
for( var m = ds_list_size(_list); j < m; j++ )
if(_list[| j] == _grp) break;

View file

@ -214,6 +214,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
function removeFrame(index = 0) { #region
if(attributes.frames <= 1) return;
if(preview_index == attributes.frames)
preview_index--;
attributes.frames--;
array_delete(canvas_surface, index, 1);
@ -297,6 +299,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
} #endregion
function surface_store_buffer(index = preview_index) { #region
if(index >= attributes.frames) return;
buffer_delete(canvas_buffer[index]);
var _canvas_surface = getCanvasSurface(index);

View file

@ -384,7 +384,32 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
draw_dummy = false;
} #endregion
static resolveGroupOrdering = function() { #region
var siz = ds_list_size(inputs);
var ar = ds_priority_create();
for( var i = custom_input_index; i < siz; i++ ) {
var _in = inputs[| i];
var _or = _in.from.attributes.input_priority;
ds_priority_add(ar, _in, _or);
}
var _order = 0;
for( var i = custom_input_index; i < siz; i++ ) {
var _jin = ds_priority_delete_min(ar);
var _in = inputs[| i];
_in.from.attributes.input_priority = _order;
_order++;
}
ds_priority_destroy(ar);
} #endregion
static sortIO = function() { #region
resolveGroupOrdering();
var sep = attributes.separator;
array_sort(sep, function(a0, a1) { return a0[0] - a1[0]; });
var siz = ds_list_size(inputs);

View file

@ -8,6 +8,11 @@ enum CACHE_USE {
auto
}
enum DYNA_INPUT_COND {
connection = 1 << 0,
zero = 1 << 1,
}
function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x, _y) constructor {
#region ---- main & active ----
active = true;
@ -299,12 +304,53 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
return self;
} #endregion
static setIsDynamicInput = function(_data_length = 1, _auto_input = true) { #region
static setIsDynamicInput = function(_data_length = 1, _auto_input = true, _dynamic_input_cond = DYNA_INPUT_COND.connection) { #region
is_dynamic_input = true;
auto_input = _auto_input;
input_display_len = input_display_list == -1? 0 : array_length(input_display_list);
input_fix_len = ds_list_size(inputs);
data_length = _data_length;
dynamic_input_cond = _dynamic_input_cond;
} #endregion
static createNewInput = -1;
static refreshDynamicInput = function() { #region
var _in = ds_list_create();
for( var i = 0; i < input_fix_len; i++ )
ds_list_add(_in, inputs[| i]);
array_resize(input_display_list, input_display_len);
for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) {
var _active = false;
if(dynamic_input_cond & DYNA_INPUT_COND.connection)
_active |= inputs[| i].value_from != noone;
if(dynamic_input_cond & DYNA_INPUT_COND.zero) {
var _val = inputs[| i].getValue();
_active |= _val != 0 || _val != "";
}
if(_active) {
for( var j = 0; j < data_length; j++ ) {
ds_list_add(_in, inputs[| i + j]);
array_push(input_display_list, i + j);
}
} else {
for( var j = 0; j < data_length; j++ )
delete inputs[| i + j];
}
}
for( var i = 0; i < ds_list_size(_in); i++ )
_in[| i].index = i;
ds_list_destroy(inputs);
inputs = _in;
createNewInput();
} #endregion
static getOutput = function(junc = noone) { #region
@ -450,8 +496,10 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static getInputs = function(frame = CURRENT_FRAME) { #region
inputs_data = array_create(ds_list_size(inputs), undefined);
for(var i = 0; i < ds_list_size(inputs); i++)
for(var i = 0; i < ds_list_size(inputs); i++) {
if(!is_instanceof(inputs[| i], NodeValue)) continue;
setInputData(i, inputs[| i].getValue(frame,,, false));
}
} #endregion
static forceUpdate = function() { #region
@ -1161,6 +1209,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {}
static drawPreviewToolOverlay = function(active, _mx, _my, _panel) { return false; }
static drawAnimationTimeline = function(_w, _h, _s) {}
static getAnimationCacheExist = function(frame) { return cacheExist(frame); }
@ -1318,8 +1368,10 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
} #endregion
static clearInputCache = function() { #region
for( var i = 0; i < ds_list_size(inputs); i++ )
for( var i = 0; i < ds_list_size(inputs); i++ ) {
if(!is_instanceof(inputs[| i], NodeValue)) continue;
inputs[| i].resetCache();
}
} #endregion
static checkConnectGroup = function(_type = "group") { #region
@ -1674,10 +1726,12 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
var _inputs = load_map.inputs;
var amo = min(ds_list_size(inputs), array_length(_inputs));
//print($"Applying deserialzie for {name}");
for(var i = 0; i < amo; i++) {
if(inputs[| i] == noone || _inputs[i] == noone) continue;
//if(name == "Particle") print($"Apply {i} : {inputs[| i].name}");
//print($" Apply {i} : {inputs[| i].name}");
inputs[| i].applyDeserialize(_inputs[i], load_scale, preset);
}
@ -1701,6 +1755,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
if(array_length(insInp) > 3) updatedOutTrigger.applyDeserialize(insInp[3], load_scale, preset);
}
//print($"Applying deserialzie for {name} complete");
doApplyDeserialize();
} #endregion
@ -1725,8 +1781,12 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
throw(txt);
}
}
onLoadGroup();
} #endregion
static onLoadGroup = function() {}
static connect = function(log = false) { #region
var connected = true;
for(var i = 0; i < ds_list_size(inputs); i++)

View file

@ -208,7 +208,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
converter = working_directory + "ImageMagick/convert.exe";
magick = working_directory + "ImageMagick/magick.exe";
webp = working_directory + "webp/webpmux.exe";
gifski = working_directory + "gifski\\win\\gifski.exe";
gifski = working_directory + "gifski/win/gifski.exe";
static onValueUpdate = function(_index) { #region
var form = getInputData(3);

View file

@ -11,7 +11,7 @@ function Node_Feedback(_x, _y, _group = noone) : Node_Collection(_x, _y, _group)
input.inputs[| 2].setValue(4);
output.inputs[| 0].setFrom(input.outputs[| 0]);
output.inputs[| 2].setFrom(input.outputs[| 1]);
output.inputs[| 1].setFrom(input.outputs[| 1]);
}
static doStepBegin = function() {

View file

@ -6,7 +6,7 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
h = 32 + 24 * 2;
min_h = h;
inputs[| 2] = nodeValue("Feedback loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)
inputs[| 1] = nodeValue("Feedback loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)
.setVisible(true, true);
cache_value = -1;

View file

@ -364,13 +364,16 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
static postDeserialize = function() { createInput(false); }
static doApplyDeserialize = function() {
static doApplyDeserialize = function() { #region
if(inParent == undefined) return;
if(group == noone) return;
inParent.name = name;
getInputs();
if(PROJECT.version < 11520) attributes.input_priority = getInputData(5);
onValueUpdate();
group.sortIO();
}
} #endregion
static onDestroy = function() { #region
if(is_undefined(inParent)) return;
@ -387,4 +390,9 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
to.setFrom(fr);
}
} #endregion
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -29,21 +29,21 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
attributes.inherit_name = false;
}
static setRenderStatus = function(result) {
static setRenderStatus = function(result) { #region
if(rendered == result) return;
LOG_LINE_IF(global.FLAG.render == 1, $"Set render status for {INAME} : {result}");
rendered = result;
if(group) group.setRenderStatus(result);
}
} #endregion
static onValueUpdate = function(index = 0) {
static onValueUpdate = function(index = 0) { #region
if(is_undefined(outParent)) return;
group.sortIO();
}
} #endregion
static getNextNodes = function() {
static getNextNodes = function() { #region
if(is_undefined(outParent)) return [];
//group.setRenderStatus(true);
//printIf(global.FLAG.render, "Value to amount " + string(ds_list_size(outParent.value_to)));
@ -73,9 +73,9 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
LOG_BLOCK_END();
return nodes;
}
} #endregion
static createOutput = function(override_order = true) {
static createOutput = function(override_order = true) { #region
if(group == noone) return;
if(!is_struct(group)) return;
@ -95,9 +95,9 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
group.sortIO();
outParent.setFrom(inputs[| 0]);
} if(!LOADING && !APPENDING) createOutput();
} if(!LOADING && !APPENDING) createOutput(); #endregion
static step = function() {
static step = function() { #region
if(is_undefined(outParent)) return;
outParent.name = display_name;
@ -118,21 +118,23 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
setDisplayName(inputs[| 0].value_from.name);
}
}
}
} #endregion
static postDeserialize = function() {
static postDeserialize = function() { #region
if(group == noone) return;
createOutput(false);
if(PROJECT.version < 11520) attributes.input_priority = getInputData(1);
group.sortIO();
}
} #endregion
static onDestroy = function() {
static onDestroy = function() { #region
if(is_undefined(outParent)) return;
ds_list_delete(group.outputs, ds_list_find_index(group.outputs, outParent));
}
} #endregion
static ungroup = function() {
static ungroup = function() { #region
var fr = inputs[| 0].value_from;
for( var i = 0; i < ds_list_size(outParent.value_to); i++ ) {
@ -141,5 +143,9 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
to.setFrom(fr);
}
}
} #endregion
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -175,7 +175,9 @@ output.color = surfaceColor;")
var vs = getInputData(0);
var fs = getInputData(1);
var _dir = DIRECTORY + "shadertemp/";
var _dir = DIRECTORY + "temp/";
directory_verify(_dir);
var vs = @"
#define MATRIX_WORLD 0
#define MATRIX_WORLD_VIEW 1
@ -261,8 +263,7 @@ struct PixelShaderOutput {
shader.fs = d3d11_shader_compile_ps(_dir + "fout.shader", "main", "ps_4_0");
if (!d3d11_shader_exists(shader.fs))
noti_warning(d3d11_get_error_string());
} #endregion
if(!LOADING && !APPENDING) refreshShader();
} if(!LOADING && !APPENDING) refreshShader(); #endregion
static onValueUpdate = function(index) { #region
var _refresh = index == 0 || index == 1 ||

View file

@ -20,7 +20,7 @@ function Node_Iterate(_x, _y, _group = noone) : Node_Iterator(_x, _y, _group) co
var output = nodeBuild("Node_Iterator_Output", 256, -32, self);
input.inputs[| 2].setValue(4);
output.inputs[| 2].setFrom(input.outputs[| 1]);
output.inputs[| 1].setFrom(input.outputs[| 1]);
}
static getIterationCount = function() { return getInputData(0); }

View file

@ -22,4 +22,7 @@ function Node_Iterator_Each_Input(_x, _y, _group = noone) : Node(_x, _y, _group)
outputs[| 0].setType(group.inputs[| 0].type);
}
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -56,4 +56,8 @@ function Node_Iterator_Each_Output(_x, _y, _group = noone) : Node(_x, _y, _group
group.outputs[| 0].setValue(_val);
group.iterationUpdate();
}
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -19,4 +19,8 @@ function Node_Iterator_Each_Length(_x, _y, _group = noone) : Node(_x, _y, _group
var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_iterator_amount, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
}
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -18,4 +18,8 @@ function Node_Iterator_Index(_x, _y, _group = noone) : Node(_x, _y, _group) cons
var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_iterator_index, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
}
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -19,4 +19,8 @@ function Node_Iterator_Length(_x, _y, _group = noone) : Node(_x, _y, _group) con
var bbox = drawGetBbox(xx, yy, _s);
draw_sprite_fit(s_node_iterator_length, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
}
static onLoadGroup = function() { #region
if(group == noone) nodeDelete(self);
} #endregion
}

View file

@ -8,19 +8,19 @@ function Node_Iterator_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
inputs[| 0].setFrom_condition = function(_valueFrom) {
if(instanceof(_valueFrom.node) != "Node_Iterator_Input") return true;
if(inputs[| 2].value_from == noone) return true;
if(inputs[| 2].value_from.node == _valueFrom.node) {
if(inputs[| 1].value_from == noone) return true;
if(inputs[| 1].value_from.node == _valueFrom.node) {
noti_warning("setFrom: Immediate cycle disallowed",, self);
return false;
}
return true;
}
inputs[| 2] = nodeValue("Loop exit", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)
inputs[| 1] = nodeValue("Loop exit", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, -1)
.uncache()
.setVisible(true, true);
inputs[| 2].setFrom_condition = function(_valueFrom) {
inputs[| 1].setFrom_condition = function(_valueFrom) {
if(instanceof(_valueFrom.node) != "Node_Iterator_Input") return true;
if(inputs[| 0].value_from == noone) return true;
if(inputs[| 0].value_from.node == _valueFrom.node) {

View file

@ -0,0 +1,29 @@
function Node_Module_SubModule(parent) : NodeModule(parent) constructor {
inputs[| 0] = nodeValue("Module input 0", parent, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 1] = nodeValue("Module input 1", parent, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");
}
function Node_Module_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Module test";
inputs[| 0] = nodeValue("Static input", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
input_display_list = [ 0 ];
setIsDynamicInput(1);
static createNewInput = function() { #region
var index = ds_list_size(inputs);
inputs[| index] = new Node_Module_SubModule(self);
return inputs[| index];
} if(!LOADING && !APPENDING) createNewInput(); #endregion
static step = function() {}
static update = function() {}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_module_test",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "data",
"path": "folders/nodes/data.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

@ -93,6 +93,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
var bbox = drawGetBbox(xx, yy, _s);
var val = getInputData(0);
var _int = getInputData(1);
var disp = getInputData(2);
var rang = getInputData(3);
var stp = getInputData(4);
@ -109,7 +110,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
switch(disp) {
case 1 : #region
draw_set_text(f_h2, fa_center, fa_center, _col);
draw_text_transformed(bbox.xc, bbox.y0 + 16 * _s, val, _s * 0.5, _s * 0.5, 0);
draw_text_transformed(bbox.xc, bbox.y0 + 16 * _s, _int? round(val) : val, _s * 0.5, _s * 0.5, 0);
var sl_w = bbox.w - 8 * _s;
var sl_h = _s * 40;
@ -212,7 +213,7 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
}
draw_set_text(f_h3, fa_center, fa_center, colorMultiply(CDEF.main_white, _col));
draw_text_transformed(bbox.xc, bbox.yc, string_format(val, -1, 2), _s * .5, _s * .5, 0);
draw_text_transformed(bbox.xc, bbox.yc, _int? round(val) : string_format(val, -1, 2), _s * .5, _s * .5, 0);
break; #endregion
}
} #endregion

View file

@ -16,11 +16,9 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr
outputs[| 1] = nodeValue("Atlas data", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, []);
input_display_list = [
0, 4, 1, 2, 3,
]
input_display_list = [ 0, 4, 1, 2, 3 ];
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var rect = outputs[| 1].getValue();
var spac = getInputData(4);
@ -44,16 +42,16 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr
_x + _s * (_sx + _sw - spac),
_y + _s * (_sy + _sh - spac), true);
}
}
} #endregion
static step = function() {
static step = function() { #region
var algo = getInputData(1);
inputs[| 2].setVisible(algo == 1 || algo == 0);
inputs[| 3].setVisible(algo == 2 || algo == 0);
}
} #endregion
static update = function() {
static update = function() { #region
var _inpt = getInputData(0);
var _algo = getInputData(1);
var _spac = getInputData(4);
@ -97,8 +95,8 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var atlas = [];
if(array_length(rect) < array_length(_rects))
noti_warning("Not enought space, packed " + string(array_length(rect)) + " out of " + string(array_length(_rects)) + " images");
noti_warning($"Not enought space, packed {array_length(rect)} out of {array_length(_rects)} images.");
var _surf = outputs[| 0].getValue();
_surf = surface_verify(_surf, area.w, area.h, surface_get_format(_inpt[0]));
outputs[| 0].setValue(_surf);
@ -110,13 +108,13 @@ function Node_Pack_Sprites(_x, _y, _group = noone) : Node(_x, _y, _group) constr
for( var i = 0, n = array_length(rect); i < n; i++ ) {
var r = rect[i];
array_push(atlas, new SurfaceAtlas(r.surface, r.x + _spac, r.y + _spac));
draw_surface_safe(r.surface, r.x + _spac, r.y + _spac);
array_push(atlas, new SurfaceAtlas(r.surface.surface, r.x + _spac, r.y + _spac));
draw_surface_safe(r.surface.surface, r.x + _spac, r.y + _spac);
}
BLEND_NORMAL
surface_reset_target();
outputs[| 1].setValue(atlas);
}
} #endregion
}

View file

@ -247,7 +247,11 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
}
} #endregion
static preGetInputs = function() {}
static getInputs = function() { #region
preGetInputs();
process_amount = 1;
inputs_data = array_create(ds_list_size(inputs));
inputs_is_array = array_create(ds_list_size(inputs));

View file

@ -700,6 +700,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
ds_list_add(node, "Debug");
addNodeObject(node, "Print", s_node_print, "Node_Print", [1, Node_Print], ["debug log"], "Display text to notification.").setVersion(1145);
addNodeObject(node, "Widget Test", s_node_print, "Node_Widget_Test", [1, Node_Widget_Test]);
//addNodeObject(node, "Module Test", s_node_print, "Node_Module_Test", [1, Node_Module_Test]);
ds_list_add(node, "System");
addNodeObject(node, "Execute Shell", s_node_shell_excecute, "Node_Shell", [1, Node_Shell], ["terminal", "execute", "run"], "Execute shell script.").setVersion(11530);
@ -719,7 +720,14 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
// addNodeObject(vct, "Biterator", s_node_print, "Node_Biterator", [1, Node_Biterator]);
//////////////////////////////////////////////////////////////// PIXEL BUILDER ////////////////////////////////////////////////////////////////
var pb_group = ds_list_create(); #region
addNodePBCatagory("Group", pb_group);
ds_list_add(pb_group, "Groups");
addNodeObject(pb_group, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(pb_group, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
#endregion
var pb_draw = ds_list_create(); #region
addNodePBCatagory("Draw", pb_draw);
ds_list_add(pb_draw, "Fill");

View file

@ -34,33 +34,165 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
inputs[| 11] = nodeValue("Highlight alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
.setDisplay(VALUE_DISPLAY.slider);
inputs[| 12] = nodeValue("Array process", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Individual", "Combined" ]);
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [
["Output", true], 0, 1,
["Surface", false], 0, 1, 12,
["Stack", false], 2, 3, 8, 4, 5,
["Render", false], 6, 7, 9, 10, 11,
];
attribute_surface_depth();
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
preview_custom = false;
preview_custom_surface = -1;
preview_custom_index = noone;
preview_custom_x = 0;
preview_custom_x_to = 0;
preview_custom_x_max = 0;
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
var pos = getInputData(4);
var px = _x + pos[0] * _s;
var py = _y + pos[1] * _s;
inputs[| 3].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny, THEME.anchor);
inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
inputs[| 5].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny);
}
} #endregion
static step = function() {
static drawPreviewToolOverlay = function(active, _mx, _my, _panel) { #region
var _surf = getInputData(0);
if(!is_array(_surf)) return false;
var _arry = getInputData(12);
if(_arry == 0) return false;
var prev_size = ui(48);
var sx = preview_custom_x + ui(8);
var sy = _panel.y1 - ui(8) - prev_size;
var hov = false;
preview_custom_index = noone;
preview_custom_x_max = 0;
for( var i = 0, n = array_length(_surf); i < n; i++ ) {
var _s = _surf[i];
var _sw = surface_get_width_safe(_s);
var _sh = surface_get_height_safe(_s);
var _ss = prev_size / min(_sw, _sh);
var _sx = sx + (prev_size / 2 - _sw * _ss / 2);
var _sy = sy + (prev_size / 2 - _sh * _ss / 2);
draw_surface_ext_safe(_s, _sx, _sy, _ss, _ss);
draw_set_color(COLORS.panel_preview_surface_outline);
draw_rectangle(_sx, _sy, _sx + _sw * _ss, _sy + _sh * _ss, true);
if(point_in_rectangle(_mx, _my, _sx - ui(4), _sy, _sx + _sw * _ss + ui(4), _sy + _sh * _ss)) {
hov = true;
preview_custom_index = i;
}
sx += prev_size + ui(8);
preview_custom_x_max += prev_size + ui(8);
}
preview_custom_x_max = max(preview_custom_x_max - _panel.w + ui(64), 0);
if(hov) {
if(mouse_wheel_down()) preview_custom_x_to -= ui(128);
if(mouse_wheel_up()) preview_custom_x_to += ui(128);
}
preview_custom_x_to = clamp(preview_custom_x_to, -preview_custom_x_max, 0);
preview_custom_x = lerp_float(preview_custom_x, preview_custom_x_to, 5);
return hov;
} #endregion
static preGetInputs = function() { #region
var _surf = inputs[| 0].getValue();
var _arry = inputs[| 12].getValue();
inputs[| 0].setArrayDepth(is_array(_surf) && _arry);
} #endregion
static step = function() { #region
var _high = getInputData(9);
var _surf = getInputData(0);
var _arry = getInputData(12);
inputs[| 2].setVisible(_arry && is_array(_surf));
inputs[| 10].setVisible(_high);
inputs[| 11].setVisible(_high);
}
inputs[| 12].setVisible(is_array(_surf));
#region custom preview
preview_custom = preview_custom_index != noone && is_array(_surf) && _arry;
if(preview_custom) drawPreviewCustom();
#endregion
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) {
static drawPreviewCustom = function() { #region
var _in = getSingleValue(0);
var _dim = getSingleValue(1);
var _shf = getSingleValue(3);
var _pos = getSingleValue(4);
var _rot = getSingleValue(5);
var _col = getSingleValue(6);
var _alp = getSingleValue(7);
var _mov = getSingleValue(8);
_pos = [ _pos[0], _pos[1] ];
if(_mov) {
_pos[0] -= _shf[0] * _amo;
_pos[1] -= _shf[1] * _amo;
}
var _prev_s = noone;
var _prev_x = noone;
var _prev_y = noone;
preview_custom_surface = surface_verify(preview_custom_surface, _dim[0], _dim[1]);
surface_set_target(preview_custom_surface);
DRAW_CLEAR
for(var i = 0; i < array_length(_in); i++) {
var index = clamp(i, 0, array_length(_in) - 1);
var _surf = _in[index];
if(!is_surface(_surf)) continue;
var _ww = surface_get_width_safe(_surf);
var _hh = surface_get_height_safe(_surf);
var _po = point_rotate(0, 0, _ww / 2, _hh / 2, _rot);
var _aa = i == preview_custom_index? 1 : 0.2;
if(i == preview_custom_index) {
_prev_s = _surf;
_prev_x = _po[0] + _pos[0];
_prev_y = _po[1] + _pos[1];
}
draw_surface_ext_safe(_surf, _po[0] + _pos[0], _po[1] + _pos[1], 1, 1, _rot, _col, 0.2);
_pos[0] += _shf[0];
_pos[1] += _shf[1];
}
if(is_surface(_prev_s))
draw_surface_ext_safe(_prev_s, _prev_x, _prev_y, 1, 1, _rot, _col, 1);
surface_reset_target();
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _in = _data[0];
var _dim = _data[1];
var _amo = _data[2];
@ -75,10 +207,13 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var _hig = _data[ 9];
var _hiC = _data[10];
var _hiA = _data[11];
var _arr = _data[12];
_pos = array_clone(_pos);
_pos = [ _pos[0], _pos[1] ];
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
if(is_array(_in) && _arr) _amo = array_length(_in);
if(_mov) {
_pos[0] -= _shf[0] * _amo;
_pos[1] -= _shf[1] * _amo;
@ -92,7 +227,7 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var _po = point_rotate(0, 0, _ww / 2, _hh / 2, _rot);
var aa = _alp;
var aa_delta = (1 - aa) / _amo;
_pos[0] += _shf[0] * _amo;
_pos[1] += _shf[1] * _amo;
@ -117,21 +252,35 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
} else if(is_array(_in)) {
for(var i = 0; i < _amo; i++) {
var index = clamp(i, 0, array_length(_in) - 1);
if(is_surface(_in[index])) {
var _ww = surface_get_width_safe(_in[index]);
var _hh = surface_get_width_safe(_in[index]);
var _po = point_rotate(0, 0, _ww / 2, _hh / 2, _rot);
_po[0] += _pos[0];
_po[1] += _pos[1];
draw_surface_ext_safe(_in[index], _po[0] + _pos[0], _po[1] + _pos[1], 1, 1, _rot, _col, 1);
_pos[0] += _shf[0];
_pos[1] += _shf[1];
}
var _surf = _in[index];
if(!is_surface(_surf)) continue;
var _ww = surface_get_width_safe(_surf);
var _hh = surface_get_height_safe(_surf);
var _po = point_rotate(0, 0, _ww / 2, _hh / 2, _rot);
draw_surface_ext_safe(_surf, _po[0] + _pos[0], _po[1] + _pos[1], 1, 1, _rot, _col, 1);
_pos[0] += _shf[0];
_pos[1] += _shf[1];
}
}
surface_reset_target();
return _outSurf;
}
} #endregion
static getPreviewValues = function() { #region
if(preview_custom && is_surface(preview_custom_surface)) return preview_custom_surface;
if(preview_channel >= ds_list_size(outputs)) return noone;
switch(outputs[| preview_channel].type) {
case VALUE_TYPE.surface :
case VALUE_TYPE.dynaSurface :
break;
default :
return;
}
return outputs[| preview_channel].getValue();
} #endregion
}

View file

@ -1229,9 +1229,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
case VALUE_DISPLAY.path_load:
var path = animator.getValue();
if(is_array(path)) path = path[0];
if(path != "" && try_get_path(path) == -1) {
if(!is_string(path) || path == "") {
str = $"Path invalid: {path}";
break;
}
if(try_get_path(path) == -1) {
value_validation = VALIDATION.error;
str = "File not exist: " + string(path);
str = $"File not exist: {path}";
}
break;
case VALUE_DISPLAY.path_array:
@ -1958,7 +1964,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
_bgC = isArray()? value_color_bg_array(draw_junction_index) : value_color_bg(draw_junction_index);
_fgC = value_color(draw_junction_index);
} else {
_bgC = isArray()? merge_color(color, CDEF.main_dkgrey, 0.35) : value_color_bg(draw_junction_index);
_bgC = isArray()? merge_color(color, colorMultiply(color, CDEF.main_dkgrey), 0.5) : value_color_bg(draw_junction_index);
_fgC = color;
}
@ -2282,6 +2288,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
ext.doUpdate();
} #endregion
static hasJunctionFrom = function() { gml_pragma("forceinline"); return value_from != noone; }
static getJunctionTo = function() { #region
var to = [];
@ -2367,7 +2375,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
if(connect_type == JUNCTION_CONNECT.output)
return;
//printIf(TESTING, " |- Applying deserialize to junction " + name + " of node " + node.name);
//print($" > Applying deserialize to junction {name} 0");
on_end = struct_try_get(_map, "on_end");
loop_range = struct_try_get(_map, "loop_range", -1);
unit.mode = struct_try_get(_map, "unit");
@ -2376,7 +2384,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
expTree = evaluateFunctionList(expression);
sep_axis = struct_try_get(_map, "sep_axis");
is_anim = struct_try_get(_map, "anim");
setAnim(struct_try_get(_map, "anim"));
draw_line_shift_x = struct_try_get(_map, "shift_x");
draw_line_shift_y = struct_try_get(_map, "shift_y");

View file

@ -40,7 +40,7 @@
}
function noti_status(str, icon = noone, flash = false, ref = noone) {
if(TEST_ERROR) return;
if(TEST_ERROR) return {};
str = string(str);
show_debug_message("STATUS: " + str);
@ -68,7 +68,7 @@
}
function noti_warning(str, icon = noone, ref = noone) {
if(TEST_ERROR) return;
if(TEST_ERROR) return {};
show_debug_message("WARNING: " + str);
if(PANEL_MENU) {
@ -97,7 +97,7 @@
}
function noti_error(str, icon = noone, ref = noone) {
if(TEST_ERROR) return;
if(TEST_ERROR) return {};
show_debug_message("ERROR: " + str);
var noti = new notification(NOTI_TYPE.error, str, icon, c_ui_red);

View file

@ -2,9 +2,7 @@ function sprite_pack_skyline(rectangles, width, height) {
var maxw = 0;
var maxh = 0;
array_sort(rectangles, function(a, b) {
return b.w - a.w;
});
array_sort(rectangles, function(a, b) { return b.w - a.w; });
var skyline = [ new Rectangle(0, 0, width, height) ];
var packed = [];
@ -38,10 +36,7 @@ function sprite_pack_skyline(rectangles, width, height) {
array_push(skyline, new Rectangle(bestStrip.x, bestStrip.y + rect.h, rect.w, bestStrip.h - rect.h));
array_remove(skyline, bestStrip);
array_sort(skyline, function(a, b) {
return a.x - b.x;
});
array_sort(skyline, function(a, b) { return a.x - b.x; });
maxw = max(maxw, rect.x + rect.w);
maxh = max(maxh, rect.y + rect.h);

View file

@ -286,7 +286,7 @@ function Panel_Animation() : PanelContent() constructor {
}, THEME.folder_content),
];
var _clrs = COLORS.timeline_blend;
var _clrs = COLORS.labels;
var _item = array_create(array_length(_clrs));
function setSelectingItemColor(color) { if(context_selecting_item == noone) return; context_selecting_item.item.color = color; }

View file

@ -55,6 +55,19 @@ function Panel_Collection() : PanelContent() constructor {
dia.updating = _menu_node;
dia.doExpand();
}),
menuItem(__txtx("panel_collection_update_thumbnail", "Update thumbnail"), function() {
var _path = _menu_node.path;
var preview_surface = PANEL_PREVIEW.getNodePreviewSurface();
if(!is_surface(preview_surface)) {
noti_warning("Please send any node to preview panel to use as a thumbnail.")
return;
}
var icon_path = string_replace(_path, filename_ext(_path), "") + ".png";
surface_save_safe(preview_surface, icon_path);
refreshContext();
}),
-1,
menuItem(__txt("Delete"), function() {
file_delete(_menu_node.path);

View file

@ -46,7 +46,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
graph_zoom_m = 0;
graph_zoom_s = 0;
drag_key = mb_middle;
drag_key = PREF_MAP[? "pan_mouse_key"];
drag_locking = false;
#endregion
@ -91,7 +91,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
add_node_draw_y = 0;
connection_aa = 2;
connection_surface = surface_create(1, 1);
connection_surface = surface_create(1, 1);
connection_surface_aa = surface_create(1, 1);
value_focus = noone;
value_dragging = noone;
@ -438,6 +439,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
menu_nodes_group = menuItem(__txtx("panel_graph_group_nodes", "Group nodes"), function() { doGroup(); }, THEME.group, ["Graph", "Group"]);
menu_nodes_frame = menuItem(__txtx("panel_graph_frame_nodes", "Frame nodes"), function() { doFrame(); }, noone, ["Graph", "Frame"]);
menu_node_copy_prop = menuItem(__txtx("panel_graph_copy_prop", "Copy all properties"), function() { doCopyProp(); });
menu_node_paste_prop = menuItem(__txtx("panel_graph_paste_prop", "Paste all properties"), function() { doPasteProp(); });
#region node color
function setSelectingNodeColor(color) {
if(node_hover == noone) return;
@ -447,7 +451,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
nodes_select_list[| i].timeline_item.color = color;
}
var _clrs = COLORS.timeline_blend;
var _clrs = COLORS.labels;
var _item = array_create(array_length(_clrs));
for( var i = 0, n = array_length(_clrs); i < n; i++ ) {
@ -496,7 +500,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
}
}
var _clrs = COLORS.timeline_blend;
var _clrs = COLORS.labels;
var _item = array_create(array_length(_clrs));
for( var i = 0, n = array_length(_clrs); i < n; i++ ) {
@ -626,9 +630,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
var _doDragging = false;
var _doZooming = false;
if(mouse_press(mb_middle)) {
if(mouse_press(PREF_MAP[? "pan_mouse_key"])) {
_doDragging = true;
drag_key = mb_middle;
drag_key = PREF_MAP[? "pan_mouse_key"];
} else if(mouse_press(mb_left) && graph_dragging_key) {
_doDragging = true;
drag_key = mb_left;
@ -696,7 +700,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
function drawGrid() { #region
if(!display_parameter.show_grid) return;
var gls = project.graphGrid.size;
if(graph_s <= 0.15) gls *= 10;
while(gls * graph_s < 8) gls *= 5;
var gr_x = graph_x * graph_s;
var gr_y = graph_y * graph_s;
@ -705,18 +709,26 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
var yy = -gr_ls, ys = safe_mod(gr_y, gr_ls);
draw_set_color(project.graphGrid.color);
draw_set_alpha(project.graphGrid.opacity * (graph_s >= 1? 1 : 0.5));
while(xx < w + gr_ls) {
var aa = 0.5;
if(graph_s < 0.25)
aa = 0.3;
var oa = project.graphGrid.opacity;
var ori = project.graphGrid.show_origin;
var hig = project.graphGrid.highlight;
while(xx < w + gr_ls) {
draw_set_alpha( oa * aa * (1 + (round((xx + xs - gr_x) / gr_ls) % hig == 0) * 2) );
draw_line(xx + xs, 0, xx + xs, h);
if(xx + xs - gr_x == 0)
draw_line_width(xx + xs, 0, xx + xs, h, 3);
if(ori && xx + xs - gr_x == 0) draw_line_width(xx + xs, 0, xx + xs, h, 3);
xx += gr_ls;
}
while(yy < h + gr_ls) {
draw_set_alpha( oa * aa * (1 + (round((yy + ys - gr_y) / gr_ls) % hig == 0) * 2) );
draw_line(0, yy + ys, w, yy + ys);
if(yy + ys - gr_y == 0)
draw_line_width(0, yy + ys, w, yy + ys, 3);
if(ori && yy + ys - gr_y == 0) draw_line_width(0, yy + ys, w, yy + ys, 3);
yy += gr_ls;
}
draw_set_alpha(1);
@ -856,6 +868,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
array_push(menu, menu_group_tool);
array_push(menu, -1, menu_node_delete_merge, menu_node_delete_cut, menu_node_duplicate, menu_node_copy);
if(ds_list_empty(nodes_select_list)) array_push(menu, menu_node_copy_prop, menu_node_paste_prop);
array_push(menu, -1, menu_node_transform, menu_node_canvas);
if(ds_list_size(nodes_select_list) >= 2)
@ -893,7 +907,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
printIf(log, "Draw active: " + string(current_time - t)); t = current_time;
var aa = PREF_MAP[? "connection_line_aa"];
connection_surface = surface_verify(connection_surface, w * aa, h * aa);
connection_surface = surface_verify(connection_surface, w * aa, h * aa);
connection_surface_aa = surface_verify(connection_surface_aa, w, h);
surface_set_target(connection_surface);
DRAW_CLEAR
@ -926,11 +941,19 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
printIf(log, "Draw connection: " + string(current_time - t)); t = current_time;
surface_reset_target();
shader_set(sh_downsample);
shader_set_f("down", aa);
shader_set_f("dimension", surface_get_width_safe(connection_surface), surface_get_height_safe(connection_surface));
draw_surface(connection_surface, 0, 0);
surface_set_shader(connection_surface_aa, sh_downsample);
shader_set_f("down", aa);
shader_set_dim("dimension", connection_surface);
draw_surface(connection_surface, 0, 0);
surface_reset_shader();
BLEND_ALPHA
shader_set(sh_FXAA);
shader_set_dim("dimension", connection_surface_aa);
draw_surface(connection_surface_aa, 0, 0);
shader_reset();
BLEND_NORMAL
junction_hovering = (node_hovering == noone && !is_struct(node_hovering))? hov : noone;
value_focus = noone;
@ -1397,7 +1420,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
var nw = _node.w * ss;
var nh = _node.h * ss;
draw_set_color(_node.color);
draw_set_color(_node.getColor());
draw_roundrect_ext(nx, ny, nx + nw, ny + nh, THEME_VALUE.minimap_corner_radius, THEME_VALUE.minimap_corner_radius, false);
}
draw_set_alpha(1);
@ -1424,6 +1447,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
if(mouse_click(mb_left, hover))
minimap_panning = true;
}
surface_reset_target();
draw_surface_ext_safe(minimap_surface, mx0, my0, 1, 1, 0, c_white, 0.5 + 0.35 * hover);
@ -1906,6 +1930,36 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
}
ds_list_clear(nodes_select_list);
} #endregion
node_prop_clipboard = noone;
function doCopyProp() { #region
if(node_hover == noone) return;
node_prop_clipboard = node_hover;
} #endregion
function doPasteProp() { #region
if(node_hover == noone) return;
if(node_prop_clipboard == noone) return;
if(!node_prop_clipboard.active) return;
if(instanceof(node_prop_clipboard) != instanceof(node_hover)) return;
var _vals = [];
for( var i = 0, n = ds_list_size(node_prop_clipboard.inputs); i < n; i++ ) {
var _inp = node_prop_clipboard.inputs[| i];
_vals[i] = _inp.serialize();
}
for( var i = 0, n = ds_list_size(node_hover.inputs); i < n; i++ ) {
var _inp = node_hover.inputs[| i];
if(_inp.value_from != noone) continue;
_inp.applyDeserialize(_vals[i]);
}
node_hover.clearInputCache();
RENDER_PARTIAL
} #endregion
#endregion
function dropFile(path) { #region

View file

@ -6,7 +6,7 @@ function Panel_Graph_Grid_Setting() : Panel_Linear_Setting() constructor {
#region data
properties = [
[
new checkBox(function(str) {
new checkBox(function() {
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.snap = !PANEL_GRAPH.project.graphGrid.snap;
}),
@ -36,7 +36,24 @@ function Panel_Graph_Grid_Setting() : Panel_Linear_Setting() constructor {
}, self),
__txtx("project_graphGrid_color", "Grid color"),
function() { return PANEL_GRAPH.project.graphGrid.color; }
]
],
[
new checkBox(function() {
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.show_origin = !PANEL_GRAPH.project.graphGrid.show_origin;
}),
__txtx("grid_show_origin", "Show origin"),
function() { return PANEL_GRAPH.project.graphGrid.show_origin; }
],
[
new textBox(TEXTBOX_INPUT.number, function(str) {
if(PANEL_GRAPH.project == noone || !PANEL_GRAPH.project.active) return;
PANEL_GRAPH.project.graphGrid.highlight = max(1, round(real(str)));
}),
__txtx("grid_highlight_every", "Highlight period"),
function() { return PANEL_GRAPH.project.graphGrid.highlight; }
],
];
setHeight();

View file

@ -149,7 +149,7 @@ function Panel_Inspector() : PanelContent() constructor {
_val_to[i].color = color;
}
var _clrs = COLORS.timeline_blend;
var _clrs = COLORS.labels;
var _item = array_create(array_length(_clrs));
for( var i = 0, n = array_length(_clrs); i < n; i++ ) {

View file

@ -176,6 +176,10 @@ function Panel_Menu() : PanelContent() constructor {
json_save_struct(DIRECTORY + "layouts/" + name + ".json", cont);
};
}));
array_push(arr, menuItem(__txtx("panel_menu_reset_layout", "Reset layout"), function() {
resetPanel();
},, [ "", "Reset layout" ]));
array_push(arr, -1);
for(var i = 0; i < array_length(lays); i++) {

View file

@ -82,6 +82,10 @@ function Panel_Preview() : PanelContent() constructor {
tool_x_max = 0;
tool_current = noone;
tool_hovering = false;
tool_side_drawing = false;
overlay_hovering = false;
sbChannel = new scrollBox([], function(index) { #region
var node = getNodePreview();
if(node == noone) return;
@ -382,9 +386,9 @@ function Panel_Preview() : PanelContent() constructor {
var _doDragging = false;
var _doZooming = false;
if(mouse_press(mb_middle)) {
if(mouse_press(PREF_MAP[? "pan_mouse_key"])) {
_doDragging = true;
canvas_drag_key = mb_middle;
canvas_drag_key = PREF_MAP[? "pan_mouse_key"];
} else if(mouse_press(mb_left) && canvas_dragging_key) {
_doDragging = true;
canvas_drag_key = mb_left;
@ -466,9 +470,9 @@ function Panel_Preview() : PanelContent() constructor {
var _doDragging = false;
var _doZooming = false;
if(mouse_press(mb_middle)) {
if(mouse_press(PREF_MAP[? "pan_mouse_key"])) {
_doDragging = true;
canvas_drag_key = mb_middle;
canvas_drag_key = PREF_MAP[? "pan_mouse_key"];
} else if(mouse_press(mb_left) && canvas_dragging_key) {
_doDragging = true;
canvas_drag_key = mb_left;
@ -731,9 +735,9 @@ function Panel_Preview() : PanelContent() constructor {
if(is_surface(preview_surface[0])) { #region outline
if(PROJECT.previewGrid.show) {
var _gw = PROJECT.previewGrid.size[0] * canvas_s;
var _gw = PROJECT.previewGrid.size[0] * canvas_s;
var _gh = PROJECT.previewGrid.size[1] * canvas_s;
var gw = pswd / _gw;
var gh = pshd / _gh;
@ -1068,9 +1072,6 @@ function Panel_Preview() : PanelContent() constructor {
#endregion
} #endregion
tool_hovering = false;
tool_side_drawing = false;
function drawNodeTools(active, _node) { #region
var _mx = mx;
var _my = my;
@ -1089,7 +1090,7 @@ function Panel_Preview() : PanelContent() constructor {
mouse_on_preview = 0;
}
var overlayHover = tool_hovering == noone;
var overlayHover = tool_hovering == noone && !overlay_hovering;
overlayHover &= active && isHover;
overlayHover &= point_in_rectangle(mx, my, 0, toolbar_height, w, h - toolbar_height);
overlayHover &= !key_mod_press(CTRL);
@ -1113,6 +1114,20 @@ function Panel_Preview() : PanelContent() constructor {
_node.drawOverlay(overlayHover, cx, cy, canvas_s, _mx, _my, _snx, _sny, { w, h });
}
#region node overlay
overlay_hovering = false;
if(_node.drawPreviewToolOverlay(pHOVER && pFOCUS, _mx, _my, { x, y, w, h, toolbar_height,
x0: _node.tools == -1? 0 : ui(40),
x1: w,
y0: toolbar_height - ui(8),
y1: h - toolbar_height
})) {
canvas_hover = false;
overlay_hovering = true;
}
#endregion
var _tool = tool_hovering;
tool_hovering = noone;

View file

@ -46,10 +46,16 @@ function Panel_Test() : PanelContent() constructor {
scanDir(test_dir);
for( var i = 0, n = array_length(test_files); i < n; i++ ) {
run_in(i * 3, function(i) {
print($"TESTING: {test_files[i]}");
TEST_PATH(test_files[i]);
test_index = i
run_in(1 + i * 3, function(i) {
try {
print($"TESTING: {test_files[i]}");
TEST_PATH(test_files[i]);
test_index = i;
print($" > Test complete");
} catch(e) {
print($" > Test failed");
exception_print(e);
}
}, [i]);
}
}

View file

@ -85,6 +85,10 @@
global.FUNCTIONS[? "surface_get_width"] = [ ["surface"], function(val) { return surface_get_width_safe(array_safe_get(val, 0)); } ];
global.FUNCTIONS[? "surface_get_height"] = [ ["surface"], function(val) { return surface_get_height_safe(array_safe_get(val, 0)); } ];
global.FUNCTIONS[? "color_hex"] = [ ["char"], function(val) { return colorFromHex(array_safe_get(val, 0)); } ];
global.FUNCTIONS[? "color_rgb"] = [ ["red", "green", "blue"], function(val) { return make_color_rgb(array_safe_get(val, 0), array_safe_get(val, 1), array_safe_get(val, 2)); } ];
global.FUNCTIONS[? "color_hsv"] = [ ["red", "green", "blue"], function(val) { return make_color_hsv(array_safe_get(val, 0), array_safe_get(val, 1), array_safe_get(val, 2)); } ];
globalvar PROJECT_VARIABLES;
PROJECT_VARIABLES = {};

View file

@ -74,8 +74,9 @@
PREF_MAP[? "render_all_export"] = true;
PREF_MAP[? "alt_picker"] = true;
PREF_MAP[? "clear_temp_on_close"] = true;
PREF_MAP[? "alt_picker"] = true;
PREF_MAP[? "clear_temp_on_close"] = true;
PREF_MAP[? "pan_mouse_key"] = mb_middle;
#endregion
#region recent files

View file

@ -167,7 +167,7 @@ function preview_overlay_puppet(interact, active, _x, _y, _s, _mx, _my, _snx, _s
}
}
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && active && point_in_circle(_mx, _my, _ax, _ay, 8)) {
hover = 1;
draw_sprite_colored(THEME.anchor_selector, 1, _ax, _ay);
if(mouse_press(mb_left, active)) {
@ -179,7 +179,7 @@ function preview_overlay_puppet(interact, active, _x, _y, _s, _mx, _my, _snx, _s
}
}
if(interact && _val[PUPPET_CONTROL.mode] == PUPPET_FORCE_MODE.move && point_in_circle(_mx, _my, _ax1, _ay1, 8)) {
if(interact && active && _val[PUPPET_CONTROL.mode] == PUPPET_FORCE_MODE.move && point_in_circle(_mx, _my, _ax1, _ay1, 8)) {
hover = 2;
draw_sprite_colored(THEME.anchor_selector, 0, _ax1, _ay1);
if(mouse_press(mb_left, active)) {

View file

@ -27,7 +27,7 @@ function preview_overlay_rotation(interact, active, _x, _y, _s, _mx, _my, _snx,
}
}
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && active && point_in_circle(_mx, _my, _ax, _ay, 8)) {
draw_set_color(COLORS._main_accent);
draw_set_alpha(0.5);
draw_circle_prec(_x, _y, _rad, true);

View file

@ -25,7 +25,7 @@ function preview_overlay_scalar(interact, active, _x, _y, _s, _mx, _my, _snx, _s
}
}
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && active && point_in_circle(_mx, _my, _ax, _ay, 8)) {
hover = 1;
index = 1;
if(mouse_press(mb_left, active)) {

View file

@ -32,7 +32,7 @@ function preview_overlay_vector(interact, active, _x, _y, _s, _mx, _my, _snx, _s
}
}
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && active && point_in_circle(_mx, _my, _ax, _ay, 8)) {
hover = 1;
draw_sprite_colored(_spr, 1, _ax, _ay);
if(mouse_press(mb_left, active)) {

View file

@ -32,10 +32,12 @@
graphGrid = { #region
show : true,
show_origin : false,
snap : true,
size : 32,
size : 16,
opacity : 0.05,
color : c_white,
highlight : 12,
} #endregion
addons = {};

View file

@ -10,7 +10,7 @@ function __initTheme() {
}
json_save_struct(_l, { version: BUILD_NUMBER });
log_message("THEME", "unzipping default theme to DIRECTORY.");
log_message("THEME", $"unzipping default theme to {root}.");
zip_unzip("data/themes/default.zip", root);
}

View file

@ -18,7 +18,7 @@ function steam_ugc_create_collection(file) {
STEAM_UGC_ITEM_ID = steam_ugc_create_item(STEAM_APP_ID, ugc_filetype_community);
}
function steam_ugc_update_collection(file, update_preview = false) {
function steam_ugc_update_collection(file, update_preview = false, update_note = "Updated") {
if(STEAM_UGC_ITEM_UPLOADING) return;
STEAM_UGC_UPDATE = true;
@ -43,7 +43,7 @@ function steam_ugc_update_collection(file, update_preview = false) {
steam_ugc_set_item_tags(STEAM_UGC_UPDATE_HANDLE, STEAM_UGC_ITEM_FILE.meta.tags);
steam_ugc_set_item_content(STEAM_UGC_UPDATE_HANDLE, DIRECTORY + "steamUGC");
STEAM_UGC_SUBMIT_ID = steam_ugc_submit_item_update(STEAM_UGC_UPDATE_HANDLE, "Updated");
STEAM_UGC_SUBMIT_ID = steam_ugc_submit_item_update(STEAM_UGC_UPDATE_HANDLE, update_note);
}
function steam_ugc_collection_generate(file, dest_path = DIRECTORY + "steamUGCthumbnail.png") {

View file

@ -23,7 +23,7 @@ function steam_ugc_create_project() {
STEAM_UGC_ITEM_ID = steam_ugc_create_item(STEAM_APP_ID, ugc_filetype_community);
}
function steam_ugc_update_project(update_preview = false) {
function steam_ugc_update_project(update_preview = false, update_note = "Updated") {
if(STEAM_UGC_ITEM_UPLOADING) return;
var file = new FileObject(string_replace(filename_name(PROJECT.path), filename_ext(PROJECT.path), ""), PROJECT.path);
@ -50,7 +50,7 @@ function steam_ugc_update_project(update_preview = false) {
steam_ugc_set_item_tags(STEAM_UGC_UPDATE_HANDLE, STEAM_UGC_ITEM_FILE.meta.tags);
steam_ugc_set_item_content(STEAM_UGC_UPDATE_HANDLE, DIRECTORY + "steamUGC");
STEAM_UGC_SUBMIT_ID = steam_ugc_submit_item_update(STEAM_UGC_UPDATE_HANDLE, "Updated");
STEAM_UGC_SUBMIT_ID = steam_ugc_submit_item_update(STEAM_UGC_UPDATE_HANDLE, update_note);
}
function steam_ugc_project_generate(dest_path = DIRECTORY + "steamUGCthumbnail.png") {

View file

@ -49,4 +49,14 @@ function color_from_rgb(str) {
var _b = string_hexadecimal(string_copy(str, 5, 2));
return make_color_rgb(_r, _g, _b);
}
function colorFromHex(hex) {
if(string_length(hex) != 6) return 0;
var rr = string_hexadecimal(string_copy(hex, 1, 2));
var gg = string_hexadecimal(string_copy(hex, 3, 2));
var bb = string_hexadecimal(string_copy(hex, 5, 2));
return make_color_rgb(rr, gg, bb);
}

View file

@ -17,6 +17,8 @@ function file_text_read_all_lines(path) {
}
function file_text_write_all(path, str) {
if(file_exists(path)) file_delete(path);
var f = file_text_open_write(path);
file_text_write_string(f, str);
file_text_close(f);

View file

@ -9,16 +9,17 @@ uniform vec2 dimension;
void main() {
vec4 col = vec4(0.);
vec2 tx = 1. / dimension;
float wei = 0.;
for( float i = 0.; i < down; i++ )
for( float j = 0.; j < down; j++ ) {
vec4 samp = texture2D( gm_BaseTexture, v_vTexcoord * down + vec2(i, j) / dimension );
vec4 samp = texture2D( gm_BaseTexture, v_vTexcoord * down + vec2(i, j) * tx );
col += samp;
wei += samp.a;
}
col /= wei;
gl_FragColor = col * v_vColour;
gl_FragColor = col;
}